| 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 |
|
|---|
| 67 | typedef 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 |
|
|---|
| 85 | typedef char integer1;
|
|---|
| 86 | typedef short integer2;
|
|---|
| 87 | typedef unsigned short uinteger2;
|
|---|
| 88 | typedef long integer4;
|
|---|
| 89 | typedef unsigned long uinteger4;
|
|---|
| 90 | typedef float float4;
|
|---|
| 91 | typedef double float8;
|
|---|
| 92 | typedef char *zString; /* NULL terminated string */
|
|---|
| 93 | typedef char *fString; /* non-terminated string */
|
|---|
| 94 | typedef unsigned char octet;
|
|---|
| 95 |
|
|---|
| 96 | typedef gchar *string;
|
|---|
| 97 |
|
|---|
| 98 | typedef gint16 CORBA_short;
|
|---|
| 99 | typedef gint32 CORBA_long;
|
|---|
| 100 | typedef guint16 CORBA_unsigned_short;
|
|---|
| 101 | typedef guint32 CORBA_unsigned_long;
|
|---|
| 102 | typedef gfloat CORBA_float;
|
|---|
| 103 | typedef gdouble CORBA_double;
|
|---|
| 104 | typedef char CORBA_char;
|
|---|
| 105 | typedef gunichar2 CORBA_wchar;
|
|---|
| 106 | typedef guchar CORBA_boolean;
|
|---|
| 107 | typedef guchar CORBA_octet;
|
|---|
| 108 | typedef gdouble CORBA_long_double;
|
|---|
| 109 | typedef char* CORBA_string;
|
|---|
| 110 |
|
|---|
| 111 | #if 0
|
|---|
| 112 | #if !defined(ORBIT_DECL_CORBA_Object) && !defined(_CORBA_Object_defined)
|
|---|
| 113 | #define ORBIT_DECL_CORBA_Object 1
|
|---|
| 114 | #define _CORBA_Object_defined 1
|
|---|
| 115 | typedef struct CORBA_Object_type *CORBA_Object;
|
|---|
| 116 | #endif
|
|---|
| 117 | #endif
|
|---|
| 118 |
|
|---|
| 119 | typedef unsigned long NOM_ulong;
|
|---|
| 120 | typedef GQuark nomId;
|
|---|
| 121 |
|
|---|
| 122 | typedef GData* pGData;
|
|---|
| 123 |
|
|---|
| 124 | typedef char **nomID;
|
|---|
| 125 | typedef void *nomToken; /* */
|
|---|
| 126 |
|
|---|
| 127 | #ifndef NOM_BOOLEAN
|
|---|
| 128 | #define NOM_BOOLEAN
|
|---|
| 129 | typedef unsigned char boolean;
|
|---|
| 130 | #endif /* NOM_BOOLEAN */
|
|---|
| 131 |
|
|---|
| 132 |
|
|---|
| 133 |
|
|---|
| 134 | /* somtypes.h */
|
|---|
| 135 | /* Object Instance Structure */
|
|---|
| 136 | struct nomMethodTabStruct;
|
|---|
| 137 | typedef struct NOMAnyObj_struct {
|
|---|
| 138 | struct nomMethodTabStruct *mtab;
|
|---|
| 139 | integer4 body[1];
|
|---|
| 140 | } NOMAnyObj;
|
|---|
| 141 |
|
|---|
| 142 |
|
|---|
| 143 | #define NOMObject NOMAnyObj
|
|---|
| 144 | #define NOMClass NOMAnyObj
|
|---|
| 145 | #define NOMClassMgr NOMAnyObj
|
|---|
| 146 |
|
|---|
| 147 | typedef NOMObject *CORBA_Object;
|
|---|
| 148 |
|
|---|
| 149 | typedef NOMAnyObj CORBA_Environment;
|
|---|
| 150 |
|
|---|
| 151 | /*#define nomresolve_(obj,mToken) (nomresolve(obj,mToken)) */
|
|---|
| 152 |
|
|---|
| 153 | #define nomresolve_(obj,mToken) ((nomMethodProc*)((void)obj, mToken))
|
|---|
| 154 |
|
|---|
| 155 |
|
|---|
| 156 | /* from oc's mtbl, with verification of o */
|
|---|
| 157 | #define NOM_Resolve(obj, objClassName, methodName) \
|
|---|
| 158 | (( nomTD_ ## objClassName ## _ ## methodName ) \
|
|---|
| 159 | nomresolve_(obj, objClassName ## ClassData.methodName ))
|
|---|
| 160 |
|
|---|
| 161 | #include <nomapi.h>
|
|---|
| 162 |
|
|---|
| 163 | #endif /* NOM_H_INCLUDED */
|
|---|
| 164 |
|
|---|
| 165 |
|
|---|
| 166 |
|
|---|
| 167 |
|
|---|
| 168 |
|
|---|
| 169 |
|
|---|
| 170 |
|
|---|