installationservices/swi/test/tdaemon/steps/daemonstep.cpp
branchRCL_3
changeset 25 7333d7932ef7
parent 0 ba25891c3a9e
child 26 8b7f4e561641
equal deleted inserted replaced
24:5cc91383ab1e 25:7333d7932ef7
     1 /*
     1 /*
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    19 /**
    19 /**
    20  @file
    20  @file
    21 */
    21 */
    22 
    22 
    23 #include "daemonstep.h"
    23 #include "daemonstep.h"
       
    24 #include "sisregistrywritablesession.h"
    24 
    25 
    25 namespace Swi
    26 namespace Swi
    26 {
    27 {
    27 
    28 
    28 namespace Test
    29 namespace Test
   113 	
   114 	
   114 	CleanupStack::PopAndDestroy(&fs);
   115 	CleanupStack::PopAndDestroy(&fs);
   115 	return EPass;
   116 	return EPass;
   116 	}
   117 	}
   117 
   118 
       
   119 //CAddDriveStep
       
   120 CAddDriveStep::CAddDriveStep()
       
   121     {
       
   122     }
       
   123 
       
   124 CAddDriveStep::~CAddDriveStep()
       
   125     {
       
   126     }
       
   127 
       
   128 TVerdict CAddDriveStep::runTestStepL(TBool /*aOomTest*/)
       
   129     {
       
   130     TPtrC str;
       
   131     TInt drive(0);
       
   132     if (!GetStringFromConfig(ConfigSection(), _L("drive"), str))
       
   133         {
       
   134         ERR_PRINTF1(_L("Missing drive setting"));
       
   135         SetTestStepResult(EFail);
       
   136         }
       
   137     else
       
   138         {
       
   139         RFs fs;
       
   140         fs.Connect();
       
   141         
       
   142         User::LeaveIfError(fs.CharToDrive(str[0], drive));
       
   143         //iDriveChar = str[0];
       
   144         fs.Close();
       
   145         }
       
   146     RSisRegistryWritableSession registrySession;
       
   147             
       
   148     User::LeaveIfError(registrySession.Connect());
       
   149     CleanupClosePushL(registrySession);
       
   150     registrySession.AddDriveL(drive);
       
   151 
       
   152     CleanupStack::PopAndDestroy(&registrySession);    
       
   153 
       
   154     return EPass;
       
   155     }
   118 } // namespace Swi::Test
   156 } // namespace Swi::Test
   119 
   157 
   120 } //namespace Swi
   158 } //namespace Swi
   121 
   159