CMPI 2.1.0 API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Variables
Thread Registration Services (Subclause 9.13)

Variables

CMPIContext *(* CMPIBrokerFT::prepareAttachThread )(const CMPIBroker *mb, const CMPIContext *ctx)
 Prepare the MB to accept a new thread that will be using MB functions. More...
 
CMPIStatus(* CMPIBrokerFT::attachThread )(const CMPIBroker *mb, const CMPIContext *ctx)
 Inform the MB that the current thread will begin using MB functions. More...
 
CMPIStatus(* CMPIBrokerFT::detachThread )(const CMPIBroker *mb, const CMPIContext *ctx)
 Inform the MB that the current thread will no longer use MB functions. More...
 

Detailed Description

Variable Documentation

CMPIContext*(* CMPIBrokerFT::prepareAttachThread)(const CMPIBroker *mb, const CMPIContext *ctx)

Prepare the MB to accept a new thread that will be using MB functions.

CMPIBrokerFT.prepareAttachThread() prepares the MB to accept a new thread that will be using MB functions. This function is expected to be called in the existing thread.

Parameters
mbPoints to a CMPIBroker structure.
ctx

Points to the CMPIContext object that was used to invoke the MI function that calls this MB function.

The opaque part of the CMPIContext object can be used by the MB to carry the MB internal security context. Such MBs can maintain the security context for the new thread in the returned copy of the CMPIContext object.

Returns

If successful, a pointer to a CMPIContext object that is to be used by the thread to be attached will be returned. This is used for subsequent CMPIBrokerFT.attachThread() and CMPIBrokerFT.detachThread() invocations.

If not successful, NULL will be returned.

Errors
For historical reasons, no additional error information is passed back.
Convenience Function
CBPrepareAttachThread()
CMPIStatus(* CMPIBrokerFT::attachThread)(const CMPIBroker *mb, const CMPIContext *ctx)

Inform the MB that the current thread will begin using MB functions.

CMPIBrokerFT.attachThread() informs the MB that the current (newly created) thread with the specified context will begin using MB functions.

Parameters
mbPoints to a CMPIBroker structure.
ctx

Points to the CMPIContext object that was returned by a prior call to CMPIBrokerFT.prepareAttachThread().

The opaque part of the CMPIContext object can be used by the MB to carry the MB internal security context. Such MBs can set up the security context for the current thread in this function.

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 mb or ctx handle is invalid.
Convenience Function
CBAttachThread()
CMPIStatus(* CMPIBrokerFT::detachThread)(const CMPIBroker *mb, const CMPIContext *ctx)

Inform the MB that the current thread will no longer use MB functions.

CMPIBrokerFT.detachThread() informs the MB that the current thread will no longer be using MB functions.

Parameters
mbPoints to a CMPIBroker structure.
ctx

Points to the CMPIContext object that was returned by the prior call to CMPIBrokerFT.prepareAttachThread().

The opaque part of the CMPIContext object can be used by the MB to carry the MB internal security context. Such MBs can set up the security context for the current thread in this function.

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 mb or ctx handle is invalid.
Convenience Function
CBDetachThread()