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: Loads widget factory plugin |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef I_ALFWIDGETFACTORYLOADER_H |
|
21 #define I_ALFWIDGETFACTORYLOADER_H |
|
22 |
|
23 #include <osn/osndefines.h> |
|
24 #include <memory> |
|
25 |
|
26 using namespace std; |
|
27 |
|
28 class CAlfEnv; |
|
29 |
|
30 namespace Alf |
|
31 { |
|
32 class IAlfWidgetFactory; |
|
33 class AlfWidgetFactoryLoaderImpl; |
|
34 |
|
35 /** |
|
36 * @class AlfWidgetFactoryLoader alfwidgetfactoryloader.h "alf/alfwidgetfactoryloader.h" |
|
37 * |
|
38 * Factory plugin loader loads factory plugins. Loader will resolve factory |
|
39 * plugin based on given string and load factory which can create requested |
|
40 * product. Loader owns factory plugins. Factory products and their |
|
41 * derivatives must be destroyed before destroying a loader object. |
|
42 * |
|
43 * @lib alfwidgetutils.lib |
|
44 * @since S60 ?S60_version |
|
45 * @status Draft |
|
46 */ |
|
47 class AlfWidgetFactoryLoader |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * Constructor. |
|
53 * |
|
54 * @exception std::bad_alloc Thrown if out of memory during the construction. |
|
55 */ |
|
56 OSN_IMPORT AlfWidgetFactoryLoader(); |
|
57 |
|
58 /** |
|
59 * Destructor. |
|
60 */ |
|
61 OSN_IMPORT virtual ~AlfWidgetFactoryLoader(); |
|
62 |
|
63 public: |
|
64 |
|
65 /** |
|
66 * Loads a widget factory. |
|
67 * |
|
68 * @param aEnv Alfred Environment |
|
69 * @return Pointer to IAlfWidgetFactory or 0. |
|
70 * Ownership is not transferred to caller. |
|
71 */ |
|
72 OSN_IMPORT IAlfWidgetFactory* loadWidgetFactory(CAlfEnv& aEnv); |
|
73 |
|
74 private: |
|
75 |
|
76 /** |
|
77 * Copy Constructor |
|
78 */ |
|
79 AlfWidgetFactoryLoader( const AlfWidgetFactoryLoader& ); |
|
80 |
|
81 /** |
|
82 * Assignment Operator |
|
83 */ |
|
84 AlfWidgetFactoryLoader& operator=( const AlfWidgetFactoryLoader& ); |
|
85 |
|
86 private: // Data |
|
87 auto_ptr<AlfWidgetFactoryLoaderImpl> mImpl; |
|
88 }; |
|
89 } |
|
90 |
|
91 #endif |
|
92 |
|
93 // End of File |
|