videofeeds/server/tsrc/VCXScheduledDownloadTest/src/VCXScheduledDownloadTestBlocks.cpp
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 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:  This file contains testclass implementation.*
       
    15 */
       
    16 
       
    17 
       
    18 // [INCLUDE FILES] - do not remove
       
    19 #include <e32svr.h>
       
    20 #include <StifParser.h>
       
    21 #include <Stiftestinterface.h>
       
    22 #include <centralrepository.h>
       
    23 
       
    24 #include "VCXTestLog.h"
       
    25 #include "VCXScheduledDownloadTest.h"
       
    26 #include "VCXScheduledDownloadTester.h"
       
    27 #include "VCXTestCommon.h"
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 // ============================ MEMBER FUNCTIONS ===============================
       
    32 
       
    33 // -----------------------------------------------------------------------------
       
    34 // CVCXScheduledDownloadTest::Delete
       
    35 // Delete here all resources allocated and opened from test methods. 
       
    36 // Called from destructor. 
       
    37 // -----------------------------------------------------------------------------
       
    38 //
       
    39 void CVCXScheduledDownloadTest::Delete() 
       
    40     {
       
    41     delete iTester;
       
    42     iTester = NULL;
       
    43     
       
    44     delete iTestCommon;
       
    45     iTestCommon = NULL;
       
    46 
       
    47     iFs.Close();
       
    48     }
       
    49 
       
    50 // -----------------------------------------------------------------------------
       
    51 // CVCXScheduledDownloadTest::RunMethodL
       
    52 // Run specified method. Contains also table of test mothods and their names.
       
    53 // -----------------------------------------------------------------------------
       
    54 //
       
    55 TInt CVCXScheduledDownloadTest::RunMethodL( 
       
    56     CStifItemParser& aItem ) 
       
    57     {
       
    58 
       
    59     static TStifFunctionInfo const KFunctions[] =
       
    60         {  
       
    61         // Copy this line for every implemented function.
       
    62         // First string is the function name used in TestScripter script file.
       
    63         // Second is the actual implementation member function. 
       
    64         ENTRY( "Create", CVCXScheduledDownloadTest::CreateL ),
       
    65         ENTRY( "RemoveAllMedias", CVCXScheduledDownloadTest::RemoveAllMediasL ),
       
    66         ENTRY( "RemoveAllSchedules", CVCXScheduledDownloadTest::RemoveAllSchedulesL ),
       
    67         ENTRY( "RemoveVideo", CVCXScheduledDownloadTest::RemoveVideoL ),
       
    68         ENTRY( "Download", CVCXScheduledDownloadTest::DownloadL ),
       
    69         ENTRY( "CancelDownload", CVCXScheduledDownloadTest::CancelDownloadL ),
       
    70         ENTRY( "WaitForMessages", CVCXScheduledDownloadTest::WaitForMessagesL ),
       
    71         ENTRY( "CoolDown", CVCXScheduledDownloadTest::CoolDown ),
       
    72         ENTRY( "CheckVideoCount", CVCXScheduledDownloadTest::CheckVideoCount ),
       
    73         ENTRY( "CheckMinimumVideoCount", CVCXScheduledDownloadTest::CheckMinimumVideoCount ),
       
    74         ENTRY( "CheckMaximumVideoCount", CVCXScheduledDownloadTest::CheckMaximumVideoCount ),
       
    75         ENTRY( "CheckError", CVCXScheduledDownloadTest::CheckError ),
       
    76         ENTRY( "SetPreferredMemory", CVCXScheduledDownloadTest::SetPreferredMemoryL ),
       
    77         
       
    78         // [test cases entries] - Do not remove
       
    79 
       
    80         };
       
    81 
       
    82     const TInt count = sizeof( KFunctions ) / 
       
    83                         sizeof( TStifFunctionInfo );
       
    84 
       
    85     return RunInternalL( KFunctions, count, aItem );
       
    86 
       
    87     }
       
    88 
       
    89 // -----------------------------------------------------------------------------
       
    90 // CVCXScheduledDownloadTest::CreateL
       
    91 // -----------------------------------------------------------------------------
       
    92 //
       
    93 TInt CVCXScheduledDownloadTest::CreateL( CStifItemParser& aItem )
       
    94     {
       
    95     VCXLOGLO1(">>>CVCXScheduledDownloadTest::CreateL");
       
    96     // Print to UI
       
    97     _LIT( KVCXScheduledDownloadTest, "VCXScheduledDownloadTest" );
       
    98     _LIT( KWhere, "In CreateL" );
       
    99     TestModuleIf().Printf( 0, KVCXScheduledDownloadTest, KWhere );
       
   100     // Print to log file
       
   101     iLog->Log( KWhere );
       
   102     
       
   103     aItem.SetParsingType(CStifItemParser::EQuoteStyleParsing);
       
   104 
       
   105     User::LeaveIfError( iFs.Connect() );
       
   106     
       
   107     TRAPD( err, iTester = CVCXScheduledDownloadTester::NewL( this ) );
       
   108     
       
   109     if( err != KErrNone )
       
   110         {
       
   111         VCXLOGLO2("CVCXScheduledDownloadTest:: error: %d", err);
       
   112         }
       
   113     
       
   114     iTestCommon = CVCXTestCommon::NewL();
       
   115     
       
   116     VCXLOGLO1("<<<CVCXScheduledDownloadTest::CreateL");
       
   117     return err;
       
   118     }
       
   119 
       
   120 // -----------------------------------------------------------------------------
       
   121 // CVCXScheduledDownloadTest::RemoveAllMediasL
       
   122 // -----------------------------------------------------------------------------
       
   123 //
       
   124 TInt CVCXScheduledDownloadTest::RemoveAllMediasL( CStifItemParser& aItem )
       
   125     {
       
   126     VCXLOGLO1(">>>CVCXScheduledDownloadTest::RemoveAllMediasL");
       
   127     // Print to UI
       
   128     _LIT( KVCXScheduledDownloadTest, "VCXScheduledDownloadTest" );
       
   129     _LIT( KWhere, "In RemoveAllMediasL" );
       
   130     TestModuleIf().Printf( 0, KVCXScheduledDownloadTest, KWhere );
       
   131     // Print to log file
       
   132     iLog->Log( KWhere );
       
   133 
       
   134     aItem.SetParsingType(CStifItemParser::EQuoteStyleParsing);
       
   135     
       
   136     TRAPD( err, iTester->RemoveAllMediasL() );
       
   137     
       
   138     if( err != KErrNone )
       
   139         {
       
   140         VCXLOGLO2("CVCXScheduledDownloadTest:: error: %d", err);
       
   141         }
       
   142     
       
   143     VCXLOGLO1("<<<CVCXScheduledDownloadTest::RemoveAllMediasL");
       
   144     return err;
       
   145     }
       
   146 
       
   147 // -----------------------------------------------------------------------------
       
   148 // CVCXScheduledDownloadTest::RemoveAllSchedulesL
       
   149 // -----------------------------------------------------------------------------
       
   150 //
       
   151 TInt CVCXScheduledDownloadTest::RemoveAllSchedulesL( CStifItemParser& aItem )
       
   152     {
       
   153     VCXLOGLO1(">>>CVCXScheduledDownloadTest::RemoveAllSchedulesL");
       
   154     // Print to UI
       
   155     _LIT( KVCXScheduledDownloadTest, "VCXScheduledDownloadTest" );
       
   156     _LIT( KWhere, "In RemoveAllSchedulesL" );
       
   157     TestModuleIf().Printf( 0, KVCXScheduledDownloadTest, KWhere );
       
   158     // Print to log file
       
   159     iLog->Log( KWhere );
       
   160 
       
   161     aItem.SetParsingType(CStifItemParser::EQuoteStyleParsing);
       
   162     
       
   163     TRAPD( err, iTester->RemoveAllSchedulesL() );
       
   164     
       
   165     if( err != KErrNone )
       
   166         {
       
   167         VCXLOGLO2("CVCXScheduledDownloadTest:: error: %d", err);
       
   168         }
       
   169     
       
   170     VCXLOGLO1("<<<CVCXScheduledDownloadTest::RemoveAllSchedulesL");
       
   171     return err;
       
   172     }
       
   173 
       
   174 // -----------------------------------------------------------------------------
       
   175 // CVCXScheduledDownloadTest::RemoveVideoL
       
   176 // -----------------------------------------------------------------------------
       
   177 //
       
   178 TInt CVCXScheduledDownloadTest::RemoveVideoL( CStifItemParser& aItem )
       
   179     {
       
   180     VCXLOGLO1(">>>CVCXScheduledDownloadTest::RemoveAllMediasL");
       
   181     // Print to UI
       
   182     _LIT( KVCXScheduledDownloadTest, "VCXScheduledDownloadTest" );
       
   183     _LIT( KWhere, "In RemoveVideoL" );
       
   184     TestModuleIf().Printf( 0, KVCXScheduledDownloadTest, KWhere );
       
   185     // Print to log file
       
   186     iLog->Log( KWhere );
       
   187     
       
   188     aItem.SetParsingType(CStifItemParser::EQuoteStyleParsing);
       
   189 
       
   190     TInt index;
       
   191     User::LeaveIfError( aItem.GetNextInt( index ) );
       
   192     
       
   193     TRAPD( err, iTester->RemoveVideoL( index ) );
       
   194     
       
   195     if( err != KErrNone )
       
   196         {
       
   197         VCXLOGLO2("CVCXScheduledDownloadTest:: error: %d", err);
       
   198         }
       
   199     
       
   200     VCXLOGLO1("<<<CVCXScheduledDownloadTest::RemoveAllMediasL");
       
   201     return err;
       
   202     }
       
   203 
       
   204 // -----------------------------------------------------------------------------
       
   205 // CVCXScheduledDownloadTest::DownloadL
       
   206 // -----------------------------------------------------------------------------
       
   207 //
       
   208 TInt CVCXScheduledDownloadTest::DownloadL( CStifItemParser& aItem )
       
   209     {
       
   210     VCXLOGLO1(">>>CVCXScheduledDownloadTest::DownloadL");
       
   211     // Print to UI
       
   212     _LIT( KVCXScheduledDownloadTest, "VCXScheduledDownloadTest" );
       
   213     _LIT( KWhere, "In DownloadL" );
       
   214     TestModuleIf().Printf( 0, KVCXScheduledDownloadTest, KWhere );
       
   215     // Print to log file
       
   216     iLog->Log( KWhere );
       
   217 
       
   218     aItem.SetParsingType(CStifItemParser::EQuoteStyleParsing);
       
   219     
       
   220     TUint32 iapId(0);
       
   221     TPtrC iapName;
       
   222     User::LeaveIfError( aItem.GetNextString( iapName ) );
       
   223     VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: iapName: %S", &iapName);
       
   224     User::LeaveIfError( iTestCommon->GetIapIdL( iapName, iapId ) );
       
   225     VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: iapId: %d", iapId);
       
   226 
       
   227     TPtrC url;
       
   228     User::LeaveIfError( aItem.GetNextString( url ) );
       
   229     
       
   230     TPtrC userName;
       
   231     if( KErrNone == aItem.GetNextString( userName ) )
       
   232         {
       
   233         VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: userName: %S", &userName);
       
   234         }
       
   235     else
       
   236         {
       
   237         userName.Set( _L("") );
       
   238         }
       
   239 
       
   240     TPtrC password;
       
   241     if( KErrNone == aItem.GetNextString( password ) )
       
   242         {
       
   243         VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: password: %S", &password);
       
   244         }
       
   245     else
       
   246         {
       
   247         password.Set( _L("") );
       
   248         }
       
   249     
       
   250     TRAPD( err, iTester->DownloadL( url, iapId, userName, password ) );
       
   251     
       
   252     VCXLOGLO1("<<<CVCXScheduledDownloadTest::DownloadL");
       
   253     return err;
       
   254     }
       
   255 
       
   256 // -----------------------------------------------------------------------------
       
   257 // CVCXScheduledDownloadTest::CancelDownloadL
       
   258 // -----------------------------------------------------------------------------
       
   259 //
       
   260 TInt CVCXScheduledDownloadTest::CancelDownloadL( CStifItemParser& aItem )
       
   261     {
       
   262     VCXLOGLO1(">>>CVCXScheduledDownloadTest::CancelDownloadL");
       
   263     // Print to UI
       
   264     _LIT( KVCXScheduledDownloadTest, "VCXScheduledDownloadTest" );
       
   265     _LIT( KWhere, "In CancelDownloadL" );
       
   266     TestModuleIf().Printf( 0, KVCXScheduledDownloadTest, KWhere );
       
   267     // Print to log file
       
   268     iLog->Log( KWhere );
       
   269     
       
   270     aItem.SetParsingType(CStifItemParser::EQuoteStyleParsing);
       
   271 
       
   272     TInt index;
       
   273     User::LeaveIfError( aItem.GetNextInt( index ) );
       
   274     
       
   275     TRAPD( err, iTester->CancelDownloadL( index ) );
       
   276     
       
   277     if( err != KErrNone )
       
   278         {
       
   279         VCXLOGLO2("CVCXScheduledDownloadTest:: error: %d", err);
       
   280         }
       
   281     
       
   282     VCXLOGLO1("<<<CVCXScheduledDownloadTest::CancelDownloadL");
       
   283     return err;
       
   284     }
       
   285 
       
   286 // -----------------------------------------------------------------------------
       
   287 // CVCXScheduledDownloadTest::WaitForMessagesL
       
   288 // -----------------------------------------------------------------------------
       
   289 //
       
   290 TInt CVCXScheduledDownloadTest::WaitForMessagesL( CStifItemParser& aItem )
       
   291     {
       
   292     VCXLOGLO1(">>>CVCXScheduledDownloadTest::WaitForMessagesL");
       
   293     // Print to UI
       
   294     _LIT( KVCXScheduledDownloadTest, "VCXScheduledDownloadTest" );
       
   295     _LIT( KWhere, "In WaitForMessagesL" );
       
   296     TestModuleIf().Printf( 0, KVCXScheduledDownloadTest, KWhere );
       
   297     // Print to log file
       
   298     iLog->Log( KWhere );
       
   299     
       
   300     aItem.SetParsingType(CStifItemParser::EQuoteStyleParsing);
       
   301 
       
   302     RArray<TInt32> messages;
       
   303     
       
   304     TInt timeoutSeconds(0);
       
   305     User::LeaveIfError( aItem.GetNextInt( timeoutSeconds ) );
       
   306     
       
   307     TInt msg;
       
   308     while( aItem.GetNextInt( msg ) == KErrNone )
       
   309         {
       
   310         messages.Append( msg );
       
   311         }
       
   312     
       
   313     TInt err( KErrArgument );
       
   314     
       
   315     if( messages.Count() > 0 )
       
   316         {
       
   317         TRAP( err, iTester->WaitForVideoEventsL( timeoutSeconds, messages ) );
       
   318         }
       
   319     
       
   320     VCXLOGLO1("<<<CVCXScheduledDownloadTest::WaitForMessagesL");
       
   321     return err;
       
   322     }
       
   323 
       
   324 // -----------------------------------------------------------------------------
       
   325 // CVCXScheduledDownloadTest::CoolDown
       
   326 // -----------------------------------------------------------------------------
       
   327 //
       
   328 TInt CVCXScheduledDownloadTest::CoolDown( CStifItemParser& aItem )
       
   329     {
       
   330     VCXLOGLO1(">>>CVCXScheduledDownloadTest::CoolDown");
       
   331     // Print to UI
       
   332     _LIT( KVCXScheduledDownloadTest, "VCXScheduledDownloadTest" );
       
   333     _LIT( KWhere, "In CoolDown" );
       
   334     TestModuleIf().Printf( 0, KVCXScheduledDownloadTest, KWhere );
       
   335     // Print to log file
       
   336     iLog->Log( KWhere );
       
   337     
       
   338     aItem.SetParsingType(CStifItemParser::EQuoteStyleParsing);
       
   339 
       
   340     iTester->CoolDown();
       
   341     
       
   342     VCXLOGLO1("<<<CVCXScheduledDownloadTest::CoolDown");
       
   343     return KErrNone;
       
   344     }
       
   345 
       
   346 // -----------------------------------------------------------------------------
       
   347 // CVCXScheduledDownloadTest::CheckVideoCount
       
   348 // -----------------------------------------------------------------------------
       
   349 //
       
   350 TInt CVCXScheduledDownloadTest::CheckVideoCount( CStifItemParser& aItem )
       
   351     {
       
   352     VCXLOGLO1(">>>CVCXScheduledDownloadTest::CheckVideoCount");    
       
   353     // Print to UI
       
   354     _LIT( KVCXScheduledDownloadTest, "VCXScheduledDownloadTest" );
       
   355     _LIT( KWhere, "In CheckVideoCount" );
       
   356     TestModuleIf().Printf( 0, KVCXScheduledDownloadTest, KWhere );
       
   357     // Print to log file
       
   358     iLog->Log( KWhere );
       
   359 
       
   360     aItem.SetParsingType(CStifItemParser::EQuoteStyleParsing);
       
   361     
       
   362     TInt expectedCount;
       
   363     
       
   364     User::LeaveIfError( aItem.GetNextInt( expectedCount ) );
       
   365     
       
   366     TInt err( KErrNone );
       
   367     
       
   368     TRAP( err, iTester->RefreshL() );
       
   369     
       
   370     if( err == KErrNone && iTester->VideoCount() != expectedCount )
       
   371         {
       
   372         err = KErrCorrupt;
       
   373         }
       
   374     
       
   375     VCXLOGLO1("<<<CVCXScheduledDownloadTest::CheckVideoCount");
       
   376     return err;
       
   377     }
       
   378 
       
   379 // -----------------------------------------------------------------------------
       
   380 // CVCXScheduledDownloadTest::CheckMinimumVideoCount
       
   381 // -----------------------------------------------------------------------------
       
   382 //
       
   383 TInt CVCXScheduledDownloadTest::CheckMinimumVideoCount( CStifItemParser& aItem )
       
   384     {
       
   385     VCXLOGLO1(">>>CVCXScheduledDownloadTest::CheckMinimumVideoCount");    
       
   386     // Print to UI
       
   387     _LIT( KVCXScheduledDownloadTest, "VCXScheduledDownloadTest" );
       
   388     _LIT( KWhere, "In CheckMinimumVideoCount" );
       
   389     TestModuleIf().Printf( 0, KVCXScheduledDownloadTest, KWhere );
       
   390     // Print to log file
       
   391     iLog->Log( KWhere );
       
   392     
       
   393     aItem.SetParsingType(CStifItemParser::EQuoteStyleParsing);
       
   394 
       
   395     TInt expectedCount;
       
   396     
       
   397     User::LeaveIfError( aItem.GetNextInt( expectedCount ) );
       
   398     
       
   399     TInt err( KErrNone );
       
   400     
       
   401     TRAP( err, iTester->RefreshL() );
       
   402     
       
   403     if( err == KErrNone && iTester->VideoCount() < expectedCount )
       
   404         {
       
   405         err = KErrCorrupt;
       
   406         }
       
   407     
       
   408     VCXLOGLO1("<<<CVCXScheduledDownloadTest::CheckMinimumVideoCount");
       
   409     return err;
       
   410     }
       
   411 
       
   412 // -----------------------------------------------------------------------------
       
   413 // CVCXScheduledDownloadTest::CheckMaximumVideoCount
       
   414 // -----------------------------------------------------------------------------
       
   415 //
       
   416 TInt CVCXScheduledDownloadTest::CheckMaximumVideoCount( CStifItemParser& aItem )
       
   417     {
       
   418     VCXLOGLO1(">>>CVCXScheduledDownloadTest::CheckMaximumVideoCount");    
       
   419     // Print to UI
       
   420     _LIT( KVCXScheduledDownloadTest, "VCXScheduledDownloadTest" );
       
   421     _LIT( KWhere, "In CheckMaximumVideoCount" );
       
   422     TestModuleIf().Printf( 0, KVCXScheduledDownloadTest, KWhere );
       
   423     // Print to log file
       
   424     iLog->Log( KWhere );
       
   425     
       
   426     aItem.SetParsingType(CStifItemParser::EQuoteStyleParsing);
       
   427 
       
   428     TInt expectedCount;
       
   429     
       
   430     User::LeaveIfError( aItem.GetNextInt( expectedCount ) );
       
   431     
       
   432     TInt err( KErrNone );
       
   433     
       
   434     TRAP( err, iTester->RefreshL() );
       
   435     
       
   436     if( err == KErrNone && iTester->VideoCount() > expectedCount )
       
   437         {
       
   438         err = KErrCorrupt;
       
   439         }
       
   440     
       
   441     VCXLOGLO1("<<<CVCXScheduledDownloadTest::CheckMaximumVideoCount");
       
   442     return err;
       
   443     }
       
   444 
       
   445 // -----------------------------------------------------------------------------
       
   446 // CVCXScheduledDownloadTest::CheckError
       
   447 // -----------------------------------------------------------------------------
       
   448 //
       
   449 TInt CVCXScheduledDownloadTest::CheckError( CStifItemParser& aItem )
       
   450     {
       
   451     VCXLOGLO1(">>>CVCXScheduledDownloadTest::CheckError");    
       
   452     // Print to UI
       
   453     _LIT( KVCXScheduledDownloadTest, "VCXScheduledDownloadTest" );
       
   454     _LIT( KWhere, "In CheckError" );
       
   455     TestModuleIf().Printf( 0, KVCXScheduledDownloadTest, KWhere );
       
   456     // Print to log file
       
   457     iLog->Log( KWhere );
       
   458     
       
   459     aItem.SetParsingType(CStifItemParser::EQuoteStyleParsing);
       
   460 
       
   461     TInt err = iTester->GetLastError();
       
   462     
       
   463     VCXLOGLO1("<<<CVCXScheduledDownloadTest::CheckError");
       
   464     return err;
       
   465     }
       
   466 
       
   467 // -----------------------------------------------------------------------------
       
   468 // CVCXScheduledDownloadTest::SetPreferredMemoryL
       
   469 // -----------------------------------------------------------------------------
       
   470 //
       
   471 TInt CVCXScheduledDownloadTest::SetPreferredMemoryL( CStifItemParser& aItem )
       
   472     {
       
   473     VCXLOGLO1(">>>CVCXScheduledDownloadTest::SetPreferredMemoryL ---------->");
       
   474     // Print to UI
       
   475     _LIT( KVCXMyVideosCollectionPluginTest, "VCXScheduledDownloadTest" );
       
   476     _LIT( KWhere, "In SetPreferredMemoryL" );
       
   477     TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere );
       
   478     // Print to log file
       
   479     iLog->Log( KWhere );
       
   480     
       
   481     aItem.SetParsingType(CStifItemParser::EQuoteStyleParsing);
       
   482 
       
   483     aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing );
       
   484 
       
   485     TInt drive(0);
       
   486     User::LeaveIfError( GetDriveParam( aItem, drive ) );
       
   487 
       
   488     // These were defined in CVcxMyVideosDownloadUtil::PreferredMemoryDesL()
       
   489     const TInt KVcxCenRepUid = 0x102750E2; // same as KIptvCenRepUid in CIptvUtil.h
       
   490     const TInt KVcxCenRepPreferredMemoryKey = 0x01; // same as KIptvCenRepPreferredMemoryKey in CIptvUtil.h
       
   491 
       
   492     TUid uid;
       
   493     uid.iUid = KVcxCenRepUid;
       
   494 
       
   495     CRepository* cenRep = CRepository::NewLC( uid );
       
   496     User::LeaveIfError( cenRep->Set( KVcxCenRepPreferredMemoryKey, drive ) );
       
   497     CleanupStack::PopAndDestroy( cenRep );
       
   498 
       
   499     VCXLOGLO1("<<<CVCXScheduledDownloadTest::SetPreferredMemoryL <----------");
       
   500     return KErrNone;
       
   501     }
       
   502 
       
   503 // -----------------------------------------------------------------------------
       
   504 // CVCXScheduledDownloadTest::GetDriveParam
       
   505 // -----------------------------------------------------------------------------
       
   506 //
       
   507 TInt CVCXScheduledDownloadTest::GetDriveParam( CStifItemParser& aItem, TInt& aDrive )
       
   508     {
       
   509     aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing );
       
   510 
       
   511     TPtrC driveLetter;
       
   512     TInt err = aItem.GetNextString( driveLetter );
       
   513     if( err == KErrNone )
       
   514         {
       
   515         if( driveLetter == _L("anydrive") )
       
   516             {
       
   517             aDrive = -1;
       
   518             }
       
   519         else
       
   520             {
       
   521             err = iFs.CharToDrive( driveLetter[0], aDrive );
       
   522             VCXLOGLO3("CVCXScheduledDownloadTest:: drive: %S = %d", &driveLetter, aDrive );
       
   523             }
       
   524         }
       
   525 
       
   526     return err;
       
   527     }
       
   528 
       
   529 //  [End of File] - Do not remove