|
1 /* |
|
2 * Copyright (c) 2009 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: Juha Kauppinen, Mika Hokkanen |
|
13 * |
|
14 * Description: Photo Browser |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "IEImagicBGPSAO.h" |
|
19 #include "debug.h" |
|
20 |
|
21 CImagicBGPSAO* CImagicBGPSAO::NewL(MIETNInternalObserver& aObserver) |
|
22 { |
|
23 CImagicBGPSAO* self = new (ELeave) CImagicBGPSAO(aObserver); |
|
24 CleanupStack::PushL(self); |
|
25 self->ConstructL(); |
|
26 CleanupStack::Pop(); |
|
27 return self; |
|
28 } |
|
29 |
|
30 CImagicBGPSAO::~CImagicBGPSAO() |
|
31 { |
|
32 DP0_IMAGIC((_L("CIETNGeneratorAO::SetImageArray --"))); |
|
33 DeActivateTNCreatoAO(); |
|
34 DP0_IMAGIC((_L("CIETNGeneratorAO::SetImageArray --"))); |
|
35 } |
|
36 |
|
37 //EPriorityIdle, EPriorityLow, EPriorityStandard, EPriorityUserInput, EPriorityHigh |
|
38 CImagicBGPSAO::CImagicBGPSAO(MIETNInternalObserver& aObserver) |
|
39 : CActive(EPriorityIdle), |
|
40 iIETNObserver(aObserver) |
|
41 { |
|
42 |
|
43 } |
|
44 |
|
45 void CImagicBGPSAO::ConstructL() |
|
46 { |
|
47 CActiveScheduler::Add(this); |
|
48 } |
|
49 |
|
50 void CImagicBGPSAO::RunL() |
|
51 { |
|
52 TInt error = iStatus.Int(); |
|
53 iIETNObserver.HandleEvents((TBGPSEventCode)iStatus.Int()); |
|
54 } |
|
55 |
|
56 void CImagicBGPSAO::DoCancel() |
|
57 { |
|
58 } |
|
59 |
|
60 TInt CImagicBGPSAO::RunError(TInt /*aError*/) |
|
61 { |
|
62 return KErrNone; |
|
63 } |
|
64 |
|
65 void CImagicBGPSAO::ActivateTNCreatorAO() |
|
66 { |
|
67 if(!IsActive()) |
|
68 SetActive(); |
|
69 } |
|
70 |
|
71 void CImagicBGPSAO::DeActivateTNCreatoAO() |
|
72 { |
|
73 DP0_IMAGIC((_L("CIETNGeneratorAO::DeActivateTNCreatoAO ++"))); |
|
74 if(IsActive()) |
|
75 Cancel(); |
|
76 DP0_IMAGIC((_L("CIETNGeneratorAO::DeActivateTNCreatoAO --"))); |
|
77 } |
|
78 |
|
79 |