1 karl 1.6 //%2005////////////////////////////////////////////////////////////////////////
|
2 chip 1.1 //
|
3 karl 1.5 // 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 karl 1.3 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.5 // 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.6 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 chip 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.5 //
|
19 chip 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 kumpf 1.7 // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
|
33 chip 1.1 //
34 //%/////////////////////////////////////////////////////////////////////////////
35
36 #include "ProviderManagerModule.h"
37
38 PEGASUS_NAMESPACE_BEGIN
39
|
40 kumpf 1.7 ProviderManagerModule::ProviderManagerModule()
41 : DynamicLibrary(),
42 _createProviderManager(0)
|
43 chip 1.2 {
44 }
45
|
46 kumpf 1.7 ProviderManagerModule::ProviderManagerModule(
47 const ProviderManagerModule& module)
48 : DynamicLibrary(module),
49 _createProviderManager(module._createProviderManager)
|
50 chip 1.4 {
51 }
52
|
53 kumpf 1.7 ProviderManagerModule::ProviderManagerModule(
54 const String& fileName)
55 : DynamicLibrary(fileName),
56 _createProviderManager(0)
|
57 chip 1.1 {
58 }
59
|
60 kumpf 1.7 ProviderManagerModule::~ProviderManagerModule()
|
61 chip 1.1 {
62 }
63
|
64 kumpf 1.7 ProviderManagerModule& ProviderManagerModule::operator=(
65 const ProviderManagerModule& module)
|
66 chip 1.1 {
|
67 kumpf 1.7 if (this == &module)
|
68 chip 1.4 {
69 return(*this);
70 }
|
71 chip 1.1
|
72 chip 1.4 DynamicLibrary::operator=(module);
|
73 chip 1.1
|
74 kumpf 1.7 _createProviderManager = module._createProviderManager;
75
|
76 chip 1.4 return(*this);
77 }
78
|
79 kumpf 1.7 Boolean ProviderManagerModule::load()
|
80 chip 1.4 {
|
81 kumpf 1.7 if (DynamicLibrary::load())
|
82 chip 1.1 {
|
83 chip 1.4 // export entry points
|
84 kumpf 1.7 _createProviderManager = (CREATE_PROVIDER_MANAGER_FUNCTION)
85 getSymbol("PegasusCreateProviderManager");
|
86 chip 1.4
|
87 kumpf 1.7 if (_createProviderManager != 0)
|
88 chip 1.4 {
89 return(true);
90 }
|
91 chip 1.1
|
92 chip 1.4 DynamicLibrary::unload();
|
93 chip 1.1 }
94
|
95 chip 1.4 return(false);
96 }
97
|
98 kumpf 1.7 Boolean ProviderManagerModule::unload()
|
99 chip 1.4 {
100 return(DynamicLibrary::unload());
|
101 chip 1.1 }
102
|
103 kumpf 1.7 ProviderManager* ProviderManagerModule::getProviderManager(
104 const String& s) const
|
105 chip 1.1 {
|
106 kumpf 1.7 if (!isLoaded())
107 {
108 return(0);
109 }
110
|
111 chip 1.1 return(_createProviderManager(s));
112 }
113
114 PEGASUS_NAMESPACE_END
|