sapi_logging/tsrc/dev/tloggingservice/src/tgetevent3.cpp
changeset 0 14df0fbfcc4e
equal deleted inserted replaced
-1:000000000000 0:14df0fbfcc4e
       
     1 /*
       
     2 * Copyright (c) 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 the License "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:  
       
    15 *
       
    16 */
       
    17 
       
    18 #include <e32svr.h>
       
    19 #include <e32std.h>
       
    20 #include <StifParser.h>
       
    21 #include <Stiftestinterface.h>
       
    22 #include <logcli.h>
       
    23 #include <logwrap.h>
       
    24 
       
    25 #include "loggingasyncservice.h"
       
    26 #include "loggingservice.h"
       
    27 #include "loggingfilter.h"
       
    28 
       
    29 #include "tlogging.h"
       
    30 #include "tlogcallback.h"
       
    31 #include "loggingevent.h"
       
    32 
       
    33 //------------------------------------------------------------
       
    34 // Get an event details on the eventid
       
    35 //-------------------------------------------------------------
       
    36 
       
    37 TInt getEvent3(void) 
       
    38 {
       
    39 	_LIT(KOwnEventSubject, "RandomLogEvent");
       
    40 	_LIT(KOwnEventRemoteParty, "OwnContact");
       
    41 	CLoggingService *LogService = CLoggingService :: NewL() ;
       
    42 	CLogsFilter *filter = CLogsFilter :: NewL() ;
       
    43     filter->SetRequestType(EGetEvent) ;
       
    44     CLogsEvent *updatedEvent   = CLogsEvent :: NewL() ;
       
    45 	updatedEvent->SetId(785) ;
       
    46 	 filter->SetEventL(updatedEvent) ;
       
    47  	MLogCallback Mycb ;
       
    48    
       
    49 	TInt ret = LogService->GetListL(1 , filter , &Mycb) ;
       
    50 	Mycb.Start() ;
       
    51     
       
    52     if(ret == KErrArgument)
       
    53     	{
       
    54     	ret = KErrNone ;
       
    55     	}
       
    56 
       
    57 
       
    58 	delete updatedEvent ;
       
    59 	delete LogService ;
       
    60 	delete filter;
       
    61 	return ret ;
       
    62 }