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 //==============================================================================
31 //
32 // Author: Yi Zhou, Hewlett-Packard Company (yi_zhou@hp.com)
33 //
34 // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
35 //
36 //%/////////////////////////////////////////////////////////////////////////////
37
38 #include <Pegasus/Common/Config.h>
|
39 chuck 1.10 #include <Pegasus/ControlProviders/ProviderRegistrationProvider/Linkage.h>
|
40 kumpf 1.1
41 #include <Pegasus/Provider/CIMInstanceProvider.h>
42 #include <Pegasus/Provider/CIMMethodProvider.h>
|
43 kumpf 1.18 #include <Pegasus/Common/ModuleController.h>
|
44 kumpf 1.1
|
45 kumpf 1.23 #include <Pegasus/Common/AcceptLanguageList.h>
|
46 chuck 1.15
|
47 kumpf 1.1 #include <Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h>
48
49 PEGASUS_NAMESPACE_BEGIN
50
51 class PEGASUS_PROVREGPROVIDER_LINKAGE ProviderRegistrationProvider :
52 public CIMInstanceProvider,
53 public CIMMethodProvider
54 {
55 public:
|
56 kumpf 1.3
57 class callback_data
58 {
59 public:
60
61 Message *reply;
62 Semaphore client_sem;
63 ProviderRegistrationProvider & cimom_handle;
64
65 callback_data(ProviderRegistrationProvider *handle)
66 : reply(0), client_sem(0), cimom_handle(*handle)
67 {
68 }
69 ~callback_data()
70 {
71 delete reply;
72 }
73
74 Message *get_reply(void)
75 {
76 Message *ret = reply;
77 kumpf 1.3 reply = NULL;
78 return ret;
79 }
80
81 private:
82 callback_data(void);
83 };
84
85
|
86 kumpf 1.1 ProviderRegistrationProvider(
87 ProviderRegistrationManager* providerRegistrationManager);
88 virtual ~ProviderRegistrationProvider(void);
89
|
90 kumpf 1.3 ProviderRegistrationProvider & operator=(const ProviderRegistrationProvider & handle);
91
|
92 kumpf 1.13 // CIMProvider interface
|
93 kumpf 1.1 virtual void initialize(CIMOMHandle& cimom);
94 virtual void terminate(void);
95
96 // CIMInstanceProvider interface
97 virtual void getInstance(
98 const OperationContext & context,
|
99 kumpf 1.5 const CIMObjectPath & instanceReference,
|
100 kumpf 1.12 const Boolean includeQualifiers,
101 const Boolean includeClassOrigin,
|
102 kumpf 1.2 const CIMPropertyList & propertyList,
|
103 kumpf 1.11 InstanceResponseHandler & handler);
|
104 kumpf 1.1
105 virtual void enumerateInstances(
106 const OperationContext & context,
|
107 kumpf 1.5 const CIMObjectPath & classReference,
|
108 kumpf 1.12 const Boolean includeQualifiers,
109 const Boolean includeClassOrigin,
|
110 kumpf 1.2 const CIMPropertyList & propertyList,
|
111 kumpf 1.11 InstanceResponseHandler & handler);
|
112 kumpf 1.1
113 virtual void enumerateInstanceNames(
114 const OperationContext & context,
|
115 kumpf 1.5 const CIMObjectPath & classReference,
|
116 kumpf 1.11 ObjectPathResponseHandler & handler);
|
117 kumpf 1.1
118 virtual void modifyInstance(
119 const OperationContext & context,
|
120 kumpf 1.5 const CIMObjectPath & instanceReference,
|
121 kumpf 1.1 const CIMInstance & instanceObject,
|
122 kumpf 1.12 const Boolean includeQualifiers,
|
123 kumpf 1.2 const CIMPropertyList & propertyList,
|
124 kumpf 1.11 ResponseHandler & handler);
|
125 kumpf 1.1
126 virtual void createInstance(
127 const OperationContext & context,
|
128 kumpf 1.5 const CIMObjectPath & instanceReference,
|
129 kumpf 1.1 const CIMInstance & instanceObject,
|
130 kumpf 1.11 ObjectPathResponseHandler & handler);
|
131 kumpf 1.1
132 virtual void deleteInstance(
133 const OperationContext & context,
|
134 kumpf 1.5 const CIMObjectPath & instanceReference,
|
135 kumpf 1.11 ResponseHandler & handler);
|
136 kumpf 1.1
137 // CIMMethodProvider interface
138 virtual void invokeMethod(
139 const OperationContext & context,
|
140 kumpf 1.5 const CIMObjectPath & objectReference,
|
141 kumpf 1.9 const CIMName & methodName,
|
142 kumpf 1.1 const Array<CIMParamValue> & inParameters,
|
143 kumpf 1.11 MethodResultResponseHandler & handler);
|
144 kumpf 1.1
145 protected:
|
146 kumpf 1.3
147 ModuleController * _controller;
148
|
149 kumpf 1.1 ProviderRegistrationManager* _providerRegistrationManager;
|
150 kumpf 1.3
151 MessageQueueService * _getProviderManagerService();
152 Array<Uint16> _sendDisableMessageToProviderManager(
153 CIMDisableModuleRequestMessage * notify_req);
154 Array<Uint16> _sendEnableMessageToProviderManager(
155 CIMEnableModuleRequestMessage * notify_req);
|
156 kumpf 1.4 MessageQueueService * _getIndicationService();
157 void _sendTerminationMessageToSubscription(
|
158 kumpf 1.14 const CIMObjectPath & ref, const String & moduleName,
|
159 chuck 1.15 const Boolean disableProviderOnly,
|
160 kumpf 1.23 const AcceptLanguageList & al);
|
161 kumpf 1.14
162 Sint16 _disableModule(const CIMObjectPath & moduleRef,
163 const String & moduleName,
|
164 chuck 1.15 Boolean disableProviderOnly,
|
165 kumpf 1.23 const AcceptLanguageList & al);
|
166 kumpf 1.16
167 //
168 // If the provider is an indication provider, return true
169 // otherwise, return false
170 //
171 Boolean _isIndicationProvider(const String & moduleName,
|
172 kumpf 1.20 const CIMInstance & instance);
|
173 kumpf 1.18
174 Sint16 _enableModule(const CIMObjectPath & moduleRef,
175 const String & moduleName,
|
176 kumpf 1.23 const AcceptLanguageList & al);
|
177 kumpf 1.18
178 void _sendEnableMessageToSubscription(
179 const CIMInstance & mInstance,
180 const CIMInstance & pInstance,
181 const Array<CIMInstance> & capInstances,
|
182 kumpf 1.23 const AcceptLanguageList & al);
|
183 kumpf 1.18
184 //
185 // get all the indication capability instances which belongs
186 // to the provider
187 //
188 Array<CIMInstance> _getIndicationCapInstances(
189 const String & moduleName,
190 const CIMInstance & instance,
191 const CIMObjectPath & providerRef);
192
|
193 kumpf 1.1 };
194
195 PEGASUS_NAMESPACE_END
|