1 karl 1.24 //%2006////////////////////////////////////////////////////////////////////////
|
2 kumpf 1.1 //
|
3 karl 1.21 // 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 karl 1.19 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.21 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 karl 1.22 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.24 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 kumpf 1.1 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
15 // of this software and associated documentation files (the "Software"), to
16 // deal in the Software without restriction, including without limitation the
17 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
18 // sell copies of the Software, and to permit persons to whom the Software is
19 // furnished to do so, subject to the following conditions:
|
20 karl 1.19 //
|
21 kumpf 1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
22 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
24 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
|
30 karl 1.27 //=============================================================================
|
31 kumpf 1.1 //
32 //%/////////////////////////////////////////////////////////////////////////////
33
|
34 ks.madhusudan 1.28 #ifndef Pegasus_ProviderRegistrationProvider_h
35 #define Pegasus_ProviderRegistrationProvider_h
|
36 kumpf 1.1 #include <Pegasus/Common/Config.h>
|
37 chuck 1.10 #include <Pegasus/ControlProviders/ProviderRegistrationProvider/Linkage.h>
|
38 kumpf 1.1
39 #include <Pegasus/Provider/CIMInstanceProvider.h>
40 #include <Pegasus/Provider/CIMMethodProvider.h>
|
41 kumpf 1.18 #include <Pegasus/Common/ModuleController.h>
|
42 kumpf 1.1
|
43 kumpf 1.23 #include <Pegasus/Common/AcceptLanguageList.h>
|
44 chuck 1.15
|
45 karl 1.27 #include \
46 <Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h>
|
47 kumpf 1.1
48 PEGASUS_NAMESPACE_BEGIN
49
50 class PEGASUS_PROVREGPROVIDER_LINKAGE ProviderRegistrationProvider :
51 public CIMInstanceProvider,
52 public CIMMethodProvider
53 {
54 public:
|
55 kumpf 1.3
56 class callback_data
57 {
58 public:
59
60 Message *reply;
61 Semaphore client_sem;
62 ProviderRegistrationProvider & cimom_handle;
63
64 callback_data(ProviderRegistrationProvider *handle)
65 : reply(0), client_sem(0), cimom_handle(*handle)
66 {
67 }
68 ~callback_data()
69 {
70 delete reply;
71 }
72
73 Message *get_reply(void)
74 {
75 Message *ret = reply;
76 kumpf 1.3 reply = NULL;
77 return ret;
78 }
79
80 private:
81 callback_data(void);
82 };
83
84
|
85 kumpf 1.1 ProviderRegistrationProvider(
86 ProviderRegistrationManager* providerRegistrationManager);
87 virtual ~ProviderRegistrationProvider(void);
88
|
89 karl 1.27 ProviderRegistrationProvider & operator=
90 (const ProviderRegistrationProvider & handle);
|
91 kumpf 1.3
|
92 kumpf 1.13 // CIMProvider interface
|
93 kumpf 1.26 // Note: The initialize() and terminate() methods are not called for
94 // Control Providers.
95 virtual void initialize(CIMOMHandle& cimom) { }
96 virtual void terminate() { }
|
97 kumpf 1.1
98 // CIMInstanceProvider interface
99 virtual void getInstance(
100 const OperationContext & context,
|
101 kumpf 1.5 const CIMObjectPath & instanceReference,
|
102 kumpf 1.12 const Boolean includeQualifiers,
103 const Boolean includeClassOrigin,
|
104 kumpf 1.2 const CIMPropertyList & propertyList,
|
105 kumpf 1.11 InstanceResponseHandler & handler);
|
106 kumpf 1.1
107 virtual void enumerateInstances(
108 const OperationContext & context,
|
109 kumpf 1.5 const CIMObjectPath & classReference,
|
110 kumpf 1.12 const Boolean includeQualifiers,
111 const Boolean includeClassOrigin,
|
112 kumpf 1.2 const CIMPropertyList & propertyList,
|
113 kumpf 1.11 InstanceResponseHandler & handler);
|
114 kumpf 1.1
115 virtual void enumerateInstanceNames(
116 const OperationContext & context,
|
117 kumpf 1.5 const CIMObjectPath & classReference,
|
118 kumpf 1.11 ObjectPathResponseHandler & handler);
|
119 kumpf 1.1
120 virtual void modifyInstance(
121 const OperationContext & context,
|
122 kumpf 1.5 const CIMObjectPath & instanceReference,
|
123 kumpf 1.1 const CIMInstance & instanceObject,
|
124 kumpf 1.12 const Boolean includeQualifiers,
|
125 kumpf 1.2 const CIMPropertyList & propertyList,
|
126 kumpf 1.11 ResponseHandler & handler);
|
127 kumpf 1.1
128 virtual void createInstance(
129 const OperationContext & context,
|
130 kumpf 1.5 const CIMObjectPath & instanceReference,
|
131 kumpf 1.1 const CIMInstance & instanceObject,
|
132 kumpf 1.11 ObjectPathResponseHandler & handler);
|
133 kumpf 1.1
134 virtual void deleteInstance(
135 const OperationContext & context,
|
136 kumpf 1.5 const CIMObjectPath & instanceReference,
|
137 kumpf 1.11 ResponseHandler & handler);
|
138 kumpf 1.1
139 // CIMMethodProvider interface
140 virtual void invokeMethod(
141 const OperationContext & context,
|
142 kumpf 1.5 const CIMObjectPath & objectReference,
|
143 kumpf 1.9 const CIMName & methodName,
|
144 kumpf 1.1 const Array<CIMParamValue> & inParameters,
|
145 kumpf 1.11 MethodResultResponseHandler & handler);
|
146 kumpf 1.1
147 protected:
|
148 kumpf 1.3
149 ModuleController * _controller;
150
|
151 kumpf 1.1 ProviderRegistrationManager* _providerRegistrationManager;
|
152 kumpf 1.3
153 MessageQueueService * _getProviderManagerService();
154 Array<Uint16> _sendDisableMessageToProviderManager(
|
155 karl 1.27 CIMDisableModuleRequestMessage * notify_req);
|
156 kumpf 1.3 Array<Uint16> _sendEnableMessageToProviderManager(
|
157 karl 1.27 CIMEnableModuleRequestMessage * notify_req);
|
158 kumpf 1.4 MessageQueueService * _getIndicationService();
159 void _sendTerminationMessageToSubscription(
|
160 karl 1.27 const CIMObjectPath & ref, const String & moduleName,
161 const Boolean disableProviderOnly,
|
162 kumpf 1.23 const AcceptLanguageList & al);
|
163 kumpf 1.14
164 Sint16 _disableModule(const CIMObjectPath & moduleRef,
|
165 karl 1.27 const String & moduleName,
166 Boolean disableProviderOnly,
|
167 kumpf 1.23 const AcceptLanguageList & al);
|
168 kumpf 1.16
169 //
170 // If the provider is an indication provider, return true
171 // otherwise, return false
172 //
173 Boolean _isIndicationProvider(const String & moduleName,
|
174 kumpf 1.20 const CIMInstance & instance);
|
175 kumpf 1.18
176 Sint16 _enableModule(const CIMObjectPath & moduleRef,
|
177 karl 1.27 const String & moduleName,
|
178 kumpf 1.23 const AcceptLanguageList & al);
|
179 kumpf 1.18
180 void _sendEnableMessageToSubscription(
|
181 karl 1.27 const CIMInstance & mInstance,
182 const CIMInstance & pInstance,
183 const Array<CIMInstance> & capInstances,
184 const AcceptLanguageList & al);
|
185 kumpf 1.18
186 //
187 // get all the indication capability instances which belongs
188 // to the provider
189 //
190 Array<CIMInstance> _getIndicationCapInstances(
|
191 karl 1.27 const String & moduleName,
192 const CIMInstance & instance,
193 const CIMObjectPath & providerRef);
|
194 venkat.puvvada 1.30 private:
195
196 #ifdef PEGASUS_ENABLE_INTEROP_PROVIDER
197 CIMOMHandle _cimomHandle;
198 Mutex _updateMtx;
199 void _sendUpdateCacheMessagetoInteropProvider(
200 const OperationContext & context);
201 #endif
|
202 kumpf 1.18
|
203 kumpf 1.1 };
204
205 PEGASUS_NAMESPACE_END
|
206 mike 1.29
207 #endif
|