watchdog/inc/servermonitor.h
changeset 23 d4d56f5e7c55
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/watchdog/inc/servermonitor.h	Tue Oct 05 13:15:12 2010 +0530
@@ -0,0 +1,69 @@
+/*
+* 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:  Monitoring application for servers restarting & IAD
+*
+*/
+
+#ifndef SERVERMONITOR_H
+#define SERVERMONITOR_H
+
+#include <e32base.h>
+
+class CServerMonitor : public CActive
+    {
+    public:
+    
+        enum TServerState
+            {
+            EIdle,
+            EWaitingRendezvous,
+            ERunning
+        };
+
+        static CServerMonitor* NewL( TDesC& aServerName , TUid aServerUid );
+	    virtual ~CServerMonitor();
+
+        // from base class CActive
+	    void RunL();
+        TInt RunError( TInt aError );
+	    void DoCancel();
+		
+		void ShutdownServer();
+
+    private:
+
+        CServerMonitor();
+        
+        void ConstructL( TDesC& aServerName , TUid aServerUid );
+        
+        void StartL();
+        
+        void StartServerProcessL();
+        
+        void CreateServerProcess();
+
+    private: // data
+
+        TServerState iState;
+        
+        RProcess iProcess;
+		
+		HBufC* iServerName;
+		
+		TUid iServerUid;
+  
+    };
+
+
+#endif //SERVERMONITOR_H