CMPI 2.1.0 API
|
Function table of CMPIInstance encapsulated data type object. More...
#include <cmpift.h>
Data Fields | |
CMPIVersion | ftVersion |
CMPI version supported by the MB for this function table. More... | |
CMPIStatus(* | release )(CMPIInstance *inst) |
Release a CMPIInstance object. More... | |
CMPIInstance *(* | clone )(const CMPIInstance *inst, CMPIStatus *rc) |
Create an independent copy of a CMPIInstance object. More... | |
CMPIData(* | getProperty )(const CMPIInstance *inst, const char *name, CMPIStatus *rc) |
Get a property in a CMPIInstance object by name. More... | |
CMPIData(* | getPropertyAt )(const CMPIInstance *inst, CMPICount index, CMPIString **name, CMPIStatus *rc) |
Get a property in a CMPIInstance object by index. More... | |
CMPICount(* | getPropertyCount )(const CMPIInstance *inst, CMPIStatus *rc) |
Get the number of properties in a CMPIInstance object. More... | |
CMPIStatus(* | setProperty )(const CMPIInstance *inst, const char *name, const CMPIValue *value, CMPIType type) |
Add or replace a property value in a CMPIInstance object by name. More... | |
CMPIObjectPath *(* | getObjectPath )(const CMPIInstance *inst, CMPIStatus *rc) |
Get the instance path component of a CMPIInstance object. More... | |
CMPIStatus(* | setPropertyFilter )(const CMPIInstance *inst, const char **properties, const char **keyList) |
Attach a property filter to a CMPIInstance object. More... | |
CMPIStatus(* | setObjectPath )(const CMPIInstance *inst, const CMPIObjectPath *op) |
Set the instance path component of a CMPIInstance object. More... | |
CMPIStatus(* | setPropertyWithOrigin )(const CMPIInstance *inst, const char *name, const CMPIValue *value, const CMPIType type, const char *origin) |
Add or replace a property value and class origin in a CMPIInstance object by name. More... | |
Function table of CMPIInstance encapsulated data type object.
For functions that are not supported, their function pointers in the CMPIInstanceFT function table shall not be NULL, but shall point to a function that can be called and then indicates back to the caller that it is not supported, as specified in the description of the function.
CMPIVersion CMPIInstanceFT::ftVersion |
CMPI version supported by the MB for this function table.
Any earlier CMPI versions are implicitly also supported.
See CMPIVersion<NNN> for valid CMPI version numbers.
CMPIStatus(* CMPIInstanceFT::release)(CMPIInstance *inst) |
Release a CMPIInstance object.
CMPIInstanceFT.release() releases a CMPIInstance object. This indicates to the MB that the object (including any objects it contains) will no longer be used by the MI. The MB may free (=reclaim) the memory associated with the object during the call to this function, or later during some garbage collection cycle (see Subclause 4.1.7 of the CMPI Standard).
inst | Points to the CMPIInstance object that is to be released. That object shall have been created using CMPIInstanceFT.clone(). |
CMPI_RC_OK
- Function successful. CMPI_RC_ERR_INVALID_HANDLE
- The inst
handle is invalid.CMPIInstance*(* CMPIInstanceFT::clone)(const CMPIInstance *inst, CMPIStatus *rc) |
Create an independent copy of a CMPIInstance object.
CMPIInstanceFT.clone() creates an independent copy of a CMPIInstance object.
inst | Points to the CMPIInstance object that is to be copied. | |
[out] | rc | If not NULL, points to a CMPIStatus structure that upon return will have been updated with the function return status. |
If successful, a pointer to the copied CMPIInstance object will be returned.
The returned CMPIInstance object shall be explicitly released by the MI using CMPIInstanceFT.release().
If not successful, NULL will be returned.
CMPI_RC_OK
- Function successful. CMPI_RC_ERR_INVALID_HANDLE
- The inst
handle is invalid.CMPIData(* CMPIInstanceFT::getProperty)(const CMPIInstance *inst, const char *name, CMPIStatus *rc) |
Get a property in a CMPIInstance object by name.
CMPIInstanceFT.getProperty() gets a gets a property in a CMPIInstance object by name.
inst | Points to the CMPIInstance object for this function. | |
name | Property name. | |
[out] | rc | If not NULL, points to a CMPIStatus structure that upon return will have been updated with the function return status. |
If successful, a CMPIData structure containing the specified property will be returned.
If not successful, CMPIData.state will be undefined.
CMPI_RC_OK
- Function successful. CMPI_RC_ERR_INVALID_HANDLE
- The inst
handle is invalid. CMPI_RC_ERR_NO_SUCH_PROPERTY
- Property not found.CMPIData(* CMPIInstanceFT::getPropertyAt)(const CMPIInstance *inst, CMPICount index, CMPIString **name, CMPIStatus *rc) |
Get a property in a CMPIInstance object by index.
CMPIInstanceFT.getPropertyAt() gets a property in a CMPIInstance object by index.
inst | Points to the CMPIInstance object for this function. | |
index | Zero-based position of the property in the internal data array. | |
[out] | name | If not NULL, points to a CMPIString pointer that upon success is updated to point to a CMPIString object containing the property name. The returned CMPIString object shall not be explicitly released by the MI, because it may be an internal object of the CMPIString object which will be released along with that object, or a new object created by the MB which will be released automatically by the MB (see Subclause 4.1.7 of the CMPI Standard). |
[out] | rc | If not NULL, points to a CMPIStatus structure that upon return will have been updated with the function return status. |
If successful, a CMPIData structure containing the specified property.
If not successful, CMPIData.state will be undefined.
CMPI_RC_OK
- Function successful. CMPI_RC_ERR_INVALID_HANDLE
- The inst
handle is invalid. CMPI_RC_ERR_NO_SUCH_PROPERTY
- Property not found.CMPICount(* CMPIInstanceFT::getPropertyCount)(const CMPIInstance *inst, CMPIStatus *rc) |
Get the number of properties in a CMPIInstance object.
CMPIInstanceFT.getPropertyCount() gets the number of properties in a CMPIInstance object.
inst | Points to the CMPIInstance object for this function. | |
[out] | rc | If not NULL, points to a CMPIStatus structure that upon return will have been updated with the function return status. |
If successful, a CMPICount value indicating the number of properties in the instance will be returned.
If not successful, 0 will be returned.
CMPI_RC_OK
- Function successful. CMPI_RC_ERR_INVALID_HANDLE
- The inst
handle is invalid.CMPIStatus(* CMPIInstanceFT::setProperty)(const CMPIInstance *inst, const char *name, const CMPIValue *value, CMPIType type) |
Add or replace a property value in a CMPIInstance object by name.
CMPIInstanceFT.setProperty() adds or replaces a property value in a CMPIInstance object by name.
If the property is a key property, the function may or may not in addition add or update the key binding in the object path of the instance. In order for MIs not to be dependent on this behavior, MIs should set key property values in instances and key binding values in object paths separately. Key binding values can be set during CMPIBrokerEncFT.newInstance() and by using CMPIInstanceFT.setObjectPath(). The MI shall specify consistent values for key bindings and key properties.
inst | Points to the CMPIInstance object for this function. |
name | Property name. |
value | Points to a CMPIValue structure containing the non-NULL value to be assigned to the property, or NULL to specify that NULL is to be assigned. |
type | CMPIType value specifying the type of the value to be assigned to the property. All types of CIM values are supported. If the value of |
CMPI_RC_OK
- Function successful. CMPI_RC_ERR_INVALID_HANDLE
- The ctx
handle is invalid. CMPI_RC_ERR_TYPE_MISMATCH
- type
does not correspond to the class-defined type. CMPI_RC_ERR_INVALID_PARAMETER
- name
is not a valid property name.CMPI_RC_ERR_INVALID_PARAMETER
. CMPIObjectPath*(* CMPIInstanceFT::getObjectPath)(const CMPIInstance *inst, CMPIStatus *rc) |
Get the instance path component of a CMPIInstance object.
CMPIInstanceFT.getObjectPath() generates a CMPIObjectPath object from the namespace, class name, and key properties of a CMPIInstance object.
inst | Points to the CMPIInstance object for this function. | |
[out] | rc | If not NULL, points to a CMPIStatus structure that upon return will have been updated with the function return status. |
If successful, a pointer to a CMPIObjectPath object representing the instance path of the CMPIInstance will be returned.
The returned CMPIObjectPath object shall not be explicitly released by the MI, because it may be an internal object of the CMPIInstance object which will be released along with that object, or a new object created by the MB which will be released automatically by the MB (see Subclause 4.1.7 of the CMPI Standard).
If not successful, NULL will be returned.
CMPI_RC_OK
- Function successful. CMPI_RC_ERR_INVALID_HANDLE
- The inst
handle is invalid.CMPIStatus(* CMPIInstanceFT::setPropertyFilter)(const CMPIInstance *inst, const char **properties, const char **keyList) |
Attach a property filter to a CMPIInstance object.
CMPIInstanceFT.setPropertyFilter() attaches a property filter to a CMPIInstance object, replacing any previous property filter settings for this object.
By calling this function, the MI delegates property list filtering to the MB for this CMPIInstance object, for all of its properties including those that had already been set before the call to setPropertyFilter().
inst | Points to the CMPIInstance object for this function. |
properties | The properties that will be accepted by subsequent setProperty() function calls. The properties argument is an array of pointers to strings, terminated by a NULL pointer. A NULL value effectively means that all properties will be accepted. A pointer to an empty array means that no properties will be accepted. The list of properties specified in the properties argument shall match the list of properties specified in the call to the MI function that calls CMPIInstanceFT.setPropertyFilter(). |
keyList | This argument shall be ignored by the MB; it is here to maintain binary compatibility with previous specifications. MIs conforming to CMPI 2.0 or later shall set the key names and values via the CMPIInstanceMI.setObjectPath() function. |
CMPI_RC_OK
- Function successful. CMPI_RC_ERR_INVALID_HANDLE
- The inst
handle is invalid. CMPI_RC_ERR_NOT_SUPPORTED
- Function is not supported by the MB. CMPI_RC_ERR_INVALID_PARAMETER
- Invalid arguments.properties
argument. The description of that return code in the document should to be updated to match the description in the header file: "Invalid arguments.". CMPIStatus(* CMPIInstanceFT::setObjectPath)(const CMPIInstance *inst, const CMPIObjectPath *op) |
Set the instance path component of a CMPIInstance object.
CMPIInstanceFT.setObjectPath() sets the instance path component of a CMPIInstance object.
The function may or may not in addition update the key property values in the instance to the values of the key bindings in the object path. In order for MIs not to be dependent on this behavior, MIs should set key property values in instances and key binding values in object paths separately. Property values can be set by using CMPIInstanceFT.setProperty() or CMPIInstanceFT.setPropertyWithOrigin(). The MI shall specify consistent values for key bindings and key properties.
inst | Points to the CMPIInstance object for this function. |
op | Points to a CMPIObjectPath object. All components of the object path of the instance will be set/replaced from the object path in this argument. The object path in this argument shall specify a non-NULL namespace, a non-NULL creation class name, as well as all keys for the instance. The object path may specify a non-NULL host for the instance (this is used for instances returned by cross-host associations). |
CMPI_RC_OK
- Function successful. CMPI_RC_ERR_INVALID_HANDLE
- The inst
or op
handle is invalid. CMPI_RC_ERR_INVALID_PARAMETER
- Object path components specified in op
are invalid.CMPI_RC_ERR_INVALID_PARAMETER
. CMPIStatus(* CMPIInstanceFT::setPropertyWithOrigin)(const CMPIInstance *inst, const char *name, const CMPIValue *value, const CMPIType type, const char *origin) |
Add or replace a property value and class origin in a CMPIInstance object by name.
CMPIInstanceFT.setPropertyWithOrigin() adds or replaces a property value and class origin in a CMPIInstance object by name.
If the property is a key property, the function may or may not in addition add or update the key binding in the object path of the instance. In order for MIs not to be dependent on this behavior, MIs should set key property values in instances and key binding values in object paths separately. Key binding values can be set during CMPIBrokerEncFT.newInstance() and by using CMPIInstanceFT.setObjectPath(). The MI shall specify consistent values for key bindings and key properties.
inst | Points to the CMPIInstance object for this function. |
name | Property name. |
value | Points to a CMPIValue structure containing non-NULL value to be assigned to the property, or is NULL to specify that NULL is to be assigned. |
type | The type of the value to be assigned to the property. All types of CIM values are supported. If the value of |
origin | The name of the class in which this property was originally defined. If NULL, then no origin is attached to the property. The MB shall conform to the requirements of the client protocol regarding class origin information. |
CMPI_RC_OK
- Function successful. CMPI_RC_ERR_INVALID_HANDLE
- The inst
handle is invalid. CMPI_RC_ERR_TYPE_MISMATCH
- type
does not correspond to class-defined type.