2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /*%% (c) Copyright 1993, 1994 Hewlett-Packard Company */
24 /*%% (c) Copyright 1993, 1994 International Business Machines Corp. */
25 /*%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. */
26 /*%% (c) Copyright 1993, 1994 Novell, Inc. */
27 /*%% $XConsortium: CoEdSiteID.h /main/3 1995/10/20 17:07:21 rswiston $ */
32 * Copyright (c) 1991 by Sun Microsystems. All Rights Reserved.
34 * Permission to use, copy, modify, distribute, and sell this software
35 * and its documentation for any purpose is hereby granted without
36 * fee, provided that the above copyright notice appear in all copies
37 * and that both that copyright notice and this permission notice
38 * appear in supporting documentation, and that the names of Sun
39 * Microsystems and its subsidiaries not be used in advertising or
40 * publicity pertaining to distribution of the software without
41 * specific, written prior permission. Sun Microsystems and its
42 * subsidiaries make no representations about the suitability of this
43 * software for any purpose. It is provided "as is" without express
44 * or implied warranty.
46 * Sun Microsystems and its subsidiaries disclaim all warranties with
47 * regard to this software, including all implied warranties of
48 * merchantability and fitness. In no event shall Sun Microsystems or
49 * its subsidiaries be liable for any special, indirect or
50 * consequential damages or any damages whatsoever resulting from loss
51 * of use, data or profits, whether in an action of contract,
52 * negligence or other tortious action, arising out of or in
53 * connection with the use or performance of this software.
59 #include <rpc/types.h>
63 friend class CoEdSiteIDList;
64 friend class SiteChangeList;
65 friend class CoEdTextVersion;
69 CoEdSiteID( const char *procID );
70 CoEdSiteID( const CoEdSiteID &id );
73 bool_t xdr( XDR *xdrStream );
74 CoEdSiteID *copy() const;
75 CoEdSiteID ©( const CoEdSiteID *id2Copy );
76 int cmp( const CoEdSiteID &id ) const;
77 int operator==( const CoEdSiteID &id ) const
78 { return (cmp( id ) == 0); }
79 int operator<( const CoEdSiteID &id ) const
80 { return (cmp( id ) < 0); }
81 void print( FILE *f ) const;
89 class CoEdSiteIDList {
95 void push( CoEdSiteID *change );
96 void append( CoEdSiteID *change );
97 void insertBefore( CoEdSiteID *change1,
98 CoEdSiteID *change2 );
99 void insertAfter( CoEdSiteID *change2,
100 CoEdSiteID *change1 );
102 { return (_count == 0); }