|
1 /* |
|
2 * Copyright (c) 2002-2009 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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <caf/caf.h> |
|
22 #include "oma2agentfactory.h" |
|
23 |
|
24 using namespace ContentAccess; |
|
25 |
|
26 // EXTERNAL DATA STRUCTURES |
|
27 //extern ?external_data; |
|
28 |
|
29 // EXTERNAL FUNCTION PROTOTYPES |
|
30 //extern ?external_function( ?arg_type,?arg_type ); |
|
31 |
|
32 // CONSTANTS |
|
33 //const ?type ?constant_var = ?constant; |
|
34 |
|
35 // MACROS |
|
36 //#define ?macro ?macro_def |
|
37 |
|
38 // LOCAL CONSTANTS AND MACROS |
|
39 //const ?type ?constant_var = ?constant; |
|
40 //#define ?macro_name ?macro_def |
|
41 |
|
42 // MODULE DATA STRUCTURES |
|
43 //enum ?declaration |
|
44 //typedef ?declaration |
|
45 |
|
46 // LOCAL FUNCTION PROTOTYPES |
|
47 //?type ?function_name( ?arg_type, ?arg_type ); |
|
48 |
|
49 // FORWARD DECLARATIONS |
|
50 //class ?FORWARD_CLASSNAME; |
|
51 |
|
52 // ============================= LOCAL FUNCTIONS =============================== |
|
53 |
|
54 // ----------------------------------------------------------------------------- |
|
55 // ?function_name ?description. |
|
56 // ?description |
|
57 // Returns: ?value_1: ?description |
|
58 // ?value_n: ?description_line1 |
|
59 // ?description_line2 |
|
60 // ----------------------------------------------------------------------------- |
|
61 // |
|
62 /* |
|
63 ?type ?function_name( |
|
64 ?arg_type arg, // ?description |
|
65 ?arg_type arg) // ?description |
|
66 { |
|
67 |
|
68 ?code // ?comment |
|
69 |
|
70 // ?comment |
|
71 ?code |
|
72 } |
|
73 */ |
|
74 |
|
75 // ============================ MEMBER FUNCTIONS =============================== |
|
76 |
|
77 // ----------------------------------------------------------------------------- |
|
78 // COma2AgentFactory::COma2AgentFactory |
|
79 // C++ default constructor can NOT contain any code, that |
|
80 // might leave. |
|
81 // ----------------------------------------------------------------------------- |
|
82 // |
|
83 COma2AgentFactory::COma2AgentFactory() |
|
84 { |
|
85 } |
|
86 |
|
87 // ----------------------------------------------------------------------------- |
|
88 // COma2AgentFactory::ConstructL |
|
89 // Symbian 2nd phase constructor can leave. |
|
90 // ----------------------------------------------------------------------------- |
|
91 // |
|
92 void COma2AgentFactory::ConstructL() |
|
93 { |
|
94 } |
|
95 |
|
96 // ----------------------------------------------------------------------------- |
|
97 // COma2AgentFactory::NewL |
|
98 // Two-phased constructor. |
|
99 // ----------------------------------------------------------------------------- |
|
100 // |
|
101 COma2AgentFactory* COma2AgentFactory::NewL() |
|
102 { |
|
103 COma2AgentFactory* self = new( ELeave ) COma2AgentFactory; |
|
104 |
|
105 CleanupStack::PushL( self ); |
|
106 self->ConstructL(); |
|
107 CleanupStack::Pop(); |
|
108 |
|
109 return self; |
|
110 } |
|
111 |
|
112 |
|
113 // Destructor |
|
114 COma2AgentFactory::~COma2AgentFactory() |
|
115 { |
|
116 } |
|
117 |
|
118 |
|
119 // ----------------------------------------------------------------------------- |
|
120 // COma2AgentFactory::?member_function |
|
121 // ?implementation_description |
|
122 // (other items were commented in a header). |
|
123 // ----------------------------------------------------------------------------- |
|
124 // |
|
125 CAgentContent* COma2AgentFactory::CreateContentBrowserL(const TDesC& aURI, TContentShareMode aShareMode) |
|
126 { |
|
127 return COma2AgentContent::NewL(aURI, aShareMode); |
|
128 } |
|
129 |
|
130 CAgentContent* COma2AgentFactory::CreateContentBrowserL(RFile& aFile) |
|
131 { |
|
132 return COma2AgentContent::NewL(aFile); |
|
133 } |
|
134 |
|
135 CAgentData* COma2AgentFactory::CreateDataConsumerL(const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode) |
|
136 { |
|
137 return COma2AgentData::NewL(aVirtualPath, aShareMode); |
|
138 } |
|
139 |
|
140 CAgentData* COma2AgentFactory::CreateDataConsumerL(RFile& aFile, const TDesC& aUniqueId) |
|
141 { |
|
142 return COma2AgentData::NewL(aFile, aUniqueId); |
|
143 } |
|
144 |
|
145 CAgentManager* COma2AgentFactory::CreateManagerL() |
|
146 { |
|
147 return COma2AgentManager::NewL(); |
|
148 } |
|
149 |
|
150 CAgentImportFile* COma2AgentFactory::CreateImporterL(const TDesC8& aMimeType, const CMetaDataArray& aMetaDataArray, const TDesC& aOutputDirectory, const TDesC& aSuggestedFileName) |
|
151 { |
|
152 return COma2AgentImportFile::NewL(aMimeType, aMetaDataArray, aOutputDirectory, aSuggestedFileName); |
|
153 } |
|
154 |
|
155 CAgentImportFile* COma2AgentFactory::CreateImporterL(const TDesC8& aMimeType, const CMetaDataArray& aMetaDataArray) |
|
156 { |
|
157 return COma2AgentImportFile::NewL(aMimeType, aMetaDataArray); |
|
158 } |
|
159 |
|
160 CAgentRightsManager* COma2AgentFactory::CreateRightsManagerL() |
|
161 { |
|
162 return COma2AgentRightsManager::NewL(); |
|
163 } |
|
164 |