engine/src/PodcastModel.cpp
branchsymbian1
changeset 336 3d6c1417e8bd
parent 211 aa8e7de6f033
child 347 b8d687bb7ca1
equal deleted inserted replaced
296:80f1da5ac28b 336:3d6c1417e8bd
    14 *
    14 *
    15 * Description:
    15 * Description:
    16 *
    16 *
    17 */
    17 */
    18 
    18 
    19 // when enabled this macro copies the database to c:\data on launch for debug purposes
       
    20 //#define COPY_DB
       
    21 
       
    22 #include <commdb.h>
    19 #include <commdb.h>
    23 #include "PodcastModel.h"
    20 #include "PodcastModel.h"
    24 #include "FeedEngine.h"
    21 #include "FeedEngine.h"
    25 #include "SettingsEngine.h"
    22 #include "SettingsEngine.h"
    26 #include "ShowEngine.h"
    23 #include "ShowEngine.h"
   316 	// copy template to new DB
   313 	// copy template to new DB
   317 	TFileName dbTemplate;
   314 	TFileName dbTemplate;
   318 	dbTemplate.Copy(iSettingsEngine->PrivatePath());
   315 	dbTemplate.Copy(iSettingsEngine->PrivatePath());
   319 	dbTemplate.Append(KDBTemplateFileName);
   316 	dbTemplate.Append(KDBTemplateFileName);
   320 
   317 
       
   318 	DP1("Copy template DB from: %S", &dbTemplate);
       
   319 	DP1("Copy template DB to: %S", &dbFileName);
       
   320 	
   321 	BaflUtils::CopyFile(iFsSession, dbTemplate,dbFileName);
   321 	BaflUtils::CopyFile(iFsSession, dbTemplate,dbFileName);
       
   322 	
       
   323 	// important to set this file to not be read only if copying from Z:
       
   324 	iFsSession.SetAtt(dbFileName, 0, KEntryAttReadOnly); 
       
   325 	
   322 	iIsFirstStartup = ETrue;
   326 	iIsFirstStartup = ETrue;
   323 	DP("CPodcastModel::ResetDB END");
   327 	DP("CPodcastModel::ResetDB END");
   324 	}
   328 	}
   325 
   329 
   326 
   330