1 karl 1.8 //%2006////////////////////////////////////////////////////////////////////////
|
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 karl 1.8 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 schuur 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.8 //
|
21 schuur 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: Chip Vincent (cvincent@us.ibm.com)
33 //
34 // Modified By: Yi Zhou, Hewlett-Packard Company(yi_zhou@hp.com)
35 // Jenny Yu, Hewlett-Packard Company(jenny_yu@hp.com)
36 // Mike Day, IBM (mdday@us.ibm.com)
37 // Adrian Schuur, schuur@de.ibm.com
38 //
39 //%/////////////////////////////////////////////////////////////////////////////
40
41 #ifndef Pegasus_JMPILocalProviderManager_h
42 schuur 1.1 #define Pegasus_JMPILocalProviderManager_h
43
44 #include <Pegasus/Common/Config.h>
45 #include <Pegasus/Common/String.h>
46 #include <Pegasus/Common/IPC.h>
47 #include <Pegasus/Common/HashTable.h>
48
49 #include <Pegasus/ProviderManager2/JMPI/JMPIProvider.h>
50 //#include <Pegasus/ProviderManager2/JMPI/JMPIResolverModule.h>
51
52 #include <Pegasus/ProviderManager2/Lockable.h>
53
54 #include <Pegasus/Server/Linkage.h>
55
56 PEGASUS_NAMESPACE_BEGIN
57
58 class PEGASUS_SERVER_LINKAGE JMPILocalProviderManager
59 {
60
61 public:
62 JMPILocalProviderManager(void);
63 schuur 1.1 virtual ~JMPILocalProviderManager(void);
64
65 public:
66 JMPIProvider::OpProviderHolder getProvider(const String & fileName, const String & providerName,
67 const String & interfaceName = String::EMPTY);
68
69 void unloadProvider(const String & fileName, const String & providerName);
70
71 void shutdownAllProviders(void);
72
|
73 kumpf 1.2 Boolean hasActiveProviders();
74 void unloadIdleProviders();
|
75 schuur 1.1
|
76 carolann.graves 1.5 /**
77 Gets list of indication providers to be enabled.
78 Once IndicationService initialization has been completed, the
79 enableIndications() method must be called on each indication provider
80 that has current subscriptions.
81
82 @return list of providers whose enableIndications() method must be
83 called
84 */
85 Array <JMPIProvider *> getIndicationProvidersToEnable ();
86
|
87 schuur 1.1 private:
88 enum CTRL
89 {
90 INSERT_PROVIDER,
91 INSERT_MODULE,
92 REMOVE_PROVIDER,
93 REMOVE_MODULE,
94 LOOKUP_PROVIDER,
95 LOOKUP_MODULE,
96 GET_PROVIDER,
97 UNLOAD_PROVIDER,
98 UNLOAD_ALL_PROVIDERS,
99 UNLOAD_IDLE_PROVIDERS,
100 UNLOAD_IDLE_MODULES
101 };
102
103 typedef HashTable<String, JMPIProvider *,
104 EqualFunc<String>, HashFunc<String> > ResolverTable;
105
106 typedef HashTable<String, JMPIProvider *,
107 EqualFunc<String>, HashFunc<String> > ProviderTable;
108 schuur 1.1
109 typedef HashTable<String, JMPIProviderModule *,
110 EqualFunc<String>, HashFunc<String> > ModuleTable;
111
112 typedef struct
113 {
114 const String *providerName;
115 const String *fileName;
116 const String *interfaceName;
117 } CTRL_STRINGS;
118
119 friend class ProviderManagerService;
120
121 ResolverTable _resolvers;
122 ProviderTable _providers;
123 ModuleTable _modules;
124 Uint32 _idle_timeout;
125
126 JMPIProvider *_getResolver(const String & fileName, const String & interfaceType);
127 // CMPIResolverModule *_loadResolver(const String & fileName);
128 Sint32 _provider_ctrl(CTRL code, void *parm, void *ret);
129 schuur 1.1
|
130 mark.hamzy 1.7 Mutex _providerTableMutex;
131
132 static int trace;
|
133 schuur 1.1 protected:
134
135 };
136
137 PEGASUS_NAMESPACE_END
138
139 #endif
140
|