version 1.1.2.1, 2009/10/13 13:39:24
|
version 1.1.2.2, 2009/11/11 10:12:12
|
|
|
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
void _putXMLInstance( |
void SCMOInternalXmlEncoder::_putXMLInstance( |
CIMBuffer& out, | CIMBuffer& out, |
const SCMOInstance& ci) | const SCMOInstance& ci) |
{ | { |
|
|
out.putBytes(buf.getData(), buf.size()); | out.putBytes(buf.getData(), buf.size()); |
buf.clear(); | buf.clear(); |
| |
|
if (0 == ci.getClassName()) |
|
{ |
|
out.putUint32(0); |
|
out.putString(String()); |
|
out.putNamespaceName(CIMNamespaceName()); |
|
} |
|
else |
|
{ |
// Serialize object path as XML. | // Serialize object path as XML. |
|
SCMOXmlWriter::appendValueReferenceElement(buf, ci, true); |
// TODO: Enable this function to do its work |
|
//SCMOXmlWriter::appendValueReferenceElement(buf, ci, true); |
|
buf.append('\0'); | buf.append('\0'); |
| |
out.putUint32(buf.size()); | out.putUint32(buf.size()); |
|
|
out.putUTF8AsString(ns, len); | out.putUTF8AsString(ns, len); |
} | } |
} | } |
|
} |
| |
void _putXMLNamedInstance( |
void SCMOInternalXmlEncoder::_putXMLNamedInstance( |
CIMBuffer& out, | CIMBuffer& out, |
const SCMOInstance& ci) | const SCMOInstance& ci) |
{ | { |
|
|
out.putBytes(buf.getData(), buf.size()); | out.putBytes(buf.getData(), buf.size()); |
buf.clear(); | buf.clear(); |
| |
|
if (0 == ci.getClassName()) |
|
{ |
|
out.putUint32(0); |
|
out.putString(String()); |
|
out.putNamespaceName(CIMNamespaceName()); |
|
} |
|
else |
|
{ |
// Serialize object path as XML. | // Serialize object path as XML. |
SCMOXmlWriter::appendInstanceNameElement(buf, ci); | SCMOXmlWriter::appendInstanceNameElement(buf, ci); |
buf.append('\0'); | buf.append('\0'); |
|
|
out.putUTF8AsString(ns, len); | out.putUTF8AsString(ns, len); |
} | } |
} | } |
|
} |
| |
void _putXMLInstanceName( |
void SCMOInternalXmlEncoder::_putXMLInstanceName( |
CIMBuffer& out, | CIMBuffer& out, |
const SCMOInstance& cop) | const SCMOInstance& cop) |
{ | { |
if (cop.isUninitialized()) |
if (0 == cop.getClassName()) |
{ | { |
out.putUint32(0); | out.putUint32(0); |
out.putUint32(0); | out.putUint32(0); |
|
|
Buffer buf(4096); | Buffer buf(4096); |
| |
// Serialize object path as XML. | // Serialize object path as XML. |
|
SCMOXmlWriter::appendValueReferenceElement(buf, cop, true); |
// TODO: Activate after implementing it in SCMOXmlWriter |
|
//SCMOXmlWriter::appendValueReferenceElement(buf, cop, true); |
|
buf.append('\0'); | buf.append('\0'); |
| |
out.putUint32(buf.size()); | out.putUint32(buf.size()); |
|
|
} | } |
} | } |
| |
void _putXMLObject( |
void SCMOInternalXmlEncoder::_putXMLObject( |
CIMBuffer& out, | CIMBuffer& out, |
const SCMOInstance& co) | const SCMOInstance& co) |
{ | { |
|
|
| |
// Serialize instance as XML. | // Serialize instance as XML. |
| |
// TODO: Activate after implementing it in SCMOXmlWriter |
SCMOXmlWriter::appendObjectElement(buf, co); |
// SCMOXmlWriter::appendObjectElement(buf, co); |
|
buf.append('\0'); | buf.append('\0'); |
| |
out.putUint32(buf.size()); | out.putUint32(buf.size()); |
out.putBytes(buf.getData(), buf.size()); | out.putBytes(buf.getData(), buf.size()); |
buf.clear(); | buf.clear(); |
| |
|
if (0 == co.getClassName()) |
|
{ |
|
out.putUint32(0); |
|
out.putString(String()); |
|
out.putNamespaceName(CIMNamespaceName()); |
|
} |
|
else |
|
{ |
// Serialize object path as XML. | // Serialize object path as XML. |
|
SCMOXmlWriter::appendValueReferenceElement(buf, co, true); |
// TODO: Activate after implementing it in SCMOXmlWriter |
|
//SCMOXmlWriter::appendValueReferenceElement(buf, cop, true); |
|
buf.append('\0'); | buf.append('\0'); |
| |
out.putUint32(buf.size()); | out.putUint32(buf.size()); |
|
|
out.putUTF8AsString(ns, len); | out.putUTF8AsString(ns, len); |
} | } |
} | } |
|
} |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |