source: trunk/nom/include/nom.h@ 281

Last change on this file since 281 was 281, checked in by cinc, 18 years ago

Some minor changes for the new IDL compiler

File size: 4.5 KB
Line 
1/* ***** BEGIN LICENSE BLOCK *****
2* Version: CDDL 1.0/LGPL 2.1
3*
4* The contents of this file are subject to the COMMON DEVELOPMENT AND
5* DISTRIBUTION LICENSE (CDDL) Version 1.0 (the "License"); you may not use
6* this file except in compliance with the License. You may obtain a copy of
7* the License at http://www.sun.com/cddl/
8*
9* Software distributed under the License is distributed on an "AS IS" basis,
10* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11* for the specific language governing rights and limitations under the
12* License.
13*
14* The Original Code is "NOM" Netlabs Object Model
15*
16* The Initial Developer of the Original Code is
17* netlabs.org: Chris Wohlgemuth <cinc-ml@netlabs.org>.
18* Portions created by the Initial Developer are Copyright (C) 2005-2006
19* the Initial Developer. All Rights Reserved.
20*
21* Contributor(s):
22*
23* Alternatively, the contents of this file may be used under the terms of
24* the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
25* case the provisions of the LGPL are applicable instead of those above. If
26* you wish to allow use of your version of this file only under the terms of
27* the LGPL, and not to allow others to use your version of this file under
28* the terms of the CDDL, indicate your decision by deleting the provisions
29* above and replace them with the notice and other provisions required by the
30* LGPL. If you do not delete the provisions above, a recipient may use your
31* version of this file under the terms of any one of the CDDL or the LGPL.
32*
33* ***** END LICENSE BLOCK ***** */
34
35#ifndef NOM_H_INCLUDED
36#define NOM_H_INCLUDED
37
38
39#include <glib.h>
40
41#ifndef NOMEXTERN
42 #ifdef __cplusplus
43 #define NOMEXTERN extern "C"
44 #else
45 #define NOMEXTERN extern
46 #endif
47#endif
48
49#define NOM_Scope NOMEXTERN
50
51#ifndef NOMLINK
52#if defined(__OS2__)
53 #if defined(__IBMCPP__)
54 #define NOMLINK _System
55 #elif defined(__EMX__)
56 #define NOMLINK _System
57 #else
58 #define NOMLINK
59 #endif /* __IBMCPP__ */
60#else
61 #define NOMLINK
62#endif
63#endif
64
65#define NOMDLINK
66
67typedef void* NOMLINK nomMethodProc(void*);
68
69#ifndef NULL
70#define NULL ((void *) 0)
71#endif
72
73#ifndef IN
74#define IN
75#endif
76
77#ifndef OUT
78#define OUT
79#endif
80
81#ifndef INOUT
82#define INOUT
83#endif
84
85typedef gchar *string;
86
87typedef gint16 CORBA_short;
88typedef gint32 CORBA_long;
89typedef guint16 CORBA_unsigned_short;
90typedef guint32 CORBA_unsigned_long;
91typedef gfloat CORBA_float;
92typedef gdouble CORBA_double;
93typedef char CORBA_char;
94typedef gunichar2 CORBA_wchar;
95typedef guchar CORBA_boolean;
96typedef guchar CORBA_octet;
97typedef gdouble CORBA_long_double;
98typedef char* CORBA_string;
99
100//typedef gboolean boolean;
101
102#if 0
103#if !defined(ORBIT_DECL_CORBA_Object) && !defined(_CORBA_Object_defined)
104#define ORBIT_DECL_CORBA_Object 1
105#define _CORBA_Object_defined 1
106typedef struct CORBA_Object_type *CORBA_Object;
107#endif
108#endif
109
110typedef unsigned long NOM_ulong;
111typedef GQuark nomId;
112typedef nomId* pnomId;
113
114typedef GData* PGData;
115typedef gulong* pgulong;
116typedef GTree* PGTree;
117typedef GArray* PGArray;
118
119
120typedef gchar **nomID; /* This will be reomoved later. Don't use anymore */
121typedef void *nomToken; /* Use a gpointer instead of void* here? */
122
123#ifndef NOM_BOOLEAN
124 #define NOM_BOOLEAN
125 typedef gboolean boolean;
126#endif /* NOM_BOOLEAN */
127
128
129/* Object Instance Structure */
130struct nomMethodTabStruct;
131typedef struct NOMAnyObj_struct {
132 struct nomMethodTabStruct *mtab;
133 gulong body[1];
134} NOMAnyObj;
135
136#if 0
137#ifndef NOMClass
138typedef struct NOMClass_struct {
139 struct nomMethodTabStruct *mtab;
140 gulong body[1];
141} NOMClassObj;
142#define NOMClass NOMClassObj
143typedef NOMClass *PNOMClass;
144#endif
145#endif
146
147#ifndef NOMObject
148typedef struct NOMObject_struct {
149 struct nomMethodTabStruct *mtab;
150 gulong body[1];
151} NOMObjectObj;
152#define NOMObject NOMObjectObj
153typedef NOMObject *PNOMObject;
154#endif
155
156#define NOMClass NOMObject
157typedef NOMClass *PNOMClass;
158
159//#define NOMObject NOMAnyObj
160#define NOMClassMgr NOMAnyObj
161
162typedef NOMObject *CORBA_Object;
163
164/* The following is probably not correct... */
165//typedef NOMAnyObj CORBA_Environment;
166
167#define nomresolve_(obj,mToken) ((nomMethodProc*)((void)obj, mToken))
168#define NOM_Resolve(obj, objClassName, methodName) \
169 (( nomTD_ ## objClassName ## _ ## methodName ) \
170 nomresolve_(obj, objClassName ## ClassData.methodName ))
171
172#include <nomapi.h>
173
174#endif /* NOM_H_INCLUDED */
175
176
177
178
179
180
181
Note: See TracBrowser for help on using the repository browser.