Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / lib / tt / lib / mp / mp_global.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: mp_global.h /main/3 1995/10/23 10:24:02 rswiston $                                                   */
28 /*
29  * mp.h -- public interface classes to the Message Passer
30  *
31  * Copyright (c) 1990 by Sun Microsystems, Inc.
32  */
33 #ifndef _MP_GLOBAL_H
34 #define _MP_GLOBAL_H
35
36
37 #include <stdio.h>
38 #include <string.h>
39 #include "util/tt_object.h"
40 #include "util/tt_list.h"
41 #include "util/tt_string.h"
42 #include "mp/mp_xdr_functions.h"
43 #include "api/c/tt_c.h"
44
45 #define _TT_TYPES_CE_VERSION 1
46 #define _TT_XATOM_VERSION 1
47
48 class _Tt_mp;
49 extern _Tt_mp *_tt_mp;
50
51 enum _Tt_mp_status {
52         _MP_OK = TT_OK,
53         _MP_ERR = TT_ERR_INTERNAL,
54         _MP_NO_NODE = TT_ERR_OBJID,
55         _MP_NO_VALUE = TT_ERR_NO_VALUE,
56         _MP_STALE_NODEID = TT_WRN_STALE_OBJID,
57         _MP_NODE_LOCKED = TT_STATUS_LAST + 1,
58         _MP_ERR_TYPE = TT_ERR_OTYPE,
59         _MP_ERR_DB = TT_ERR_DBAVAIL,
60         _MP_ERR_DBOPEN = TT_ERR_DBAVAIL,
61         _MP_ERR_ACCESS = TT_ERR_ACCESS
62 };
63
64
65 void            dbg(char *fmt, char *f, int l, char *arg1 = (char *)0);
66 #define         DBG(msg) (dbg(msg, __FILE__, __LINE__))
67 #define         DBG1(fmt, arg1) (dbg(fmt, __FILE__, __LINE__, arg1))
68 #define         TRACE(msg) ((_tt_mp->trace) || ((msg) && (msg)->trace))
69 #endif                          /* _MP_GLOBAL_H */