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

Diff for /pegasus/src/Pegasus/Common/HTTPMessage.h between version 1.1.2.4 and 1.6

version 1.1.2.4, 2001/08/20 02:37:39 version 1.6, 2002/04/17 03:47:18
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%////////-*-c++-*-////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001 BMC Software, Hewlett-Packard Company, IBM, // Copyright (c) 2000, 2001 BMC Software, Hewlett-Packard Company, IBM,
 // The Open Group, Tivoli Systems // The Open Group, Tivoli Systems
Line 23 
Line 23 
 // //
 // Author: Mike Brasher (mbrasher@bmc.com) // Author: Mike Brasher (mbrasher@bmc.com)
 // //
 // Modified By:  // Modified By: Nag Boranna, Hewlett-Packard Company (nagaraja_boranna@hp.com)
   //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 38 
Line 39 
 #include <Pegasus/Common/Message.h> #include <Pegasus/Common/Message.h>
 #include <Pegasus/Common/Array.h> #include <Pegasus/Common/Array.h>
 #include <Pegasus/Common/Monitor.h> #include <Pegasus/Common/Monitor.h>
   #include <Pegasus/Common/AuthenticationInfo.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
   #define HTTP_STATUSCODE_OK 200
   #define HTTP_REASONPHRASE_OK "OK"
   
 typedef Pair<String, String> HTTPHeader; typedef Pair<String, String> HTTPHeader;
  
 /** This message is sent from a connection to its output queue when /** This message is sent from a connection to its output queue when
Line 50 
Line 55 
 { {
 public: public:
  
         typedef Message Base;
   
     HTTPMessage(const Array<Sint8>& message_, Uint32 queueId_ = 0);     HTTPMessage(const Array<Sint8>& message_, Uint32 queueId_ = 0);
  
         HTTPMessage(HTTPMessage & msg);
   
     Array<Sint8> message;     Array<Sint8> message;
     Uint32 queueId;     Uint32 queueId;
         AuthenticationInfo* authInfo;
  
     void parse(     void parse(
         String& startLine,         String& startLine,
         Array<HTTPHeader>& headers,         Array<HTTPHeader>& headers,
         Sint8*& content,  
         Uint32& contentLength) const;         Uint32& contentLength) const;
  
     void printAll(PEGASUS_STD(ostream)& os) const;     void printAll(PEGASUS_STD(ostream)& os) const;
Line 74 
Line 83 
         String& methodName,         String& methodName,
         String& requestUri,         String& requestUri,
         String& httpVersion);         String& httpVersion);
   
         static Boolean parseStatusLine(
            const String& statusLine,
            String& httpVersion,
            Uint32& statusCode,
            String& reasonPhrase);
   };
   
   /**
       This message contains information about an HTTP error response.
   */
   class PEGASUS_COMMON_LINKAGE HTTPErrorMessage : public Message
   {
      public:
         typedef Message Base;
   
         HTTPErrorMessage(
            Uint32 httpStatusCode_,
            const String& cimError_,
            const String& pegasusError_)
            : Message(HTTP_ERROR_MESSAGE),
              httpStatusCode(httpStatusCode_),
              cimError(cimError_),
              pegasusError(pegasusError_)
         { }
   
   
         HTTPErrorMessage(HTTPErrorMessage & msg)
            : Base(msg)
         {
            if( this != &msg)
            {
               httpStatusCode = msg.httpStatusCode;
               const_cast<String &>(cimError) = msg.cimError;
               const_cast<String &>(pegasusError) = msg.pegasusError;
            }
         }
   
         virtual ~HTTPErrorMessage()
         {
         }
   
         Uint32 httpStatusCode;
         const String cimError;
         const String pegasusError;
 }; };
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.1.2.4  
changed lines
  Added in v.1.6

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2