dbgsrv/coredumpserver/test/automatictests/tcds_unit/src/tcds_unitBlockController.cpp
changeset 0 c6b0df440bee
equal deleted inserted replaced
-1:000000000000 0:c6b0df440bee
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 
       
    18 /**
       
    19  @file tcds_unitBlockController.cpp
       
    20  @internalTechnology
       
    21 */
       
    22 
       
    23 #include "tcds_unitBlockController.h"
       
    24 
       
    25 _LIT(KCFlashDataSourceWrapper, "CFlashDataSourceWrapper");
       
    26 _LIT(KServerDataSourceWrapper, "CServerDataSourceWrapper");
       
    27 
       
    28 
       
    29 Ctcds_unitBlockController* Ctcds_unitBlockController::NewL()
       
    30 /**
       
    31  * @return - Instance of the test block controller
       
    32  */
       
    33     {
       
    34     RDebug::Printf("Ctcds_unitBlockController::NewL()");
       
    35     Ctcds_unitBlockController* block = new (ELeave) Ctcds_unitBlockController();
       
    36     return block;
       
    37     }
       
    38 
       
    39 
       
    40 CDataWrapper* Ctcds_unitBlockController::CreateDataL(const TDesC& aData)
       
    41     {
       
    42     
       
    43     RDebug::Printf("Ctcds_unitBlockController::CreateDataL()");
       
    44     CDataWrapper* wrapper = NULL;
       
    45 	if (KCFlashDataSourceWrapper() == aData)
       
    46 		{
       
    47 		wrapper = CFlashDataSourceWrapper::NewL();
       
    48 		}
       
    49 	if (KServerDataSourceWrapper() == aData)
       
    50 		{
       
    51 		wrapper = CServerDataSourceWrapper::NewL();
       
    52 		}	
       
    53 
       
    54     return wrapper;
       
    55     }