dtdocbook: Coverity 86763
[oweals/cde.git] / cde / programs / dtsession / SmDB.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
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)
10  * any later version.
11  *
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
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these libraries and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 #ifndef SM_DB_H
24 #define SM_DB_H
25
26 /* $XConsortium: SmDB.h /main/3 1996/02/02 16:03:03 rswiston $ */
27 /*
28  * (c) Copyright 1996 Digital Equipment Corporation.
29  * (c) Copyright 1996 Hewlett-Packard Company.
30  * (c) Copyright 1996 International Business Machines Corp.
31  * (c) Copyright 1996 Sun Microsystems, Inc.
32  * (c) Copyright 1996 Novell, Inc. 
33  * (c) Copyright 1996 FUJITSU LIMITED.
34  * (c) Copyright 1996 Hitachi.
35  */
36
37 #include "SmXSMP.h"
38 #include <X11/Intrinsic.h>
39
40 typedef void *ClientDB;
41
42 /* Public variables */
43 extern char *versionStr;
44 extern char *dtsessionIDStr;
45
46 /********* Open the client database *********/
47 /*
48  * Open client database for reading.
49  */
50 extern ClientDB OpenInputClientDB(char *fileName,
51                                   char **version,
52                                   char **dtsessionID);
53 /*
54  * Open client database for writing.
55  */
56 extern ClientDB OpenOutputClientDB(char *fileName,
57                                    char *version,
58                                    char *dtsessionID);
59
60
61 /********* Retrieve client record from database *********/
62 /*
63  * Retrieve the next XSMP client record from the database.
64  */
65 extern XSMPClientDBRecPtr GetXSMPClientDBRec(ClientDB inputDB);
66 /*
67  * Retrieve the next Proxy client record from the database.
68  */
69 extern ProxyClientDBRecPtr GetProxyClientDBRec(ClientDB inputDB);
70
71
72 /********* Save client record to database *********/
73 /*
74  * Save XSMP client record to database.
75  */
76 extern Boolean PutXSMPClientDBRec(ClientDB outputDB,
77                                   XSMPClientDBRecPtr clientPtr);
78 /*
79  * Save Proxy client record to database.
80  */
81 extern Boolean PutProxyClientDBRec(ClientDB outputDB,
82                                    ProxyClientDBRecPtr clientPtr);
83
84
85 /********* Close client database *********/
86 extern Boolean CloseClientDB(ClientDB clientDB, Boolean writeDB);
87
88
89 /********* Free memory allocated for client records. *********/
90 extern void FreeXSMPClientDBRec(XSMPClientDBRecPtr);
91 extern void FreeProxyClientDBRec(ProxyClientDBRecPtr);
92
93 #endif /* SM_DB_H */