vpnengine/dmadipsecvpn/inc/eventlogger.h
changeset 0 33413c0669b9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vpnengine/dmadipsecvpn/inc/eventlogger.h	Thu Dec 17 09:14:51 2009 +0200
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2003-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: Class definition of CEventLogger.
+*
+*/
+
+
+
+#ifndef __EVENTLOGGER_H__
+#define __EVENTLOGGER_H__
+
+
+#include <e32base.h>
+
+#include "eventmediatorapi.h"
+#include "vpnapi.h"
+
+class CEventLogger : CBase
+  	{
+public:
+    static CEventLogger* NewL();
+    void LogEvent(RVpnServ& vpnApi, TUint aMsgId, const TDesC* aDes1, TInt aInt1, TInt aInt2);
+    ~CEventLogger();
+
+private:
+    CEventLogger();
+    void ConstructL();
+    void LogEvent(TUint aMsgId, const TDesC8* aDes1, TInt aInt1, TInt aInt2);
+    
+private:
+    REventMediator iEventMediator;
+	};
+
+#define DEFINE_EVENT_LOGGER         CEventLogger* iEventLogger;
+#define INIT_EVENT_LOGGER           TRAP_IGNORE(iEventLogger = CEventLogger::NewL(););
+#define RELEASE_EVENT_LOGGER        delete iEventLogger; iEventLogger = NULL;
+
+#define LOG_EVENT(a, b, c, d, e)       if (iEventLogger) iEventLogger->LogEvent(a, b, c, d, e);
+
+#endif // __EVENTLOGGER_H__