1 karl 1.4 //%2005////////////////////////////////////////////////////////////////////////
|
2 schuur 1.1 //
|
3 karl 1.3 // 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 // 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.4 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 schuur 1.1 //
12 // Permission is hereby granted, free of charge, to any person obtaining a copy
13 // of this software and associated documentation files (the "Software"), to
14 // deal in the Software without restriction, including without limitation the
15 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
16 // sell copies of the Software, and to permit persons to whom the Software is
17 // furnished to do so, subject to the following conditions:
|
18 karl 1.3 //
|
19 schuur 1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
20 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
21 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
22 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
23 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
25 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //
28 //==============================================================================
29 //
30 // Author: Chip Vincent (cvincent@us.ibm.com)
31 //
32 // Modified By: Yi Zhou, Hewlett-Packard Company(yi_zhou@hp.com)
33 // Jenny Yu, Hewlett-Packard Company(jenny_yu@hp.com)
34 // Mike Day, IBM (mdday@us.ibm.com)
35 // Adrian Schuur, schuur@de.ibm.com
36 //
37 //%/////////////////////////////////////////////////////////////////////////////
38
39 #ifndef Pegasus_JMPILocalProviderManager_h
40 schuur 1.1 #define Pegasus_JMPILocalProviderManager_h
41
42 #include <Pegasus/Common/Config.h>
43 #include <Pegasus/Common/String.h>
44 #include <Pegasus/Common/IPC.h>
45 #include <Pegasus/Common/DQueue.h>
46 #include <Pegasus/Common/HashTable.h>
47
48 #include <Pegasus/ProviderManager2/JMPI/JMPIProvider.h>
49 //#include <Pegasus/ProviderManager2/JMPI/JMPIResolverModule.h>
50
51 #include <Pegasus/ProviderManager2/Lockable.h>
52
53 #include <Pegasus/Server/Linkage.h>
54
55 PEGASUS_NAMESPACE_BEGIN
56
57 class PEGASUS_SERVER_LINKAGE JMPILocalProviderManager
58 {
59
60 public:
61 schuur 1.1 JMPILocalProviderManager(void);
62 virtual ~JMPILocalProviderManager(void);
63
64 public:
65 JMPIProvider::OpProviderHolder getProvider(const String & fileName, const String & providerName,
66 const String & interfaceName = String::EMPTY);
67
68 void unloadProvider(const String & fileName, const String & providerName);
69
70 void shutdownAllProviders(void);
71
|
72 kumpf 1.2 Boolean hasActiveProviders();
73 void unloadIdleProviders();
|
74 schuur 1.1
|
75 carolann.graves 1.5 /**
76 Gets list of indication providers to be enabled.
77 Once IndicationService initialization has been completed, the
78 enableIndications() method must be called on each indication provider
79 that has current subscriptions.
80
81 @return list of providers whose enableIndications() method must be
82 called
83 */
84 Array <JMPIProvider *> getIndicationProvidersToEnable ();
85
|
86 schuur 1.1 private:
87 enum CTRL
88 {
89 INSERT_PROVIDER,
90 INSERT_MODULE,
91 REMOVE_PROVIDER,
92 REMOVE_MODULE,
93 LOOKUP_PROVIDER,
94 LOOKUP_MODULE,
95 GET_PROVIDER,
96 UNLOAD_PROVIDER,
97 UNLOAD_ALL_PROVIDERS,
98 UNLOAD_IDLE_PROVIDERS,
99 UNLOAD_IDLE_MODULES
100 };
101
102 typedef HashTable<String, JMPIProvider *,
103 EqualFunc<String>, HashFunc<String> > ResolverTable;
104
105 typedef HashTable<String, JMPIProvider *,
106 EqualFunc<String>, HashFunc<String> > ProviderTable;
107 schuur 1.1
108 typedef HashTable<String, JMPIProviderModule *,
109 EqualFunc<String>, HashFunc<String> > ModuleTable;
110
111 typedef struct
112 {
113 const String *providerName;
114 const String *fileName;
115 const String *interfaceName;
116 } CTRL_STRINGS;
117
118 friend class ProviderManagerService;
119
120 ResolverTable _resolvers;
121 ProviderTable _providers;
122 ModuleTable _modules;
123 Uint32 _idle_timeout;
124
125 JMPIProvider *_getResolver(const String & fileName, const String & interfaceType);
126 // CMPIResolverModule *_loadResolver(const String & fileName);
127 Sint32 _provider_ctrl(CTRL code, void *parm, void *ret);
128 schuur 1.1
|
129 konrad.r 1.6 Mutex _providerTableMutex;
|
130 schuur 1.1 protected:
131
132 };
133
134 PEGASUS_NAMESPACE_END
135
136 #endif
137
|