iadstoprestart/src/iadrestart.cpp
changeset 0 c53acadfccc6
child 40 910a23996aa0
equal deleted inserted replaced
-1:000000000000 0:c53acadfccc6
       
     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 "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:  Helper application to restart servers for IAD upgrade
       
    15 *
       
    16 */
       
    17 
       
    18 #include <e32base.h>
       
    19 #include <e32std.h>  
       
    20 #include <e32property.h>
       
    21 
       
    22 #include "mdscommoninternal.h"
       
    23 #include "iadrestart.h"
       
    24 
       
    25 // Print macro
       
    26 #ifdef _DEBUG
       
    27 #include <e32svr.h>
       
    28 #define PRINT(x) RDebug::Print x
       
    29 #else
       
    30 #define PRINT(x)
       
    31 #endif
       
    32 
       
    33 LOCAL_C void MainL()
       
    34     {
       
    35     
       
    36     PRINT(_L("IADRestart - Reset key"));
       
    37 
       
    38 	// reset key
       
    39     RProperty::Set(KWatchdogPSShutdown,KShutdown,0);
       
    40     
       
    41     // reset key
       
    42     RProperty::Set(KMdSPSShutdown,KShutdown,0);
       
    43     RProperty::Set(KHarvesterPSShutdown,KShutdown,0);
       
    44 
       
    45     }
       
    46 
       
    47 GLDEF_C TInt E32Main()
       
    48     {
       
    49     // Create cleanup stack
       
    50     __UHEAP_MARK;
       
    51     CTrapCleanup* cleanup = CTrapCleanup::New();
       
    52 
       
    53     // Run application code inside TRAP harness
       
    54     TInt err = KErrNone;
       
    55     TRAP(err, MainL());
       
    56 
       
    57     delete cleanup;
       
    58     __UHEAP_MARKEND;
       
    59     return err;
       
    60     }
       
    61 
       
    62 // End of file