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

Function table of CMPIContext 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 )(CMPIContext *ctx)
 Release a CMPIContext object. More...
 
CMPIContext *(* clone )(const CMPIContext *ctx, CMPIStatus *rc)
 Create an independent copy of a CMPIContext object. More...
 
CMPIData(* getEntry )(const CMPIContext *ctx, const char *name, CMPIStatus *rc)
 Get a context entry in a CMPIContext object by name. More...
 
CMPIData(* getEntryAt )(const CMPIContext *ctx, CMPICount index, CMPIString **name, CMPIStatus *rc)
 Get a context entry in a CMPIContext object by index. More...
 
CMPICount(* getEntryCount )(const CMPIContext *ctx, CMPIStatus *rc)
 Get the number of context entries in a CMPIContext object. More...
 
CMPIStatus(* addEntry )(const CMPIContext *ctx, const char *name, const CMPIValue *value, const CMPIType type)
 Add or replace a context entry in a CMPIContext object. More...
 

Detailed Description

Function table of CMPIContext encapsulated data type object.

Requirement Change:
Required to be supported since CMPI 2.1.
Capabilities:
Part of the Context Data capability.

Field Documentation

CMPIVersion CMPIContextFT::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(* CMPIContextFT::release)(CMPIContext *ctx)

Release a CMPIContext object.

CMPIContextFT.release() releases a CMPIContext 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
ctxPoints to the CMPIContext object that is to be released. That object shall have been created using CMPIContextFT.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 ctx handle is invalid.
Convenience Function
CMRelease()
Capabilities:
Part of the Context Data capability.
Requirement Change:
Required to be supported since CMPI 2.1.
CMPIContext*(* CMPIContextFT::clone)(const CMPIContext *ctx, CMPIStatus *rc)

Create an independent copy of a CMPIContext object.

CMPIContextFT.clone() creates an independent copy of a CMPIContext object.

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

The returned CMPIContext object shall be explicitly released by the MI using CMPIContextFT.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 ctx handle is invalid.
Convenience Function
CMClone()
Capabilities:
Part of the Context Data capability.
Requirement Change:
Required to be supported since CMPI 2.1.
CMPIData(* CMPIContextFT::getEntry)(const CMPIContext *ctx, const char *name, CMPIStatus *rc)

Get a context entry in a CMPIContext object by name.

CMPIContextFT.getEntry() gets a context entry in a CMPIContext object by supplying its name.

Parameters
ctxPoints to the CMPIContext object for this function.
nameContext entry name. See Names of CMPIContext fields for defined names.
[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 context entry 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 ctx handle is invalid.
  • CMPI_RC_ERR_NO_SUCH_PROPERTY - Entry not found.
Convenience Function
CMGetContextEntry()
Capabilities:
Part of the Context Data capability.
Requirement Change:
Required to be supported since CMPI 2.1.
CMPIData(* CMPIContextFT::getEntryAt)(const CMPIContext *ctx, CMPICount index, CMPIString **name, CMPIStatus *rc)

Get a context entry in a CMPIContext object by index.

CMPIContextFT.getEntryAt() gets a context entry in a CMPIContext object by supplying its index.

Parameters
ctxPoints to the CMPIContext object for this function.
indexZero-based position of the context entry in the internal data array. The order of context entries in the internal data array is implementation-defined.
[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 name of the returned context entry.

The returned CMPIString object shall not be explicitly released by the MI, because it may be an internal object of the CMPIContext 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 context entry 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 ctx handle is invalid.
  • CMPI_RC_ERR_NO_SUCH_PROPERTY - Entry not found.
Convenience Function
CMGetContextEntryAt()
Capabilities:
Part of the Context Data capability.
Requirement Change:
Required to be supported since CMPI 2.1.
CMPICount(* CMPIContextFT::getEntryCount)(const CMPIContext *ctx, CMPIStatus *rc)

Get the number of context entries in a CMPIContext object.

CMPIContextFT.getEntryCount() gets the number of entries in a CMPIContext object.

Parameters
ctxPoints to the CMPIContext 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 entries in the CMPIContext object will be returned.

If not successful, the return value 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 ctx handle is invalid.
  • CMPI_RC_ERR_NO_SUCH_PROPERTY - Entry not found.
Convenience Function
CMGetContextEntryCount()
Capabilities:
Part of the Context Data capability.
Requirement Change:
Required to be supported since CMPI 2.1.
CMPIStatus(* CMPIContextFT::addEntry)(const CMPIContext *ctx, const char *name, const CMPIValue *value, const CMPIType type)

Add or replace a context entry in a CMPIContext object.

CMPIContextFT.addEntry() adds or replaces a context entry in a CMPIContext object.

Parameters
ctxPoints to the CMPIContext object for this function.
nameContext entry name. See Names of CMPIContext fields for defined names.
valuePoints to a CMPIValue structure containing the non-NULL value to be assigned to the context entry, or NULL to specify that NULL is to be assigned.
type

CMPIType value specifying the type of the value to be assigned to the context entry.

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 ctx handle is invalid.
  • CMPI_RC_ERR_INVALID_DATA_TYPE - Type not supported for this call, or type is not recognized.
Convenience Function
CMAddContextEntry()
Capabilities:
Part of the Context Data capability.
Requirement Change:
Required to be supported since CMPI 2.1.

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