1 dj.gorey 1.14 //%2003////////////////////////////////////////////////////////////////////////
|
2 chip 1.1 //
|
3 karl 1.2 // 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 // IBM Corp.; EMC Corporation, The Open Group.
|
7 chip 1.1 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to
10 // deal in the Software without restriction, including without limitation the
11 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12 // sell copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
|
14 schuur 1.3 //
|
15 chip 1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
16 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
17 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
18 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
19 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 //
24 //==============================================================================
25 //
|
26 schuur 1.3 // Author: Adrian Schuur, schuur@de.ibm.com
|
27 chip 1.1 //
|
28 dj.gorey 1.12 // Modified By:
|
29 chip 1.1 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #ifndef Pegasus_CMPIProviderManager_h
33 #define Pegasus_CMPIProviderManager_h
34
35 #include <Pegasus/Common/Config.h>
|
36 schuur 1.3 #include <Pegasus/Common/HashTable.h>
37 #include <Pegasus/ProviderManager2/ProviderName.h>
|
38 chip 1.1 #include <Pegasus/ProviderManager2/ProviderManager.h>
|
39 kumpf 1.15 #include <Pegasus/Common/OperationContextInternal.h>
|
40 schuur 1.20 #include <Pegasus/Repository/CIMRepository.h>
|
41 schuur 1.7
|
42 schuur 1.3 #include <Pegasus/Config/ConfigManager.h>
|
43 schuur 1.8 #include <Pegasus/ProviderManager2/OperationResponseHandler.h>
|
44 chip 1.1
|
45 kumpf 1.18 #include <Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.h>
|
46 schuur 1.7 #include <Pegasus/ProviderManager2/CMPI/Linkage.h>
47
|
48 chip 1.1 PEGASUS_NAMESPACE_BEGIN
49
|
50 schuur 1.4 struct CMPI_SelectExp;
|
51 schuur 1.3
|
52 schuur 1.7 class PEGASUS_CMPIPM_LINKAGE CMPIProviderManager : public ProviderManager
|
53 chip 1.1 {
54 public:
|
55 dj.gorey 1.12 enum Mode {
|
56 schuur 1.3 CMPI_MODE,
57 CMPI_R_MODE,
58 CMPI_O_MODE
59 };
60
61 Mode getMode() { return mode; }
62 CMPIProviderManager(Mode=CMPI_MODE);
|
63 chip 1.1 virtual ~CMPIProviderManager(void);
|
64 dj.gorey 1.12
65 virtual Boolean insertProvider(const ProviderName & providerName,
|
66 schuur 1.3 const String &ns, const String &cn);
|
67 dj.gorey 1.12
|
68 dj.gorey 1.14 virtual Message * processMessage(Message * request);
|
69 chip 1.1
|
70 kumpf 1.18 virtual Boolean hasActiveProviders();
71 virtual void unloadIdleProviders();
|
72 dj.gorey 1.12
|
73 schuur 1.21 virtual Boolean supportsRemoteNameSpaces() { return true; }
74
|
75 schuur 1.3 struct indProvRecord {
76 indProvRecord() : enabled(false), count(1), handler(NULL) {}
77 Boolean enabled;
78 int count;
79 EnableIndicationsResponseHandler* handler;
80 };
81
82 struct indSelectRecord {
83 indSelectRecord() : eSelx(NULL) {}
84 CMPI_SelectExp *eSelx;
85 };
86
87 typedef HashTable<String,indProvRecord*, EqualFunc<String>,HashFunc<String> > IndProvTab;
88 typedef HashTable<String,indSelectRecord*,EqualFunc<String>,HashFunc<String> > IndSelectTab;
89 typedef HashTable<String,ProviderName,EqualFunc<String>,HashFunc<String> > ProvRegistrar;
90
91 static IndProvTab provTab;
92 static IndSelectTab selxTab;
93 static ProvRegistrar provReg;
|
94 dj.gorey 1.12
|
95 schuur 1.3 protected:
|
96 kumpf 1.18 CMPILocalProviderManager providerManager;
97
|
98 schuur 1.3 Mode mode;
|
99 schuur 1.20 CIMRepository *_repository;
|
100 schuur 1.3
|
101 dj.gorey 1.14 Message * handleUnsupportedRequest(const Message * message);
|
102 schuur 1.3
|
103 dj.gorey 1.14 Message * handleGetInstanceRequest(const Message * message);
104 Message * handleEnumerateInstancesRequest(const Message * message);
105 Message * handleEnumerateInstanceNamesRequest(const Message * message);
106 Message * handleCreateInstanceRequest(const Message * message);
107 Message * handleModifyInstanceRequest(const Message * message);
108 Message * handleDeleteInstanceRequest(const Message * message);
109
110 Message * handleExecQueryRequest(const Message * message);
111
112 Message * handleAssociatorsRequest(const Message * message);
113 Message * handleAssociatorNamesRequest(const Message * message);
114 Message * handleReferencesRequest(const Message * message);
115 Message * handleReferenceNamesRequest(const Message * message);
|
116 schuur 1.3 /*
|
117 dj.gorey 1.14 Message * handleGetPropertyRequest(const Message * message);
118 Message * handleSetPropertyRequest(const Message * message);
|
119 schuur 1.3 */
|
120 dj.gorey 1.14 Message * handleInvokeMethodRequest(const Message * message);
|
121 schuur 1.3
|
122 dj.gorey 1.14 Message * handleCreateSubscriptionRequest(const Message * message);
123 // Message * handleModifySubscriptionRequest(const Message * message);
124 Message * handleDeleteSubscriptionRequest(const Message * message);
125 Message * handleEnableIndicationsRequest(const Message * message);
126 Message * handleDisableIndicationsRequest(const Message * message);
|
127 schuur 1.3
128 // Not supported by CMPI
|
129 kumpf 1.19 // Message * handleExportIndicationRequest(const Message * message);
|
130 schuur 1.3
|
131 dj.gorey 1.14 Message * handleDisableModuleRequest(const Message * message);
132 Message * handleEnableModuleRequest(const Message * message);
133 Message * handleStopAllProvidersRequest(const Message * message);
|
134 kumpf 1.16 Message * handleInitializeProviderRequest(const Message * message);
|
135 chip 1.1
|
136 kumpf 1.15 ProviderName _resolveProviderName(const ProviderIdContainer & providerId);
|
137 chip 1.1 };
138
139 PEGASUS_NAMESPACE_END
140
141 #endif
|