(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.78 and 1.87

version 1.78, 2006/01/10 19:41:15 version 1.87, 2008/10/17 07:16:35
Line 1 
Line 1 
 //%2005////////////////////////////////////////////////////////////////////////  //%2006////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
Line 8 
Line 8 
 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 // EMC Corporation; VERITAS Software Corporation; The Open Group. // EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; Symantec Corporation; The Open Group.
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 27 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // 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  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #ifndef Pegasus_XmlWriter_h #ifndef Pegasus_XmlWriter_h
Line 51 
Line 39 
 #include <Pegasus/Common/InternalException.h> #include <Pegasus/Common/InternalException.h>
 #include <Pegasus/Common/ArrayInternal.h> #include <Pegasus/Common/ArrayInternal.h>
 #include <Pegasus/Common/String.h> #include <Pegasus/Common/String.h>
 #include <Pegasus/Common/Indentor.h>  
 #include <Pegasus/Common/CIMObject.h> #include <Pegasus/Common/CIMObject.h>
 #include <Pegasus/Common/CIMClass.h> #include <Pegasus/Common/CIMClass.h>
 #include <Pegasus/Common/CIMInstance.h> #include <Pegasus/Common/CIMInstance.h>
Line 70 
Line 57 
 #include <Pegasus/Common/AcceptLanguageList.h> #include <Pegasus/Common/AcceptLanguageList.h>
 #include <Pegasus/Common/Buffer.h> #include <Pegasus/Common/Buffer.h>
 #include <Pegasus/Common/StrLit.h> #include <Pegasus/Common/StrLit.h>
   #include <Pegasus/Common/XmlGenerator.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 // l10n - added accept language and content language support below  class PEGASUS_COMMON_LINKAGE XmlWriter : public XmlGenerator
   
 class PEGASUS_COMMON_LINKAGE XmlWriter  
 { {
 public: public:
  
     static void append(Buffer& out, const Char16& x);  
   
     static void append(Buffer& out, char x)  
     {  
       out.append(x);  
     }  
   
     static void append(Buffer& out, Boolean x);  
   
     static void append(Buffer& out, Uint32 x);  
   
     static void append(Buffer& out, Sint32 x);  
   
     static void append(Buffer& out, Uint64 x);  
   
     static void append(Buffer& out, Sint64 x);  
   
     static void append(Buffer& out, Real32 x);  
   
     static void append(Buffer& out, Real64 x);  
   
     static void append(Buffer& out, const char* str);  
   
     static void append(Buffer& out, const String& str);  
   
     static void append(Buffer& out, const Indentor& x);  
   
     static void appendSpecial(Buffer& out, const Char16& x);  
   
     static void appendSpecial(Buffer& out, char x);  
   
     static void appendSpecial(Buffer& out, const char* str);  
   
     static void appendSpecial(Buffer& out, const String& str);  
   
     static String encodeURICharacters(const Buffer& uriString);  
     static String encodeURICharacters(const String& uriString);  
   
     static void appendLocalNameSpacePathElement(     static void appendLocalNameSpacePathElement(
         Buffer& out,         Buffer& out,
         const CIMNamespaceName& nameSpace);         const CIMNamespaceName& nameSpace);
Line 266 
Line 214 
         const ContentLanguageList& contentLanguages,         const ContentLanguageList& contentLanguages,
         Uint32 contentLength);         Uint32 contentLength);
  
     // added to accommodate sending WBEMServerResponseTime PEP #128  
     static void appendMethodResponseHeader(     static void appendMethodResponseHeader(
         Buffer& out,         Buffer& out,
         HttpMethod httpMethod,         HttpMethod httpMethod,
Line 290 
Line 237 
         const String& content);         const String& content);
 #endif #endif
  
       static void appendParamTypeAndEmbeddedObjAttrib(
           Buffer& out,
           const CIMType& type);
   
     static void appendReturnValueElement(     static void appendReturnValueElement(
         Buffer& out,         Buffer& out,
         const CIMValue& value);         const CIMValue& value);
Line 304 
Line 255 
         const char* name,         const char* name,
         const String& str);         const String& str);
  
     static void appendQualifierNameIParameter(  
         Buffer& out,  
         const char* name,  
         const String& qualifierName);  
   
     static void appendClassNameIParameter(     static void appendClassNameIParameter(
         Buffer& out,         Buffer& out,
         const char* name,         const char* name,
Line 374 
Line 320 
         const AcceptLanguageList& httpAcceptLanguages,         const AcceptLanguageList& httpAcceptLanguages,
         const ContentLanguageList& httpContentLanguages);         const ContentLanguageList& httpContentLanguages);
  
     //PEP 128 - sending serverResponseTime (WBEMServerResponseTime) in respons header  
     static Buffer formatSimpleMethodRspMessage(     static Buffer formatSimpleMethodRspMessage(
         const CIMName& methodName,         const CIMName& methodName,
         const String& messageId,         const String& messageId,
Line 402 
Line 347 
         const ContentLanguageList& httpContentLanguages,         const ContentLanguageList& httpContentLanguages,
         const Buffer& body);         const Buffer& body);
  
     //PEP 128 - sending serverResponseTime (WBEMServerResponseTime) in respons header  
     static Buffer formatSimpleIMethodRspMessage(     static Buffer formatSimpleIMethodRspMessage(
         const CIMName& iMethodName,         const CIMName& iMethodName,
         const String& messageId,         const String& messageId,
Line 465 
Line 409 
         HttpMethod httpMethod,         HttpMethod httpMethod,
         const CIMException& cimException);         const CIMException& cimException);
  
     static void indentedPrint(  
         PEGASUS_STD(ostream)& os,  
         const char* text,  
         Uint32 indentChars = 2);  
   
     static String getNextMessageId();     static String getNextMessageId();
  
     /** Converts the given CIMKeyBinding type to one of the following:     /** Converts the given CIMKeyBinding type to one of the following:
         "boolean", "string", or "numeric"         "boolean", "string", or "numeric"
     */     */
     static const char* keyBindingTypeToString (CIMKeyBinding::Type type);      static const StrLit keyBindingTypeToString (CIMKeyBinding::Type type);
  
 private: private:
  
Line 555 
Line 494 
     static void _appendEMethodResponseElementEnd(     static void _appendEMethodResponseElementEnd(
         Buffer& out);         Buffer& out);
  
     XmlWriter() { }      XmlWriter();
 }; };
  
 PEGASUS_COMMON_LINKAGE Buffer& operator<<(  
     Buffer& out,  
     const char* x);  
   
 inline Buffer& operator<<(Buffer& out, char x)  
 {  
     out.append(x);  
     return out;  
 }  
   
 inline Buffer& operator<<(Buffer& out, const char* s)  
 {  
     out.append(s, strlen(s));  
     return out;  
 }  
   
 PEGASUS_COMMON_LINKAGE Buffer& operator<<(Buffer& out, const Char16& x);  
   
 PEGASUS_COMMON_LINKAGE Buffer& operator<<(  
     Buffer& out,  
     const String& x);  
   
 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
  


Legend:
Removed from v.1.78  
changed lines
  Added in v.1.87

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2