-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcmpift.h
11655 lines (10246 loc) · 514 KB
/
cmpift.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 cmpift.h
* @brief Main header file for CMPI; Defines CMPI function tables and object
* structures.
*
* MIs and MBs should include this main header file.
*
* 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 _CMPIFT_H_
#define _CMPIFT_H_
#include <cmpios.h>
#include <cmpidt.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @addtogroup mi-factory
* @{
* For details on how MI factory functions are used by an MB, including
* precedence in the presence of both generic and MI-specific factory
* functions, and extensibility,
* see Subclause 6.1 of the @ref ref-cmpi-standard "CMPI Standard".
*/
/**
@defgroup mi-factory-specific MI-specific MI factory function
<b>@ref CMPI_EXTERN_C CMPI\<mitype\>MI* \<miname\>_Create_\<mitype\>MI(
const @ref CMPIBroker* mb, const @ref CMPIContext* ctx,
@ref CMPIStatus* rc);</b>
@ref mi-factory-specific "\<miname\>_Create_\<mitype\>MI()" is an
MI-specific factory function for an MI and is responsible for intializing the
MI of type \<mitype\> with the predefined name \<miname\>.
\<mitype\> can be one of:
@li Instance
@li Association
@li Property (**Deprecated**)
@li Method
@li Indication
While this function executes, the MB will not call any other MI functions for
this MI. This function will be called once for a specific MI, even if that MI
services more than one namespace.
This function shall be declared with the @ref CMPI_EXTERN_C modifier or
an equivalent modifier; the name of this function shall be exported from the
MI load library.
@param mb Points to a CMPIBroker structure.
This structure can be used throughout the life of this MI function group
to invoke MB services.
@param ctx Points to a CMPIContext object containing the context data
for the invocation.
This CMPIContext object contains the @ref CMPIInitNameSpace entry
indicating the namespace for which this MI is to be initialized.
If this MI services more than one namespace, the @ref CMPIInitNameSpace
entry indicates one of those namespaces.
@param [out] rc Points to a CMPIStatus structure that upon return shall
have been updated with the function return status.
@return @parblock
If successful, a pointer to a valid CMPI\<mitype\>MI structure
(CMPIInstanceMI, CMPIAssociationMI, CMPIPropertyMI, CMPIMethodMI,
CMPIIndicationMI) for the MI identified by \<mitype\> and \<miname\>
shall be returned, and the MB will consider this MI to be initialized
(that is, functioning).
If not successful, NULL shall be returned, and the MI identified by
\<mitype\> and \<miname\> is considered uninitialized (that is,
malfunctioning) and will not be used by the MB. Specifically, the
cleanup function for this MI (e.g. CMPIInstanceMIFT.cleanup()) will not be
invoked by the MB in that case.
@endparblock
@errors
The following @ref CMPIrc codes shall be used by the MI in the
function return status:
@li `CMPI_RC_OK` - Function successful.
@li `CMPI_RC_ERR_NOT_SUPPORTED` - MI type not supported for this MI name.
@li `CMPI_RC_ERR_ACCESS_DENIED` - Not authorized.
@li `CMPI_RC_ERR_FAILED` - Other error occurred.
CMPI 2.1 documented these return codes for the first time. For backwards
compatibility, MBs conforming to CMPI 2.1 that use MIs conforming to prior
CMPI releases shall tolerate other uses of these return codes as well as
additional return codes.
@deprecated The \<miname\>_Create_PropertyMI() function is deprecated since
CMPI 2.1, in accord with the deprecation of property client operations in
DMTF specifications.
*/
/**
@defgroup mi-factory-generic Generic MI factory function
<b>@ref CMPI_EXTERN_C CMPI\<mitype\>MI* _Generic_Create_\<mitype\>MI(
const @ref CMPIBroker* mb, const @ref CMPIContext* ctx, const char* miName,
@ref CMPIStatus* rc);</b>
@ref mi-factory-generic "_Generic_Create_\<mitype\>MI()" is a generic factory
function for an MI and is responsible for intializing the MI of type
\<mitype>\ with the name passed in @p miName.
\<mitype\> can be one of:
@li Instance
@li Association
@li Property (**Deprecated**)
@li Method
@li Indication
While this function executes, the MB will not call any other MI functions for
this MI. This function will be called once for a specific MI, even if that MI
services more than one namespace.
This function shall be declared with the @ref CMPI_EXTERN_C modifier or
an equivalent modifier; the name of this function shall be exported from the
MI load library.
@param mb Points to a CMPIBroker structure.
This structure can be used throughout the life of this MI function group
to invoke MB services.
@param ctx Points to a CMPIContext object containing the context data
for the invocation.
This CMPIContext object contains the @ref CMPIInitNameSpace entry
indicating the namespace for which this MI is to be initialized.
If this MI services more than one namespace, the @ref CMPIInitNameSpace
entry indicates one of those namespaces.
@param miName Name of the MI to be initialized.
@param [out] rc Points to a CMPIStatus structure that upon return shall
have been updated with the function return status.
@return @parblock
If successful, a pointer to a valid CMPI\<mitype\>MI structure
(CMPIInstanceMI, CMPIAssociationMI, CMPIPropertyMI, CMPIMethodMI,
CMPIIndicationMI) for the MI identified by \<mitype\> and @p miName shall
be returned, and the MB will consider this MI to be initialized (that is,
functioning).
If not successful, NULL shall be returned, and the MI identified by
\<mitype\> and @p miName is considered uninitialized (that is,
malfunctioning) and will not be used by the MB. Specifically, the
cleanup function for this MI (e.g. CMPIInstanceMIFT.cleanup()) will not be
invoked by the MB in that case.
@endparblock
@errors
The following @ref CMPIrc codes shall be used by the MI in the
function return status:
@li `CMPI_RC_OK` - Function successful.
@li `CMPI_RC_ERR_NOT_FOUND` - MI name not found.
@li `CMPI_RC_ERR_NOT_SUPPORTED` - MI type not supported for this MI name.
@li `CMPI_RC_ERR_ACCESS_DENIED` - Not authorized.
@li `CMPI_RC_ERR_FAILED` - Other error occurred.
CMPI 2.1 documented these return codes for the first time. For backwards
compatibility, MBs conforming to CMPI 2.1 that use MIs conforming to prior
CMPI releases shall tolerate other uses of these return codes as well as
additional return codes.
@deprecated The _Generic_Create_PropertyMI() function is deprecated since
CMPI 2.1, in accord with the deprecation of property client operations in
DMTF specifications.
*/
/**
* @}
* @addtogroup mb-tables
* @{
*/
/**
* @brief CMPIBroker structure.
*
* The CMPIBroker structure is the anchor object of the MB (Management Broker,
* also known as CIMOM). A pointer to this structure is passed to the MI in its
* factory function (see @ref mi-factory "MI Factory Functions") and needs to
* be passed to many MB services.
*/
typedef struct _CMPIBroker {
/**
* @brief Opaque pointer to MB-specific implementation data for the MB.
*/
const void* hdl;
/**
* @brief Pointer to the function table for some MB services (thread
* registration, indications services, and client services).
*/
const CMPIBrokerFT* bft;
/**
* @brief Pointer to the function table for some MB services (factory and
* miscellaneous services).
*/
const CMPIBrokerEncFT* eft;
/**
* @brief Pointer to the function table for MB operating system
* encapsulation services.
*/
const CMPIBrokerExtFT* xft;
#ifdef CMPI_VER_200
/**
* @brief Pointer to the function table for MB memory enhancement services.
*
* @capmemory If that capability is not available, this pointer is NULL.
* @added200
*/
const CMPIBrokerMemFT* mft;
#endif /*CMPI_VER_200*/
} CMPIBroker;
/**
* @brief Function table for some MB services (thread registration, indications
* services, and client services).
*
* This function table is referenced by the CMPIBroker structure, and provides
* @ref broker-thread-reg "Thread Registration Services",
* @ref broker-indications "Indications Services", and
* @ref broker-client "Client Services (\"up-calls\")".
*
* For functions that are not supported, their function pointers in this
* function table shall not be NULL, but shall point to a function that can be
* called and then indicate back to the caller that it is not supported, as
* specified in the description of the function.
*/
typedef struct _CMPIBrokerFT {
/**
* @brief Bitmask representing the MB capabilities supported by this MB.
*
* For a definition of the test masks for this field, see
* @ref mb-capabilities "MB Capabilities".
*/
unsigned int brokerCapabilities;
/**
* @brief CMPI version supported by this MB for this function table.
*
* Any earlier CMPI versions are implicitly also supported.
* See @ref sym-version-nnn "CMPIVersion\<NNN\>" for valid CMPI
* version numbers.
*
* Note: This is not the version of the MB.
* @convfunction CBBrokerVersion()
*/
CMPIVersion brokerVersion;
/**
* @brief Informal MB-specific name for this MB.
*
* @convfunction CBBrokerName()
*/
const char* brokerName;
/**
* @addtogroup broker-thread-reg
* @{
*/
/**
@brief Prepare the MB to accept a new thread that will be using MB
functions.
CMPIBrokerFT.prepareAttachThread() prepares the MB to accept a new thread
that will be using MB functions. This function is expected to be called in
the existing thread.
@param mb Points to a CMPIBroker structure.
@param ctx
@parblock
Points to the CMPIContext object that was used to invoke the MI
function that calls this MB function.
The opaque part of the CMPIContext object can be used by the MB to
carry the MB internal security context. Such MBs can maintain the
security context for the new thread in the returned copy of the
CMPIContext object.
@endparblock
@return @parblock
If successful, a pointer to a CMPIContext object that is to be used by
the thread to be attached will be returned. This is used for
subsequent CMPIBrokerFT.attachThread() and CMPIBrokerFT.detachThread()
invocations.
If not successful, NULL will be returned.
@endparblock
@errors
For historical reasons, no additional error information is passed back.
@convfunction CBPrepareAttachThread()
*/
CMPIContext* (*prepareAttachThread) (const CMPIBroker* mb,
const CMPIContext* ctx);
/**
@brief Inform the MB that the current thread will begin using MB functions.
CMPIBrokerFT.attachThread() informs the MB that the current (newly created)
thread with the specified context will begin using MB functions.
@param mb Points to a CMPIBroker structure.
@param ctx
@parblock
Points to the CMPIContext object that was returned by a prior call to
CMPIBrokerFT.prepareAttachThread().
The opaque part of the CMPIContext object can be used by the MB to
carry the MB internal security context. Such MBs can set up the
security context for the current thread in this function.
@endparblock
@return CMPIStatus structure containing the function return status.
@errors
The function return status will indicate one of the following @ref CMPIrc
codes:
@li `CMPI_RC_OK` - Function successful.
@li `CMPI_RC_ERR_INVALID_HANDLE` - The @p mb or @p ctx handle is invalid.
@convfunction CBAttachThread()
*/
CMPIStatus (*attachThread) (const CMPIBroker* mb, const CMPIContext* ctx);
/**
@brief Inform the MB that the current thread will no longer use MB
functions.
CMPIBrokerFT.detachThread() informs the MB that the current thread will no
longer be using MB functions.
@param mb Points to a CMPIBroker structure.
@param ctx
@parblock
Points to the CMPIContext object that was returned by the prior call to
CMPIBrokerFT.prepareAttachThread().
The opaque part of the CMPIContext object can be used by the MB to
carry the MB internal security context. Such MBs can set up the
security context for the current thread in this function.
@endparblock
@return CMPIStatus structure containing the function return status.
@errors
The function return status will indicate one of the following @ref CMPIrc
codes:
@li `CMPI_RC_OK` - Function successful.
@li `CMPI_RC_ERR_INVALID_HANDLE` - The @p mb or @p ctx handle is invalid.
@convfunction CBDetachThread()
*/
CMPIStatus (*detachThread) (const CMPIBroker* mb, const CMPIContext* ctx);
/**
* @}
* @addtogroup broker-indications
* @{
*/
/**
@brief Request delivery of an indication.
CMPIBrokerFT.deliverIndication() requests the delivery of an indication.
The MB will locate pertinent subscribers and send the indication to each
of them.
This function may be called by an MI regardless of whether or not there
are any active indication filters or indication filter collections
that cover the indication to be delivered. If there are no such filters
or filter collections, this will not cause the function to fail. For
the concept of coverage of indications by an indication filter or
indication filter collection, see @ref ref-dmtf-dsp1054 "DSP1054".
This function may be called by an MI regardless of whether or not
the MB is ready for processing the delivery of indications, as
communicated to the MI via CMPIIndicationMIFT.enableIndications() and
CMPIIndicationMIFT.disableIndications(). If the MB is not
ready for processing the delivery of indications, this will not
cause the function to fail. The MB implementation may choose to
drop the indication in this case, or to queue the indication
for later delivery.
This function may be called by any MI function, and by any threads
created by MIs that are registered with the MB (see
@ref broker-thread-reg "Thread Registration Services").
@param mb Points to a CMPIBroker structure.
@param ctx Points to the CMPIContext object that was used to invoke the MI
function that calls this MB function, or that was used to register the
thread that calls this MB function.
@param ns Name of the *origin namespace* of the indication (see
@ref ref-dmtf-dsp1054 "DSP1054" for a definition).
@param ind Points to a CMPIInstance object containing the indication
instance. An instance path specified in that CMPIInstance object is
meaningless for indication instances and will be ignored by the MB.
@return CMPIStatus structure containing the function return status.
@errors
The function return status will indicate one of the following @ref CMPIrc
codes:
@li `CMPI_RC_OK` - Function successful.@n
Note: If the MB is not ready for processing the delivery of
indications, it may drop the indication and still return success.
@li `CMPI_RC_ERR_NOT_SUPPORTED` - Function is not supported by the MB.
@li `CMPI_RC_ERR_INVALID_HANDLE` - The @p mb, @p ctx, or @p ind handle is
invalid.
@li `CMPI_RC_ERR_INVALID_PARAMETER` - The namespace specified by
@p ns is invalid, or the indication instance specified by
@p ind is invalid.
@convfunction CBDeliverIndication()
@capindications
@changed210 In CMPI 2.1, added the return code
`CMPI_RC_ERR_INVALID_PARAMETER`.
*/
CMPIStatus (*deliverIndication) (const CMPIBroker* mb,
const CMPIContext* ctx, const char* ns, const CMPIInstance* ind);
/**
* @}
* @addtogroup broker-client
* @{
*/
/**
@brief Enumerate the instance paths of the instances of a given class (and
its subclasses).
CMPIBrokerFT.enumerateInstanceNames() enumerates the instance paths of the
instances of a given class (and its subclasses).
The target MIs are identified by the MB based on @p classPath.
@param mb Points to a CMPIBroker structure.
@param ctx Points to a CMPIContext object that specifies the same
principal (@ref CMPIPrincipal entry), role (@ref CMPIRole entry),
accept language (@ref CMPIAcceptLanguage entry), and content language
(@ref CMPIContentLanguage entry) as the CMPIContext object that was
used to invoke the MI function that calls this MB function.
Any invocation flags (@ref CMPIInvocationFlags entry) will be ignored
by this function.
@param classPath Points to a CMPIObjectPath object that references the
given class and that shall contain the namespace and class name
components. The hostname and key components, if present, will be
ignored by the MB.
@param [out] rc If not NULL, points to a CMPIStatus structure that upon
return will have been updated with the function return status.
@return @parblock
If successful, a pointer to a new CMPIEnumeration object will be
returned, containing CMPIObjectPath objects that represent the
enumerated instance paths.
The new object will be automatically released by the MB, as described
in Subclause 4.1.7 of the @ref ref-cmpi-standard "CMPI Standard".
There is no function to explicitly release the new object.
If not successful, NULL will be returned.
@endparblock
@errors
The function return status will indicate one of the following @ref CMPIrc
codes:
@li `CMPI_RC_OK` - Function successful.
@li `CMPI_RC_ERR_NOT_SUPPORTED` - Function is not supported by this MI.
@li `CMPI_RC_ERR_ACCESS_DENIED` - Not authorized.
@li `CMPI_RC_ERR_INVALID_HANDLE` - The @p ctx or @p classPath handle is
invalid.
@li `CMPI_RC_ERR_INVALID_NAMESPACE` - The namespace specified in
@p classPath is invalid or does not exist.
@li `CMPI_RC_ERR_INVALID_CLASS` - The class specified in
@p classPath is invalid or does not exist.
@li `CMPI_RC_ERR_NOT_FOUND` - No instances found. (**Deprecated**)
@li `CMPI_RC_ERR_SERVER_LIMITS_EXCEEDED` - Limits exceeded.
@li `CMPI_RC_ERR_FAILED` - Other error occurred.
Extended error handling is not supported by this MB function; thus, any
CMPIError objects returned by the targeted MI cannot be made available to
the calling MI.
@convfunction CBEnumInstanceNames()
@capread
@changed210 In CMPI 2.1, added the return codes
`CMPI_RC_ERR_INVALID_NAMESPACE` and `CMPI_RC_ERR_INVALID_CLASS`. It is
believed that MB implementations needed to use these return codes
already, so that their addition only fixes an omission in this
standard and does not create a compatibility issue for MIs that
conform to CMPI 2.0.
@deprecated The return code `CMPI_RC_ERR_NOT_FOUND` of this function
is deprecated since CMPI 2.1. If no instances exist, the MB should
instead return success with an empty result set.
The MI shall treat this return code as a successful return of an
empty result set.
*/
CMPIEnumeration* (*enumerateInstanceNames) (const CMPIBroker* mb,
const CMPIContext* ctx, const CMPIObjectPath* classPath,
CMPIStatus* rc);
/**
@brief Get an existing instance.
CMPIBrokerFT.getInstance() gets an existing instance.
The target MI is identified by the MB based on @p instPath.
@param mb Points to a CMPIBroker structure.
@param ctx Points to a CMPIContext object that specifies the same
principal (@ref CMPIPrincipal entry), role (@ref CMPIRole entry),
accept language (@ref CMPIAcceptLanguage entry), and content language
(@ref CMPIContentLanguage entry) as the CMPIContext object that was
used to invoke the MI function that calls this MB function.
The MI may specify invocation flags (@ref CMPIInvocationFlags entry)
as needed.
@param instPath Points to a CMPIObjectPath object that references the
instance to be retrieved and that shall contain the namespace, class
name, and key components. The hostname component, if present, will be
ignored by the MB.
@param properties If not NULL, is an array of zero or more pointers to
strings, each specifying a property name. The end of the array is
identified by a NULL pointer. The returned instance will not include
elements for any properties missing from this list. If @p properties
is NULL, this indicates that all properties will be included
in the returned instance.
@param [out] rc If not NULL, points to a CMPIStatus structure that upon
return will have been updated with the function return status.
@return @parblock
If successful, a pointer to a new CMPIInstance object containing the
retrieved instance will be returned.
The new object will be automatically released by the MB, as described
in Subclause 4.1.7 of the @ref ref-cmpi-standard "CMPI Standard".
There is no function to explicitly release the new object.
Specifically, the MI shall not use CMPIBrokerMemFT.freeInstance() on
the new object.
If not successful, NULL will be returned.
@endparblock
@errors
The function return status will indicate one of the following @ref CMPIrc
codes:
@li `CMPI_RC_OK` - Function successful.
@li `CMPI_RC_ERR_NOT_SUPPORTED` - Function is not supported by this MI.
@li `CMPI_RC_ERR_ACCESS_DENIED` - Not authorized.
@li `CMPI_RC_ERR_INVALID_HANDLE` - The @p mb, @p ctx or @p instPath handle
is invalid.
@li `CMPI_RC_ERR_INVALID_NAMESPACE` - The namespace specified in
@p instPath is invalid or does not exist.
@li `CMPI_RC_ERR_INVALID_CLASS` - The class specified in
@p instPath is invalid or does not exist.
@li `CMPI_RC_ERR_INVALID_PARAMETER` - The property list specified
in @p properties is invalid.
@li `CMPI_RC_ERR_NOT_FOUND` - Instance not found.
@li `CMPI_RC_ERR_SERVER_LIMITS_EXCEEDED` - Limits exceeded.
@li `CMPI_RC_ERR_FAILED` - Other error occurred.
Extended error handling is not supported by this MB function; thus, any
CMPIError objects returned by the targeted MI cannot be made available to
the calling MI.
@convfunction CBGetInstance()
@capread
@changed210 In CMPI 2.1, added the return codes
`CMPI_RC_ERR_INVALID_NAMESPACE`, `CMPI_RC_ERR_INVALID_CLASS`, and
`CMPI_RC_ERR_INVALID_PARAMETER`. It is believed that MB
implementations needed to use these return codes already, so that
their addition only fixes an omission in this standard and does not
create a compatibility issue for MIs that conform to CMPI 2.0.
*/
CMPIInstance* (*getInstance) (const CMPIBroker* mb, const CMPIContext* ctx,
const CMPIObjectPath* instPath, const char** properties,
CMPIStatus* rc);
/**
@brief Create an instance of a given class.
CMPIBrokerFT.createInstance() creates an instance of a given class.
The target MI is identified by the MB based on @p classPath.
@param mb Points to a CMPIBroker structure.
@param ctx Points to a CMPIContext object that specifies the same
principal (@ref CMPIPrincipal entry), role (@ref CMPIRole entry),
accept language (@ref CMPIAcceptLanguage entry), and content language
(@ref CMPIContentLanguage entry) as the CMPIContext object that was
used to invoke the MI function that calls this MB function.
Any invocation flags (@ref CMPIInvocationFlags entry) will be ignored
by this function.
@param classPath Points to a CMPIObjectPath object that references the
class of the instance to be created and that shall contain the
namespace and class name components. The hostname and key components,
if present, will be ignored by the MB.
@param newInst Points to a CMPIInstance object specifying property values
for the new instance. The object path component within this
CMPIInstance object has no meaning; it should not be provided by the
calling MIs. The MB will pass the definition of the new instance on to
the target MI, unchanged.
@param [out] rc If not NULL, points to a CMPIStatus structure that upon
return will have been updated with the function return status.
@return @parblock
If successful, a pointer to a new CMPIObjectPath object containing the
assigned instance path will be returned.
The new object will be released automatically by the MB, as described
in Subclause 4.1.7 of the @ref ref-cmpi-standard "CMPI Standard".
There is no function to explicitly release the new object.
Specifically, the MI shall not use CMPIBrokerMemFT.freeObjectPath()
on the new object.
If not successful, NULL will be returned.
@endparblock
@errors
The function return status will indicate one of the following @ref CMPIrc
codes:
@li `CMPI_RC_OK` - Function successful.
@li `CMPI_RC_ERR_NOT_SUPPORTED` - Function is not supported by this MI.
@li `CMPI_RC_ERR_ACCESS_DENIED` - Not authorized.
@li `CMPI_RC_ERR_INVALID_HANDLE` - The @p mb, @p ctx, @p classPath, or
@p newInst handle is invalid.
@li `CMPI_RC_ERR_INVALID_NAMESPACE` - The namespace specified in
@p classPath is invalid or does not exist.
@li `CMPI_RC_ERR_INVALID_CLASS` - The class specified in
@p classPath is invalid or does not exist.
@li `CMPI_RC_ERR_INVALID_PARAMETER` - The instance specified in
@p inst is invalid.
@li `CMPI_RC_ERR_ALREADY_EXISTS` - Instance already exists.
@li `CMPI_RC_ERR_FAILED` - Other error occurred.
Extended error handling is not supported by this MB function; thus, any
CMPIError objects returned by the targeted MI cannot be made available to
the calling MI.
@convfunction CBCreateInstance()
@capmanipulation
@changed210 In CMPI 2.1, added the return codes
`CMPI_RC_ERR_INVALID_NAMESPACE`, `CMPI_RC_ERR_INVALID_CLASS`, and
`CMPI_RC_ERR_INVALID_PARAMETER`. It is believed that MB
implementations needed to use these return codes already, so that
their addition only fixes an omission in this standard and does not
create a compatibility issue for MIs that conform to CMPI 2.0.
@deprecated The use of the key component within @p classPath
is deprecated since CMPI 2.1; this key component should not be provided
by the calling MIs. Initial key values can be supplied as properties
in @p newInst.
*/
CMPIObjectPath* (*createInstance) (const CMPIBroker* mb,
const CMPIContext* ctx, const CMPIObjectPath* classPath,
const CMPIInstance* newInst, CMPIStatus* rc);
/**
@brief Modify property values of an existing instance.
CMPIBrokerFT.modifyInstance() modifies property values of an existing
instance.
The target MI is identified by the MB based on @p instPath.
@param mb Points to a CMPIBroker structure.
@param ctx Points to a CMPIContext object that specifies the same
principal (@ref CMPIPrincipal entry), role (@ref CMPIRole entry),
accept language (@ref CMPIAcceptLanguage entry), and content language
(@ref CMPIContentLanguage entry) as the CMPIContext object that was
used to invoke the MI function that calls this MB function.
Any invocation flags (@ref CMPIInvocationFlags entry) will be ignored
by this function.
@param instPath Points to a CMPIObjectPath object that references
the instance to be modified and that shall contain the namespace,
class name, and key components. The hostname component, if present,
will be ignored by the MB.
@param modInst Points to a CMPIInstance object specifying new
values for the properties to be modified. The object path
component within this CMPIInstance object has no meaning; it
should not be provided by the calling MIs and should not
be used by the MB.
@param propertyList If not NULL, defines the list of property names to
be modified. If NULL, all properties will be modified. The end of
the list is signaled by a NULL character pointer.
@return CMPIStatus structure containing the function return status.
@errors
The function return status will indicate one of the following @ref CMPIrc
codes:
@li `CMPI_RC_OK` - Function successful.
@li `CMPI_RC_ERR_NOT_SUPPORTED` - Function is not supported by this MI.
@li `CMPI_RC_ERR_ACCESS_DENIED` - Not authorized.
@li `CMPI_RC_ERR_INVALID_HANDLE` - The @p mb, @p ctx, @p instPath, or
@p modInst handle is invalid.
@li `CMPI_RC_ERR_INVALID_NAMESPACE` - The namespace specified in
@p instPath is invalid or does not exist.
@li `CMPI_RC_ERR_INVALID_CLASS` - The class specified in
@p instPath is invalid or does not exist.
@li `CMPI_RC_ERR_INVALID_PARAMETER` - The instance specified in
@p modInst, or the properties specified in @p propertyList are invalid.
@li `CMPI_RC_ERR_NOT_FOUND` - Instance not found.
@li `CMPI_RC_ERR_FAILED` - Other error occurred.
Extended error handling is not supported by this MB function; thus, any
CMPIError objects returned by the targeted MI cannot be made available to
the calling MI.
@convfunction CBModifyInstance()
@capmanipulation
@changed210 In CMPI 2.1, added the return codes
`CMPI_RC_ERR_INVALID_NAMESPACE`, `CMPI_RC_ERR_INVALID_CLASS`, and
`CMPI_RC_ERR_INVALID_PARAMETER`. It is believed that MB
implementations needed to use these return codes already, so that
their addition only fixes an omission in this standard and does not
create a compatibility issue for MIs that conform to CMPI 2.0.
*/
CMPIStatus (*modifyInstance) (const CMPIBroker* mb, const CMPIContext* ctx,
const CMPIObjectPath* instPath, const CMPIInstance* modInst,
const char** properties);
/**
@brief Delete an existing instance.
CMPIBrokerFT.deleteInstance() deletes an existing instance.
The target MI is identified by the MB based on @p instPath.
@param mb Points to a CMPIBroker structure.
@param ctx Points to a CMPIContext object that specifies the same
principal (@ref CMPIPrincipal entry), role (@ref CMPIRole entry),
accept language (@ref CMPIAcceptLanguage entry), and content language
(@ref CMPIContentLanguage entry) as the CMPIContext object that was
used to invoke the MI function that calls this MB function.
Any invocation flags (@ref CMPIInvocationFlags entry) will be ignored
by this function.
@param instPath Points to a CMPIObjectPath object that references the
instance to be deleted and that shall contain the namespace,
class name, and key components. The hostname component, if present,
will be ignored by the MB.
@return CMPIStatus structure containing the function return status.
@errors
The function return status will indicate one of the following @ref CMPIrc
codes:
@li `CMPI_RC_OK` - Function successful.
@li `CMPI_RC_ERR_NOT_SUPPORTED` - Function is not supported by this MI.
@li `CMPI_RC_ERR_ACCESS_DENIED` - Not authorized.
@li `CMPI_RC_ERR_INVALID_HANDLE` - The @p ctx or @p instPath handle is
invalid.
@li `CMPI_RC_ERR_INVALID_NAMESPACE` - The namespace specified in
@p instPath is invalid or does not exist.
@li `CMPI_RC_ERR_INVALID_CLASS` - The class specified in
@p instPath is invalid or does not exist.
@li `CMPI_RC_ERR_NOT_FOUND` - Instance not found.
@li `CMPI_RC_ERR_FAILED` - Other error occurred.
Extended error handling is not supported by this MB function; thus, any
CMPIError objects returned by the targeted MI cannot be made available to
the calling MI.
@convfunction CBDeleteInstance()
@capmanipulation
@changed210 In CMPI 2.1, added the return codes
`CMPI_RC_ERR_INVALID_NAMESPACE` and `CMPI_RC_ERR_INVALID_CLASS`. It is
believed that MB implementations needed to use these return codes
already, so that their addition only fixes an omission in this
standard and does not create a compatibility issue for MIs that
conform to CMPI 2.0.
*/
CMPIStatus (*deleteInstance) (const CMPIBroker* mb, const CMPIContext* ctx,
const CMPIObjectPath* instPath);
/**
@brief Execute a query on a given class and return the query result.
CMPIBrokerFT.execQuery() executes a query on a given class and returns the
query result.
The target MI is identified by the MB based on @p classPath.
@param mb Points to a CMPIBroker structure.
@param ctx Points to a CMPIContext object that specifies the same
principal (@ref CMPIPrincipal entry), role (@ref CMPIRole entry),
accept language (@ref CMPIAcceptLanguage entry), and content language
(@ref CMPIContentLanguage entry) as the CMPIContext object that was
used to invoke the MI function that calls this MB function.
Any invocation flags (@ref CMPIInvocationFlags entry) will be ignored
by this function.
@param classPath Points to a CMPIObjectPath object that references
the given class to be queried and that shall contain the namespace
and class name components. The hostname and key components,
if present, will be ignored by the MB.
@param query Select expression.
@param lang Query language.
@param [out] rc If not NULL, points to a CMPIStatus structure that upon
return will have been updated with the function return status.
@return @parblock
If successful, a pointer to a new CMPIEnumeration object will be
returned, containing CMPIInstance objects that represent the query
result.
The new object will be automatically released by the MB, as described
in Subclause 4.1.7 of the @ref ref-cmpi-standard "CMPI Standard".
There is no function to explicitly release the new object.
If not successful, NULL will be returned.
@endparblock
@errors
The function return status will indicate one of the following @ref CMPIrc
codes:
@li `CMPI_RC_OK` - Function successful.
@li `CMPI_RC_ERR_NOT_SUPPORTED` - Function is not supported by this MI.
@li `CMPI_RC_ERR_ACCESS_DENIED` - Not authorized.
@li `CMPI_RC_ERR_INVALID_HANDLE` - The @p ctx or @p classPath handle is
invalid.
@li `CMPI_RC_ERR_INVALID_NAMESPACE` - The namespace specified in
@p classPath is invalid or does not exist.
@li `CMPI_RC_ERR_INVALID_CLASS` - The class specified in
@p classPath is invalid or does not exist.
@li `CMPI_RC_ERR_QUERY_LANGUAGE_NOT_SUPPORTED` - Query language not
supported.
@li `CMPI_RC_ERR_INVALID_QUERY` - Invalid query.
@li `CMPI_RC_ERR_SERVER_LIMITS_EXCEEDED` - Limits exceeded.
@li `CMPI_RC_ERR_FAILED` - Other error occurred.
Extended error handling is not supported by this MB function; thus, any
CMPIError objects returned by the targeted MI cannot be made available to
the calling MI.
@convfunction CBExecQuery()
@capqueryexec
@changed210 In CMPI 2.1, added the return codes
`CMPI_RC_ERR_INVALID_NAMESPACE` and `CMPI_RC_ERR_INVALID_CLASS`. It is
believed that MB implementations needed to use these return codes
already, so that their addition only fixes an omission in this
standard and does not create a compatibility issue for MIs that
conform to CMPI 2.0.
*/
CMPIEnumeration* (*execQuery) (const CMPIBroker* mb,
const CMPIContext* ctx, const CMPIObjectPath* classPath,
const char* query, const char* lang, CMPIStatus* rc);
/**
@brief Enumerate the instances of a given class (and its subclasses).
CMPIBrokerFT.enumerateInstances() enumerates the instances of a given
class (and its subclasses). The set of properties in the result instances
can be controlled via @p properties and via the CMPI_FLAG_LocalOnly and
CMPI_FLAG_DeepInheritance flags in the @ref CMPIInvocationFlags entry of
@p ctx.
The target MIs are identified by the MB based on @p classPath.
@param mb Points to a CMPIBroker structure.
@param ctx Points to a CMPIContext object that specifies the same
principal (@ref CMPIPrincipal entry), role (@ref CMPIRole entry),
accept language (@ref CMPIAcceptLanguage entry), and content language
(@ref CMPIContentLanguage entry) as the CMPIContext object that was
used to invoke the MI function that calls this MB function.
The MI may specify invocation flags (@ref CMPIInvocationFlags entry)
as needed.
@param classPath Points to a CMPIObjectPath object that references
the given class and that shall contain the namespace and class
name components. The hostname and key components, if present,
will be ignored by the MB.
@param properties If not NULL, is an array of zero or more pointers to
strings, each specifying a property name. The end of the array is
identified by a NULL pointer. Each returned instance will not include
elements for any properties missing from this list. If the properties
argument is NULL, this indicates that all properties will be included
in each returned instance.
@param [out] rc If not NULL, points to a CMPIStatus structure that upon
return will have been updated with the function return status.
@return @parblock
If successful, a pointer to a new CMPIEnumeration object will be
returned, containing CMPIInstance objects that represent the
enumerated instances.
The new object will be automatically released by the MB, as described
in Subclause 4.1.7 of the @ref ref-cmpi-standard "CMPI Standard".
There is no function to explicitly release the new object.
If not successful, NULL will be returned.
@endparblock
@errors
The function return status will indicate one of the following @ref CMPIrc
codes:
@li `CMPI_RC_OK` - Function successful.
@li `CMPI_RC_ERR_NOT_SUPPORTED` - Function is not supported by this MI.
@li `CMPI_RC_ERR_ACCESS_DENIED` - Not authorized.
@li `CMPI_RC_ERR_INVALID_HANDLE` - The @p ctx or @p classPath handle is
invalid.
@li `CMPI_RC_ERR_INVALID_NAMESPACE` - The namespace specified in
@p classPath is invalid or does not exist.
@li `CMPI_RC_ERR_INVALID_CLASS` - The class specified in
@p classPath is invalid or does not exist.
@li `CMPI_RC_ERR_INVALID_PARAMETER` - The property list specified in
@p properties is invalid.
@li `CMPI_RC_ERR_NOT_FOUND` - No instances found. (**Deprecated**)
@li `CMPI_RC_ERR_SERVER_LIMITS_EXCEEDED` - Limits exceeded.
@li `CMPI_RC_ERR_FAILED` - Other error occurred.
Extended error handling is not supported by this MB function; thus, any
CMPIError objects returned by the targeted MI cannot be made available to
the calling MI.
@convfunction CBEnumInstances()
@capread
@changed210 In CMPI 2.1, added the return codes
`CMPI_RC_ERR_INVALID_NAMESPACE`, `CMPI_RC_ERR_INVALID_CLASS`, and
`CMPI_RC_ERR_INVALID_PARAMETER`. It is believed that MB
implementations needed to use these return codes already, so that
their addition only fixes an omission in this standard and does not
create a compatibility issue for MIs that conform to CMPI 2.0.
@deprecated The return code `CMPI_RC_ERR_NOT_FOUND` of this function
is deprecated since CMPI 2.1. If no instances exist, the MB should
instead return success with an empty result set.
The MI shall treat this return code as a successful return of an
empty result set.
*/
CMPIEnumeration* (*enumerateInstances) (const CMPIBroker* mb,
const CMPIContext* ctx, const CMPIObjectPath* classPath,
const char** properties, CMPIStatus* rc);
/**
@brief Enumerate the instances associated with a given source instance.
CMPIBrokerFT.associators() enumerates the instances associated with a
given source instance.
The target MIs are identified by the MB based on @p instPath.
@param mb Points to a CMPIBroker structure.
@param ctx Points to a CMPIContext object that specifies the same
principal (@ref CMPIPrincipal entry), role (@ref CMPIRole entry),
accept language (@ref CMPIAcceptLanguage entry), and content language
(@ref CMPIContentLanguage entry) as the CMPIContext object that was
used to invoke the MI function that calls this MB function.
Any invocation flags (@ref CMPIInvocationFlags entry) will be ignored
by this function.
@param instPath Points to a CMPIObjectPath object that references
the given source instance that shall contain the namespace,
class name, and key components. The hostname component, if present,
will be ignored by the MB.
@param assocClass If not NULL, shall be a valid association class name.
It acts as a filter on the returned set of objects by mandating that
each returned object shall be associated to the source object via an
instance of this class or one of its subclasses.
@param resultClass If not NULL, shall be a valid class name.
It acts as a filter on the returned set of objects by mandating that
each returned object shall be either an instance of this class or one
of its subclasses.
@param role If not NULL, shall be a valid property name.
It acts as a filter on the returned set of objects by mandating
that each returned object shall be associated to the source object
via an association in which the source object plays the specified role
(i.e. the name of the property in the association class that refers
to the source object shall match the value of this parameter).
@param resultRole If not NULL, shall be a valid property name.
It acts as a filter on the returned set of objects by mandating
that each returned object shall be associated to the source object
via an association in which the returned object plays the specified
role (i.e. the name of the property in the association class that
refers to the returned object shall match the value of this parameter).
@param properties If not NULL, is an array of zero or more pointers to
strings, each specifying a property name. The end of the array is
identified by a NULL pointer. Each returned instance will not include
elements for any properties missing from this list. If @p properties
is NULL, this indicates that all properties will be included in each
returned instance.
@param [out] rc If not NULL, points to a CMPIStatus structure that upon
return will have been updated with the function return status.
@return @parblock
If successful, a pointer to a new CMPIEnumeration object will be
returned, containing CMPIInstance objects that represent the
enumerated instances.
The new object will be released automatically by the MB, as described
in Subclause 4.1.7 of the @ref ref-cmpi-standard "CMPI Standard".
There is no function to explicitly release the new object.
If not successful, NULL will be returned.
@endparblock
@errors
The function return status will indicate one of the following @ref CMPIrc
codes: