|
1 /* |
|
2 * Copyright (c) 2008 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: Class declaration of cell change handler class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_LBTCELLCHANGEHANDLER_H |
|
20 #define C_LBTCELLCHANGEHANDLER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <etelmm.h> |
|
25 #include "lbtcellchangeobserver.h" |
|
26 |
|
27 |
|
28 /** |
|
29 * Cell change handler. It takes care of issuing requests to Etel for getting |
|
30 * notified about cell changes and it will report such events to its observer. |
|
31 */ |
|
32 class CLbtCellChangeHandler : public CActive |
|
33 { |
|
34 public: |
|
35 |
|
36 /** |
|
37 * Instantiation method. |
|
38 * |
|
39 * @param aMPhone handle to Etel API |
|
40 * @return pointer to new instance |
|
41 */ |
|
42 static CLbtCellChangeHandler* NewL(RMobilePhone& aMPhone ); |
|
43 |
|
44 /** |
|
45 * Default destructor |
|
46 */ |
|
47 virtual ~CLbtCellChangeHandler(); |
|
48 |
|
49 /** |
|
50 * Issues a new request and sets this object active. |
|
51 */ |
|
52 void GetNetworkInfo(); |
|
53 |
|
54 /** |
|
55 * Sets the observer to this class |
|
56 */ |
|
57 void SetObserver( MCellChangeObserver* aObserver ); |
|
58 |
|
59 /** |
|
60 * Remove the observer from the array. |
|
61 */ |
|
62 void Remove( MCellChangeObserver* aObserver ); |
|
63 protected: |
|
64 |
|
65 // methods from CActive |
|
66 virtual void RunL(); |
|
67 virtual void DoCancel(); |
|
68 |
|
69 private: |
|
70 |
|
71 |
|
72 /** |
|
73 * Constructor. |
|
74 * |
|
75 * @param aMPhone handle to Etel API |
|
76 * @param aObserver reference to observer object |
|
77 */ |
|
78 CLbtCellChangeHandler(RMobilePhone& aMPhone); |
|
79 |
|
80 /** |
|
81 * Second level constructor |
|
82 */ |
|
83 void ConstructL(); |
|
84 |
|
85 private: |
|
86 |
|
87 // data |
|
88 // etel api |
|
89 RMobilePhone& iMPhone; |
|
90 // Handle to cell change observers |
|
91 RPointerArray<MCellChangeObserver> iObserverArray; |
|
92 // Command id |
|
93 TInt iCommandId; |
|
94 // Network info |
|
95 RMobilePhone::TMobilePhoneNetworkInfoV1 iNwInfo; |
|
96 // Network info package |
|
97 RMobilePhone::TMobilePhoneNetworkInfoV1Pckg iNwInfoPckg; |
|
98 // location info |
|
99 RMobilePhone::TMobilePhoneLocationAreaV1 iLocArea; |
|
100 |
|
101 TInt iLastStatusInfo; |
|
102 |
|
103 }; |
|
104 |
|
105 #endif //C_LBTCELLCHANGEHANDLER_H |
|
106 |
|
107 // End of File |
|
108 |