CMPI 2.1.0 API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Fields
CMPIResultFT Struct Reference

Function table of CMPIResult 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 )(CMPIResult *rslt)
 Release a CMPIResult object. More...
 
CMPIResult *(* clone )(const CMPIResult *rslt, CMPIStatus *rc)
 Create an independent copy of a CMPIResult object. More...
 
CMPIStatus(* returnData )(const CMPIResult *rslt, const CMPIValue *value, const CMPIType type)
 Add a value/type pair to a CMPIResult object. More...
 
CMPIStatus(* returnInstance )(const CMPIResult *rslt, const CMPIInstance *inst)
 Add an instance to a CMPIResult object. More...
 
CMPIStatus(* returnObjectPath )(const CMPIResult *rslt, const CMPIObjectPath *op)
 Add an object path to a CMPIResult object. More...
 
CMPIStatus(* returnDone )(const CMPIResult *rslt)
 Indicate that no further items will be added to a CMPIResult object. More...
 
CMPIStatus(* returnError )(const CMPIResult *rslt, const CMPIError *er)
 Add an error to a CMPIResult object. More...
 

Detailed Description

Function table of CMPIResult encapsulated data type object.

Field Documentation

CMPIVersion CMPIResultFT::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(* CMPIResultFT::release)(CMPIResult *rslt)

Release a CMPIResult object.

CMPIResultFT.release() releases a CMPIResult 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).

Parameters
rsltPoints to the CMPIResult object that is to be released. That object shall have been created using CMPIResultFT.clone().
Returns
CMPIStatus structure containing the function return status.
Errors
The function return status will indicate one of the following CMPIrc codes:
  • CMPI_RC_OK - Function successful.
  • CMPI_RC_ERR_INVALID_HANDLE - The rslt handle is invalid.
Convenience Function
CMRelease()
CMPIResult*(* CMPIResultFT::clone)(const CMPIResult *rslt, CMPIStatus *rc)

Create an independent copy of a CMPIResult object.

CMPIResultFT.clone() creates an independent copy of a CMPIResult object.

Parameters
rsltPoints to the CMPIResult object that is to be copied.
[out]rcIf not NULL, points to a CMPIStatus structure that upon return will have been updated with the function return status.
Returns

If successful, a pointer to the copied CMPIPropertyList object will be returned.

The returned CMPIResult object shall be explicitly released by the MI using CMPIResultFT.release().

If not successful, NULL will be returned.

Errors
The function return status will indicate one of the following CMPIrc codes:
  • CMPI_RC_OK - Function successful.
  • CMPI_RC_ERR_INVALID_HANDLE - The rslt handle is invalid.
Convenience Function
CMClone()
CMPIStatus(* CMPIResultFT::returnData)(const CMPIResult *rslt, const CMPIValue *value, const CMPIType type)

Add a value/type pair to a CMPIResult object.

CMPIResultFT.returnData() adds a value/type pair to be returned to the MB, to a CMPIResult object.

Parameters
rsltPoints to the CMPIResult object for this function.
valuePoints to a CMPIValue structure specifying the non-NULL value to be returned, or is NULL to specify that NULL is to be returned
typeCMPIType value specifying the type to be returned. Specific return types are defined for each function that returns CMPIResult objects. If the value of type is CMPI_chars or CMPI_charsA, the C-language string to which the chars member of value points is copied by this function and the original string memory may be freed by the MI right after this function returns.
Returns
CMPIStatus structure containing the function return status.
Errors
The function return status will indicate one of the following CMPIrc codes:
  • CMPI_RC_OK - Function successful.
  • CMPI_RC_ERR_INVALID_HANDLE - The rslt handle is invalid, or the MB has aborted the request operation for which this data is being returned.
  • CMPI_RC_ERR_INVALID_DATA_TYPE - An attempt to return a data type that is not allowed for this MI function invocation or type is not recognized.
Convenience Function
CMReturnData()
CMPIStatus(* CMPIResultFT::returnInstance)(const CMPIResult *rslt, const CMPIInstance *inst)

Add an instance to a CMPIResult object.

CMPIResultFT.returnInstance() adds an instance to be returned to the MB, to a CMPIResult object.

Parameters
rsltPoints to the CMPIResult object for this function.
instPoints to a CMPIInstance object representing the instance to be returned.
Returns
CMPIStatus structure containing the function return status.
Errors
The function return status will indicate one of the following CMPIrc codes:
  • CMPI_RC_OK - Function successful.
  • CMPI_RC_ERR_INVALID_HANDLE - The rslt handle is invalid or the MB has aborted the request for which this data is returned.
Convenience Function
CMReturnInstance()
CMPIStatus(* CMPIResultFT::returnObjectPath)(const CMPIResult *rslt, const CMPIObjectPath *op)

Add an object path to a CMPIResult object.

CMPIResultFT.returnObjectPath() adds an object path to be returned to the MB, to a CMPIResult object.

Parameters
rsltPoints to the CMPIResult object for this function.
opPoints to a CMPIObjectPath object representing the object path to be returned.
Returns
CMPIStatus structure containing the function return status.
Errors
The function return status will indicate one of the following CMPIrc codes:
  • CMPI_RC_OK - Function successful.
  • CMPI_RC_ERR_INVALID_HANDLE - The rslt or op handle is invalid, or the MB has aborted the request for which this data is being returned.
Convenience Function
CMReturnObjectPath()
CMPIStatus(* CMPIResultFT::returnDone)(const CMPIResult *rslt)

Indicate that no further items will be added to a CMPIResult object.

CMPIResultFT.returnDone() indicates to the MB that no further items will be added to a CMPIResult object; that is, the MI will not return any more data to the MB.

Parameters
rsltPoints to the CMPIResult object for this function.
Returns
CMPIStatus structure containing the function return status.
Errors
The function return status will indicate one of the following CMPIrc codes:
  • CMPI_RC_OK - Function successful.
  • CMPI_RC_ERR_INVALID_HANDLE - The rslt handle is invalid, or the MB has aborted the request for which this result is defined.
Convenience Function
CMReturnDone()
CMPIStatus(* CMPIResultFT::returnError)(const CMPIResult *rslt, const CMPIError *er)

Add an error to a CMPIResult object.

CMPIResultFT.returnError() adds an error to be returned to the MB, to a CMPIResult object.

This function may be called multiple times, each time adding one CMPIError object to the set of extended errors for this result.

In WBEM protocols that support multiple extended errors in an error response, the MB shall represent the extended errors in the protocol in the order of calls to this function. In WBEM protocols that support only one extended error in an error response, the MB shall represent the extended error from the first call to this function for a particular result.

Parameters
rsltPoints to the CMPIResult object for this function.
er

Points to a CMPIError object representing the error to be returned.

The CIM status code in the CMPIError object of the first call to this function for the result data container of an MI function must match the CMPIrc code returned by that MI function.

The messages in the CMPIError objects are described in each MI function.

Returns
CMPIStatus structure containing the function return status.
Errors
The function return status will indicate one of the following CMPIrc codes:
  • CMPI_RC_OK - Function successful.
  • CMPI_RC_ERR_INVALID_HANDLE - The rslt handle is invalid or the MB has aborted the request for which this data is returned.
Convenience Function
CMReturnError()
Capabilities:
Part of the Extended Errors capability.
Addition:
Added in CMPI 2.0.

The documentation for this struct was generated from the following file: