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

  1 schuur 1.1 //%2003////////////////////////////////////////////////////////////////////////
  2            //
  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            //
  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            //
 15            // 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 schuur 1.1 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 23            //
 24            //==============================================================================
 25            //
 26            // Author: Chip Vincent (cvincent@us.ibm.com)
 27            //
 28            // Modified By: Yi Zhou, Hewlett-Packard Company(yi_zhou@hp.com)
 29            //              Mike Day, IBM (mdday@us.ibm.com)
 30            //              Adrian Schuur, IBM (schuur@de.ibm.com)
 31            //
 32            //%/////////////////////////////////////////////////////////////////////////////
 33            
 34            #ifndef Pegasus_JMPIProviderModule_h
 35            #define Pegasus_JMPIProviderModule_h
 36            
 37            #include "JMPIImpl.h"
 38            
 39            #include <Pegasus/Common/Config.h>
 40            #include <Pegasus/Common/String.h>
 41            #include <Pegasus/Common/System.h>
 42            #include <Pegasus/Common/IPC.h>
 43 schuur 1.1 
 44            #include <Pegasus/Provider/CIMProvider.h>
 45            #include <Pegasus/ProviderManager2/JMPI/JMPIProvider.h>
 46            
 47            #include <Pegasus/Server/Linkage.h>
 48            
 49            PEGASUS_NAMESPACE_BEGIN
 50            
 51            // The JMPIProviderModule class represents the physical module, as defined by the
 52            // operation, that contains a provider. This class effectively encapsulates the
 53            // "physical" portion of a provider.
 54            
 55            
 56            class PEGASUS_SERVER_LINKAGE JMPIProviderModule
 57            {
 58            
 59                friend class JMPILocalProviderManager;
 60            
 61            public:
 62                virtual ~JMPIProviderModule(void);
 63                const String & getFileName(void) const;
 64 schuur 1.1     ProviderVector load(const String & providerName);
 65                void unloadModule(void);
 66            
 67            protected:
 68                String _fileName;
 69                String _className;
 70                String _interfaceName;
 71                AtomicInt _ref_count;
 72                DynamicLibraryHandle _library;
 73                Uint32 _refCount;
 74                void *jProviderClass;
 75                void *jProvider;
 76            
 77            private:
 78                JMPIProviderModule(const String & fileName, const String & interfaceName);
 79                const String & getProviderName(void) const;
 80                const String & getInterfaceName(void) const ;
 81                virtual CIMProvider * getProvider(void) const;
 82            
 83                String _providerName;
 84                CIMProvider * _provider;
 85 schuur 1.1 };
 86            
 87            inline const String & JMPIProviderModule::getFileName(void) const
 88            {
 89                return(_fileName);
 90            }
 91            
 92            inline const String & JMPIProviderModule::getInterfaceName(void) const
 93            {
 94                return(_interfaceName);
 95            }
 96            
 97            inline const String & JMPIProviderModule::getProviderName(void) const
 98            {
 99                return(_providerName);
100            }
101            
102            inline CIMProvider * JMPIProviderModule::getProvider(void) const
103            {
104                return(_provider);
105            }
106 schuur 1.1 
107            PEGASUS_NAMESPACE_END
108            
109            #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2