version 1.5, 2008/12/09 18:47:44
|
version 1.12.2.4, 2012/02/15 17:47:06
|
|
|
#define INCLUDE_QUALIFIERS (1 << 1) | #define INCLUDE_QUALIFIERS (1 << 1) |
#define INCLUDE_CLASS_ORIGIN (1 << 2) | #define INCLUDE_CLASS_ORIGIN (1 << 2) |
#define DEEP_INHERITANCE (1 << 3) | #define DEEP_INHERITANCE (1 << 3) |
|
#define CONTINUE_ON_ERROR (1 << 4) |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
OP_DeleteQualifier, | OP_DeleteQualifier, |
OP_EnumerateQualifiers, | OP_EnumerateQualifiers, |
OP_InvokeMethod, | OP_InvokeMethod, |
|
// EXP_PULL_BEGIN |
|
OP_OpenEnumerateInstances, |
|
OP_OpenEnumerateInstancePaths, |
|
OP_OpenReferenceInstances, |
|
OP_OpenReferenceInstancePaths, |
|
OP_OpenAssociatorInstances, |
|
OP_OpenAssociatorInstancePaths, |
|
OP_PullInstancesWithPath, |
|
OP_PullInstancePaths, |
|
OP_CloseEnumeration, |
|
OP_EnumerationCount, |
|
// EXP_PULL_END |
OP_Count | OP_Count |
}; | }; |
| |
struct CIMBufferReleaser |
|
{ |
|
CIMBufferReleaser(CIMBuffer& buf) : _buf(buf) |
|
{ |
|
} |
|
|
|
~CIMBufferReleaser() |
|
{ |
|
_buf.release(); |
|
} |
|
|
|
private: |
|
CIMBuffer& _buf; |
|
}; |
|
|
|
static Operation _NameToOp(const CIMName& name) | static Operation _NameToOp(const CIMName& name) |
{ | { |
const String& s = name.getString(); | const String& s = name.getString(); |
|
|
return OP_CreateInstance; | return OP_CreateInstance; |
if (_EQUAL(s, "CreateClass")) | if (_EQUAL(s, "CreateClass")) |
return OP_CreateClass; | return OP_CreateClass; |
|
//EXP_PULL_BEGIN |
|
if (_EQUAL(s, "CloseEnumeration")) |
|
return OP_CloseEnumeration; |
|
// EXP_PULL_END |
break; | break; |
case 'D': | case 'D': |
if (_EQUAL(s, "DeleteInstance")) | if (_EQUAL(s, "DeleteInstance")) |
|
|
if (_EQUAL(s, "ModifyClass")) | if (_EQUAL(s, "ModifyClass")) |
return OP_ModifyClass; | return OP_ModifyClass; |
break; | break; |
|
// EXP_PULL_BEGIN |
|
case 'O': |
|
if (_EQUAL(s, "OpenEnumerateInstances")) |
|
return OP_OpenEnumerateInstances; |
|
if (_EQUAL(s, "OpenEnumerateInstancePaths")) |
|
return OP_OpenEnumerateInstancePaths; |
|
if (_EQUAL(s, "OpenReferenceInstances")) |
|
return OP_OpenReferenceInstances; |
|
if (_EQUAL(s, "OpenReferenceInstancePaths")) |
|
return OP_OpenReferenceInstancePaths; |
|
if (_EQUAL(s, "OpenAssociatorInstances")) |
|
return OP_OpenAssociatorInstances; |
|
if (_EQUAL(s, "OpenAssociatorInstancePaths")) |
|
return OP_OpenAssociatorInstancePaths; |
|
break; |
|
case 'P': |
|
if (_EQUAL(s, "PullInstancesWithPath")) |
|
return OP_PullInstancesWithPath; |
|
if (_EQUAL(s, "PullInstancePaths")) |
|
return OP_PullInstancePaths; |
|
break; |
|
// EXP_PULL_END |
case 'R': | case 'R': |
if (_EQUAL(s, "References")) | if (_EQUAL(s, "References")) |
return OP_References; | return OP_References; |
|
|
| |
Uint32 flags = 0; | Uint32 flags = 0; |
| |
if (msg->localOnly) |
|
flags |= LOCAL_ONLY; |
|
|
|
if (msg->deepInheritance) | if (msg->deepInheritance) |
flags |= DEEP_INHERITANCE; | flags |= DEEP_INHERITANCE; |
| |
|
|
nameSpace, | nameSpace, |
className, | className, |
deepInheritance, | deepInheritance, |
false, // Bug 1985 localOnly is deprecated |
|
#ifdef PEGASUS_DISABLE_INSTANCE_QUALIFIERS | #ifdef PEGASUS_DISABLE_INSTANCE_QUALIFIERS |
false, | false, |
#else | #else |
|
|
| |
static void _encodeEnumerateInstancesResponseBody( | static void _encodeEnumerateInstancesResponseBody( |
CIMBuffer& out, | CIMBuffer& out, |
CIMEnumerateInstancesResponseMessage* msg, |
CIMResponseData& data, |
CIMName& name) |
CIMName& name, |
|
bool isFirst) |
{ | { |
/* See ../Server/CIMOperationResponseEncoder.cpp */ | /* See ../Server/CIMOperationResponseEncoder.cpp */ |
| |
static const CIMName NAME("EnumerateInstances"); | static const CIMName NAME("EnumerateInstances"); |
name = NAME; | name = NAME; |
| |
if (msg->resolveCallback && msg->binaryEncoding) |
// Only write the property list on the first provider response |
{ |
if (isFirst) |
const Array<Uint8>& data = msg->binaryData; |
|
out.putBytes(data.getData(), data.size()); |
|
} |
|
else |
|
{ | { |
out.putInstanceA(msg->getNamedInstances(), false); |
// [PROPERTY-LIST] |
|
out.putPropertyList(data.getPropertyList()); |
} | } |
|
data.encodeBinaryResponse(out); |
} | } |
| |
static CIMEnumerateInstancesResponseMessage* _decodeEnumerateInstancesResponse( | static CIMEnumerateInstancesResponseMessage* _decodeEnumerateInstancesResponse( |
CIMBuffer& in, | CIMBuffer& in, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
|
Array<CIMInstance> instances; |
|
|
|
while (in.more()) |
|
{ |
|
Array<CIMInstance> tmp; |
|
|
|
if (!in.getInstanceA(tmp)) |
|
return 0; |
|
|
|
instances.append(tmp.getData(), tmp.size()); |
|
} |
|
|
|
CIMEnumerateInstancesResponseMessage* msg; | CIMEnumerateInstancesResponseMessage* msg; |
CIMException cimException; | CIMException cimException; |
| |
|
|
cimException, | cimException, |
QueueIdStack()); | QueueIdStack()); |
| |
msg->setNamedInstances(instances); |
// Instead of resolving the binary data here, we delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to CIMResponseData::getInstances, which |
|
// resolves the binary data as it is passed to the next interface. |
|
// This allows an alternate client implementation to gain direct access |
|
// to the binary data and pass this for example to the JNI implementation |
|
// of the JSR48 CIM Client for Java. |
|
CIMResponseData& responseData = msg->getResponseData(); |
|
|
|
// [PROPERTY-LIST] |
|
CIMPropertyList propertyList; |
|
if (!in.getPropertyList(propertyList)) |
|
{ |
|
return 0; |
|
} |
|
responseData.setPropertyList(propertyList); |
|
|
|
responseData.setRemainingBinaryData(in); |
|
|
msg->binaryRequest = true; | msg->binaryRequest = true; |
return msg; | return msg; |
} | } |
|
|
CIMBuffer& in, | CIMBuffer& in, |
Uint32 queueId, | Uint32 queueId, |
Uint32 returnQueueId, | Uint32 returnQueueId, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
STAT_GETSTARTTIME | STAT_GETSTARTTIME |
|
|
static CIMEnumerateInstanceNamesResponseMessage* | static CIMEnumerateInstanceNamesResponseMessage* |
_decodeEnumerateInstanceNamesResponse( | _decodeEnumerateInstanceNamesResponse( |
CIMBuffer& in, | CIMBuffer& in, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
Array<CIMObjectPath> instanceNames; |
|
|
|
while (in.more()) |
|
{ |
|
Array<CIMObjectPath> tmp; |
|
|
|
if (!in.getObjectPathA(tmp)) |
|
return 0; |
|
|
|
instanceNames.append(tmp.getData(), tmp.size()); |
|
} |
|
|
|
CIMEnumerateInstanceNamesResponseMessage* msg; | CIMEnumerateInstanceNamesResponseMessage* msg; |
CIMException cimException; | CIMException cimException; |
| |
msg = new CIMEnumerateInstanceNamesResponseMessage( | msg = new CIMEnumerateInstanceNamesResponseMessage( |
messageId, | messageId, |
cimException, | cimException, |
QueueIdStack(), |
QueueIdStack()); |
instanceNames); |
|
|
// Instead of resolving the binary data here, we delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to CIMResponseData::getInstanceNames, which |
|
// resolves the binary data as it is passed to the next interface. |
|
// This allows an alternate client implementation to gain direct access |
|
// to the binary data and pass this for example to the JNI implementation |
|
// of the JSR48 CIM Client for Java. |
|
CIMResponseData& responseData = msg->getResponseData(); |
|
responseData.setRemainingBinaryData(in); |
| |
msg->binaryRequest = true; | msg->binaryRequest = true; |
return msg; | return msg; |
|
|
| |
static void _encodeEnumerateInstanceNamesResponseBody( | static void _encodeEnumerateInstanceNamesResponseBody( |
CIMBuffer& out, | CIMBuffer& out, |
CIMEnumerateInstanceNamesResponseMessage* msg, |
CIMResponseData& data, |
CIMName& name) | CIMName& name) |
{ | { |
static const CIMName NAME("EnumerateInstanceNames"); | static const CIMName NAME("EnumerateInstanceNames"); |
name = NAME; | name = NAME; |
| |
out.putObjectPathA(msg->instanceNames, false); |
data.encodeBinaryResponse(out); |
} | } |
| |
//============================================================================== | //============================================================================== |
|
|
messageId, | messageId, |
nameSpace, | nameSpace, |
instanceName, | instanceName, |
false, // Bug 1985 localOnly is deprecated |
|
#ifdef PEGASUS_DISABLE_INSTANCE_QUALIFIERS | #ifdef PEGASUS_DISABLE_INSTANCE_QUALIFIERS |
false, | false, |
#else | #else |
|
|
| |
static CIMGetInstanceResponseMessage* _decodeGetInstanceResponse( | static CIMGetInstanceResponseMessage* _decodeGetInstanceResponse( |
CIMBuffer& in, | CIMBuffer& in, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
CIMInstance instance; |
|
|
|
if (!in.getInstance(instance)) |
|
return 0; |
|
|
|
CIMGetInstanceResponseMessage* msg; | CIMGetInstanceResponseMessage* msg; |
CIMException cimException; | CIMException cimException; |
| |
|
|
cimException, | cimException, |
QueueIdStack()); | QueueIdStack()); |
| |
msg->setCimInstance(instance); |
// Instead of resolving the binary data here, we delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to CIMResponseData::getInstances, which |
|
// resolves the binary data as it is passed to the next interface. |
|
// This allows an alternate client implementation to gain direct access |
|
// to the binary data and pass this for example to the JNI implementation |
|
// of the JSR48 CIM Client for Java. |
|
CIMResponseData& responseData = msg->getResponseData(); |
|
responseData.setRemainingBinaryData(in); |
|
|
msg->binaryRequest = true; | msg->binaryRequest = true; |
return msg; | return msg; |
} | } |
|
|
| |
Uint32 flags = 0; | Uint32 flags = 0; |
| |
if (msg->localOnly) |
|
flags |= LOCAL_ONLY; |
|
|
|
if (msg->includeQualifiers) | if (msg->includeQualifiers) |
flags |= INCLUDE_QUALIFIERS; | flags |= INCLUDE_QUALIFIERS; |
| |
|
|
| |
static void _encodeGetInstanceResponseBody( | static void _encodeGetInstanceResponseBody( |
CIMBuffer& out, | CIMBuffer& out, |
CIMGetInstanceResponseMessage* msg, |
CIMResponseData& data, |
CIMName& name) | CIMName& name) |
{ | { |
static const CIMName NAME("GetInstance"); | static const CIMName NAME("GetInstance"); |
name = NAME; | name = NAME; |
| |
if (msg->resolveCallback && msg->binaryEncoding) |
data.encodeBinaryResponse(out); |
{ |
|
const Array<Uint8>& data = msg->binaryData; |
|
out.putBytes(data.getData(), data.size()); |
|
} |
|
else |
|
{ |
|
out.putInstance(msg->getCimInstance(), false, false); |
|
} |
|
} | } |
| |
//============================================================================== | //============================================================================== |
|
|
CIMBuffer& in, | CIMBuffer& in, |
Uint32 queueId, | Uint32 queueId, |
Uint32 returnQueueId, | Uint32 returnQueueId, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
STAT_GETSTARTTIME | STAT_GETSTARTTIME |
|
|
| |
static CIMCreateInstanceResponseMessage* _decodeCreateInstanceResponse( | static CIMCreateInstanceResponseMessage* _decodeCreateInstanceResponse( |
CIMBuffer& in, | CIMBuffer& in, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
CIMObjectPath instanceName; | CIMObjectPath instanceName; |
|
|
} | } |
| |
static void _encodeModifyInstanceResponseBody( | static void _encodeModifyInstanceResponseBody( |
CIMBuffer& out, |
|
CIMModifyInstanceResponseMessage* msg, |
|
CIMName& name) | CIMName& name) |
{ | { |
/* See ../Server/CIMOperationResponseEncoder.cpp */ | /* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
| |
static CIMModifyInstanceResponseMessage* _decodeModifyInstanceResponse( | static CIMModifyInstanceResponseMessage* _decodeModifyInstanceResponse( |
CIMBuffer& in, | CIMBuffer& in, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ | /* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
CIMBuffer& in, | CIMBuffer& in, |
Uint32 queueId, | Uint32 queueId, |
Uint32 returnQueueId, | Uint32 returnQueueId, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Server/CIMOperationRequestDecoder.cpp */ | /* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
} | } |
| |
static void _encodeDeleteInstanceResponseBody( | static void _encodeDeleteInstanceResponseBody( |
CIMBuffer& out, |
|
CIMDeleteInstanceResponseMessage* msg, |
|
CIMName& name) | CIMName& name) |
{ | { |
/* See ../Server/CIMOperationResponseEncoder.cpp */ | /* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
} | } |
| |
static CIMDeleteInstanceResponseMessage* _decodeDeleteInstanceResponse( | static CIMDeleteInstanceResponseMessage* _decodeDeleteInstanceResponse( |
CIMBuffer& in, |
|
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ | /* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
| |
static void _encodeAssociatorsResponseBody( | static void _encodeAssociatorsResponseBody( |
CIMBuffer& out, | CIMBuffer& out, |
CIMAssociatorsResponseMessage* msg, |
CIMResponseData& data, |
CIMName& name) | CIMName& name) |
{ | { |
/* See ../Server/CIMOperationResponseEncoder.cpp */ | /* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
static const CIMName NAME("Associators"); | static const CIMName NAME("Associators"); |
name = NAME; | name = NAME; |
| |
out.putObjectA(msg->cimObjects); |
|
|
data.encodeBinaryResponse(out); |
} | } |
| |
static CIMAssociatorsResponseMessage* _decodeAssociatorsResponse( | static CIMAssociatorsResponseMessage* _decodeAssociatorsResponse( |
CIMBuffer& in, | CIMBuffer& in, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
|
Array<CIMObject> cimObjects; |
|
|
|
while (in.more()) |
|
{ |
|
Array<CIMObject> tmp; |
|
|
|
if (!in.getObjectA(tmp)) |
|
return 0; |
|
|
|
cimObjects.append(tmp.getData(), tmp.size()); |
|
} |
|
|
|
CIMAssociatorsResponseMessage* msg; | CIMAssociatorsResponseMessage* msg; |
CIMException cimException; | CIMException cimException; |
| |
msg = new CIMAssociatorsResponseMessage( | msg = new CIMAssociatorsResponseMessage( |
messageId, | messageId, |
cimException, | cimException, |
QueueIdStack(), |
QueueIdStack()); |
cimObjects); |
|
|
// Instead of resolving the binary data here, we delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to CIMResponseData::getObjects, which |
|
// resolves the binary data as it is passed to the next interface. |
|
// This allows an alternate client implementation to gain direct access |
|
// to the binary data and pass this for example to the JNI implementation |
|
// of the JSR48 CIM Client for Java. |
|
CIMResponseData& responseData = msg->getResponseData(); |
|
responseData.setRemainingBinaryData(in); |
| |
msg->binaryRequest = true; | msg->binaryRequest = true; |
return msg; | return msg; |
|
|
CIMBuffer& in, | CIMBuffer& in, |
Uint32 queueId, | Uint32 queueId, |
Uint32 returnQueueId, | Uint32 returnQueueId, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Server/CIMOperationRequestDecoder.cpp */ | /* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
| |
static void _encodeAssociatorNamesResponseBody( | static void _encodeAssociatorNamesResponseBody( |
CIMBuffer& out, | CIMBuffer& out, |
CIMAssociatorNamesResponseMessage* msg, |
CIMResponseData& data, |
CIMName& name) | CIMName& name) |
{ | { |
/* See ../Server/CIMOperationResponseEncoder.cpp */ | /* See ../Server/CIMOperationResponseEncoder.cpp */ |
| |
static const CIMName NAME("AssociatorNames"); | static const CIMName NAME("AssociatorNames"); |
name = NAME; | name = NAME; |
|
data.encodeBinaryResponse(out); |
out.putObjectPathA(msg->objectNames); |
|
} | } |
| |
static CIMAssociatorNamesResponseMessage* _decodeAssociatorNamesResponse( | static CIMAssociatorNamesResponseMessage* _decodeAssociatorNamesResponse( |
CIMBuffer& in, | CIMBuffer& in, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
|
Array<CIMObjectPath> objectNames; |
|
|
|
while (in.more()) |
|
{ |
|
Array<CIMObjectPath> tmp; |
|
|
|
if (!in.getObjectPathA(tmp)) |
|
return 0; |
|
|
|
objectNames.append(tmp.getData(), tmp.size()); |
|
} |
|
|
|
CIMAssociatorNamesResponseMessage* msg; | CIMAssociatorNamesResponseMessage* msg; |
CIMException cimException; | CIMException cimException; |
| |
msg = new CIMAssociatorNamesResponseMessage( | msg = new CIMAssociatorNamesResponseMessage( |
messageId, | messageId, |
cimException, | cimException, |
QueueIdStack(), |
QueueIdStack()); |
objectNames); |
|
|
// Instead of resolving the binary data here, we delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to CIMResponseData::getInstanceNames, which |
|
// resolves the binary data as it is passed to the next interface. |
|
// This allows an alternate client implementation to gain direct access |
|
// to the binary data and pass this for example to the JNI implementation |
|
// of the JSR48 CIM Client for Java. |
|
CIMResponseData& responseData = msg->getResponseData(); |
|
responseData.setRemainingBinaryData(in); |
| |
msg->binaryRequest = true; | msg->binaryRequest = true; |
return msg; | return msg; |
|
|
| |
static void _encodeReferencesResponseBody( | static void _encodeReferencesResponseBody( |
CIMBuffer& out, | CIMBuffer& out, |
CIMReferencesResponseMessage* msg, |
CIMResponseData& data, |
CIMName& name) | CIMName& name) |
{ | { |
/* See ../Server/CIMOperationResponseEncoder.cpp */ | /* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
static const CIMName NAME("References"); | static const CIMName NAME("References"); |
name = NAME; | name = NAME; |
| |
out.putObjectA(msg->cimObjects); |
data.encodeBinaryResponse(out); |
} | } |
| |
static CIMReferencesResponseMessage* _decodeReferencesResponse( | static CIMReferencesResponseMessage* _decodeReferencesResponse( |
CIMBuffer& in, | CIMBuffer& in, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
|
Array<CIMObject> cimObjects; |
|
|
|
while (in.more()) |
|
{ |
|
Array<CIMObject> tmp; |
|
|
|
if (!in.getObjectA(tmp)) |
|
{ |
|
return 0; |
|
} |
|
|
|
cimObjects.append(tmp.getData(), tmp.size()); |
|
} |
|
|
|
CIMReferencesResponseMessage* msg; | CIMReferencesResponseMessage* msg; |
CIMException cimException; | CIMException cimException; |
| |
msg = new CIMReferencesResponseMessage( | msg = new CIMReferencesResponseMessage( |
messageId, | messageId, |
cimException, | cimException, |
QueueIdStack(), |
QueueIdStack()); |
cimObjects); |
|
|
// Instead of resolving the binary data right here, we delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to getNamedInstances, which is going to resolve the binary |
|
// data when the callback function is registered. |
|
// This allows an alternate client implementation to gain direct access |
|
// to the binary data and pass this for example to the JNI implementation |
|
// of the JSR48 CIM Client for Java. |
|
CIMResponseData& responseData = msg->getResponseData(); |
|
responseData.setRemainingBinaryData(in); |
| |
msg->binaryRequest = true; | msg->binaryRequest = true; |
return msg; | return msg; |
|
|
CIMBuffer& in, | CIMBuffer& in, |
Uint32 queueId, | Uint32 queueId, |
Uint32 returnQueueId, | Uint32 returnQueueId, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Server/CIMOperationRequestDecoder.cpp */ | /* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
| |
static void _encodeReferenceNamesResponseBody( | static void _encodeReferenceNamesResponseBody( |
CIMBuffer& out, | CIMBuffer& out, |
CIMReferenceNamesResponseMessage* msg, |
CIMResponseData& data, |
CIMName& name) | CIMName& name) |
{ | { |
/* See ../Server/CIMOperationResponseEncoder.cpp */ | /* See ../Server/CIMOperationResponseEncoder.cpp */ |
| |
static const CIMName NAME("ReferenceNames"); | static const CIMName NAME("ReferenceNames"); |
name = NAME; | name = NAME; |
|
data.encodeBinaryResponse(out); |
out.putObjectPathA(msg->objectNames); |
|
} | } |
| |
static CIMReferenceNamesResponseMessage* _decodeReferenceNamesResponse( | static CIMReferenceNamesResponseMessage* _decodeReferenceNamesResponse( |
CIMBuffer& in, | CIMBuffer& in, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ | /* See ../Client/CIMOperationResponseDecoder.cpp */ |
| |
Array<CIMObjectPath> objectNames; |
|
|
|
while (in.more()) |
|
{ |
|
Array<CIMObjectPath> tmp; |
|
|
|
if (!in.getObjectPathA(tmp)) |
|
return 0; |
|
|
|
objectNames.append(tmp.getData(), tmp.size()); |
|
} |
|
|
|
CIMReferenceNamesResponseMessage* msg; | CIMReferenceNamesResponseMessage* msg; |
CIMException cimException; | CIMException cimException; |
| |
msg = new CIMReferenceNamesResponseMessage( | msg = new CIMReferenceNamesResponseMessage( |
messageId, | messageId, |
cimException, | cimException, |
QueueIdStack(), |
QueueIdStack()); |
objectNames); |
|
|
// Instead of resolving the binary data here, we delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to CIMResponseData::getInstanceNames, which |
|
// resolves the binary data as it is passed to the next interface. |
|
// This allows an alternate client implementation to gain direct access |
|
// to the binary data and pass this for example to the JNI implementation |
|
// of the JSR48 CIM Client for Java. |
|
CIMResponseData& responseData = msg->getResponseData(); |
|
responseData.setRemainingBinaryData(in); |
| |
msg->binaryRequest = true; | msg->binaryRequest = true; |
|
|
return msg; | return msg; |
} | } |
| |
|
|
| |
static CIMGetClassResponseMessage* _decodeGetClassResponse( | static CIMGetClassResponseMessage* _decodeGetClassResponse( |
CIMBuffer& in, | CIMBuffer& in, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ | /* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
| |
static CIMEnumerateClassesResponseMessage* _decodeEnumerateClassesResponse( | static CIMEnumerateClassesResponseMessage* _decodeEnumerateClassesResponse( |
CIMBuffer& in, | CIMBuffer& in, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ | /* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
static CIMEnumerateClassNamesResponseMessage* | static CIMEnumerateClassNamesResponseMessage* |
_decodeEnumerateClassNamesResponse( | _decodeEnumerateClassNamesResponse( |
CIMBuffer& in, | CIMBuffer& in, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ | /* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
CIMBuffer& in, | CIMBuffer& in, |
Uint32 queueId, | Uint32 queueId, |
Uint32 returnQueueId, | Uint32 returnQueueId, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Server/CIMOperationRequestDecoder.cpp */ | /* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
} | } |
| |
static void _encodeCreateClassResponseBody( | static void _encodeCreateClassResponseBody( |
CIMBuffer& out, |
|
CIMCreateClassResponseMessage* msg, |
|
CIMName& name) | CIMName& name) |
{ | { |
/* See ../Server/CIMOperationResponseEncoder.cpp */ | /* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
} | } |
| |
static CIMCreateClassResponseMessage* _decodeCreateClassResponse( | static CIMCreateClassResponseMessage* _decodeCreateClassResponse( |
CIMBuffer& in, |
|
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ | /* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
CIMBuffer& in, | CIMBuffer& in, |
Uint32 queueId, | Uint32 queueId, |
Uint32 returnQueueId, | Uint32 returnQueueId, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Server/CIMOperationRequestDecoder.cpp */ | /* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
} | } |
| |
static void _encodeDeleteClassResponseBody( | static void _encodeDeleteClassResponseBody( |
CIMBuffer& out, |
|
CIMDeleteClassResponseMessage* msg, |
|
CIMName& name) | CIMName& name) |
{ | { |
/* See ../Server/CIMOperationResponseEncoder.cpp */ | /* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
} | } |
| |
static CIMDeleteClassResponseMessage* _decodeDeleteClassResponse( | static CIMDeleteClassResponseMessage* _decodeDeleteClassResponse( |
CIMBuffer& in, |
|
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ | /* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
CIMBuffer& in, | CIMBuffer& in, |
Uint32 queueId, | Uint32 queueId, |
Uint32 returnQueueId, | Uint32 returnQueueId, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Server/CIMOperationRequestDecoder.cpp */ | /* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
} | } |
| |
static void _encodeModifyClassResponseBody( | static void _encodeModifyClassResponseBody( |
CIMBuffer& out, |
|
CIMModifyClassResponseMessage* msg, |
|
CIMName& name) | CIMName& name) |
{ | { |
/* See ../Server/CIMOperationResponseEncoder.cpp */ | /* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
} | } |
| |
static CIMModifyClassResponseMessage* _decodeModifyClassResponse( | static CIMModifyClassResponseMessage* _decodeModifyClassResponse( |
CIMBuffer& in, |
|
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ | /* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
CIMBuffer& in, | CIMBuffer& in, |
Uint32 queueId, | Uint32 queueId, |
Uint32 returnQueueId, | Uint32 returnQueueId, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Server/CIMOperationRequestDecoder.cpp */ | /* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
} | } |
| |
static void _encodeSetQualifierResponseBody( | static void _encodeSetQualifierResponseBody( |
CIMBuffer& out, |
|
CIMSetQualifierResponseMessage* msg, |
|
CIMName& name) | CIMName& name) |
{ | { |
/* See ../Server/CIMOperationResponseEncoder.cpp */ | /* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
} | } |
| |
static CIMSetQualifierResponseMessage* _decodeSetQualifierResponse( | static CIMSetQualifierResponseMessage* _decodeSetQualifierResponse( |
CIMBuffer& in, |
|
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ | /* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
CIMBuffer& in, | CIMBuffer& in, |
Uint32 queueId, | Uint32 queueId, |
Uint32 returnQueueId, | Uint32 returnQueueId, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Server/CIMOperationRequestDecoder.cpp */ | /* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
| |
static CIMGetQualifierResponseMessage* _decodeGetQualifierResponse( | static CIMGetQualifierResponseMessage* _decodeGetQualifierResponse( |
CIMBuffer& in, | CIMBuffer& in, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ | /* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
CIMBuffer& in, | CIMBuffer& in, |
Uint32 queueId, | Uint32 queueId, |
Uint32 returnQueueId, | Uint32 returnQueueId, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Server/CIMOperationRequestDecoder.cpp */ | /* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
} | } |
| |
static void _encodeDeleteQualifierResponseBody( | static void _encodeDeleteQualifierResponseBody( |
CIMBuffer& out, |
|
CIMDeleteQualifierResponseMessage* msg, |
|
CIMName& name) | CIMName& name) |
{ | { |
/* See ../Server/CIMOperationResponseEncoder.cpp */ | /* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
} | } |
| |
static CIMDeleteQualifierResponseMessage* _decodeDeleteQualifierResponse( | static CIMDeleteQualifierResponseMessage* _decodeDeleteQualifierResponse( |
CIMBuffer& in, |
|
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ | /* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
CIMBuffer& in, | CIMBuffer& in, |
Uint32 queueId, | Uint32 queueId, |
Uint32 returnQueueId, | Uint32 returnQueueId, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Server/CIMOperationRequestDecoder.cpp */ | /* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
static CIMEnumerateQualifiersResponseMessage* | static CIMEnumerateQualifiersResponseMessage* |
_decodeEnumerateQualifiersResponse( | _decodeEnumerateQualifiersResponse( |
CIMBuffer& in, | CIMBuffer& in, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ | /* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
CIMBuffer& in, | CIMBuffer& in, |
Uint32 queueId, | Uint32 queueId, |
Uint32 returnQueueId, | Uint32 returnQueueId, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Server/CIMOperationRequestDecoder.cpp */ | /* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
| |
static CIMGetPropertyResponseMessage* _decodeGetPropertyResponse( | static CIMGetPropertyResponseMessage* _decodeGetPropertyResponse( |
CIMBuffer& in, | CIMBuffer& in, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ | /* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
CIMBuffer& in, | CIMBuffer& in, |
Uint32 queueId, | Uint32 queueId, |
Uint32 returnQueueId, | Uint32 returnQueueId, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Server/CIMOperationRequestDecoder.cpp */ | /* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
} | } |
| |
static void _encodeSetPropertyResponseBody( | static void _encodeSetPropertyResponseBody( |
CIMBuffer& out, |
|
CIMSetPropertyResponseMessage* msg, |
|
CIMName& name) | CIMName& name) |
{ | { |
/* See ../Server/CIMOperationResponseEncoder.cpp */ | /* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
} | } |
| |
static CIMSetPropertyResponseMessage* _decodeSetPropertyResponse( | static CIMSetPropertyResponseMessage* _decodeSetPropertyResponse( |
CIMBuffer& in, |
|
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ | /* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
CIMBuffer& in, | CIMBuffer& in, |
Uint32 queueId, | Uint32 queueId, |
Uint32 returnQueueId, | Uint32 returnQueueId, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Server/CIMOperationRequestDecoder.cpp */ | /* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
| |
static CIMInvokeMethodResponseMessage* _decodeInvokeMethodResponse( | static CIMInvokeMethodResponseMessage* _decodeInvokeMethodResponse( |
CIMBuffer& in, | CIMBuffer& in, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ | /* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
CIMBuffer& in, | CIMBuffer& in, |
Uint32 queueId, | Uint32 queueId, |
Uint32 returnQueueId, | Uint32 returnQueueId, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Server/CIMOperationRequestDecoder.cpp */ | /* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
| |
static void _encodeExecQueryResponseBody( | static void _encodeExecQueryResponseBody( |
CIMBuffer& out, | CIMBuffer& out, |
CIMExecQueryResponseMessage* msg, |
CIMResponseData& data, |
CIMName& name) | CIMName& name) |
{ | { |
/* See ../Server/CIMOperationResponseEncoder.cpp */ | /* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
static const CIMName NAME("ExecQuery"); | static const CIMName NAME("ExecQuery"); |
name = NAME; | name = NAME; |
| |
out.putObjectA(msg->cimObjects, false); |
data.encodeBinaryResponse(out); |
} | } |
| |
static CIMExecQueryResponseMessage* _decodeExecQueryResponse( | static CIMExecQueryResponseMessage* _decodeExecQueryResponse( |
CIMBuffer& in, | CIMBuffer& in, |
Uint32 flags, |
|
const String& messageId) | const String& messageId) |
{ | { |
/* See ../Client/CIMOperationResponseDecoder.cpp */ |
|
|
|
Array<CIMObject> cimObjects; |
|
|
|
while (in.more()) |
|
{ |
|
Array<CIMObject> tmp; |
|
|
|
if (!in.getObjectA(tmp)) |
|
return 0; |
|
|
|
cimObjects.append(tmp.getData(), tmp.size()); |
|
} |
|
|
|
CIMExecQueryResponseMessage* msg; | CIMExecQueryResponseMessage* msg; |
CIMException cimException; | CIMException cimException; |
| |
msg = new CIMExecQueryResponseMessage( | msg = new CIMExecQueryResponseMessage( |
messageId, | messageId, |
cimException, | cimException, |
QueueIdStack(), |
QueueIdStack()); |
cimObjects); |
|
|
// Instead of resolving the binary data right here, we delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to getNamedInstances, which is going to resolve the binary |
|
// data when the callback function is registered. |
|
// This allows an alternate client implementation to gain direct access |
|
// to the binary data and pass this for example to the JNI implementation |
|
// of the JSR48 CIM Client for Java. |
|
CIMResponseData& responseData = msg->getResponseData(); |
|
responseData.setRemainingBinaryData(in); |
| |
msg->binaryRequest = true; | msg->binaryRequest = true; |
return msg; | return msg; |
} | } |
|
// EXP_PULL_BEGIN |
//============================================================================== | //============================================================================== |
// | // |
// BinaryCodec::hexDump() |
// OpenEnumerateInstances |
// | // |
//============================================================================== | //============================================================================== |
| |
#if defined(PEGASUS_DEBUG) |
static void _encodeOpenEnumerateInstancesRequest( |
|
CIMBuffer& buf, |
void BinaryCodec::hexDump(const void* data, size_t size) |
CIMOpenEnumerateInstancesRequestMessage* msg, |
|
CIMName& name) |
{ | { |
unsigned char* p = (unsigned char*)data; |
/* See ../Client/CIMOperationRequestEncoder.cpp */ |
unsigned char buf[16]; |
|
size_t n = 0; |
|
| |
for (size_t i = 0, col = 0; i < size; i++) |
static const CIMName NAME("OpenEnumerateInstances"); |
{ |
name = NAME; |
unsigned char c = p[i]; |
|
buf[n++] = c; |
|
| |
if (col == 0) |
// [HEADER] |
printf("%06X ", (unsigned int)i); |
|
| |
printf("%02X ", c); |
Uint32 flags = 0; |
| |
if (col + 1 == sizeof(buf) || i + 1 == size) |
if (msg->deepInheritance) |
{ |
flags |= DEEP_INHERITANCE; |
for (size_t j = col + 1; j < sizeof(buf); j++) |
|
printf(" "); |
|
| |
for (size_t j = 0; j < n; j++) |
if (msg->includeClassOrigin) |
{ |
flags |= INCLUDE_CLASS_ORIGIN; |
c = buf[j]; |
|
| |
if (c >= ' ' && c <= '~') |
if (msg->continueOnError) |
printf("%c", buf[j]); |
flags |= CONTINUE_ON_ERROR; |
else |
|
printf("."); |
|
} |
|
| |
printf("\n"); |
_putHeader(buf, flags, msg->messageId, OP_OpenEnumerateInstances); |
n = 0; |
|
} |
|
| |
if (col + 1 == sizeof(buf)) |
// [NAMESPACE] |
col = 0; |
buf.putNamespaceName(msg->nameSpace); |
else |
|
col++; |
|
} |
|
| |
printf("\n"); |
// [CLASSNAME] |
} |
buf.putName(msg->className); |
| |
#endif /* defined(PEGASUS_DEBUG) */ |
// [PROPERTY-LIST] |
|
buf.putPropertyList(msg->propertyList); |
| |
//============================================================================== |
buf.putUint32Arg(msg->maxObjectCount); |
// |
buf.putUint32Arg(msg->operationTimeout); |
// BinaryCodec::decodeRequest() |
buf.putString(msg->filterQueryLanguage); |
// |
buf.putString(msg->filterQuery); |
//============================================================================== |
} |
| |
CIMOperationRequestMessage* BinaryCodec::decodeRequest( |
static CIMOpenEnumerateInstancesRequestMessage* |
const Buffer& in, |
_decodeOpenEnumerateInstancesRequest( |
|
CIMBuffer& in, |
Uint32 queueId, | Uint32 queueId, |
Uint32 returnQueueId) |
Uint32 returnQueueId, |
|
Uint32 flags, |
|
const String& messageId) |
|
{ |
|
/* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
|
STAT_GETSTARTTIME |
|
|
|
Boolean deepInheritance = flags & DEEP_INHERITANCE; |
|
Boolean includeClassOrigin = flags & INCLUDE_CLASS_ORIGIN; |
|
Boolean continueOnError = flags & CONTINUE_ON_ERROR; |
|
|
|
// [NAMESPACE] |
|
CIMNamespaceName nameSpace; |
|
if (!in.getNamespaceName(nameSpace)) |
|
return 0; |
|
|
|
// [CLASSNAME] |
|
CIMName className; |
|
if (!in.getName(className)) |
|
return 0; |
|
|
|
// [PROPERTY-LIST] |
|
CIMPropertyList propertyList; |
|
if (!in.getPropertyList(propertyList)) |
|
return 0; |
|
|
|
// These can all be one common function. |
|
Uint32Arg maxObjectCount; |
|
if (!in.getUint32Arg(maxObjectCount)) |
|
return 0; |
|
Uint32Arg operationTimeout; |
|
if (!in.getUint32Arg(operationTimeout)) |
|
return 0; |
|
String filterQueryLanguage; |
|
if (!in.getString(filterQueryLanguage)) |
|
return 0; |
|
String filterQuery; |
|
if (!in.getString(filterQuery)) |
|
return 0; |
|
|
|
AutoPtr<CIMOpenEnumerateInstancesRequestMessage> request( |
|
new CIMOpenEnumerateInstancesRequestMessage( |
|
messageId, |
|
nameSpace, |
|
className, |
|
deepInheritance, |
|
includeClassOrigin, |
|
propertyList, |
|
filterQueryLanguage, |
|
filterQuery, |
|
operationTimeout, |
|
continueOnError, |
|
maxObjectCount, |
|
QueueIdStack(queueId, returnQueueId))); |
|
|
|
request->binaryRequest = true; |
|
|
|
STAT_SERVERSTART |
|
|
|
return request.release(); |
|
} |
|
|
|
// For the pull Response messages the interface is the message and the, |
|
// not just the responseData. |
|
static void _encodeOpenEnumerateInstancesResponseBody( |
|
CIMBuffer& out, |
|
CIMOpenEnumerateInstancesResponseMessage* msg, |
|
CIMResponseData& data, |
|
CIMName& name) |
|
{ |
|
/* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
|
static const CIMName NAME("OpenEnumerateInstances"); |
|
name = NAME; |
|
|
|
// [endOfSequence] |
|
out.putBoolean(msg->endOfSequence); |
|
|
|
// [enumerationContext] |
|
out.putString(msg->enumerationContext); |
|
|
|
data.encodeBinaryResponse(out); |
|
} |
|
|
|
static CIMOpenEnumerateInstancesResponseMessage* |
|
_decodeOpenEnumerateInstancesResponse( |
|
CIMBuffer& in, |
|
const String& messageId) |
|
{ |
|
CIMException cimException; |
|
|
|
// KS_TODO Should we set validation??? |
|
// Turn on validation: This is a debugging tool |
|
//#if defined(ENABLE_VALIDATION) |
|
// buf.setValidate(true); |
|
//#endif |
|
|
|
Boolean endOfSequence; |
|
if (!in.getBoolean(endOfSequence)) |
|
return 0; |
|
|
|
String enumerationContext; |
|
if (!in.getString(enumerationContext)) |
|
return 0; |
|
|
|
CIMOpenEnumerateInstancesResponseMessage* msg = |
|
new CIMOpenEnumerateInstancesResponseMessage( |
|
messageId, |
|
cimException, |
|
endOfSequence, |
|
enumerationContext, |
|
QueueIdStack()); |
|
|
|
// Instead of resolving the binary data here, we delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to CIMResponseData::getInstances, which |
|
// resolves the binary data as it is passed to the next interface. |
|
// This allows an alternate client implementation to gain direct access |
|
// to the binary data and pass this for example to the JNI implementation |
|
// of the JSR48 CIM Client for Java. |
|
CIMResponseData& responseData = msg->getResponseData(); |
|
responseData.setRemainingBinaryData(in); |
|
|
|
msg->binaryRequest=true; |
|
return msg; |
|
} |
|
|
|
//============================================================================== |
|
// |
|
// OpenEnumerateInstancesPaths |
|
// |
|
//============================================================================== |
|
|
|
static void _encodeOpenEnumerateInstancePathsRequest( |
|
CIMBuffer& buf, |
|
CIMOpenEnumerateInstancePathsRequestMessage* msg, |
|
CIMName& name) |
|
{ |
|
/* See ../Client/CIMOperationRequestEncoder.cpp */ |
|
|
|
static const CIMName NAME("OpenEnumerateInstancePaths"); |
|
name = NAME; |
|
|
|
// [HEADER] |
|
|
|
Uint32 flags = 0; |
|
|
|
if (msg->continueOnError) |
|
flags |= CONTINUE_ON_ERROR; |
|
|
|
_putHeader(buf, flags, msg->messageId, OP_OpenEnumerateInstancePaths); |
|
|
|
// [NAMESPACE] |
|
buf.putNamespaceName(msg->nameSpace); |
|
|
|
// [CLASSNAME] |
|
buf.putName(msg->className); |
|
|
|
buf.putUint32Arg(msg->maxObjectCount); |
|
buf.putUint32Arg(msg->operationTimeout); |
|
buf.putString(msg->filterQueryLanguage); |
|
buf.putString(msg->filterQuery); |
|
} |
|
|
|
static CIMOpenEnumerateInstancePathsRequestMessage* |
|
_decodeOpenEnumerateInstancePathsRequest( |
|
CIMBuffer& in, |
|
Uint32 queueId, |
|
Uint32 returnQueueId, |
|
Uint32 flags, |
|
const String& messageId) |
|
{ |
|
/* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
|
STAT_GETSTARTTIME |
|
|
|
Boolean continueOnError = flags & CONTINUE_ON_ERROR; |
|
|
|
// [NAMESPACE] |
|
|
|
CIMNamespaceName nameSpace; |
|
if (!in.getNamespaceName(nameSpace)) |
|
return 0; |
|
|
|
// [CLASSNAME] |
|
CIMName className; |
|
if (!in.getName(className)) |
|
return 0; |
|
|
|
// These can all be one common function. |
|
|
|
Uint32Arg maxObjectCount; |
|
if (!in.getUint32Arg(maxObjectCount)) |
|
return 0; |
|
Uint32Arg operationTimeout; |
|
if (!in.getUint32Arg(operationTimeout)) |
|
return 0; |
|
String filterQueryLanguage; |
|
if (!in.getString(filterQueryLanguage)) |
|
return 0; |
|
String filterQuery; |
|
if (!in.getString(filterQuery)) |
|
return 0; |
|
|
|
AutoPtr<CIMOpenEnumerateInstancePathsRequestMessage> request( |
|
new CIMOpenEnumerateInstancePathsRequestMessage( |
|
messageId, |
|
nameSpace, |
|
className, |
|
filterQueryLanguage, |
|
filterQuery, |
|
operationTimeout, |
|
continueOnError, |
|
maxObjectCount, |
|
QueueIdStack(queueId, returnQueueId))); |
|
|
|
request->binaryRequest = true; |
|
|
|
STAT_SERVERSTART |
|
|
|
return request.release(); |
|
} |
|
|
|
// For the pull Response messages the interface is the message and the, |
|
// not just the responseData. |
|
static void _encodeOpenEnumerateInstancePathsResponseBody( |
|
CIMBuffer& out, |
|
CIMOpenEnumerateInstancePathsResponseMessage* msg, |
|
CIMResponseData& data, |
|
CIMName& name) |
|
{ |
|
/* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
|
static const CIMName NAME("OpenEnumerateInstancePaths"); |
|
name = NAME; |
|
|
|
// [endOfSequence] |
|
out.putBoolean(msg->endOfSequence); |
|
|
|
// [enumerationContext] |
|
out.putString(msg->enumerationContext); |
|
|
|
data.encodeBinaryResponse(out); |
|
} |
|
|
|
static CIMOpenEnumerateInstancePathsResponseMessage* |
|
_decodeOpenEnumerateInstancePathsResponse( |
|
CIMBuffer& in, |
|
const String& messageId) |
|
{ |
|
CIMException cimException; |
|
|
|
Boolean endOfSequence; |
|
if (!in.getBoolean(endOfSequence)) |
|
return 0; |
|
|
|
String enumerationContext; |
|
if (!in.getString(enumerationContext)) |
|
{ |
|
return 0; |
|
} |
|
CIMOpenEnumerateInstancePathsResponseMessage* msg = |
|
new CIMOpenEnumerateInstancePathsResponseMessage( |
|
messageId, |
|
cimException, |
|
endOfSequence, |
|
enumerationContext, |
|
QueueIdStack()); |
|
|
|
// Instead of resolving the binary data here, we delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to CIMResponseData::getInstanceNames, which |
|
// resolves the binary data as it is passed to the next interface. |
|
// This allows an alternate client implementation to gain direct access |
|
// to the binary data and pass this for example to the JNI implementation |
|
// of the JSR48 CIM Client for Java. |
|
CIMResponseData& responseData = msg->getResponseData(); |
|
responseData.setRemainingBinaryData(in); |
|
|
|
msg->binaryRequest=true; |
|
return msg; |
|
} |
|
//============================================================================== |
|
// |
|
// OpenReferenceInstances |
|
// |
|
//============================================================================== |
|
|
|
static void _encodeOpenReferenceInstancesRequest( |
|
CIMBuffer& buf, |
|
CIMOpenReferenceInstancesRequestMessage* msg, |
|
CIMName& name) |
|
{ |
|
/* See ../Client/CIMOperationRequestEncoder.cpp */ |
|
|
|
static const CIMName NAME("OpenReferenceInstances"); |
|
name = NAME; |
|
|
|
// [HEADER] |
|
|
|
Uint32 flags = 0; |
|
|
|
if (msg->includeClassOrigin) |
|
flags |= INCLUDE_CLASS_ORIGIN; |
|
|
|
if (msg->continueOnError) |
|
flags |= CONTINUE_ON_ERROR; |
|
|
|
_putHeader(buf, flags, msg->messageId, OP_OpenReferenceInstances); |
|
|
|
// [NAMESPACE] |
|
buf.putNamespaceName(msg->nameSpace); |
|
|
|
// [OBJECT-NAME] |
|
buf.putObjectPath(msg->objectName); |
|
|
|
// [RESULT-CLASS] |
|
buf.putName(msg->resultClass); |
|
|
|
// [ROLE] |
|
buf.putString(msg->role); |
|
|
|
// [PROPERTY-LIST] |
|
buf.putPropertyList(msg->propertyList); |
|
|
|
buf.putUint32Arg(msg->maxObjectCount); |
|
buf.putUint32Arg(msg->operationTimeout); |
|
buf.putString(msg->filterQueryLanguage); |
|
buf.putString(msg->filterQuery); |
|
} |
|
|
|
static CIMOpenReferenceInstancesRequestMessage* |
|
_decodeOpenReferenceInstancesRequest( |
|
CIMBuffer& in, |
|
Uint32 queueId, |
|
Uint32 returnQueueId, |
|
Uint32 flags, |
|
const String& messageId) |
|
{ |
|
/* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
|
STAT_GETSTARTTIME |
|
|
|
Boolean includeClassOrigin = flags & INCLUDE_CLASS_ORIGIN; |
|
Boolean continueOnError = flags & CONTINUE_ON_ERROR; |
|
|
|
// [NAMESPACE] |
|
|
|
CIMNamespaceName nameSpace; |
|
if (!in.getNamespaceName(nameSpace)) |
|
return 0; |
|
|
|
// [OBJECT-NAME] |
|
|
|
CIMObjectPath objectName; |
|
|
|
if (!in.getObjectPath(objectName)) |
|
return 0; |
|
|
|
// [RESULT-CLASS] |
|
|
|
CIMName resultClass; |
|
|
|
if (!in.getName(resultClass)) |
|
return 0; |
|
|
|
// [ROLE] |
|
|
|
String role; |
|
|
|
if (!in.getString(role)) |
|
return 0; |
|
|
|
// [PROPERTY-LIST] |
|
CIMPropertyList propertyList; |
|
if (!in.getPropertyList(propertyList)) |
|
return 0; |
|
|
|
// These can all be one common function. |
|
Uint32Arg maxObjectCount; |
|
if (!in.getUint32Arg(maxObjectCount)) |
|
return 0; |
|
Uint32Arg operationTimeout; |
|
if (!in.getUint32Arg(operationTimeout)) |
|
return 0; |
|
String filterQueryLanguage; |
|
if (!in.getString(filterQueryLanguage)) |
|
return 0; |
|
String filterQuery; |
|
if (!in.getString(filterQuery)) |
|
return 0; |
|
|
|
AutoPtr<CIMOpenReferenceInstancesRequestMessage> request( |
|
new CIMOpenReferenceInstancesRequestMessage( |
|
messageId, |
|
nameSpace, |
|
objectName, |
|
resultClass, |
|
role, |
|
includeClassOrigin, |
|
propertyList, |
|
filterQueryLanguage, |
|
filterQuery, |
|
operationTimeout, |
|
continueOnError, |
|
maxObjectCount, |
|
QueueIdStack(queueId, returnQueueId))); |
|
|
|
request->binaryRequest = true; |
|
|
|
STAT_SERVERSTART |
|
|
|
return request.release(); |
|
} |
|
// For the pull Response messages the interface is the message and the, |
|
// not just the responseData. |
|
static void _encodeOpenReferenceInstancesResponseBody( |
|
CIMBuffer& out, |
|
CIMOpenReferenceInstancesResponseMessage* msg, |
|
CIMResponseData& data, |
|
CIMName& name) |
|
{ |
|
/* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
|
static const CIMName NAME("OpenReferenceInstances"); |
|
name = NAME; |
|
|
|
// [endOfSequence] |
|
out.putBoolean(msg->endOfSequence); |
|
|
|
// [enumerationContext] |
|
out.putString(msg->enumerationContext); |
|
|
|
data.encodeBinaryResponse(out); |
|
} |
|
|
|
static CIMOpenReferenceInstancesResponseMessage* |
|
_decodeOpenReferenceInstancesResponse( |
|
CIMBuffer& in, |
|
const String& messageId) |
|
{ |
|
CIMException cimException; |
|
|
|
Boolean endOfSequence; |
|
if (!in.getBoolean(endOfSequence)) |
|
return 0; |
|
|
|
String enumerationContext; |
|
if (!in.getString(enumerationContext)) |
|
return 0; |
|
|
|
CIMOpenReferenceInstancesResponseMessage* msg = |
|
new CIMOpenReferenceInstancesResponseMessage( |
|
messageId, |
|
cimException, |
|
endOfSequence, |
|
enumerationContext, |
|
QueueIdStack()); |
|
|
|
// Instead of resolving the binary data here, we delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to CIMResponseData::getInstances, which |
|
// resolves the binary data is passed to the next interface. |
|
// This allows an alternate client implementation to gain direct access |
|
// to the binary data and pass this for example to the JNI implementation |
|
// of the JSR48 CIM Client for Java. |
|
CIMResponseData& responseData = msg->getResponseData(); |
|
responseData.setRemainingBinaryData(in); |
|
|
|
msg->binaryRequest=true; |
|
return msg; |
|
} |
|
//============================================================================== |
|
// |
|
// OpenReferenceInstancePaths |
|
// |
|
//============================================================================== |
|
|
|
static void _encodeOpenReferenceInstancePathsRequest( |
|
CIMBuffer& buf, |
|
CIMOpenReferenceInstancePathsRequestMessage* msg, |
|
CIMName& name) |
|
{ |
|
/* See ../Client/CIMOperationRequestEncoder.cpp */ |
|
|
|
static const CIMName NAME("OpenReferenceInstancePaths"); |
|
name = NAME; |
|
|
|
// [HEADER] |
|
|
|
Uint32 flags = 0; |
|
if (msg->continueOnError) |
|
flags |= CONTINUE_ON_ERROR; |
|
|
|
_putHeader(buf, flags, msg->messageId, OP_OpenReferenceInstancePaths); |
|
|
|
// [NAMESPACE] |
|
buf.putNamespaceName(msg->nameSpace); |
|
|
|
// [OBJECT-NAME] |
|
buf.putObjectPath(msg->objectName); |
|
|
|
// [RESULT-CLASS] |
|
buf.putName(msg->resultClass); |
|
|
|
// [ROLE] |
|
buf.putString(msg->role); |
|
|
|
buf.putUint32Arg(msg->maxObjectCount); |
|
buf.putUint32Arg(msg->operationTimeout); |
|
buf.putString(msg->filterQueryLanguage); |
|
buf.putString(msg->filterQuery); |
|
} |
|
|
|
static CIMOpenReferenceInstancePathsRequestMessage* |
|
_decodeOpenReferenceInstancePathsRequest( |
|
CIMBuffer& in, |
|
Uint32 queueId, |
|
Uint32 returnQueueId, |
|
Uint32 flags, |
|
const String& messageId) |
|
{ |
|
/* See ../ |
|
Server/CIMOperationRequestDecoder.cpp */ |
|
|
|
STAT_GETSTARTTIME |
|
|
|
Boolean continueOnError = flags & CONTINUE_ON_ERROR; |
|
|
|
// [NAMESPACE] |
|
|
|
CIMNamespaceName nameSpace; |
|
if (!in.getNamespaceName(nameSpace)) |
|
return 0; |
|
|
|
// [OBJECT-NAME] |
|
|
|
CIMObjectPath objectName; |
|
if (!in.getObjectPath(objectName)) |
|
return 0; |
|
|
|
// [RESULT-CLASS] |
|
|
|
CIMName resultClass; |
|
if (!in.getName(resultClass)) |
|
return 0; |
|
|
|
// [ROLE] |
|
|
|
String role; |
|
if (!in.getString(role)) |
|
return 0; |
|
|
|
// These can all be one common function. |
|
Uint32Arg maxObjectCount; |
|
if (!in.getUint32Arg(maxObjectCount)) |
|
return 0; |
|
Uint32Arg operationTimeout; |
|
if (!in.getUint32Arg(operationTimeout)) |
|
return 0; |
|
String filterQueryLanguage; |
|
if (!in.getString(filterQueryLanguage)) |
|
return 0; |
|
String filterQuery; |
|
if (!in.getString(filterQuery)) |
|
return 0; |
|
|
|
AutoPtr<CIMOpenReferenceInstancePathsRequestMessage> request( |
|
new CIMOpenReferenceInstancePathsRequestMessage( |
|
messageId, |
|
nameSpace, |
|
objectName, |
|
resultClass, |
|
role, |
|
filterQueryLanguage, |
|
filterQuery, |
|
operationTimeout, |
|
continueOnError, |
|
maxObjectCount, |
|
QueueIdStack(queueId, returnQueueId))); |
|
|
|
request->binaryRequest = true; |
|
|
|
STAT_SERVERSTART |
|
|
|
return request.release(); |
|
} |
|
// For the pull Response messages the interface is the message and the, |
|
// not just the responseData. |
|
static void _encodeOpenReferenceInstancePathsResponseBody( |
|
CIMBuffer& out, |
|
CIMOpenReferenceInstancePathsResponseMessage* msg, |
|
CIMResponseData& data, |
|
CIMName& name) |
|
{ |
|
/* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
|
static const CIMName NAME("OpenReferenceInstancePaths"); |
|
name = NAME; |
|
|
|
// [endOfSequence] |
|
out.putBoolean(msg->endOfSequence); |
|
|
|
// [enumerationContext] |
|
out.putString(msg->enumerationContext); |
|
|
|
data.encodeBinaryResponse(out); |
|
} |
|
|
|
static CIMOpenReferenceInstancePathsResponseMessage* |
|
_decodeOpenReferenceInstancePathsResponse( |
|
CIMBuffer& in, |
|
const String& messageId) |
|
{ |
|
CIMException cimException; |
|
|
|
Boolean endOfSequence; |
|
if (!in.getBoolean(endOfSequence)) |
|
return 0; |
|
|
|
String enumerationContext; |
|
if (!in.getString(enumerationContext)) |
|
return 0; |
|
|
|
CIMOpenReferenceInstancePathsResponseMessage* msg = |
|
new CIMOpenReferenceInstancePathsResponseMessage( |
|
messageId, |
|
cimException, |
|
endOfSequence, |
|
enumerationContext, |
|
QueueIdStack()); |
|
|
|
// Instead of resolving the binary data right here, we delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to getNamedInstances, which is going to resolve the binary |
|
// data when the callback function is registered. |
|
// This allows an alternate client implementation to gain direct access |
|
// to the binary data and pass this for example to the JNI implementation |
|
// of the JSR48 CIM Client for Java. |
|
CIMResponseData& responseData = msg->getResponseData(); |
|
responseData.setRemainingBinaryData(in); |
|
|
|
msg->binaryRequest=true; |
|
return msg; |
|
} |
|
|
|
//============================================================================== |
|
// |
|
// OpenAssociatorInstances |
|
// |
|
//============================================================================== |
|
|
|
static void _encodeOpenAssociatorInstancesRequest( |
|
CIMBuffer& buf, |
|
CIMOpenAssociatorInstancesRequestMessage* msg, |
|
CIMName& name) |
|
{ |
|
/* See ../Client/CIMOperationRequestEncoder.cpp */ |
|
|
|
static const CIMName NAME("OpenAssociatorInstances"); |
|
name = NAME; |
|
|
|
// [HEADER] |
|
|
|
Uint32 flags = 0; |
|
|
|
if (msg->includeClassOrigin) |
|
flags |= INCLUDE_CLASS_ORIGIN; |
|
|
|
if (msg->continueOnError) |
|
flags |= CONTINUE_ON_ERROR; |
|
|
|
_putHeader(buf, flags, msg->messageId, OP_OpenAssociatorInstances); |
|
|
|
// [NAMESPACE] |
|
buf.putNamespaceName(msg->nameSpace); |
|
|
|
// [OBJECT-NAME] |
|
buf.putObjectPath(msg->objectName); |
|
|
|
// [ASSOC-CLASS] |
|
buf.putName(msg->assocClass); |
|
|
|
// [RESULT-CLASS] |
|
buf.putName(msg->resultClass); |
|
|
|
// [ROLE] |
|
buf.putString(msg->role); |
|
|
|
// [RESULT-ROLE] |
|
buf.putString(msg->resultRole); |
|
|
|
// [PROPERTY-LIST] |
|
buf.putPropertyList(msg->propertyList); |
|
|
|
buf.putUint32Arg(msg->maxObjectCount); |
|
buf.putUint32Arg(msg->operationTimeout); |
|
buf.putString(msg->filterQueryLanguage); |
|
buf.putString(msg->filterQuery); |
|
} |
|
|
|
static CIMOpenAssociatorInstancesRequestMessage* |
|
_decodeOpenAssociatorInstancesRequest( |
|
CIMBuffer& in, |
|
Uint32 queueId, |
|
Uint32 returnQueueId, |
|
Uint32 flags, |
|
const String& messageId) |
|
{ |
|
/* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
|
STAT_GETSTARTTIME |
|
|
|
Boolean includeClassOrigin = flags & INCLUDE_CLASS_ORIGIN; |
|
Boolean continueOnError = flags & CONTINUE_ON_ERROR; |
|
|
|
// [NAMESPACE] |
|
|
|
CIMNamespaceName nameSpace; |
|
if (!in.getNamespaceName(nameSpace)) |
|
return 0; |
|
|
|
// [OBJECT-NAME] |
|
|
|
CIMObjectPath objectName; |
|
|
|
if (!in.getObjectPath(objectName)) |
|
return 0; |
|
|
|
// [ASSOC-CLASS] |
|
|
|
CIMName assocClass; |
|
|
|
if (!in.getName(assocClass)) |
|
return 0; |
|
|
|
// [RESULT-CLASS] |
|
|
|
CIMName resultClass; |
|
|
|
if (!in.getName(resultClass)) |
|
return 0; |
|
|
|
// [ROLE] |
|
|
|
String role; |
|
|
|
if (!in.getString(role)) |
|
return 0; |
|
|
|
// [RESULT-ROLE] |
|
|
|
String resultRole; |
|
|
|
if (!in.getString(resultRole)) |
|
return 0; |
|
|
|
// [PROPERTY-LIST] |
|
CIMPropertyList propertyList; |
|
if (!in.getPropertyList(propertyList)) |
|
return 0; |
|
|
|
// These can all be one common function. |
|
Uint32Arg maxObjectCount; |
|
if (!in.getUint32Arg(maxObjectCount)) |
|
return 0; |
|
Uint32Arg operationTimeout; |
|
if (!in.getUint32Arg(operationTimeout)) |
|
return 0; |
|
String filterQueryLanguage; |
|
if (!in.getString(filterQueryLanguage)) |
|
return 0; |
|
String filterQuery; |
|
if (!in.getString(filterQuery)) |
|
return 0; |
|
|
|
AutoPtr<CIMOpenAssociatorInstancesRequestMessage> request( |
|
new CIMOpenAssociatorInstancesRequestMessage( |
|
messageId, |
|
nameSpace, |
|
objectName, |
|
assocClass, |
|
resultClass, |
|
role, |
|
resultRole, |
|
includeClassOrigin, |
|
propertyList, |
|
filterQueryLanguage, |
|
filterQuery, |
|
operationTimeout, |
|
continueOnError, |
|
maxObjectCount, |
|
QueueIdStack(queueId, returnQueueId))); |
|
|
|
request->binaryRequest = true; |
|
|
|
STAT_SERVERSTART |
|
|
|
return request.release(); |
|
} |
|
// For the pull Response messages the interface is the message and the, |
|
// not just the responseData. |
|
static void _encodeOpenAssociatorInstancesResponseBody( |
|
CIMBuffer& out, |
|
CIMOpenAssociatorInstancesResponseMessage* msg, |
|
CIMResponseData& data, |
|
CIMName& name) |
|
{ |
|
/* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
|
static const CIMName NAME("OpenAssociatorInstances"); |
|
name = NAME; |
|
|
|
// [endOfSequence] |
|
out.putBoolean(msg->endOfSequence); |
|
|
|
// [enumerationContext] |
|
out.putString(msg->enumerationContext); |
|
|
|
data.encodeBinaryResponse(out); |
|
} |
|
|
|
static CIMOpenAssociatorInstancesResponseMessage* |
|
_decodeOpenAssociatorInstancesResponse( |
|
CIMBuffer& in, |
|
const String& messageId) |
|
{ |
|
CIMException cimException; |
|
|
|
Boolean endOfSequence; |
|
if (!in.getBoolean(endOfSequence)) |
|
return 0; |
|
|
|
String enumerationContext; |
|
if (!in.getString(enumerationContext)) |
|
return 0; |
|
|
|
CIMOpenAssociatorInstancesResponseMessage* msg = |
|
new CIMOpenAssociatorInstancesResponseMessage( |
|
messageId, |
|
cimException, |
|
endOfSequence, |
|
enumerationContext, |
|
QueueIdStack()); |
|
|
|
// Instead of resolving the binary data right here, we delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to getNamedInstances, which is going to resolve the binary |
|
// data when the callback function is registered. |
|
// This allows an alternate client implementation to gain direct access |
|
// to the binary data and pass this for example to the JNI implementation |
|
// of the JSR48 CIM Client for Java. |
|
CIMResponseData& responseData = msg->getResponseData(); |
|
responseData.setRemainingBinaryData(in); |
|
|
|
msg->binaryRequest=true; |
|
return msg; |
|
} |
|
|
|
//============================================================================== |
|
// |
|
// OpenAssociatorInstancePaths |
|
// |
|
//============================================================================== |
|
|
|
static void _encodeOpenAssociatorInstancePathsRequest( |
|
CIMBuffer& buf, |
|
CIMOpenAssociatorInstancePathsRequestMessage* msg, |
|
CIMName& name) |
|
{ |
|
/* See ../Client/CIMOperationRequestEncoder.cpp */ |
|
|
|
static const CIMName NAME("OpenAssociatorInstancePaths"); |
|
name = NAME; |
|
|
|
// [HEADER] |
|
|
|
Uint32 flags = 0; |
|
|
|
if (msg->continueOnError) |
|
flags |= CONTINUE_ON_ERROR; |
|
|
|
_putHeader(buf, flags, msg->messageId, OP_OpenAssociatorInstancePaths); |
|
|
|
// [NAMESPACE] |
|
buf.putNamespaceName(msg->nameSpace); |
|
|
|
// [OBJECT-NAME] |
|
buf.putObjectPath(msg->objectName); |
|
|
|
// [ASSOC-CLASS] |
|
buf.putName(msg->assocClass); |
|
|
|
// [RESULT-CLASS] |
|
buf.putName(msg->resultClass); |
|
|
|
// [ROLE] |
|
buf.putString(msg->role); |
|
|
|
// [RESULT-ROLE] |
|
buf.putString(msg->resultRole); |
|
|
|
buf.putUint32Arg(msg->maxObjectCount); |
|
buf.putUint32Arg(msg->operationTimeout); |
|
buf.putString(msg->filterQueryLanguage); |
|
buf.putString(msg->filterQuery); |
|
} |
|
|
|
static CIMOpenAssociatorInstancePathsRequestMessage* |
|
_decodeOpenAssociatorInstancePathsRequest( |
|
CIMBuffer& in, |
|
Uint32 queueId, |
|
Uint32 returnQueueId, |
|
Uint32 flags, |
|
const String& messageId) |
|
{ |
|
/* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
|
STAT_GETSTARTTIME |
|
|
|
Boolean continueOnError = flags & CONTINUE_ON_ERROR; |
|
|
|
// [NAMESPACE] |
|
|
|
CIMNamespaceName nameSpace; |
|
if (!in.getNamespaceName(nameSpace)) |
|
return 0; |
|
|
|
// [OBJECT-NAME] |
|
|
|
CIMObjectPath objectName; |
|
if (!in.getObjectPath(objectName)) |
|
return 0; |
|
|
|
// [ASSOC-CLASS] |
|
|
|
CIMName assocClass; |
|
if (!in.getName(assocClass)) |
|
return 0; |
|
|
|
// [RESULT-CLASS] |
|
|
|
CIMName resultClass; |
|
if (!in.getName(resultClass)) |
|
return 0; |
|
|
|
// [ROLE] |
|
|
|
String role; |
|
if (!in.getString(role)) |
|
return 0; |
|
|
|
// [RESULT-ROLE] |
|
|
|
String resultRole; |
|
if (!in.getString(resultRole)) |
|
return 0; |
|
|
|
// These can all be one common function. |
|
Uint32Arg maxObjectCount; |
|
if (!in.getUint32Arg(maxObjectCount)) |
|
return 0; |
|
Uint32Arg operationTimeout; |
|
if (!in.getUint32Arg(operationTimeout)) |
|
return 0; |
|
String filterQueryLanguage; |
|
if (!in.getString(filterQueryLanguage)) |
|
return 0; |
|
String filterQuery; |
|
if (!in.getString(filterQuery)) |
|
return 0; |
|
|
|
AutoPtr<CIMOpenAssociatorInstancePathsRequestMessage> request( |
|
new CIMOpenAssociatorInstancePathsRequestMessage( |
|
messageId, |
|
nameSpace, |
|
objectName, |
|
assocClass, |
|
resultClass, |
|
role, |
|
resultRole, |
|
filterQueryLanguage, |
|
filterQuery, |
|
operationTimeout, |
|
continueOnError, |
|
maxObjectCount, |
|
QueueIdStack(queueId, returnQueueId))); |
|
|
|
request->binaryRequest = true; |
|
|
|
STAT_SERVERSTART |
|
|
|
return request.release(); |
|
} |
|
|
|
static void _encodeOpenAssociatorInstancePathsResponseBody( |
|
CIMBuffer& out, |
|
CIMOpenAssociatorInstancePathsResponseMessage* msg, |
|
CIMResponseData& data, |
|
CIMName& name) |
|
{ |
|
/* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
|
static const CIMName NAME("OpenAssociatorInstancePaths"); |
|
name = NAME; |
|
|
|
// [endOfSequence] |
|
out.putBoolean(msg->endOfSequence); |
|
|
|
// [enumerationContext] |
|
out.putString(msg->enumerationContext); |
|
|
|
data.encodeBinaryResponse(out); |
|
} |
|
|
|
static CIMOpenAssociatorInstancePathsResponseMessage* |
|
_decodeOpenAssociatorInstancePathsResponse( |
|
CIMBuffer& in, |
|
const String& messageId) |
|
{ |
|
CIMException cimException; |
|
|
|
Boolean endOfSequence; |
|
if (!in.getBoolean(endOfSequence)) |
|
return 0; |
|
|
|
String enumerationContext; |
|
if (!in.getString(enumerationContext)) |
|
return 0; |
|
|
|
CIMOpenAssociatorInstancePathsResponseMessage* msg = |
|
new CIMOpenAssociatorInstancePathsResponseMessage( |
|
messageId, |
|
cimException, |
|
endOfSequence, |
|
enumerationContext, |
|
QueueIdStack()); |
|
|
|
// Instead of resolving the binary data right here, we delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to getNamedInstances, which is going to resolve the binary |
|
// data when the callback function is registered. |
|
// This allows an alternate client implementation to gain direct access |
|
// to the binary data and pass this for example to the JNI implementation |
|
// of the JSR48 CIM Client for Java. |
|
CIMResponseData& responseData = msg->getResponseData(); |
|
responseData.setRemainingBinaryData(in); |
|
|
|
msg->binaryRequest=true; |
|
return msg; |
|
} |
|
|
|
//============================================================================== |
|
// |
|
// PullInstancesWithPath |
|
// |
|
//============================================================================== |
|
|
|
static void _encodePullInstancesWithPathRequest( |
|
CIMBuffer& buf, |
|
CIMPullInstancesWithPathRequestMessage* msg, |
|
CIMName& name) |
|
{ |
|
/* See ../Client/CIMOperationRequestEncoder.cpp */ |
|
|
|
static const CIMName NAME("PullInstancesWithPath"); |
|
name = NAME; |
|
|
|
// [HEADER] |
|
|
|
Uint32 flags = 0; |
|
|
|
_putHeader(buf, flags, msg->messageId, OP_PullInstancesWithPath); |
|
|
|
// [NAMESPACE] |
|
buf.putNamespaceName(msg->nameSpace); |
|
|
|
// [EnumerationContext] |
|
buf.putString(msg->enumerationContext); |
|
|
|
buf.putUint32Arg(msg->maxObjectCount); |
|
} |
|
|
|
static CIMPullInstancesWithPathRequestMessage* |
|
_decodePullInstancesWithPathRequest( |
|
CIMBuffer& in, |
|
Uint32 queueId, |
|
Uint32 returnQueueId, |
|
Uint32 flags, |
|
const String& messageId) |
|
{ |
|
/* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
|
STAT_GETSTARTTIME |
|
|
|
// [NAMESPACE] |
|
|
|
CIMNamespaceName nameSpace; |
|
if (!in.getNamespaceName(nameSpace)) |
|
return 0; |
|
|
|
// [EnumerationContext] |
|
String enumerationContext; |
|
if (!in.getString(enumerationContext)) |
|
{ |
|
return 0; |
|
} |
|
|
|
// [MACTCOUNT] |
|
Uint32Arg maxObjectCount; |
|
if (!in.getUint32Arg(maxObjectCount)) |
|
return 0; |
|
|
|
AutoPtr<CIMPullInstancesWithPathRequestMessage> request( |
|
new CIMPullInstancesWithPathRequestMessage( |
|
messageId, |
|
nameSpace, |
|
enumerationContext, |
|
maxObjectCount, |
|
QueueIdStack(queueId, returnQueueId))); |
|
|
|
request->binaryRequest = true; |
|
|
|
STAT_SERVERSTART |
|
|
|
return request.release(); |
|
} |
|
|
|
// For the pull Response messages the interface is the message and the, |
|
// not just the responseData. |
|
static void _encodePullInstancesWithPathResponseBody( |
|
CIMBuffer& out, |
|
CIMPullInstancesWithPathResponseMessage* msg, |
|
CIMResponseData& data, |
|
CIMName& name) |
|
{ |
|
/* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
|
static const CIMName NAME("PullInstancesWithPath"); |
|
name = NAME; |
|
// [endOfSequence] |
|
out.putBoolean(msg->endOfSequence); |
|
|
|
// [enumerationContext] |
|
out.putString(msg->enumerationContext); |
|
|
|
data.encodeBinaryResponse(out); |
|
} |
|
|
|
static CIMPullInstancesWithPathResponseMessage* |
|
_decodePullInstancesWithPathResponse( |
|
CIMBuffer& in, |
|
const String& messageId) |
|
{ |
|
CIMException cimException; |
|
|
|
Boolean endOfSequence; |
|
if (!in.getBoolean(endOfSequence)) |
|
return 0; |
|
|
|
String enumerationContext; |
|
if (!in.getString(enumerationContext)) |
|
return 0; |
|
|
|
CIMPullInstancesWithPathResponseMessage* msg = |
|
new CIMPullInstancesWithPathResponseMessage( |
|
messageId, |
|
cimException, |
|
endOfSequence, |
|
enumerationContext, |
|
QueueIdStack()); |
|
|
|
// Instead of resolving the binary data right here, we delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to getNamedInstances, which is going to resolve the binary |
|
// data when the callback function is registered. |
|
// This allows an alternate client implementation to gain direct access |
|
// to the binary data and pass this for example to the JNI implementation |
|
// of the JSR48 CIM Client for Java. |
|
CIMResponseData& responseData = msg->getResponseData(); |
|
responseData.setRemainingBinaryData(in); |
|
|
|
msg->binaryRequest=true; |
|
return msg; |
|
} |
|
//============================================================================== |
|
// |
|
// PullInstancePaths |
|
// |
|
//============================================================================== |
|
|
|
static void _encodePullInstancePathsRequest( |
|
CIMBuffer& buf, |
|
CIMPullInstancePathsRequestMessage* msg, |
|
CIMName& name) |
|
{ |
|
/* See ../Client/CIMOperationRequestEncoder.cpp */ |
|
|
|
static const CIMName NAME("PullInstancePaths"); |
|
name = NAME; |
|
|
|
// [HEADER] |
|
|
|
Uint32 flags = 0; |
|
|
|
_putHeader(buf, flags, msg->messageId, OP_PullInstancePaths); |
|
|
|
// [NAMESPACE] |
|
buf.putNamespaceName(msg->nameSpace); |
|
|
|
// [EnumerationContext] |
|
buf.putString(msg->enumerationContext); |
|
|
|
buf.putUint32Arg(msg->maxObjectCount); |
|
} |
|
|
|
static CIMPullInstancePathsRequestMessage* |
|
_decodePullInstancePathsRequest( |
|
CIMBuffer& in, |
|
Uint32 queueId, |
|
Uint32 returnQueueId, |
|
Uint32 flags, |
|
const String& messageId) |
|
{ |
|
/* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
|
STAT_GETSTARTTIME |
|
|
|
// [NAMESPACE] |
|
|
|
CIMNamespaceName nameSpace; |
|
if (!in.getNamespaceName(nameSpace)) |
|
return 0; |
|
|
|
// [EnumerationContext] |
|
String enumerationContext; |
|
if (!in.getString(enumerationContext)) |
|
{ |
|
return 0; |
|
} |
|
|
|
// [MAXOBJECTCOUNT] |
|
Uint32Arg maxObjectCount; |
|
if (!in.getUint32Arg(maxObjectCount)) |
|
return 0; |
|
|
|
AutoPtr<CIMPullInstancePathsRequestMessage> request( |
|
new CIMPullInstancePathsRequestMessage( |
|
messageId, |
|
nameSpace, |
|
enumerationContext, |
|
maxObjectCount, |
|
QueueIdStack(queueId, returnQueueId))); |
|
|
|
request->binaryRequest = true; |
|
|
|
STAT_SERVERSTART |
|
|
|
return request.release(); |
|
} |
|
|
|
// For the pull Response messages the interface is the message and the, |
|
// not just the responseData. |
|
static void _encodePullInstancePathsResponseBody( |
|
CIMBuffer& out, |
|
CIMPullInstancePathsResponseMessage* msg, |
|
CIMResponseData& data, |
|
CIMName& name) |
|
{ |
|
/* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
|
static const CIMName NAME("PullInstancePaths"); |
|
name = NAME; |
|
|
|
// [endOfSequence] |
|
out.putBoolean(msg->endOfSequence); |
|
|
|
// [enumerationContext] |
|
out.putString(msg->enumerationContext); |
|
|
|
data.encodeBinaryResponse(out); |
|
} |
|
|
|
static CIMPullInstancePathsResponseMessage* |
|
_decodePullInstancePathsResponse( |
|
CIMBuffer& in, |
|
const String& messageId) |
|
{ |
|
CIMException cimException; |
|
|
|
Boolean endOfSequence; |
|
if (!in.getBoolean(endOfSequence)) |
|
return 0; |
|
|
|
String enumerationContext; |
|
if (!in.getString(enumerationContext)) |
|
return 0; |
|
|
|
CIMPullInstancePathsResponseMessage* msg = |
|
new CIMPullInstancePathsResponseMessage( |
|
messageId, |
|
cimException, |
|
endOfSequence, |
|
enumerationContext, |
|
QueueIdStack()); |
|
|
|
// Instead of resolving the binary data right here, we delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to getNamedInstances, which is going to resolve the binary |
|
// data when the callback function is registered. |
|
// This allows an alternate client implementation to gain direct access |
|
// to the binary data and pass this for example to the JNI implementation |
|
// of the JSR48 CIM Client for Java. |
|
CIMResponseData& responseData = msg->getResponseData(); |
|
responseData.setRemainingBinaryData(in); |
|
|
|
msg->binaryRequest=true; |
|
return msg; |
|
} |
|
//============================================================================== |
|
// |
|
// CloseEnumeration |
|
// |
|
//============================================================================== |
|
|
|
static void _encodeCloseEnumerationRequest( |
|
CIMBuffer& buf, |
|
CIMCloseEnumerationRequestMessage* msg, |
|
CIMName& name) |
|
{ |
|
/* See ../Client/CIMOperationRequestEncoder.cpp */ |
|
|
|
static const CIMName NAME("CloseEnumeration"); |
|
name = NAME; |
|
|
|
// [HEADER] |
|
|
|
Uint32 flags = 0; |
|
|
|
_putHeader(buf, flags, msg->messageId, OP_CloseEnumeration); |
|
|
|
// [NAMESPACE] |
|
buf.putNamespaceName(msg->nameSpace); |
|
|
|
// [EnumerationContext] |
|
buf.putString(msg->enumerationContext); |
|
} |
|
|
|
static CIMCloseEnumerationRequestMessage* _decodeCloseEnumerationRequest( |
|
CIMBuffer& in, |
|
Uint32 queueId, |
|
Uint32 returnQueueId, |
|
Uint32 flags, |
|
const String& messageId) |
|
{ |
|
/* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
|
STAT_GETSTARTTIME |
|
|
|
// [NAMESPACE] |
|
|
|
CIMNamespaceName nameSpace; |
|
if (!in.getNamespaceName(nameSpace)) |
|
return 0; |
|
|
|
// [EnumerationContext] |
|
String enumerationContext; |
|
if (!in.getString(enumerationContext)) |
|
{ |
|
return 0; |
|
} |
|
|
|
AutoPtr<CIMCloseEnumerationRequestMessage> request( |
|
new CIMCloseEnumerationRequestMessage( |
|
messageId, |
|
nameSpace, |
|
enumerationContext, |
|
QueueIdStack(queueId, returnQueueId))); |
|
|
|
request->binaryRequest = true; |
|
|
|
STAT_SERVERSTART |
|
|
|
return request.release(); |
|
} |
|
|
|
static void _encodeCloseEnumerationResponseBody( |
|
CIMBuffer& out, |
|
CIMCloseEnumerationResponseMessage* msg, |
|
CIMName& name) |
|
{ |
|
/* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
|
static const CIMName NAME("CloseEnumeration"); |
|
name = NAME; |
|
} |
|
|
|
static CIMCloseEnumerationResponseMessage* |
|
_decodeCloseEnumerationResponse( |
|
CIMBuffer& in, |
|
const String& messageId) |
|
{ |
|
CIMException cimException; |
|
|
|
CIMCloseEnumerationResponseMessage* msg = |
|
new CIMCloseEnumerationResponseMessage( |
|
messageId, |
|
cimException, |
|
QueueIdStack()); |
|
|
|
msg->binaryRequest=true; |
|
return msg; |
|
} |
|
//============================================================================== |
|
// |
|
// EnumerationCount |
|
// |
|
//============================================================================== |
|
|
|
static void _encodeEnumerationCountRequest( |
|
CIMBuffer& buf, |
|
CIMEnumerationCountRequestMessage* msg, |
|
CIMName& name) |
|
{ |
|
/* See ../Client/CIMOperationRequestEncoder.cpp */ |
|
|
|
static const CIMName NAME("EnumerationCount"); |
|
name = NAME; |
|
|
|
// [HEADER] |
|
Uint32 flags = 0; |
|
|
|
_putHeader(buf, flags, msg->messageId, OP_EnumerationCount); |
|
|
|
// [NAMESPACE] |
|
buf.putNamespaceName(msg->nameSpace); |
|
|
|
// [EnumerationContext] |
|
buf.putString(msg->enumerationContext); |
|
} |
|
|
|
static CIMEnumerationCountRequestMessage* _decodeEnumerationCountRequest( |
|
CIMBuffer& in, |
|
Uint32 queueId, |
|
Uint32 returnQueueId, |
|
Uint32 flags, |
|
const String& messageId) |
|
{ |
|
/* See ../Server/CIMOperationRequestDecoder.cpp */ |
|
|
|
STAT_GETSTARTTIME |
|
|
|
// [NAMESPACE] |
|
|
|
CIMNamespaceName nameSpace; |
|
if (!in.getNamespaceName(nameSpace)) |
|
return 0; |
|
|
|
// [EnumerationContext] |
|
String enumerationContext; |
|
if (!in.getString(enumerationContext)) |
|
{ |
|
return 0; |
|
} |
|
|
|
AutoPtr<CIMEnumerationCountRequestMessage> request( |
|
new CIMEnumerationCountRequestMessage( |
|
messageId, |
|
nameSpace, |
|
enumerationContext, |
|
QueueIdStack(queueId, returnQueueId))); |
|
|
|
request->binaryRequest = true; |
|
|
|
STAT_SERVERSTART |
|
|
|
return request.release(); |
|
} |
|
|
|
static void _encodeEnumerationCountResponseBody( |
|
CIMBuffer& out, |
|
CIMEnumerationCountResponseMessage* msg, |
|
CIMName& name) |
|
{ |
|
/* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
|
static const CIMName NAME("EnumerationCount"); |
|
name = NAME; |
|
|
|
// [count] |
|
out.putUint64Arg(msg->count); |
|
} |
|
|
|
static CIMEnumerationCountResponseMessage* |
|
_decodeEnumerationCountResponse( |
|
CIMBuffer& in, |
|
const String& messageId) |
|
{ |
|
CIMException cimException; |
|
Uint64 count; |
|
if (!in.getUint64(count)) |
|
return 0; |
|
|
|
CIMEnumerationCountResponseMessage* msg = |
|
new CIMEnumerationCountResponseMessage( |
|
messageId, |
|
cimException, |
|
QueueIdStack(), |
|
count); |
|
|
|
msg->binaryRequest=true; |
|
return msg; |
|
} |
|
|
|
// EXP_PULL_END |
|
|
|
|
|
//============================================================================== |
|
// |
|
// BinaryCodec::hexDump() |
|
// |
|
//============================================================================== |
|
|
|
#if defined(PEGASUS_DEBUG) |
|
|
|
void BinaryCodec::hexDump(const void* data, size_t size) |
|
{ |
|
unsigned char* p = (unsigned char*)data; |
|
unsigned char buf[16]; |
|
size_t n = 0; |
|
|
|
for (size_t i = 0, col = 0; i < size; i++) |
|
{ |
|
unsigned char c = p[i]; |
|
buf[n++] = c; |
|
|
|
if (col == 0) |
|
printf("%06X ", (unsigned int)i); |
|
|
|
printf("%02X ", c); |
|
|
|
if (col + 1 == sizeof(buf) || i + 1 == size) |
|
{ |
|
for (size_t j = col + 1; j < sizeof(buf); j++) |
|
printf(" "); |
|
|
|
for (size_t j = 0; j < n; j++) |
|
{ |
|
c = buf[j]; |
|
|
|
if (c >= ' ' && c <= '~') |
|
printf("%c", buf[j]); |
|
else |
|
printf("."); |
|
} |
|
|
|
printf("\n"); |
|
n = 0; |
|
} |
|
|
|
if (col + 1 == sizeof(buf)) |
|
col = 0; |
|
else |
|
col++; |
|
} |
|
|
|
printf("\n"); |
|
} |
|
|
|
#endif /* defined(PEGASUS_DEBUG) */ |
|
|
|
//============================================================================== |
|
// |
|
// BinaryCodec::decodeRequest() |
|
// |
|
//============================================================================== |
|
|
|
CIMOperationRequestMessage* BinaryCodec::decodeRequest( |
|
CIMBuffer& in, |
|
Uint32 queueId, |
|
Uint32 returnQueueId) |
{ | { |
CIMBuffer buf((char*)in.getData(), in.size()); |
|
CIMBufferReleaser buf_(buf); |
|
| |
// Turn on validation: | // Turn on validation: |
#if defined(ENABLE_VALIDATION) | #if defined(ENABLE_VALIDATION) |
buf.setValidate(true); |
in.setValidate(true); |
#endif | #endif |
| |
Uint32 flags; | Uint32 flags; |
|
|
Operation operation; | Operation operation; |
| |
| |
if (!_getHeader(buf, flags, messageId, operation)) |
if (!_getHeader(in, flags, messageId, operation)) |
{ | { |
return 0; | return 0; |
} | } |
|
|
{ | { |
case OP_EnumerateInstances: | case OP_EnumerateInstances: |
return _decodeEnumerateInstancesRequest( | return _decodeEnumerateInstancesRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, flags, messageId); |
case OP_EnumerateInstanceNames: | case OP_EnumerateInstanceNames: |
return _decodeEnumerateInstanceNamesRequest( | return _decodeEnumerateInstanceNamesRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, messageId); |
case OP_GetInstance: | case OP_GetInstance: |
return _decodeGetInstanceRequest( | return _decodeGetInstanceRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, flags, messageId); |
case OP_CreateInstance: | case OP_CreateInstance: |
return _decodeCreateInstanceRequest( | return _decodeCreateInstanceRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, messageId); |
case OP_ModifyInstance: | case OP_ModifyInstance: |
return _decodeModifyInstanceRequest( | return _decodeModifyInstanceRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, flags, messageId); |
case OP_DeleteInstance: | case OP_DeleteInstance: |
return _decodeDeleteInstanceRequest( | return _decodeDeleteInstanceRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, messageId); |
case OP_Associators: | case OP_Associators: |
return _decodeAssociatorsRequest( | return _decodeAssociatorsRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, flags, messageId); |
case OP_AssociatorNames: | case OP_AssociatorNames: |
return _decodeAssociatorNamesRequest( | return _decodeAssociatorNamesRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, messageId); |
case OP_References: | case OP_References: |
return _decodeReferencesRequest( | return _decodeReferencesRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, flags, messageId); |
case OP_ReferenceNames: | case OP_ReferenceNames: |
return _decodeReferenceNamesRequest( | return _decodeReferenceNamesRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, messageId); |
case OP_GetClass: | case OP_GetClass: |
return _decodeGetClassRequest( | return _decodeGetClassRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, flags, messageId); |
case OP_EnumerateClasses: | case OP_EnumerateClasses: |
return _decodeEnumerateClassesRequest( | return _decodeEnumerateClassesRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, flags, messageId); |
case OP_EnumerateClassNames: | case OP_EnumerateClassNames: |
return _decodeEnumerateClassNamesRequest( | return _decodeEnumerateClassNamesRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, flags, messageId); |
case OP_CreateClass: | case OP_CreateClass: |
return _decodeCreateClassRequest( | return _decodeCreateClassRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, messageId); |
case OP_DeleteClass: | case OP_DeleteClass: |
return _decodeDeleteClassRequest( | return _decodeDeleteClassRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, messageId); |
case OP_ModifyClass: | case OP_ModifyClass: |
return _decodeModifyClassRequest( | return _decodeModifyClassRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, messageId); |
case OP_SetQualifier: | case OP_SetQualifier: |
return _decodeSetQualifierRequest( | return _decodeSetQualifierRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, messageId); |
case OP_GetQualifier: | case OP_GetQualifier: |
return _decodeGetQualifierRequest( | return _decodeGetQualifierRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, messageId); |
case OP_DeleteQualifier: | case OP_DeleteQualifier: |
return _decodeDeleteQualifierRequest( | return _decodeDeleteQualifierRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, messageId); |
case OP_EnumerateQualifiers: | case OP_EnumerateQualifiers: |
return _decodeEnumerateQualifiersRequest( | return _decodeEnumerateQualifiersRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, messageId); |
case OP_GetProperty: | case OP_GetProperty: |
return _decodeGetPropertyRequest( | return _decodeGetPropertyRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, messageId); |
case OP_SetProperty: | case OP_SetProperty: |
return _decodeSetPropertyRequest( | return _decodeSetPropertyRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, messageId); |
case OP_InvokeMethod: | case OP_InvokeMethod: |
return _decodeInvokeMethodRequest( | return _decodeInvokeMethodRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, messageId); |
case OP_ExecQuery: | case OP_ExecQuery: |
return _decodeExecQueryRequest( | return _decodeExecQueryRequest( |
buf, queueId, returnQueueId, flags, messageId); |
in, queueId, returnQueueId, messageId); |
|
//EXP_PULL_BEGIN |
|
case OP_OpenEnumerateInstances: |
|
return _decodeOpenEnumerateInstancesRequest( |
|
in, queueId, returnQueueId, flags, messageId); |
|
break; |
|
case OP_OpenEnumerateInstancePaths: |
|
return _decodeOpenEnumerateInstancePathsRequest( |
|
in, queueId, returnQueueId, flags, messageId); |
|
break; |
|
case OP_OpenReferenceInstances: |
|
return _decodeOpenReferenceInstancesRequest( |
|
in, queueId, returnQueueId, flags, messageId); |
|
break; |
|
case OP_OpenReferenceInstancePaths: |
|
return _decodeOpenReferenceInstancePathsRequest( |
|
in, queueId, returnQueueId, flags, messageId); |
|
break; |
|
case OP_OpenAssociatorInstances: |
|
return _decodeOpenAssociatorInstancesRequest( |
|
in, queueId, returnQueueId, flags, messageId); |
|
break; |
|
case OP_OpenAssociatorInstancePaths: |
|
return _decodeOpenAssociatorInstancePathsRequest( |
|
in, queueId, returnQueueId, flags, messageId); |
|
break; |
|
case OP_PullInstancesWithPath: |
|
return _decodePullInstancesWithPathRequest( |
|
in, queueId, returnQueueId, flags, messageId); |
|
break; |
|
case OP_PullInstancePaths: |
|
return _decodePullInstancePathsRequest( |
|
in, queueId, returnQueueId, flags, messageId); |
|
break; |
|
case OP_CloseEnumeration: |
|
return _decodeCloseEnumerationRequest( |
|
in, queueId, returnQueueId, flags, messageId); |
|
break; |
|
case OP_EnumerationCount: |
|
return _decodeEnumerationCountRequest( |
|
in, queueId, returnQueueId, flags, messageId); |
|
break; |
|
//EXP_PULL_END |
default: | default: |
// Unexpected message type | // Unexpected message type |
PEGASUS_ASSERT(0); | PEGASUS_ASSERT(0); |
|
|
CIMBuffer buf((char*)in.getData(), in.size()); | CIMBuffer buf((char*)in.getData(), in.size()); |
CIMBufferReleaser buf_(buf); | CIMBufferReleaser buf_(buf); |
| |
// Turn on validation: |
return decodeResponse(buf); |
|
} |
|
|
|
CIMResponseMessage* BinaryCodec::decodeResponse( |
|
CIMBuffer& buf) |
|
{ |
|
// Turn on validation: This is a debugging tool |
#if defined(ENABLE_VALIDATION) | #if defined(ENABLE_VALIDATION) |
buf.setValidate(true); | buf.setValidate(true); |
#endif | #endif |
|
|
switch (operation) | switch (operation) |
{ | { |
case OP_EnumerateInstances: | case OP_EnumerateInstances: |
msg = _decodeEnumerateInstancesResponse(buf, flags, messageId); |
msg = _decodeEnumerateInstancesResponse(buf, messageId); |
break; | break; |
case OP_EnumerateInstanceNames: | case OP_EnumerateInstanceNames: |
msg = _decodeEnumerateInstanceNamesResponse(buf, flags, messageId); |
msg = _decodeEnumerateInstanceNamesResponse(buf, messageId); |
break; | break; |
case OP_GetInstance: | case OP_GetInstance: |
msg = _decodeGetInstanceResponse(buf, flags, messageId); |
msg = _decodeGetInstanceResponse(buf, messageId); |
break; | break; |
case OP_CreateInstance: | case OP_CreateInstance: |
msg = _decodeCreateInstanceResponse(buf, flags, messageId); |
msg = _decodeCreateInstanceResponse(buf, messageId); |
break; | break; |
case OP_ModifyInstance: | case OP_ModifyInstance: |
msg = _decodeModifyInstanceResponse(buf, flags, messageId); |
msg = _decodeModifyInstanceResponse(buf, messageId); |
break; | break; |
case OP_DeleteInstance: | case OP_DeleteInstance: |
msg = _decodeDeleteInstanceResponse(buf, flags, messageId); |
msg = _decodeDeleteInstanceResponse(messageId); |
break; | break; |
case OP_Associators: | case OP_Associators: |
msg = _decodeAssociatorsResponse(buf, flags, messageId); |
msg = _decodeAssociatorsResponse(buf, messageId); |
break; | break; |
case OP_AssociatorNames: | case OP_AssociatorNames: |
msg = _decodeAssociatorNamesResponse(buf, flags, messageId); |
msg = _decodeAssociatorNamesResponse(buf, messageId); |
break; | break; |
case OP_References: | case OP_References: |
msg = _decodeReferencesResponse(buf, flags, messageId); |
msg = _decodeReferencesResponse(buf, messageId); |
break; | break; |
case OP_ReferenceNames: | case OP_ReferenceNames: |
msg = _decodeReferenceNamesResponse(buf, flags, messageId); |
msg = _decodeReferenceNamesResponse(buf, messageId); |
break; | break; |
case OP_GetClass: | case OP_GetClass: |
msg = _decodeGetClassResponse(buf, flags, messageId); |
msg = _decodeGetClassResponse(buf, messageId); |
break; | break; |
case OP_EnumerateClasses: | case OP_EnumerateClasses: |
msg = _decodeEnumerateClassesResponse(buf, flags, messageId); |
msg = _decodeEnumerateClassesResponse(buf, messageId); |
break; | break; |
case OP_EnumerateClassNames: | case OP_EnumerateClassNames: |
msg = _decodeEnumerateClassNamesResponse(buf, flags, messageId); |
msg = _decodeEnumerateClassNamesResponse(buf, messageId); |
break; | break; |
case OP_CreateClass: | case OP_CreateClass: |
msg = _decodeCreateClassResponse(buf, flags, messageId); |
msg = _decodeCreateClassResponse(messageId); |
break; | break; |
case OP_DeleteClass: | case OP_DeleteClass: |
msg = _decodeDeleteClassResponse(buf, flags, messageId); |
msg = _decodeDeleteClassResponse(messageId); |
break; | break; |
case OP_ModifyClass: | case OP_ModifyClass: |
msg = _decodeModifyClassResponse(buf, flags, messageId); |
msg = _decodeModifyClassResponse(messageId); |
break; | break; |
case OP_SetQualifier: | case OP_SetQualifier: |
msg = _decodeSetQualifierResponse(buf, flags, messageId); |
msg = _decodeSetQualifierResponse(messageId); |
break; | break; |
case OP_GetQualifier: | case OP_GetQualifier: |
msg = _decodeGetQualifierResponse(buf, flags, messageId); |
msg = _decodeGetQualifierResponse(buf, messageId); |
break; | break; |
case OP_DeleteQualifier: | case OP_DeleteQualifier: |
msg = _decodeDeleteQualifierResponse(buf, flags, messageId); |
msg = _decodeDeleteQualifierResponse(messageId); |
break; | break; |
case OP_EnumerateQualifiers: | case OP_EnumerateQualifiers: |
msg = _decodeEnumerateQualifiersResponse(buf, flags, messageId); |
msg = _decodeEnumerateQualifiersResponse(buf, messageId); |
break; | break; |
case OP_GetProperty: | case OP_GetProperty: |
msg = _decodeGetPropertyResponse(buf, flags, messageId); |
msg = _decodeGetPropertyResponse(buf, messageId); |
break; | break; |
case OP_SetProperty: | case OP_SetProperty: |
msg = _decodeSetPropertyResponse(buf, flags, messageId); |
msg = _decodeSetPropertyResponse(messageId); |
break; | break; |
case OP_InvokeMethod: | case OP_InvokeMethod: |
msg = _decodeInvokeMethodResponse(buf, flags, messageId); |
msg = _decodeInvokeMethodResponse(buf, messageId); |
break; | break; |
case OP_ExecQuery: | case OP_ExecQuery: |
msg = _decodeExecQueryResponse(buf, flags, messageId); |
msg = _decodeExecQueryResponse(buf, messageId); |
|
break; |
|
//EXP_PULL_BEGIN |
|
case OP_OpenEnumerateInstances: |
|
msg = _decodeOpenEnumerateInstancesResponse(buf, messageId); |
|
break; |
|
case OP_OpenEnumerateInstancePaths: |
|
msg = _decodeOpenEnumerateInstancePathsResponse(buf, messageId); |
|
break; |
|
case OP_OpenReferenceInstances: |
|
msg = _decodeOpenReferenceInstancesResponse(buf, messageId); |
|
break; |
|
case OP_OpenReferenceInstancePaths: |
|
msg = _decodeOpenReferenceInstancePathsResponse(buf, messageId); |
|
break; |
|
case OP_OpenAssociatorInstances: |
|
msg = _decodeOpenAssociatorInstancesResponse(buf, messageId); |
|
break; |
|
case OP_OpenAssociatorInstancePaths: |
|
msg = _decodeOpenAssociatorInstancePathsResponse(buf, messageId); |
break; | break; |
|
case OP_PullInstancesWithPath: |
|
msg = _decodePullInstancesWithPathResponse(buf, messageId); |
|
break; |
|
case OP_PullInstancePaths: |
|
msg = _decodePullInstancePathsResponse(buf, messageId); |
|
break; |
|
case OP_CloseEnumeration: |
|
msg = _decodeCloseEnumerationResponse(buf, messageId); |
|
break; |
|
//EXP_PULL_END |
default: | default: |
// Unexpected message type | // Unexpected message type |
PEGASUS_ASSERT(0); | PEGASUS_ASSERT(0); |
|
|
const String& messageId, | const String& messageId, |
HttpMethod httpMethod, | HttpMethod httpMethod, |
const ContentLanguageList& httpContentLanguages, | const ContentLanguageList& httpContentLanguages, |
|
const Buffer& rtnParams, |
const Buffer& body, | const Buffer& body, |
Uint64 serverResponseTime, | Uint64 serverResponseTime, |
Boolean isFirst, | Boolean isFirst, |
|
|
XmlWriter::appendMethodResponseHeader(out, httpMethod, | XmlWriter::appendMethodResponseHeader(out, httpMethod, |
httpContentLanguages, 0, serverResponseTime, true); | httpContentLanguages, 0, serverResponseTime, true); |
| |
|
for (size_t i=out.size(), k=CIMBuffer::round(i); i<k;i++) |
|
{ |
|
out.append('\0'); |
|
} |
// Binary message header: | // Binary message header: |
CIMBuffer cb(128); | CIMBuffer cb(128); |
_putHeader(cb, 0, messageId, _NameToOp(iMethodName)); | _putHeader(cb, 0, messageId, _NameToOp(iMethodName)); |
|
|
{ | { |
out.append(body.getData(), body.size()); | out.append(body.getData(), body.size()); |
} | } |
|
// EXP_PULL TODO - TBD Review this. |
|
// If there are any parameters include them here. |
|
// Assumes that it is prebuilt with all components |
|
// |
|
if (rtnParams.size() != 0) |
|
{ |
|
out << rtnParams; |
|
} |
|
// |
|
// //EXP_PULL_END |
| |
return out; | return out; |
} | } |
|
|
break; | break; |
} | } |
| |
|
//EXP_PULL_BEGIN |
|
case CIM_OPEN_ENUMERATE_INSTANCES_REQUEST_MESSAGE: |
|
{ |
|
_encodeOpenEnumerateInstancesRequest(buf, |
|
(CIMOpenEnumerateInstancesRequestMessage*)msg, name); |
|
break; |
|
} |
|
|
|
case CIM_OPEN_ENUMERATE_INSTANCE_PATHS_REQUEST_MESSAGE: |
|
{ |
|
_encodeOpenEnumerateInstancePathsRequest(buf, |
|
(CIMOpenEnumerateInstancePathsRequestMessage*)msg, name); |
|
break; |
|
} |
|
case CIM_OPEN_ASSOCIATOR_INSTANCES_REQUEST_MESSAGE: |
|
{ |
|
_encodeOpenAssociatorInstancesRequest(buf, |
|
(CIMOpenAssociatorInstancesRequestMessage*)msg, name); |
|
break; |
|
} |
|
case CIM_OPEN_ASSOCIATOR_INSTANCE_PATHS_REQUEST_MESSAGE: |
|
{ |
|
_encodeOpenAssociatorInstancePathsRequest(buf, |
|
(CIMOpenAssociatorInstancePathsRequestMessage*)msg, name); |
|
break; |
|
} |
|
case CIM_OPEN_REFERENCE_INSTANCES_REQUEST_MESSAGE: |
|
{ |
|
_encodeOpenReferenceInstancesRequest(buf, |
|
(CIMOpenReferenceInstancesRequestMessage*)msg, name); |
|
break; |
|
} |
|
case CIM_OPEN_REFERENCE_INSTANCE_PATHS_REQUEST_MESSAGE: |
|
{ |
|
_encodeOpenReferenceInstancePathsRequest(buf, |
|
(CIMOpenReferenceInstancePathsRequestMessage*)msg, name); |
|
break; |
|
} |
|
case CIM_PULL_INSTANCES_WITH_PATH_REQUEST_MESSAGE: |
|
{ |
|
_encodePullInstancesWithPathRequest(buf, |
|
(CIMPullInstancesWithPathRequestMessage*)msg, name); |
|
break; |
|
} |
|
case CIM_PULL_INSTANCE_PATHS_REQUEST_MESSAGE: |
|
{ |
|
_encodePullInstancePathsRequest(buf, |
|
(CIMPullInstancePathsRequestMessage*)msg, name); |
|
break; |
|
} |
|
case CIM_CLOSE_ENUMERATION_REQUEST_MESSAGE: |
|
{ |
|
_encodeCloseEnumerationRequest(buf, |
|
(CIMCloseEnumerationRequestMessage*)msg, name); |
|
break; |
|
} |
|
case CIM_ENUMERATION_COUNT_REQUEST_MESSAGE: |
|
{ |
|
_encodeEnumerationCountRequest(buf, |
|
(CIMEnumerationCountRequestMessage*)msg, name); |
|
break; |
|
} |
|
//EXP_PULL_END |
|
|
default: | default: |
// Unexpected message type | // Unexpected message type |
PEGASUS_ASSERT(0); | PEGASUS_ASSERT(0); |
|
|
true, /* binaryRequest */ | true, /* binaryRequest */ |
binaryResponse); | binaryResponse); |
| |
|
// Need to pad the Buffer to the 64bit border since CIMBuffer is 64bit |
|
// aligned, but Buffer only 8bit |
|
Uint32 extraAlignBytes = CIMBuffer::round(out.size()) - out.size(); |
|
for (Uint32 i=0; i < extraAlignBytes;i++) |
|
{ |
|
out.append('\0'); |
|
} |
|
// Need fix-up Content-length value... |
|
char * contentLengthValueStart = |
|
(char*) strstr(out.getData(), "content-length"); |
|
contentLengthValueStart += sizeof("content-length: ")-1; |
|
// using sprintf to stay equal to the macro OUTPUT_CONTENTLENGTH definition |
|
// defined in XMLGenerator.h |
|
char contentLengthP[11]; |
|
sprintf(contentLengthP,"%.10u", (unsigned int)buf.size()+extraAlignBytes); |
|
memcpy(contentLengthValueStart,contentLengthP,10); |
|
|
out.append(buf.getData(), buf.size()); | out.append(buf.getData(), buf.size()); |
| |
return true; | return true; |
|
|
{ | { |
case CIM_ENUMERATE_INSTANCES_RESPONSE_MESSAGE: | case CIM_ENUMERATE_INSTANCES_RESPONSE_MESSAGE: |
{ | { |
_encodeEnumerateInstancesResponseBody(buf, |
_encodeEnumerateInstancesResponseBody( |
(CIMEnumerateInstancesResponseMessage*)msg, name); |
buf, |
|
((CIMEnumerateInstancesResponseMessage*)msg)->getResponseData(), |
|
name, |
|
(msg->getIndex() == 0)); |
break; | break; |
} | } |
| |
case CIM_ENUMERATE_INSTANCE_NAMES_RESPONSE_MESSAGE: | case CIM_ENUMERATE_INSTANCE_NAMES_RESPONSE_MESSAGE: |
{ | { |
_encodeEnumerateInstanceNamesResponseBody(buf, |
_encodeEnumerateInstanceNamesResponseBody( |
(CIMEnumerateInstanceNamesResponseMessage*)msg, name); |
buf, |
|
((CIMEnumerateInstanceNamesResponseMessage*)msg)->getResponseData(), |
|
name); |
break; | break; |
} | } |
| |
case CIM_GET_INSTANCE_RESPONSE_MESSAGE: | case CIM_GET_INSTANCE_RESPONSE_MESSAGE: |
{ | { |
_encodeGetInstanceResponseBody(buf, |
_encodeGetInstanceResponseBody( |
(CIMGetInstanceResponseMessage*)msg, name); |
buf, |
|
((CIMGetInstanceResponseMessage*)msg)->getResponseData(), |
|
name); |
break; | break; |
} | } |
| |
|
|
| |
case CIM_MODIFY_INSTANCE_RESPONSE_MESSAGE: | case CIM_MODIFY_INSTANCE_RESPONSE_MESSAGE: |
{ | { |
_encodeModifyInstanceResponseBody(buf, |
_encodeModifyInstanceResponseBody(name); |
(CIMModifyInstanceResponseMessage*)msg, name); |
|
break; | break; |
} | } |
| |
case CIM_DELETE_INSTANCE_RESPONSE_MESSAGE: | case CIM_DELETE_INSTANCE_RESPONSE_MESSAGE: |
{ | { |
_encodeDeleteInstanceResponseBody(buf, |
_encodeDeleteInstanceResponseBody(name); |
(CIMDeleteInstanceResponseMessage*)msg, name); |
|
break; | break; |
} | } |
| |
case CIM_ASSOCIATORS_RESPONSE_MESSAGE: | case CIM_ASSOCIATORS_RESPONSE_MESSAGE: |
{ | { |
_encodeAssociatorsResponseBody(buf, |
_encodeAssociatorsResponseBody( |
(CIMAssociatorsResponseMessage*)msg, name); |
buf, |
|
((CIMAssociatorsResponseMessage*)msg)->getResponseData(), |
|
name); |
break; | break; |
} | } |
| |
case CIM_ASSOCIATOR_NAMES_RESPONSE_MESSAGE: | case CIM_ASSOCIATOR_NAMES_RESPONSE_MESSAGE: |
{ | { |
_encodeAssociatorNamesResponseBody(buf, |
_encodeAssociatorNamesResponseBody( |
(CIMAssociatorNamesResponseMessage*)msg, name); |
buf, |
|
((CIMAssociatorNamesResponseMessage*)msg)->getResponseData(), |
|
name); |
break; | break; |
} | } |
| |
case CIM_REFERENCES_RESPONSE_MESSAGE: | case CIM_REFERENCES_RESPONSE_MESSAGE: |
{ | { |
_encodeReferencesResponseBody(buf, |
_encodeReferencesResponseBody( |
(CIMReferencesResponseMessage*)msg, name); |
buf, |
|
((CIMReferencesResponseMessage*)msg)->getResponseData(), |
|
name); |
break; | break; |
} | } |
| |
case CIM_REFERENCE_NAMES_RESPONSE_MESSAGE: | case CIM_REFERENCE_NAMES_RESPONSE_MESSAGE: |
{ | { |
_encodeReferenceNamesResponseBody(buf, |
_encodeReferenceNamesResponseBody( |
(CIMReferenceNamesResponseMessage*)msg, name); |
buf, |
|
((CIMReferenceNamesResponseMessage*)msg)->getResponseData(), |
|
name); |
break; | break; |
} | } |
| |
|
|
| |
case CIM_CREATE_CLASS_RESPONSE_MESSAGE: | case CIM_CREATE_CLASS_RESPONSE_MESSAGE: |
{ | { |
_encodeCreateClassResponseBody(buf, |
_encodeCreateClassResponseBody(name); |
(CIMCreateClassResponseMessage*)msg, name); |
|
break; | break; |
} | } |
| |
case CIM_DELETE_CLASS_RESPONSE_MESSAGE: | case CIM_DELETE_CLASS_RESPONSE_MESSAGE: |
{ | { |
_encodeDeleteClassResponseBody(buf, |
_encodeDeleteClassResponseBody(name); |
(CIMDeleteClassResponseMessage*)msg, name); |
|
break; | break; |
} | } |
| |
case CIM_MODIFY_CLASS_RESPONSE_MESSAGE: | case CIM_MODIFY_CLASS_RESPONSE_MESSAGE: |
{ | { |
_encodeModifyClassResponseBody(buf, |
_encodeModifyClassResponseBody(name); |
(CIMModifyClassResponseMessage*)msg, name); |
|
break; | break; |
} | } |
| |
case CIM_SET_QUALIFIER_RESPONSE_MESSAGE: | case CIM_SET_QUALIFIER_RESPONSE_MESSAGE: |
{ | { |
_encodeSetQualifierResponseBody(buf, |
_encodeSetQualifierResponseBody(name); |
(CIMSetQualifierResponseMessage*)msg, name); |
|
break; | break; |
} | } |
| |
|
|
| |
case CIM_DELETE_QUALIFIER_RESPONSE_MESSAGE: | case CIM_DELETE_QUALIFIER_RESPONSE_MESSAGE: |
{ | { |
_encodeDeleteQualifierResponseBody(buf, |
_encodeDeleteQualifierResponseBody(name); |
(CIMDeleteQualifierResponseMessage*)msg, name); |
|
break; | break; |
} | } |
| |
|
|
| |
case CIM_SET_PROPERTY_RESPONSE_MESSAGE: | case CIM_SET_PROPERTY_RESPONSE_MESSAGE: |
{ | { |
_encodeSetPropertyResponseBody(buf, |
_encodeSetPropertyResponseBody(name); |
(CIMSetPropertyResponseMessage*)msg, name); |
|
break; | break; |
} | } |
| |
|
|
| |
case CIM_EXEC_QUERY_RESPONSE_MESSAGE: | case CIM_EXEC_QUERY_RESPONSE_MESSAGE: |
{ | { |
_encodeExecQueryResponseBody(buf, |
_encodeExecQueryResponseBody( |
(CIMExecQueryResponseMessage*)msg, name); |
buf, |
|
((CIMExecQueryResponseMessage*)msg)->getResponseData(), |
|
name); |
|
break; |
|
} |
|
|
|
//EXP_PULL_BEGIN |
|
case CIM_OPEN_ENUMERATE_INSTANCES_RESPONSE_MESSAGE: |
|
{ |
|
_encodeOpenEnumerateInstancesResponseBody(buf, |
|
(CIMOpenEnumerateInstancesResponseMessage*)msg, |
|
((CIMOpenEnumerateInstancesResponseMessage*)msg)-> |
|
getResponseData(), |
|
name); |
|
break; |
|
} |
|
|
|
case CIM_OPEN_ENUMERATE_INSTANCE_PATHS_RESPONSE_MESSAGE: |
|
{ |
|
_encodeOpenEnumerateInstancePathsResponseBody(buf, |
|
(CIMOpenEnumerateInstancePathsResponseMessage*)msg, |
|
((CIMOpenEnumerateInstancePathsResponseMessage*)msg)-> |
|
getResponseData(), |
|
name); |
|
break; |
|
} |
|
|
|
case CIM_OPEN_REFERENCE_INSTANCES_RESPONSE_MESSAGE: |
|
{ |
|
_encodeOpenReferenceInstancesResponseBody(buf, |
|
(CIMOpenReferenceInstancesResponseMessage*)msg, |
|
((CIMOpenReferenceInstancesResponseMessage*)msg)-> |
|
getResponseData(), |
|
name); |
|
break; |
|
} |
|
|
|
case CIM_OPEN_REFERENCE_INSTANCE_PATHS_RESPONSE_MESSAGE: |
|
{ |
|
_encodeOpenReferenceInstancePathsResponseBody(buf, |
|
(CIMOpenReferenceInstancePathsResponseMessage*)msg, |
|
((CIMOpenReferenceInstancePathsResponseMessage*)msg)-> |
|
getResponseData(), |
|
name); |
|
break; |
|
} |
|
case CIM_OPEN_ASSOCIATOR_INSTANCES_RESPONSE_MESSAGE: |
|
{ |
|
_encodeOpenAssociatorInstancesResponseBody(buf, |
|
(CIMOpenAssociatorInstancesResponseMessage*)msg, |
|
((CIMOpenAssociatorInstancesResponseMessage*)msg)-> |
|
getResponseData(), |
|
name); |
|
break; |
|
} |
|
|
|
case CIM_OPEN_ASSOCIATOR_INSTANCE_PATHS_RESPONSE_MESSAGE: |
|
{ |
|
_encodeOpenAssociatorInstancePathsResponseBody(buf, |
|
(CIMOpenAssociatorInstancePathsResponseMessage*)msg, |
|
((CIMOpenAssociatorInstancePathsResponseMessage*)msg)-> |
|
getResponseData(), |
|
name); |
|
break; |
|
} |
|
|
|
case CIM_PULL_INSTANCES_WITH_PATH_RESPONSE_MESSAGE: |
|
{ |
|
_encodePullInstancesWithPathResponseBody(buf, |
|
(CIMPullInstancesWithPathResponseMessage*)msg, |
|
((CIMPullInstancesWithPathResponseMessage*)msg)-> |
|
getResponseData(), |
|
name); |
|
break; |
|
} |
|
|
|
case CIM_PULL_INSTANCE_PATHS_RESPONSE_MESSAGE: |
|
{ |
|
_encodePullInstancePathsResponseBody(buf, |
|
(CIMPullInstancePathsResponseMessage*)msg, |
|
((CIMPullInstancePathsResponseMessage*)msg)-> |
|
getResponseData(), |
|
name); |
|
break; |
|
} |
|
case CIM_CLOSE_ENUMERATION_RESPONSE_MESSAGE: |
|
{ |
|
_encodeCloseEnumerationResponseBody(buf, |
|
(CIMCloseEnumerationResponseMessage*)msg, |
|
name); |
|
break; |
|
} |
|
case CIM_ENUMERATION_COUNT_RESPONSE_MESSAGE: |
|
{ |
|
_encodeEnumerationCountResponseBody(buf, |
|
(CIMEnumerationCountResponseMessage*)msg, |
|
name); |
break; | break; |
} | } |
|
//EXP_PULL_END |
| |
default: | default: |
// Unexpected message type | // Unexpected message type |