|
1 /* |
|
2 * Copyright (c) 2006 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 |
|
19 #include "NGAPostProcNotifier.h" |
|
20 #include "NGAPostProcSessionManager.h" |
|
21 #include "MdfRDebug.h" |
|
22 |
|
23 CNGAPostProcNotifier::CNGAPostProcNotifier( CNGAPostProcSessionManager& aParent ) |
|
24 :CActive(CActive::EPriorityStandard),iParent(aParent) |
|
25 { |
|
26 CActiveScheduler::Add(this); |
|
27 } |
|
28 |
|
29 CNGAPostProcNotifier::~CNGAPostProcNotifier() |
|
30 { |
|
31 Cancel(); |
|
32 } |
|
33 |
|
34 CNGAPostProcNotifier* CNGAPostProcNotifier::NewL( CNGAPostProcSessionManager& aParent ) |
|
35 { |
|
36 CNGAPostProcNotifier* self = new (ELeave)CNGAPostProcNotifier(aParent); |
|
37 CleanupStack::PushL( self ); |
|
38 self->ConstructL(); |
|
39 CleanupStack::Pop( self ); |
|
40 return self; |
|
41 } |
|
42 |
|
43 void CNGAPostProcNotifier::ConstructL() |
|
44 { |
|
45 // No Impl |
|
46 } |
|
47 |
|
48 void CNGAPostProcNotifier::SetBufferId(TInt aBufId) |
|
49 { |
|
50 iBufferId = aBufId; |
|
51 } |
|
52 |
|
53 void CNGAPostProcNotifier::Activate() |
|
54 { |
|
55 PP_DEBUG(_L("CNGAPostProcNotifier:Activate ++")); |
|
56 if(!IsActive()) |
|
57 { |
|
58 PP_DEBUG(_L("CNGAPostProcNotifier:Activate SetActive")); |
|
59 SetActive(); |
|
60 } |
|
61 PP_DEBUG(_L("CNGAPostProcNotifier:Activate --")); |
|
62 } |
|
63 |
|
64 void CNGAPostProcNotifier::RunL() |
|
65 { |
|
66 PP_DEBUG(_L("CNGAPostProcNotifier:RunL ++")); |
|
67 if (iStatus == KErrCancel) |
|
68 { |
|
69 PP_DEBUG(_L("CNGAPostProcNotifier[%x]:RunL State canceled"), this); |
|
70 return; |
|
71 } |
|
72 iParent.HandleBufferRelease(iBufferId, iStatus.Int()); |
|
73 |
|
74 PP_DEBUG(_L("CNGAPostProcNotifier:RunL --")); |
|
75 } |
|
76 |
|
77 void CNGAPostProcNotifier::DoCancel() |
|
78 { |
|
79 } |
|
80 |
|
81 TInt CNGAPostProcNotifier::RunError( TInt /*aError*/ ) |
|
82 { |
|
83 PP_DEBUG(_L("CNGAPostProcNotifier[%x]:CNGAPostProcNotifier::RunError "), this); |
|
84 return KErrNone; |
|
85 } |