contentmgmt/referencedrmagent/TestAgent/testagentfactory.cpp
changeset 15 da2ae96f639b
equal deleted inserted replaced
10:afc583cfa176 15:da2ae96f639b
       
     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 "testagentfactory.h"
       
    21 #include "testagentcontent.h"
       
    22 #include "testagentdata.h"
       
    23 #include "testagentmanager.h"
       
    24 #include "testagentimportfile.h"
       
    25 #include "testagentrightsmanager.h"
       
    26 
       
    27 using namespace ContentAccess;
       
    28 
       
    29 CAgentFactory* CTestAgentFactory::NewL()
       
    30 	{
       
    31 	return new (ELeave) CTestAgentFactory();
       
    32 	}
       
    33 
       
    34 CAgentContent* CTestAgentFactory::CreateContentBrowserL(const TDesC& aURI, TContentShareMode aShareMode)
       
    35 	{
       
    36 	return CTestAgentContent::NewL(aURI, aShareMode);
       
    37 	}
       
    38 
       
    39 CAgentContent* CTestAgentFactory::CreateContentBrowserL(RFile& aFile)
       
    40 	{
       
    41 	return CTestAgentContent::NewL(aFile);
       
    42 	}
       
    43 
       
    44 CAgentData* CTestAgentFactory::CreateDataConsumerL(const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode)
       
    45 	{
       
    46 	return CTestAgentData::NewL(aVirtualPath, aShareMode);
       
    47 	}
       
    48 
       
    49 CAgentData* CTestAgentFactory::CreateDataConsumerL(RFile& aFile, const TDesC& aUniqueId)
       
    50 	{
       
    51 	return CTestAgentData::NewL(aFile, aUniqueId);
       
    52 	}
       
    53 
       
    54 CAgentManager*  CTestAgentFactory::CreateManagerL()
       
    55 	{
       
    56 	return CTestAgentManager::NewL();
       
    57 	}
       
    58 
       
    59 CAgentImportFile* CTestAgentFactory::CreateImporterL(const TDesC8& aMimeType, const CMetaDataArray& aMetaDataArray, const TDesC& aOutputDirectory, const TDesC& aSuggestedFileName)
       
    60 	{
       
    61 	return CTestAgentImportFile::NewL(aMimeType, aMetaDataArray, aOutputDirectory, aSuggestedFileName);
       
    62 	}
       
    63 
       
    64 CAgentImportFile* CTestAgentFactory::CreateImporterL(const TDesC8& aMimeType, const CMetaDataArray& aMetaDataArray)
       
    65 	{
       
    66 	return CTestAgentImportFile::NewL(aMimeType, aMetaDataArray);
       
    67 	}
       
    68 
       
    69 CAgentRightsManager* CTestAgentFactory::CreateRightsManagerL()
       
    70 	{
       
    71 	return CTestAgentRightsManager::NewL();
       
    72 	}
       
    73