Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / lib / tt / slib / ce.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 librararies 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 /*%%  (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: ce.h /main/3 1995/10/23 11:48:35 rswiston $                                                          */
28 /* @(#)ce.h     1.3 %%
29  * 
30  * XXX: This is a copy of the OW 3.1 CE include file.  It's a horrible
31  * thing to do, but we copy this into the ToolTalk build tree because
32  * of the way the OW,  DeskSet, and ToolTalk builds are intertwined.
33  * Currently ToolTalk must be built before DeskSet and after Classing
34  * Engine, because DeskSet uses ToolTalk and ToolTalk uses Classing
35  * Engine.  But, Classing Engine is built as part of DeskSet!  To 
36  * break this vicious circle, we copy out the CE include we need to
37  * compile ToolTalk.  Since we expect to completely get off of
38  * Classing Engine in the next feature release of ToolTalk, this
39  * is only a temporary measure.
40  */
41
42
43 /*
44  * Classing Engine data types
45  */
46
47
48 #ifndef ce_hdr_DEFINED
49 #define ce_hdr_DEFINED
50 #include <xview/xv_c_types.h>
51
52 /* CE API flags */
53 #define CE_FLAG_TEST_ALL                0
54 #define CE_FLAG_TEST_PERMISSIONS        1
55
56 /* Name Space handle  - an index in the global table of name spaces */
57 typedef void *CE_NAMESPACE;
58
59 /* Entry handle */
60 typedef void *CE_ENTRY;
61
62 /* Attribute handle */
63 typedef void *CE_ATTRIBUTE;
64
65 #if defined(__cplusplus) || defined(__STDC__)
66 typedef void *(*CE_NAMESPACE_MAP_FUNCTION)(CE_NAMESPACE, void *);
67 typedef void *(*CE_ENTRY_MAP_FUNCTION)(CE_NAMESPACE, CE_ENTRY, void *);
68 typedef void *(*CE_ATTR_MAP_FUNCTION)(CE_ATTRIBUTE, char *, void *);
69 #else
70 typedef void *(*CE_NAMESPACE_MAP_FUNCTION)();
71 typedef void *(*CE_ENTRY_MAP_FUNCTION)();
72 typedef void *(*CE_ATTR_MAP_FUNCTION)();
73 #endif
74
75 /* the extern routines for the classing engine */
76
77 EXTERN_FUNCTION( int ce_abort_write, (int) );
78 EXTERN_FUNCTION( int ce_add_attribute,
79                 (CE_NAMESPACE, CE_ENTRY *, CONST char *, CONST char *, CONST char *, int) );
80 EXTERN_FUNCTION( int ce_add_entry, (CE_NAMESPACE, CE_ENTRY) );
81 EXTERN_FUNCTION( int ce_add_namespace, (char *, CE_NAMESPACE *) );
82 EXTERN_FUNCTION( int ce_alloc_entry, (CE_NAMESPACE, CE_ENTRY *) );
83 EXTERN_FUNCTION( int ce_alloc_ns_entry, (CE_NAMESPACE, CE_ENTRY *) );
84 EXTERN_FUNCTION( int ce_commit_write, (int) );
85 EXTERN_FUNCTION( int ce_begin, (void *) );
86 EXTERN_FUNCTION( int ce_clone_namespace, (CE_NAMESPACE *) );
87 EXTERN_FUNCTION( int ce_db_changed, (_VOID_) );
88 EXTERN_FUNCTION( int ce_end, (_VOID_) );
89 EXTERN_FUNCTION(char *ce_get_attribute,
90                 (CE_NAMESPACE, CE_ENTRY, CE_ATTRIBUTE) );
91 EXTERN_FUNCTION( CE_ATTRIBUTE ce_get_attribute_id, (CE_NAMESPACE, CONST char *) );
92 EXTERN_FUNCTION( char *ce_get_attribute_name, (CE_ATTRIBUTE) );
93 EXTERN_FUNCTION( int ce_get_attribute_size,
94                 (CE_NAMESPACE, CE_ENTRY, CE_ATTRIBUTE) );
95 EXTERN_FUNCTION( char *ce_get_attribute_type,
96                 (CE_NAMESPACE, CE_ENTRY, CE_ATTRIBUTE) );
97 EXTERN_FUNCTION( int ce_get_dbs, (int *, char ***, char ***) );
98 EXTERN_FUNCTION( CE_ENTRY ce_get_entry, (CE_NAMESPACE, int, DOTDOTDOT) );
99 EXTERN_FUNCTION( int ce_get_entry_db_info,
100                 (CE_NAMESPACE, CE_ENTRY, char **, char **) );
101 EXTERN_FUNCTION( CE_NAMESPACE ce_get_namespace_id, (char *) );
102 EXTERN_FUNCTION( char *ce_get_namespace_name, (CE_NAMESPACE) );
103 EXTERN_FUNCTION( CE_ENTRY ce_get_ns_entry, (CE_NAMESPACE) );
104 EXTERN_FUNCTION(void *ce_map_through_attrs,
105                 (CE_NAMESPACE, CE_ENTRY, CE_ATTR_MAP_FUNCTION, void *) );
106 EXTERN_FUNCTION( void *ce_map_through_entries,
107                 (CE_NAMESPACE, CE_ENTRY_MAP_FUNCTION, void *) );
108 EXTERN_FUNCTION( void *ce_map_through_namespaces,
109                 (CE_NAMESPACE_MAP_FUNCTION, void *) );
110 EXTERN_FUNCTION( void *ce_map_through_ns_attrs,
111                 (CE_NAMESPACE, CE_ATTR_MAP_FUNCTION, void *) );
112 EXTERN_FUNCTION( int ce_modify_attribute,
113                 (CE_NAMESPACE, CE_ENTRY *, char *, char *, char *, int) );
114 EXTERN_FUNCTION( int ce_remove_attribute,
115                 (CE_NAMESPACE, CE_ENTRY, CE_ATTRIBUTE) );
116 EXTERN_FUNCTION( int ce_remove_entry, (CE_NAMESPACE, CE_ENTRY) );
117 EXTERN_FUNCTION( int ce_remove_namespace, (CE_NAMESPACE) );
118 EXTERN_FUNCTION( int ce_start_write, (char *) );
119 EXTERN_FUNCTION( int ce_test_ok_to_write, (char *, int) );
120
121 #endif ce_hdr_DEFINED