|
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: This file contains the header file of |
|
15 * CIAUpdateRoamingHandler class |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __IAUPDATE_ROAMING_HANDLER_H__ |
|
21 #define __IAUPDATE_ROAMING_HANDLER_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 |
|
26 #include "iaupdatenetworkregistrationobserver.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class MIAUpdateRoamingHandlerObserver; |
|
30 class CIAUpdateNetworkRegistration; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 /** |
|
34 * |
|
35 */ |
|
36 |
|
37 class CIAUpdateRoamingHandler : public CBase, |
|
38 public MIAUpdateNetworkRegistrationObserver |
|
39 { |
|
40 public: |
|
41 |
|
42 /** |
|
43 * Construct a CIAUpdateRoamingHandler using two phase construction, |
|
44 * and return a pointer to the created object |
|
45 */ |
|
46 static CIAUpdateRoamingHandler* NewL(); |
|
47 |
|
48 /** |
|
49 * Destructor |
|
50 */ |
|
51 ~CIAUpdateRoamingHandler(); |
|
52 |
|
53 public: // from MIAUpdateNetworkRegistrationObserver |
|
54 |
|
55 /** |
|
56 * Called when status is monitored asynchronously |
|
57 * |
|
58 * @param aRoaming True value when roaming network |
|
59 */ |
|
60 void StatusMonitored( TBool aRoaming ); |
|
61 |
|
62 |
|
63 |
|
64 public: // new functions |
|
65 /** |
|
66 * Prepare handler asyncronously |
|
67 * |
|
68 * @param aObserver Observer interface to be called when async |
|
69 * preparing is completed |
|
70 */ |
|
71 void PrepareL( MIAUpdateRoamingHandlerObserver& aObserver ); |
|
72 |
|
73 /** |
|
74 * Cancel async PrepareL() request |
|
75 */ |
|
76 void CancelPreparing(); |
|
77 |
|
78 /** |
|
79 * |
|
80 */ |
|
81 TBool Prepared() const; |
|
82 |
|
83 /** |
|
84 * Is roaming network |
|
85 * @return True value if in roaming network |
|
86 */ |
|
87 TBool IsRoaming(); |
|
88 |
|
89 /** |
|
90 * Shows roaming warning dialog if needed |
|
91 * @return True value if network access rejected because of roaming warning |
|
92 */ |
|
93 TBool RoamingRejectionL(); |
|
94 |
|
95 |
|
96 private: |
|
97 |
|
98 /** |
|
99 * Perform the second phase construction of a CIAUpdateRoamingHandler object |
|
100 */ |
|
101 void ConstructL(); |
|
102 |
|
103 /** |
|
104 * C++ constructor |
|
105 */ |
|
106 CIAUpdateRoamingHandler(); |
|
107 |
|
108 private: //data |
|
109 |
|
110 CIAUpdateNetworkRegistration* iNwReg; |
|
111 |
|
112 MIAUpdateRoamingHandlerObserver* iObserver; //not owned |
|
113 |
|
114 TBool iRoaming; |
|
115 |
|
116 TBool iPreparing; |
|
117 |
|
118 TBool iPrepared; |
|
119 |
|
120 TBool iRoamingConnectionAccepted; |
|
121 }; |
|
122 |
|
123 |
|
124 #endif // __IAUPDATE_ROAMING_HANDLER_H__ |