sl@0: /* sl@0: * Copyright (c) 2006 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: sl@0: #include "NGAPostProcNotifier.h" sl@0: #include "NGAPostProcSessionManager.h" sl@0: #include "MdfRDebug.h" sl@0: sl@0: CNGAPostProcNotifier::CNGAPostProcNotifier( CNGAPostProcSessionManager& aParent ) sl@0: :CActive(CActive::EPriorityStandard),iParent(aParent) sl@0: { sl@0: CActiveScheduler::Add(this); sl@0: } sl@0: sl@0: CNGAPostProcNotifier::~CNGAPostProcNotifier() sl@0: { sl@0: Cancel(); sl@0: } sl@0: sl@0: CNGAPostProcNotifier* CNGAPostProcNotifier::NewL( CNGAPostProcSessionManager& aParent ) sl@0: { sl@0: CNGAPostProcNotifier* self = new (ELeave)CNGAPostProcNotifier(aParent); sl@0: CleanupStack::PushL( self ); sl@0: self->ConstructL(); sl@0: CleanupStack::Pop( self ); sl@0: return self; sl@0: } sl@0: sl@0: void CNGAPostProcNotifier::ConstructL() sl@0: { sl@0: // No Impl sl@0: } sl@0: sl@0: void CNGAPostProcNotifier::SetBufferId(TInt aBufId) sl@0: { sl@0: iBufferId = aBufId; sl@0: } sl@0: sl@0: void CNGAPostProcNotifier::Activate() sl@0: { sl@0: PP_DEBUG(_L("CNGAPostProcNotifier:Activate ++")); sl@0: if(!IsActive()) sl@0: { sl@0: PP_DEBUG(_L("CNGAPostProcNotifier:Activate SetActive")); sl@0: SetActive(); sl@0: } sl@0: PP_DEBUG(_L("CNGAPostProcNotifier:Activate --")); sl@0: } sl@0: sl@0: void CNGAPostProcNotifier::RunL() sl@0: { sl@0: PP_DEBUG(_L("CNGAPostProcNotifier:RunL ++")); sl@0: //KErrCancel should never get invoked Since cancellation handled syncronously under AO's sl@0: //DoCancel. sl@0: iParent.HandleBufferRelease(iBufferId, iStatus.Int()); sl@0: sl@0: PP_DEBUG(_L("CNGAPostProcNotifier:RunL --")); sl@0: } sl@0: sl@0: void CNGAPostProcNotifier::DoCancel() sl@0: { sl@0: iParent.CancelUpdate(); sl@0: } sl@0: sl@0: TInt CNGAPostProcNotifier::RunError( TInt /*aError*/ ) sl@0: { sl@0: PP_DEBUG(_L("CNGAPostProcNotifier[%x]:CNGAPostProcNotifier::RunError "), this); sl@0: return KErrNone; sl@0: }