version 1.2.2.19, 2009/11/19 16:39:01
|
version 1.2.2.20, 2009/11/23 08:10:21
|
|
|
{ | { |
_instances.append(CIMInstance()); | _instances.append(CIMInstance()); |
} | } |
out.putInstance(_instances[0], false, false); |
out.putInstance(_instances[0], true, true); |
break; | break; |
} | } |
case RESP_INSTANCES: | case RESP_INSTANCES: |
{ | { |
out.putInstanceA(_instances, false); |
out.putInstanceA(_instances); |
break; | break; |
} | } |
case RESP_OBJECTS: | case RESP_OBJECTS: |
|
|
_encoding, | _encoding, |
_dataType)); | _dataType)); |
| |
|
// For mixed (CIM+SCMO) responses, we need to tell the receiver the |
|
// total number of instances. The totalSize variable is used to keep track |
|
// of this. |
|
Uint32 totalSize = 0; |
|
|
// already existing Internal XML does not need to be encoded further | // already existing Internal XML does not need to be encoded further |
// binary input is not actually impossible here, but we have an established | // binary input is not actually impossible here, but we have an established |
// fallback | // fallback |
|
|
case RESP_INSTANCES: | case RESP_INSTANCES: |
{ | { |
Uint32 n = _instances.size(); | Uint32 n = _instances.size(); |
out.putUint32(n); |
totalSize = n + _scmoInstances.size(); |
|
out.putUint32(totalSize); |
for (Uint32 i = 0; i < n; i++) | for (Uint32 i = 0; i < n; i++) |
{ | { |
CIMInternalXmlEncoder::_putXMLNamedInstance( | CIMInternalXmlEncoder::_putXMLNamedInstance( |
|
|
case RESP_OBJECTS: | case RESP_OBJECTS: |
{ | { |
Uint32 n = _objects.size(); | Uint32 n = _objects.size(); |
out.putUint32(n); |
totalSize = n + _scmoInstances.size(); |
|
out.putUint32(totalSize); |
for (Uint32 i = 0; i < n; i++) | for (Uint32 i = 0; i < n; i++) |
{ | { |
CIMInternalXmlEncoder::_putXMLObject(out, _objects[i]); | CIMInternalXmlEncoder::_putXMLObject(out, _objects[i]); |
|
|
case RESP_INSTANCES: | case RESP_INSTANCES: |
{ | { |
Uint32 n = _scmoInstances.size(); | Uint32 n = _scmoInstances.size(); |
|
// Only put the size when not already done above |
|
if (0==totalSize) |
|
{ |
out.putUint32(n); | out.putUint32(n); |
|
} |
for (Uint32 i = 0; i < n; i++) | for (Uint32 i = 0; i < n; i++) |
{ | { |
SCMOInternalXmlEncoder::_putXMLNamedInstance( | SCMOInternalXmlEncoder::_putXMLNamedInstance( |
|
|
case RESP_OBJECTS: | case RESP_OBJECTS: |
{ | { |
Uint32 n = _scmoInstances.size(); | Uint32 n = _scmoInstances.size(); |
|
// Only put the size when not already done above |
|
if (0==totalSize) |
|
{ |
out.putUint32(n); | out.putUint32(n); |
|
} |
for (Uint32 i = 0; i < n; i++) | for (Uint32 i = 0; i < n; i++) |
{ | { |
SCMOInternalXmlEncoder::_putXMLObject( | SCMOInternalXmlEncoder::_putXMLObject( |