(file) Return to XmlWriter.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/XmlWriter.h between version 1.10 and 1.24

version 1.10, 2001/04/18 11:51:33 version 1.24, 2002/02/20 03:51:31
Line 1 
Line 1 
 //BEGIN_LICENSE  //%/////////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM  // Copyright (c) 2000, 2001 BMC Software, Hewlett-Packard Company, IBM,
   // The Open Group, Tivoli Systems
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a  // Permission is hereby granted, free of charge, to any person obtaining a copy
 // copy of this software and associated documentation files (the "Software"),  // of this software and associated documentation files (the "Software"), to
 // to deal in the Software without restriction, including without limitation  // deal in the Software without restriction, including without limitation the
 // the rights to use, copy, modify, merge, publish, distribute, sublicense,  // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 // and/or sell copies of the Software, and to permit persons to whom the  // sell copies of the Software, and to permit persons to whom the Software is
 // Software is furnished to do so, subject to the following conditions:  // 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)
 // //
 // 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
Line 70 
Line 40 
 #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/CIMReference.h>
   #include <Pegasus/Common/CIMPropertyList.h>
   #include <Pegasus/Common/CIMNamedInstance.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
Line 77 
Line 49 
 class CIMConstClass; class CIMConstClass;
 class CIMConstInstance; class CIMConstInstance;
  
   // REVIEW: Restructure parser so that multiple nested allocations are not
   // REVIEW: required to build a message.
   
 class PEGASUS_COMMON_LINKAGE XmlWriter class PEGASUS_COMMON_LINKAGE XmlWriter
 { {
 public: public:
Line 120 
Line 95 
         const char* cimOperation,         const char* cimOperation,
         const char* cimMethod,         const char* cimMethod,
         const String& cimObject,         const String& cimObject,
           const String& authenticationHeader,
         const Array<Sint8>& content);         const Array<Sint8>& content);
  
     static Array<Sint8> formatMethodResponseHeader(     static Array<Sint8> formatMethodResponseHeader(
         const Array<Sint8>& content);         const Array<Sint8>& content);
  
     static Array<Sint8> formatMessageElement(     static Array<Sint8> formatMessageElement(
         Uint32 messageId,          const String& messageId,
         const Array<Sint8>& body);         const Array<Sint8>& body);
  
     static Array<Sint8> formatSimpleReqElement(     static Array<Sint8> formatSimpleReqElement(
Line 153 
Line 129 
         const Array<Sint8>& body);         const Array<Sint8>& body);
  
     static Array<Sint8> formatErrorElement(     static Array<Sint8> formatErrorElement(
         CIMException::Code code,          CIMStatusCode code,
         const char* description);         const char* description);
  
     static Array<Sint8>& appendBooleanParameter(     static Array<Sint8>& appendBooleanParameter(
Line 161 
Line 137 
         const char* parameterName,         const char* parameterName,
         Boolean flag);         Boolean flag);
  
       static Array<Sint8>& appendStringIParameter(
           Array<Sint8>& out,
           const char* parameterName,
           const String& str);
   
     static Array<Sint8>& appendClassNameParameter(     static Array<Sint8>& appendClassNameParameter(
         Array<Sint8>& out,         Array<Sint8>& out,
         const char* parameterName,         const char* parameterName,
Line 186 
Line 167 
         const char* parameterName,         const char* parameterName,
         const CIMConstInstance& instance);         const CIMConstInstance& instance);
  
       static Array<Sint8>& appendNamedInstanceParameter(
           Array<Sint8>& out,
           const char* parameterName,
           const CIMNamedInstance& namedInstance);
   
     static Array<Sint8>& appendQualifierDeclarationParameter(     static Array<Sint8>& appendQualifierDeclarationParameter(
         Array<Sint8>& out,         Array<Sint8>& out,
         const char* parameterName,         const char* parameterName,
Line 203 
Line 189 
         Array<Sint8>& out,         Array<Sint8>& out,
         const String& propertyName);         const String& propertyName);
  
       static Array<Sint8>& appendPropertyValueParameter(
           Array<Sint8>& out,
           const char* parameterName,
           const CIMValue& value);
   
       static Array<Sint8>& appendPropertyListParameter(
           Array<Sint8>& out,
           const CIMPropertyList& propertyList);
   
       static Array<Sint8>& appendObjectNameParameter(
           Array<Sint8>& out,
           const char* name,
           const CIMReference& objectName);
   
     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 Array<Sint8> formatSimpleIMethodReqMessage(
         const char* host,         const char* host,
         const String& nameSpace,         const String& nameSpace,
         const char* iMethodName,         const char* iMethodName,
           const String& messageId,
           const String& authenticationHeader,
         const Array<Sint8>& body);         const Array<Sint8>& body);
  
     static Array<Sint8> formatSimpleRspMessage(     static Array<Sint8> formatSimpleRspMessage(
         const char* iMethodName,         const char* iMethodName,
           const String& messageId,
           const Array<Sint8>& body);
   
       static String getNextMessageId();
   
       static Array<Sint8> formatSimpleIndicationReqMessage(
           const char* host,
           const char* iMethodName,
           const String& messageId,
           const String& authenticationHeader,
           const Array<Sint8>& body);
   
       static Array<Sint8> formatEMethodCallElement(
           const char* name,
           const Array<Sint8>& iParamValues);
   
       static Array<Sint8> formatMPostIndicationHeader(
           const char* host,
           const char* cimOperation,
           const char* cimMethod,
           const String& authenticationHeader,
           const Array<Sint8>& content);
   
       static Array<Sint8> formatSimpleExportReqElement(
           const Array<Sint8>& body);
   
       static Array<Sint8> formatSimpleExportRspElement(
           const Array<Sint8>& body);
   
       static Array<Sint8> formatSimpleIndicationRspMessage(
           const char* iMethodName,
           const String& messageId,
           const Array<Sint8>& body);
   
       static Array<Sint8> formatEMethodResponseElement(
           const char* name,
           const Array<Sint8>& iParamValues);
   
       static Array<Sint8> formatEMethodResponseHeader(
           const Array<Sint8>& content);
   
       static Array<Sint8> formatSimpleMethodReqMessage(
           const char* host,
           const String& nameSpace,
           const char* iMethodName,
           const String& messageId,
           const String& authenticationHeader,
           const Array<Sint8>& body);
   
       static Array<Sint8> formatMethodCallElement(
           const char* name,
           const String& nameSpace,
           const Array<Sint8>& iParamValues);
   
       static Array<Sint8> formatSimpleMethodRspMessage(
           const char* iMethodName,
           const String& messageId,
           const Array<Sint8>& body);
   
       static Array<Sint8> formatMethodResponseElement(
           const char* name,
           const Array<Sint8>& iParamValues);
   
       static Array<Sint8> formatReturnValueElement(
         const Array<Sint8>& body);         const Array<Sint8>& body);
  
     static Uint32 getNextMessageId();      static Array<Sint8> formatUnauthorizedResponseHeader(
           const String& content);
  
 private: private:
  
     XmlWriter() { }     XmlWriter() { }
 }; };
  
 inline Array<Sint8>& operator<<(Array<Sint8>& out, const char* x)  PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(
 {      Array<Sint8>& out,
     XmlWriter::append(out, x);      const char* x);
     return out;  
 }  
  
 inline Array<Sint8>& operator<<(Array<Sint8>& out, char x)  PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(Array<Sint8>& out, char x);
 {  
     XmlWriter::append(out, x);  
     return out;  
 }  
  
 inline Array<Sint8>& operator<<(Array<Sint8>& out, Char16 x)  PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(Array<Sint8>& out, Char16 x);
 {  
     XmlWriter::append(out, x);  
     return out;  
 }  
  
 inline Array<Sint8>& operator<<(Array<Sint8>& out, const String& x)  PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(
 {      Array<Sint8>& out,
     XmlWriter::append(out, x);      const String& x);
     return out;  
 }  
  
 inline Array<Sint8>& operator<<(Array<Sint8>& out, const Indentor& x)  PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(
 {      Array<Sint8>& out,
     XmlWriter::append(out, x);      const Indentor& x);
     return out;  
 }  
  
 inline Array<Sint8>& operator<<(Array<Sint8>& out, const Array<Sint8>& x)  PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(
 {      Array<Sint8>& out,
     out.appendArray(x);      const Array<Sint8>& x);
     return out;  
 }  
  
 inline Array<Sint8>& operator<<(Array<Sint8>& out, Uint32 x)  PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(
 {      Array<Sint8>& out,
     XmlWriter::append(out, x);      Uint32 x);
     return out;  
 }  
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END
  


Legend:
Removed from v.1.10  
changed lines
  Added in v.1.24

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2