CIMOMHandle.h
1 //%LICENSE////////////////////////////////////////////////////////////////
2 //
3 // 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 //
10 // 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 //
17 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
19 //
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // 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 //
29 //
30 //%/////////////////////////////////////////////////////////////////////////////
31 
32 
33 #ifndef Pegasus_CIMOMHandle_h
34 #define Pegasus_CIMOMHandle_h
35 
36 #include <Pegasus/Common/Config.h>
37 #include <Pegasus/Common/OperationContext.h>
38 #include <Pegasus/Common/CIMObject.h>
39 #include <Pegasus/Common/CIMObjectPath.h>
40 #include <Pegasus/Common/CIMClass.h>
41 #include <Pegasus/Common/CIMInstance.h>
42 #include <Pegasus/Common/CIMPropertyList.h>
43 #include <Pegasus/Common/ResponseHandler.h>
44 #include <Pegasus/Provider/Linkage.h>
45 
46 PEGASUS_NAMESPACE_BEGIN
47 
48 class CIMOMHandleRep;
49 
66 class PEGASUS_PROVIDER_LINKAGE CIMOMHandle
67 {
68 public:
69 
73  CIMOMHandle();
74 
75  CIMOMHandle(const CIMOMHandle&);
76 
80  ~CIMOMHandle();
81 
87  CIMOMHandle& operator=(const CIMOMHandle& handle);
88 
89  CIMClass getClass(
90  const OperationContext& context,
91  const CIMNamespaceName& nameSpace,
92  const CIMName& className,
93  Boolean localOnly,
94  Boolean includeQualifiers,
95  Boolean includeClassOrigin,
96  const CIMPropertyList& propertyList);
97 
98  Array<CIMClass> enumerateClasses(
99  const OperationContext& context,
100  const CIMNamespaceName& nameSpace,
101  const CIMName& className,
102  Boolean deepInheritance,
103  Boolean localOnly,
104  Boolean includeQualifiers,
105  Boolean includeClassOrigin);
106 
107  Array<CIMName> enumerateClassNames(
108  const OperationContext& context,
109  const CIMNamespaceName& nameSpace,
110  const CIMName& className,
111  Boolean deepInheritance);
112 
113  void createClass(
114  const OperationContext& context,
115  const CIMNamespaceName& nameSpace,
116  const CIMClass& newClass);
117 
118  void modifyClass(
119  const OperationContext& context,
120  const CIMNamespaceName& nameSpace,
121  const CIMClass& modifiedClass);
122 
123  void deleteClass(
124  const OperationContext& context,
125  const CIMNamespaceName& nameSpace,
126  const CIMName& className);
127 
128  CIMInstance getInstance(
129  const OperationContext& context,
130  const CIMNamespaceName& nameSpace,
131  const CIMObjectPath& instanceName,
132  Boolean localOnly,
133  Boolean includeQualifiers,
134  Boolean includeClassOrigin,
135  const CIMPropertyList& propertyList);
136 
137  Array<CIMInstance> enumerateInstances(
138  const OperationContext& context,
139  const CIMNamespaceName& nameSpace,
140  const CIMName& className,
141  Boolean deepInheritance,
142  Boolean localOnly,
143  Boolean includeQualifiers,
144  Boolean includeClassOrigin,
145  const CIMPropertyList& propertyList);
146 
147  Array<CIMObjectPath> enumerateInstanceNames(
148  const OperationContext& context,
149  const CIMNamespaceName& nameSpace,
150  const CIMName& className);
151 
152  CIMObjectPath createInstance(
153  const OperationContext& context,
154  const CIMNamespaceName& nameSpace,
155  const CIMInstance& newInstance);
156 
157  void modifyInstance(
158  const OperationContext& context,
159  const CIMNamespaceName& nameSpace,
160  const CIMInstance& modifiedInstance,
161  Boolean includeQualifiers,
162  const CIMPropertyList& propertyList);
163 
164  void deleteInstance(
165  const OperationContext& context,
166  const CIMNamespaceName& nameSpace,
167  const CIMObjectPath& instanceName);
168 
169  Array<CIMObject> execQuery(
170  const OperationContext& context,
171  const CIMNamespaceName& nameSpace,
172  const String& queryLanguage,
173  const String& query);
174 
175  Array<CIMObject> associators(
176  const OperationContext& context,
177  const CIMNamespaceName& nameSpace,
178  const CIMObjectPath& objectName,
179  const CIMName& assocClass,
180  const CIMName& resultClass,
181  const String& role,
182  const String& resultRole,
183  Boolean includeQualifiers,
184  Boolean includeClassOrigin,
185  const CIMPropertyList& propertyList);
186 
187  Array<CIMObjectPath> associatorNames(
188  const OperationContext& context,
189  const CIMNamespaceName& nameSpace,
190  const CIMObjectPath& objectName,
191  const CIMName& assocClass,
192  const CIMName& resultClass,
193  const String& role,
194  const String& resultRole);
195 
196  Array<CIMObject> references(
197  const OperationContext& context,
198  const CIMNamespaceName& nameSpace,
199  const CIMObjectPath& objectName,
200  const CIMName& resultClass,
201  const String& role,
202  Boolean includeQualifiers,
203  Boolean includeClassOrigin,
204  const CIMPropertyList& propertyList);
205 
206  Array<CIMObjectPath> referenceNames(
207  const OperationContext& context,
208  const CIMNamespaceName& nameSpace,
209  const CIMObjectPath& objectName,
210  const CIMName& resultClass,
211  const String& role);
212 
213  // property operations
214  CIMValue getProperty(
215  const OperationContext& context,
216  const CIMNamespaceName& nameSpace,
217  const CIMObjectPath& instanceName,
218  const CIMName& propertyName);
219 
220  void setProperty(
221  const OperationContext& context,
222  const CIMNamespaceName& nameSpace,
223  const CIMObjectPath& instanceName,
224  const CIMName& propertyName,
225  const CIMValue& newValue);
226 
227  CIMValue invokeMethod(
228  const OperationContext& context,
229  const CIMNamespaceName& nameSpace,
230  const CIMObjectPath& instanceName,
231  const CIMName& methodName,
232  const Array<CIMParamValue>& inParameters,
233  Array<CIMParamValue>& outParameters);
234 
245  void disallowProviderUnload();
246 
256  void allowProviderUnload();
257 
258 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
259 
270  OperationContext getResponseContext();
271 #endif
272 
273 private:
274  CIMOMHandleRep* _rep;
275 
276  friend class ProviderStatus;
277  friend class CMPIProvider;
278  friend class CMPI_BrokerHdl;
279 
280  Boolean unload_ok();
281 };
282 
283 PEGASUS_NAMESPACE_END
284 
285 #endif
Definition: CIMObjectPath.h:388
Definition: CIMInstance.h:64
Definition: CIMValue.h:63
Definition: CIMOMHandle.h:66
Definition: String.h:119
Definition: CIMPropertyList.h:61
Definition: CIMName.h:64
Definition: CIMClass.h:61
Definition: OperationContext.h:52
Definition: ArrayInter.h:44
Definition: CIMName.h:255