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

 1 mday  1.3 //%////////-*-c++-*-////////////////////////////////////////////////////////////
 2 mike  1.2 //
 3           // Copyright (c) 2000, 2001 BMC Software, Hewlett-Packard Company, IBM, 
 4           // The Open Group, Tivoli Systems
 5           //
 6           // Permission is hereby granted, free of charge, to any person obtaining a copy
 7           // of this software and associated documentation files (the "Software"), to 
 8           // deal in the Software without restriction, including without limitation the 
 9           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 
10           // sell copies of the Software, and to permit persons to whom the Software is
11           // furnished to do so, subject to the following conditions:
12           // 
13           // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN 
14           // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
15           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
16           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 
17           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
18           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 
19           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21           //
22           //==============================================================================
23 mike  1.2 //
24           // Author: Mike Brasher (mbrasher@bmc.com)
25           //
26 kumpf 1.4 // Modified By: Nag Boranna, Hewlett-Packard Company (nagaraja_boranna@hp.com)
27           //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
28 mike  1.2 //
29           //%/////////////////////////////////////////////////////////////////////////////
30           
31           #ifndef Pegasus_HTTPMessage_h
32           #define Pegasus_HTTPMessage_h
33           
34           #include <iostream>
35           #include <Pegasus/Common/Config.h>
36           #include <Pegasus/Common/MessageQueue.h>
37           #include <Pegasus/Common/Pair.h>
38           #include <Pegasus/Common/String.h>
39           #include <Pegasus/Common/Message.h>
40           #include <Pegasus/Common/Array.h>
41           #include <Pegasus/Common/AuthenticationInfo.h>
42           
43           PEGASUS_NAMESPACE_BEGIN
44           
45           typedef Pair<String, String> HTTPHeader;
46           
47           /** This message is sent from a connection to its output queue when
48               a complete HTTP message is received.
49 mike  1.2 */
50           class PEGASUS_COMMON_LINKAGE HTTPMessage : public Message
51           {
52 mday  1.3    public:
53             
54                 typedef Message Base;
55                 
56                 HTTPMessage(const Array<Sint8>& message_, Uint32 queueId_ = 0);
57           
58                 HTTPMessage(HTTPMessage & msg);
59               
60                 Array<Sint8> message;
61                 Uint32 queueId;
62                 AuthenticationInfo* authInfo;
63           
64                 void parse(
65           	 String& startLine,
66           	 Array<HTTPHeader>& headers,
67           	 Uint32& contentLength) const;
68           
69                 void printAll(PEGASUS_STD(ostream)& os) const;
70           
71                 static Boolean lookupHeader(
72           	 Array<HTTPHeader>& headers,
73 mday  1.3 	 const String& fieldName,
74           	 String& fieldValue,
75 kumpf 1.8 	 Boolean allowNamespacePrefix = false);
76 mday  1.3 
77                 static Boolean parseRequestLine(
78           	 const String& startLine,
79           	 String& methodName,
80           	 String& requestUri,
81           	 String& httpVersion);
82 kumpf 1.4 
83                 static Boolean parseStatusLine(
84           	 const String& statusLine,
85           	 String& httpVersion,
86           	 Uint32& statusCode,
87           	 String& reasonPhrase);
88           };
89 kumpf 1.5 
90           PEGASUS_NAMESPACE_END
91 mike  1.2 
92           #endif /* Pegasus_HTTPMessage_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2