1 martin 1.11 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.12 //
|
3 martin 1.11 // 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.12 //
|
10 martin 1.11 // 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.12 //
|
17 martin 1.11 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.12 //
|
20 martin 1.11 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.12 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.11 // 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.12 //
|
28 martin 1.11 //////////////////////////////////////////////////////////////////////////
|
29 kumpf 1.1 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #include <Pegasus/Common/Config.h>
|
33 chip 1.4 #include <Pegasus/Common/CIMMessage.h>
|
34 kumpf 1.1 #include <Pegasus/Common/OperationContext.h>
|
35 kumpf 1.10 #include <Pegasus/Common/Semaphore.h>
|
36 kumpf 1.1 #include <Pegasus/Common/MessageQueueService.h>
37
38 #include "CIMOMHandleRep.h"
39
40 PEGASUS_NAMESPACE_BEGIN
41
|
42 chip 1.4 class InternalCIMOMHandleMessageQueue : public MessageQueue
43 {
44 public:
45 InternalCIMOMHandleMessageQueue();
46 virtual ~InternalCIMOMHandleMessageQueue();
47
48 virtual void handleEnqueue();
49
50 CIMResponseMessage * sendRequest(CIMRequestMessage * request);
51
52 private:
53 Uint32 _output_qid;
54 Uint32 _return_qid;
55
56 Mutex _mutex;
|
57 kumpf 1.10 Semaphore _responseReady;
58 Message* _response;
|
59 chip 1.4
60 };
61
|
62 kumpf 1.1 /**
63 InternalCIMOMHandleRep is the default, in-process CIMOMHandle
64 implementation. The code was extracted from CIMOMHandle.cpp to allow
65 for polymorphic CIMOMHandleRep implementations.
66 */
|
67 chip 1.4 class InternalCIMOMHandleRep : public CIMOMHandleRep
|
68 kumpf 1.1 {
69 public:
70 InternalCIMOMHandleRep();
71 virtual ~InternalCIMOMHandleRep();
72
73 virtual CIMClass getClass(
74 const OperationContext & context,
75 const CIMNamespaceName& nameSpace,
76 const CIMName& className,
77 Boolean localOnly,
78 Boolean includeQualifiers,
79 Boolean includeClassOrigin,
80 const CIMPropertyList& propertyList);
81
82 virtual Array<CIMClass> enumerateClasses(
83 const OperationContext & context,
84 const CIMNamespaceName& nameSpace,
85 const CIMName& className,
86 Boolean deepInheritance,
87 Boolean localOnly,
88 Boolean includeQualifiers,
89 kumpf 1.1 Boolean includeClassOrigin);
90
91 virtual Array<CIMName> enumerateClassNames(
92 const OperationContext & context,
93 const CIMNamespaceName& nameSpace,
94 const CIMName& className,
95 Boolean deepInheritance);
96
97 virtual void createClass(
98 const OperationContext & context,
99 const CIMNamespaceName& nameSpace,
100 const CIMClass& newClass);
101
102 virtual void modifyClass(
103 const OperationContext & context,
104 const CIMNamespaceName& nameSpace,
105 const CIMClass& modifiedClass);
106
107 virtual void deleteClass(
108 const OperationContext & context,
109 const CIMNamespaceName& nameSpace,
110 kumpf 1.1 const CIMName& className);
111
|
112 thilo.boehm 1.14 virtual CIMResponseData getInstance(
|
113 kumpf 1.1 const OperationContext & context,
114 const CIMNamespaceName& nameSpace,
115 const CIMObjectPath& instanceName,
116 Boolean includeQualifiers,
117 Boolean includeClassOrigin,
118 const CIMPropertyList& propertyList);
119
|
120 thilo.boehm 1.14 virtual CIMResponseData enumerateInstances(
|
121 kumpf 1.1 const OperationContext & context,
122 const CIMNamespaceName& nameSpace,
123 const CIMName& className,
124 Boolean deepInheritance,
125 Boolean includeQualifiers,
126 Boolean includeClassOrigin,
127 const CIMPropertyList& propertyList);
128
|
129 thilo.boehm 1.14 virtual CIMResponseData enumerateInstanceNames(
|
130 kumpf 1.1 const OperationContext & context,
131 const CIMNamespaceName& nameSpace,
132 const CIMName& className);
133
134 virtual CIMObjectPath createInstance(
135 const OperationContext & context,
136 const CIMNamespaceName& nameSpace,
137 const CIMInstance& newInstance);
138
139 virtual void modifyInstance(
140 const OperationContext & context,
141 const CIMNamespaceName& nameSpace,
142 const CIMInstance& modifiedInstance,
143 Boolean includeQualifiers,
144 const CIMPropertyList& propertyList);
145
146 virtual void deleteInstance(
147 const OperationContext & context,
148 const CIMNamespaceName& nameSpace,
149 const CIMObjectPath& instanceName);
150
|
151 thilo.boehm 1.14 virtual CIMResponseData execQuery(
|
152 kumpf 1.1 const OperationContext & context,
153 const CIMNamespaceName& nameSpace,
154 const String& queryLanguage,
155 const String& query);
156
|
157 thilo.boehm 1.14 virtual CIMResponseData associators(
|
158 kumpf 1.1 const OperationContext & context,
159 const CIMNamespaceName& nameSpace,
160 const CIMObjectPath& objectName,
161 const CIMName& assocClass,
162 const CIMName& resultClass,
163 const String& role,
164 const String& resultRole,
165 Boolean includeQualifiers,
166 Boolean includeClassOrigin,
167 const CIMPropertyList& propertyList);
168
|
169 thilo.boehm 1.14 virtual CIMResponseData associatorNames(
|
170 kumpf 1.1 const OperationContext & context,
171 const CIMNamespaceName& nameSpace,
172 const CIMObjectPath& objectName,
173 const CIMName& assocClass,
174 const CIMName& resultClass,
175 const String& role,
176 const String& resultRole);
177
|
178 thilo.boehm 1.14 virtual CIMResponseData references(
|
179 kumpf 1.1 const OperationContext & context,
180 const CIMNamespaceName& nameSpace,
181 const CIMObjectPath& objectName,
182 const CIMName& resultClass,
183 const String& role,
184 Boolean includeQualifiers,
185 Boolean includeClassOrigin,
186 const CIMPropertyList& propertyList);
187
|
188 thilo.boehm 1.14 virtual CIMResponseData referenceNames(
|
189 kumpf 1.1 const OperationContext & context,
190 const CIMNamespaceName& nameSpace,
191 const CIMObjectPath& objectName,
192 const CIMName& resultClass,
193 const String& role);
194
195 // property operations
196 virtual CIMValue getProperty(
197 const OperationContext & context,
198 const CIMNamespaceName& nameSpace,
199 const CIMObjectPath& instanceName,
200 const CIMName& propertyName);
201
202 virtual void setProperty(
203 const OperationContext & context,
204 const CIMNamespaceName& nameSpace,
205 const CIMObjectPath& instanceName,
206 const CIMName& propertyName,
207 const CIMValue& newValue);
208
209 virtual CIMValue invokeMethod(
210 kumpf 1.1 const OperationContext & context,
211 const CIMNamespaceName& nameSpace,
212 const CIMObjectPath& instanceName,
213 const CIMName& methodName,
214 const Array<CIMParamValue>& inParameters,
215 Array<CIMParamValue>& outParameters);
216
217 virtual void disallowProviderUnload(); // Overload for OS/400
218 virtual void allowProviderUnload(); // Overload for OS/400
219 virtual OperationContext getResponseContext();
220
221 private:
222 InternalCIMOMHandleRep(const InternalCIMOMHandleRep& rep);
223 InternalCIMOMHandleRep& operator=(const InternalCIMOMHandleRep& rep);
224
|
225 chip 1.4 CIMResponseMessage* do_request(CIMRequestMessage* request);
|
226 kumpf 1.1
|
227 chip 1.4 private:
228 InternalCIMOMHandleMessageQueue _queue;
229
|
230 kumpf 1.1 };
231
232 PEGASUS_NAMESPACE_END
|