sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: sl@0: #include "uloggerwatcher.h" sl@0: sl@0: namespace Ulogger sl@0: { sl@0: sl@0: /* sl@0: NewL method sl@0: */ sl@0: CULoggerWatcher* CULoggerWatcher::NewL() sl@0: { sl@0: CULoggerWatcher* self = CULoggerWatcher::NewLC(); sl@0: CleanupStack::Pop(); //self sl@0: return self; sl@0: } sl@0: sl@0: /* sl@0: NewLC method sl@0: */ sl@0: CULoggerWatcher* CULoggerWatcher::NewLC() sl@0: { sl@0: CULoggerWatcher* self = new (ELeave) CULoggerWatcher(); sl@0: CleanupStack::PushL(self); sl@0: self->ConstructL(); sl@0: return self; sl@0: } sl@0: sl@0: /* sl@0: default constructor method sl@0: */ sl@0: CULoggerWatcher::CULoggerWatcher() sl@0: : CActive(CActive::EPriorityUserInput) sl@0: { sl@0: } sl@0: sl@0: /* sl@0: default destructor method sl@0: */ sl@0: sl@0: CULoggerWatcher::~CULoggerWatcher() sl@0: { sl@0: Cancel(); sl@0: } sl@0: sl@0: /* sl@0: ConstructL method sl@0: */ sl@0: void CULoggerWatcher::ConstructL() sl@0: { sl@0: CActiveScheduler::Add(this); sl@0: } sl@0: sl@0: /* sl@0: DoCancel method sl@0: */ sl@0: sl@0: void CULoggerWatcher::DoCancel() sl@0: { sl@0: } sl@0: sl@0: /* sl@0: RunL method sl@0: */ sl@0: sl@0: void CULoggerWatcher::RunL() sl@0: { sl@0: if(iStatus.Int() == KErrNone) sl@0: iObserver->DataNotification(); sl@0: } sl@0: sl@0: /* sl@0: StartWatching method sl@0: @aObserver sl@0: */ sl@0: sl@0: void CULoggerWatcher::StartWatching(MDataWatcherObserver* aObserver) sl@0: { sl@0: if(!IsActive()) sl@0: { sl@0: iObserver = aObserver; sl@0: SetActive(); sl@0: sl@0: } sl@0: } sl@0: sl@0: }//Namespace