cmpi
Public Member Functions | List of all members
CmpiBroker Class Reference

#include <cmpi/CmpiBroker.h>

Inheritance diagram for CmpiBroker:
CmpiObject

Public Member Functions

 CmpiBroker (CMPIBroker *b)
 
CMPIBrokergetEnc () const
 
CmpiContext prepareAttachThread (const CmpiContext &ctx)
 
void attachThread (const CmpiContext &ctx)
 
void detachThread (const CmpiContext &ctx)
 
void deliverIndication (const CmpiContext &ctx, const char *ns, const CmpiInstance &ind)
 
CmpiEnumeration enumInstanceNames (const CmpiContext &ctx, const CmpiObjectPath &op)
 
CmpiInstance getInstance (const CmpiContext &ctx, const CmpiObjectPath &op, const char **properties)
 
CmpiObjectPath createInstance (const CmpiContext &ctx, const CmpiObjectPath &op, const CmpiInstance &inst)
 
void setInstance (const CmpiContext &ctx, const CmpiObjectPath &op, const CmpiInstance &inst, const char **properties)
 
void deleteInstance (const CmpiContext &ctx, const CmpiObjectPath &op)
 
CmpiEnumeration execQuery (const CmpiContext &ctx, const CmpiObjectPath &op, const char *query, const char *lang)
 
CmpiEnumeration enumInstances (const CmpiContext &ctx, const CmpiObjectPath &op, const char **properties)
 
CmpiEnumeration associators (const CmpiContext &ctx, const CmpiObjectPath &op, const char *assocClass, const char *resultClass, const char *role, const char *resultRole, const char **properties)
 
CmpiEnumeration associatorNames (const CmpiContext &ctx, const CmpiObjectPath &op, const char *assocClass, const char *resultClass, const char *role, const char *resultRole)
 
CmpiEnumeration references (const CmpiContext &ctx, const CmpiObjectPath &op, const char *resultClass, const char *role, const char **properties)
 
CmpiEnumeration referenceNames (const CmpiContext &ctx, const CmpiObjectPath &op, const char *resultClass, const char *role)
 
CmpiData invokeMethod (const CmpiContext &ctx, const CmpiObjectPath &op, const char *method, const CmpiArgs &in, CmpiArgs &out)
 
void setProperty (const CmpiContext &ctx, const CmpiObjectPath &op, const char *name, const CmpiData &data)
 
CmpiData getProperty (const CmpiContext &ctx, const CmpiObjectPath &op, const char *name)
 
- Public Member Functions inherited from CmpiObject
CmpiBoolean isNull () const
 
CmpiString toString ()
 
CmpiBoolean isA (const char *typeName) const
 

Additional Inherited Members

- Protected Member Functions inherited from CmpiObject
 CmpiObject ()
 
 CmpiObject (const void *enc)
 
CmpiString doToString (CMPIBroker *mb)
 
CmpiBoolean doIsA (CMPIBroker *mb, const char *typeName) const
 
- Protected Attributes inherited from CmpiObject
void * enc
 

Detailed Description

This class encapsulates services provided by the CIM Object Manager

Constructor & Destructor Documentation

◆ CmpiBroker()

CmpiBroker::CmpiBroker ( CMPIBroker b)

constructor to encapsulate CMPIBroker.

Member Function Documentation

◆ associatorNames()

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
ctxContext object
opSource ObjectPath containing namespace, classname and key components.
assocClassIf 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.
resultClassIf 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).
roleIf 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).
resultRoleIf 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.

References CMPI_RC_ERR_NOT_SUPPORTED.

◆ associators()

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
ctxContext object
opSource ObjectPath containing namespace, classname and key components.
assocClassIf 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.
resultClassIf 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).
roleIf 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).
resultRoleIf 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).
propertiesIf 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.

References CMPI_RC_ERR_NOT_SUPPORTED.

◆ attachThread()

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
ctxContext object

References _CMPIBrokerFT::attachThread, _CMPIBroker::bft, CMPI_RC_OK, getEnc(), CmpiContext::getEnc(), and _CMPIStatus::rc.

◆ createInstance()

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

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

Parameters
ctxContext object
opObjectPath containing namespace, classname and key components.
instComplete instance.
Returns
The assigned instance reference.

References _CMPIBroker::bft, CMPI_RC_OK, CmpiObject::CmpiObjectPath, _CMPIBrokerFT::createInstance, getEnc(), CmpiInstance::getEnc(), CmpiContext::getEnc(), CmpiObjectPath::getEnc(), and _CMPIStatus::rc.

◆ deleteInstance()

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

Delete an existing Instance using <op> as reference.

Parameters
ctxContext object
opObjectPath containing namespace, classname and key components.

References _CMPIBroker::bft, CMPI_RC_OK, _CMPIBrokerFT::deleteInstance, getEnc(), CmpiContext::getEnc(), CmpiObjectPath::getEnc(), and _CMPIStatus::rc.

◆ deliverIndication()

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
ctxContext object
nsNamespace
indIndication Instance

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

◆ detachThread()

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
ctxContext object

References _CMPIBroker::bft, CMPI_RC_OK, _CMPIBrokerFT::detachThread, getEnc(), CmpiContext::getEnc(), and _CMPIStatus::rc.

◆ enumInstanceNames()

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

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

Parameters
ctxContext object
opObjectPath containing namespace and classname components.
Returns
Enumeration of ObjectPathes.

References _CMPIBroker::bft, CMPI_RC_OK, _CMPIBrokerFT::enumerateInstanceNames, getEnc(), CmpiContext::getEnc(), CmpiObjectPath::getEnc(), and _CMPIStatus::rc.

◆ enumInstances()

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
ctxContext object
opObjectPath containing namespace and classname components.
propertiesIf 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.

References _CMPIBroker::bft, CMPI_RC_OK, _CMPIBrokerFT::enumerateInstances, getEnc(), CmpiContext::getEnc(), CmpiObjectPath::getEnc(), and _CMPIStatus::rc.

◆ execQuery()

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
ctxContext object
opObjectPath containing namespace and classname components.
queryQuery expression
langQuery Language
Returns
Resulting eumeration of Instances.

References CMPI_RC_ERR_NOT_SUPPORTED.

◆ getEnc()

CMPIBroker * CmpiBroker::getEnc ( ) const

◆ 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
ctxContext object
opObjectPath containing namespace, classname and key components.
propertiesIf 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.

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

◆ getProperty()

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
ctxContext object
opObjectPath containing namespace, classname and key components.
nameProperty name
Returns
Property value.

References CMPI_RC_ERR_NOT_SUPPORTED.

◆ invokeMethod()

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
ctxContext object
opObjectPath containing namespace, classname and key components.
methodMethod name
inInput parameters.
outOutput parameters.
Returns
Method return value.

References CMPI_RC_ERR_NOT_SUPPORTED.

◆ prepareAttachThread()

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
ctxOld Context object
Returns
New Context object to be used by thread to be attached.

References _CMPIBroker::bft, getEnc(), CmpiContext::getEnc(), and _CMPIBrokerFT::prepareAttachThread.

◆ referenceNames()

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
ctxContext object
opSource ObjectPath containing namespace, classname and key components.
resultClassIf 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).
roleIf 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.

References CMPI_RC_ERR_NOT_SUPPORTED.

◆ references()

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
ctxContext object
opSource ObjectPath containing namespace, classname and key components.
resultClassIf 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).
roleIf 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).
propertiesIf 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.

References CMPI_RC_ERR_NOT_SUPPORTED.

◆ setInstance()

void CmpiBroker::setInstance ( const CmpiContext ctx,
const CmpiObjectPath op,
const CmpiInstance inst,
const char **  properties 
)

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

Parameters
ctxContext object
opObjectPath containing namespace, classname and key components.
instComplete instance.

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

◆ setProperty()

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
ctxContext object
opObjectPath containing namespace, classname and key components.
nameProperty name
dataProperty value.

References CMPI_RC_ERR_NOT_SUPPORTED.


The documentation for this class was generated from the following files: