|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef PSETNETWORKWRAPPERPRIVATE_H |
|
19 #define PSETNETWORKWRAPPERPRIVATE_H |
|
20 |
|
21 #include <mpsetnetworkinfoobs.h> |
|
22 #include <mpsetnetworkmodeobs.h> |
|
23 #include <mpsetnetworkselect.h> |
|
24 #include <QList> |
|
25 #include <MSSSettingsRefreshObserver.h> |
|
26 #include "psetnetworkwrapper.h" |
|
27 |
|
28 class PSetNetworkWrapper; |
|
29 class CPsetContainer; |
|
30 class CPsetNetwork; |
|
31 class CPsetCustomerServiceProfile; |
|
32 class CPSetRefreshHandler; |
|
33 |
|
34 class PSetNetworkWrapperPrivate |
|
35 : |
|
36 public MPsetNetworkInfoObserver, |
|
37 public MPsetNetworkModeObserver, |
|
38 public MSSSettingsRefreshObserver |
|
39 { |
|
40 public: |
|
41 |
|
42 PSetNetworkWrapperPrivate( |
|
43 PSetNetworkWrapper &owner, |
|
44 CPsetContainer &psetContainer); |
|
45 |
|
46 virtual ~PSetNetworkWrapperPrivate(); |
|
47 |
|
48 public: |
|
49 |
|
50 void getAvailableNetworks(); |
|
51 |
|
52 PSetNetworkWrapper::ErrorCode getNetworkSelectionMode( |
|
53 PSetNetworkWrapper::NetworkSelectionMode& mode) const; |
|
54 |
|
55 void selectNetwork( |
|
56 const PSetNetworkWrapper::NetworkInfo& info); |
|
57 |
|
58 void cancelRequest(); |
|
59 |
|
60 public: |
|
61 |
|
62 void getNetworkAccessMode() const; |
|
63 |
|
64 void setNetworkAccessMode(PSetNetworkWrapper::NetworkAccessMode mode); |
|
65 |
|
66 bool isManualNetworkSelectionSupported() const; |
|
67 |
|
68 public: // From MPsetNetworkInfoObserver |
|
69 |
|
70 void HandleNetworkInfoReceivedL( |
|
71 const CNetworkInfoArray* aInfoArray, |
|
72 const TInt aResult ); |
|
73 |
|
74 void HandleCurrentNetworkInfoL( |
|
75 const MPsetNetworkSelect::TCurrentNetworkInfo& aCurrentInfo, |
|
76 const TInt aResult ); |
|
77 |
|
78 void HandleNetworkChangedL( |
|
79 const MPsetNetworkSelect::TNetworkInfo& aCurrentInfo, |
|
80 const MPsetNetworkSelect::TCurrentNetworkStatus aStatus, |
|
81 const TInt aResult ); |
|
82 |
|
83 void HandleNetworkChangedL( |
|
84 const MPsetNetworkSelect::TNetworkInfo& aCurrentInfo, |
|
85 const RMobilePhone::TMobilePhoneRegistrationStatus& aStatus, |
|
86 const TInt aResult ); |
|
87 |
|
88 void HandleSearchingNetworksL( |
|
89 MPsetNetworkInfoObserver::TServiceRequest aRequest ); |
|
90 |
|
91 void HandleRequestingSelectedNetworkL( |
|
92 TBool aOngoing ); |
|
93 |
|
94 void HandleCallActivatedL(); |
|
95 |
|
96 void HandleNetworkErrorL( |
|
97 const MPsetNetworkInfoObserver::TServiceRequest aRequest, |
|
98 const TInt aError ); |
|
99 |
|
100 public: // From MPsetNetworkModeObserver |
|
101 |
|
102 void HandleNetworkSystemModeEventsL( |
|
103 const MPsetNetworkModeObserver::TServiceRequest aRequest, |
|
104 const TUint32 aNetworkModeCaps ); |
|
105 |
|
106 void HandleNetworkErrorL( |
|
107 const MPsetNetworkModeObserver::TServiceRequest aRequest, |
|
108 const TInt aError ); |
|
109 |
|
110 public: // From MSSSettingsRefreshObserver |
|
111 |
|
112 TBool AllowRefresh( |
|
113 const TSatRefreshType aType, |
|
114 const TSatElementaryFiles aFiles ); |
|
115 |
|
116 void Refresh( |
|
117 const TSatRefreshType aType, |
|
118 const TSatElementaryFiles aFiles ); |
|
119 |
|
120 private: |
|
121 |
|
122 PSetNetworkWrapper::ErrorCode ConvertToQtErrorCode( |
|
123 TInt symbianErrorCode) const; |
|
124 |
|
125 private: |
|
126 |
|
127 /*! Owner. */ |
|
128 PSetNetworkWrapper &m_owner; |
|
129 |
|
130 // TODO: better comments |
|
131 /*! Own. Network object used to observe network information. */ |
|
132 QScopedPointer<CPsetNetwork> m_psetNetwork; |
|
133 |
|
134 /*! Own. Network object used to observe network mode changes. */ |
|
135 QScopedPointer<CPsetNetwork> m_psetNetworkMode; |
|
136 |
|
137 QList<PSetNetworkWrapper::NetworkInfo*> m_networkInfoList; |
|
138 |
|
139 /*! Own. */ |
|
140 QScopedPointer<CPsetCustomerServiceProfile> m_csp; |
|
141 |
|
142 /*! Own. */ |
|
143 QScopedPointer<CPSetRefreshHandler> m_refreshHandler; |
|
144 |
|
145 }; |
|
146 |
|
147 #endif // PSETNETWORKWRAPPERPRIVATE_H |