os/security/contentmgmt/contentaccessfwfordrm/source/f32agent/f32agentfactory.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2003-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 the License "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: 
    15 *
    16 */
    17 
    18 
    19 #include <caf/caf.h>
    20 #include <caf/cafpanic.h>
    21 #include "f32agentfactory.h"
    22 #include "f32agentcontent.h"
    23 #include "f32agentdata.h"
    24 #include "f32agentmanager.h"
    25 
    26 
    27 using namespace ContentAccess;
    28 
    29 CAgentFactory* CF32AgentFactory::NewL()
    30 	{
    31 	return new (ELeave) CF32AgentFactory();
    32 	}
    33 
    34 CAgentContent* CF32AgentFactory::CreateContentBrowserL(const TDesC& aURI, TContentShareMode aShareMode)
    35 	{
    36 	return CF32AgentContent::NewL(aURI, aShareMode);
    37 	}
    38 
    39 CAgentContent* CF32AgentFactory::CreateContentBrowserL(RFile& aFile)
    40 	{
    41 	return CF32AgentContent::NewL(aFile);
    42 	}
    43 
    44 CAgentData* CF32AgentFactory::CreateDataConsumerL(const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode)
    45 	{		
    46 	return CF32AgentData::NewL(aVirtualPath, aShareMode);
    47 	}
    48 
    49 CAgentData* CF32AgentFactory::CreateDataConsumerL(RFile& aFile, const TDesC& aUniqueId)
    50 	{
    51 	return CF32AgentData::NewL(aFile, aUniqueId);
    52 	}
    53 
    54 CAgentManager*  CF32AgentFactory::CreateManagerL()
    55 	{
    56 	return CF32AgentManager::NewL();
    57 	}
    58 
    59 CAgentImportFile* CF32AgentFactory::CreateImporterL(const TDesC8& /* aMimeType */, const CMetaDataArray& /* aArray */, const TDesC& /*aOutputDirectory*/, const TDesC& /* aSuggestedFileName*/)
    60 	{
    61 	// The F32 agent is not used to import files and the code should never
    62 	// reach this point
    63 	User::Panic(KCafPanicString, ECafPanicF32AgentImportNotSupported);
    64 	return NULL;
    65 	}
    66 
    67 CAgentImportFile* CF32AgentFactory::CreateImporterL(const TDesC8& /*aMimeType*/, const CMetaDataArray& /*aMetaDataArray*/)
    68 	{
    69 	// The F32 agent is not used to import files and the code should never
    70 	// reach this point
    71 	User::Panic(KCafPanicString, ECafPanicF32AgentImportNotSupported);
    72 	return NULL;
    73 	}
    74 
    75 CAgentRightsManager* CF32AgentFactory::CreateRightsManagerL()
    76 	{
    77 	// The F32 agent does not manage any rights or access control to files
    78 	// The code should never reach this point
    79 	User::Panic(KCafPanicString, ECafPanicF32AgentRightManagerNotSupported);
    80 	return NULL;
    81 	}
    82 
    83 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
    84 CAgentData* CF32AgentFactory::CreateDataConsumerL(const TDesC8& aHeaderData)
    85 	{
    86 	return CF32AgentData::NewL(aHeaderData);
    87 	}
    88 
    89 CAgentContent* CF32AgentFactory::CreateContentBrowserL(const TDesC8& aHeaderData)
    90 	{
    91 	return CF32AgentContent::NewL(aHeaderData);
    92 	}
    93 #endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT