CmpiBroker Class Reference

This class encapsulates services provided by the CIM Object Manager. More...

#include <CmpiBroker.h>

Inheritance diagram for CmpiBroker:

Inheritance graph
[legend]
Collaboration diagram for CmpiBroker:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CmpiBroker (CMPIBroker *b)
CmpiContext prepareAttachThread (const CmpiContext &ctx)
 This function prepares the CMPI run time system to accept a thread that will be using CMPI services.
void attachThread (const CmpiContext &ctx)
 This function informs the CMPI run time system that the current thread with Context will begin using CMPI services.
void detachThread (const CmpiContext &ctx)
 This function informs the CMPI run time system that the current thread will not be using CMPI services anymore.
void deliverIndication (const CmpiContext &ctx, const char *ns, const CmpiInstance &ind)
 This function requests delivery of an Indication.
CmpiEnumeration enumInstanceNames (const CmpiContext &ctx, const CmpiObjectPath &op)
 Enumerate Instance Names of the class (and subclasses) defined by <op>.
CmpiInstance getInstance (const CmpiContext &ctx, const CmpiObjectPath &op, const char **properties)
 Get Instance using <op> as reference.
CmpiObjectPath createInstance (const CmpiContext &ctx, const CmpiObjectPath &op, const CmpiInstance &inst)
 Create Instance from <inst> using <op> as reference.
void setInstance (const CmpiContext &ctx, const CmpiObjectPath &op, const CmpiInstance &inst)
 Replace an existing Instance from <inst> using <op> as reference.
void deleteInstance (const CmpiContext &ctx, const CmpiObjectPath &op)
 Delete an existing Instance using <op> as reference.
CmpiEnumeration execQuery (const CmpiContext &ctx, const CmpiObjectPath &op, const char *query, const char *lang)
 Query the enumeration of instances of the class (and subclasses) defined by <op> using <query> expression.
CmpiEnumeration enumInstances (const CmpiContext &ctx, const CmpiObjectPath &op, const char **properties)
 Enumerate Instances of the class (and subclasses) defined by <op>.
CmpiEnumeration associators (const CmpiContext &ctx, const CmpiObjectPath &op, const char *assocClass, const char *resultClass, const char *role, const char *resultRole, const char **properties)
 Enumerate instances associated with the Instance defined by the <op>.
CmpiEnumeration associatorNames (const CmpiContext &ctx, const CmpiObjectPath &op, const char *assocClass, const char *resultClass, const char *role, const char *resultRole)
 Enumerate ObjectPaths associated with the Instance defined by <op>.
CmpiEnumeration references (const CmpiContext &ctx, const CmpiObjectPath &op, const char *resultClass, const char *role, const char **properties)
 Enumerates the association instances that refer to the instance defined by <op>.
CmpiEnumeration referenceNames (const CmpiContext &ctx, const CmpiObjectPath &op, const char *resultClass, const char *role)
 Enumerates the association ObjectPaths that refer to the instance defined by <op>.
CmpiData invokeMethod (const CmpiContext &ctx, const CmpiObjectPath &op, const char *method, const CmpiArgs &in, CmpiArgs &out)
 Invoke a named, extrinsic method of an Instance defined by the <op> parameter.
void setProperty (const CmpiContext &ctx, const CmpiObjectPath &op, const char *name, const CmpiData &data)
 Set the named property value of an Instance defined by the <op> parameter.
CmpiData getProperty (const CmpiContext &ctx, const CmpiObjectPath &op, const char *name)
 Get the named property value of an Instance defined by the <op> parameter.

Protected Member Functions

CMPIBrokergetEnc () const
 getEnc - Gets the encapsulated CMPIBroker.

Private Member Functions

 CmpiBroker ()
 Constructor - Should not be called.

Friends

class CmpiBaseMI
class CmpiInstanceMI
class CmpiInstance
class CmpiObjectPath
class CmpiEnumeration

Detailed Description

This class encapsulates services provided by the CIM Object Manager.

Definition at line 42 of file CmpiBroker.h.


Constructor & Destructor Documentation

CmpiBroker::CmpiBroker  )  [inline, private]
 

Constructor - Should not be called.

Definition at line 64 of file CmpiBroker.h.

CmpiBroker::CmpiBroker CMPIBroker b  )  [inline]
 

Definition at line 67 of file CmpiBroker.h.


Member Function Documentation

CmpiEnumeration CmpiBroker::associatorNames const CmpiContext ctx,
const CmpiObjectPath op,
const char *  assocClass,
const char *  resultClass,
const char *  role,
const char *  resultRole
 

Enumerate ObjectPaths associated with the Instance defined by <op>.

Parameters:
ctx Context object
op Source ObjectPath containing namespace, classname and key components.
assocClass If not NULL, MUST be a valid Association Class name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be associated to the source Object via an Instance of this Class or one of its subclasses.
resultClass If not NULL, MUST be a valid Class name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be either an Instance of this Class (or one of its subclasses).
role If not NULL, MUST be a valid Property name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be associated to the source Object via an Association in which the source Object plays the specified role (i.e. the name of the Property in the Association Class that refers to the source Object MUST match the value of this parameter).
resultRole If not NULL, MUST be a valid Property name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be associated to the source Object via an Association in which the returned Object plays the specified role (i.e. the name of the Property in the Association Class that refers to the returned Object MUST match the value of this parameter).
Returns:
Enumeration of ObjectPaths.

Definition at line 1010 of file CmpiImpl.cpp.

References CMPI_RC_ERR_NOT_SUPPORTED.

CmpiEnumeration CmpiBroker::associators const CmpiContext ctx,
const CmpiObjectPath op,
const char *  assocClass,
const char *  resultClass,
const char *  role,
const char *  resultRole,
const char **  properties
 

Enumerate instances associated with the Instance defined by the <op>.

Parameters:
ctx Context object
op Source ObjectPath containing namespace, classname and key components.
assocClass If not NULL, MUST be a valid Association Class name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be associated to the source Object via an Instance of this Class or one of its subclasses.
resultClass If not NULL, MUST be a valid Class name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be either an Instance of this Class (or one of its subclasses).
role If not NULL, MUST be a valid Property name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be associated to the source Object via an Association in which the source Object plays the specified role (i.e. the name of the Property in the Association Class that refers to the source Object MUST match the value of this parameter).
resultRole If not NULL, MUST be a valid Property name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be associated to the source Object via an Association in which the returned Object plays the specified role (i.e. the name of the Property in the Association Class that refers to the returned Object MUST match the value of this parameter).
properties If not NULL, the members of the array define one or more Property names. Each returned Object MUST NOT include elements for any Properties missing from this list
Returns:
Enumeration of Instances.

Definition at line 1001 of file CmpiImpl.cpp.

References CMPI_RC_ERR_NOT_SUPPORTED.

void CmpiBroker::attachThread const CmpiContext ctx  ) 
 

This function informs the CMPI run time system that the current thread with Context will begin using CMPI services.

Parameters:
ctx Context object

CmpiObjectPath CmpiBroker::createInstance const CmpiContext ctx,
const CmpiObjectPath op,
const CmpiInstance inst
 

Create Instance from <inst> using <op> as reference.

Parameters:
ctx Context object
op ObjectPath containing namespace, classname and key components.
inst Complete instance.
Returns:
The assigned instance reference.

Definition at line 964 of file CmpiImpl.cpp.

References CMPI_RC_ERR_NOT_SUPPORTED.

void CmpiBroker::deleteInstance const CmpiContext ctx,
const CmpiObjectPath op
 

Delete an existing Instance using <op> as reference.

Parameters:
ctx Context object
op ObjectPath containing namespace, classname and key components.

Definition at line 977 of file CmpiImpl.cpp.

References CMPI_RC_ERR_NOT_SUPPORTED.

void CmpiBroker::deliverIndication const CmpiContext ctx,
const char *  ns,
const CmpiInstance ind
 

This function requests delivery of an Indication.

The CIMOM will locate pertinent subscribers and notify them about the event.

Parameters:
ctx Context object
ns Namespace
ind Indication Instance

Definition at line 934 of file CmpiImpl.cpp.

References CMPI_RC_ERR_NOT_SUPPORTED.

void CmpiBroker::detachThread const CmpiContext ctx  ) 
 

This function informs the CMPI run time system that the current thread will not be using CMPI services anymore.

The Context object will be freed during this operation.

Parameters:
ctx Context object

CmpiEnumeration CmpiBroker::enumInstanceNames const CmpiContext ctx,
const CmpiObjectPath op
 

Enumerate Instance Names of the class (and subclasses) defined by <op>.

Parameters:
ctx Context object
op ObjectPath containing namespace and classname components.
Returns:
Enumeration of ObjectPathes.

Definition at line 941 of file CmpiImpl.cpp.

References _CMPIBroker::bft, CMPI_RC_OK, CmpiEnumeration, cop, _CMPIBrokerFT::enumInstanceNames, CmpiContext::getEnc(), getEnc(), and _CMPIStatus::rc.

CmpiEnumeration CmpiBroker::enumInstances const CmpiContext ctx,
const CmpiObjectPath op,
const char **  properties
 

Enumerate Instances of the class (and subclasses) defined by <op>.

Instance structure and inheritance scope can be controled using the CMPIInvocationFlags entry in <ctx>.

Parameters:
ctx Context object
op ObjectPath containing namespace and classname components.
properties If not NULL, the members of the array define one or more Property names. Each returned Object MUST NOT include elements for any Properties missing from this list
Returns:
Enumeration of Instances.

Definition at line 990 of file CmpiImpl.cpp.

References _CMPIBroker::bft, CMPI_RC_OK, CmpiEnumeration, cop, _CMPIBrokerFT::enumInstances, CmpiContext::getEnc(), getEnc(), and _CMPIStatus::rc.

CmpiEnumeration CmpiBroker::execQuery const CmpiContext ctx,
const CmpiObjectPath op,
const char *  query,
const char *  lang
 

Query the enumeration of instances of the class (and subclasses) defined by <op> using <query> expression.

Parameters:
ctx Context object
op ObjectPath containing namespace and classname components.
query Query expression
lang Query Language
Returns:
Resulting eumeration of Instances.

Definition at line 982 of file CmpiImpl.cpp.

References CMPI_RC_ERR_NOT_SUPPORTED.

CMPIBroker* CmpiBroker::getEnc  )  const [inline, protected]
 

getEnc - Gets the encapsulated CMPIBroker.

Definition at line 58 of file CmpiBroker.h.

References CmpiObject::enc.

Referenced by enumInstanceNames(), enumInstances(), and getInstance().

CmpiInstance CmpiBroker::getInstance const CmpiContext ctx,
const CmpiObjectPath op,
const char **  properties
 

Get Instance using <op> as reference.

Instance structure can be controled using the CMPIInvocationFlags entry in <ctx>.

Parameters:
ctx Context object
op ObjectPath containing namespace, classname and key components.
properties If not NULL, the members of the array define one or more Property names. Each returned Object MUST NOT include elements for any Properties missing from this list
Returns:
The Instance.

Definition at line 951 of file CmpiImpl.cpp.

References _CMPIBroker::bft, CMPI_RC_OK, CmpiInstance, cop, CmpiContext::getEnc(), getEnc(), _CMPIBrokerFT::getInstance, and _CMPIStatus::rc.

CmpiData CmpiBroker::getProperty const CmpiContext ctx,
const CmpiObjectPath op,
const char *  name
 

Get the named property value of an Instance defined by the <op> parameter.

Parameters:
ctx Context object
op ObjectPath containing namespace, classname and key components.
name Property name
Returns:
Property value.

Definition at line 1045 of file CmpiImpl.cpp.

References CMPI_RC_ERR_NOT_SUPPORTED.

CmpiData CmpiBroker::invokeMethod const CmpiContext ctx,
const CmpiObjectPath op,
const char *  method,
const CmpiArgs in,
CmpiArgs out
 

Invoke a named, extrinsic method of an Instance defined by the <op> parameter.

Parameters:
ctx Context object
op ObjectPath containing namespace, classname and key components.
method Method name
in Input parameters.
out Output parameters.
Returns:
Method return value.

Definition at line 1033 of file CmpiImpl.cpp.

References CMPI_RC_ERR_NOT_SUPPORTED.

CmpiContext CmpiBroker::prepareAttachThread const CmpiContext ctx  ) 
 

This function prepares the CMPI run time system to accept a thread that will be using CMPI services.

The returned CMPIContext object must be used by the subsequent attachThread() and detachThread() invocations.

Parameters:
ctx Old Context object
Returns:
New Context object to be used by thread to be attached.

CmpiEnumeration CmpiBroker::referenceNames const CmpiContext ctx,
const CmpiObjectPath op,
const char *  resultClass,
const char *  role
 

Enumerates the association ObjectPaths that refer to the instance defined by <op>.

Parameters:
ctx Context object
op Source ObjectPath containing namespace, classname and key components.
resultClass If not NULL, MUST be a valid Class name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be either an Instance of this Class (or one of its subclasses).
role If not NULL, MUST be a valid Property name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be associated to the source Object via an Association in which the source Object plays the specified role (i.e. the name of the Property in the Association Class that refers to the source Object MUST match the value of this parameter).
Returns:
Enumeration of ObjectPaths.

Definition at line 1026 of file CmpiImpl.cpp.

References CMPI_RC_ERR_NOT_SUPPORTED.

CmpiEnumeration CmpiBroker::references const CmpiContext ctx,
const CmpiObjectPath op,
const char *  resultClass,
const char *  role,
const char **  properties
 

Enumerates the association instances that refer to the instance defined by <op>.

Parameters:
ctx Context object
op Source ObjectPath containing namespace, classname and key components.
resultClass If not NULL, MUST be a valid Class name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be either an Instance of this Class (or one of its subclasses).
role If not NULL, MUST be a valid Property name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be associated to the source Object via an Association in which the source Object plays the specified role (i.e. the name of the Property in the Association Class that refers to the source Object MUST match the value of this parameter).
properties If not NULL, the members of the array define one or more Property names. Each returned Object MUST NOT include elements for any Properties missing from this list
Returns:
Enumeration of ObjectPaths.

Definition at line 1018 of file CmpiImpl.cpp.

References CMPI_RC_ERR_NOT_SUPPORTED.

void CmpiBroker::setInstance const CmpiContext ctx,
const CmpiObjectPath op,
const CmpiInstance inst
 

Replace an existing Instance from <inst> using <op> as reference.

Parameters:
ctx Context object
op ObjectPath containing namespace, classname and key components.
inst Complete instance.

Definition at line 971 of file CmpiImpl.cpp.

References CMPI_RC_ERR_NOT_SUPPORTED.

void CmpiBroker::setProperty const CmpiContext ctx,
const CmpiObjectPath op,
const char *  name,
const CmpiData data
 

Set the named property value of an Instance defined by the <op> parameter.

Parameters:
ctx Context object
op ObjectPath containing namespace, classname and key components.
name Property name
data Property value.

Definition at line 1039 of file CmpiImpl.cpp.

References CMPI_RC_ERR_NOT_SUPPORTED.


Friends And Related Function Documentation

friend class CmpiBaseMI [friend]
 

Definition at line 43 of file CmpiBroker.h.

friend class CmpiEnumeration [friend]
 

Definition at line 47 of file CmpiBroker.h.

Referenced by enumInstanceNames(), and enumInstances().

friend class CmpiInstance [friend]
 

Reimplemented from CmpiObject.

Definition at line 45 of file CmpiBroker.h.

Referenced by getInstance().

friend class CmpiInstanceMI [friend]
 

Definition at line 44 of file CmpiBroker.h.

friend class CmpiObjectPath [friend]
 

Reimplemented from CmpiObject.

Definition at line 46 of file CmpiBroker.h.


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:12:04 2006 for openwbem by  doxygen 1.4.6