|
1 /* |
|
2 * Copyright (c) 2002-2006 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: Implementation for factory creating CXn3Newsticker-element |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "xntype.h" |
|
20 #include "xnnodepluginif.h" |
|
21 #include "xnproperty.h" |
|
22 #include <ecom/implementationproxy.h> |
|
23 |
|
24 #include "xnnewstickerfactory.h" |
|
25 #include "xnnewstickeradapter.h" |
|
26 #include <aisystemuids.hrh> |
|
27 |
|
28 // ============================ MEMBER FUNCTIONS =============================== |
|
29 |
|
30 // ----------------------------------------------------------------------------- |
|
31 // E32Dll implements the Symbian OS dll entry point |
|
32 // ----------------------------------------------------------------------------- |
|
33 // |
|
34 #ifndef EKA2 |
|
35 GLDEF_C TInt E32Dll(TDllReason) |
|
36 { |
|
37 return KErrNone; |
|
38 } |
|
39 #endif |
|
40 |
|
41 // ----------------------------------------------------------------------------- |
|
42 // CXnEikLabelFactory::MakeXnComponentL |
|
43 // Creates the Xuikon component for label control |
|
44 // ----------------------------------------------------------------------------- |
|
45 // |
|
46 MXnComponentFactory::TXnComponentFactoryResponse CXnNewstickerFactory::MakeXnComponentL( |
|
47 CXnNodePluginIf& aNode, CXnComponent*& aTargetComponent) |
|
48 { |
|
49 MXnComponentFactory::TXnComponentFactoryResponse retVal = |
|
50 MXnComponentFactory::EXnFactoryResponseComponentNotSupported; |
|
51 // Check that the given type of a control is parent (or ancestor) of this control |
|
52 if(aNode.Type()->Type() == XnPropertyNames::newsticker::KXnNewsticker) |
|
53 { |
|
54 CXnNewsticker* container = CXnNewsticker::NewL(); |
|
55 aTargetComponent = static_cast<CXnComponent*>(container); |
|
56 retVal = MXnComponentFactory::EXnFactoryResponseComponentConstructed; |
|
57 return retVal; |
|
58 } |
|
59 return retVal; |
|
60 } |
|
61 |
|
62 // ----------------------------------------------------------------------------- |
|
63 // CXnNewstickerFactory::MakeXnControlAdapterL |
|
64 // Creates the control adapter for label control |
|
65 // ----------------------------------------------------------------------------- |
|
66 // |
|
67 CXnControlAdapter* CXnNewstickerFactory::MakeXnControlAdapterL( |
|
68 CXnNodePluginIf& aNode, CXnControlAdapter* aParent) |
|
69 { |
|
70 return CXnNewstickerAdapter::NewL(aParent, aNode); |
|
71 } |
|
72 |
|
73 // ----------------------------------------------------------------------------- |
|
74 // CXnNewstickerFactory::NewL |
|
75 // Two-phased constructor. |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 CXnNewstickerFactory* CXnNewstickerFactory::NewL() |
|
79 { |
|
80 CXnNewstickerFactory* self = new(ELeave) CXnNewstickerFactory; |
|
81 CleanupStack::PushL(self); |
|
82 self->ConstructL(); |
|
83 CleanupStack::Pop(); |
|
84 return self; |
|
85 } |
|
86 |
|
87 // ----------------------------------------------------------------------------- |
|
88 // CXnNewstickerFactory::CXnNewstickerFactory |
|
89 // C++ default constructor can NOT contain any code, that |
|
90 // might leave. |
|
91 // ----------------------------------------------------------------------------- |
|
92 // |
|
93 CXnNewstickerFactory::CXnNewstickerFactory() |
|
94 { |
|
95 } |
|
96 |
|
97 // ----------------------------------------------------------------------------- |
|
98 // CXnNewstickerFactory::~CXnNewstickerFactory |
|
99 // Destructor. |
|
100 // ----------------------------------------------------------------------------- |
|
101 // |
|
102 CXnNewstickerFactory::~CXnNewstickerFactory() |
|
103 { |
|
104 } |
|
105 |
|
106 // ----------------------------------------------------------------------------- |
|
107 // CXnNewstickerFactory::ConstructL |
|
108 // Symbian 2nd phase constructor can leave. |
|
109 // ----------------------------------------------------------------------------- |
|
110 // |
|
111 void CXnNewstickerFactory::ConstructL() |
|
112 { |
|
113 } |
|
114 |
|
115 // Define the interface UIDs |
|
116 const TImplementationProxy ImplementationTable[] = |
|
117 { |
|
118 #ifdef __EABI__ |
|
119 IMPLEMENTATION_PROXY_ENTRY(AI3_UID_RENDERING_PLUGIN_NEWSTICKERFACTORY_IMPLEMENTATION, CXnNewstickerFactory::NewL) |
|
120 #else |
|
121 {{AI3_UID_RENDERING_PLUGIN_NEWSTICKERFACTORY_IMPLEMENTATION}, CXnNewstickerFactory::NewL} |
|
122 #endif |
|
123 }; |
|
124 |
|
125 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) |
|
126 { |
|
127 aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); |
|
128 return ImplementationTable; |
|
129 } |
|
130 |
|
131 // End of File |