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

Function table of CMPIArgs 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 )(CMPIArgs *args)
 Release a CMPIArgs object. More...
 
CMPIArgs *(* clone )(const CMPIArgs *args, CMPIStatus *rc)
 Create an independent copy of a CMPIRArgs object. More...
 
CMPIStatus(* addArg )(const CMPIArgs *args, const char *name, const CMPIValue *value, const CMPIType type)
 Add or replace a method parameter in a CMPIArgs object. More...
 
CMPIData(* getArg )(const CMPIArgs *args, const char *name, CMPIStatus *rc)
 Get a method parameter in a CMPIArgs object by name. More...
 
CMPIData(* getArgAt )(const CMPIArgs *args, CMPICount index, CMPIString **name, CMPIStatus *rc)
 Get a method parameter in a CMPIArgs object by index. More...
 
CMPICount(* getArgCount )(const CMPIArgs *args, CMPIStatus *rc)
 Get the number of method parameters in a CMPIArgs object. More...
 

Detailed Description

Function table of CMPIArgs encapsulated data type object.

Field Documentation

CMPIVersion CMPIArgsFT::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(* CMPIArgsFT::release)(CMPIArgs *args)

Release a CMPIArgs object.

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

Create an independent copy of a CMPIRArgs object.

CMPIArgsFT.clone() creates an independent copy of a CMPIRArgs object.

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

The returned CMPIArgs object shall be explicitly released by the MI using CMPIArgsFT.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 args handle is invalid.
Convenience Function
CMClone()
CMPIStatus(* CMPIArgsFT::addArg)(const CMPIArgs *args, const char *name, const CMPIValue *value, const CMPIType type)

Add or replace a method parameter in a CMPIArgs object.

CMPIArgsFT.addArg() adds or replaces a method parameter in a CMPIArgs object.

Parameters
argsPoints to the CMPIArgs object for this function.
nameName of the method parameter to be added or replaced.
valuePoints to a CMPIValue structure containing the non-NULL value to be assigned to the method parameter, or NULL to specify that NULL is to be assigned
type

Type of the method parameter.

All types of CIM values are supported.

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 args handle is invalid.
  • CMPI_RC_ERR_INVALID_DATA_TYPE - Data type not valid.
Convenience Function
CMAddArg()
CMPIData(* CMPIArgsFT::getArg)(const CMPIArgs *args, const char *name, CMPIStatus *rc)

Get a method parameter in a CMPIArgs object by name.

CMPIArgsFT.getArg() gets a method parameter in a CMPIArgs object, by name.

Parameters
argsPoints to the CMPIArgs object for this function.
nameName of the method parameter.
[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 specified method parameter 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 args handle is invalid.
  • CMPI_RC_ERR_NO_SUCH_PROPERTY - Method parameter not found.
Convenience Function
CMGetArg()
CMPIData(* CMPIArgsFT::getArgAt)(const CMPIArgs *args, CMPICount index, CMPIString **name, CMPIStatus *rc)

Get a method parameter in a CMPIArgs object by index.

CMPIArgsFT.getArgAt() gets a method parameter in a CMPIArgs object by index.

Parameters
argsPoints to the CMPIArgs object for this function.
indexZero-based position of the method parameter in the internal data array.
[out]name

If not NULL, points to a CMPIString pointer that upon success will have been updated to point to a CMPIString object containing the method parameter name.

The returned CMPIString object shall not be explicitly released by the MI, because it may be an internal object of the CMPIArgs object which will be released along with that object, or a new object created by the MB which will be automatically released by the MB (see Subclause 4.1.7 of the CMPI Standard).

Parameters
[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 specified method parameter 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 args handle is invalid.
  • CMPI_RC_ERR_NO_SUCH_PROPERTY - Method parameter not found.
Convenience Function
CMGetArgAt()
CMPICount(* CMPIArgsFT::getArgCount)(const CMPIArgs *args, CMPIStatus *rc)

Get the number of method parameters in a CMPIArgs object.

CMPIArgsFT.getArgCount() gets the number of method parameters in a CMPIArgs object.

Parameters
argsPoints to the CMPIArgs 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 CMPICount value indicating the number of method parameters in the CMPIArgs object will be returned.

If not successful, 0 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 args handle is invalid.
Convenience Function
CMGetArgCount()

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