sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
*
|
sl@0
|
16 |
*/
|
sl@0
|
17 |
|
sl@0
|
18 |
|
sl@0
|
19 |
#include "NGAPostProcNotifier.h"
|
sl@0
|
20 |
#include "NGAPostProcSessionManager.h"
|
sl@0
|
21 |
#include "MdfRDebug.h"
|
sl@0
|
22 |
|
sl@0
|
23 |
CNGAPostProcNotifier::CNGAPostProcNotifier( CNGAPostProcSessionManager& aParent )
|
sl@0
|
24 |
:CActive(CActive::EPriorityStandard),iParent(aParent)
|
sl@0
|
25 |
{
|
sl@0
|
26 |
CActiveScheduler::Add(this);
|
sl@0
|
27 |
}
|
sl@0
|
28 |
|
sl@0
|
29 |
CNGAPostProcNotifier::~CNGAPostProcNotifier()
|
sl@0
|
30 |
{
|
sl@0
|
31 |
Cancel();
|
sl@0
|
32 |
}
|
sl@0
|
33 |
|
sl@0
|
34 |
CNGAPostProcNotifier* CNGAPostProcNotifier::NewL( CNGAPostProcSessionManager& aParent )
|
sl@0
|
35 |
{
|
sl@0
|
36 |
CNGAPostProcNotifier* self = new (ELeave)CNGAPostProcNotifier(aParent);
|
sl@0
|
37 |
CleanupStack::PushL( self );
|
sl@0
|
38 |
self->ConstructL();
|
sl@0
|
39 |
CleanupStack::Pop( self );
|
sl@0
|
40 |
return self;
|
sl@0
|
41 |
}
|
sl@0
|
42 |
|
sl@0
|
43 |
void CNGAPostProcNotifier::ConstructL()
|
sl@0
|
44 |
{
|
sl@0
|
45 |
// No Impl
|
sl@0
|
46 |
}
|
sl@0
|
47 |
|
sl@0
|
48 |
void CNGAPostProcNotifier::SetBufferId(TInt aBufId)
|
sl@0
|
49 |
{
|
sl@0
|
50 |
iBufferId = aBufId;
|
sl@0
|
51 |
}
|
sl@0
|
52 |
|
sl@0
|
53 |
void CNGAPostProcNotifier::Activate()
|
sl@0
|
54 |
{
|
sl@0
|
55 |
PP_DEBUG(_L("CNGAPostProcNotifier:Activate ++"));
|
sl@0
|
56 |
if(!IsActive())
|
sl@0
|
57 |
{
|
sl@0
|
58 |
PP_DEBUG(_L("CNGAPostProcNotifier:Activate SetActive"));
|
sl@0
|
59 |
SetActive();
|
sl@0
|
60 |
}
|
sl@0
|
61 |
PP_DEBUG(_L("CNGAPostProcNotifier:Activate --"));
|
sl@0
|
62 |
}
|
sl@0
|
63 |
|
sl@0
|
64 |
void CNGAPostProcNotifier::RunL()
|
sl@0
|
65 |
{
|
sl@0
|
66 |
PP_DEBUG(_L("CNGAPostProcNotifier:RunL ++"));
|
sl@0
|
67 |
if (iStatus == KErrCancel)
|
sl@0
|
68 |
{
|
sl@0
|
69 |
PP_DEBUG(_L("CNGAPostProcNotifier[%x]:RunL State canceled"), this);
|
sl@0
|
70 |
return;
|
sl@0
|
71 |
}
|
sl@0
|
72 |
iParent.HandleBufferRelease(iBufferId, iStatus.Int());
|
sl@0
|
73 |
|
sl@0
|
74 |
PP_DEBUG(_L("CNGAPostProcNotifier:RunL --"));
|
sl@0
|
75 |
}
|
sl@0
|
76 |
|
sl@0
|
77 |
void CNGAPostProcNotifier::DoCancel()
|
sl@0
|
78 |
{
|
sl@0
|
79 |
}
|
sl@0
|
80 |
|
sl@0
|
81 |
TInt CNGAPostProcNotifier::RunError( TInt /*aError*/ )
|
sl@0
|
82 |
{
|
sl@0
|
83 |
PP_DEBUG(_L("CNGAPostProcNotifier[%x]:CNGAPostProcNotifier::RunError "), this);
|
sl@0
|
84 |
return KErrNone;
|
sl@0
|
85 |
}
|