tt_c.h 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703
  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. /* $TOG: tt_c.h /main/10 1999/09/16 13:46:20 mgreess $ */
  24. /*%% (c) Copyright 1993, 1994 Hewlett-Packard Company */
  25. /*%% (c) Copyright 1993, 1994 International Business Machines Corp. */
  26. /*%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. */
  27. /*%% (c) Copyright 1993, 1994 Novell, Inc. */
  28. /*
  29. * ToolTalk 1.2 API C language headers.
  30. */
  31. #ifndef _tt_c_h
  32. #define _tt_c_h
  33. #include <stdio.h>
  34. /* ToolTalk version - Format:
  35. *
  36. * <Major Release #><Minor Release #: 2 digits><Dot Release #: 2 digits>
  37. *
  38. * For example:
  39. * 10100 --> Version 1.1.0
  40. * 100102 --> Version 10.1.2
  41. */
  42. #define TT_VERSION 10300
  43. #if defined(_EXTERN_) && defined(__STDC__)
  44. # define _TT_CONST
  45. # define _TT_EXTERN_FUNC(type,name,list) extern XS_LVAL x##name ()
  46. #else
  47. #if defined(_EXTERN_)
  48. # define _TT_CONST
  49. # define _TT_EXTERN_FUNC(type,name,list) extern XS_LVAL x/**/name ()
  50. #else
  51. #if defined(_NAMES_)
  52. # define _TT_CONST
  53. # define _TT_EXTERN_FUNC(type,name,list)name
  54. #else
  55. #if defined(_XSCHEME_)
  56. # define _TT_CONST const
  57. # define _TT_EXTERN_FUNC(type,name,list)type; name; list
  58. #else
  59. #if defined(__cplusplus)
  60. /* C++ 2.0 or later*/
  61. # define _TT_CONST const
  62. # define _TT_EXTERN_FUNC(type,name,list) extern "C" { type name list; }
  63. #else
  64. #if defined(__STDC__)
  65. /* ANSI C */
  66. # define _TT_CONST const
  67. # define _TT_EXTERN_FUNC(type,name,list) type name list;
  68. #else
  69. /* Sun C (K&R C, almost) */
  70. # define _TT_CONST
  71. # define _TT_EXTERN_FUNC(type,name,list) type name();
  72. #endif
  73. #endif
  74. #endif
  75. #endif
  76. #endif
  77. #endif
  78. #if !defined(_EXTERN_) && !defined(_NAMES_) && !defined(_XSCHEME_)
  79. #if !defined(_XENUMS_) && !defined(_TYPES_)
  80. #include <sys/types.h>
  81. #endif
  82. #include <rpc/types.h>
  83. #include <rpc/xdr.h>
  84. /* former status 1030 removed, but not used, for backward compatibility. */
  85. typedef enum tt_status {
  86. TT_OK = 0,
  87. TT_WRN_NOTFOUND = 1,
  88. TT_WRN_STALE_OBJID = 2,
  89. TT_WRN_STOPPED = 3,
  90. TT_WRN_SAME_OBJID = 4,
  91. TT_WRN_START_MESSAGE = 5,
  92. TT_WRN_NOT_ENABLED = 6,
  93. TT_WRN_APPFIRST = 512,
  94. TT_WRN_LAST = 1024,
  95. TT_ERR_CLASS = 1025,
  96. TT_ERR_DBAVAIL = 1026,
  97. TT_ERR_DBEXIST = 1027,
  98. TT_ERR_FILE = 1028,
  99. TT_ERR_INVALID = 1029,
  100. TT_ERR_MODE = 1031,
  101. TT_ERR_ACCESS = 1032,
  102. TT_ERR_NOMP = 1033,
  103. TT_ERR_NOTHANDLER = 1034,
  104. TT_ERR_NUM = 1035,
  105. TT_ERR_OBJID = 1036,
  106. TT_ERR_OP = 1037,
  107. TT_ERR_OTYPE = 1038,
  108. TT_ERR_ADDRESS = 1039,
  109. TT_ERR_PATH = 1040,
  110. TT_ERR_POINTER = 1041,
  111. TT_ERR_PROCID = 1042,
  112. TT_ERR_PROPLEN = 1043,
  113. TT_ERR_PROPNAME = 1044,
  114. TT_ERR_PTYPE = 1045,
  115. TT_ERR_DISPOSITION = 1046,
  116. TT_ERR_SCOPE = 1047,
  117. TT_ERR_SESSION = 1048,
  118. TT_ERR_VTYPE = 1049,
  119. TT_ERR_NO_VALUE = 1050,
  120. TT_ERR_INTERNAL = 1051,
  121. TT_ERR_READONLY = 1052,
  122. TT_ERR_NO_MATCH = 1053,
  123. TT_ERR_UNIMP = 1054,
  124. TT_ERR_OVERFLOW = 1055,
  125. TT_ERR_PTYPE_START = 1056,
  126. TT_ERR_CATEGORY = 1057,
  127. TT_ERR_DBUPDATE = 1058,
  128. TT_ERR_DBFULL = 1059,
  129. TT_ERR_DBCONSIST = 1060,
  130. TT_ERR_STATE = 1061,
  131. TT_ERR_NOMEM = 1062,
  132. TT_ERR_SLOTNAME = 1063,
  133. TT_ERR_XDR = 1064,
  134. TT_ERR_NETFILE = 1065,
  135. TT_ERR_TOOLATE = 1066,
  136. TT_ERR_AUTHORIZATION = 1067,
  137. TT_ERR_VERSION_MISMATCH = 1068,
  138. TT_DESKTOP_ = 1100,
  139. TT_DESKTOP_EPERM = 1101,
  140. TT_DESKTOP_ENOENT = 1102,
  141. TT_DESKTOP_EINTR = 1104,
  142. TT_DESKTOP_EIO = 1105,
  143. TT_DESKTOP_EAGAIN = 1111,
  144. TT_DESKTOP_ENOMEM = 1112,
  145. TT_DESKTOP_EACCES = 1113,
  146. TT_DESKTOP_EFAULT = 1114,
  147. TT_DESKTOP_EEXIST = 1117,
  148. TT_DESKTOP_ENODEV = 1119,
  149. TT_DESKTOP_ENOTDIR = 1120,
  150. TT_DESKTOP_EISDIR = 1121,
  151. TT_DESKTOP_EINVAL = 1122,
  152. TT_DESKTOP_ENFILE = 1123,
  153. TT_DESKTOP_EMFILE = 1124,
  154. TT_DESKTOP_ETXTBSY = 1126,
  155. TT_DESKTOP_EFBIG = 1127,
  156. TT_DESKTOP_ENOSPC = 1128,
  157. TT_DESKTOP_EROFS = 1130,
  158. TT_DESKTOP_EMLINK = 1131,
  159. TT_DESKTOP_EPIPE = 1132,
  160. TT_DESKTOP_ENOMSG = 1135,
  161. TT_DESKTOP_EDEADLK = 1145,
  162. TT_DESKTOP_ECANCELED = 1147,
  163. TT_DESKTOP_ENOTSUP = 1148,
  164. TT_DESKTOP_ENODATA = 1161,
  165. TT_DESKTOP_EPROTO = 1171,
  166. TT_DESKTOP_ENOTEMPTY = 1193,
  167. TT_DESKTOP_ETIMEDOUT = 1245,
  168. TT_DESKTOP_EALREADY = 1249,
  169. TT_DESKTOP_UNMODIFIED = 1299,
  170. TT_MEDIA_ERR_SIZE = 1300,
  171. TT_MEDIA_ERR_FORMAT = 1301,
  172. TT_AUTHFILE_ACCESS = 1400,
  173. TT_AUTHFILE_LOCK = 1401,
  174. TT_AUTHFILE_LOCK_TIMEOUT = 1402,
  175. TT_AUTHFILE_UNLOCK = 1403,
  176. TT_AUTHFILE_MISSING = 1404,
  177. TT_AUTHFILE_ENTRY_MISSING = 1405,
  178. TT_AUTHFILE_WRITE = 1406,
  179. TT_ERR_APPFIRST = 1536,
  180. TT_ERR_LAST = 2047,
  181. TT_STATUS_LAST = 2048} Tt_status;
  182. typedef enum tt_filter_action {
  183. TT_FILTER_CONTINUE = 0,
  184. TT_FILTER_STOP = 1,
  185. TT_FILTER_LAST = 2} Tt_filter_action;
  186. typedef enum tt_callback_action {
  187. TT_CALLBACK_CONTINUE = 0,
  188. TT_CALLBACK_PROCESSED = 1,
  189. TT_CALLBACK_LAST = 2} Tt_callback_action;
  190. typedef enum tt_mode {
  191. TT_MODE_UNDEFINED = 0,
  192. TT_IN = 1,
  193. TT_OUT = 2,
  194. TT_INOUT = 3,
  195. TT_MODE_LAST = 4} Tt_mode;
  196. typedef enum tt_scope {
  197. TT_SCOPE_NONE = 0,
  198. TT_SESSION = 1,
  199. TT_FILE = 2,
  200. TT_BOTH = 3,
  201. TT_FILE_IN_SESSION = 4} Tt_scope;
  202. typedef enum tt_class {
  203. TT_CLASS_UNDEFINED = 0,
  204. TT_NOTICE = 1,
  205. TT_REQUEST = 2,
  206. TT_OFFER = 3,
  207. TT_CLASS_LAST = 4} Tt_class;
  208. typedef enum tt_category {
  209. TT_CATEGORY_UNDEFINED = 0,
  210. TT_OBSERVE = 1,
  211. TT_HANDLE = 2,
  212. TT_HANDLE_PUSH = 3,
  213. TT_HANDLE_ROTATE = 4,
  214. TT_CATEGORY_LAST = 5} Tt_category;
  215. typedef enum tt_address {
  216. TT_PROCEDURE = 0,
  217. TT_OBJECT = 1,
  218. TT_HANDLER = 2,
  219. TT_OTYPE = 3,
  220. TT_ADDRESS_LAST = 4} Tt_address;
  221. typedef enum tt_disposition {
  222. /* Flag bits, not enumerated values */
  223. TT_DISCARD = 0, /* for resetting value */
  224. TT_QUEUE = 1,
  225. TT_START = 2} Tt_disposition;
  226. typedef enum tt_state {
  227. TT_CREATED = 0,
  228. TT_SENT = 1,
  229. TT_HANDLED = 2,
  230. TT_FAILED = 3,
  231. TT_QUEUED = 4,
  232. TT_STARTED = 5,
  233. TT_REJECTED = 6,
  234. TT_RETURNED = 7,
  235. TT_ACCEPTED = 8,
  236. TT_ABSTAINED = 9,
  237. TT_STATE_LAST = 10} Tt_state;
  238. typedef enum tt_feature {
  239. _TT_FEATURE_MULTITHREADED = 1,
  240. _TT_FEATURE_LAST = 2} Tt_feature;
  241. #define TT_FEATURE_MULTITHREADED _TT_FEATURE_MULTITHREADED
  242. #define TT_FEATURE_LAST _TT_FEATURE_LAST
  243. #ifndef _XENUMS_
  244. /*
  245. * Official properties of ToolTalk objects.
  246. *
  247. * ToolTalk should prevent non-root processes from setting the values
  248. * of properties whose name begins with '_'.
  249. *
  250. * Integrators should prevent users from assigning arbitrary strings
  251. * as values of properties whose name begins with '.'. That is, "dot"
  252. * properties are like "dot" files: their existence should normally be
  253. * hidden from users, and the displaying and setting of their contents
  254. * should be mediated programatically, sort of like the OpenWindows
  255. * "props" application mediates .Xdefaults.
  256. */
  257. #define TT_OBJECT_NAME_PROPERTY ".Name"
  258. #define TT_OBJECT_OWNER_PROPERTY "_Owner"
  259. #define TT_OBJECT_GROUP_PROPERTY "_Group"
  260. #define TT_OBJECT_MODE_PROPERTY "_Mode"
  261. #define TT_OBJECT_CREATION_DATE_PROPERTY "_Creation_Date"
  262. /*
  263. * The following define opaque handles which can be type checked (as compared
  264. * to void *). Don't bother looking for the definitions of the structs, there
  265. * aren't any.
  266. */
  267. typedef struct _Tt_message_handle *Tt_message;
  268. typedef struct _Tt_pattern_handle *Tt_pattern;
  269. typedef struct _tt_AuthFileEntry *Tt_AuthFileEntry;
  270. #if defined(__cplusplus) || defined(__STDC__)
  271. typedef Tt_filter_action (*Tt_filter_function)(_TT_CONST char *nodeid,
  272. void *context,
  273. void *accumulator);
  274. typedef Tt_callback_action (*Tt_message_callback) (Tt_message m,
  275. Tt_pattern p);
  276. #else
  277. typedef Tt_filter_action (*Tt_filter_function)();
  278. typedef Tt_callback_action (*Tt_message_callback)();
  279. #endif
  280. #endif /* _XENUMS_ */
  281. #endif /* _XSCHEME_ _NAMES_ _EXTERN_ */
  282. #ifndef _XENUMS_
  283. _TT_EXTERN_FUNC(char *,tt_open,(void))
  284. _TT_EXTERN_FUNC(Tt_status,tt_close,(void))
  285. _TT_EXTERN_FUNC(char *,tt_X_session,(_TT_CONST char *xdisplay))
  286. _TT_EXTERN_FUNC(char *,tt_default_ptype,(void))
  287. _TT_EXTERN_FUNC(Tt_status,tt_default_ptype_set,(_TT_CONST char * ptid))
  288. _TT_EXTERN_FUNC(char *,tt_default_file,(void))
  289. _TT_EXTERN_FUNC(Tt_status,tt_default_file_set,(_TT_CONST char * docid))
  290. _TT_EXTERN_FUNC(char *,tt_default_session,(void))
  291. _TT_EXTERN_FUNC(Tt_status,tt_default_session_set,(_TT_CONST char *sessid))
  292. _TT_EXTERN_FUNC(char *,tt_thread_session,(void))
  293. _TT_EXTERN_FUNC(Tt_status,tt_thread_session_set,(_TT_CONST char *sessid))
  294. _TT_EXTERN_FUNC(char *,tt_default_procid,(void))
  295. _TT_EXTERN_FUNC(Tt_status,tt_default_procid_set,(_TT_CONST char *procid))
  296. _TT_EXTERN_FUNC(char *,tt_thread_procid,(void))
  297. _TT_EXTERN_FUNC(Tt_status,tt_thread_procid_set,(_TT_CONST char *procid))
  298. _TT_EXTERN_FUNC(char *,tt_procid_session,(_TT_CONST char *procid))
  299. _TT_EXTERN_FUNC(Tt_status,tt_file_join,(_TT_CONST char * filepath))
  300. _TT_EXTERN_FUNC(Tt_status,tt_file_quit,(_TT_CONST char * filepath))
  301. _TT_EXTERN_FUNC(Tt_status,tt_file_objects_query,
  302. (_TT_CONST char * filepath,
  303. Tt_filter_function filter,
  304. void *context,void *accumulator))
  305. _TT_EXTERN_FUNC(Tt_status,tt_file_move,
  306. (_TT_CONST char *oldfilepath, _TT_CONST char *newfilepath))
  307. _TT_EXTERN_FUNC(Tt_status,tt_file_copy,
  308. (_TT_CONST char *oldfilepath, _TT_CONST char *newfilepath))
  309. _TT_EXTERN_FUNC(Tt_status,tt_file_destroy,(_TT_CONST char * filepath))
  310. _TT_EXTERN_FUNC(char *,tt_message_context_val,
  311. (Tt_message m, _TT_CONST char *slotname))
  312. _TT_EXTERN_FUNC(Tt_status,tt_message_context_ival,
  313. (Tt_message m, _TT_CONST char *slotname, int *value))
  314. _TT_EXTERN_FUNC(Tt_status,tt_message_context_bval,
  315. (Tt_message m, _TT_CONST char *slotname,
  316. unsigned char **value, int *len))
  317. _TT_EXTERN_FUNC(Tt_status,tt_message_context_xval,
  318. (Tt_message m, _TT_CONST char *slotname,
  319. xdrproc_t xdr_proc, void *value))
  320. _TT_EXTERN_FUNC(Tt_status,tt_message_context_set,
  321. (Tt_message m, _TT_CONST char *slotname,
  322. _TT_CONST char *value))
  323. _TT_EXTERN_FUNC(Tt_status,tt_message_icontext_set,
  324. (Tt_message m, _TT_CONST char *slotname, int value))
  325. _TT_EXTERN_FUNC(Tt_status,tt_message_bcontext_set,
  326. (Tt_message m, _TT_CONST char *slotname,
  327. _TT_CONST unsigned char *value, int len))
  328. _TT_EXTERN_FUNC(Tt_status,tt_message_xcontext_set,
  329. (Tt_message m, _TT_CONST char *slotname,
  330. xdrproc_t xdr_proc, void *value))
  331. _TT_EXTERN_FUNC(Tt_status,tt_context_join,
  332. (_TT_CONST char *slotname, _TT_CONST char *value))
  333. _TT_EXTERN_FUNC(Tt_status,tt_icontext_join,
  334. (_TT_CONST char *slotname, int value))
  335. _TT_EXTERN_FUNC(Tt_status,tt_bcontext_join,
  336. (_TT_CONST char *slotname,
  337. _TT_CONST unsigned char *value, int len))
  338. _TT_EXTERN_FUNC(Tt_status,tt_xcontext_join,
  339. (_TT_CONST char *slotname,
  340. xdrproc_t xdr_proc, void *value))
  341. _TT_EXTERN_FUNC(Tt_status,tt_context_quit,
  342. (_TT_CONST char *slotname, _TT_CONST char *value))
  343. _TT_EXTERN_FUNC(Tt_status,tt_icontext_quit,
  344. (_TT_CONST char *slotname, int value))
  345. _TT_EXTERN_FUNC(Tt_status,tt_bcontext_quit,
  346. (_TT_CONST char *slotname,
  347. _TT_CONST unsigned char *value, int len))
  348. _TT_EXTERN_FUNC(Tt_status,tt_xcontext_quit,
  349. (_TT_CONST char *slotname,
  350. xdrproc_t xdr_proc, void *value))
  351. _TT_EXTERN_FUNC(int,tt_message_contexts_count,(Tt_message m))
  352. _TT_EXTERN_FUNC(char *,tt_message_context_slotname,
  353. (Tt_message m, int i))
  354. _TT_EXTERN_FUNC(Tt_message,tt_message_create,(void))
  355. _TT_EXTERN_FUNC(Tt_message,tt_message_create_super,(Tt_message m))
  356. _TT_EXTERN_FUNC(Tt_status,tt_message_destroy,(Tt_message m))
  357. _TT_EXTERN_FUNC(Tt_status,tt_message_send,(Tt_message m))
  358. _TT_EXTERN_FUNC(Tt_status,tt_message_send_on_exit,(Tt_message m))
  359. _TT_EXTERN_FUNC(Tt_message,tt_message_receive,(void))
  360. _TT_EXTERN_FUNC(Tt_status,tt_message_reply,(Tt_message m))
  361. _TT_EXTERN_FUNC(Tt_status,tt_message_reject,(Tt_message m))
  362. _TT_EXTERN_FUNC(Tt_status,tt_message_accept,(Tt_message m))
  363. _TT_EXTERN_FUNC(Tt_status,tt_message_fail,(Tt_message m))
  364. _TT_EXTERN_FUNC(Tt_pattern,tt_message_pattern,(Tt_message m))
  365. _TT_EXTERN_FUNC(Tt_status,tt_message_callback_add,
  366. (Tt_message m,Tt_message_callback f))
  367. _TT_EXTERN_FUNC(void *,tt_message_user,(Tt_message m,int key))
  368. _TT_EXTERN_FUNC(Tt_status,tt_message_user_set,(Tt_message m,int key,void *v))
  369. _TT_EXTERN_FUNC(Tt_status,tt_message_arg_add,
  370. (Tt_message m,Tt_mode n,_TT_CONST char *vtype,
  371. _TT_CONST char *value))
  372. _TT_EXTERN_FUNC(Tt_mode,tt_message_arg_mode,(Tt_message m,int n))
  373. _TT_EXTERN_FUNC(char *,tt_message_arg_type,(Tt_message m,int n))
  374. _TT_EXTERN_FUNC(char *,tt_message_arg_val,(Tt_message m,int n))
  375. _TT_EXTERN_FUNC(Tt_status,tt_message_arg_val_set,
  376. (Tt_message m,int n,_TT_CONST char *value))
  377. _TT_EXTERN_FUNC(Tt_status,tt_message_arg_bval,
  378. (Tt_message m,int n,unsigned char **value,int *len))
  379. _TT_EXTERN_FUNC(Tt_status,tt_message_arg_bval_set,
  380. (Tt_message m,int n,_TT_CONST unsigned char *value,int len))
  381. _TT_EXTERN_FUNC(Tt_status,tt_message_barg_add,
  382. (Tt_message m,Tt_mode n,_TT_CONST char *vtype,
  383. _TT_CONST unsigned char *value,int len))
  384. _TT_EXTERN_FUNC(Tt_status,tt_message_arg_ival,
  385. (Tt_message m,int n,int *value))
  386. _TT_EXTERN_FUNC(Tt_status,tt_message_arg_ival_set,
  387. (Tt_message m,int n,int value))
  388. _TT_EXTERN_FUNC(Tt_status,tt_message_iarg_add,
  389. (Tt_message m,Tt_mode n,_TT_CONST char *vtype,int value))
  390. _TT_EXTERN_FUNC(Tt_status,tt_message_arg_xval,
  391. (Tt_message m,int n,xdrproc_t xdr_proc, void *value))
  392. _TT_EXTERN_FUNC(Tt_status,tt_message_arg_xval_set,
  393. (Tt_message m,int n,xdrproc_t xdr_proc, void *value))
  394. _TT_EXTERN_FUNC(Tt_status,tt_message_xarg_add,
  395. (Tt_message m,Tt_mode n,_TT_CONST char *vtype,
  396. xdrproc_t xdr_proc, void *value))
  397. _TT_EXTERN_FUNC(int,tt_message_args_count,(Tt_message m))
  398. _TT_EXTERN_FUNC(Tt_class,tt_message_class,(Tt_message m))
  399. _TT_EXTERN_FUNC(Tt_status,tt_message_class_set,
  400. (Tt_message m,Tt_class c))
  401. _TT_EXTERN_FUNC(char *,tt_message_file,(Tt_message m))
  402. _TT_EXTERN_FUNC(Tt_status,tt_message_file_set,
  403. (Tt_message m,_TT_CONST char *file))
  404. _TT_EXTERN_FUNC(char *,tt_message_object,(Tt_message m))
  405. _TT_EXTERN_FUNC(Tt_status,tt_message_object_set,
  406. (Tt_message m,_TT_CONST char *objid))
  407. _TT_EXTERN_FUNC(char *,tt_message_id,(Tt_message m))
  408. _TT_EXTERN_FUNC(char *,tt_message_op,(Tt_message m))
  409. _TT_EXTERN_FUNC(Tt_status,tt_message_op_set,
  410. (Tt_message m,_TT_CONST char *opname))
  411. _TT_EXTERN_FUNC(int,tt_message_opnum,(Tt_message m))
  412. _TT_EXTERN_FUNC(char *,tt_message_otype,(Tt_message m))
  413. _TT_EXTERN_FUNC(Tt_status,tt_message_otype_set,
  414. (Tt_message m,_TT_CONST char *otype))
  415. _TT_EXTERN_FUNC(Tt_address,tt_message_address,(Tt_message m))
  416. _TT_EXTERN_FUNC(Tt_status,tt_message_address_set,
  417. (Tt_message m,Tt_address p))
  418. _TT_EXTERN_FUNC(char *,tt_message_handler,(Tt_message m))
  419. _TT_EXTERN_FUNC(Tt_status,tt_message_handler_set,
  420. (Tt_message m,_TT_CONST char *procid))
  421. _TT_EXTERN_FUNC(char *,tt_message_handler_ptype,(Tt_message m))
  422. _TT_EXTERN_FUNC(Tt_status,tt_message_handler_ptype_set,
  423. (Tt_message m,_TT_CONST char *ptid))
  424. _TT_EXTERN_FUNC(int,tt_message_accepters_count,(Tt_message m))
  425. _TT_EXTERN_FUNC(char *,tt_message_accepter,(Tt_message m,int n))
  426. _TT_EXTERN_FUNC(int,tt_message_rejecters_count,(Tt_message m))
  427. _TT_EXTERN_FUNC(char *,tt_message_rejecter,(Tt_message m,int n))
  428. _TT_EXTERN_FUNC(int,tt_message_abstainers_count,(Tt_message m))
  429. _TT_EXTERN_FUNC(char *,tt_message_abstainer,(Tt_message m,int n))
  430. _TT_EXTERN_FUNC(Tt_disposition,tt_message_disposition,(Tt_message m))
  431. _TT_EXTERN_FUNC(Tt_status,tt_message_disposition_set,
  432. (Tt_message m,Tt_disposition r))
  433. _TT_EXTERN_FUNC(Tt_scope,tt_message_scope,(Tt_message m))
  434. _TT_EXTERN_FUNC(Tt_status,tt_message_scope_set,(Tt_message m,Tt_scope s))
  435. _TT_EXTERN_FUNC(char *,tt_message_sender,(Tt_message m))
  436. _TT_EXTERN_FUNC(char *,tt_message_sender_ptype,(Tt_message m))
  437. _TT_EXTERN_FUNC(Tt_status,tt_message_sender_ptype_set,
  438. (Tt_message m,_TT_CONST char *ptid))
  439. _TT_EXTERN_FUNC(char *,tt_message_session,(Tt_message m))
  440. _TT_EXTERN_FUNC(Tt_status,tt_message_session_set,
  441. (Tt_message m,_TT_CONST char *sessid))
  442. _TT_EXTERN_FUNC(Tt_state,tt_message_state,(Tt_message m))
  443. _TT_EXTERN_FUNC(int,tt_message_status,(Tt_message m))
  444. _TT_EXTERN_FUNC(Tt_status,tt_message_status_set,(Tt_message m,int status))
  445. _TT_EXTERN_FUNC(char *,tt_message_status_string,(Tt_message m))
  446. _TT_EXTERN_FUNC(Tt_status,tt_message_status_string_set,
  447. (Tt_message m,_TT_CONST char *status_str))
  448. _TT_EXTERN_FUNC(uid_t,tt_message_uid,(Tt_message m))
  449. _TT_EXTERN_FUNC(gid_t,tt_message_gid,(Tt_message m))
  450. /*
  451. * The following are "macros" which provide a simpler high level
  452. * interface to the above low level calls.
  453. */
  454. _TT_EXTERN_FUNC(Tt_message,tt_pnotice_create,
  455. (Tt_scope scope, _TT_CONST char *op))
  456. _TT_EXTERN_FUNC(Tt_message,tt_prequest_create,
  457. (Tt_scope scope, _TT_CONST char *op))
  458. _TT_EXTERN_FUNC(Tt_message,tt_onotice_create,
  459. (_TT_CONST char *objid, _TT_CONST char *op))
  460. _TT_EXTERN_FUNC(Tt_message,tt_orequest_create,
  461. (_TT_CONST char *objid, _TT_CONST char *op))
  462. _TT_EXTERN_FUNC(char *,tt_spec_create,(_TT_CONST char * filepath))
  463. _TT_EXTERN_FUNC(Tt_status,tt_spec_write,(_TT_CONST char * nodeid))
  464. _TT_EXTERN_FUNC(Tt_status,tt_spec_destroy,(_TT_CONST char * nodeid))
  465. _TT_EXTERN_FUNC(char *,tt_spec_file,(_TT_CONST char * nodeid))
  466. _TT_EXTERN_FUNC(char *,tt_spec_type,(_TT_CONST char * nodeid))
  467. _TT_EXTERN_FUNC(Tt_status,tt_spec_type_set,
  468. (_TT_CONST char * nodeid,_TT_CONST char * otid))
  469. _TT_EXTERN_FUNC(char *,tt_spec_move,
  470. (_TT_CONST char * nodeid,_TT_CONST char * newfilepath))
  471. _TT_EXTERN_FUNC(char *,tt_spec_propname,(_TT_CONST char *nodeid,int n))
  472. _TT_EXTERN_FUNC(int,tt_spec_propnames_count,(_TT_CONST char *nodeid))
  473. _TT_EXTERN_FUNC(char *,tt_spec_prop,
  474. (_TT_CONST char *nodeid,_TT_CONST char *propname,int i))
  475. _TT_EXTERN_FUNC(Tt_status,tt_spec_prop_add,
  476. (_TT_CONST char *nodeid,_TT_CONST char *propname,
  477. _TT_CONST char *value))
  478. _TT_EXTERN_FUNC(int,tt_spec_prop_count,
  479. (_TT_CONST char *nodeid,_TT_CONST char *propname))
  480. _TT_EXTERN_FUNC(Tt_status,tt_spec_prop_set,
  481. (_TT_CONST char *nodeid,_TT_CONST char *propname,
  482. _TT_CONST char *value))
  483. _TT_EXTERN_FUNC(Tt_status,tt_spec_bprop,
  484. (_TT_CONST char *nodeid,_TT_CONST char *propname,int i,
  485. unsigned char **value,int *length))
  486. _TT_EXTERN_FUNC(Tt_status,tt_spec_bprop_add,
  487. (_TT_CONST char *nodeid,_TT_CONST char *propname,
  488. _TT_CONST unsigned char *value,int length))
  489. _TT_EXTERN_FUNC(Tt_status,tt_spec_bprop_set,
  490. (_TT_CONST char *nodeid,_TT_CONST char *propname,
  491. _TT_CONST unsigned char *value,int length))
  492. _TT_EXTERN_FUNC(int,tt_objid_equal,
  493. (_TT_CONST char * nodeid1,_TT_CONST char * nodeid2))
  494. _TT_EXTERN_FUNC(char *,tt_objid_objkey,(_TT_CONST char * nodeid))
  495. _TT_EXTERN_FUNC(int,tt_otype_deriveds_count,(_TT_CONST char *otype))
  496. _TT_EXTERN_FUNC(char *,tt_otype_derived,(_TT_CONST char *otype, int i))
  497. _TT_EXTERN_FUNC(char *,tt_otype_base,(_TT_CONST char *otype))
  498. _TT_EXTERN_FUNC(int,tt_otype_is_derived,
  499. (_TT_CONST char *derivedotype, _TT_CONST char *baseotype))
  500. _TT_EXTERN_FUNC(int,tt_otype_osig_count,(_TT_CONST char * otype))
  501. _TT_EXTERN_FUNC(int,tt_otype_hsig_count,(_TT_CONST char * otype))
  502. _TT_EXTERN_FUNC(char *,tt_otype_osig_op,(_TT_CONST char * otype, int sig))
  503. _TT_EXTERN_FUNC(char *,tt_otype_hsig_op,(_TT_CONST char * otype, int sig))
  504. _TT_EXTERN_FUNC(int,tt_otype_osig_args_count,(_TT_CONST char * otype, int sig))
  505. _TT_EXTERN_FUNC(int,tt_otype_hsig_args_count,(_TT_CONST char * otype, int sig))
  506. _TT_EXTERN_FUNC(Tt_mode,tt_otype_osig_arg_mode,(_TT_CONST char * otype,
  507. int sig, int arg))
  508. _TT_EXTERN_FUNC(Tt_mode,tt_otype_hsig_arg_mode,(_TT_CONST char * otype,
  509. int sig, int arg))
  510. _TT_EXTERN_FUNC(char *,tt_otype_osig_arg_type,(_TT_CONST char * otype,
  511. int sig, int arg))
  512. _TT_EXTERN_FUNC(char *,tt_otype_hsig_arg_type,(_TT_CONST char * otype,
  513. int sig, int arg))
  514. _TT_EXTERN_FUNC(Tt_pattern,tt_pattern_create,(void))
  515. _TT_EXTERN_FUNC(Tt_status,tt_pattern_destroy,(Tt_pattern p))
  516. _TT_EXTERN_FUNC(Tt_status,tt_pattern_register,(Tt_pattern p))
  517. _TT_EXTERN_FUNC(Tt_status,tt_pattern_unregister,(Tt_pattern p))
  518. _TT_EXTERN_FUNC(Tt_status,tt_pattern_callback_add,
  519. (Tt_pattern m,Tt_message_callback f))
  520. _TT_EXTERN_FUNC(void *,tt_pattern_user,(Tt_pattern p,int key))
  521. _TT_EXTERN_FUNC(Tt_status,tt_pattern_user_set,(Tt_pattern p,int key,void *v))
  522. _TT_EXTERN_FUNC(Tt_category,tt_pattern_category,(Tt_pattern p))
  523. _TT_EXTERN_FUNC(Tt_status,tt_pattern_category_set,
  524. (Tt_pattern p,Tt_category c))
  525. _TT_EXTERN_FUNC(Tt_status,tt_pattern_arg_add,
  526. (Tt_pattern p,Tt_mode n,_TT_CONST char *vtype,
  527. _TT_CONST char *value))
  528. _TT_EXTERN_FUNC(Tt_status,tt_pattern_barg_add,
  529. (Tt_pattern m,Tt_mode n,_TT_CONST char *vtype,
  530. _TT_CONST unsigned char *value,int len))
  531. _TT_EXTERN_FUNC(Tt_status,tt_pattern_iarg_add,
  532. (Tt_pattern m,Tt_mode n,_TT_CONST char *vtype, int value))
  533. _TT_EXTERN_FUNC(Tt_status,tt_pattern_xarg_add,
  534. (Tt_pattern m,Tt_mode n,_TT_CONST char *vtype,
  535. xdrproc_t xdr_proc, void *value))
  536. _TT_EXTERN_FUNC(Tt_status,tt_pattern_class_add,
  537. (Tt_pattern p,Tt_class c))
  538. _TT_EXTERN_FUNC(Tt_status,tt_pattern_file_add,
  539. (Tt_pattern p,_TT_CONST char *file))
  540. _TT_EXTERN_FUNC(Tt_status,tt_pattern_object_add,
  541. (Tt_pattern p,_TT_CONST char *objid))
  542. _TT_EXTERN_FUNC(Tt_status,tt_pattern_op_add,
  543. (Tt_pattern p,_TT_CONST char *opname))
  544. _TT_EXTERN_FUNC(Tt_status,tt_pattern_opnum_add,(Tt_pattern p,int opnum))
  545. _TT_EXTERN_FUNC(Tt_status,tt_pattern_otype_add,
  546. (Tt_pattern p,_TT_CONST char *otype))
  547. _TT_EXTERN_FUNC(Tt_status,tt_pattern_address_add,
  548. (Tt_pattern p,Tt_address d))
  549. _TT_EXTERN_FUNC(Tt_status,tt_pattern_disposition_add,
  550. (Tt_pattern p,Tt_disposition r))
  551. _TT_EXTERN_FUNC(Tt_status,tt_pattern_scope_add,(Tt_pattern p,Tt_scope s))
  552. _TT_EXTERN_FUNC(Tt_status,tt_pattern_sender_add,
  553. (Tt_pattern p,_TT_CONST char *procid))
  554. _TT_EXTERN_FUNC(Tt_status,tt_pattern_sender_ptype_add,
  555. (Tt_pattern p,_TT_CONST char *ptid))
  556. _TT_EXTERN_FUNC(Tt_status,tt_pattern_session_add,
  557. (Tt_pattern p,_TT_CONST char *sessid))
  558. _TT_EXTERN_FUNC(Tt_status,tt_pattern_state_add,(Tt_pattern p,Tt_state s))
  559. _TT_EXTERN_FUNC(Tt_status,tt_pattern_context_add,
  560. (Tt_pattern p, _TT_CONST char *slotname,
  561. _TT_CONST char *value))
  562. _TT_EXTERN_FUNC(Tt_status,tt_pattern_icontext_add,
  563. (Tt_pattern p, _TT_CONST char *slotname,
  564. int value))
  565. _TT_EXTERN_FUNC(Tt_status,tt_pattern_bcontext_add,
  566. (Tt_pattern p, _TT_CONST char *slotname,
  567. _TT_CONST unsigned char *value, int length))
  568. _TT_EXTERN_FUNC(Tt_status,tt_pattern_xcontext_add,
  569. (Tt_pattern p, _TT_CONST char *slotname,
  570. xdrproc_t xdr_proc, void *value))
  571. _TT_EXTERN_FUNC(Tt_status,tt_ptype_declare,(_TT_CONST char * ptid))
  572. _TT_EXTERN_FUNC(Tt_status,tt_ptype_undeclare,(_TT_CONST char * ptid))
  573. _TT_EXTERN_FUNC(Tt_status,tt_ptype_exists,(_TT_CONST char * ptid))
  574. _TT_EXTERN_FUNC(Tt_status,tt_ptype_opnum_callback_add,
  575. (_TT_CONST char * ptid, int opnum, Tt_message_callback f))
  576. _TT_EXTERN_FUNC(Tt_status,tt_otype_opnum_callback_add,
  577. (_TT_CONST char * otid, int opnum, Tt_message_callback f))
  578. _TT_EXTERN_FUNC(Tt_status,tt_session_join,(_TT_CONST char * sessid))
  579. _TT_EXTERN_FUNC(Tt_status,tt_session_quit,(_TT_CONST char * sessid))
  580. _TT_EXTERN_FUNC(char *,tt_initial_session,(void))
  581. _TT_EXTERN_FUNC(char *,tt_session_propname,(_TT_CONST char *sessid,int n))
  582. _TT_EXTERN_FUNC(int,tt_session_propnames_count,(_TT_CONST char *sessid))
  583. _TT_EXTERN_FUNC(char *,tt_session_prop,
  584. (_TT_CONST char *sessid,_TT_CONST char *propname,int i))
  585. _TT_EXTERN_FUNC(Tt_status,tt_session_prop_add,
  586. (_TT_CONST char *sessid,_TT_CONST char *propname,
  587. _TT_CONST char *value))
  588. _TT_EXTERN_FUNC(int,tt_session_prop_count,
  589. (_TT_CONST char *sessid,_TT_CONST char *propname))
  590. _TT_EXTERN_FUNC(Tt_status,tt_session_prop_set,
  591. (_TT_CONST char *sessid, _TT_CONST char *propname,
  592. _TT_CONST char *value))
  593. _TT_EXTERN_FUNC(Tt_status,tt_session_bprop,
  594. (_TT_CONST char *sessid,_TT_CONST char *propname,int i,
  595. unsigned char **value,int *length))
  596. _TT_EXTERN_FUNC(Tt_status,tt_session_bprop_add,
  597. (_TT_CONST char *sessid,_TT_CONST char *propname,
  598. _TT_CONST unsigned char *value,int length))
  599. _TT_EXTERN_FUNC(Tt_status,tt_session_bprop_set,
  600. (_TT_CONST char *sessid,_TT_CONST char *propname,
  601. _TT_CONST unsigned char *value,int length))
  602. _TT_EXTERN_FUNC(Tt_status,tt_session_types_load,
  603. (_TT_CONST char *sessid, _TT_CONST char *filename))
  604. _TT_EXTERN_FUNC(int,tt_fd,(void))
  605. _TT_EXTERN_FUNC(int,tt_mark,(void))
  606. _TT_EXTERN_FUNC(void,tt_release,(int mark))
  607. _TT_EXTERN_FUNC(caddr_t,tt_malloc,(size_t s))
  608. _TT_EXTERN_FUNC(void,tt_free,(caddr_t p))
  609. _TT_EXTERN_FUNC(char *,tt_status_message,(Tt_status ttrc))
  610. _TT_EXTERN_FUNC(Tt_status,tt_pointer_error,(void *pointer))
  611. _TT_EXTERN_FUNC(Tt_status,tt_int_error,(int return_val))
  612. _TT_EXTERN_FUNC(void,tt_error,(const char *func,Tt_status ttrc))
  613. _TT_EXTERN_FUNC(void *,tt_error_pointer,(Tt_status ttrc))
  614. _TT_EXTERN_FUNC(int,tt_error_int,(Tt_status ttrc))
  615. _TT_EXTERN_FUNC(int,tt_trace_control,(int onoff))
  616. _TT_EXTERN_FUNC(char *,tt_message_print,(Tt_message m))
  617. _TT_EXTERN_FUNC(char *,tt_pattern_print,(Tt_pattern p))
  618. _TT_EXTERN_FUNC(char *,tt_file_netfile, (const char *filename))
  619. _TT_EXTERN_FUNC(char *,tt_netfile_file, (const char *netfilename))
  620. _TT_EXTERN_FUNC(char *,tt_host_file_netfile, (const char * host, const char * filename))
  621. _TT_EXTERN_FUNC(char *,tt_host_netfile_file, (const char * host, const char * netfilename))
  622. _TT_EXTERN_FUNC(Tt_status,tt_feature_enabled, (Tt_feature f))
  623. _TT_EXTERN_FUNC(Tt_status,tt_feature_required, (Tt_feature f))
  624. _TT_EXTERN_FUNC(char*, tt_AuthFileName, (void))
  625. _TT_EXTERN_FUNC(int, tt_LockAuthFile, (char*, int, int, long))
  626. _TT_EXTERN_FUNC(void, tt_UnlockAuthFile, (char*))
  627. _TT_EXTERN_FUNC(Tt_AuthFileEntry, tt_ReadAuthFileEntry, (FILE*))
  628. _TT_EXTERN_FUNC(void, tt_FreeAuthFileEntry, (Tt_AuthFileEntry))
  629. _TT_EXTERN_FUNC(int, tt_WriteAuthFileEntry, (FILE*, Tt_AuthFileEntry))
  630. _TT_EXTERN_FUNC(Tt_AuthFileEntry, tt_GetAuthFileEntry, (char*, char*, char*))
  631. _TT_EXTERN_FUNC(char*, tt_GenerateMagicCookie, (int))
  632. #endif /* _XENUMS_ */
  633. #define tt_ptr_error(p) tt_pointer_error((void *)(p))
  634. #define tt_is_err(p) (TT_WRN_LAST < (p))
  635. #undef _TT_EXTERN_FUNC
  636. #undef _TT_CONST
  637. #endif