(file) Return to CMPILocalProviderManager.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ProviderManager2 / CMPI

  1 karl  1.8 //%2005////////////////////////////////////////////////////////////////////////
  2 schuur 1.1 //
  3 karl   1.7 // 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.8 // 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.7 // 
 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 dj.gorey 1.2 //              Dan Gorey, IBM djgorey@us.ibm.com
 37 schuur   1.1 //
 38              //%/////////////////////////////////////////////////////////////////////////////
 39              
 40              #ifndef Pegasus_CMPILocalProviderManager_h
 41              #define Pegasus_CMPILocalProviderManager_h
 42              
 43              #include <Pegasus/Common/Config.h>
 44              #include <Pegasus/Common/String.h>
 45              #include <Pegasus/Common/IPC.h>
 46              #include <Pegasus/Common/DQueue.h>
 47              #include <Pegasus/Common/HashTable.h>
 48              
 49              #include <Pegasus/ProviderManager2/CMPI/CMPIProvider.h>
 50              #include <Pegasus/ProviderManager2/CMPI/CMPIResolverModule.h>
 51              
 52              #include <Pegasus/ProviderManager2/Lockable.h>
 53              
 54 schuur   1.4 #include <Pegasus/ProviderManager2/CMPI/Linkage.h>
 55 schuur   1.1 
 56              PEGASUS_NAMESPACE_BEGIN
 57              
 58 schuur   1.4 class PEGASUS_CMPIPM_LINKAGE CMPILocalProviderManager
 59 schuur   1.1 {
 60              
 61              public:
 62                  CMPILocalProviderManager(void);
 63                  virtual ~CMPILocalProviderManager(void);
 64              
 65              public:
 66 schuur   1.6     CMPIProvider::OpProviderHolder getProvider(const String & fileName, const String & providerName);
 67                       
 68                  CMPIProvider::OpProviderHolder getRemoteProvider(const String & fileName, const String & providerName);
 69 schuur   1.1 
 70                  void unloadProvider(const String & fileName, const String & providerName);
 71              
 72                  void shutdownAllProviders(void);
 73              
 74 kumpf    1.5     Boolean hasActiveProviders();
 75                  void unloadIdleProviders();
 76 schuur   1.1 
 77 carolann.graves 1.9     /**
 78                              Gets list of indication providers to be enabled.
 79                              Once IndicationService initialization has been completed, the
 80                              enableIndications() method must be called on each indication provider
 81                              that has current subscriptions.
 82                     
 83                              @return list of providers whose enableIndications() method must be
 84                                      called
 85                          */
 86                         Array <CMPIProvider *> getIndicationProvidersToEnable ();
 87                     
 88 schuur          1.1 private:
 89                         enum CTRL
 90                         {
 91                             INSERT_PROVIDER,
 92                             INSERT_MODULE,
 93                             LOOKUP_PROVIDER,
 94                             LOOKUP_MODULE,
 95                             GET_PROVIDER,
 96                             UNLOAD_PROVIDER,
 97                             UNLOAD_ALL_PROVIDERS,
 98 schuur          1.3         UNLOAD_IDLE_PROVIDERS
 99 schuur          1.1     };
100                     
101                         typedef HashTable<String, CMPIProvider *,
102                             EqualFunc<String>,  HashFunc<String> > ResolverTable;
103                     
104                         typedef HashTable<String, CMPIProvider *,
105                             EqualFunc<String>,  HashFunc<String> > ProviderTable;
106                     
107                         typedef HashTable<String, CMPIProviderModule *,
108                             EqualFunc<String>, HashFunc<String> > ModuleTable;
109                     
110                         typedef struct
111                         {
112                             const String *providerName;
113                             const String *fileName;
114 schuur          1.6         const String *location;
115 schuur          1.1     } CTRL_STRINGS;
116                     
117                         friend class ProviderManagerService;
118                     
119                         ResolverTable _resolvers;
120                         ProviderTable _providers;
121                         ModuleTable _modules;
122                         Uint32 _idle_timeout;
123                         Sint32 _provider_ctrl(CTRL code, void *parm, void *ret);
124                     
125 dj.gorey        1.2     CMPIProvider* _initProvider(CMPIProvider * provider,
126 schuur          1.6                             const String & moduleFileName); 
127 dj.gorey        1.2 
128                         void _unloadProvider(CMPIProvider * provider);
129                     
130                         CMPIProvider * _lookupProvider(const String & providerName);
131                     
132 schuur          1.6     CMPIProviderModule * _lookupModule(const String & moduleFileName);
133 dj.gorey        1.2     Mutex _providerTableMutex;
134                                                         
135                         
136 schuur          1.1 protected:
137                     
138                     };
139                     
140                     PEGASUS_NAMESPACE_END
141                     
142                     #endif
143                     

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2