sl@0: // Copyright (c) 2002-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: #include "LogViewWindowLockObserver.h" sl@0: sl@0: // User includes sl@0: #include "logservcli.h" sl@0: sl@0: sl@0: ///////////////////////////////////////////////////////////////////////////////////////// sl@0: // -----> CLogViewWindowLockObserver (source) sl@0: ///////////////////////////////////////////////////////////////////////////////////////// sl@0: sl@0: CLogViewWindowLockObserver::CLogViewWindowLockObserver(RLogSession& aSession, TLogViewId aViewId, MLogViewWindowLockObserver& aObserver, TInt aPriority) sl@0: : CLogActive(aPriority), iSession(aSession), iViewId(aViewId), iObserver(aObserver) sl@0: { sl@0: } sl@0: sl@0: CLogViewWindowLockObserver::~CLogViewWindowLockObserver() sl@0: { sl@0: Cancel(); sl@0: } sl@0: sl@0: void CLogViewWindowLockObserver::ConstructL() sl@0: { sl@0: IssueRequest(); sl@0: } sl@0: sl@0: ///////////////////////////////////////////////////////////////////////////////////////// sl@0: ///////////////////////////////////////////////////////////////////////////////////////// sl@0: ///////////////////////////////////////////////////////////////////////////////////////// sl@0: sl@0: void CLogViewWindowLockObserver::DoRunL() sl@0: { sl@0: User::LeaveIfError(iStatus.Int()); sl@0: const TLogViewLockStatus state = static_cast(iStatus.Int()); sl@0: // sl@0: IssueRequest(); sl@0: iObserver.HandleWindowLockStatusChangeL(state); sl@0: } sl@0: sl@0: void CLogViewWindowLockObserver::DoCancel() sl@0: { sl@0: iSession.Send(ELogViewNotifyLockStatusChangeCancel, TIpcArgs(iViewId)); sl@0: } sl@0: sl@0: TInt CLogViewWindowLockObserver::RunError(TInt /*aError*/) sl@0: { sl@0: return KErrNone; sl@0: } sl@0: sl@0: sl@0: ///////////////////////////////////////////////////////////////////////////////////////// sl@0: ///////////////////////////////////////////////////////////////////////////////////////// sl@0: ///////////////////////////////////////////////////////////////////////////////////////// sl@0: sl@0: void CLogViewWindowLockObserver::IssueRequest() sl@0: { sl@0: iSession.Send(ELogViewNotifyLockStatusChange, TIpcArgs(iViewId), iStatus); sl@0: SetActive(); sl@0: } sl@0: