-
Notifications
You must be signed in to change notification settings - Fork 0
/
cmpidt.h
1654 lines (1505 loc) · 49.9 KB
/
cmpidt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* ------------------------------------------------------------------------- */
/* */
/* Copyright (c) 2006-2015 The Open Group */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining a */
/* copy of this software (the "Software"), to deal in the Software without */
/* restriction, including without limitation the rights to use, copy, */
/* modify, merge, publish, distribute, sublicense, and/or sell copies of */
/* the Software, and to permit persons to whom the Software is furnished */
/* to do so, subject to the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be included */
/* in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS */
/* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT */
/* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR */
/* THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/* */
/* ------------------------------------------------------------------------- */
/**
* @file cmpidt.h
* @brief Defines CMPI data types.
*
* MIs and MBs do not need to include this header file because it is already
* included when including the main header file `cmpift.h`.
*
* This header file belongs to the Open Group Technical Standard: Systems
* Management: Common Manageability Programming Interface (CMPI Standard),
* Issue 2 Version 1.
*
* This header file is provided as a convenience only. In the case of any
* discrepancy between the header file and the CMPI Standard (incorporating any
* subsequent Technical Corrigenda), the CMPI Standard shall be definitive.
*/
#ifndef _CMPIDT_H_
#define _CMPIDT_H_
#include <cmpipl.h>
#include <cmpios.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @addtogroup sym-version-nnn
* @{
*/
#define CMPIVersion100 100 ///< CMPI 1.0.0
#define CMPIVersion200 200 ///< CMPI 2.0.0
#define CMPIVersion210 210 ///< CMPI 2.1.0
/**
* @}
* @addtogroup sym-current-version
* @{
*/
/**
* @brief Current CMPI version of the header files.
*
* The current CMPI version is the version described by this version of the
* CMPI header files (and online documentation).
*
* That is also the highest CMPI version supported by this version of the CMPI
* header files. See @ref sym-version "CMPI_VERSION" for implementing against
* a lower CMPI version.
*/
#define CMPICurrentVersion CMPIVersion210
/**
* @}
* @addtogroup sym-version
* @{
*/
/**
* @brief CMPI version that is implemented.
*
* This symbol is only set in this header file if not set outside of this
* header file. Its default value is @ref sym-current-version
* "CMPICurrentVersion", and it can be overridden outside of the CMPI
* header files if a lower CMPI version is intended to be implemented.
*/
#ifndef CMPI_VERSION
# define CMPI_VERSION CMPICurrentVersion
#endif
/**
* @}
* @addtogroup sym-ver-nnn
* @{
*/
#if (CMPI_VERSION == CMPIVersion100)
# define CMPI_VER_100 1 ///< Check for features introduced in CMPI 1.0.0
#elif (CMPI_VERSION == CMPIVersion200)
# define CMPI_VER_100 1 ///< Check for features introduced in CMPI 1.0.0
# define CMPI_VER_200 1 ///< Check for features introduced in CMPI 2.0.0
#elif (CMPI_VERSION == CMPIVersion210)
# define CMPI_VER_100 1 ///< Check for features introduced in CMPI 1.0.0
# define CMPI_VER_200 1 ///< Check for features introduced in CMPI 2.0.0
# define CMPI_VER_210 1 ///< Check for features introduced in CMPI 2.1.0
#else
# error Unsupported CMPI version defined in CMPI_VERSION symbol
#endif
/**
* @}
* @{
*/
/*
* Forward declarations of structures and their typedefs.
*/
struct _CMPIBroker;
struct _CMPIBrokerFT;
struct _CMPIBrokerEncFT;
struct _CMPIBrokerExtFT;
#ifdef CMPI_VER_200
struct _CMPIBrokerMemFT;
#endif
typedef struct _CMPIBroker CMPIBroker;
typedef struct _CMPIBrokerFT CMPIBrokerFT;
typedef struct _CMPIBrokerEncFT CMPIBrokerEncFT;
typedef struct _CMPIBrokerExtFT CMPIBrokerExtFT;
#ifdef CMPI_VER_200
typedef struct _CMPIBrokerMemFT CMPIBrokerMemFT;
#endif
struct _CMPIContext;
struct _CMPIResult;
struct _CMPIString;
struct _CMPIArray;
struct _CMPIEnumeration;
struct _CMPIInstance;
struct _CMPIObjectPath;
struct _CMPIArgs;
struct _CMPIDateTime;
struct _CMPISelectExp;
struct _CMPISelectCond;
struct _CMPISubCond;
struct _CMPIPredicate;
#ifdef CMPI_VER_200
struct _CMPIError;
#endif
#ifdef CMPI_VER_210
struct _CMPIPropertyList;
struct _CMPIEnumerationFilter;
#endif
typedef struct _CMPIContext CMPIContext;
typedef struct _CMPIResult CMPIResult;
typedef struct _CMPIString CMPIString;
typedef struct _CMPIArray CMPIArray;
typedef struct _CMPIEnumeration CMPIEnumeration;
typedef struct _CMPIInstance CMPIInstance;
typedef struct _CMPIObjectPath CMPIObjectPath;
typedef struct _CMPIArgs CMPIArgs;
typedef struct _CMPIDateTime CMPIDateTime;
typedef struct _CMPISelectExp CMPISelectExp;
typedef struct _CMPISelectCond CMPISelectCond;
typedef struct _CMPISubCond CMPISubCond;
typedef struct _CMPIPredicate CMPIPredicate;
#ifdef CMPI_VER_200
typedef struct _CMPIError CMPIError;
#endif
#ifdef CMPI_VER_210
typedef struct _CMPIPropertyList CMPIPropertyList;
typedef struct _CMPIEnumerationFilter CMPIEnumerationFilter;
#endif
struct _CMPIContextFT;
struct _CMPIResultFT;
struct _CMPIStringFT;
struct _CMPIArrayFT;
struct _CMPIEnumerationFT;
struct _CMPIInstanceFT;
struct _CMPIObjectPathFT;
struct _CMPIArgsFT;
struct _CMPIDateTimeFT;
struct _CMPISelectExpFT;
struct _CMPISelectCondFT;
struct _CMPISelectCondDocFT;
struct _CMPISelectCondCodFT;
struct _CMPISubCondFT;
struct _CMPIPredicateFT;
#ifdef CMPI_VER_200
struct _CMPIErrorFT;
#endif
#ifdef CMPI_VER_210
struct _CMPIPropertyListFT;
struct _CMPIEnumerationFilterFT;
#endif
typedef struct _CMPIContextFT CMPIContextFT;
typedef struct _CMPIResultFT CMPIResultFT;
typedef struct _CMPIStringFT CMPIStringFT;
typedef struct _CMPIArrayFT CMPIArrayFT;
typedef struct _CMPIEnumerationFT CMPIEnumerationFT;
typedef struct _CMPIInstanceFT CMPIInstanceFT;
typedef struct _CMPIObjectPathFT CMPIObjectPathFT;
typedef struct _CMPIArgsFT CMPIArgsFT;
typedef struct _CMPIDateTimeFT CMPIDateTimeFT;
typedef struct _CMPISelectExpFT CMPISelectExpFT;
typedef struct _CMPISelectCondFT CMPISelectCondFT;
typedef struct _CMPISubCondFT CMPISubCondFT;
typedef struct _CMPIPredicateFT CMPIPredicateFT;
#ifdef CMPI_VER_200
typedef struct _CMPIErrorFT CMPIErrorFT;
#endif
#ifdef CMPI_VER_210
typedef struct _CMPIPropertyListFT CMPIPropertyListFT;
typedef struct _CMPIEnumerationFilterFT CMPIEnumerationFilterFT;
#endif
typedef struct _CMPIInstanceMIFT CMPIInstanceMIFT;
typedef struct _CMPIAssociationMIFT CMPIAssociationMIFT;
typedef struct _CMPIMethodMIFT CMPIMethodMIFT;
typedef struct _CMPIPropertyMIFT CMPIPropertyMIFT;
typedef struct _CMPIIndicationMIFT CMPIIndicationMIFT;
/**
* @}
* @addtogroup types-cim-types
* @{
*
* The Typedefs defined in this module cover most CIM data types. The remaining
* CIM data types are defined as CMPI encapsulated data types, and are:
*
* @li CMPIString - CIM data type `string`.
* @li CMPIDateTime - CIM data type `datetime`.
* @li CMPIObjectPath - CIM data type `reference`.
* @li CMPIInstance - for embedded instances.
*/
typedef unsigned char CMPIBoolean; ///< CIM data type `boolean`.
typedef unsigned short CMPIChar16; ///< CIM data type `char16`.
typedef unsigned char CMPIUint8; ///< CIM data type `uint8`.
typedef unsigned short CMPIUint16; ///< CIM data type `uint16`.
typedef unsigned int CMPIUint32; ///< CIM data type `uint32`.
/**
* @brief CIM data type `uint64`.
*
* @platformspecific The underlying data type for the @ref CMPIUint64 type
* depends on the compile platform (see @ref sym-platform). For details,
* examine the source code of `cmpidt.h`.
*/
#ifndef CMPI_PLATFORM_WIN32_IX86_MSVC
typedef unsigned long long CMPIUint64;
#else
typedef unsigned __int64 CMPIUint64;
#endif
typedef signed char CMPISint8; ///< CIM data type `sint8`.
typedef short CMPISint16; ///< CIM data type `sint16`.
typedef signed int CMPISint32; ///< CIM data type `sint32`.
/**
* @brief CIM data type `sint64`.
*
* @platformspecific The underlying data type for the @ref CMPISint64 type
* depends on the compile platform (see @ref sym-platform). For details,
* examine the source code of `cmpidt.h`.
*/
#ifndef CMPI_PLATFORM_WIN32_IX86_MSVC
typedef long long CMPISint64;
#else
typedef __int64 CMPISint64;
#endif
typedef float CMPIReal32; ///< CIM data type `real32`.
typedef double CMPIReal64; ///< CIM data type `real64`.
/**
* @}
* @addtogroup type-count
* @{
*/
/**
* @brief An unsigned integer that specifies a number of elements or position
* in a sequential data type.
*
* It is used as argument or return type of other functions and specifies e.g.
* number of items in or index into CMPIArray,
* number of Bytes in CMPIValuePtr, or
* number of variable function arguments.
*/
typedef unsigned int CMPICount;
/**
* @}
* @addtogroup type-valueptr
* @{
*/
/**
* @brief A raw unformatted data area of a specified size.
*
* CMPIValuePtr is used for context data only.
*/
typedef struct _CMPIValuePtr {
/**
* @brief Pointer to the first Byte of the chunk of data.
*/
void *ptr;
/**
* @brief Size of the chunk of data, in Bytes.
*/
CMPICount length;
} CMPIValuePtr;
/**
* @}
* @addtogroup type-value
* @{
*/
/**
* @brief A union that can hold a value of any of the data types defined in
* CMPI.
*
* CMPIValue is used in CMPIData, but also standalone.
*/
typedef union _CMPIValue {
CMPIBoolean boolean; ///< Value of CIM type `boolean` and other booleans
CMPIChar16 char16; ///< Value of CIM type `char16`
CMPIUint8 uint8; ///< Value of CIM type `uint8`
CMPIUint16 uint16; ///< Value of CIM type `uint16`
CMPIUint32 uint32; ///< Value of CIM type `uint32`
CMPIUint64 uint64; ///< Value of CIM type `uint64`
CMPISint8 sint8; ///< Value of CIM type `sint8`
CMPISint16 sint16; ///< Value of CIM type `sint16`
CMPISint32 sint32; ///< Value of CIM type `sint32`
CMPISint64 sint64; ///< Value of CIM type `sint64`
CMPIReal32 real32; ///< Value of CIM type `real32`
CMPIReal64 real64; ///< Value of CIM type `real64`
CMPIInstance* inst; ///< @brief Value of a CMPIInstance object,
///< used for CIM embedded instances
CMPIObjectPath* ref; ///< @brief Value of a CMPIObjectPath object,
///< used for CIM type `reference`
CMPIArgs* args; ///< Value of a CMPIArgs object
CMPISelectExp* filter; ///< Value of a CMPISelectExp object
CMPIEnumeration* Enum; ///< Value of a CMPIEnumeration object
CMPIArray* array; ///< Value of a CMPIArray object
CMPIString* string; ///< Value of a CMPIString object
char* chars; ///< Value of a C string
CMPIDateTime* dateTime; ///< Value of a CMPIDateTime object
CMPIValuePtr dataPtr; ///< Value of a CMPIValuePtr object
CMPISint8 Byte; /**< @brief Deprecated. @deprecated This member is
deprecated since CMPI 2.1. Use @p sint8 instead. */
CMPISint16 Short; /**< @brief Deprecated. @deprecated This member is
deprecated since CMPI 2.1. Use @p sint16 instead. */
CMPISint32 Int; /**< @brief Deprecated. @deprecated This member is
deprecated since CMPI 2.1. Use @p sint32 instead. */
CMPISint64 Long; /**< @brief Deprecated. @deprecated This member is
deprecated since CMPI 2.1. Use @p sint64 instead. */
CMPIReal32 Float; /**< @brief Deprecated. @deprecated This member is
deprecated since CMPI 2.1. Use @p real32 instead. */
CMPIReal64 Double; /**< @brief Deprecated. @deprecated This member is
deprecated since CMPI 2.1. Use @p real64 instead. */
} CMPIValue;
/**
* @}
* @addtogroup type-type CMPIType
* @{
*/
/**
* @brief A bitmask type representing a CMPI type.
*
* @ref CMPIType is used mainly in CMPI data items (see CMPIData)
* and is also used standalone in some cases.
*
* See @ref def-cmpitype-symbols "Test masks and values for CMPIType" for a
* definition of test masks and values for @ref CMPIType.
*/
typedef unsigned short CMPIType;
/**
* @anchor def-cmpitype-symbols
* @name Test masks and values for CMPIType
* @{
*
* These test masks and values are used on @ref CMPIType.
*/
#define CMPI_null 0 ///< No type
/// Test mask for CIM simple types
#define CMPI_SIMPLE (2)
#define CMPI_boolean (2+0) ///< Indicates a CMPIValue.boolean value
#define CMPI_char16 (2+1) ///< Indicates a CMPIValue.char16 value
/// Test mask for CIM real number types
#define CMPI_REAL ((2)<<2)
#define CMPI_real32 ((2+0)<<2) ///< Indicates a CMPIValue.real32 value
#define CMPI_real64 ((2+1)<<2) ///< Indicates a CMPIValue.real64 value
/// Test mask for CIM unsigned integer types
/// @bug The CMPI_UINT test mask matches not only for unsigned integer types,
/// but in addition for signed integers. For compatibility reasons, this
/// cannot be fixed in CMPI 2.x.
#define CMPI_UINT ((8)<<4)
#define CMPI_uint8 ((8+0)<<4) ///< Indicates a CMPIValue.uint8 value
#define CMPI_uint16 ((8+1)<<4) ///< Indicates a CMPIValue.uint16 value
#define CMPI_uint32 ((8+2)<<4) ///< Indicates a CMPIValue.uint32 value
#define CMPI_uint64 ((8+3)<<4) ///< Indicates a CMPIValue.uint64 value
/// Test mask for CIM signed integer types
/// @bug The CMPI_SINT test mask matches not only for signed integer types, but
/// in addition for unsigned integers. For compatibility reasons, this
/// cannot be fixed in CMPI 2.x.
#define CMPI_SINT ((8+4)<<4)
#define CMPI_sint8 ((8+4)<<4) ///< Indicates a CMPIValue.sint8 value
#define CMPI_sint16 ((8+5)<<4) ///< Indicates a CMPIValue.sint16 value
#define CMPI_sint32 ((8+6)<<4) ///< Indicates a CMPIValue.sint32 value
#define CMPI_sint64 ((8+7)<<4) ///< Indicates a CMPIValue.sint64 value
/// Test mask for CIM integer types
#define CMPI_INTEGER ((CMPI_UINT|CMPI_SINT))
/// Test mask for CMPI encapsulated data types
#define CMPI_ENC ((16)<<8)
#define CMPI_instance ((16+0)<<8) ///< Indicates a CMPIValue.inst value
#define CMPI_ref ((16+1)<<8) ///< Indicates a CMPIValue.ref value
#define CMPI_args ((16+2)<<8) ///< Indicates a CMPIValue.args value
#define CMPI_class ((16+3)<<8) ///< Not used
#define CMPI_filter ((16+4)<<8) ///< Indicates a CMPIValue.filter value
#define CMPI_enumeration ((16+5)<<8) ///< Indicates a CMPIValue.Enum value
#define CMPI_string ((16+6)<<8) ///< Indicates a CMPIValue.string value
#define CMPI_chars ((16+7)<<8) ///< Indicates a CMPIValue.chars value
#define CMPI_dateTime ((16+8)<<8) ///< Indicates a CMPIValue.dateTime value
#define CMPI_ptr ((16+9)<<8) ///< Indicates a CMPIValue.dataPtr value
#define CMPI_charsptr ((16+10)<<8) ///< Not used
/// Test mask for arrays
#define CMPI_ARRAY ((1)<<13)
/// Test mask for array of CIM simple types
#define CMPI_SIMPLEA (CMPI_ARRAY|CMPI_SIMPLE)
/// Indicates a CMPIValue.array value with @ref CMPIBoolean entries
#define CMPI_booleanA (CMPI_ARRAY|CMPI_boolean)
/// Indicates a CMPIValue.array value with @ref CMPIChar16 entries
#define CMPI_char16A (CMPI_ARRAY|CMPI_char16)
/// Test mask for array of CIM real numbers
#define CMPI_REALA (CMPI_ARRAY|CMPI_REAL)
/// Indicates a CMPIValue.array value with @ref CMPIReal32 entries
#define CMPI_real32A (CMPI_ARRAY|CMPI_real32)
/// Indicates a CMPIValue.array value with @ref CMPIReal64 entries
#define CMPI_real64A (CMPI_ARRAY|CMPI_real64)
/// Test mask for array of CIM unsigned integers
#define CMPI_UINTA (CMPI_ARRAY|CMPI_UINT)
/// Indicates a CMPIValue.array value with @ref CMPIUint8 entries
#define CMPI_uint8A (CMPI_ARRAY|CMPI_uint8)
/// Indicates a CMPIValue.array value with @ref CMPIUint16 entries
#define CMPI_uint16A (CMPI_ARRAY|CMPI_uint16)
/// Indicates a CMPIValue.array value with @ref CMPIUint32 entries
#define CMPI_uint32A (CMPI_ARRAY|CMPI_uint32)
/// Indicates a CMPIValue.array value with @ref CMPIUint64 entries
#define CMPI_uint64A (CMPI_ARRAY|CMPI_uint64)
/// Test mask for array of CIM signed integers
#define CMPI_SINTA (CMPI_ARRAY|CMPI_SINT)
/// Indicates a CMPIValue.array value with @ref CMPISint8 entries
#define CMPI_sint8A (CMPI_ARRAY|CMPI_sint8)
/// Indicates a CMPIValue.array value with @ref CMPISint16 entries
#define CMPI_sint16A (CMPI_ARRAY|CMPI_sint16)
/// Indicates a CMPIValue.array value with @ref CMPISint32 entries
#define CMPI_sint32A (CMPI_ARRAY|CMPI_sint32)
/// Indicates a CMPIValue.array value with @ref CMPISint64 entries
#define CMPI_sint64A (CMPI_ARRAY|CMPI_sint64)
/// Test mask for array of CIM integers
#define CMPI_INTEGERA (CMPI_ARRAY|CMPI_INTEGER)
/// Test mask for array of CMPI encapsulated data types
#define CMPI_ENCA (CMPI_ARRAY|CMPI_ENC)
/// Indicates a CMPIValue.array value with @ref CMPIInstance entries
#define CMPI_instanceA (CMPI_ARRAY|CMPI_instance)
/// Indicates a CMPIValue.array value with @ref CMPIObjectPath entries
#define CMPI_refA (CMPI_ARRAY|CMPI_ref)
/// Indicates a CMPIValue.array value with @ref CMPIString entries
#define CMPI_stringA (CMPI_ARRAY|CMPI_string)
/// Indicates a CMPIValue.array value with C string entries
#define CMPI_charsA (CMPI_ARRAY|CMPI_chars)
/// Indicates a CMPIValue.array value with @ref CMPIDateTime entries
#define CMPI_dateTimeA (CMPI_ARRAY|CMPI_dateTime)
/// Not used
#define CMPI_charsptrA (CMPI_ARRAY|CMPI_charsptr)
// The following are generic types for key bindings in
// CMPIObjectPath objects, that are used when the
// specific CIM types are not available.
/// Generic integer type in CMPIObjectPath
#define CMPI_keyInteger (CMPI_sint64)
/// Generic string type in CMPIObjectPath
#define CMPI_keyString (CMPI_string)
/// Generic boolean type in CMPIObjectPath
#define CMPI_keyBoolean (CMPI_boolean)
/// Generic reference type in CMPIObjectPath
#define CMPI_keyRef (CMPI_ref)
// The following are predicate types only.
/// Predicate type for strings
#define CMPI_charString (CMPI_string)
/// Predicate type for integers
#define CMPI_integerString (CMPI_string | CMPI_sint64)
/// Predicate type for real numbers
#define CMPI_realString (CMPI_string | CMPI_real64)
/// Predicate type for numbers
#define CMPI_numericString (CMPI_string | CMPI_sint64 | CMPI_real64)
/// Predicate type for booleans
#define CMPI_booleanString (CMPI_string | CMPI_boolean)
/// Predicate type for datetime
#define CMPI_dateTimeString (CMPI_string | CMPI_dateTime)
/// Predicate type for class names
#define CMPI_classNameString (CMPI_string | CMPI_class)
/// Predicate type for names
#define CMPI_nameString (CMPI_string | ((16+10)<<8))
// Deprecated: The following symbols are synonyms for other symbols and are
// defined only for backwards compatibility. They are not part of the CMPI
// Standard, and their use is deprecated.
#ifndef CMPI_NO_SYNONYM_SUPPORT
# define CMPI_Byte CMPI_sint8
# define CMPI_Short CMPI_sint16
# define CMPI_Int CMPI_sint32
# define CMPI_Long CMPI_sint64
# define CMPI_Float CMPI_real32
# define CMPI_Double CMPI_real64
# define CMPI_ByteA CMPI_sint8A
# define CMPI_ShortA CMPI_sint16A
# define CMPI_IntA CMPI_sint32A
# define CMPI_LongA CMPI_sint64A
# define CMPI_FloatA CMPI_real32A
# define CMPI_DoubleA CMPI_real64A
#endif // CMPI_NO_SYNONYM_SUPPORT
/**
* @}
* @}
* @addtogroup type-value-state
* @{
*/
/**
* @brief A bitmask type representing the state of a value in a CMPIData object.
*
* See @ref def-cmpivaluestate-symbols "Test masks for CMPIValueState" for a
* definition of test masks for @ref CMPIValueState.
*/
typedef unsigned short CMPIValueState;
/**
* @anchor def-cmpivaluestate-symbols
* @name Test masks for CMPIValueState
* @{
*
* These test masks are used on @ref CMPIValueState.
*/
#define CMPI_goodValue (0) /**< All flags are false */
#define CMPI_nullValue (1<<8) /**< Flag indicating that the data item is NULL */
#define CMPI_keyValue (2<<8) /**< Flag indicating that the data item is a key
binding */
#define CMPI_notFound (4<<8) /**< `CMPI_notFound` is deprecated since CMPI 2.1;
Use the return code to indicate that a
data item has not been found */
#define CMPI_badValue (0x80<<8) /**< Flag indicating that the data item is in
error */
/**
* @}
* @}
* @addtogroup type-data
* @{
*/
/**
* @brief A structure type representing a CMPI data item.
*
* CMPI data items have type, state and value; they are used by MIs when
* transferring data to the MB.
*/
typedef struct _CMPIData {
/**
* @brief Type of the data item.
*
* Undefined, if the data item is in error as per its state.
*/
CMPIType type;
/**
* @brief State of the data item.
*/
CMPIValueState state;
/**
* @brief Value of the data item.
*
* Undefined, if the data item is NULL or in error as per its state.
*/
CMPIValue value;
} CMPIData;
/**
* @}
* @addtogroup edt-selectexp
* @{
*/
/**
* @brief A function type for accessing data during query processing.
*
* A pointer to such a function is passed to
* CMPISelectExpFT.evaluateUsingAccessor().
*
* @param propertyName Name of the property the accessor function is asked to
* evaluate.
* @param parm A parameter that can be used for providing context data.
* @return A CMPIData structure containing the evaluation result for the
* property.
*/
typedef CMPIData CMPIAccessor(const char* propertyName, void* parm);
/**
* @}
* @addtogroup brokerext-thread
* @{
*/
/**
* @brief A function pointer type for a POSIX thread function.
*
* Such a function pointer is passed to CMPIBrokerExtFT.newThread().
*
* @param parm A pointer to arbitrary data, which was passed to
* CMPIBrokerExtFT.newThread().
* @return The return value of the thread function. This value can be retrieved
* by the caller of CMPIBrokerExtFT.joinThread().
*
* For more details on such functions, see the ``pthread_create()``
* function defined in @ref ref-ieee-1003-1 "IEEE 1003.1".
*/
typedef CMPI_THREAD_RETURN (CMPI_THREAD_CDECL *CMPIThreadFunc)(void* parm);
/**
* @brief A function pointer type for a function that is called once in a POSIX
* thread.
*
* Such a function pointer is passed to CMPIBrokerExtFT.threadOnce().
*
* @return None.
*
* For more details on such functions, see the ``pthread_once()``
* function defined in @ref ref-ieee-1003-1 "IEEE 1003.1".
*/
typedef void (*CMPIThreadOnceFunc)(void);
/**
* @brief A function pointer type for a POSIX thread key cleanup function.
*
* Such a function pointer is passed to CMPIBrokerExtFT.createThreadKey().
*
* @param key A pointer to the previous key value before cleanup.
* @return None.
*
* For more details on such functions, see the ``pthread_key_create()``
* function defined in @ref ref-ieee-1003-1 "IEEE 1003.1".
*/
typedef void (*CMPIThreadKeyCleanupFunc)(void* key);
/**
* @}
* @addtogroup type-msg-file-handle
* @{
*/
/**
* @brief An opaque type representing a handle to an open message file.
*/
typedef void* CMPIMsgFileHandle;
/**
* @}
* @addtogroup type-gc-stat
* @{
*/
/**
* @brief An opaque type that is used by the MB for use with the
* CMPIBrokerMemFT.mark() and CMPIBrokerMemFT.release() functions.
*/
typedef void CMPIGcStat;
/**
* @}
* @addtogroup type-flags
* @{
*/
/**
* @brief A bitmask type that represents options specified by the WBEM client.
*
* The @ref CMPIFlags type is used to inform MI functions about options
* specified by the WBEM client and passed on to the MI for certain requests.
* Normally, MIs will ignore these flags; however, these flags can be useful
* when MB services are invoked, or an external MB is contacted.
*
* @ref CMPIFlags are not passed to MIs directly. MIs can use CMPIContext
* services to gain access under the entry name @ref CMPIInvocationFlags.
*
* These flags may not be supported by all WBEM protocols.
*
* If a particular flag is not defined for the operation that is invoked, it
* shall have a value of 0 (false).
*
* See @ref def-cmpiflags-symbols "Test masks for CMPIFlags" for a definition
* of test masks for @ref CMPIFlags.
*/
typedef unsigned int CMPIFlags;
/**
* @anchor def-cmpiflags-symbols
* @name Test masks for CMPIFlags
* @{
*
* These test masks are used on @ref CMPIFlags.
*
* For considerations on the use of @ref CMPI_FLAG_LocalOnly and
* @ref CMPI_FLAG_DeepInheritance, see
* Subclause 4.4 of the @ref ref-cmpi-standard "CMPI Standard".
*/
#define CMPI_FLAG_LocalOnly 1 ///< LocalOnly flag
#define CMPI_FLAG_DeepInheritance 2 ///< DeepInheritance flag
#define CMPI_FLAG_IncludeQualifiers 4 ///< IncludeQualifiers flag
#define CMPI_FLAG_IncludeClassOrigin 8 ///< IncludeClassOrigin flag
/**
* @}
* @}
* @addtogroup type-version
* @{
*/
/**
* @brief A type for CMPI version fields (mainly in function tables).
*
* The values of entities of this type are numeric CMPI version numbers
* (see @ref sym-version-nnn).
*/
typedef int CMPIVersion;
/**
* @}
* @addtogroup def-context-fieldnames
* @{
*
* The fields in a CMPIContext object are set and accessed
* by name using the the @ref CMPIContextFT::addEntry "addEntry()" and
* @ref CMPIContextFT::getEntry "getEntry()" functions.
*
* The symbols defined in this module are the ASCII strings representing the
* names of these fields.
*
* The description of each symbol indicates the C type that is to be used for
* the corresponding field (e.g. for the `type` argument of
* @ref CMPIContextFT::addEntry "addEntry()")
*/
/**
* @brief Name of the target namespace for the invoked operation.
*
* Type: @ref CMPI_string
*/
#define CMPIInitNameSpace "CMPIInitNameSpace"
/**
* @brief Invocation flags for the invoked operation; see @ref CMPIFlags.
*
* Type: @ref CMPI_uint32
*/
#define CMPIInvocationFlags "CMPIInvocationFlags"
/**
* @brief Authenticated ID of the user requesting the invoked operation.
*
* Type: @ref CMPI_string
*/
#define CMPIPrincipal "CMPIPrincipal"
/**
* @brief The role assumed by the current authenticated user.
*
* If the role is not available, the value of this entry shall be an empty
* string.
*
* Type: @ref CMPI_string
*/
#define CMPIRole "CMPIRole"
/**
* @brief The preferred language(s) to be used by the MI.
*
* The preferred language(s) to be used by the MI for any language-specific
* data in any results from MI functions, in the format of the
* `Accept-Language` header field defined in @ref ref-ietf-rfc-2616 "RFC2616"
* (a set of language tags, each with an optional quality value).
*
* If this information is not available, the value of this entry shall be an
* empty string with the default meaning described in
* @ref ref-ietf-rfc-2616 "RFC2616".
*
* Type: @ref CMPI_string
*/
#define CMPIAcceptLanguage "CMPIAcceptLanguage"
/**
* @brief The language(s) used by the MB.
*
* The language(s) used by the MB for any language-specific data passed to MI
* functions, in the format of the `Content-Language` header field defined in
* @ref ref-ietf-rfc-2616 "RFC2616" (a set of language tags).
*
* If this information is not available, the value of this entry shall be an
* empty string with the default meaning described in
* @ref ref-ietf-rfc-2616 "RFC2616".
*
* Type: @ref CMPI_string
*/
#define CMPIContentLanguage "CMPIContentLanguage"
/**
* @}
* @addtogroup type-rc
* @{
*/
/**
* @brief An enumeration type that defines CMPI return code values.
*
* CMPI return code values are used mainly for @ref CMPIStatus.rc, and in rare
* cases directly in MB functions.
*
* The enumerators can be categorized into these groups:
*
* @li `CMPI_RC_OK` to `CMPI_RC_ERR_QUERY_FEATURE_NOT_SUPPORTED`:@n
* Return codes matching CIM status codes. They are sometimes used for
* CMPI-specific purposes as well.
* @li `CMPI_RC_DO_NOT_UNLOAD` to `CMPI_RC_NEVER_UNLOAD`:@n
* Return codes used only by the MI `cleanup()` functions (e.g.
CMPIInstanceMIFT.cleanup()).
* @li `CMPI_RC_ERR_INVALID_HANDLE` to `CMPI_RC_ERR_NOT_IN_CODEPAGE`:@n
* Return codes for other errors detected by CMPI.
* @li `CMPI_RC_ERROR_SYSTEM` to `CMPI_RC_ERROR`:@n
* Return codes for errors returned by the underlying operating system.
*
* The descriptions of the enumerators in this module are meant to provide for
* a general understanding; their exact meaning is described in the MB or MI
* functions using them.
*/
typedef enum _CMPIrc {
/*
* Return codes matching CIM status codes
*/
/** Success */
CMPI_RC_OK = 0,
/** Unspecific error occurred */
CMPI_RC_ERR_FAILED = 1,
/** Not authorized */
CMPI_RC_ERR_ACCESS_DENIED = 2,
/** Invalid namespace */
CMPI_RC_ERR_INVALID_NAMESPACE = 3,
/** Invalid parameter */
CMPI_RC_ERR_INVALID_PARAMETER = 4,
/** Invalid class */
CMPI_RC_ERR_INVALID_CLASS = 5,
/** Item (class, instance, message file, etc.) not found */
CMPI_RC_ERR_NOT_FOUND = 6,
/** Operation not supported */
CMPI_RC_ERR_NOT_SUPPORTED = 7,
/** Class has subclasses */
CMPI_RC_ERR_CLASS_HAS_CHILDREN = 8,
/** Class has instances */
CMPI_RC_ERR_CLASS_HAS_INSTANCES = 9,
/** Invalid superclass */
CMPI_RC_ERR_INVALID_SUPERCLASS = 10,
/** Object already exists */
CMPI_RC_ERR_ALREADY_EXISTS = 11,
/** Property not found (e.g. not defined in the class) */
CMPI_RC_ERR_NO_SUCH_PROPERTY = 12,
/** Type mismatch */
CMPI_RC_ERR_TYPE_MISMATCH = 13,
/** Query language not supported */
CMPI_RC_ERR_QUERY_LANGUAGE_NOT_SUPPORTED = 14,
/** Invalid query */
CMPI_RC_ERR_INVALID_QUERY = 15,
/** Method not available (e.g. not supported / implemented) */
CMPI_RC_ERR_METHOD_NOT_AVAILABLE = 16,
/** Method not found (e.g. not defined in the class) */
CMPI_RC_ERR_METHOD_NOT_FOUND = 17,
/** No more elements */
CMPI_RC_NO_MORE_ELEMENTS = 18,
/** Server limits exceeded */
CMPI_RC_ERR_SERVER_LIMITS_EXCEEDED = 27,
/** Query feature not supported */
CMPI_RC_ERR_QUERY_FEATURE_NOT_SUPPORTED = 29,
/*
* Return codes used only by the MI cleanup() functions
*/
/** Operation successful - Do not unload the MI now */
CMPI_RC_DO_NOT_UNLOAD = 50,
/** Operation successful - Never unload the MI */
CMPI_RC_NEVER_UNLOAD = 51,
/*
* Return codes for other errors detected by CMPI
*/
/** Invalid handle to CMPI data */
CMPI_RC_ERR_INVALID_HANDLE = 60,
/** Invalid data type */
CMPI_RC_ERR_INVALID_DATA_TYPE = 61,
/** Characters are not representable in the specified codepage */
CMPI_RC_ERR_NOT_IN_CODEPAGE = 62,
/*
* Return codes for errors returned by the underlying operating system
*/
/** Not currently used */
CMPI_RC_ERROR_SYSTEM = 100,
/** Not currently used */
CMPI_RC_ERROR = 200
} CMPIrc;
/**
* @}
* @addtogroup type-status
* @{
*/
/**
* @brief A structure that indicates success or failure of MB and MI functions.
*
* It is used either as a function return value, or as an output parameter.
*/
typedef struct _CMPIStatus {
/**
* @brief A return code.
*
* @see @ref CMPIrc.
*/
CMPIrc rc;
/**
* @brief An error message.
*
* Points to a CMPIString object representing an error message, or is
* NULL if no error message is available.
*/
CMPIString* msg;
} CMPIStatus;
/**
* @}
* @addtogroup mb-capabilities
* @{
*
* These symbols define test masks for MB capabilities, for use on
* CMPIBrokerFT.brokerCapabilities.
*
* If a bit in the value of CMPIBrokerFT.brokerCapabilities is set to 1,
* the corresponding capability is available; otherwise, it is not available.
*
* For historical reasons, the test mask values have the bits for any dependent