Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / lib / tt / lib / mp / mp_global.h
1 /*%%  (c) Copyright 1993, 1994 Hewlett-Packard Company                   */
2 /*%%  (c) Copyright 1993, 1994 International Business Machines Corp.     */
3 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                    */
4 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                              */
5 /*%%  $XConsortium: mp_global.h /main/3 1995/10/23 10:24:02 rswiston $                                                   */
6 /*
7  * mp.h -- public interface classes to the Message Passer
8  *
9  * Copyright (c) 1990 by Sun Microsystems, Inc.
10  */
11 #ifndef _MP_GLOBAL_H
12 #define _MP_GLOBAL_H
13
14
15 #include <stdio.h>
16 #include <string.h>
17 #include "util/tt_object.h"
18 #include "util/tt_list.h"
19 #include "util/tt_string.h"
20 #include "mp/mp_xdr_functions.h"
21 #include "api/c/tt_c.h"
22
23 #define _TT_TYPES_CE_VERSION 1
24 #define _TT_XATOM_VERSION 1
25
26 class _Tt_mp;
27 extern _Tt_mp *_tt_mp;
28
29 enum _Tt_mp_status {
30         _MP_OK = TT_OK,
31         _MP_ERR = TT_ERR_INTERNAL,
32         _MP_NO_NODE = TT_ERR_OBJID,
33         _MP_NO_VALUE = TT_ERR_NO_VALUE,
34         _MP_STALE_NODEID = TT_WRN_STALE_OBJID,
35         _MP_NODE_LOCKED = TT_STATUS_LAST + 1,
36         _MP_ERR_TYPE = TT_ERR_OTYPE,
37         _MP_ERR_DB = TT_ERR_DBAVAIL,
38         _MP_ERR_DBOPEN = TT_ERR_DBAVAIL,
39         _MP_ERR_ACCESS = TT_ERR_ACCESS
40 };
41
42
43 void            dbg(char *fmt, char *f, int l, char *arg1 = (char *)0);
44 #define         DBG(msg) (dbg(msg, __FILE__, __LINE__))
45 #define         DBG1(fmt, arg1) (dbg(fmt, __FILE__, __LINE__, arg1))
46 #define         TRACE(msg) ((_tt_mp->trace) || ((msg) && (msg)->trace))
47 #endif                          /* _MP_GLOBAL_H */