--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/watchdog/inc/cwdmonitor.h Mon Apr 19 14:40:16 2010 +0300
@@ -0,0 +1,88 @@
+/*
+* Copyright (c) 2010 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: This application is to monitor Harvester and Search Server
+*
+*/
+
+
+#ifndef CWDMONITOR_H
+#define CWDMONITOR_H
+
+#include <e32base.h>
+#include "MWDTimerHandler.h"
+
+//Forward declaration
+class CWDTimer;
+
+class CWDMonitor : public CBase , public MWDTimerHandler
+ {
+public:
+ /*
+ * Construction
+ * @return instance of CWDMonitor
+ */
+ static CWDMonitor* NewL();
+ /*
+ * Construction
+ * @return instance of CWDMonitor
+ */
+ static CWDMonitor* NewLC();
+ /*
+ * Destructor
+ */
+ virtual ~CWDMonitor();
+public:
+
+ /*
+ * @description Starts the timer for monitoring the servers.
+ */
+ void StartMonitor();
+
+ // From MWDTimerHandler
+ void HandleWDTimerL();
+
+private:
+ /*
+ * @description Starts the specified server.
+ * @param TDesC& aServerName Name of the server to start
+ * @param TUid aServerUid uid of the server to start
+ * @param TDesC& aSemaphoreName Name of the semaphore
+ * @return KErrNone on succesful operation.
+ */
+ TInt StartServer( const TDesC& aServerName , TUid aServerUid ,
+ const TDesC& aSemaphoreName);
+
+ /*
+ * @description creates the specified server process.
+ * @param TDesC& aServerName Name of the server to start
+ * @param TUid aServerUid uid of the server to start
+ * @return KErrNone on succesful operation.
+ */
+ TInt CreateServerProcess( const TDesC& aServerName , TUid aServerUid );
+ /*
+ * Constructor
+ */
+ CWDMonitor();
+ /*
+ * Second phase constructor
+ */
+ void ConstructL();
+
+private:
+
+ // Timer which is used to delay server monitoring
+ CWDTimer* iWDTimer;
+ };
+
+#endif /* CWDMONITOR_H */