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

Function table of CMPIMethodMI object. More...

#include <cmpift.h>

Data Fields

CMPIVersion ftVersion
 CMPI version supported by the MI for this function table. More...
 
int miVersion
 Informal MI-specific version number for this MI.
 
const char * miName
 Informal MI-specific name for this MI.
 
CMPIStatus(* cleanup )(CMPIMethodMI *mi, const CMPIContext *ctx, CMPIBoolean terminating)
 Perform cleanup for an Instance MI. More...
 
CMPIStatus(* invokeMethod )(CMPIMethodMI *mi, const CMPIContext *ctx, const CMPIResult *rslt, const CMPIObjectPath *objPath, const char *method, const CMPIArgs *in, CMPIArgs *out)
 Invoke a method on a target object. More...
 

Detailed Description

Function table of CMPIMethodMI object.

Field Documentation

CMPIVersion CMPIMethodMIFT::ftVersion

CMPI version supported by the MI for this function table.

Any later CMPI versions are implicitly also supported.

See CMPIVersion<NNN> for valid CMPI version numbers.

CMPIStatus(* CMPIMethodMIFT::cleanup)(CMPIMethodMI *mi, const CMPIContext *ctx, CMPIBoolean terminating)

Perform cleanup for an Instance MI.

CMPIMethodMIFT.cleanup() shall perform any necessary cleanup for the Method MI identified by mi, unless the MI postpones the cleanup.

While this function executes, the MB will not call any other MI functions for this MI. This function will be called once for a specific MI (unless the MI postpones the cleanup), even if that MI services more than one namespace. After this function returns, the MB may unload the load library this MI is part of, unless the MI postpones the cleanup.

Parameters
miPoints to a CMPIMethodMI structure.
ctxPoints to a CMPIContext object containing the context data for the invocation. The context data entries are MB implementation-specific.
terminating

Indicates whether the MB is in the process of shutting down and thus cannot tolerate postponing of the cleanup, as follows:

When True, the MB is in the process of shutting down. The MI shall perform any necessary cleanup and shall not postpone the cleanup. After this function returns (successful or in error), the MB will consider this MI to be uninitialized and will not call further MI functions for this MI.

When False, the MI can choose to perform or postpone the cleanup, by performing one of these actions:

  • The MI performs any necessary cleanup and does not request postponing the cleanup. After this function returns (successful or in error), the MB will consider this MI to be uninitialized and will not call further MI functions for this MI.
  • The MI does not perform any cleanup and temporarily postpones the cleanup, by returning CMPI_RC_DO_NOT_UNLOAD. This will cause the MB to consider this MI still to be initialized, and the MB may call further MI functions of this MI. The MB may call this function again after some MB implementation-specific time.
  • The MI does not perform any cleanup and permanently postpones the cleanup, by returning CMPI_RC_NEVER_UNLOAD. This will cause the MB to consider this MI still to be initialized, and the MB may call further MI functions of this MI. The MB will not call this function again until the MB terminates (at which time the MB calls this function with terminating set to true).
Returns
CMPIStatus structure containing the function return status.
Errors
The following CMPIrc codes shall be used by the MI in the function return status:
  • CMPI_RC_OK - Function successful.
  • CMPI_RC_DO_NOT_UNLOAD - Function successful, do not unload now; the MB may retry an unload later.
  • CMPI_RC_NEVER_UNLOAD - Function successful, never unload; the MB will not retry an unload later unless it shuts down.
  • CMPI_RC_ERR_FAILED - Other error occurred.
Convenience Function
CMMethodMIStub()
Bug:
The CMPI Standard is not specific about the number of invocations of this function when an MI services more than one namespace. It should be updated to state that the function is invoked only once, even if the MI services more than one namespace.
CMPIStatus(* CMPIMethodMIFT::invokeMethod)(CMPIMethodMI *mi, const CMPIContext *ctx, const CMPIResult *rslt, const CMPIObjectPath *objPath, const char *method, const CMPIArgs *in, CMPIArgs *out)

Invoke a method on a target object.

CMPIMethodMIFT.invokeMethod() shall invoke a named, extrinsic method on a target object, by accessing the underlying managed elements. Instance methods (i.e., non-static methods) can be invoked only on instances. Class methods (i.e., static methods) can be invoked on instances and classes

This function is provided by the MI in context of a particular MI name. The class of objPath for which this function will be called by the MB depends on the specifics of how the MB relates classes and MI names, which is out of scope for this standard. As a result, the MB may call this function for classes for which the MI is not responsible. In order for an MI to be portable across MB implementations with different approaches to relate MI names and classes, the MI must check whether it services the class specified in objPath.

Parameters
miPoints to a CMPIMethodMI structure.
ctxPoints to a CMPIContext object containing the context data for the invocation.
rsltPoints to a CMPIResult object that is the result data container. Upon successful return, the MI shall have put the return value of the method into this container. The CMPIResultFT function to be used for that depends on the data type of the method return, as follows:
objPathPoints to the CMPIObjectPath object that references the target object on which the method is invoked. If the target object is an instance, this object path will contain the namespace, class name, and key components. The hostname component, if present, has no meaning and should be ignored. If the target object is a class, this object path will contain the namespace and class name components. The hostname and key components, if present, have no meaning and should be ignored.
methodMethod name.
inPoints to a CMPIArgs object (whether the method has any input parameters or not) that contains the method input parameters.
[out]outPoints to an empty CMPIArgs object (whether the method has any output parameters or not) that, upon successful return of the method, shall have been updated by the MI to contain the method output parameters.
Returns
CMPIStatus structure containing the function return status.
Errors
The following table lists the CMPIrc codes that shall be used by the MI in the function return status, as well as the WBEM operation messages that should be used in the CMPIError object if the MI supports extended error handling (see the corresponding Extended Errors capability):
CMPIRCCodeCMPIErrorMsgDescription
CMPI_RC_OKN/A Function Successful.
CMPI_RC_ERR_NOT_SUPPORTEDN/A Function is not supported by this MI. (Deprecated)
CMPI_RC_ERR_METHOD_NOT_AVAILABLEWIPG0219 Function is not suppored by this MI.
CMPI_RC_ERR_ACCESS_DENIEDWIPG0201 Not authorized.
CMPI_RC_ERR_INVALID_PARAMETERWIPG0249 Invalid method parameters.
CMPI_RC_ERR_NOT_FOUNDWIPG0213 Target object not found.
CMPI_RC_ERR_SERVER_LIMITS_EXCEEDEDWIPG0240 Limits Exceeded.
CMPI_RC_ERR_FAILEDWIPG0243 Timeout occurred.
CMPI_RC_ERR_FAILEDWIPG0227 + implementation-specific message Other error occurred.
Convenience Function
CMMethodMIStub()
Change:
In CMPI 2.1, added the return codes CMPI_RC_ERR_METHOD_NOT_AVAILABLE, CMPI_RC_ERR_SERVER_LIMITS_EXCEEDED, and CMPI_RC_ERR_INVALID_PARAMETER.
Deprecated:
The return code CMPI_RC_ERR_NOT_SUPPORTED of this function is deprecated since CMPI 2.1. Use CMPI_RC_ERR_METHOD_NOT_AVAILABLE instead for indicating that the function is not supported.

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