os/security/contentmgmt/contentaccessfwfordrm/source/f32agent/f32agentfactory.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/contentmgmt/contentaccessfwfordrm/source/f32agent/f32agentfactory.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,93 @@
     1.4 +/*
     1.5 +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#include <caf/caf.h>
    1.23 +#include <caf/cafpanic.h>
    1.24 +#include "f32agentfactory.h"
    1.25 +#include "f32agentcontent.h"
    1.26 +#include "f32agentdata.h"
    1.27 +#include "f32agentmanager.h"
    1.28 +
    1.29 +
    1.30 +using namespace ContentAccess;
    1.31 +
    1.32 +CAgentFactory* CF32AgentFactory::NewL()
    1.33 +	{
    1.34 +	return new (ELeave) CF32AgentFactory();
    1.35 +	}
    1.36 +
    1.37 +CAgentContent* CF32AgentFactory::CreateContentBrowserL(const TDesC& aURI, TContentShareMode aShareMode)
    1.38 +	{
    1.39 +	return CF32AgentContent::NewL(aURI, aShareMode);
    1.40 +	}
    1.41 +
    1.42 +CAgentContent* CF32AgentFactory::CreateContentBrowserL(RFile& aFile)
    1.43 +	{
    1.44 +	return CF32AgentContent::NewL(aFile);
    1.45 +	}
    1.46 +
    1.47 +CAgentData* CF32AgentFactory::CreateDataConsumerL(const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode)
    1.48 +	{		
    1.49 +	return CF32AgentData::NewL(aVirtualPath, aShareMode);
    1.50 +	}
    1.51 +
    1.52 +CAgentData* CF32AgentFactory::CreateDataConsumerL(RFile& aFile, const TDesC& aUniqueId)
    1.53 +	{
    1.54 +	return CF32AgentData::NewL(aFile, aUniqueId);
    1.55 +	}
    1.56 +
    1.57 +CAgentManager*  CF32AgentFactory::CreateManagerL()
    1.58 +	{
    1.59 +	return CF32AgentManager::NewL();
    1.60 +	}
    1.61 +
    1.62 +CAgentImportFile* CF32AgentFactory::CreateImporterL(const TDesC8& /* aMimeType */, const CMetaDataArray& /* aArray */, const TDesC& /*aOutputDirectory*/, const TDesC& /* aSuggestedFileName*/)
    1.63 +	{
    1.64 +	// The F32 agent is not used to import files and the code should never
    1.65 +	// reach this point
    1.66 +	User::Panic(KCafPanicString, ECafPanicF32AgentImportNotSupported);
    1.67 +	return NULL;
    1.68 +	}
    1.69 +
    1.70 +CAgentImportFile* CF32AgentFactory::CreateImporterL(const TDesC8& /*aMimeType*/, const CMetaDataArray& /*aMetaDataArray*/)
    1.71 +	{
    1.72 +	// The F32 agent is not used to import files and the code should never
    1.73 +	// reach this point
    1.74 +	User::Panic(KCafPanicString, ECafPanicF32AgentImportNotSupported);
    1.75 +	return NULL;
    1.76 +	}
    1.77 +
    1.78 +CAgentRightsManager* CF32AgentFactory::CreateRightsManagerL()
    1.79 +	{
    1.80 +	// The F32 agent does not manage any rights or access control to files
    1.81 +	// The code should never reach this point
    1.82 +	User::Panic(KCafPanicString, ECafPanicF32AgentRightManagerNotSupported);
    1.83 +	return NULL;
    1.84 +	}
    1.85 +
    1.86 +#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
    1.87 +CAgentData* CF32AgentFactory::CreateDataConsumerL(const TDesC8& aHeaderData)
    1.88 +	{
    1.89 +	return CF32AgentData::NewL(aHeaderData);
    1.90 +	}
    1.91 +
    1.92 +CAgentContent* CF32AgentFactory::CreateContentBrowserL(const TDesC8& aHeaderData)
    1.93 +	{
    1.94 +	return CF32AgentContent::NewL(aHeaderData);
    1.95 +	}
    1.96 +#endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT