sl@0: /* sl@0: * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: #include sl@0: #include sl@0: #include "f32agentfactory.h" sl@0: #include "f32agentcontent.h" sl@0: #include "f32agentdata.h" sl@0: #include "f32agentmanager.h" sl@0: sl@0: sl@0: using namespace ContentAccess; sl@0: sl@0: CAgentFactory* CF32AgentFactory::NewL() sl@0: { sl@0: return new (ELeave) CF32AgentFactory(); sl@0: } sl@0: sl@0: CAgentContent* CF32AgentFactory::CreateContentBrowserL(const TDesC& aURI, TContentShareMode aShareMode) sl@0: { sl@0: return CF32AgentContent::NewL(aURI, aShareMode); sl@0: } sl@0: sl@0: CAgentContent* CF32AgentFactory::CreateContentBrowserL(RFile& aFile) sl@0: { sl@0: return CF32AgentContent::NewL(aFile); sl@0: } sl@0: sl@0: CAgentData* CF32AgentFactory::CreateDataConsumerL(const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode) sl@0: { sl@0: return CF32AgentData::NewL(aVirtualPath, aShareMode); sl@0: } sl@0: sl@0: CAgentData* CF32AgentFactory::CreateDataConsumerL(RFile& aFile, const TDesC& aUniqueId) sl@0: { sl@0: return CF32AgentData::NewL(aFile, aUniqueId); sl@0: } sl@0: sl@0: CAgentManager* CF32AgentFactory::CreateManagerL() sl@0: { sl@0: return CF32AgentManager::NewL(); sl@0: } sl@0: sl@0: CAgentImportFile* CF32AgentFactory::CreateImporterL(const TDesC8& /* aMimeType */, const CMetaDataArray& /* aArray */, const TDesC& /*aOutputDirectory*/, const TDesC& /* aSuggestedFileName*/) sl@0: { sl@0: // The F32 agent is not used to import files and the code should never sl@0: // reach this point sl@0: User::Panic(KCafPanicString, ECafPanicF32AgentImportNotSupported); sl@0: return NULL; sl@0: } sl@0: sl@0: CAgentImportFile* CF32AgentFactory::CreateImporterL(const TDesC8& /*aMimeType*/, const CMetaDataArray& /*aMetaDataArray*/) sl@0: { sl@0: // The F32 agent is not used to import files and the code should never sl@0: // reach this point sl@0: User::Panic(KCafPanicString, ECafPanicF32AgentImportNotSupported); sl@0: return NULL; sl@0: } sl@0: sl@0: CAgentRightsManager* CF32AgentFactory::CreateRightsManagerL() sl@0: { sl@0: // The F32 agent does not manage any rights or access control to files sl@0: // The code should never reach this point sl@0: User::Panic(KCafPanicString, ECafPanicF32AgentRightManagerNotSupported); sl@0: return NULL; sl@0: } sl@0: sl@0: #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT sl@0: CAgentData* CF32AgentFactory::CreateDataConsumerL(const TDesC8& aHeaderData) sl@0: { sl@0: return CF32AgentData::NewL(aHeaderData); sl@0: } sl@0: sl@0: CAgentContent* CF32AgentFactory::CreateContentBrowserL(const TDesC8& aHeaderData) sl@0: { sl@0: return CF32AgentContent::NewL(aHeaderData); sl@0: } sl@0: #endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT