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

Diff for /pegasus/src/Pegasus/Common/XmlWriter.cpp between version 1.128 and 1.133

version 1.128, 2005/10/31 22:35:04 version 1.133, 2006/01/10 19:41:15
Line 39 
Line 39 
 //                               Willis White (whiwill@us.ibm.com) PEP 127 and 128 //                               Willis White (whiwill@us.ibm.com) PEP 127 and 128
 //         Brian G. Campbell, EMC (campbell_brian@emc.com) - PEP140/phase2 //         Brian G. Campbell, EMC (campbell_brian@emc.com) - PEP140/phase2
 //              Dave Sudlik, IBM (dsudlik@us.ibm.com) //              Dave Sudlik, IBM (dsudlik@us.ibm.com)
 //              David Dillard, VERITAS Software Corp.  //              David Dillard, Symantec Corp. (david_dillard@symantec.com)
 //                  (david.dillard@veritas.com)  
 //              Vijay Eli, vijayeli@in.ibm.com, fix for #2571 //              Vijay Eli, vijayeli@in.ibm.com, fix for #2571
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
Line 73 
Line 72 
 #include "CommonUTF.h" #include "CommonUTF.h"
 #include "Buffer.h" #include "Buffer.h"
 #include "StrLit.h" #include "StrLit.h"
   #include "LanguageParser.h"
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
Line 86 
Line 86 
 #define OUTPUT_CONTENTLENGTH                                               \ #define OUTPUT_CONTENTLENGTH                                               \
 {                                                                          \ {                                                                          \
     char contentLengthP[11];                                               \     char contentLengthP[11];                                               \
     sprintf(contentLengthP,"%.10u", contentLength);                        \      int n = sprintf(contentLengthP,"%.10u", contentLength);                \
     out << STRLIT("content-length: ") << contentLengthP << STRLIT("\r\n"); \      out << STRLIT("content-length: ");                                     \
       out.append(contentLengthP, n);                                         \
       out << STRLIT("\r\n");                                                 \
 } }
  
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
Line 253 
Line 255 
  
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
  
 Buffer& operator<<(Buffer& out, const char* x)  
 {  
     XmlWriter::append(out, x);  
     return out;  
 }  
   
 Buffer& operator<<(Buffer& out, char x)  
 {  
     XmlWriter::append(out, x);  
     return out;  
 }  
   
 Buffer& operator<<(Buffer& out, const Char16& x) Buffer& operator<<(Buffer& out, const Char16& x)
 { {
     XmlWriter::append(out, x);     XmlWriter::append(out, x);
Line 303 
Line 293 
  
  
 // l10n // l10n
 Buffer& operator<<(Buffer& out, const AcceptLanguages& al)  Buffer& operator<<(Buffer& out, const AcceptLanguageList& al)
 { {
     XmlWriter::append(out, al.toString ());      XmlWriter::append(out, LanguageParser::buildAcceptLanguageHeader(al));
     return out;     return out;
 } }
  
 // l10n // l10n
 Buffer& operator<<(Buffer& out, const ContentLanguages& cl)  Buffer& operator<<(Buffer& out, const ContentLanguageList& cl)
 { {
     XmlWriter::append(out, cl.toString ());      XmlWriter::append(out, LanguageParser::buildContentLanguageHeader(cl));
     return out;     return out;
 } }
  
Line 800 
Line 790 
  
     char* nameSpaceCopy = strdup(nameSpace.getString().getCString());     char* nameSpaceCopy = strdup(nameSpace.getString().getCString());
  
 #if !defined(PEGASUS_PLATFORM_WIN32_IX86_MSVC)  #if !defined(PEGASUS_COMPILER_MSVC)
     char *last;     char *last;
     for (const char* p = strtok_r(nameSpaceCopy, "/", &last); p;     for (const char* p = strtok_r(nameSpaceCopy, "/", &last); p;
          p = strtok_r(NULL, "/", &last))          p = strtok_r(NULL, "/", &last))
Line 1930 
Line 1920 
     const String& cimObject,     const String& cimObject,
     const String& authenticationHeader,     const String& authenticationHeader,
     HttpMethod httpMethod,     HttpMethod httpMethod,
     const AcceptLanguages & acceptLanguages,      const AcceptLanguageList& acceptLanguages,
     const ContentLanguages & contentLanguages,      const ContentLanguageList& contentLanguages,
     Uint32 contentLength)     Uint32 contentLength)
 { {
     char nn[] = { '0' + (rand() % 10), '0' + (rand() % 10), '\0' };     char nn[] = { '0' + (rand() % 10), '0' + (rand() % 10), '\0' };
Line 2006 
Line 1996 
 void XmlWriter::appendMethodResponseHeader( void XmlWriter::appendMethodResponseHeader(
      Buffer& out,      Buffer& out,
      HttpMethod httpMethod,      HttpMethod httpMethod,
      const ContentLanguages & contentLanguages,       const ContentLanguageList& contentLanguages,
      Uint32 contentLength,      Uint32 contentLength,
      Uint32 serverResponseTime)       Uint64 serverResponseTime)
 { {
      char nn[] = { '0' + (rand() % 10), '0' + (rand() % 10), '\0' };      char nn[] = { '0' + (rand() % 10), '0' + (rand() % 10), '\0' };
      out << STRLIT("HTTP/1.1 " HTTP_STATUS_OK "\r\n");      out << STRLIT("HTTP/1.1 " HTTP_STATUS_OK "\r\n");
Line 2719 
Line 2709 
     const String& messageId,     const String& messageId,
     HttpMethod httpMethod,     HttpMethod httpMethod,
     const String& authenticationHeader,     const String& authenticationHeader,
     const AcceptLanguages& httpAcceptLanguages,      const AcceptLanguageList& httpAcceptLanguages,
     const ContentLanguages& httpContentLanguages)      const ContentLanguageList& httpContentLanguages)
 { {
     Buffer out;     Buffer out;
     Buffer tmp;     Buffer tmp;
Line 2760 
Line 2750 
     const CIMName& methodName,     const CIMName& methodName,
     const String& messageId,     const String& messageId,
     HttpMethod httpMethod,     HttpMethod httpMethod,
     const ContentLanguages & httpContentLanguages,      const ContentLanguageList& httpContentLanguages,
     const Buffer& body,     const Buffer& body,
                 Uint32 serverResponseTime,                  Uint64 serverResponseTime,
                 Boolean isFirst,                 Boolean isFirst,
                 Boolean isLast)                 Boolean isLast)
 { {
Line 2842 
Line 2832 
     const String& messageId,     const String& messageId,
     HttpMethod httpMethod,     HttpMethod httpMethod,
     const String& authenticationHeader,     const String& authenticationHeader,
     const AcceptLanguages& httpAcceptLanguages,      const AcceptLanguageList& httpAcceptLanguages,
     const ContentLanguages& httpContentLanguages,      const ContentLanguageList& httpContentLanguages,
     const Buffer& body)     const Buffer& body)
 { {
     Buffer out;     Buffer out;
Line 2883 
Line 2873 
     const CIMName& iMethodName,     const CIMName& iMethodName,
     const String& messageId,     const String& messageId,
     HttpMethod httpMethod,     HttpMethod httpMethod,
     const ContentLanguages & httpContentLanguages,      const ContentLanguageList& httpContentLanguages,
     const Buffer& body,     const Buffer& body,
     Uint32 serverResponseTime,      Uint64 serverResponseTime,
     Boolean isFirst,     Boolean isFirst,
     Boolean isLast)     Boolean isLast)
 { {
Line 2982 
Line 2972 
     const CIMName& cimMethod,     const CIMName& cimMethod,
     HttpMethod httpMethod,     HttpMethod httpMethod,
     const String& authenticationHeader,     const String& authenticationHeader,
     const AcceptLanguages& acceptLanguages,      const AcceptLanguageList& acceptLanguages,
     const ContentLanguages& contentLanguages,      const ContentLanguageList& contentLanguages,
     Uint32 contentLength)     Uint32 contentLength)
 { {
     char nn[] = { '0' + (rand() % 10), '0' + (rand() % 10), '\0' };     char nn[] = { '0' + (rand() % 10), '0' + (rand() % 10), '\0' };
Line 3053 
Line 3043 
 void XmlWriter::appendEMethodResponseHeader( void XmlWriter::appendEMethodResponseHeader(
     Buffer& out,     Buffer& out,
     HttpMethod httpMethod,     HttpMethod httpMethod,
     const ContentLanguages& contentLanguages,      const ContentLanguageList& contentLanguages,
     Uint32 contentLength)     Uint32 contentLength)
 { {
     char nn[] = { '0' + (rand() % 10), '0' + (rand() % 10), '\0' };     char nn[] = { '0' + (rand() % 10), '0' + (rand() % 10), '\0' };
Line 3221 
Line 3211 
     const String& messageId,     const String& messageId,
     HttpMethod httpMethod,     HttpMethod httpMethod,
     const String& authenticationHeader,     const String& authenticationHeader,
     const AcceptLanguages& httpAcceptLanguages,      const AcceptLanguageList& httpAcceptLanguages,
     const ContentLanguages& httpContentLanguages,      const ContentLanguageList& httpContentLanguages,
     const Buffer& body)     const Buffer& body)
 { {
     Buffer out;     Buffer out;
Line 3261 
Line 3251 
     const CIMName& eMethodName,     const CIMName& eMethodName,
     const String& messageId,     const String& messageId,
     HttpMethod httpMethod,     HttpMethod httpMethod,
     const ContentLanguages& httpContentLanguages,      const ContentLanguageList& httpContentLanguages,
     const Buffer& body)     const Buffer& body)
 { {
     Buffer out;     Buffer out;


Legend:
Removed from v.1.128  
changed lines
  Added in v.1.133

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2