CMPI 2.1.0 API
|
CMPI_EXTERN_C CMPI<mitype>MI* <miname>_Create_<mitype>MI( const CMPIBroker* mb, const CMPIContext* ctx, CMPIStatus* rc);
<miname>_Create_<mitype>MI() is an MI-specific factory function for an MI and is responsible for intializing the MI of type <mitype> with the predefined name <miname>.
<mitype> can be one of:
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, even if that MI services more than one namespace.
This function shall be declared with the CMPI_EXTERN_C modifier or an equivalent modifier; the name of this function shall be exported from the MI load library.
mb | Points to a CMPIBroker structure. This structure can be used throughout the life of this MI function group to invoke MB services. | |
ctx | Points to a CMPIContext object containing the context data for the invocation. This CMPIContext object contains the CMPIInitNameSpace entry indicating the namespace for which this MI is to be initialized. If this MI services more than one namespace, the CMPIInitNameSpace entry indicates one of those namespaces. | |
[out] | rc | Points to a CMPIStatus structure that upon return shall have been updated with the function return status. |
If successful, a pointer to a valid CMPI<mitype>MI structure (CMPIInstanceMI, CMPIAssociationMI, CMPIPropertyMI, CMPIMethodMI, CMPIIndicationMI) for the MI identified by <mitype> and <miname> shall be returned, and the MB will consider this MI to be initialized (that is, functioning).
If not successful, NULL shall be returned, and the MI identified by <mitype> and <miname> is considered uninitialized (that is, malfunctioning) and will not be used by the MB. Specifically, the cleanup function for this MI (e.g. CMPIInstanceMIFT.cleanup()) will not be invoked by the MB in that case.
CMPI_RC_OK
- Function successful. CMPI_RC_ERR_NOT_SUPPORTED
- MI type not supported for this MI name. CMPI_RC_ERR_ACCESS_DENIED
- Not authorized. CMPI_RC_ERR_FAILED
- Other error occurred.