ce.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. /*%% (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. * Classing Engine data types
  43. */
  44. #ifndef ce_hdr_DEFINED
  45. #define ce_hdr_DEFINED
  46. #include <xview/xv_c_types.h>
  47. /* CE API flags */
  48. #define CE_FLAG_TEST_ALL 0
  49. #define CE_FLAG_TEST_PERMISSIONS 1
  50. /* Name Space handle - an index in the global table of name spaces */
  51. typedef void *CE_NAMESPACE;
  52. /* Entry handle */
  53. typedef void *CE_ENTRY;
  54. /* Attribute handle */
  55. typedef void *CE_ATTRIBUTE;
  56. #if defined(__cplusplus) || defined(__STDC__)
  57. typedef void *(*CE_NAMESPACE_MAP_FUNCTION)(CE_NAMESPACE, void *);
  58. typedef void *(*CE_ENTRY_MAP_FUNCTION)(CE_NAMESPACE, CE_ENTRY, void *);
  59. typedef void *(*CE_ATTR_MAP_FUNCTION)(CE_ATTRIBUTE, char *, void *);
  60. #else
  61. typedef void *(*CE_NAMESPACE_MAP_FUNCTION)();
  62. typedef void *(*CE_ENTRY_MAP_FUNCTION)();
  63. typedef void *(*CE_ATTR_MAP_FUNCTION)();
  64. #endif
  65. /* the extern routines for the classing engine */
  66. EXTERN_FUNCTION( int ce_abort_write, (int) );
  67. EXTERN_FUNCTION( int ce_add_attribute,
  68. (CE_NAMESPACE, CE_ENTRY *, CONST char *, CONST char *, CONST char *, int) );
  69. EXTERN_FUNCTION( int ce_add_entry, (CE_NAMESPACE, CE_ENTRY) );
  70. EXTERN_FUNCTION( int ce_add_namespace, (char *, CE_NAMESPACE *) );
  71. EXTERN_FUNCTION( int ce_alloc_entry, (CE_NAMESPACE, CE_ENTRY *) );
  72. EXTERN_FUNCTION( int ce_alloc_ns_entry, (CE_NAMESPACE, CE_ENTRY *) );
  73. EXTERN_FUNCTION( int ce_commit_write, (int) );
  74. EXTERN_FUNCTION( int ce_begin, (void *) );
  75. EXTERN_FUNCTION( int ce_clone_namespace, (CE_NAMESPACE *) );
  76. EXTERN_FUNCTION( int ce_db_changed, (_VOID_) );
  77. EXTERN_FUNCTION( int ce_end, (_VOID_) );
  78. EXTERN_FUNCTION(char *ce_get_attribute,
  79. (CE_NAMESPACE, CE_ENTRY, CE_ATTRIBUTE) );
  80. EXTERN_FUNCTION( CE_ATTRIBUTE ce_get_attribute_id, (CE_NAMESPACE, CONST char *) );
  81. EXTERN_FUNCTION( char *ce_get_attribute_name, (CE_ATTRIBUTE) );
  82. EXTERN_FUNCTION( int ce_get_attribute_size,
  83. (CE_NAMESPACE, CE_ENTRY, CE_ATTRIBUTE) );
  84. EXTERN_FUNCTION( char *ce_get_attribute_type,
  85. (CE_NAMESPACE, CE_ENTRY, CE_ATTRIBUTE) );
  86. EXTERN_FUNCTION( int ce_get_dbs, (int *, char ***, char ***) );
  87. EXTERN_FUNCTION( CE_ENTRY ce_get_entry, (CE_NAMESPACE, int, DOTDOTDOT) );
  88. EXTERN_FUNCTION( int ce_get_entry_db_info,
  89. (CE_NAMESPACE, CE_ENTRY, char **, char **) );
  90. EXTERN_FUNCTION( CE_NAMESPACE ce_get_namespace_id, (char *) );
  91. EXTERN_FUNCTION( char *ce_get_namespace_name, (CE_NAMESPACE) );
  92. EXTERN_FUNCTION( CE_ENTRY ce_get_ns_entry, (CE_NAMESPACE) );
  93. EXTERN_FUNCTION(void *ce_map_through_attrs,
  94. (CE_NAMESPACE, CE_ENTRY, CE_ATTR_MAP_FUNCTION, void *) );
  95. EXTERN_FUNCTION( void *ce_map_through_entries,
  96. (CE_NAMESPACE, CE_ENTRY_MAP_FUNCTION, void *) );
  97. EXTERN_FUNCTION( void *ce_map_through_namespaces,
  98. (CE_NAMESPACE_MAP_FUNCTION, void *) );
  99. EXTERN_FUNCTION( void *ce_map_through_ns_attrs,
  100. (CE_NAMESPACE, CE_ATTR_MAP_FUNCTION, void *) );
  101. EXTERN_FUNCTION( int ce_modify_attribute,
  102. (CE_NAMESPACE, CE_ENTRY *, char *, char *, char *, int) );
  103. EXTERN_FUNCTION( int ce_remove_attribute,
  104. (CE_NAMESPACE, CE_ENTRY, CE_ATTRIBUTE) );
  105. EXTERN_FUNCTION( int ce_remove_entry, (CE_NAMESPACE, CE_ENTRY) );
  106. EXTERN_FUNCTION( int ce_remove_namespace, (CE_NAMESPACE) );
  107. EXTERN_FUNCTION( int ce_start_write, (char *) );
  108. EXTERN_FUNCTION( int ce_test_ok_to_write, (char *, int) );
  109. #endif ce_hdr_DEFINED