1 karl 1.30 //%2006////////////////////////////////////////////////////////////////////////
|
2 chip 1.1 //
|
3 karl 1.23 // 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.2 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.23 // 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.25 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.30 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 chip 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.23 //
|
21 chip 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 //%/////////////////////////////////////////////////////////////////////////////
33
34 #ifndef Pegasus_CMPIProviderManager_h
35 #define Pegasus_CMPIProviderManager_h
36
37 #include <Pegasus/Common/Config.h>
|
38 schuur 1.3 #include <Pegasus/Common/HashTable.h>
39 #include <Pegasus/ProviderManager2/ProviderName.h>
|
40 chip 1.1 #include <Pegasus/ProviderManager2/ProviderManager.h>
|
41 kumpf 1.15 #include <Pegasus/Common/OperationContextInternal.h>
|
42 schuur 1.7
|
43 schuur 1.3 #include <Pegasus/Config/ConfigManager.h>
|
44 schuur 1.8 #include <Pegasus/ProviderManager2/OperationResponseHandler.h>
|
45 chip 1.1
|
46 kumpf 1.18 #include <Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.h>
|
47 schuur 1.7 #include <Pegasus/ProviderManager2/CMPI/Linkage.h>
|
48 marek 1.42 #include <Pegasus/ProviderManager2/CMPI/CMPI_ContextArgs.h>
|
49 schuur 1.7
|
50 konrad.r 1.27 #include <Pegasus/Provider/CIMOMHandleQueryContext.h>
|
51 chip 1.1 PEGASUS_NAMESPACE_BEGIN
52
|
53 schuur 1.4 struct CMPI_SelectExp;
|
54 schuur 1.3
|
55 schuur 1.7 class PEGASUS_CMPIPM_LINKAGE CMPIProviderManager : public ProviderManager
|
56 chip 1.1 {
57 public:
|
58 marek 1.43 CMPIProviderManager();
|
59 venkat.puvvada 1.35 virtual ~CMPIProviderManager();
|
60 dj.gorey 1.12
|
61 dj.gorey 1.14 virtual Message * processMessage(Message * request);
|
62 chip 1.1
|
63 kumpf 1.18 virtual Boolean hasActiveProviders();
64 virtual void unloadIdleProviders();
|
65 dj.gorey 1.12
|
66 venkat.puvvada 1.35 virtual Boolean supportsRemoteNameSpaces()
67 {
68 return true;
69 }
70
71 struct indProvRecord
72 {
73 indProvRecord() : enabled(false), count(1), handler(NULL)
74 {
75 }
76 Boolean enabled;
77 int count;
|
78 venkat.puvvada 1.37 #ifdef PEGASUS_ENABLE_REMOTE_CMPI
79 String remoteInfo;
80 #endif
|
81 venkat.puvvada 1.35 EnableIndicationsResponseHandler* handler;
82 };
83
84 struct indSelectRecord
85 {
86 indSelectRecord() : eSelx(NULL), count(1)
87 {
88 }
89 CMPI_SelectExp *eSelx;
90 CIMOMHandleQueryContext *qContext;
91 int count;
92 };
|
93 schuur 1.21
|
94 venkat.puvvada 1.35 typedef HashTable<String,indProvRecord*, \
95 EqualFunc<String>,HashFunc<String> > IndProvTab;
96 typedef HashTable<CIMObjectPath,indSelectRecord*, \
97 EqualFunc<CIMObjectPath>,HashFunc<CIMObjectPath> > IndSelectTab;
98
99 static IndProvTab provTab;
100 static ReadWriteSem rwSemProvTab;
101 static IndSelectTab selxTab;
102 static ReadWriteSem rwSemSelxTab;
|
103 schuur 1.3 protected:
|
104 kumpf 1.18 CMPILocalProviderManager providerManager;
105
|
106 marek 1.42 void _setupCMPIContexts(
107 CMPI_ContextOnStack * eCtx,
108 OperationContext * context,
109 ProviderIdContainer * pidc,
110 const String & nameSpace,
111 Boolean remote,
112 Boolean includeQualifiers = false,
113 Boolean includeClassOrigin = false,
114 Boolean setFlags = false);
115
|
116 dj.gorey 1.14 Message * handleUnsupportedRequest(const Message * message);
|
117 schuur 1.3
|
118 dj.gorey 1.14 Message * handleGetInstanceRequest(const Message * message);
119 Message * handleEnumerateInstancesRequest(const Message * message);
120 Message * handleEnumerateInstanceNamesRequest(const Message * message);
121 Message * handleCreateInstanceRequest(const Message * message);
122 Message * handleModifyInstanceRequest(const Message * message);
123 Message * handleDeleteInstanceRequest(const Message * message);
124
125 Message * handleExecQueryRequest(const Message * message);
126
127 Message * handleAssociatorsRequest(const Message * message);
128 Message * handleAssociatorNamesRequest(const Message * message);
129 Message * handleReferencesRequest(const Message * message);
130 Message * handleReferenceNamesRequest(const Message * message);
|
131 dave.sudlik 1.33
|
132 dj.gorey 1.14 Message * handleGetPropertyRequest(const Message * message);
133 Message * handleSetPropertyRequest(const Message * message);
|
134 dave.sudlik 1.33
|
135 dj.gorey 1.14 Message * handleInvokeMethodRequest(const Message * message);
|
136 schuur 1.3
|
137 dj.gorey 1.14 Message * handleCreateSubscriptionRequest(const Message * message);
138 // Message * handleModifySubscriptionRequest(const Message * message);
139 Message * handleDeleteSubscriptionRequest(const Message * message);
|
140 schuur 1.3
141 // Not supported by CMPI
|
142 kumpf 1.19 // Message * handleExportIndicationRequest(const Message * message);
|
143 schuur 1.3
|
144 dj.gorey 1.14 Message * handleDisableModuleRequest(const Message * message);
145 Message * handleEnableModuleRequest(const Message * message);
146 Message * handleStopAllProvidersRequest(const Message * message);
|
147 carolann.graves 1.26 Message * handleSubscriptionInitCompleteRequest (const Message * message);
|
148 chip 1.1
|
149 kumpf 1.15 ProviderName _resolveProviderName(const ProviderIdContainer & providerId);
|
150 carolann.graves 1.26
151 /**
152 Calls the provider's enableIndications() method, if the provider
153 version supports enableIndications().
154
155 Note that since an exception thrown by the provider's
156 enableIndications() method is considered a provider error, any such
157 exception is ignored, and no exceptions are thrown by this method.
158
159 @param req_provider CIMInstance for the provider to be enabled
|
160 kumpf 1.31 @param _indicationCallback PEGASUS_INDICATION_CALLBACK_T for
161 indications
|
162 carolann.graves 1.26 @param ph OpProviderHolder for the provider to be enabled
|
163 dave.sudlik 1.34 @param remoteInfo Remote Information
|
164 carolann.graves 1.26 */
|
165 venkat.puvvada 1.35 void _callEnableIndications(
166 CIMInstance & req_provider,
167 PEGASUS_INDICATION_CALLBACK_T _indicationCallback,
|
168 venkat.puvvada 1.44 OpProviderHolder & ph,
|
169 venkat.puvvada 1.35 const char *remoteInfo);
|
170 carolann.graves 1.26
171 /**
172 Calls the provider's disableIndications() method, if the provider
173 version supports disableIndications().
174
175 @param ph OpProviderHolder for the provider to be enabled
|
176 dave.sudlik 1.34 @param remoteInfo Remote Information
|
177 carolann.graves 1.26 */
|
178 venkat.puvvada 1.35 void _callDisableIndications(
|
179 venkat.puvvada 1.44 OpProviderHolder & ph,
|
180 venkat.puvvada 1.35 const char *remoteInfo);
|
181 venkat.puvvada 1.45
182 CIMObjectPath _getFilterPath(
183 const CIMInstance &instance);
|
184 chip 1.1 };
185
186 PEGASUS_NAMESPACE_END
187
188 #endif
|
189 venkat.puvvada 1.35
|