|
1 /* |
|
2 * Copyright (c) 2007 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: Observes the status of the GPRS connection |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CSATBIPCONNECTIONOBSERVER_H |
|
21 #define CSATBIPCONNECTIONOBSERVER_H |
|
22 |
|
23 |
|
24 #include "CSatBIPUtils.h" |
|
25 |
|
26 |
|
27 /** |
|
28 * Observes the GPRS network status and stores current value. |
|
29 * |
|
30 * @lib SatEngine.lib |
|
31 * @since Series 60 3.0 |
|
32 */ |
|
33 class CSatBIPConnectionObserver : public CActive |
|
34 { |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Default constructor. |
|
39 * @param aBipUtils Reference to BIP utils class. |
|
40 */ |
|
41 CSatBIPConnectionObserver( CSatBIPUtils& aBipUtils ); |
|
42 |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 virtual ~CSatBIPConnectionObserver(); |
|
47 |
|
48 /** |
|
49 * From CActive. Connection status changed |
|
50 */ |
|
51 void RunL(); |
|
52 |
|
53 /** |
|
54 * From CActive. Cancels any outgoing requests |
|
55 */ |
|
56 void DoCancel(); |
|
57 |
|
58 /** |
|
59 * Starts observing the connection status |
|
60 */ |
|
61 void StartObserver(); |
|
62 |
|
63 /** |
|
64 * Current status of the GPRS sefvice |
|
65 * @return Current status of the GPRS service |
|
66 */ |
|
67 RPacketService::TStatus Status() const; |
|
68 |
|
69 private: |
|
70 |
|
71 /** |
|
72 * Reference to CSatBIPUtils class. |
|
73 */ |
|
74 CSatBIPUtils& iBipUtils; |
|
75 |
|
76 /** |
|
77 * Current status of the GPRS network |
|
78 */ |
|
79 RPacketService::TStatus iConnectionStatus; |
|
80 |
|
81 /** |
|
82 * Last status of the GPRS network |
|
83 */ |
|
84 RPacketService::TStatus iPrevConnectionStatus; |
|
85 }; |
|
86 |
|
87 #endif // CSATBIPCONNECTIONOBSERVER_H |