1 martin 1.20 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.21 //
|
3 martin 1.20 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
|
9 martin 1.21 //
|
10 martin 1.20 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
|
16 martin 1.21 //
|
17 martin 1.20 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.21 //
|
20 martin 1.20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.21 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.20 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.21 //
|
28 martin 1.20 //////////////////////////////////////////////////////////////////////////
|
29 mike 1.2 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #ifndef Pegasus_CIMOperationRequestEncoder_h
33 #define Pegasus_CIMOperationRequestEncoder_h
34
35 #include <fstream>
36 #include <Pegasus/Common/Config.h>
37 #include <Pegasus/Common/MessageQueue.h>
38 #include <Pegasus/Common/CIMMessage.h>
39 #include <Pegasus/Client/ClientAuthenticator.h>
40 #include <Pegasus/Client/Linkage.h>
|
41 a.dunfey 1.16 #include <Pegasus/Client/ClientPerfDataStore.h>
|
42 mike 1.2
43 PEGASUS_NAMESPACE_BEGIN
44
45 /** This class receives CIM Operation Request messages on its input queue
46 and encodes them into HTTP messages which it places on its output queue.
47 */
48 class PEGASUS_CLIENT_LINKAGE CIMOperationRequestEncoder : public MessageQueue
49 {
50 public:
51
52 /** Constuctor.
|
53 kumpf 1.18 @param outputQueue queue to receive encoded HTTP messages.
|
54 kumpf 1.10 @param hostName Name of the target host for the encoded requests.
|
55 kumpf 1.18 I.e., the value of the HTTP Host header.
|
56 mike 1.2 */
57 CIMOperationRequestEncoder(
|
58 kumpf 1.10 MessageQueue* outputQueue,
59 const String& hostName,
60 ClientAuthenticator* authenticator,
|
61 mike 1.19 Uint32 showOutput,
62 bool binaryRequest = false,
63 bool binaryResponse = false);
|
64 mike 1.2
65 /** Destructor. */
66 ~CIMOperationRequestEncoder();
67
68 /** This method is called when a message is enqueued on this queue. */
69 virtual void handleEnqueue();
70
|
71 a.dunfey 1.16 /**
|
72 kumpf 1.18 Gives the Encoder access to the ClientPerfDataStore that
73 is in CIMClientRep. A pointer to the CIMClientRep::ClientPerfDataStore
74 is passed in.
|
75 a.dunfey 1.16 */
76 void setDataStorePointer(ClientPerfDataStore* perfDataStore_ptr);
77
|
78 mike 1.2 private:
79
80 void _encodeCreateClassRequest(
|
81 kumpf 1.18 CIMCreateClassRequestMessage* message);
|
82 mike 1.2
83 void _encodeGetClassRequest(
|
84 kumpf 1.18 CIMGetClassRequestMessage* message);
|
85 mike 1.2
86 void _encodeModifyClassRequest(
|
87 kumpf 1.18 CIMModifyClassRequestMessage* message);
|
88 mike 1.2
89 void _encodeEnumerateClassNamesRequest(
|
90 kumpf 1.18 CIMEnumerateClassNamesRequestMessage* message);
|
91 mike 1.2
92 void _encodeEnumerateClassesRequest(
|
93 kumpf 1.18 CIMEnumerateClassesRequestMessage* message);
|
94 mike 1.2
95 void _encodeDeleteClassRequest(
|
96 kumpf 1.18 CIMDeleteClassRequestMessage* message);
|
97 mike 1.2
98 void _encodeCreateInstanceRequest(
|
99 kumpf 1.18 CIMCreateInstanceRequestMessage* message);
|
100 mike 1.2
101 void _encodeGetInstanceRequest(
|
102 kumpf 1.18 CIMGetInstanceRequestMessage* message);
|
103 mike 1.2
104 void _encodeModifyInstanceRequest(
|
105 kumpf 1.18 CIMModifyInstanceRequestMessage* message);
|
106 mike 1.2
107 void _encodeEnumerateInstanceNamesRequest(
|
108 kumpf 1.18 CIMEnumerateInstanceNamesRequestMessage* message);
|
109 mike 1.2
110 void _encodeEnumerateInstancesRequest(
|
111 kumpf 1.18 CIMEnumerateInstancesRequestMessage* message);
|
112 mike 1.2
113 void _encodeDeleteInstanceRequest(
|
114 kumpf 1.18 CIMDeleteInstanceRequestMessage* message);
|
115 mike 1.2
116 void _encodeGetPropertyRequest(
|
117 kumpf 1.18 CIMGetPropertyRequestMessage* message);
|
118 mike 1.2
119 void _encodeSetPropertyRequest(
|
120 kumpf 1.18 CIMSetPropertyRequestMessage* message);
|
121 mike 1.2
122 void _encodeSetQualifierRequest(
|
123 kumpf 1.18 CIMSetQualifierRequestMessage* message);
|
124 mike 1.2
125 void _encodeGetQualifierRequest(
|
126 kumpf 1.18 CIMGetQualifierRequestMessage* message);
|
127 mike 1.2
128 void _encodeEnumerateQualifiersRequest(
|
129 kumpf 1.18 CIMEnumerateQualifiersRequestMessage* message);
|
130 mike 1.2
131 void _encodeDeleteQualifierRequest(
|
132 kumpf 1.18 CIMDeleteQualifierRequestMessage* message);
|
133 mike 1.2
134 void _encodeReferenceNamesRequest(
|
135 kumpf 1.18 CIMReferenceNamesRequestMessage* message);
|
136 mike 1.2
137 void _encodeReferencesRequest(
|
138 kumpf 1.18 CIMReferencesRequestMessage* message);
|
139 mike 1.2
140 void _encodeAssociatorNamesRequest(
|
141 kumpf 1.18 CIMAssociatorNamesRequestMessage* message);
|
142 mike 1.2
143 void _encodeAssociatorsRequest(
|
144 kumpf 1.18 CIMAssociatorsRequestMessage* message);
|
145 mike 1.2
|
146 kumpf 1.3 void _encodeExecQueryRequest(
|
147 kumpf 1.18 CIMExecQueryRequestMessage* message);
|
148 kumpf 1.3
|
149 mike 1.2 void _encodeInvokeMethodRequest(
|
150 kumpf 1.18 CIMInvokeMethodRequestMessage* message);
|
151 mike 1.2
|
152 kumpf 1.18 void _sendRequest(Buffer& buffer);
|
153 karl 1.8
|
154 mike 1.2 MessageQueue* _outputQueue;
|
155 kumpf 1.7 CString _hostName;
|
156 mike 1.2 ClientAuthenticator* _authenticator;
|
157 karl 1.8 // Controls client trace output. 1 = con, 2 == log
158 Uint32 _showOutput;
|
159 a.dunfey 1.16 ClientPerfDataStore* dataStore_prt;
|
160 mike 1.19 bool _binaryRequest;
161 bool _binaryResponse;
|
162 mike 1.2 };
163
164 PEGASUS_NAMESPACE_END
165
166 #endif /* Pegasus_CIMOperationRequestEncoder_h */
|