version 1.10, 2001/04/18 11:51:33
|
version 1.77.4.1, 2006/01/18 17:37:56
|
|
|
//BEGIN_LICENSE |
//%2005//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
|
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation, The Open Group. |
|
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// |
|
// Permission is hereby granted, free of charge, to any person obtaining a copy |
|
// of this software and associated documentation files (the "Software"), to |
|
// deal in the Software without restriction, including without limitation the |
|
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
|
// sell copies of the Software, and to permit persons to whom the Software is |
|
// furnished to do so, subject to the following conditions: |
|
// |
|
// THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN |
|
// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED |
|
// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT |
|
// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
|
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
|
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
|
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
// |
|
//============================================================================== |
|
// |
|
// Author: Mike Brasher (mbrasher@bmc.com) |
|
// |
|
// Modified By: |
|
// Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com) |
|
// Nag Boranna, Hewlett-Packard Company (nagaraja_boranna@hp.com) |
|
// Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
|
// Carol Ann Krug Graves, Hewlett-Packard Company |
|
// (carolann_graves@hp.com) |
|
// Brian G. Campbell, EMC (campbell_brian@emc.com) - PEP140/phase1 |
|
// Willis White (whiwill@us.ibm.com) PEP 127 and 128 |
|
// Brian G. Campbell, EMC (campbell_brian@emc.com) - PEP140/phase2 |
|
// David Dillard, Symantec Corp. (david_dillard@symantec.com) |
|
// Vijay Eli, vijayeli@in.ibm.com, fix for #2571 |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a |
//%///////////////////////////////////////////////////////////////////////////// |
// copy of this software and associated documentation files (the "Software"), |
|
// to deal in the Software without restriction, including without limitation |
|
// the rights to use, copy, modify, merge, publish, distribute, sublicense, |
|
// and/or sell copies of the Software, and to permit persons to whom the |
|
// Software is furnished to do so, subject to the following conditions: |
|
// |
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
// DEALINGS IN THE SOFTWARE. |
|
// |
|
//END_LICENSE |
|
//BEGIN_HISTORY |
|
// |
|
// Author: |
|
// |
|
// $Log$ |
|
// Revision 1.10 2001/04/18 11:51:33 karl |
|
// get and set property |
|
// |
|
// Revision 1.9 2001/04/08 01:13:22 mike |
|
// Changed "ConstCIM" to "CIMConst" |
|
// |
|
// Revision 1.7 2001/02/20 07:25:57 mike |
|
// Added basic create-instance in repository and in client. |
|
// |
|
// Revision 1.6 2001/02/19 01:47:17 mike |
|
// Renamed names of the form CIMConst to CIMConst. |
|
// |
|
// Revision 1.5 2001/02/18 03:56:01 mike |
|
// Changed more class names (e.g., ConstClassDecl -> CIMConstClass) |
|
// |
|
// Revision 1.4 2001/02/16 02:06:07 mike |
|
// Renamed many classes and headers. |
|
// |
|
// Revision 1.3 2001/01/31 08:20:51 mike |
|
// Added dispatcher framework. |
|
// Added enumerateInstanceNames. |
|
// |
|
// Revision 1.2 2001/01/29 02:23:44 mike |
|
// Added support for GetInstance operation |
|
// |
|
// Revision 1.1.1.1 2001/01/14 19:53:36 mike |
|
// Pegasus import |
|
// |
|
// |
|
//END_HISTORY |
|
|
|
//////////////////////////////////////////////////////////////////////////////// |
|
// |
|
// XmlWriter.h |
|
// |
|
//////////////////////////////////////////////////////////////////////////////// |
|
| |
#ifndef Pegasus_XmlWriter_h | #ifndef Pegasus_XmlWriter_h |
#define Pegasus_XmlWriter_h | #define Pegasus_XmlWriter_h |
| |
#include <iostream> | #include <iostream> |
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
#include <Pegasus/Common/Exception.h> |
#include <Pegasus/Common/InternalException.h> |
#include <Pegasus/Common/Array.h> |
#include <Pegasus/Common/ArrayInternal.h> |
#include <Pegasus/Common/String.h> | #include <Pegasus/Common/String.h> |
#include <Pegasus/Common/Indentor.h> | #include <Pegasus/Common/Indentor.h> |
#include <Pegasus/Common/CIMReference.h> |
#include <Pegasus/Common/CIMObject.h> |
|
#include <Pegasus/Common/CIMClass.h> |
|
#include <Pegasus/Common/CIMInstance.h> |
|
#include <Pegasus/Common/CIMProperty.h> |
|
#include <Pegasus/Common/CIMMethod.h> |
|
#include <Pegasus/Common/CIMParameter.h> |
|
#include <Pegasus/Common/CIMQualifier.h> |
|
#include <Pegasus/Common/CIMQualifierDecl.h> |
|
#include <Pegasus/Common/CIMValue.h> |
|
#include <Pegasus/Common/CIMObjectPath.h> |
|
#include <Pegasus/Common/CIMPropertyList.h> |
|
#include <Pegasus/Common/CIMParamValue.h> |
|
#include <Pegasus/Common/Message.h> |
|
#include <Pegasus/Common/Linkage.h> |
|
#include <Pegasus/Common/ContentLanguageList.h> |
|
#include <Pegasus/Common/AcceptLanguageList.h> |
|
#include <Pegasus/Common/Buffer.h> |
|
#include <Pegasus/Common/StrLit.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
class CIMConstQualifierDecl; |
// l10n - added accept language and content language support below |
class CIMConstClass; |
|
class CIMConstInstance; |
|
| |
class PEGASUS_COMMON_LINKAGE XmlWriter | class PEGASUS_COMMON_LINKAGE XmlWriter |
{ | { |
public: | public: |
| |
static void append(Array<Sint8>& out, Char16 x); |
static void append(Buffer& out, const Char16& x); |
| |
static void append(Array<Sint8>& out, char x) |
static void append(Buffer& out, char x) |
{ | { |
append(out, Char16(x)); |
out.append(x); |
} | } |
| |
static void append(Array<Sint8>& out, const char* x); |
static void append(Buffer& out, Boolean x); |
| |
static void append(Array<Sint8>& out, const String& x); |
static void append(Buffer& out, Uint32 x); |
| |
static void append(Array<Sint8>& out, Uint32 x); |
static void append(Buffer& out, Sint32 x); |
| |
static void appendSpecial(Array<Sint8>& out, Char16 x); |
static void append(Buffer& out, Uint64 x); |
| |
static void appendSpecial(Array<Sint8>& out, char x); |
static void append(Buffer& out, Sint64 x); |
| |
static void appendSpecial(Array<Sint8>& out, const char* x); |
static void append(Buffer& out, Real32 x); |
| |
static void appendSpecial(Array<Sint8>& out, const String& x); |
static void append(Buffer& out, Real64 x); |
| |
static void append(Array<Sint8>& out, const Indentor& x); |
static void append(Buffer& out, const char* str); |
| |
static void appendLocalNameSpaceElement( |
static void append(Buffer& out, const String& str); |
Array<Sint8>& out, |
|
const String& nameSpace); |
|
| |
static void appendNameSpaceElement( |
static void append(Buffer& out, const Indentor& x); |
Array<Sint8>& out, |
|
const String& nameSpace); |
|
| |
static Array<Sint8> formatGetHeader( |
static void appendSpecial(Buffer& out, const Char16& x); |
const char* documentPath); |
|
| |
static Array<Sint8> formatMPostHeader( |
static void appendSpecial(Buffer& out, char x); |
const char* host, |
|
const char* cimOperation, |
|
const char* cimMethod, |
|
const String& cimObject, |
|
const Array<Sint8>& content); |
|
| |
static Array<Sint8> formatMethodResponseHeader( |
static void appendSpecial(Buffer& out, const char* str); |
const Array<Sint8>& content); |
|
| |
static Array<Sint8> formatMessageElement( |
static void appendSpecial(Buffer& out, const String& str); |
Uint32 messageId, |
|
const Array<Sint8>& body); |
|
| |
static Array<Sint8> formatSimpleReqElement( |
static String encodeURICharacters(const Buffer& uriString); |
const Array<Sint8>& body); |
static String encodeURICharacters(const String& uriString); |
| |
static Array<Sint8> formatSimpleRspElement( |
static void appendLocalNameSpacePathElement( |
const Array<Sint8>& body); |
Buffer& out, |
|
const CIMNamespaceName& nameSpace); |
| |
static Array<Sint8> formatIMethodCallElement( |
static void appendNameSpacePathElement( |
const char* name, |
Buffer& out, |
const String& nameSpace, |
const String& host, |
const Array<Sint8>& iParamValues); |
const CIMNamespaceName& nameSpace); |
| |
static Array<Sint8> formatIReturnValueElement( |
static void appendClassNameElement( |
const Array<Sint8>& body); |
Buffer& out, |
|
const CIMName& className); |
| |
static Array<Sint8> formatIMethodResponseElement( |
static void appendInstanceNameElement( |
const char* name, |
Buffer& out, |
const Array<Sint8>& iParamValues); |
const CIMObjectPath& instanceName); |
| |
static Array<Sint8>& formatIParamValueElement( |
static void appendClassPathElement( |
Array<Sint8>& out, |
Buffer& out, |
const char* name, |
const CIMObjectPath& classPath); |
const Array<Sint8>& body); |
|
|
static void appendInstancePathElement( |
|
Buffer& out, |
|
const CIMObjectPath& instancePath); |
| |
static Array<Sint8> formatErrorElement( |
static void appendLocalClassPathElement( |
CIMException::Code code, |
Buffer& out, |
const char* description); |
const CIMObjectPath& classPath); |
| |
static Array<Sint8>& appendBooleanParameter( |
static void appendLocalInstancePathElement( |
Array<Sint8>& out, |
Buffer& out, |
const char* parameterName, |
const CIMObjectPath& instancePath); |
|
|
|
static void appendLocalObjectPathElement( |
|
Buffer& out, |
|
const CIMObjectPath& objectPath); |
|
|
|
static void appendValueElement( |
|
Buffer& out, |
|
const CIMValue& value); |
|
|
|
static void printValueElement( |
|
const CIMValue& value, |
|
PEGASUS_STD(ostream)& os=PEGASUS_STD(cout)); |
|
|
|
static void appendValueObjectWithPathElement( |
|
Buffer& out, |
|
const CIMObject& objectWithPath); |
|
|
|
static void appendValueReferenceElement( |
|
Buffer& out, |
|
const CIMObjectPath& reference, |
|
Boolean putValueWrapper); |
|
|
|
static void printValueReferenceElement( |
|
const CIMObjectPath& reference, |
|
PEGASUS_STD(ostream)& os=PEGASUS_STD(cout)); |
|
|
|
static void appendValueNamedInstanceElement( |
|
Buffer& out, |
|
const CIMInstance& namedInstance); |
|
|
|
static void appendClassElement( |
|
Buffer& out, |
|
const CIMConstClass& cimclass); |
|
|
|
static void printClassElement( |
|
const CIMConstClass& cimclass, |
|
PEGASUS_STD(ostream)& os=PEGASUS_STD(cout)); |
|
|
|
static void appendInstanceElement( |
|
Buffer& out, |
|
const CIMConstInstance& instance); |
|
|
|
static void printInstanceElement( |
|
const CIMConstInstance& instance, |
|
PEGASUS_STD(ostream)& os=PEGASUS_STD(cout)); |
|
|
|
static void appendObjectElement( |
|
Buffer& out, |
|
const CIMConstObject& object); |
|
|
|
static void appendPropertyElement( |
|
Buffer& out, |
|
const CIMConstProperty& property); |
|
|
|
static void printPropertyElement( |
|
const CIMConstProperty& property, |
|
PEGASUS_STD(ostream)& os=PEGASUS_STD(cout)); |
|
|
|
static void appendMethodElement( |
|
Buffer& out, |
|
const CIMConstMethod& method); |
|
|
|
static void printMethodElement( |
|
const CIMConstMethod& method, |
|
PEGASUS_STD(ostream)& os=PEGASUS_STD(cout)); |
|
|
|
static void appendParameterElement( |
|
Buffer& out, |
|
const CIMConstParameter& parameter); |
|
|
|
static void printParameterElement( |
|
const CIMConstParameter& parameter, |
|
PEGASUS_STD(ostream)& os=PEGASUS_STD(cout)); |
|
|
|
static void appendParamValueElement( |
|
Buffer& out, |
|
const CIMParamValue& paramValue); |
|
|
|
static void printParamValueElement( |
|
const CIMParamValue& paramValue, |
|
PEGASUS_STD(ostream)& os=PEGASUS_STD(cout)); |
|
|
|
static void appendQualifierElement( |
|
Buffer& out, |
|
const CIMConstQualifier& qualifier); |
|
|
|
static void printQualifierElement( |
|
const CIMConstQualifier& qualifier, |
|
PEGASUS_STD(ostream)& os=PEGASUS_STD(cout)); |
|
|
|
static void appendQualifierDeclElement( |
|
Buffer& out, |
|
const CIMConstQualifierDecl& qualifierDecl); |
|
|
|
static void printQualifierDeclElement( |
|
const CIMConstQualifierDecl& qualifierDecl, |
|
PEGASUS_STD(ostream)& os=PEGASUS_STD(cout)); |
|
|
|
static void appendQualifierFlavorEntity( |
|
Buffer& out, |
|
const CIMFlavor & flavor); |
|
|
|
static void appendScopeElement( |
|
Buffer& out, |
|
const CIMScope & scope); |
|
|
|
static void appendMethodCallHeader( |
|
Buffer& out, |
|
const char* host, |
|
const CIMName& cimMethod, |
|
const String& cimObject, |
|
const String& authenticationHeader, |
|
HttpMethod httpMethod, |
|
const AcceptLanguageList& acceptLanguages, |
|
const ContentLanguageList& contentLanguages, |
|
Uint32 contentLength); |
|
|
|
// added to accommodate sending WBEMServerResponseTime PEP #128 |
|
static void appendMethodResponseHeader( |
|
Buffer& out, |
|
HttpMethod httpMethod, |
|
const ContentLanguageList& contentLanguages, |
|
Uint32 contentLength, |
|
Uint64 serverResponseTime = 0); |
|
|
|
static void appendHttpErrorResponseHeader( |
|
Buffer& out, |
|
const String& status, |
|
const String& cimError = String::EMPTY, |
|
const String& errorDetail = String::EMPTY); |
|
|
|
static void appendUnauthorizedResponseHeader( |
|
Buffer& out, |
|
const String& content); |
|
|
|
#ifdef PEGASUS_KERBEROS_AUTHENTICATION |
|
static void appendOKResponseHeader( |
|
Buffer& out, |
|
const String& content); |
|
#endif |
|
|
|
static void appendReturnValueElement( |
|
Buffer& out, |
|
const CIMValue& value); |
|
|
|
static void appendBooleanIParameter( |
|
Buffer& out, |
|
const char* name, |
Boolean flag); | Boolean flag); |
| |
static Array<Sint8>& appendClassNameParameter( |
static void appendStringIParameter( |
Array<Sint8>& out, |
Buffer& out, |
const char* parameterName, |
const char* name, |
const String& className); |
const String& str); |
|
|
static Array<Sint8>& appendQualifierNameParameter( |
static void appendQualifierNameIParameter( |
Array<Sint8>& out, |
Buffer& out, |
const char* parameterName, |
const char* name, |
const String& qualifierName); | const String& qualifierName); |
| |
static Array<Sint8>& appendClassParameter( |
static void appendClassNameIParameter( |
Array<Sint8>& out, |
Buffer& out, |
const char* parameterName, |
const char* name, |
|
const CIMName& className); |
|
|
|
static void appendInstanceNameIParameter( |
|
Buffer& out, |
|
const char* name, |
|
const CIMObjectPath& instanceName); |
|
|
|
static void appendObjectNameIParameter( |
|
Buffer& out, |
|
const char* name, |
|
const CIMObjectPath& objectName); |
|
|
|
static void appendClassIParameter( |
|
Buffer& out, |
|
const char* name, |
const CIMConstClass& cimClass); | const CIMConstClass& cimClass); |
| |
static Array<Sint8>& appendInstanceNameParameter( |
static void appendInstanceIParameter( |
Array<Sint8>& out, |
Buffer& out, |
const char* parameterName, |
const char* name, |
const CIMReference& instanceName); |
|
|
|
static Array<Sint8>& appendInstanceParameter( |
|
Array<Sint8>& out, |
|
const char* parameterName, |
|
const CIMConstInstance& instance); | const CIMConstInstance& instance); |
| |
static Array<Sint8>& appendQualifierDeclarationParameter( |
static void appendNamedInstanceIParameter( |
Array<Sint8>& out, |
Buffer& out, |
const char* parameterName, |
const char* name, |
|
const CIMInstance& namedInstance) ; |
|
|
|
static void appendPropertyNameIParameter( |
|
Buffer& out, |
|
const CIMName& propertyName); |
|
|
|
static void appendPropertyValueIParameter( |
|
Buffer& out, |
|
const char* name, |
|
const CIMValue& value); |
|
|
|
static void appendPropertyListIParameter( |
|
Buffer& out, |
|
const CIMPropertyList& propertyList); |
|
|
|
static void appendQualifierDeclarationIParameter( |
|
Buffer& out, |
|
const char* name, |
const CIMConstQualifierDecl& qualifierDecl); | const CIMConstQualifierDecl& qualifierDecl); |
| |
static Array<Sint8>& appendClassNameElement( |
static Buffer formatHttpErrorRspMessage( |
Array<Sint8>& out, |
const String& status, |
const String& className); |
const String& cimError = String::EMPTY, |
|
const String& errorDetail = String::EMPTY); |
static Array<Sint8>& appendInstanceNameElement( |
|
Array<Sint8>& out, |
static Buffer formatSimpleMethodReqMessage( |
const CIMReference& instanceName); |
const char* host, |
|
const CIMNamespaceName& nameSpace, |
static Array<Sint8>& appendPropertyNameParameter( |
const CIMObjectPath& path, |
Array<Sint8>& out, |
const CIMName& methodName, |
const String& propertyName); |
const Array<CIMParamValue>& parameters, |
|
const String& messageId, |
|
HttpMethod httpMethod, |
|
const String& authenticationHeader, |
|
const AcceptLanguageList& httpAcceptLanguages, |
|
const ContentLanguageList& httpContentLanguages); |
|
|
|
//PEP 128 - sending serverResponseTime (WBEMServerResponseTime) in respons header |
|
static Buffer formatSimpleMethodRspMessage( |
|
const CIMName& methodName, |
|
const String& messageId, |
|
HttpMethod httpMethod, |
|
const ContentLanguageList& httpContentLanguages, |
|
const Buffer& body, |
|
Uint64 serverResponseTime, |
|
Boolean isFirst = true, |
|
Boolean isLast = true); |
|
|
|
static Buffer formatSimpleMethodErrorRspMessage( |
|
const CIMName& methodName, |
|
const String& messageId, |
|
HttpMethod httpMethod, |
|
const CIMException& cimException); |
|
|
|
static Buffer formatSimpleIMethodReqMessage( |
|
const char* host, |
|
const CIMNamespaceName& nameSpace, |
|
const CIMName& iMethodName, |
|
const String& messageId, |
|
HttpMethod httpMethod, |
|
const String& authenticationHeader, |
|
const AcceptLanguageList& httpAcceptLanguages, |
|
const ContentLanguageList& httpContentLanguages, |
|
const Buffer& body); |
|
|
|
//PEP 128 - sending serverResponseTime (WBEMServerResponseTime) in respons header |
|
static Buffer formatSimpleIMethodRspMessage( |
|
const CIMName& iMethodName, |
|
const String& messageId, |
|
HttpMethod httpMethod, |
|
const ContentLanguageList& httpContentLanguages, |
|
const Buffer& body, |
|
Uint64 serverResponseTime, |
|
Boolean isFirst = true, |
|
Boolean isLast = true); |
|
|
|
static Buffer formatSimpleIMethodErrorRspMessage( |
|
const CIMName& iMethodName, |
|
const String& messageId, |
|
HttpMethod httpMethod, |
|
const CIMException& cimException); |
|
|
|
static void appendInstanceEParameter( |
|
Buffer& out, |
|
const char* name, |
|
const CIMInstance& instance); |
|
|
|
static void appendEMethodRequestHeader( |
|
Buffer& out, |
|
const char* requestUri, |
|
const char* host, |
|
const CIMName& cimMethod, |
|
HttpMethod httpMethod, |
|
const String& authenticationHeader, |
|
const AcceptLanguageList& acceptLanguages, |
|
const ContentLanguageList& contentLanguages, |
|
Uint32 contentLength); |
|
|
|
static void appendEMethodResponseHeader( |
|
Buffer& out, |
|
HttpMethod httpMethod, |
|
const ContentLanguageList& contentLanguages, |
|
Uint32 contentLength); |
|
|
|
static Buffer formatSimpleEMethodReqMessage( |
|
const char* requestUri, |
|
const char* host, |
|
const CIMName& eMethodName, |
|
const String& messageId, |
|
HttpMethod httpMethod, |
|
const String& authenticationHeader, |
|
const AcceptLanguageList& httpAcceptLanguages, |
|
const ContentLanguageList& httpContentLanguages, |
|
const Buffer& body); |
|
|
|
static Buffer formatSimpleEMethodRspMessage( |
|
const CIMName& eMethodName, |
|
const String& messageId, |
|
HttpMethod httpMethod, |
|
const ContentLanguageList& httpContentLanguages, |
|
const Buffer& body); |
|
|
|
static Buffer formatSimpleEMethodErrorRspMessage( |
|
const CIMName& eMethodName, |
|
const String& messageId, |
|
HttpMethod httpMethod, |
|
const CIMException& cimException); |
| |
static void indentedPrint( | static void indentedPrint( |
std::ostream& os, |
PEGASUS_STD(ostream)& os, |
const char* text, | const char* text, |
Uint32 indentChars = 2); | Uint32 indentChars = 2); |
| |
static Array<Sint8> formatSimpleReqMessage( |
static String getNextMessageId(); |
const char* host, |
|
const String& nameSpace, |
|
const char* iMethodName, |
|
const Array<Sint8>& body); |
|
|
|
static Array<Sint8> formatSimpleRspMessage( |
|
const char* iMethodName, |
|
const Array<Sint8>& body); |
|
| |
static Uint32 getNextMessageId(); |
/** Converts the given CIMKeyBinding type to one of the following: |
|
"boolean", "string", or "numeric" |
|
*/ |
|
static const char* keyBindingTypeToString (CIMKeyBinding::Type type); |
| |
private: | private: |
| |
XmlWriter() { } |
static void _appendMessageElementBegin( |
}; |
Buffer& out, |
|
const String& messageId); |
|
static void _appendMessageElementEnd( |
|
Buffer& out); |
|
|
|
static void _appendSimpleReqElementBegin(Buffer& out); |
|
static void _appendSimpleReqElementEnd(Buffer& out); |
|
|
|
static void _appendMethodCallElementBegin( |
|
Buffer& out, |
|
const CIMName& name); |
|
|
|
static void _appendMethodCallElementEnd( |
|
Buffer& out); |
|
|
|
static void _appendIMethodCallElementBegin( |
|
Buffer& out, |
|
const CIMName& name); |
|
static void _appendIMethodCallElementEnd( |
|
Buffer& out); |
|
|
|
static void _appendIParamValueElementBegin( |
|
Buffer& out, |
|
const char* name); |
|
static void _appendIParamValueElementEnd( |
|
Buffer& out); |
|
|
|
static void _appendSimpleRspElementBegin(Buffer& out); |
|
static void _appendSimpleRspElementEnd(Buffer& out); |
|
|
|
static void _appendMethodResponseElementBegin( |
|
Buffer& out, |
|
const CIMName& name); |
|
static void _appendMethodResponseElementEnd( |
|
Buffer& out); |
|
|
|
static void _appendIMethodResponseElementBegin( |
|
Buffer& out, |
|
const CIMName& name); |
|
static void _appendIMethodResponseElementEnd( |
|
Buffer& out); |
|
|
|
static void _appendErrorElement( |
|
Buffer& out, |
|
const CIMException& cimException); |
|
|
|
static void _appendIReturnValueElementBegin(Buffer& out); |
|
static void _appendIReturnValueElementEnd(Buffer& out); |
|
|
|
static void _appendSimpleExportReqElementBegin(Buffer& out); |
|
static void _appendSimpleExportReqElementEnd(Buffer& out); |
|
|
|
static void _appendEMethodCallElementBegin( |
|
Buffer& out, |
|
const CIMName& name); |
|
|
|
static void _appendEMethodCallElementEnd( |
|
Buffer& out); |
|
|
|
static void _appendEParamValueElementBegin( |
|
Buffer& out, |
|
const char* name); |
|
static void _appendEParamValueElementEnd( |
|
Buffer& out); |
|
|
|
static void _appendSimpleExportRspElementBegin(Buffer& out); |
|
static void _appendSimpleExportRspElementEnd(Buffer& out); |
|
|
|
static void _appendEMethodResponseElementBegin( |
|
Buffer& out, |
|
const CIMName& name); |
| |
inline Array<Sint8>& operator<<(Array<Sint8>& out, const char* x) |
static void _appendEMethodResponseElementEnd( |
{ |
Buffer& out); |
XmlWriter::append(out, x); |
|
return out; |
|
} |
|
| |
inline Array<Sint8>& operator<<(Array<Sint8>& out, char x) |
XmlWriter() { } |
{ |
}; |
XmlWriter::append(out, x); |
|
return out; |
|
} |
|
| |
inline Array<Sint8>& operator<<(Array<Sint8>& out, Char16 x) |
PEGASUS_COMMON_LINKAGE Buffer& operator<<( |
{ |
Buffer& out, |
XmlWriter::append(out, x); |
const char* x); |
return out; |
|
} |
|
| |
inline Array<Sint8>& operator<<(Array<Sint8>& out, const String& x) |
inline Buffer& operator<<(Buffer& out, char x) |
{ | { |
XmlWriter::append(out, x); |
out.append(x); |
return out; | return out; |
} | } |
| |
inline Array<Sint8>& operator<<(Array<Sint8>& out, const Indentor& x) |
inline Buffer& operator<<(Buffer& out, const char* s) |
{ | { |
XmlWriter::append(out, x); |
out.append(s, strlen(s)); |
return out; | return out; |
} | } |
| |
inline Array<Sint8>& operator<<(Array<Sint8>& out, const Array<Sint8>& x) |
PEGASUS_COMMON_LINKAGE Buffer& operator<<(Buffer& out, const Char16& x); |
{ |
|
out.appendArray(x); |
|
return out; |
|
} |
|
| |
inline Array<Sint8>& operator<<(Array<Sint8>& out, Uint32 x) |
PEGASUS_COMMON_LINKAGE Buffer& operator<<( |
{ |
Buffer& out, |
XmlWriter::append(out, x); |
const String& x); |
return out; |
|
} |
PEGASUS_COMMON_LINKAGE Buffer& operator<<( |
|
Buffer& out, |
|
const Indentor& x); |
|
|
|
PEGASUS_COMMON_LINKAGE Buffer& operator<<( |
|
Buffer& out, |
|
const Buffer& x); |
|
|
|
PEGASUS_COMMON_LINKAGE Buffer& operator<<( |
|
Buffer& out, |
|
Uint32 x); |
|
|
|
PEGASUS_COMMON_LINKAGE Buffer& operator<<( |
|
Buffer& out, |
|
const CIMName& name); |
|
|
|
PEGASUS_COMMON_LINKAGE PEGASUS_STD(ostream)& operator<<( |
|
PEGASUS_STD(ostream)& os, |
|
const CIMDateTime& x); |
|
|
|
PEGASUS_COMMON_LINKAGE PEGASUS_STD(ostream)& operator<<( |
|
PEGASUS_STD(ostream)& os, |
|
const CIMName& name); |
|
|
|
PEGASUS_COMMON_LINKAGE PEGASUS_STD(ostream)& operator<<( |
|
PEGASUS_STD(ostream)& os, |
|
const CIMNamespaceName& name); |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |
| |