iadstoprestart/src/iadrestart.cpp
changeset 0 c53acadfccc6
child 19 b73252188534
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iadstoprestart/src/iadrestart.cpp	Mon Jan 18 20:34:07 2010 +0200
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Helper application to restart servers for IAD upgrade
+*
+*/
+
+#include <e32base.h>
+#include <e32std.h>  
+#include <e32property.h>
+
+#include "mdscommoninternal.h"
+#include "iadrestart.h"
+
+// Print macro
+#ifdef _DEBUG
+#include <e32svr.h>
+#define PRINT(x) RDebug::Print x
+#else
+#define PRINT(x)
+#endif
+
+LOCAL_C void MainL()
+    {
+    
+    PRINT(_L("IADRestart - Reset key"));
+
+	// reset key
+    RProperty::Set(KWatchdogPSShutdown,KShutdown,0);
+    
+    // reset key
+    RProperty::Set(KMdSPSShutdown,KShutdown,0);
+    RProperty::Set(KHarvesterPSShutdown,KShutdown,0);
+
+    }
+
+GLDEF_C TInt E32Main()
+    {
+    // Create cleanup stack
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+
+    // Run application code inside TRAP harness
+    TInt err = KErrNone;
+    TRAP(err, MainL());
+
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return err;
+    }
+
+// End of file