bearermanagement/mpm/inc/mpmserver.h
branchRCL_3
changeset 17 c14618f9de99
parent 15 4dc3bb0099b0
child 26 0a9e01492035
equal deleted inserted replaced
15:4dc3bb0099b0 17:c14618f9de99
    36 
    36 
    37 
    37 
    38 class CMPMCommsDatAccess;
    38 class CMPMCommsDatAccess;
    39 class CMpmCsIdWatcher;
    39 class CMpmCsIdWatcher;
    40 class CMpmDataUsageWatcher;
    40 class CMpmDataUsageWatcher;
       
    41 class CMpmOfflineWatcher;
    41 
    42 
    42 // CONSTANTS
    43 // CONSTANTS
    43 _LIT( KMPMPanicCategory, "Mobility Policy Manager Server" );
    44 _LIT( KMPMPanicCategory, "Mobility Policy Manager Server" );
    44 
    45 
    45 const TInt    KPhoneRetryCount   = 7;
    46 const TInt    KPhoneRetryCount   = 7;
   165     EMPMBearerTypePacketData,
   166     EMPMBearerTypePacketData,
   166     // Something else than previous ones
   167     // Something else than previous ones
   167     EMPMBearerTypeOther
   168     EMPMBearerTypeOther
   168     };
   169     };
   169 
   170 
       
   171 enum TOfflineWlanQueryResponse
       
   172     {
       
   173     EOfflineResponseUndefined,
       
   174     EOfflineResponseYes,
       
   175     EOfflineResponseNo
       
   176     };
       
   177 
   170 // FUNCTION PROTOTYPES
   178 // FUNCTION PROTOTYPES
   171 void PanicServer( TInt aPanic );
   179 void PanicServer( TInt aPanic );
   172 
   180 
   173 // FORWARD DECLARATIONS
   181 // FORWARD DECLARATIONS
   174 class CMPMConnMonEvents;
   182 class CMPMConnMonEvents;
   790          * @return Pointer to watcher object.
   798          * @return Pointer to watcher object.
   791          */
   799          */
   792         inline CMpmCsIdWatcher* CsIdWatcher();
   800         inline CMpmCsIdWatcher* CsIdWatcher();
   793 
   801 
   794         /**
   802         /**
       
   803          * Change state of the P&S keys according to active connection.
       
   804          * Non-leaving version. Resets variables in case error happens.
       
   805          * @since 5.2         
       
   806          * @param aSession Handle to session used by connection.
       
   807         */
       
   808         void UpdateActiveConnection( CMPMServerSession& aSession );
       
   809         
       
   810         /**
   795         * Change state of the P&S keys according to active connection.
   811         * Change state of the P&S keys according to active connection.
   796         * @since 5.0
   812         * @since 5.0
   797         * @param aSession Handle to session used by connection.
   813         * @param aSession Handle to session used by connection.
   798         */
   814         */
   799         void UpdateActiveConnectionL( CMPMServerSession& aSession );
   815         void UpdateActiveConnectionL( CMPMServerSession& aSession );
   811         * @since 5.0
   827         * @since 5.0
   812         */    
   828         */    
   813         void PublishActiveConnection();
   829         void PublishActiveConnection();
   814         
   830         
   815         /**
   831         /**
   816         * Returns number of active connections.
   832         * Returns number of active iaps.
   817         * @since 5.0
   833         * @since 5.0
       
   834         * @param aKeysUpToDate Tells whether P&S keys are valid or not.
   818         * @return Number of active connections
   835         * @return Number of active connections
   819         */
   836         */
   820         TInt NumberOfActiveConnections();
   837         TInt NumberOfActiveConnections( TBool& aKeysUpToDate );
   821 
   838 
   822         /**
   839         /**
   823         * Returns server session instance that corresponds to given
   840         * Returns server session instance that corresponds to given
   824         * connection id.
   841         * connection id.
   825         * @since 5.2
   842         * @since 5.2
   832         /**
   849         /**
   833         * Stops cellular connections, except MMS
   850         * Stops cellular connections, except MMS
   834         * @since 5.2
   851         * @since 5.2
   835         */
   852         */
   836         void StopCellularConns();
   853         void StopCellularConns();
       
   854 
       
   855         /**
       
   856         * Offline mode watcher updates the mode variable stored by MPM server.
       
   857         * @since 5.2
       
   858         */
       
   859         void UpdateOfflineMode( TInt newModeValue );
       
   860 
       
   861         /**
       
   862         * Returns true if the phone is in offline mode.
       
   863         * @since 5.2
       
   864         */
       
   865         TBool IsPhoneOffline();
       
   866 
       
   867         /**
       
   868         * Tells the "Use WLAN in offline mode" query response.
       
   869         * @since 5.2
       
   870         */
       
   871         TOfflineWlanQueryResponse OfflineWlanQueryResponse();
       
   872 
       
   873         /**
       
   874         * Called when the "Use WLAN in offline mode" query has been responded.
       
   875         * @since 5.2
       
   876         */
       
   877         void SetOfflineWlanQueryResponse( TOfflineWlanQueryResponse aResponse);
   837 
   878 
   838     private:
   879     private:
   839 
   880 
   840         /**
   881         /**
   841         * C++ default constructor.
   882         * C++ default constructor.
   938          * Own.
   979          * Own.
   939          */
   980          */
   940         CMpmCsIdWatcher* iMpmCsIdWatcher;
   981         CMpmCsIdWatcher* iMpmCsIdWatcher;
   941 
   982 
   942         /**
   983         /**
   943          * Handle to another central repository watcher
   984          * Handle to central repository watcher
   944          */
   985          */
   945         CMpmDataUsageWatcher* iMpmDataUsageWatcher;
   986         CMpmDataUsageWatcher* iMpmDataUsageWatcher;
   946 
   987 
       
   988         /**
       
   989          * Handle to central repository watcher
       
   990          */
       
   991         CMpmOfflineWatcher* iMpmOfflineWatcher;
       
   992 
   947         // Iap id of the active connection
   993         // Iap id of the active connection
   948         TUint32 iActiveIapId;
   994         TUint32 iActiveIapId;
   949         
   995         
   950         // Snap id of the active connection
   996         // Snap id of the active connection
   951         TUint32 iActiveSnapId;
   997         TUint32 iActiveSnapId;
   956         // Dedicated clients
  1002         // Dedicated clients
   957         RArray<TUint32> iDedicatedClients;
  1003         RArray<TUint32> iDedicatedClients;
   958 
  1004 
   959         // Used for commsdat related functionalities
  1005         // Used for commsdat related functionalities
   960         CMPMCommsDatAccess* iCommsDatAccess;
  1006         CMPMCommsDatAccess* iCommsDatAccess;
       
  1007         
       
  1008         // Offline mode.
       
  1009         TInt iOfflineMode;
       
  1010         
       
  1011         // Is WLAN usage already accepted in this offline session.
       
  1012         TOfflineWlanQueryResponse iOfflineWlanQueryResponse;
   961     };
  1013     };
   962 
  1014 
   963 #include "mpmserver.inl"
  1015 #include "mpmserver.inl"
   964 
  1016 
   965 
  1017