1 /* |
|
2 * Copyright (c) 2005 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: GPRS and Wlan status getter for sending Generic Alerts |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __NFEOBSERVER_H__ |
|
21 #define __NFEOBSERVER_H__ |
|
22 |
|
23 // SYSTEM INCLUDES |
|
24 #include <e32base.h> |
|
25 #include "DevEncProgressDlg.h" |
|
26 |
|
27 //Forward declarations |
|
28 class CDevEncController; |
|
29 class CDevEncSession; |
|
30 class CDevEncProgressDlg; |
|
31 //Constants used in this class |
|
32 |
|
33 const TTimeIntervalMicroSeconds32 KNfeTimeInterval = 500000; //0.5 second, duration between each retry. |
|
34 const KProgressComplete = 100; //100 percent |
|
35 |
|
36 /** |
|
37 * Actice object class that runs a timer for probing network status (GPRS & WLAN) |
|
38 * @lib fotaserver |
|
39 * @since S60 v3.2 |
|
40 */ |
|
41 NONSHARABLE_CLASS (CDevEncProgressObserver) : public MDEProgressDlgObserver |
|
42 { |
|
43 public: |
|
44 //Symbian 2-Phase construction |
|
45 |
|
46 IMPORT_C static CDevEncProgressObserver* NewL(CDevEncController* aObserver, TInt aResource); |
|
47 IMPORT_C static CDevEncProgressObserver* NewLC(CDevEncController* aObserver, TInt aResource); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 virtual ~CDevEncProgressObserver(); |
|
53 |
|
54 public: |
|
55 /** |
|
56 * Starts monitoring for Network status before sending Generic Alert |
|
57 * |
|
58 * @since S60 v5.2 |
|
59 * @param None |
|
60 * @return None |
|
61 */ |
|
62 |
|
63 void StartMonitoringL(CDevEncSession* aSession); |
|
64 |
|
65 public: // Functions from base classes |
|
66 |
|
67 void CheckProgressL(); |
|
68 |
|
69 TBool HandleDEProgressDialogExitL(TInt aButtonId); |
|
70 |
|
71 private: //functions |
|
72 |
|
73 //Constructors |
|
74 |
|
75 CDevEncProgressObserver(); |
|
76 CDevEncProgressObserver(CDevEncController* aObserver); |
|
77 |
|
78 //Symbian 2-Phase construction |
|
79 void ConstructL(TInt aResource); |
|
80 |
|
81 TInt GetStatusL(); |
|
82 |
|
83 |
|
84 private: // data |
|
85 |
|
86 |
|
87 CDevEncController* iObserver; |
|
88 |
|
89 CDevEncProgressDlg* iProgressDlg; |
|
90 |
|
91 CPeriodic* iPeriodicTimer; |
|
92 |
|
93 //Not owned |
|
94 CDevEncSession* iEncMemorySession; |
|
95 |
|
96 }; |
|
97 |
|
98 #endif // __NFEOBSERVER_H__ |
|
99 |
|
100 // End of File |
|