version 1.26.2.1, 2006/02/10 16:11:57
|
version 1.26.2.2, 2006/03/07 18:45:57
|
|
|
return NULL; | return NULL; |
} | } |
| |
static CMPIData mbInvokeMethod(const CMPIBroker *mb, const CMPIContext *ctx, |
#define CM_Args(args) ((Array<CIMParamValue>*)args->hdl) |
const CMPIObjectPath *cop, const char *method, const CMPIArgs *in, CMPIArgs *out, |
|
CMPIStatus *rc) { |
static CMPIData mbInvokeMethod(const CMPIBroker *mb, |
|
const CMPIContext *ctx, |
|
const CMPIObjectPath *cop, |
|
const char *method, |
|
const CMPIArgs *in, |
|
CMPIArgs *out, |
|
CMPIStatus *rc) |
|
{ |
|
DDD(cout<<"--- mbInvokeMethod()"<<endl); |
CMPIData data={0,CMPI_nullValue,{0}}; | CMPIData data={0,CMPI_nullValue,{0}}; |
mb=CM_BROKER; | mb=CM_BROKER; |
if (rc) CMSetStatus(rc,CMPI_RC_ERR_NOT_SUPPORTED); |
CIMObjectPath qop(String::EMPTY,CIMNamespaceName(), |
|
CM_ObjectPath(cop)->getClassName(), |
|
CM_ObjectPath(cop)->getKeyBindings()); |
|
|
|
AutoMutex mtx(((CMPI_Broker*)mb)->mtx); |
|
try { |
|
CIMValue v=CM_CIMOM(mb)->invokeMethod( |
|
OperationContext(*CM_Context(ctx)), |
|
CM_ObjectPath(cop)->getNameSpace(), |
|
qop, |
|
method ? String(method) : String::EMPTY, |
|
*CM_Args(in), |
|
*CM_Args(out)); |
|
CIMType vType=v.getType(); |
|
CMPIType t=type2CMPIType(vType,v.isArray()); |
|
value2CMPIData(v,t,&data); |
|
if (rc) |
|
{ |
|
CMSetStatus(rc,CMPI_RC_OK); |
|
} |
|
return data; |
|
} |
|
catch (const CIMException &e) { |
|
DDD(cout<<"### exception: mbInvokeMethod - code: "<<e.getCode()<<" msg: "<<e.getMessage()<<endl); |
|
if (rc) |
|
{ |
|
CMSetStatusWithString(rc,(CMPIrc)e.getCode(), |
|
(CMPIString*)string2CMPIString(e.getMessage())); |
|
} |
|
} |
|
if (rc) |
|
{ |
|
CMSetStatusWithChars(mb,rc,CMPI_RC_ERROR,"Internal error - CMPIBroker.cpp-11.1"); |
|
} |
return data; | return data; |
} | } |
| |