|
1 /* |
|
2 * Copyright (c) 2010 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: Positioning Indicator Helper Client Requestor |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <s32strm.h> |
|
23 #include <s32mem.h> |
|
24 |
|
25 #include "posindhelperclientrequester.h" |
|
26 #include "posindicatorhelper.h" |
|
27 |
|
28 // ================= MEMBER FUNCTIONS ======================= |
|
29 |
|
30 // --------------------------------------------------------- |
|
31 // CPosIndHelperClientRequester::CPosIndHelperClientRequester |
|
32 // |
|
33 // Default constructor |
|
34 // --------------------------------------------------------- |
|
35 // |
|
36 CPosIndHelperClientRequester::CPosIndHelperClientRequester( |
|
37 MServerRequestCompletetionObserver& aServerRequestCompletetionObserver ): |
|
38 CActive(EPriorityStandard),iServerRequestCompletetionObserver(aServerRequestCompletetionObserver) |
|
39 { |
|
40 FUNC("+ CPosIndHelperClientRequester::CPosIndHelperClientRequester"); |
|
41 CActiveScheduler::Add(this); |
|
42 FUNC("- CPosIndHelperClientRequester::CPosIndHelperClientRequester"); |
|
43 } |
|
44 |
|
45 // --------------------------------------------------------------------------- |
|
46 // CPosIndHelperClientRequester::ConstructL() |
|
47 // Symbian 2nd phase constructor can leave. |
|
48 // --------------------------------------------------------------------------- |
|
49 // |
|
50 void CPosIndHelperClientRequester::ConstructL() |
|
51 { |
|
52 FUNC("+ CPosIndHelperClientRequester::ConstructL"); |
|
53 FUNC("- CPosIndHelperClientRequester::ConstructL"); |
|
54 } |
|
55 |
|
56 // --------------------------------------------------------------------------- |
|
57 // CPosIndHelperClientRequester::NewL() |
|
58 // |
|
59 // (other items were commented in a header). |
|
60 // --------------------------------------------------------------------------- |
|
61 // |
|
62 CPosIndHelperClientRequester* CPosIndHelperClientRequester::NewL( |
|
63 MServerRequestCompletetionObserver& aServerRequestCompletetionObserver ) |
|
64 { |
|
65 FUNC("+ CPosIndHelperClientRequester::NewL"); |
|
66 CPosIndHelperClientRequester* self = new (ELeave) CPosIndHelperClientRequester( |
|
67 aServerRequestCompletetionObserver ); |
|
68 CleanupStack::PushL(self); |
|
69 self->ConstructL(); |
|
70 CleanupStack::Pop(self); |
|
71 return self; |
|
72 } |
|
73 |
|
74 |
|
75 // --------------------------------------------------------------------------- |
|
76 // CPosIndHelperClientRequester::~CPosIndHelperClientRequester() |
|
77 // Destructor |
|
78 // --------------------------------------------------------------------------- |
|
79 // |
|
80 CPosIndHelperClientRequester::~CPosIndHelperClientRequester() |
|
81 { |
|
82 FUNC("+ CPosIndHelperClientRequester::~CPosIndHelperClientRequester"); |
|
83 Cancel(); |
|
84 FUNC("- CPosIndHelperClientRequester::~CPosIndHelperClientRequester"); |
|
85 } |
|
86 |
|
87 |
|
88 // --------------------------------------------------------- |
|
89 // CPosIndHelperClientRequester::Start |
|
90 // |
|
91 // (other items were commented in a header). |
|
92 // --------------------------------------------------------- |
|
93 // |
|
94 void CPosIndHelperClientRequester::Start(TServiceIds aServiceId ) |
|
95 { |
|
96 FUNC("+ CPosIndHelperClientRequester::Start"); |
|
97 iServiceId = aServiceId; |
|
98 SetActive(); |
|
99 FUNC("- CPosIndHelperClientRequester::Start"); |
|
100 } |
|
101 |
|
102 // --------------------------------------------------------- |
|
103 // CPosIndHelperClientRequester::RunL |
|
104 // |
|
105 // (other items were commented in a header). |
|
106 // --------------------------------------------------------- |
|
107 // |
|
108 void CPosIndHelperClientRequester::RunL() |
|
109 { |
|
110 FUNC("+ CPosIndHelperClientRequester::RunL"); |
|
111 LOG("Error code : %d", iStatus.Int()); |
|
112 iServerRequestCompletetionObserver.NotifyServerRequestCompletion( iServiceId, iStatus.Int() ); |
|
113 FUNC("- CPosIndHelperClientRequester::RunL"); |
|
114 } |
|
115 |
|
116 |
|
117 // --------------------------------------------------------- |
|
118 // CPosIndHelperClientRequester::RunError |
|
119 // |
|
120 // (other items were commented in a header). |
|
121 // --------------------------------------------------------- |
|
122 // |
|
123 TInt CPosIndHelperClientRequester::RunError(TInt /*aError*/) |
|
124 { |
|
125 FUNC("+ CPosIndHelperClientRequester::RunError"); |
|
126 return KErrNone; |
|
127 } |
|
128 |
|
129 // --------------------------------------------------------- |
|
130 // CPosIndHelperClientRequester::DoCancel |
|
131 // |
|
132 // (other items were commented in a header). |
|
133 // --------------------------------------------------------- |
|
134 // |
|
135 void CPosIndHelperClientRequester::DoCancel() |
|
136 { |
|
137 FUNC("+ CPosIndHelperClientRequester::DoCancel"); |
|
138 // iServerRequestCompletetionObserver.NotifyServerRequestCompletion( iServiceId, iStatus.Int() ); |
|
139 FUNC("- CPosIndHelperClientRequester::DoCancel"); |
|
140 } |
|
141 // End of File |
|
142 |
|
143 |