CMPI 2.1.0 API
|
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... | |
Function table of CMPIMethodMI object.
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.
mi | Points to a CMPIMethodMI structure. |
ctx | Points 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:
|
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.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
.
mi | Points to a CMPIMethodMI structure. | |
ctx | Points to a CMPIContext object containing the context data for the invocation. | |
rslt | Points 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:
| |
objPath | Points 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. | |
method | Method name. | |
in | Points to a CMPIArgs object (whether the method has any input parameters or not) that contains the method input parameters. | |
[out] | out | Points 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. |
CMPIRCCode | CMPIErrorMsg | Description |
---|---|---|
CMPI_RC_OK | N/A | Function Successful. |
CMPI_RC_ERR_NOT_SUPPORTED | N/A | Function is not supported by this MI. (Deprecated) |
CMPI_RC_ERR_METHOD_NOT_AVAILABLE | WIPG0219 | Function is not suppored by this MI. |
CMPI_RC_ERR_ACCESS_DENIED | WIPG0201 | Not authorized. |
CMPI_RC_ERR_INVALID_PARAMETER | WIPG0249 | Invalid method parameters. |
CMPI_RC_ERR_NOT_FOUND | WIPG0213 | Target object not found. |
CMPI_RC_ERR_SERVER_LIMITS_EXCEEDED | WIPG0240 | Limits Exceeded. |
CMPI_RC_ERR_FAILED | WIPG0243 | Timeout occurred. |
CMPI_RC_ERR_FAILED | WIPG0227 + implementation-specific message | Other error occurred. |
CMPI_RC_ERR_METHOD_NOT_AVAILABLE
, CMPI_RC_ERR_SERVER_LIMITS_EXCEEDED
, and CMPI_RC_ERR_INVALID_PARAMETER
. 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.