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 //%/////////////////////////////////////////////////////////////////////////////
33
34 #ifndef Pegasus_JMPILocalProviderManager_h
35 #define Pegasus_JMPILocalProviderManager_h
36
37 #include <Pegasus/Common/Config.h>
38 #include <Pegasus/Common/String.h>
39 #include <Pegasus/Common/HashTable.h>
40
41 #include <Pegasus/ProviderManager2/JMPI/JMPIProvider.h>
|
42 mark.hamzy 1.14 #include <Pegasus/ProviderManager2/JMPI/Linkage.h>
|
43 schuur 1.1
44 PEGASUS_NAMESPACE_BEGIN
45
|
46 mark.hamzy 1.14 class PEGASUS_JMPIPM_LINKAGE JMPILocalProviderManager
|
47 schuur 1.1 {
48
49 public:
50 JMPILocalProviderManager(void);
51 virtual ~JMPILocalProviderManager(void);
52
53 public:
54 JMPIProvider::OpProviderHolder getProvider(const String & fileName, const String & providerName,
55 const String & interfaceName = String::EMPTY);
56
57 void unloadProvider(const String & fileName, const String & providerName);
58
59 void shutdownAllProviders(void);
60
|
61 kumpf 1.2 Boolean hasActiveProviders();
62 void unloadIdleProviders();
|
63 schuur 1.1
|
64 carolann.graves 1.5 /**
65 Gets list of indication providers to be enabled.
66 Once IndicationService initialization has been completed, the
67 enableIndications() method must be called on each indication provider
68 that has current subscriptions.
69
70 @return list of providers whose enableIndications() method must be
71 called
72 */
73 Array <JMPIProvider *> getIndicationProvidersToEnable ();
74
|
75 schuur 1.1 private:
76 enum CTRL
77 {
78 INSERT_PROVIDER,
79 INSERT_MODULE,
80 REMOVE_PROVIDER,
81 REMOVE_MODULE,
82 LOOKUP_PROVIDER,
83 LOOKUP_MODULE,
84 GET_PROVIDER,
85 UNLOAD_PROVIDER,
86 UNLOAD_ALL_PROVIDERS,
87 UNLOAD_IDLE_PROVIDERS,
88 UNLOAD_IDLE_MODULES
89 };
90
91 typedef HashTable<String, JMPIProvider *,
92 EqualFunc<String>, HashFunc<String> > ResolverTable;
93
94 typedef HashTable<String, JMPIProvider *,
95 EqualFunc<String>, HashFunc<String> > ProviderTable;
96 schuur 1.1
97 typedef HashTable<String, JMPIProviderModule *,
98 EqualFunc<String>, HashFunc<String> > ModuleTable;
99
100 typedef struct
101 {
102 const String *providerName;
103 const String *fileName;
104 const String *interfaceName;
105 } CTRL_STRINGS;
106
107 ResolverTable _resolvers;
108 ProviderTable _providers;
109 ModuleTable _modules;
110 Uint32 _idle_timeout;
111
112 JMPIProvider *_getResolver(const String & fileName, const String & interfaceType);
113 Sint32 _provider_ctrl(CTRL code, void *parm, void *ret);
114
|
115 mark.hamzy 1.7 Mutex _providerTableMutex;
116
117 static int trace;
|
118 schuur 1.1 protected:
119
120 };
121
122 PEGASUS_NAMESPACE_END
123
124 #endif
125
|