bearermanagement/mpm/inc/mpmserver.h
branchRCL_3
changeset 23 fc7b30ed2058
parent 20 4c83dcfb6f1a
child 24 05bc53fe583b
equal deleted inserted replaced
22:984e13af52c4 23:fc7b30ed2058
    31 #include <etelpckt.h>       // RPacketService
    31 #include <etelpckt.h>       // RPacketService
    32 
    32 
    33 #include "mpmcommon.h"
    33 #include "mpmcommon.h"
    34 #include "rmpm.h"
    34 #include "rmpm.h"
    35 #include "mpmroamingwatcher.h"
    35 #include "mpmroamingwatcher.h"
       
    36 #include "mpmdatausagewatcher.h"
    36 
    37 
    37 
    38 
    38 class CMPMCommsDatAccess;
    39 class CMPMCommsDatAccess;
    39 class CMpmCsIdWatcher;
    40 class CMpmCsIdWatcher;
    40 class CMpmDataUsageWatcher;
    41 class CMpmDataUsageWatcher;
    46 const TInt    KPhoneRetryCount   = 7;
    47 const TInt    KPhoneRetryCount   = 7;
    47 // 0.1 seconds
    48 // 0.1 seconds
    48 //
    49 //
    49 const TInt    KPhoneRetryTimeout = 100000;
    50 const TInt    KPhoneRetryTimeout = 100000;
    50 
    51 
       
    52 const TUint32 KMaxOpenTransAttempts = 5;
       
    53 const TUint32 KRetryAfter = 200000;
       
    54 
    51 // The granularity with which iDisconnectQueue will allocate memory chunks. 
    55 // The granularity with which iDisconnectQueue will allocate memory chunks. 
    52 // If set to two there will be space for two instances of CMPMDisconnectDlg
    56 // If set to two there will be space for two instances of CMPMDisconnectDlg
    53 // before new memory will be allocated.
    57 // before new memory will be allocated.
    54 const TInt    KGranularity       = 2;
    58 const TInt    KGranularity       = 2;
    55 
    59 
    59 const TUint KMPMPolicyRangeCount = 2;
    63 const TUint KMPMPolicyRangeCount = 2;
    60 
    64 
    61 // roaming to connected wlan wait interval
    65 // roaming to connected wlan wait interval
    62 // in micro seconds (10 sec)
    66 // in micro seconds (10 sec)
    63 const TInt KRoamingToWlanUpdateInterval = 10000000; 
    67 const TInt KRoamingToWlanUpdateInterval = 10000000; 
       
    68 
       
    69 // roaming to connected hotspot wlan wait interval
       
    70 // in micro seconds (120 sec)                    
       
    71 const TInt KRoamingToHotspotWlanUpdateInterval = 120000000; 
    64  
    72  
    65 //Definition of the ranges of IPC numbers
    73 //Definition of the ranges of IPC numbers
    66 const TInt KMPMPolicyRanges[KMPMPolicyRangeCount] = 
    74 const TInt KMPMPolicyRanges[KMPMPolicyRangeCount] = 
    67     {
    75     {
    68     0, // 0 -> 19 ; EMPMServerChooseIap,
    76     0, // 0 -> 19 ; EMPMServerChooseIap,
   190 class CMPMConfirmDlgRoaming;
   198 class CMPMConfirmDlgRoaming;
   191 class CMPMConfirmDlgStarting;
   199 class CMPMConfirmDlgStarting;
   192 class CMPMDefaultConnection;
   200 class CMPMDefaultConnection;
   193 class CMPMWlanQueryDialog;
   201 class CMPMWlanQueryDialog;
   194 class CMPMDialog;
   202 class CMPMDialog;
       
   203 class CMPMConnPermQueryTimer;
   195 
   204 
   196 // CLASS DECLARATION
   205 // CLASS DECLARATION
   197 /**
   206 /**
   198 *  Class structure to associate Connection Id 
   207 *  Class structure to associate Connection Id 
   199 *  and the list of blacklisted IAPs 
   208 *  and the list of blacklisted IAPs 
   467         * @since 3.2
   476         * @since 3.2
   468         */
   477         */
   469         void UpdateSessionConnectionDlgL();
   478         void UpdateSessionConnectionDlgL();
   470 
   479 
   471         /**
   480         /**
       
   481         * Completes pending messages
       
   482         * @since 5.2
       
   483         * @param aIapId IAP Id of the connection.
       
   484         * @param aError Message status
       
   485         * @param aErrorReturned Error value to be returned, NULL if no 
       
   486         * value should be passed
       
   487         * @param aNeededAction Needed action to be returned, NULL if no 
       
   488         * value should be passed
       
   489         */
       
   490         void HandlePendingMsgs( TUint aIapId,
       
   491                                 TInt aError,
       
   492                                 TInt* aErrorReturned,
       
   493                                 TBMNeededAction* aNeededAction );
       
   494 
       
   495         /**
   472         * Handling of blacklisting certain IAP and the presumed IAP for 
   496         * Handling of blacklisting certain IAP and the presumed IAP for 
   473         * the certain connection.
   497         * the certain connection.
   474         * @since 3.1
   498         * @since 3.1
   475         * @param aConnId Connection Id
   499         * @param aConnId Connection Id
   476         * @param aIapId IAP Id of the connection.
   500         * @param aIapId IAP Id of the connection.
   729         * @since 5.2
   753         * @since 5.2
   730         */
   754         */
   731         static TInt StartForcedRoamingToConnectedWlanL( TAny* aUpdater );
   755         static TInt StartForcedRoamingToConnectedWlanL( TAny* aUpdater );
   732         
   756         
   733         /**
   757         /**
       
   758         * Starts forced roaming sequence to connected hotspot wlan
       
   759         *
       
   760         * @param aIapInfo Info about available IAPs
       
   761         * @return Always zero...
       
   762         * @since 5.2
       
   763         */
       
   764         static TInt StartForcedRoamingToConnectedHotspotWlanL( TAny* aUpdater );
       
   765 
       
   766         /**
   734         * Starts forced roaming sequence from WLAN if necessary
   767         * Starts forced roaming sequence from WLAN if necessary
   735         *
   768         *
   736         * @param aIapInfo Info about available IAPs
   769         * @param aIapInfo Info about available IAPs
   737         * @since 5.2
   770         * @since 5.2
   738         */
   771         */
   751         *
   784         *
   752         * @since 5.2
   785         * @since 5.2
   753 		* @return RoamingWatcher pointer
   786 		* @return RoamingWatcher pointer
   754         */
   787         */
   755         inline CMPMRoamingWatcher* RoamingWatcher() const;
   788         inline CMPMRoamingWatcher* RoamingWatcher() const;
   756         
   789 
       
   790          /**
       
   791         * Returns the DataUsageWatcher pointer
       
   792         *
       
   793         * @since 5.2
       
   794         * @return DataUsageWatcher pointer
       
   795         */
       
   796         inline CMpmDataUsageWatcher* DataUsageWatcher() const;        
   757         
   797         
   758         
   798         
   759     public: // Functions from base classes
   799     public: // Functions from base classes
   760 
   800 
   761         /**
   801         /**
   871         */
   911         */
   872         CMPMServerSession* GetServerSession( TConnectionId aConnId ) const;
   912         CMPMServerSession* GetServerSession( TConnectionId aConnId ) const;
   873         
   913         
   874         /**
   914         /**
   875         * Stops cellular connections, except MMS
   915         * Stops cellular connections, except MMS
   876         * @since 5.2
   916         * @param aSilentOnly stop only silent cellular connections
   877         */
   917         * @since 5.2
   878         void StopCellularConns();
   918         */
       
   919         void StopCellularConns( TBool aSilentOnly = EFalse );
   879 
   920 
   880         /**
   921         /**
   881         * Offline mode watcher updates the mode variable stored by MPM server.
   922         * Offline mode watcher updates the mode variable stored by MPM server.
   882         * @since 5.2
   923         * @since 5.2
   883         * @param aNewModeValue New offline mode value
   924         * @param aNewModeValue New offline mode value
   902         * Called when the "Use WLAN in offline mode" query has been responded.
   943         * Called when the "Use WLAN in offline mode" query has been responded.
   903         * @since 5.2
   944         * @since 5.2
   904         * @param aResponse Sets the Offline mode query response value.
   945         * @param aResponse Sets the Offline mode query response value.
   905         */
   946         */
   906         void SetOfflineWlanQueryResponse( TOfflineWlanQueryResponse aResponse);
   947         void SetOfflineWlanQueryResponse( TOfflineWlanQueryResponse aResponse);
       
   948 
       
   949         /**
       
   950         * Starts the connection permission query timer.
       
   951         * During the timer, no connection permission query can be initiated.
       
   952         * @since 5.2
       
   953         */
       
   954         void StartConnPermQueryTimer();
       
   955 
       
   956         /**
       
   957         * Resets the connection permission query timer.
       
   958         * @since 5.2
       
   959         */
       
   960         void ResetConnPermQueryTimer();
       
   961 
       
   962         /**
       
   963         * Returns true if the connection permission query timer is running.
       
   964         * During the timer, no connection permission query can be initiated.
       
   965         * @since 5.2
       
   966         * @return ETrue if timer is running, EFalse otherwise.
       
   967         */
       
   968         TBool IsConnPermQueryTimerOn();
   907 
   969 
   908     private:
   970     private:
   909 
   971 
   910         /**
   972         /**
   911         * C++ default constructor.
   973         * C++ default constructor.
   931                                 RArray<TUint32>& aAvailWlanIapIds,
   993                                 RArray<TUint32>& aAvailWlanIapIds,
   932                                 RAvailableIAPList& aIapList,
   994                                 RAvailableIAPList& aIapList,
   933                                 TBool aCheckForBestIap,
   995                                 TBool aCheckForBestIap,
   934                                 TMPMBearerType aDestinationBearerType );
   996                                 TMPMBearerType aDestinationBearerType );
   935         
   997         
       
   998         /**
       
   999          * Check if iap can be disconnected, and disconnect it
       
  1000          * @since 5.2
       
  1001          * @param aIapId Iap id for checking
       
  1002          */
       
  1003         void CheckIapForDisconnect( TInt aIapId );
   936 
  1004 
   937     private: // Data
  1005     private: // Data
   938         // Pointer to the ConnMonEvents object
  1006         // Pointer to the ConnMonEvents object
   939         CMPMConnMonEvents* iEvents;
  1007         CMPMConnMonEvents* iEvents;
   940 
  1008 
  1040         // Is WLAN usage already accepted in this offline session.
  1108         // Is WLAN usage already accepted in this offline session.
  1041         TOfflineWlanQueryResponse iOfflineWlanQueryResponse;
  1109         TOfflineWlanQueryResponse iOfflineWlanQueryResponse;
  1042         
  1110         
  1043         // Timer to start roaming to connected WLAN network 
  1111         // Timer to start roaming to connected WLAN network 
  1044         CPeriodic* iRoamingToWlanPeriodic;
  1112         CPeriodic* iRoamingToWlanPeriodic;
  1045 
  1113         
       
  1114         // Timer to start roaming to connected WLAN network 
       
  1115         CPeriodic* iRoamingToHotspotWlanPeriodic;
       
  1116         
  1046         // TConnMonIapInfo Info about available IAPs
  1117         // TConnMonIapInfo Info about available IAPs
  1047         TConnMonIapInfo iConnMonIapInfo;
  1118         TConnMonIapInfo iConnMonIapInfo;
       
  1119         
       
  1120         // Connection permission query cancellation delay timer
       
  1121         CMPMConnPermQueryTimer* iConnPermQueryTimer;
  1048     };
  1122     };
  1049 
  1123 
  1050 #include "mpmserver.inl"
  1124 #include "mpmserver.inl"
  1051 
  1125 
  1052 
  1126