locationmanager/client/src/CTrackLogObserverAO.cpp
changeset 0 c53acadfccc6
equal deleted inserted replaced
-1:000000000000 0:c53acadfccc6
       
     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 "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 "CTrackLogObserverAO.h"
       
    19 #include "locationmanagerdebug.h"
       
    20 
       
    21 CTrackLogObserverAO::CTrackLogObserverAO( RTrackLog* aClient ) : 
       
    22 	CActive( CActive::EPriorityStandard )
       
    23 	{
       
    24 	CActiveScheduler::Add( this );
       
    25 	iClient = aClient;
       
    26 	}
       
    27 
       
    28 CTrackLogObserverAO::~CTrackLogObserverAO()
       
    29 	{
       
    30 	Cancel();
       
    31 	}
       
    32 
       
    33 void CTrackLogObserverAO::DoCancel()
       
    34 	{
       
    35 	
       
    36 	}
       
    37 
       
    38 void CTrackLogObserverAO::RunL()
       
    39 	{
       
    40 	LOG( "CTrackLogObserverAO::RunL()" );
       
    41 	iClient->TrackLogEvent( iStatus.Int() );
       
    42 	
       
    43 	StartObserving();
       
    44 	}
       
    45 	
       
    46 TInt CTrackLogObserverAO::StartObserving()
       
    47 	{
       
    48 	iClient->SendNotifyRequest( iStatus );
       
    49 	SetActive();
       
    50 	
       
    51 	return KErrNone;
       
    52 	}
       
    53