1 a.dunfey 1.28.8.1 //%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 a.dunfey 1.28.8.1 // 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 schuur 1.3 // Author: Adrian Schuur, schuur@de.ibm.com
|
33 chip 1.1 //
|
34 dj.gorey 1.12 // Modified By:
|
35 chip 1.1 //
36 //%/////////////////////////////////////////////////////////////////////////////
37
38 #ifndef Pegasus_CMPIProviderManager_h
39 #define Pegasus_CMPIProviderManager_h
40
41 #include <Pegasus/Common/Config.h>
|
42 schuur 1.3 #include <Pegasus/Common/HashTable.h>
43 #include <Pegasus/ProviderManager2/ProviderName.h>
|
44 chip 1.1 #include <Pegasus/ProviderManager2/ProviderManager.h>
|
45 kumpf 1.15 #include <Pegasus/Common/OperationContextInternal.h>
|
46 schuur 1.7
|
47 schuur 1.3 #include <Pegasus/Config/ConfigManager.h>
|
48 schuur 1.8 #include <Pegasus/ProviderManager2/OperationResponseHandler.h>
|
49 chip 1.1
|
50 kumpf 1.18 #include <Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.h>
|
51 schuur 1.7 #include <Pegasus/ProviderManager2/CMPI/Linkage.h>
52
|
53 konrad.r 1.27 #include <Pegasus/Provider/CIMOMHandleQueryContext.h>
|
54 chip 1.1 PEGASUS_NAMESPACE_BEGIN
55
|
56 schuur 1.4 struct CMPI_SelectExp;
|
57 schuur 1.3
|
58 schuur 1.7 class PEGASUS_CMPIPM_LINKAGE CMPIProviderManager : public ProviderManager
|
59 chip 1.1 {
60 public:
|
61 dj.gorey 1.12 enum Mode {
|
62 schuur 1.3 CMPI_MODE,
63 CMPI_R_MODE,
64 CMPI_O_MODE
65 };
66
67 Mode getMode() { return mode; }
68 CMPIProviderManager(Mode=CMPI_MODE);
|
69 chip 1.1 virtual ~CMPIProviderManager(void);
|
70 dj.gorey 1.12
71 virtual Boolean insertProvider(const ProviderName & providerName,
|
72 schuur 1.3 const String &ns, const String &cn);
|
73 dj.gorey 1.12
|
74 dj.gorey 1.14 virtual Message * processMessage(Message * request);
|
75 chip 1.1
|
76 kumpf 1.18 virtual Boolean hasActiveProviders();
77 virtual void unloadIdleProviders();
|
78 dj.gorey 1.12
|
79 schuur 1.21 virtual Boolean supportsRemoteNameSpaces() { return true; }
80
|
81 schuur 1.3 struct indProvRecord {
82 indProvRecord() : enabled(false), count(1), handler(NULL) {}
83 Boolean enabled;
84 int count;
85 EnableIndicationsResponseHandler* handler;
86 };
87
88 struct indSelectRecord {
89 indSelectRecord() : eSelx(NULL) {}
90 CMPI_SelectExp *eSelx;
|
91 konrad.r 1.27 CIMOMHandleQueryContext *qContext;
|
92 schuur 1.3 };
93
94 typedef HashTable<String,indProvRecord*, EqualFunc<String>,HashFunc<String> > IndProvTab;
|
95 a.dunfey 1.28.8.1 typedef HashTable<CIMObjectPath,indSelectRecord*,EqualFunc<CIMObjectPath>,HashFunc<CIMObjectPath> > IndSelectTab;
|
96 schuur 1.3 typedef HashTable<String,ProviderName,EqualFunc<String>,HashFunc<String> > ProvRegistrar;
97
98 static IndProvTab provTab;
99 static IndSelectTab selxTab;
100 static ProvRegistrar provReg;
101 protected:
|
102 kumpf 1.18 CMPILocalProviderManager providerManager;
103
|
104 schuur 1.3 Mode mode;
105
|
106 dj.gorey 1.14 Message * handleUnsupportedRequest(const Message * message);
|
107 schuur 1.3
|
108 dj.gorey 1.14 Message * handleGetInstanceRequest(const Message * message);
109 Message * handleEnumerateInstancesRequest(const Message * message);
110 Message * handleEnumerateInstanceNamesRequest(const Message * message);
111 Message * handleCreateInstanceRequest(const Message * message);
112 Message * handleModifyInstanceRequest(const Message * message);
113 Message * handleDeleteInstanceRequest(const Message * message);
114
115 Message * handleExecQueryRequest(const Message * message);
116
117 Message * handleAssociatorsRequest(const Message * message);
118 Message * handleAssociatorNamesRequest(const Message * message);
119 Message * handleReferencesRequest(const Message * message);
120 Message * handleReferenceNamesRequest(const Message * message);
|
121 schuur 1.3 /*
|
122 dj.gorey 1.14 Message * handleGetPropertyRequest(const Message * message);
123 Message * handleSetPropertyRequest(const Message * message);
|
124 schuur 1.3 */
|
125 dj.gorey 1.14 Message * handleInvokeMethodRequest(const Message * message);
|
126 schuur 1.3
|
127 dj.gorey 1.14 Message * handleCreateSubscriptionRequest(const Message * message);
128 // Message * handleModifySubscriptionRequest(const Message * message);
129 Message * handleDeleteSubscriptionRequest(const Message * message);
|
130 schuur 1.3
131 // Not supported by CMPI
|
132 kumpf 1.19 // Message * handleExportIndicationRequest(const Message * message);
|
133 schuur 1.3
|
134 dj.gorey 1.14 Message * handleDisableModuleRequest(const Message * message);
135 Message * handleEnableModuleRequest(const Message * message);
136 Message * handleStopAllProvidersRequest(const Message * message);
|
137 kumpf 1.16 Message * handleInitializeProviderRequest(const Message * message);
|
138 carolann.graves 1.26 Message * handleSubscriptionInitCompleteRequest (const Message * message);
|
139 chip 1.1
|
140 kumpf 1.15 ProviderName _resolveProviderName(const ProviderIdContainer & providerId);
|
141 carolann.graves 1.26
142 /**
143 Calls the provider's enableIndications() method, if the provider
144 version supports enableIndications().
145
146 Note that since an exception thrown by the provider's
147 enableIndications() method is considered a provider error, any such
148 exception is ignored, and no exceptions are thrown by this method.
149
150 @param req_provider CIMInstance for the provider to be enabled
|
151 a.dunfey 1.28.8.2 @param _indicationCallback PEGASUS_INDICATION_CALLBACK_T for
152 indications
|
153 carolann.graves 1.26 @param ph OpProviderHolder for the provider to be enabled
154 */
155 void _callEnableIndications
156 (CIMInstance & req_provider,
|
157 a.dunfey 1.28.8.2 PEGASUS_INDICATION_CALLBACK_T _indicationCallback,
|
158 carolann.graves 1.26 CMPIProvider::OpProviderHolder & ph);
159
160 /**
161 Calls the provider's disableIndications() method, if the provider
162 version supports disableIndications().
163
164 @param ph OpProviderHolder for the provider to be enabled
165 */
166 void _callDisableIndications
167 (CMPIProvider::OpProviderHolder & ph);
|
168 konrad.r 1.28
169
|
170 chip 1.1 };
171
172 PEGASUS_NAMESPACE_END
173
174 #endif
|