dbcreator/commsdatcreatorrfsplugin/src/cdccommsdatcreatorrfsplugin.cpp
changeset 0 5a93021fdf25
child 27 489cf6208544
equal deleted inserted replaced
-1:000000000000 0:5a93021fdf25
       
     1 /*
       
     2 * Copyright (c) 2006,2007 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:   Implementation of cdccommsdatcreatorrfsplugin class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include <centralrepository.h>
       
    21 #include "cdccommsdatcreatorcrkeys.h"
       
    22 
       
    23 #include "cdccommsdatcreatorrfsplugin.h"
       
    24 #include "cdclogger.h"
       
    25 #include "cdcprocesslauncher.h"
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // ----------------------------------------------------------------------------
       
    30 // CCdcCommsDatCreatorRfsPlugin::NewL
       
    31 // ----------------------------------------------------------------------------
       
    32 //
       
    33 CCdcCommsDatCreatorRfsPlugin* CCdcCommsDatCreatorRfsPlugin::NewL( 
       
    34                                         const TUid& /*aImplementationUid*/ )
       
    35 	{
       
    36     CLOG_WRITE( "CCdcCommsDatCreatorRfsPlugin::NewL()" );
       
    37 	
       
    38 	CCdcCommsDatCreatorRfsPlugin * self = new( ELeave ) 
       
    39                CCdcCommsDatCreatorRfsPlugin ();
       
    40 
       
    41     CLOG_WRITE( "CCdcCommsDatCreatorRfsPlugin::NewL()" );
       
    42     return self;
       
    43 	}
       
    44 
       
    45 // ----------------------------------------------------------------------------
       
    46 // CCdcCommsDatCreatorRfsPlugin::RestoreFactorySettingsL
       
    47 // ----------------------------------------------------------------------------
       
    48 //
       
    49 void CCdcCommsDatCreatorRfsPlugin::RestoreFactorySettingsL( 
       
    50                                                      const TRfsReason aType )
       
    51 	{
       
    52     CLOG_WRITE_FORMAT( 
       
    53     "CCdcCommsDatCreatorRfsPlugin::RestoreFactorySettingsL() Rfs type: %d", aType );
       
    54         	
       
    55     if( aType == ENormalRfs )
       
    56     {
       
    57     	// Do nothing in Normal RFS case so that user IAPs are preserved (TSW: EJYG-7FZCKJ)
       
    58     	return;
       
    59     }
       
    60 	// Launch the separate process to 1. reset 2. check/create the tables in CommsDat 
       
    61 	// and 3. Generate the CommsDat based on the input file
       
    62    	StartProcessL();                        
       
    63 
       
    64     CLOG_WRITE( "CCdcCommsDatCreatorRfsPlugin::RestoreFactorySettingsL() end" );
       
    65 	}
       
    66 
       
    67 // ----------------------------------------------------------------------------
       
    68 // CCdcCommsDatCreatorRfsPlugin::GetScriptL
       
    69 // ----------------------------------------------------------------------------
       
    70 //
       
    71 void CCdcCommsDatCreatorRfsPlugin::GetScriptL( 
       
    72                                  const TRfsReason /*aType*/, TDes& /*aPath*/ )
       
    73 	{
       
    74 	}
       
    75 
       
    76 // ----------------------------------------------------------------------------
       
    77 // CCdcCommsDatCreatorRfsPlugin::ExecuteCustomCommandL
       
    78 // ----------------------------------------------------------------------------
       
    79 //
       
    80 void CCdcCommsDatCreatorRfsPlugin::ExecuteCustomCommandL( 
       
    81                               const TRfsReason /*aType*/, TDesC& /*aCommand*/ )
       
    82 	{
       
    83 	}
       
    84 
       
    85 // ----------------------------------------------------------------------------
       
    86 // CCdcCommsDatCreatorRfsPlugin::CCdcCommsDatCreatorRfsPlugin
       
    87 // ----------------------------------------------------------------------------
       
    88 //
       
    89 CCdcCommsDatCreatorRfsPlugin::CCdcCommsDatCreatorRfsPlugin () :
       
    90     CRFSPlugin()
       
    91 	{
       
    92 	}
       
    93 
       
    94 
       
    95 // ----------------------------------------------------------------------------
       
    96 // CCdcCommsDatCreatorRfsPlugin::StartProcessL()
       
    97 // ----------------------------------------------------------------------------
       
    98 //   
       
    99 void CCdcCommsDatCreatorRfsPlugin::StartProcessL()
       
   100     {
       
   101     CLOG_WRITE( "CCdcCommsDatCreatorRfsPlugin::StartProcessL" );
       
   102 
       
   103     CCdcProcessLauncher* pl = CCdcProcessLauncher::NewL();
       
   104 
       
   105     CLOG_WRITE( "CCdcCommsDatCreatorRfsPlugin::Launch" );
       
   106 
       
   107     pl->Launch();
       
   108 
       
   109     CLOG_WRITE( "CCdcCommsDatCreatorRfsPlugin::Launch" );
       
   110     
       
   111     delete ( pl );
       
   112 
       
   113     CLOG_WRITE( "CCdcCommsDatCreatorRfsPlugin::StartProcessL end" );
       
   114     }
       
   115 
       
   116 // ----------------------------------------------------------------------------
       
   117 // CCdcCommsDatCreatorRfsPlugin::CCdcCommsDatCreatorRfsPlugin()
       
   118 // ----------------------------------------------------------------------------
       
   119 //   	
       
   120 CCdcCommsDatCreatorRfsPlugin::~CCdcCommsDatCreatorRfsPlugin()
       
   121     {
       
   122     }
       
   123