2b401529c9cfccc7c270dbfd033f8543b5fd6694
[tpot/pegasus/.git] / src / Pegasus / Common / HTTPOptions.h
1 //%////-*-c++-*-////////////////////////////////////////////////////////////////
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 //
24 // Author: Mike Brasher (k.schopmeyer@opengroup.org)
25 //
26 // Modified By:
27 //
28 //%/////////////////////////////////////////////////////////////////////////////
29
30 #ifndef Pegasus_HTTPOptions_h
31 #define Pegasus_HTTPOptions_h
32
33 #include <Pegasus/Common/Config.h>
34
35
36 PEGASUS_NAMESPACE_BEGIN
37
38
39 /*
40   The HTTP Options module processes incoming HTTP Messages OPTIONS Method
41   and generates the appropriate responses.
42   The OPTIONS Header is used by a CIM Client to demand capabilities
43   from the target CIM Server
44   Example of a capabilities response
45   HTTP/1.1 200 OK
46   Opt: http://www.dmtf.org/cim/mapping/http/v1.0 ; ns=77
47   77-CIMProtocolVersion: 1.0
48   77-CIMSupportedFunctionalGroups: basic-read
49   77-CIMBatch
50   77-CIMSupportedQueryLanguages: wql
51   Reference the CIM Operations standard section 4.5 for the exact definition
52   of the OPTIONS response
53   Note that we ignore any entity body for the Option method
54 */
55 /*
56   QUESTION: Do we support HTTP 1.1
57 */ 
58 #include "HTTPOptions.h"
59
60
61 #include <cstdio>
62 #include <cassert>
63 #include <iostream>
64 #include <Pegasus/Common/MessageQueueService.h>
65 #include <Pegasus/Common/HTTPAcceptor.h>
66 #include <Pegasus/Common/FileSystem.h>
67 #include <Pegasus/Common/HTTPConnection.h>
68 #include <Pegasus/Common/HTTPMessage.h>
69
70 PEGASUS_NAMESPACE_BEGIN
71
72 PEGASUS_USING_PEGASUS;
73 PEGASUS_USING_STD;
74
75 // REVIEW: What is this class used for? What feeds its queue? What queue
76 // REVIEW: does it feed?
77
78 class PEGASUS_COMMON_LINKAGE HTTPOptions : public MessageQueueService
79 {
80    public:
81       typedef MessageQueueService Base;
82   
83       /** Constructor. There are no further 
84        */
85       HTTPOptions() 
86       {
87 #error  "this class does not appear to be used" // <<< Sat Feb  9 17:33:07 2002 mdd >>>
88       }
89   
90       /** Destructor. */
91       ~HTTPOptions();
92       virtual void handleEnqueue(Message *);
93       virtual void handleEnqueue();
94
95       virtual const char* getQueueName() const;
96
97       void handleHTTPMessage(HTTPMessage* httpMessage);
98
99    private:
100
101
102 };
103
104
105 PEGASUS_NAMESPACE_END
106
107 #endif /* Pegasus_HTTPOptions_h */