version 1.9, 2009/07/08 13:48:26
|
version 1.9.2.3, 2009/10/19 15:20:03
|
|
|
| |
static void _encodeEnumerateInstancesResponseBody( | static void _encodeEnumerateInstancesResponseBody( |
CIMBuffer& out, | CIMBuffer& out, |
CIMInstancesResponseData& data, |
CIMResponseData& data, |
CIMName& name) | CIMName& name) |
{ | { |
/* See ../Server/CIMOperationResponseEncoder.cpp */ | /* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
// This allows an alternate client implementation to gain direct access | // This allows an alternate client implementation to gain direct access |
// to the binary data and pass this for example to the JNI implementation | // to the binary data and pass this for example to the JNI implementation |
// of the JSR48 CIM Client for Java. | // of the JSR48 CIM Client for Java. |
CIMInstancesResponseData& responseData = msg->getResponseData(); |
CIMResponseData& responseData = msg->getResponseData(); |
responseData.setBinaryCimInstances(in,false); |
responseData.setBinary(in,false); |
| |
msg->binaryRequest=true; | msg->binaryRequest=true; |
return msg; | return msg; |
|
|
Uint32 flags, | Uint32 flags, |
const String& messageId) | const String& messageId) |
{ | { |
Array<CIMObjectPath> instanceNames; |
/* Array<CIMObjectPath> instanceNames; |
| |
while (in.more()) | while (in.more()) |
{ | { |
|
|
| |
instanceNames.append(tmp.getData(), tmp.size()); | 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 right here, we delegate this |
|
// to a later point in time when the data is actually retrieved through |
|
// a call to getInstanceNames, 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.setBinary(in,false); |
| |
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); |
} | } |
| |
//============================================================================== | //============================================================================== |
|
|
// This allows an alternate client implementation to gain direct access | // This allows an alternate client implementation to gain direct access |
// to the binary data and pass this for example to the JNI implementation | // to the binary data and pass this for example to the JNI implementation |
// of the JSR48 CIM Client for Java. | // of the JSR48 CIM Client for Java. |
CIMInstanceResponseData& responseData = msg->getResponseData(); |
CIMResponseData& responseData = msg->getResponseData(); |
responseData.setBinaryCimInstance(in,false); |
responseData.setBinary(in,false); |
| |
msg->binaryRequest = true; | msg->binaryRequest = true; |
return msg; | return msg; |
|
|
| |
static void _encodeGetInstanceResponseBody( | static void _encodeGetInstanceResponseBody( |
CIMBuffer& out, | CIMBuffer& out, |
CIMInstanceResponseData& data, |
CIMResponseData& data, |
CIMName& name) | CIMName& name) |
{ | { |
static const CIMName NAME("GetInstance"); | static const CIMName NAME("GetInstance"); |
|
|
| |
static void _encodeAssociatorsResponseBody( | static void _encodeAssociatorsResponseBody( |
CIMBuffer& out, | CIMBuffer& out, |
CIMObjectsResponseData& data, |
CIMResponseData& data, |
CIMName& name) | CIMName& name) |
{ | { |
/* See ../Server/CIMOperationResponseEncoder.cpp */ | /* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
// This allows an alternate client implementation to gain direct access | // This allows an alternate client implementation to gain direct access |
// to the binary data and pass this for example to the JNI implementation | // to the binary data and pass this for example to the JNI implementation |
// of the JSR48 CIM Client for Java. | // of the JSR48 CIM Client for Java. |
CIMObjectsResponseData& responseData = msg->getResponseData(); |
CIMResponseData& responseData = msg->getResponseData(); |
responseData.setBinaryCimObjects(in,false); |
responseData.setBinary(in,false); |
| |
msg->binaryRequest = true; | msg->binaryRequest = true; |
return msg; | return msg; |
|
|
| |
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( |
|
|
Uint32 flags, | 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 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.setBinary(in,false); |
| |
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( |
|
|
Uint32 flags, | 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.setBinary(in,false); |
| |
msg->binaryRequest = true; | msg->binaryRequest = true; |
return msg; | return msg; |
|
|
| |
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( |
|
|
{ | { |
/* 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 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.setBinary(in,false); |
| |
msg->binaryRequest = true; | msg->binaryRequest = true; |
|
|
return msg; | return msg; |
} | } |
| |
|
|
| |
static void _encodeExecQueryResponseBody( | static void _encodeExecQueryResponseBody( |
CIMBuffer& out, | CIMBuffer& out, |
CIMObjectsResponseData& data, |
CIMResponseData& data, |
CIMName& name) | CIMName& name) |
{ | { |
/* See ../Server/CIMOperationResponseEncoder.cpp */ | /* See ../Server/CIMOperationResponseEncoder.cpp */ |
|
|
// This allows an alternate client implementation to gain direct access | // This allows an alternate client implementation to gain direct access |
// to the binary data and pass this for example to the JNI implementation | // to the binary data and pass this for example to the JNI implementation |
// of the JSR48 CIM Client for Java. | // of the JSR48 CIM Client for Java. |
CIMObjectsResponseData& responseData = msg->getResponseData(); |
CIMResponseData& responseData = msg->getResponseData(); |
responseData.setBinaryCimObjects(in,false); |
responseData.setBinary(in,false); |
| |
msg->binaryRequest = true; | msg->binaryRequest = true; |
return msg; | return msg; |
|
|
| |
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_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; |
} | } |
| |