|
1 /* |
|
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Factory plugin loader |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef ALFFACTORYPLUGINLOADER_H |
|
21 #define ALFFACTORYPLUGINLOADER_H |
|
22 |
|
23 #include <osn/osndefines.h> |
|
24 #include <memory> |
|
25 |
|
26 using namespace std; |
|
27 |
|
28 namespace Alf |
|
29 { |
|
30 class IAlfFactoryPlugin; |
|
31 class AlfFactoryPluginLoaderImpl; |
|
32 |
|
33 /** |
|
34 * @class AlfFactoryPluginLoader alffactorypluginloader.h "alf/alffactorypluginloader.h" |
|
35 * |
|
36 * Factory plugin loader loads factory plugins. Loader will resolve factory |
|
37 * plugin based on given string and load factory which can create requested |
|
38 * product. Loader owns factory plugins. Factory products and their |
|
39 * derivatives must be destroyed before destroying a loader object. |
|
40 * |
|
41 * @lib alfwidgetutils.lib |
|
42 * @since S60 ?S60_version |
|
43 * @status Draft |
|
44 */ |
|
45 class AlfFactoryPluginLoader |
|
46 { |
|
47 public: // Constructors and destructor |
|
48 |
|
49 /** |
|
50 * Constructor. |
|
51 * |
|
52 * @exception std::bad_alloc Thrown if out of memory during the |
|
53 * construction. |
|
54 */ |
|
55 OSN_IMPORT AlfFactoryPluginLoader(); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 OSN_IMPORT virtual ~AlfFactoryPluginLoader(); |
|
61 |
|
62 public: |
|
63 |
|
64 /** |
|
65 * Load a factory plugin. |
|
66 * |
|
67 * @param aFactoryProduct Factory plugin is loaded based on a given string |
|
68 * @since S60 5.0 |
|
69 * @return Pointer to IAlfFactoryPlugin or NULL. Ownership is not |
|
70 * transferred to caller. |
|
71 */ |
|
72 OSN_IMPORT IAlfFactoryPlugin* loadFactoryPlugin(const char* aFactoryProduct); |
|
73 |
|
74 private: |
|
75 /** |
|
76 * Copy Constructor |
|
77 */ |
|
78 AlfFactoryPluginLoader(const AlfFactoryPluginLoader&); |
|
79 |
|
80 /** |
|
81 * Assignment Operator |
|
82 */ |
|
83 AlfFactoryPluginLoader& operator=(const AlfFactoryPluginLoader&); |
|
84 |
|
85 private: // Data |
|
86 auto_ptr<AlfFactoryPluginLoaderImpl> mImpl; |
|
87 }; |
|
88 |
|
89 } // namespace Alf |
|
90 |
|
91 #endif |
|
92 |
|
93 // End of File |