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

Function table of CMPIEnumeration 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 )(CMPIEnumeration *en)
 Release a CMPIEnumeration object. More...
 
CMPIEnumeration *(* clone )(const CMPIEnumeration *en, CMPIStatus *rc)
 Create an independent copy of a CMPIEnumeration object. More...
 
CMPIData(* getNext )(const CMPIEnumeration *en, CMPIStatus *rc)
 Get the next element in a CMPIEnumeration object. More...
 
CMPIBoolean(* hasNext )(const CMPIEnumeration *en, CMPIStatus *rc)
 Test for any elements left in a CMPIEnumeration object. More...
 
CMPIArray *(* toArray )(const CMPIEnumeration *en, CMPIStatus *rc)
 Convert a CMPIEnumeration object to a CMPIArray object. More...
 

Detailed Description

Function table of CMPIEnumeration encapsulated data type object.

Field Documentation

CMPIVersion CMPIEnumerationFT::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(* CMPIEnumerationFT::release)(CMPIEnumeration *en)

Release a CMPIEnumeration object.

CMPIEnumerationFT.release() releases a CMPIEnumeration 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
enPoints to the CMPIEnumeration object that is to be released. That object shall have been created using CMPIEnumerationFT.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 en handle is invalid.
Convenience Function
CMRelease()
CMPIEnumeration*(* CMPIEnumerationFT::clone)(const CMPIEnumeration *en, CMPIStatus *rc)

Create an independent copy of a CMPIEnumeration object.

CMPIEnumerationFT.clone() creates an independent copy of a CMPIEnumeration object.

Parameters
enPoints to the CMPIEnumeration 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 CMPIEnumeration object will be returned.

The returned CMPIEnumeration object shall be explicitly released by the MI using CMPIEnumerationFT.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 en handle is invalid.
Convenience Function
CMClone()
CMPIData(* CMPIEnumerationFT::getNext)(const CMPIEnumeration *en, CMPIStatus *rc)

Get the next element in a CMPIEnumeration object.

CMPIEnumerationFT.getNext() gets the next element in a CMPIEnumeration object.

Parameters
enPoints to the CMPIEnumeration object for this function.
[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 CMPIData structure containing the next element will be returned.

If not successful, CMPIData.state will be undefined.

Errors
The function return status will indicate one of the following CMPIrc codes:
  • CMPI_RC_OK - Function successful.
  • CMPI_RC_ERR_INVALID_HANDLE - The en handle is invalid.
  • CMPI_RC_NO_MORE_ELEMENTS - No more elements in en.
Convenience Function
CMGetNext()
Change:
In CMPI 2.1, added the return code CMPI_RC_NO_MORE_ELEMENTS (which had been used by this function before).
CMPIBoolean(* CMPIEnumerationFT::hasNext)(const CMPIEnumeration *en, CMPIStatus *rc)

Test for any elements left in a CMPIEnumeration object.

CMPIEnumerationFT.hasNext() tests for any elements left in a CMPIEnumeration object.

Parameters
enPoints to the CMPIEnumeration object for this function.
[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 CMPIBoolean value indicating the test result will be returned, as follows:
  • True indicates that the enumeration has more elements left;
  • False indicates that this is not the case.
If not successful, false 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 en handle is invalid.
Convenience Function
CMHasNext()
Change:
In CMPI 2.1, added a requirement for the MB to return False if not successful.
CMPIArray*(* CMPIEnumerationFT::toArray)(const CMPIEnumeration *en, CMPIStatus *rc)

Convert a CMPIEnumeration object to a CMPIArray object.

CMPIEnumerationFT.toArray() converts a CMPIEnumeration object into a CMPIArray object.

Parameters
enPoints to the CMPIEnumeration object for this function.
[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 a CMPIArray object containing the elements from the CMPIEnumeration object will be returned.

The returned CMPIArray object shall not be explicitly released by the MI, because it may be an internal object of the CMPIEnumeration 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.

Errors
The function return status will indicate one of the following CMPIrc codes:
  • CMPI_RC_OK - Function successful.
  • CMPI_RC_ERR_INVALID_HANDLE - The en handle is invalid.
Convenience Function
CMToArray()

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