13(2005-06-09) 3(2005-06-09)
2
3
4
6 CMCIClientFT.enumInstances() - Enumerate instances of a class
7
9 #include <cmci.h>
10
11 CMPIEnumeration*
12 CMCIClientFT.enumInstances(CMCIClient*cl,
13 CMPIObjectPath*op,
14 CMPIFlagsflags,
15 char**properties,
16 CMPIStatus*rc);
17
18
20 Enumerate Instances of the class (and subclasses) defined by op. The
21 instance structure and inheritance scope can be controled using the
22 flags argument.
23
24 Arguments are the client object pointer cl, an ObjectPath object
25 pointer op with the reference that contains namespace and classname
26 components, flags that affect the content of the returned class
27 instance structures, a properties array, and rc which returns the oper‐
28 ation status (suppressed when NULL).
29
30 The flags argument is a bit mask that can contains the following flags
31 - CMPI_FLAG_LocalOnly, CMPI_FLAG_DeepInheritance, CMPI_FLAG_Include‐
32 Qualifiers and CMPI_FLAG_IncludeClassOrigin.
33
35 When successful the CMCIClientFT.enumInstances() function returns a
36 pointer to a CMPIEnumeration object that contains the class instances
37 found for the class and sets a successful operation status code in rc.
38 When unsuccessful it returns a NULL pointer and sets the operation sta‐
39 tus error code and corresponding error string in rc.
40
43 CMCIClient *cc;
44 CMPIObjectPath * objectpath;
45 CMPIInstance * instance;
46 CMPIEnumeration * enumeration;
47 CMPIStatus status;
48
49 /* Setup a conncetion to the CIMOM */
50 cc = cmciConnect("localhost", NULL, NULL, NULL, NULL, NULL);
51
52 objectpath = newCMPIObjectPath("root/cimv2", NULL, NULL);
53 enumeration = cc->ft->enumInstances(cc, objectpath, 0, NULL, &sta‐
54 tus);
55
56 if (!status.rc) { fprintf(stderr, "operation error code %d
57 description %s0, status.rc, status.msg->hdl);
58 abort();
59 }
60
63 Common Manageability Programming Interface (CMPI) - OpenGroup,
64 CMCIClient(3), CMPIEnumeration(3), CMPIObjectPath(3), CMPIFlags(3),
65 CMPIStatus(3)
66
67
68
69SFCBroker Client Library sfcc 3(2005-06-09)