vpnengine/dmadipsecvpn/inc/eventlogger.h
changeset 0 33413c0669b9
equal deleted inserted replaced
-1:000000000000 0:33413c0669b9
       
     1 /*
       
     2 * Copyright (c) 2003-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: Class definition of CEventLogger.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __EVENTLOGGER_H__
       
    21 #define __EVENTLOGGER_H__
       
    22 
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 #include "eventmediatorapi.h"
       
    27 #include "vpnapi.h"
       
    28 
       
    29 class CEventLogger : CBase
       
    30   	{
       
    31 public:
       
    32     static CEventLogger* NewL();
       
    33     void LogEvent(RVpnServ& vpnApi, TUint aMsgId, const TDesC* aDes1, TInt aInt1, TInt aInt2);
       
    34     ~CEventLogger();
       
    35 
       
    36 private:
       
    37     CEventLogger();
       
    38     void ConstructL();
       
    39     void LogEvent(TUint aMsgId, const TDesC8* aDes1, TInt aInt1, TInt aInt2);
       
    40     
       
    41 private:
       
    42     REventMediator iEventMediator;
       
    43 	};
       
    44 
       
    45 #define DEFINE_EVENT_LOGGER         CEventLogger* iEventLogger;
       
    46 #define INIT_EVENT_LOGGER           TRAP_IGNORE(iEventLogger = CEventLogger::NewL(););
       
    47 #define RELEASE_EVENT_LOGGER        delete iEventLogger; iEventLogger = NULL;
       
    48 
       
    49 #define LOG_EVENT(a, b, c, d, e)       if (iEventLogger) iEventLogger->LogEvent(a, b, c, d, e);
       
    50 
       
    51 #endif // __EVENTLOGGER_H__