Return to CIMOMHandle.h CVS log | Up to [Pegasus] / pegasus / src / Pegasus / Provider |
1 martin 1.49 //%LICENSE//////////////////////////////////////////////////////////////// | ||
2 martin 1.50 // | ||
3 martin 1.49 // 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.50 // | ||
10 martin 1.49 // 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.50 // | ||
17 martin 1.49 // The above copyright notice and this permission notice shall be included 18 // in all copies or substantial portions of the Software. | ||
19 martin 1.50 // | ||
20 martin 1.49 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
21 martin 1.50 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
22 martin 1.49 // 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.50 // | ||
28 martin 1.49 ////////////////////////////////////////////////////////////////////////// | ||
29 chip 1.1 // 30 //%///////////////////////////////////////////////////////////////////////////// 31 | ||
32 mday 1.23 | ||
33 chip 1.1 #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 chip 1.6 #include <Pegasus/Common/CIMObjectPath.h> | ||
40 chip 1.3 #include <Pegasus/Common/CIMClass.h> 41 #include <Pegasus/Common/CIMInstance.h> | ||
42 chip 1.1 #include <Pegasus/Common/CIMPropertyList.h> | ||
43 mday 1.23 #include <Pegasus/Common/ResponseHandler.h> | ||
44 chuck 1.26 #include <Pegasus/Provider/Linkage.h> | ||
45 chip 1.6 | ||
46 kumpf 1.22 PEGASUS_NAMESPACE_BEGIN | ||
47 chip 1.1 | ||
48 kumpf 1.39 class CIMOMHandleRep; | ||
49 mday 1.23 | ||
50 kumpf 1.48 /** 51 Provides an interface through which a provider may communicate with the 52 CIM Server. Most of the methods of this class mirror the CIMClient 53 interface and allow a provider to perform CIM operations. The semantics 54 of these methods are the same as the CIMClient interface, and their 55 documentation is not repeated here. Please refer to the CIMClient 56 documentation for further details. The interface differs slightly by 57 the use of an OperationContext parameter. This parameter is used to 58 communicate context information such as language data, for which the 59 CIMClient uses state settings. 60 61 The CIMOMHandle may serialize requests from different threads, and 62 therefore may not be a good choice for multi-threaded access. Use of 63 the CIMClient interface by a provider is permitted and may be considered 64 when multiple threads need to perform client operations concurrently. 65 */ | ||
66 chip 1.6 class PEGASUS_PROVIDER_LINKAGE CIMOMHandle | ||
67 chip 1.1 { | ||
68 kumpf 1.46 public: | ||
69 mday 1.23 | ||
70 kumpf 1.48 /** 71 Constructs a default CIMOMHandle object. 72 */ | ||
73 kumpf 1.46 CIMOMHandle(); | ||
74 chuck 1.35 | ||
75 kumpf 1.46 CIMOMHandle(const CIMOMHandle&); | ||
76 mday 1.23 | ||
77 kumpf 1.48 /** 78 Destructs a CIMOMHandle object. 79 */ | ||
80 kumpf 1.46 ~CIMOMHandle(); | ||
81 mday 1.23 | ||
82 kumpf 1.48 /** 83 Assigns the CIMOMHandle from a specified CIMOMHandle object. 84 @param handle The CIMOMHandle object to copy. 85 @return A reference to this CIMOMHandle object with the new assignment. 86 */ | ||
87 kumpf 1.46 CIMOMHandle& operator=(const CIMOMHandle& handle); | ||
88 kumpf 1.51 | ||
89 kumpf 1.46 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 kumpf 1.46 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 kumpf 1.46 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 kumpf 1.46 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 kumpf 1.46 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 kumpf 1.46 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 kumpf 1.46 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 235 /** 236 kumpf 1.46 Provides a hint to the CIM Server that the provider calling this 237 method prefers not to be unloaded. This hint applies in 238 situations where a provider unload is not necessary, such as 239 when the CIM Server unloads idle providers for efficiency reasons. 240 A provider may rescind this hint by using the allowProviderUnload 241 method. Note that disallowProviderUnload is cumulative, such that 242 each call to disallowProviderUnload must be matched with a call to 243 allowProviderUnload. | ||
244 kumpf 1.48 */ | ||
245 kumpf 1.46 void disallowProviderUnload(); 246 247 /** 248 Provides a hint to the CIM Server that the provider calling this 249 method no longer prefers not to be unloaded. This hint applies in 250 situations where a provider unload is not necessary, such as 251 when the CIM Server unloads idle providers for efficiency reasons. 252 This method is used to rescind a hint that was given using the 253 disallowProviderUnload method. Note that each allowProviderUnload 254 call should be preceded by a disallowProviderUnload call. | ||
255 kumpf 1.48 */ | ||
256 kumpf 1.46 void allowProviderUnload(); | ||
257 kumpf 1.27 | ||
258 chuck 1.38 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES | ||
259 kumpf 1.46 /** | ||
260 kumpf 1.48 Returns the context of the response to the last request. 261 Currently, the context only contains the ContentLanguageListContainer 262 from the response. 263 Note: this method should be called directly after the call to the 264 CIM request method (getClass, etc), and can only be called once 265 per request. 266 267 @return An OperationContext object containing the context of the most 268 recent response. 269 */ | ||
270 kumpf 1.46 OperationContext getResponseContext(); | ||
271 chuck 1.38 #endif 272 | ||
273 kumpf 1.51 private: | ||
274 kumpf 1.46 CIMOMHandleRep* _rep; | ||
275 mday 1.24 | ||
276 kumpf 1.46 friend class ProviderStatus; 277 friend class CMPIProvider; | ||
278 thilo.boehm 1.52 friend class CMPI_BrokerHdl; | ||
279 kumpf 1.51 | ||
280 kumpf 1.46 Boolean unload_ok(); | ||
281 chip 1.1 }; 282 283 PEGASUS_NAMESPACE_END 284 285 #endif |
No CVS admin address has been configured |
Powered by ViewCVS 0.9.2 |