00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _CMPIDT_H_
00024 #define _CMPIDT_H_
00025 #include "OW_config.h"
00026
00027 #include <stdio.h>
00028
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032
00033
00034
00035
00036
00037
00038 #define CMPIVersion051 51
00039 #define CMPIVersion060 60
00040 #define CMPIVersion070 70
00041 #define CMPIVersion080 80
00042 #define CMPIVersion085 85
00043 #define CMPIVersion086 86
00044 #define CMPIVersion087 87
00045 #define CMPIVersion090 90
00046 #define CMPIVersion100 100
00047
00048
00049
00050
00051
00052
00053 #ifdef CMPI_VERSION
00054 #if (CMPI_VERSION==80)
00055 #define CMPI_VER_80 1
00056 #elif (CMPI_VERSION==85)
00057 #define CMPI_VER_85 1
00058 #elif (CMPI_VERSION==86)
00059 #define CMPI_VER_86 1
00060 #elif (CMPI_VERSION==87)
00061 #define CMPI_VER_87 1
00062 #elif (CMPI_VERSION==90)
00063 #define CMPI_VER_90 1
00064 #elif (CMPI_VERSION==100)
00065 #define CMPI_VER_100 1
00066 #else
00067 #error Unsupported CMPI_VERSION defined
00068 #endif
00069 #else
00070 #define CMPI_VER_100
00071 #endif
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081 #if defined (CMPI_VER_100) || defined(CMPI_VER_ALL)
00082 #define CMPI_VER_90
00083 #define CMPI_VER_87
00084 #define CMPI_VER_86
00085 #define CMPI_VER_85
00086 #define CMPI_VER_80
00087 #define CMPICurrentVersion CMPIVersion100
00088 #elif defined (CMPI_VER_90) || defined(CMPI_VER_ALL)
00089
00090 #define CMPI_VER_87
00091 #define CMPI_VER_86
00092 #define CMPI_VER_85
00093 #define CMPI_VER_80
00094 #define CMPICurrentVersion CMPIVersion090
00095 #elif defined (CMPI_VER_87) || defined(CMPI_VER_ALL)
00096
00097 #define CMPI_VER_86
00098 #define CMPI_VER_85
00099 #define CMPI_VER_80
00100 #define CMPICurrentVersion CMPIVersion087
00101 #elif defined (CMPI_VER_86) || defined(CMPI_VER_ALL)
00102
00103
00104
00105 #define CMPI_VER_85
00106 #define CMPI_VER_80
00107 #define CMPICurrentVersion CMPIVersion086
00108 #elif defined (CMPI_VER_85) || defined(CMPI_VER_ALL)
00109
00110 #define CMPI_VER_80
00111 #define CMPICurrentVersion CMPIVersion085
00112 #elif defined (CMPI_VER_80) || defined(CMPI_VER_ALL)
00113 #define CMPICurrentVersion CMPIVersion080
00114 #else // default version
00115 #define CMPI_VER_80
00116 #define CMPICurrentVersion CMPIVersion080
00117 #endif
00118
00119
00120
00121
00122 struct _CMPIBroker;
00123 struct _CMPIInstance;
00124 struct _CMPIObjectPath;
00125 struct _CMPIArgs;
00126 struct _CMPISelectExp;
00127 struct _CMPISelectCond;
00128 struct _CMPISubCond;
00129 struct _CMPIPredicate;
00130 struct _CMPIEnumeration;
00131 struct _CMPIArray;
00132 struct _CMPIString;
00133 struct _CMPIResult;
00134 struct _CMPIContext;
00135 struct _CMPIDateTime;
00136
00137 typedef struct _CMPIBroker CMPIBroker;
00138 typedef struct _CMPIInstance CMPIInstance;
00139 typedef struct _CMPIObjectPath CMPIObjectPath;
00140 typedef struct _CMPIArgs CMPIArgs;
00141 typedef struct _CMPISelectExp CMPISelectExp;
00142 typedef struct _CMPISelectCond CMPISelectCond;
00143 typedef struct _CMPISubCond CMPISubCond;
00144 typedef struct _CMPIPredicate CMPIPredicate;
00145 typedef struct _CMPIEnumeration CMPIEnumeration;
00146 typedef struct _CMPIArray CMPIArray;
00147 typedef struct _CMPIString CMPIString;
00148 typedef struct _CMPIResult CMPIResult;
00149 typedef struct _CMPIContext CMPIContext;
00150 typedef struct _CMPIDateTime CMPIDateTime;
00151
00152 struct _CMPIBrokerFT;
00153 struct _CMPIBrokerEncFT;
00154 struct _CMPIInstanceFT;
00155 struct _CMPIObjectPathFT;
00156 struct _CMPIArgsFT;
00157 struct _CMPISelectExpFT;
00158 struct _CMPISelectCondFT;
00159 struct _CMPISelectCondDocFT;
00160 struct _CMPISelectCondCodFT;
00161 struct _CMPISubCondFT;
00162 struct _CMPIPredicateFT;
00163 struct _CMPIEnumerationFT;
00164 struct _CMPIArrayFT;
00165 struct _CMPIStringFT;
00166 struct _CMPIresultFT;
00167 struct _CMPIContextFT;
00168 struct _CMPIDateTimeFT;
00169
00170 typedef struct _CMPIBrokerFT CMPIBrokerFT;
00171 typedef struct _CMPIBrokerEncFT CMPIBrokerEncFT;
00172 typedef struct _CMPIBrokerExtFT CMPIBrokerExtFT;
00173 typedef struct _CMPIInstanceFT CMPIInstanceFT;
00174 typedef struct _CMPIObjectPathFT CMPIObjectPathFT;
00175 typedef struct _CMPIArgsFT CMPIArgsFT;
00176 typedef struct _CMPISelectExpFT CMPISelectExpFT;
00177 typedef struct _CMPISelectCondFT CMPISelectCondFT;
00178 typedef struct _CMPISubCondFT CMPISubCondFT;
00179 typedef struct _CMPIPredicateFT CMPIPredicateFT;
00180 typedef struct _CMPIEnumerationFT CMPIEnumerationFT;
00181 typedef struct _CMPIArrayFT CMPIArrayFT;
00182 typedef struct _CMPIStringFT CMPIStringFT;
00183 typedef struct _CMPIResultFT CMPIResultFT;
00184 typedef struct _CMPIContextFT CMPIContextFT;
00185 typedef struct _CMPIDateTimeFT CMPIDateTimeFT;
00186
00187
00188 typedef unsigned char CMPIBoolean;
00189 typedef unsigned short CMPIChar16;
00190 typedef unsigned char CMPIUint8;
00191 typedef unsigned short CMPIUint16;
00192 typedef unsigned long CMPIUint32;
00193 typedef unsigned long long CMPIUint64;
00194 typedef signed char CMPISint8;
00195 typedef short CMPISint16;
00196 typedef long CMPISint32;
00197 typedef long long CMPISint64;
00198 typedef float CMPIReal32;
00199 typedef double CMPIReal64;
00200
00201 typedef struct _CMPIValuePtr {
00202 void *ptr;
00203 unsigned int length;
00204 } CMPIValuePtr;
00205
00206 typedef union _CMPIValue {
00207 CMPIBoolean boolean;
00208 CMPIChar16 char16;
00209 CMPIUint8 uint8;
00210 CMPIUint16 uint16;
00211 CMPIUint32 uint32;
00212 CMPIUint64 uint64;
00213 CMPISint8 sint8;
00214 CMPISint16 sint16;
00215 CMPISint32 sint32;
00216 CMPISint64 sint64;
00217 CMPIReal32 real32;
00218 CMPIReal64 real64;
00219
00220 CMPIInstance* inst;
00221 CMPIObjectPath* ref;
00222 CMPIArgs* args;
00223 CMPISelectExp* filter;
00224 CMPIEnumeration* Enum;
00225 CMPIArray* array;
00226 CMPIString* string;
00227 char* chars;
00228 CMPIDateTime* dateTime;
00229 CMPIValuePtr dataPtr;
00230
00231 CMPISint8 Byte;
00232 CMPISint16 Short;
00233 CMPISint32 Int;
00234 CMPISint64 Long;
00235 CMPIReal32 Float;
00236 CMPIReal64 Double;
00237 } CMPIValue;
00238
00239
00240 typedef unsigned short CMPIType;
00241
00242 #define CMPI_null 0
00243
00244 #define CMPI_SIMPLE (2)
00245 #define CMPI_boolean (2+0)
00246 #define CMPI_char16 (2+1)
00247
00248 #define CMPI_REAL ((2)<<2)
00249 #define CMPI_real32 ((2+0)<<2)
00250 #define CMPI_real64 ((2+1)<<2)
00251
00252 #define CMPI_UINT ((8)<<4)
00253 #define CMPI_uint8 ((8+0)<<4)
00254 #define CMPI_uint16 ((8+1)<<4)
00255 #define CMPI_uint32 ((8+2)<<4)
00256 #define CMPI_uint64 ((8+3)<<4)
00257 #define CMPI_SINT ((8+4)<<4)
00258 #define CMPI_sint8 ((8+4)<<4)
00259 #define CMPI_sint16 ((8+5)<<4)
00260 #define CMPI_sint32 ((8+6)<<4)
00261 #define CMPI_sint64 ((8+7)<<4)
00262 #define CMPI_INTEGER ((CMPI_UINT | CMPI_SINT))
00263
00264 #define CMPI_ENC ((16)<<8)
00265 #define CMPI_instance ((16+0)<<8)
00266 #define CMPI_ref ((16+1)<<8)
00267 #define CMPI_args ((16+2)<<8)
00268 #define CMPI_class ((16+3)<<8)
00269 #define CMPI_filter ((16+4)<<8)
00270 #define CMPI_enumeration ((16+5)<<8)
00271 #define CMPI_string ((16+6)<<8)
00272 #define CMPI_chars ((16+7)<<8)
00273 #define CMPI_dateTime ((16+8)<<8)
00274 #define CMPI_ptr ((16+9)<<8)
00275 #define CMPI_charsptr ((16+10)<<8)
00276
00277 #define CMPI_ARRAY ((1)<<13)
00278 #define CMPI_SIMPLEA (CMPI_ARRAY | CMPI_SIMPLE)
00279 #define CMPI_booleanA (CMPI_ARRAY | CMPI_boolean)
00280 #define CMPI_char16A (CMPI_ARRAY | CMPI_char16)
00281
00282 #define CMPI_REALA (CMPI_ARRAY | CMPI_REAL)
00283 #define CMPI_real32A (CMPI_ARRAY | CMPI_real32)
00284 #define CMPI_real64A (CMPI_ARRAY | CMPI_real64)
00285
00286 #define CMPI_UINTA (CMPI_ARRAY | CMPI_UINT)
00287 #define CMPI_uint8A (CMPI_ARRAY | CMPI_uint8)
00288 #define CMPI_uint16A (CMPI_ARRAY | CMPI_uint16)
00289 #define CMPI_uint32A (CMPI_ARRAY | CMPI_uint32)
00290 #define CMPI_uint64A (CMPI_ARRAY | CMPI_uint64)
00291 #define CMPI_SINTA (CMPI_ARRAY | CMPI_SINT)
00292 #define CMPI_sint8A (CMPI_ARRAY | CMPI_sint8)
00293 #define CMPI_sint16A (CMPI_ARRAY | CMPI_sint16)
00294 #define CMPI_sint32A (CMPI_ARRAY | CMPI_sint32)
00295 #define CMPI_sint64A (CMPI_ARRAY | CMPI_sint64)
00296 #define CMPI_INTEGERA (CMPI_ARRAY | CMPI_INTEGER)
00297
00298 #define CMPI_ENCA (CMPI_ARRAY | CMPI_ENC)
00299 #define CMPI_stringA (CMPI_ARRAY | CMPI_string)
00300 #define CMPI_charsA (CMPI_ARRAY | CMPI_chars)
00301 #define CMPI_dateTimeA (CMPI_ARRAY | CMPI_dateTime)
00302 #define CMPI_instanceA (CMPI_ARRAY | CMPI_instance)
00303 #define CMPI_refA (CMPI_ARRAY | CMPI_ref)
00304 #define CMPI_charsptrA (CMPI_ARRAY | CMPI_charsptr)
00305
00306
00307
00308
00309
00310 #define CMPI_keyInteger (CMPI_sint64)
00311 #define CMPI_keyString (CMPI_string)
00312 #define CMPI_keyBoolean (CMPI_boolean)
00313 #define CMPI_keyRef (CMPI_ref)
00314
00315
00316 #define CMPI_charString (CMPI_string)
00317 #define CMPI_realString (CMPI_string | CMPI_real64)
00318 #define CMPI_integerString (CMPI_string | CMPI_sint64)
00319 #define CMPI_numericString (CMPI_string | CMPI_sint64)
00320 #define CMPI_booleanString (CMPI_string | CMPI_boolean)
00321 #define CMPI_dateTimeString (CMPI_string | CMPI_dateTime)
00322 #define CMPI_classNameString (CMPI_string | CMPI_class)
00323 #define CMPI_nameString (CMPI_string | ((16+10)<<8))
00324
00325
00326 typedef unsigned short CMPIValueState;
00327 #define CMPI_goodValue (0)
00328 #define CMPI_nullValue (1<<8)
00329 #define CMPI_keyValue (2<<8)
00330 #define CMPI_notFound (4<<8)
00331 #define CMPI_badValue (0x80<<8)
00332
00333 typedef struct _CMPIData {
00334 CMPIType type;
00335 CMPIValueState state;
00336 CMPIValue value;
00337 } CMPIData;
00338
00339
00340 #ifndef CMPI_NO_SYNONYM_SUPPORT
00341 #define CMPI_Byte CMPI_sint8
00342 #define CMPI_Short CMPI_sint16
00343 #define CMPI_Int CMPI_sint32
00344 #define CMPI_Long CMPI_sint64
00345 #define CMPI_Float CMPI_real32
00346 #define CMPI_Double CMPI_real64
00347
00348 #define CMPI_ByteA CMPI_sint8A
00349 #define CMPI_ShortA CMPI_sint16A
00350 #define CMPI_IntA CMPI_sint32A
00351 #define CMPI_LongA CMPI_sint64A
00352 #define CMPI_FloatA CMPI_real32A
00353 #define CMPI_DoubleA CMPI_real64A
00354 #endif
00355
00356 typedef unsigned int CMPICount;
00357
00358
00359 typedef unsigned int CMPIFlags;
00360
00361 #define CMPI_FLAG_LocalOnly 1
00362 #define CMPI_FLAG_DeepInheritance 2
00363 #define CMPI_FLAG_IncludeQualifiers 4
00364 #define CMPI_FLAG_IncludeClassOrigin 8
00365
00366 #define CMPIInvocationFlags "CMPIInvocationFlags"
00367
00368 typedef enum _CMPIrc {
00369 CMPI_RC_OK =0,
00370 CMPI_RC_ERR_FAILED =1,
00371 CMPI_RC_ERR_ACCESS_DENIED =2,
00372 CMPI_RC_ERR_INVALID_NAMESPACE =3,
00373 CMPI_RC_ERR_INVALID_PARAMETER =4,
00374 CMPI_RC_ERR_INVALID_CLASS =5,
00375 CMPI_RC_ERR_NOT_FOUND =6,
00376 CMPI_RC_ERR_NOT_SUPPORTED =7,
00377 CMPI_RC_ERR_CLASS_HAS_CHILDREN =8,
00378 CMPI_RC_ERR_CLASS_HAS_INSTANCES =9,
00379 CMPI_RC_ERR_INVALID_SUPERCLASS =10,
00380 CMPI_RC_ERR_ALREADY_EXISTS =11,
00381 CMPI_RC_ERR_NO_SUCH_PROPERTY =12,
00382 CMPI_RC_ERR_TYPE_MISMATCH =13,
00383 CMPI_RC_ERR_QUERY_LANGUAGE_NOT_SUPPORTED =14,
00384 CMPI_RC_ERR_INVALID_QUERY =15,
00385 CMPI_RC_ERR_METHOD_NOT_AVAILABLE =16,
00386 CMPI_RC_ERR_METHOD_NOT_FOUND =17,
00387
00388
00389
00390 CMPI_RC_DO_NOT_UNLOAD =50,
00391 CMPI_RC_NEVER_UNLOAD =51,
00392
00393
00394 CMPI_RC_ERR_INVALID_HANDLE =60,
00395 CMPI_RC_ERR_INVALID_DATA_TYPE =61,
00396
00397
00398 CMPI_RC_ERROR_SYSTEM =100,
00399 CMPI_RC_ERROR =200
00400 } CMPIrc;
00401
00402 typedef struct _CMPIStatus {
00403 CMPIrc rc;
00404 CMPIString *msg;
00405 } CMPIStatus;
00406
00407
00408 #ifdef CMPI_VER_87
00409 typedef CMPIData CMPIAccessor(const char*, void* parm);
00410 #endif
00411
00412
00413
00414
00415 #define CMPI_MB_Class_0 0x00000001
00416 #define CMPI_MB_Class_1 0x00000003
00417 #define CMPI_MB_Class_2 0x00000007
00418
00419 #define CMPI_MB_Supports_PropertyMI 0x00000100
00420 #define CMPI_MB_Supports_IndicationMI 0x00000200
00421 #define CMPI_MB_Supports_IndicationPolling 0x00000400
00422 #define CMPI_MB_Supports_QueryNormalization 0x00000800
00423 #define CMPI_MB_Supports_Qualifier 0x00001000
00424 #define CMPI_MB_Supports_Schema 0x00003000
00425
00426
00427
00428 typedef enum _CMPIPredOp {
00429 CMPI_PredOp_Equals =1,
00430 CMPI_PredOp_NotEquals =2,
00431 CMPI_PredOp_LessThan =3,
00432 CMPI_PredOp_GreaterThanOrEquals =4,
00433 CMPI_PredOp_GreaterThan =5,
00434 CMPI_PredOp_LessThanOrEquals =6,
00435 CMPI_PredOp_Isa =7,
00436 CMPI_PredOp_NotIsa =8,
00437 CMPI_PredOp_Like =9,
00438 CMPI_PredOp_NotLike =10
00439 } CMPIPredOp;
00440
00441 #ifdef __cplusplus
00442 };
00443 #endif
00444
00445 #endif
00446
00447
00448