equal
deleted
inserted
replaced
27 #include <e32base.h> |
27 #include <e32base.h> |
28 #include <rconnmon.h> |
28 #include <rconnmon.h> |
29 #include <etel.h> // RTelServer |
29 #include <etel.h> // RTelServer |
30 #include <etelmm.h> // RMobilePhone |
30 #include <etelmm.h> // RMobilePhone |
31 #include <etelpckt.h> // RPacketService |
31 #include <etelpckt.h> // RPacketService |
|
32 #include <ConnectionUiUtilities.h> |
32 |
33 |
33 #include "mpmcommon.h" |
34 #include "mpmcommon.h" |
34 #include "rmpm.h" |
35 #include "rmpm.h" |
35 #include "mpmroamingwatcher.h" |
36 #include "mpmroamingwatcher.h" |
36 |
37 |
37 |
38 |
38 class CMPMCommsDatAccess; |
39 class CMPMCommsDatAccess; |
39 class CMpmCsIdWatcher; |
40 class CMpmCsIdWatcher; |
40 class CMpmDataUsageWatcher; |
41 class CMpmDataUsageWatcher; |
|
42 class CMpmOfflineWatcher; |
41 |
43 |
42 // CONSTANTS |
44 // CONSTANTS |
43 _LIT( KMPMPanicCategory, "Mobility Policy Manager Server" ); |
45 _LIT( KMPMPanicCategory, "Mobility Policy Manager Server" ); |
44 |
46 |
45 const TInt KPhoneRetryCount = 7; |
47 const TInt KPhoneRetryCount = 7; |
165 EMPMBearerTypePacketData, |
167 EMPMBearerTypePacketData, |
166 // Something else than previous ones |
168 // Something else than previous ones |
167 EMPMBearerTypeOther |
169 EMPMBearerTypeOther |
168 }; |
170 }; |
169 |
171 |
|
172 enum TOfflineWlanQueryResponse |
|
173 { |
|
174 EOfflineResponseUndefined, |
|
175 EOfflineResponseYes, |
|
176 EOfflineResponseNo |
|
177 }; |
|
178 |
170 // FUNCTION PROTOTYPES |
179 // FUNCTION PROTOTYPES |
171 void PanicServer( TInt aPanic ); |
180 void PanicServer( TInt aPanic ); |
172 |
181 |
173 // FORWARD DECLARATIONS |
182 // FORWARD DECLARATIONS |
174 class CMPMConnMonEvents; |
183 class CMPMConnMonEvents; |
177 class CMPMDisconnectDlg; |
186 class CMPMDisconnectDlg; |
178 class CMPMConfirmDlgRoaming; |
187 class CMPMConfirmDlgRoaming; |
179 class CMPMConfirmDlgStarting; |
188 class CMPMConfirmDlgStarting; |
180 class CMPMDefaultConnection; |
189 class CMPMDefaultConnection; |
181 class CMPMWlanQueryDialog; |
190 class CMPMWlanQueryDialog; |
182 class CMPMDialog; |
|
183 |
191 |
184 // CLASS DECLARATION |
192 // CLASS DECLARATION |
185 /** |
193 /** |
186 * Class structure to associate Connection Id |
194 * Class structure to associate Connection Id |
187 * and the list of blacklisted IAPs |
195 * and the list of blacklisted IAPs |
341 |
349 |
342 /** |
350 /** |
343 * Checks if the connection is started for the Iap Id. |
351 * Checks if the connection is started for the Iap Id. |
344 * @since 3.2 |
352 * @since 3.2 |
345 * @param aIapId IAP Id of the connection |
353 * @param aIapId IAP Id of the connection |
346 */ |
354 * @param aConnId Connection Id |
347 TBool CheckIfStarted( const TUint32 aIapId ); |
355 */ |
|
356 TBool CheckIfStarted( const TUint32 aIapId, |
|
357 const TConnectionId aConnId ); |
348 |
358 |
349 /** |
359 /** |
350 * Checks if a connection is started with wlan iap. |
360 * Checks if a connection is started with wlan iap. |
351 * @since 3.2 |
361 * @since 3.2 |
352 * @param aCdbAccess |
362 * @param aCdbAccess |
441 * @param aIapInfo Info about available IAPs |
451 * @param aIapInfo Info about available IAPs |
442 * @param aCaller Identifies the calling context |
452 * @param aCaller Identifies the calling context |
443 */ |
453 */ |
444 void NotifyBMPrefIapL( const TConnMonIapInfo& aIapInfo, |
454 void NotifyBMPrefIapL( const TConnMonIapInfo& aIapInfo, |
445 const TPrefIAPNotifCaller aCaller ); |
455 const TPrefIAPNotifCaller aCaller ); |
446 |
|
447 /** |
|
448 * Update Connection dialog of each session |
|
449 * @since 3.2 |
|
450 */ |
|
451 void UpdateSessionConnectionDlgL(); |
|
452 |
456 |
453 /** |
457 /** |
454 * Handling of blacklisting certain IAP and the presumed IAP for |
458 * Handling of blacklisting certain IAP and the presumed IAP for |
455 * the certain connection. |
459 * the certain connection. |
456 * @since 3.1 |
460 * @since 3.1 |
625 * Get the first item in iWlanQueryQueue. |
629 * Get the first item in iWlanQueryQueue. |
626 * @since 3.2 |
630 * @since 3.2 |
627 * @return Pointer to the first item in iWlanQueryQueue. |
631 * @return Pointer to the first item in iWlanQueryQueue. |
628 */ |
632 */ |
629 inline CMPMWlanQueryDialog* FirstInWlanQueryQueue(); |
633 inline CMPMWlanQueryDialog* FirstInWlanQueryQueue(); |
630 |
|
631 /** |
|
632 * Get the ConnectDialogQueue. |
|
633 * @since 3.2 |
|
634 * @return Pointer to the CMPMDialogQueue. |
|
635 */ |
|
636 inline CArrayPtrFlat<CMPMDialog>* ConnectDialogQueue(); |
|
637 |
634 |
638 /** |
635 /** |
639 * Get the Default Connection object. |
636 * Get the Default Connection object. |
640 * @since 3.2 |
637 * @since 3.2 |
641 * @return Pointer to the Default Connection object. |
638 * @return Pointer to the Default Connection object. |
788 * @return Pointer to watcher object. |
785 * @return Pointer to watcher object. |
789 */ |
786 */ |
790 inline CMpmCsIdWatcher* CsIdWatcher(); |
787 inline CMpmCsIdWatcher* CsIdWatcher(); |
791 |
788 |
792 /** |
789 /** |
793 * Change state of the P&S keys according to active connection. |
|
794 * @since 5.0 |
|
795 * @param aSession Handle to session used by connection. |
|
796 */ |
|
797 void UpdateActiveConnectionL( CMPMServerSession& aSession ); |
|
798 |
|
799 /** |
|
800 * Map bearer type between MPM and commsdat. |
|
801 * @since 5.0 |
|
802 * @param aBearerType Bearer type used by MPM for active connection selection. |
|
803 * @return Bearer type used by commsdat |
|
804 */ |
|
805 TUint32 MapBearerType( TMPMBearerType aBearerType ); |
|
806 |
|
807 /** |
|
808 * Writes new active connection to the P&S keys |
|
809 * @since 5.0 |
|
810 */ |
|
811 void PublishActiveConnection(); |
|
812 |
|
813 /** |
|
814 * Returns number of active connections. |
|
815 * @since 5.0 |
|
816 * @return Number of active connections |
|
817 */ |
|
818 TInt NumberOfActiveConnections(); |
|
819 |
|
820 /** |
|
821 * Returns server session instance that corresponds to given |
790 * Returns server session instance that corresponds to given |
822 * connection id. |
791 * connection id. |
823 * @since 5.2 |
792 * @since 5.2 |
824 * @param aConnId Id of the connection. The id must belong to an |
793 * @param aConnId Id of the connection. The id must belong to an |
825 * existing server session. |
794 * existing server session. |
830 /** |
799 /** |
831 * Stops cellular connections, except MMS |
800 * Stops cellular connections, except MMS |
832 * @since 5.2 |
801 * @since 5.2 |
833 */ |
802 */ |
834 void StopCellularConns(); |
803 void StopCellularConns(); |
|
804 |
|
805 /** |
|
806 * Handle to connection ui utilities |
|
807 */ |
|
808 inline CConnectionUiUtilities* ConnUiUtils() const; |
|
809 |
|
810 /** |
|
811 * Offline mode watcher updates the mode variable stored by MPM server. |
|
812 * @since 5.2 |
|
813 * @param aNewModeValue New offline mode value to be updated. |
|
814 */ |
|
815 void UpdateOfflineMode( TInt aNewModeValue ); |
|
816 |
|
817 /** |
|
818 * Tells if the phone is in offline mode. |
|
819 * @since 5.2 |
|
820 * @return ETrue if phone is in offline mode. |
|
821 */ |
|
822 TBool IsPhoneOffline(); |
|
823 |
|
824 /** |
|
825 * Tells the "Use WLAN in offline mode" query response. |
|
826 * @since 5.2 |
|
827 * @return TOfflineWlanQueryResponse (not_responded/yes/no). |
|
828 */ |
|
829 TOfflineWlanQueryResponse OfflineWlanQueryResponse(); |
|
830 |
|
831 /** |
|
832 * Called when the "Use WLAN in offline mode" query has been responded. |
|
833 * @since 5.2 |
|
834 * @param aResponse setting the query response value (not_responded/yes/no). |
|
835 */ |
|
836 void SetOfflineWlanQueryResponse( TOfflineWlanQueryResponse aResponse); |
835 |
837 |
836 private: |
838 private: |
837 |
839 |
838 /** |
840 /** |
839 * C++ default constructor. |
841 * C++ default constructor. |
910 // Solves problem with overlapping Starting Dialogs |
912 // Solves problem with overlapping Starting Dialogs |
911 CArrayPtrFlat<CMPMConfirmDlgStarting>* iStartingQueue; |
913 CArrayPtrFlat<CMPMConfirmDlgStarting>* iStartingQueue; |
912 |
914 |
913 // Solves problem with overlapping Wlan Queries |
915 // Solves problem with overlapping Wlan Queries |
914 CArrayPtrFlat<CMPMWlanQueryDialog>* iWlanQueryQueue; |
916 CArrayPtrFlat<CMPMWlanQueryDialog>* iWlanQueryQueue; |
915 |
|
916 // Solves problem with overlapping Connection Dialogs |
|
917 CArrayPtrFlat<CMPMDialog>* iConnectDialogQueue; |
|
918 |
917 |
919 // Handles Default Connection selection |
918 // Handles Default Connection selection |
920 CMPMDefaultConnection* iDefaultConnection; |
919 CMPMDefaultConnection* iDefaultConnection; |
921 |
920 |
922 // Keeps track of the number of connections |
921 // Keeps track of the number of connections |
936 * Own. |
935 * Own. |
937 */ |
936 */ |
938 CMpmCsIdWatcher* iMpmCsIdWatcher; |
937 CMpmCsIdWatcher* iMpmCsIdWatcher; |
939 |
938 |
940 /** |
939 /** |
941 * Handle to another central repository watcher |
940 * Handle to central repository watcher |
942 */ |
941 */ |
943 CMpmDataUsageWatcher* iMpmDataUsageWatcher; |
942 CMpmDataUsageWatcher* iMpmDataUsageWatcher; |
944 |
943 |
945 // Iap id of the active connection |
944 /** |
946 TUint32 iActiveIapId; |
945 * Handle to central repository watcher |
947 |
946 */ |
948 // Snap id of the active connection |
947 CMpmOfflineWatcher* iMpmOfflineWatcher; |
949 TUint32 iActiveSnapId; |
|
950 |
|
951 // Bearer type of the active connection |
|
952 TMPMBearerType iActiveBearerType; |
|
953 |
948 |
954 // Dedicated clients |
949 // Dedicated clients |
955 RArray<TUint32> iDedicatedClients; |
950 RArray<TUint32> iDedicatedClients; |
956 |
951 |
957 // Used for commsdat related functionalities |
952 // Used for commsdat related functionalities |
958 CMPMCommsDatAccess* iCommsDatAccess; |
953 CMPMCommsDatAccess* iCommsDatAccess; |
|
954 |
|
955 // Handle to connection UI utilities |
|
956 // |
|
957 CConnectionUiUtilities* iConnUiUtils; |
|
958 |
|
959 // Offline mode. |
|
960 TInt iOfflineMode; |
|
961 |
|
962 // Is WLAN usage already accepted in this offline session. |
|
963 TOfflineWlanQueryResponse iOfflineWlanQueryResponse; |
959 }; |
964 }; |
960 |
965 |
961 #include "mpmserver.inl" |
966 #include "mpmserver.inl" |
962 |
967 |
963 |
968 |