sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
*
|
sl@0
|
16 |
*/
|
sl@0
|
17 |
|
sl@0
|
18 |
|
sl@0
|
19 |
#include <caf/caf.h>
|
sl@0
|
20 |
#include <caf/cafpanic.h>
|
sl@0
|
21 |
#include "f32agentfactory.h"
|
sl@0
|
22 |
#include "f32agentcontent.h"
|
sl@0
|
23 |
#include "f32agentdata.h"
|
sl@0
|
24 |
#include "f32agentmanager.h"
|
sl@0
|
25 |
|
sl@0
|
26 |
|
sl@0
|
27 |
using namespace ContentAccess;
|
sl@0
|
28 |
|
sl@0
|
29 |
CAgentFactory* CF32AgentFactory::NewL()
|
sl@0
|
30 |
{
|
sl@0
|
31 |
return new (ELeave) CF32AgentFactory();
|
sl@0
|
32 |
}
|
sl@0
|
33 |
|
sl@0
|
34 |
CAgentContent* CF32AgentFactory::CreateContentBrowserL(const TDesC& aURI, TContentShareMode aShareMode)
|
sl@0
|
35 |
{
|
sl@0
|
36 |
return CF32AgentContent::NewL(aURI, aShareMode);
|
sl@0
|
37 |
}
|
sl@0
|
38 |
|
sl@0
|
39 |
CAgentContent* CF32AgentFactory::CreateContentBrowserL(RFile& aFile)
|
sl@0
|
40 |
{
|
sl@0
|
41 |
return CF32AgentContent::NewL(aFile);
|
sl@0
|
42 |
}
|
sl@0
|
43 |
|
sl@0
|
44 |
CAgentData* CF32AgentFactory::CreateDataConsumerL(const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode)
|
sl@0
|
45 |
{
|
sl@0
|
46 |
return CF32AgentData::NewL(aVirtualPath, aShareMode);
|
sl@0
|
47 |
}
|
sl@0
|
48 |
|
sl@0
|
49 |
CAgentData* CF32AgentFactory::CreateDataConsumerL(RFile& aFile, const TDesC& aUniqueId)
|
sl@0
|
50 |
{
|
sl@0
|
51 |
return CF32AgentData::NewL(aFile, aUniqueId);
|
sl@0
|
52 |
}
|
sl@0
|
53 |
|
sl@0
|
54 |
CAgentManager* CF32AgentFactory::CreateManagerL()
|
sl@0
|
55 |
{
|
sl@0
|
56 |
return CF32AgentManager::NewL();
|
sl@0
|
57 |
}
|
sl@0
|
58 |
|
sl@0
|
59 |
CAgentImportFile* CF32AgentFactory::CreateImporterL(const TDesC8& /* aMimeType */, const CMetaDataArray& /* aArray */, const TDesC& /*aOutputDirectory*/, const TDesC& /* aSuggestedFileName*/)
|
sl@0
|
60 |
{
|
sl@0
|
61 |
// The F32 agent is not used to import files and the code should never
|
sl@0
|
62 |
// reach this point
|
sl@0
|
63 |
User::Panic(KCafPanicString, ECafPanicF32AgentImportNotSupported);
|
sl@0
|
64 |
return NULL;
|
sl@0
|
65 |
}
|
sl@0
|
66 |
|
sl@0
|
67 |
CAgentImportFile* CF32AgentFactory::CreateImporterL(const TDesC8& /*aMimeType*/, const CMetaDataArray& /*aMetaDataArray*/)
|
sl@0
|
68 |
{
|
sl@0
|
69 |
// The F32 agent is not used to import files and the code should never
|
sl@0
|
70 |
// reach this point
|
sl@0
|
71 |
User::Panic(KCafPanicString, ECafPanicF32AgentImportNotSupported);
|
sl@0
|
72 |
return NULL;
|
sl@0
|
73 |
}
|
sl@0
|
74 |
|
sl@0
|
75 |
CAgentRightsManager* CF32AgentFactory::CreateRightsManagerL()
|
sl@0
|
76 |
{
|
sl@0
|
77 |
// The F32 agent does not manage any rights or access control to files
|
sl@0
|
78 |
// The code should never reach this point
|
sl@0
|
79 |
User::Panic(KCafPanicString, ECafPanicF32AgentRightManagerNotSupported);
|
sl@0
|
80 |
return NULL;
|
sl@0
|
81 |
}
|
sl@0
|
82 |
|
sl@0
|
83 |
#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
|
sl@0
|
84 |
CAgentData* CF32AgentFactory::CreateDataConsumerL(const TDesC8& aHeaderData)
|
sl@0
|
85 |
{
|
sl@0
|
86 |
return CF32AgentData::NewL(aHeaderData);
|
sl@0
|
87 |
}
|
sl@0
|
88 |
|
sl@0
|
89 |
CAgentContent* CF32AgentFactory::CreateContentBrowserL(const TDesC8& aHeaderData)
|
sl@0
|
90 |
{
|
sl@0
|
91 |
return CF32AgentContent::NewL(aHeaderData);
|
sl@0
|
92 |
}
|
sl@0
|
93 |
#endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
|