filemanager/bkupengine/src/CMMCScBkupStateSetPhoneMode.cpp
changeset 0 6a9f87576119
equal deleted inserted replaced
-1:000000000000 0:6a9f87576119
       
     1 /*
       
     2 * Copyright (c) 2005 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 "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: CMMCScBkupStateSetPhoneMode implementation
       
    15 *
       
    16 *
       
    17 */
       
    18 
       
    19 #include "CMMCScBkupStateSetPhoneMode.h"
       
    20 
       
    21 // System includes
       
    22 #include <e32std.h>
       
    23 
       
    24 // User includes
       
    25 #include "MMCScBkupLogger.h"
       
    26 #include "CMMCScBkupDriveAndOperationTypeManager.h"
       
    27 
       
    28 
       
    29 
       
    30 // ========================= MEMBER FUNCTIONS ================================
       
    31 
       
    32 // ---------------------------------------------------------------------------
       
    33 // CMMCScBkupStateSetPhoneMode::CMMCScBkupStateSetPhoneMode()
       
    34 // 
       
    35 // C++ constructor.
       
    36 // ---------------------------------------------------------------------------
       
    37 CMMCScBkupStateSetPhoneMode::CMMCScBkupStateSetPhoneMode( MMMCScBkupDriver& aDriver )
       
    38 :   CMMCScBkupState( aDriver )
       
    39     {
       
    40     __LOG1("CMMCScBkupStateSetPhoneMode::CMMCScBkupStateSetPhoneMode() - 0x%08x", StateId().iUid );
       
    41     }
       
    42 
       
    43 
       
    44 // ---------------------------------------------------------------------------
       
    45 // CMMCScBkupStateSetPhoneMode::NewL()
       
    46 // 
       
    47 // 
       
    48 // ---------------------------------------------------------------------------
       
    49 CMMCScBkupStateSetPhoneMode* CMMCScBkupStateSetPhoneMode::NewL( MMMCScBkupDriver& aDriver )
       
    50     {
       
    51     CMMCScBkupStateSetPhoneMode* self = new(ELeave) CMMCScBkupStateSetPhoneMode( aDriver);
       
    52     return self;
       
    53     }
       
    54 
       
    55 
       
    56 // ---------------------------------------------------------------------------
       
    57 // CMMCScBkupStateSetPhoneMode::StateId()
       
    58 // 
       
    59 // 
       
    60 // ---------------------------------------------------------------------------
       
    61 TMMCScBkupStateId CMMCScBkupStateSetPhoneMode::StateId() const
       
    62     {
       
    63     return KMMCScBkupStateIdSetPhoneMode;
       
    64     }
       
    65 
       
    66 
       
    67 // ---------------------------------------------------------------------------
       
    68 // CMMCScBkupStateSetPhoneMode::NextStateId()
       
    69 // 
       
    70 // 
       
    71 // ---------------------------------------------------------------------------
       
    72 TMMCScBkupStateId CMMCScBkupStateSetPhoneMode::NextStateId() const
       
    73     {
       
    74     TMMCScBkupStateId nextState = KMMCScBkupStateIdNotifyAllSnapshotsSupplied;
       
    75     //
       
    76     const TMMCScBkupOperationType type = Driver().DrvOperation();
       
    77     switch(type)
       
    78         {
       
    79     case EMMCScBkupOperationTypeFullBackup:
       
    80         nextState = KMMCScBkupStateIdNotifyAllSnapshotsSupplied;
       
    81         break;
       
    82     case EMMCScBkupOperationTypeFullRestore:
       
    83         nextState = KMMCScBkupStateIdArchiveOpSystemData;    
       
    84         break;
       
    85     default:
       
    86         ASSERT( EFalse );
       
    87         break;
       
    88         }
       
    89     //
       
    90     return nextState;
       
    91     }
       
    92 
       
    93 
       
    94 // ---------------------------------------------------------------------------
       
    95 // CMMCScBkupStateSetPhoneMode::PerformStateInitL()
       
    96 // 
       
    97 // 
       
    98 // ---------------------------------------------------------------------------
       
    99 void CMMCScBkupStateSetPhoneMode::PerformStateInitL()
       
   100     {
       
   101     __LOG("CMMCScBkupStateSetPhoneMode::PerformStateInitL()" );
       
   102     //
       
   103     const CMMCScBkupOpParamsBase& params = Driver().DrvParamsBase();
       
   104     //
       
   105     Driver().DrvSecureBackupClient().SetBURModeL( params.DriveAndOperations().DriveList(), 
       
   106                                                   params.PartType(),
       
   107                                                   params.IncrementType(),
       
   108                                                   iStatus );
       
   109     SetActive();
       
   110     }
       
   111 
       
   112 
       
   113 // ---------------------------------------------------------------------------
       
   114 // CMMCScBkupStateSetPhoneMode::PerformAsynchronousStateStepL()
       
   115 // 
       
   116 // 
       
   117 // ---------------------------------------------------------------------------
       
   118 void CMMCScBkupStateSetPhoneMode::PerformAsynchronousStateStepL()
       
   119     {
       
   120     __LOG("CMMCScBkupStateSetPhoneMode::PerformAsynchronousStateStepL()" );
       
   121     }
       
   122 
       
   123