1 karl 1.24 //%2003////////////////////////////////////////////////////////////////////////
|
2 chip 1.1 //
|
3 karl 1.24 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Development
4 // Company, L. P., IBM Corp., The Open Group, Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
6 // IBM Corp.; EMC Corporation, The Open Group.
|
7 chip 1.1 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to
10 // deal in the Software without restriction, including without limitation the
11 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12 // sell copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
|
14 karl 1.24 //
|
15 chip 1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
16 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
17 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
18 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
19 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 //
24 //==============================================================================
25 //
26 // Author: Chip Vincent (cvincent@us.ibm.com)
27 //
28 // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
29 // Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
|
30 mday 1.19 // Mike Day, IBM (mdday@us.ibm.com)
|
31 kumpf 1.21 // Yi Zhou, Hewlett-Packard Company (yi_zhou@hp.com)
|
32 chip 1.1 //
33 //%/////////////////////////////////////////////////////////////////////////////
34
35 #ifndef Pegasus_ProviderFacade_h
36 #define Pegasus_ProviderFacade_h
37
38 #include <Pegasus/Common/Config.h>
|
39 mday 1.19 #include <Pegasus/Common/IPC.h>
|
40 kumpf 1.18 #include <Pegasus/Provider/CIMProvider.h>
|
41 chip 1.1 #include <Pegasus/Provider/CIMInstanceProvider.h>
42 #include <Pegasus/Provider/CIMClassProvider.h>
43 #include <Pegasus/Provider/CIMAssociationProvider.h>
44 #include <Pegasus/Provider/CIMPropertyProvider.h>
45 #include <Pegasus/Provider/CIMMethodProvider.h>
46 #include <Pegasus/Provider/CIMQueryProvider.h>
47 #include <Pegasus/Provider/CIMIndicationProvider.h>
|
48 kumpf 1.21 #include <Pegasus/Provider/CIMIndicationConsumerProvider.h>
|
49 kumpf 1.14 #include <Pegasus/Server/Linkage.h>
|
50 chip 1.1
51 PEGASUS_NAMESPACE_BEGIN
52
|
53 mday 1.19
|
54 chip 1.4 // The ProviderModule class wraps a provider pointer extracted from a provider
55 // module to ensure it is complete and well behaved. So, regardless of the
56 // method supported by a "real" provider, it can be placed inside a reliable
57 // facade with a known interface.
|
58 chip 1.1 class PEGASUS_SERVER_LINKAGE ProviderFacade :
|
59 chip 1.6 public CIMInstanceProvider,
|
60 chip 1.5 public CIMClassProvider,
61 public CIMAssociationProvider,
62 public CIMPropertyProvider,
63 public CIMMethodProvider,
64 public CIMQueryProvider,
65 public CIMIndicationProvider,
|
66 kumpf 1.21 public CIMIndicationConsumerProvider
|
67 chip 1.1 {
68 public:
|
69 kumpf 1.18 ProviderFacade(CIMProvider * provider);
|
70 chip 1.5 virtual ~ProviderFacade(void);
|
71 chip 1.1
|
72 kumpf 1.18 // CIMProvider interface
|
73 chip 1.5 virtual void initialize(CIMOMHandle & cimom);
|
74 kumpf 1.23 #ifdef PEGASUS_PRESERVE_TRYTERMINATE
|
75 mday 1.20 virtual Boolean tryTerminate(void);
|
76 kumpf 1.23 #endif
|
77 mday 1.20
|
78 chip 1.5 virtual void terminate(void);
79
80 // CIMInstanceProvider interface
81 virtual void getInstance(
|
82 chip 1.11 const OperationContext & context,
83 const CIMObjectPath & instanceReference,
|
84 kumpf 1.17 const Boolean includeQualifiers,
85 const Boolean includeClassOrigin,
|
86 chip 1.11 const CIMPropertyList & propertyList,
|
87 kumpf 1.16 InstanceResponseHandler & handler);
|
88 chip 1.5
89 virtual void enumerateInstances(
|
90 chip 1.11 const OperationContext & context,
91 const CIMObjectPath & classReference,
|
92 kumpf 1.17 const Boolean includeQualifiers,
93 const Boolean includeClassOrigin,
|
94 chip 1.11 const CIMPropertyList & propertyList,
|
95 kumpf 1.16 InstanceResponseHandler & handler);
|
96 chip 1.5
97 virtual void enumerateInstanceNames(
|
98 chip 1.11 const OperationContext & context,
99 const CIMObjectPath & classReference,
|
100 kumpf 1.16 ObjectPathResponseHandler & handler);
|
101 chip 1.5
102 virtual void modifyInstance(
|
103 chip 1.11 const OperationContext & context,
104 const CIMObjectPath & instanceReference,
105 const CIMInstance & instanceObject,
|
106 kumpf 1.17 const Boolean includeQualifiers,
|
107 chip 1.11 const CIMPropertyList & propertyList,
|
108 kumpf 1.16 ResponseHandler & handler);
|
109 chip 1.5
110 virtual void createInstance(
|
111 chip 1.11 const OperationContext & context,
112 const CIMObjectPath & instanceReference,
113 const CIMInstance & instanceObject,
|
114 kumpf 1.16 ObjectPathResponseHandler & handler);
|
115 chip 1.5
116 virtual void deleteInstance(
|
117 chip 1.11 const OperationContext & context,
118 const CIMObjectPath & instanceReference,
|
119 kumpf 1.16 ResponseHandler & handler);
|
120 chip 1.5
121 // CIMClassProvider interface
122 virtual void getClass(
|
123 chip 1.11 const OperationContext & context,
124 const CIMObjectPath & classReference,
|
125 kumpf 1.17 const Boolean localOnly,
126 const Boolean includeQualifiers,
127 const Boolean includeClassOrigin,
|
128 chip 1.11 const CIMPropertyList & propertyList,
|
129 kumpf 1.16 ClassResponseHandler & handler);
|
130 chip 1.5
131 virtual void enumerateClasses(
|
132 chip 1.11 const OperationContext & context,
133 const CIMObjectPath & classReference,
|
134 kumpf 1.17 const Boolean deepInheritance,
135 const Boolean localOnly,
136 const Boolean includeQualifiers,
137 const Boolean includeClassOrigin,
|
138 kumpf 1.16 ClassResponseHandler & handler);
|
139 chip 1.5
140 virtual void enumerateClassNames(
|
141 chip 1.11 const OperationContext & context,
142 const CIMObjectPath & classReference,
|
143 kumpf 1.17 const Boolean deepInheritance,
|
144 kumpf 1.16 ObjectPathResponseHandler & handler);
|
145 chip 1.5
146 virtual void modifyClass(
|
147 chip 1.11 const OperationContext & context,
148 const CIMObjectPath & classReference,
149 const CIMClass & classObject,
|
150 kumpf 1.16 ResponseHandler & handler);
|
151 chip 1.5
152 virtual void createClass(
|
153 chip 1.11 const OperationContext & context,
154 const CIMObjectPath & classReference,
155 const CIMClass & classObject,
|
156 kumpf 1.16 ResponseHandler & handler);
|
157 chip 1.5
158 virtual void deleteClass(
|
159 chip 1.11 const OperationContext & context,
160 const CIMObjectPath & classReference,
|
161 kumpf 1.16 ResponseHandler & handler);
|
162 chip 1.5
163 // CIMAssociationProvider interface
164 virtual void associators(
|
165 chip 1.11 const OperationContext & context,
166 const CIMObjectPath & objectName,
|
167 kumpf 1.15 const CIMName & associationClass,
168 const CIMName & resultClass,
|
169 chip 1.11 const String & role,
170 const String & resultRole,
|
171 kumpf 1.17 const Boolean includeQualifiers,
172 const Boolean includeClassOrigin,
|
173 chip 1.11 const CIMPropertyList & propertyList,
|
174 kumpf 1.16 ObjectResponseHandler & handler);
|
175 chip 1.5
176 virtual void associatorNames(
|
177 chip 1.11 const OperationContext & context,
178 const CIMObjectPath & objectName,
|
179 kumpf 1.15 const CIMName & associationClass,
180 const CIMName & resultClass,
|
181 chip 1.11 const String & role,
182 const String & resultRole,
|
183 kumpf 1.16 ObjectPathResponseHandler & handler);
|
184 chip 1.5
185 virtual void references(
|
186 chip 1.11 const OperationContext & context,
187 const CIMObjectPath & objectName,
|
188 kumpf 1.15 const CIMName & resultClass,
|
189 chip 1.11 const String & role,
|
190 kumpf 1.17 const Boolean includeQualifiers,
191 const Boolean includeClassOrigin,
|
192 chip 1.11 const CIMPropertyList & propertyList,
|
193 kumpf 1.16 ObjectResponseHandler & handler);
|
194 chip 1.5
195 virtual void referenceNames(
|
196 chip 1.11 const OperationContext & context,
197 const CIMObjectPath & objectName,
|
198 kumpf 1.15 const CIMName & resultClass,
|
199 chip 1.11 const String & role,
|
200 kumpf 1.16 ObjectPathResponseHandler & handler);
|
201 chip 1.5
202 // CIMPropertyProvider interface
203 virtual void getProperty(
|
204 chip 1.11 const OperationContext & context,
205 const CIMObjectPath & instanceReference,
|
206 kumpf 1.15 const CIMName & propertyName,
|
207 kumpf 1.16 ValueResponseHandler & handler);
|
208 chip 1.5
209 virtual void setProperty(
|
210 chip 1.11 const OperationContext & context,
211 const CIMObjectPath & instanceReference,
|
212 kumpf 1.15 const CIMName & propertyName,
|
213 chip 1.11 const CIMValue & newValue,
|
214 kumpf 1.16 ResponseHandler & handler);
|
215 chip 1.5
216 // CIMMethodProviderFacade
217 virtual void invokeMethod(
|
218 chip 1.11 const OperationContext & context,
219 const CIMObjectPath & objectReference,
|
220 kumpf 1.15 const CIMName & methodName,
|
221 chip 1.11 const Array<CIMParamValue> & inParameters,
|
222 kumpf 1.16 MethodResultResponseHandler & handler);
|
223 chip 1.5
224 // CIMQueryProvider interface
225 virtual void executeQuery(
|
226 chip 1.11 const OperationContext & context,
|
227 kumpf 1.15 const CIMNamespaceName & nameSpace,
|
228 chip 1.11 const String & queryLanguage,
229 const String & query,
|
230 kumpf 1.16 ObjectResponseHandler & handler);
|
231 chip 1.5
232 // CIMIndicationProvider interface
|
233 chip 1.8 virtual void enableIndications(
|
234 kumpf 1.16 IndicationResponseHandler & handler);
|
235 chip 1.6
|
236 chip 1.8 virtual void disableIndications(void);
|
237 chip 1.6
238 virtual void createSubscription(
|
239 chip 1.11 const OperationContext & context,
240 const CIMObjectPath & subscriptionName,
241 const Array<CIMObjectPath> & classNames,
242 const CIMPropertyList & propertyList,
243 const Uint16 repeatNotificationPolicy);
|
244 chip 1.6
245 virtual void modifySubscription(
|
246 chip 1.11 const OperationContext & context,
247 const CIMObjectPath & subscriptionName,
248 const Array<CIMObjectPath> & classNames,
249 const CIMPropertyList & propertyList,
250 const Uint16 repeatNotificationPolicy);
|
251 chip 1.6
252 virtual void deleteSubscription(
|
253 chip 1.11 const OperationContext & context,
254 const CIMObjectPath & subscriptionName,
255 const Array<CIMObjectPath> & classNames);
|
256 chip 1.5
|
257 kumpf 1.21 // CIMIndicationConsumerProvider interface
258 virtual void consumeIndication(
|
259 chip 1.11 const OperationContext & context,
|
260 kumpf 1.21 const String & destinationPath,
|
261 mday 1.19 const CIMInstance& indicationInstance);
262
|
263 chip 1.1 protected:
|
264 kumpf 1.18 CIMProvider * _provider;
|
265 mday 1.19 AtomicInt _current_operations;
|
266 kumpf 1.25 Boolean _indications_enabled;
|
267 mday 1.19 };
|
268 chip 1.1
269
270 PEGASUS_NAMESPACE_END
271
272 #endif
|