bearermanagement/mpm/inc/mpmiapselection.h
branchRCL_3
changeset 58 83ca720e2b9a
parent 57 05bc53fe583b
equal deleted inserted replaced
57:05bc53fe583b 58:83ca720e2b9a
    21 #include <e32base.h>
    21 #include <e32base.h>
    22 
    22 
    23 #include "mpmserversession.h"
    23 #include "mpmserversession.h"
    24 #include "mpmcommsdataccess.h"
    24 #include "mpmcommsdataccess.h"
    25 
    25 
       
    26 class CMPMDialog;
       
    27 class CMPMWlanQueryDialog;
    26 class CMPMConfirmDlgStarting;
    28 class CMPMConfirmDlgStarting;
    27 class TMpmConnPref;
    29 class TMpmConnPref;
    28 
    30 
    29 /**
    31 /**
    30  * Handles IAP selection. MPM Server session
    32  * Handles IAP selection. MPM Server session
    62 public: // CMPMServerSession interface    
    64 public: // CMPMServerSession interface    
    63     /**
    65     /**
    64      * Two-phased constructor.
    66      * Two-phased constructor.
    65      */
    67      */
    66     static CMPMIapSelection* NewL( CMPMCommsDatAccess*  aCommsDatAccess,
    68     static CMPMIapSelection* NewL( CMPMCommsDatAccess*  aCommsDatAccess,
    67                                    CMPMServerSession*   aSession,
    69                                    CMPMServerSession*   aSession );
    68                                    CConnectionUiUtilities* aConnUiUtils );
       
    69     
    70     
    70     /**
    71     /**
    71      * Destructor.
    72      * Destructor.
    72      */
    73      */
    73     virtual ~CMPMIapSelection();
    74     virtual ~CMPMIapSelection();
    86      *
    87      *
    87      * @since S60 v3.2
    88      * @since S60 v3.2
    88      */
    89      */
    89     void ExplicitConnectionL();
    90     void ExplicitConnectionL();
    90 
    91 
       
    92     /**
       
    93      * Updates connection dialog contents if 
       
    94      * the dilog is shown
       
    95      *
       
    96      * @since S60 v3.2
       
    97      */
       
    98     void UpdateConnectionDialogL();
       
    99 
    91 public:
   100 public:
    92     /**
   101     /**
    93      * Returns true if given iap is a wlan iap.
   102      * Starts Wlan query if Iap is wlan iap.
    94      *
   103      *
    95      * @param aIapId Id of Iap
   104      * @param aIapId Id of Iap
    96      * @return ETrue if iap aIap is wlan
   105      * @param aIsRoaming True if wlan query is for roaming
    97      * @since symbian^4
   106      * @return ETrue if wlan query was started
    98      */
   107      * @since S60 v3.2
    99     TBool IsIapWlanL( TUint32 aIapId );
   108      */
       
   109     TBool StartWlanQueryIfNeededL(
       
   110         TUint32 aIapId,
       
   111         TBool aIsRoaming = EFalse );
   100 
   112 
   101     /**
   113     /**
   102      * Part of selecting best IAP at connection start. Called when WLAN scan
   114      * Part of selecting best IAP at connection start. Called when WLAN scan
   103      * is completed. Continues IAP selection according to the iChooseIapState.
   115      * is completed. Continues IAP selection according to the iChooseIapState.
   104      *
   116      *
   115      * @param aError Message status
   127      * @param aError Message status
   116      * @param aPolicyPref Policy preference to be returned, NULL if no 
   128      * @param aPolicyPref Policy preference to be returned, NULL if no 
   117      * preference should be passed
   129      * preference should be passed
   118      */
   130      */
   119     void ChooseIapComplete( TInt aError, const TMpmConnPref* aPolicyPref );
   131     void ChooseIapComplete( TInt aError, const TMpmConnPref* aPolicyPref );
       
   132 
       
   133     /**
       
   134      * Callback function used after Wlan network has been selected. 
       
   135      * Uses HandleUserIapSelectionL to complete IAP selection.
       
   136      *
       
   137      * @since 3.2
       
   138      * @param aError Error code from selection
       
   139      * @param aIapId Element id of IAP record if different than reported before. 
       
   140      * May be 0, when error occurred in selection or when no new Iap id is set.
       
   141      *
       
   142      */
       
   143     void UserWlanSelectionDoneL( TInt aError, TUint32 aIapId );
   120 
   144 
   121     /**
   145     /**
   122      * Stops displaying the starting dialog.
   146      * Stops displaying the starting dialog.
   123      *
   147      *
   124      * @since 3.2
   148      * @since 3.2
   242     /**
   266     /**
   243      * Handles implicit connection wlan note displaying
   267      * Handles implicit connection wlan note displaying
   244      * @since 3.2
   268      * @since 3.2
   245      */
   269      */
   246     void ImplicitConnectionWlanNoteL();
   270     void ImplicitConnectionWlanNoteL();
   247 
   271     
   248     /**
   272     /**
   249      * Gets current cellular data usage setting
   273      * Gets current cellular data usage setting
   250      * @since 5.2
   274      * @since 5.2
   251      */
   275      */
   252     TInt CurrentCellularDataUsage() const;
   276     TInt CurrentCellularDataUsage() const;
   255 
   279 
   256     /**
   280     /**
   257      * C++ default constructor.
   281      * C++ default constructor.
   258      */
   282      */
   259     CMPMIapSelection( CMPMCommsDatAccess*   aCommsDatAccess,
   283     CMPMIapSelection( CMPMCommsDatAccess*   aCommsDatAccess,
   260                       CMPMServerSession*    aSession,
   284                       CMPMServerSession*    aSession );
   261                       CConnectionUiUtilities* aConnUiUtils );
       
   262 
   285 
   263     /**
   286     /**
   264      * ConstructL
   287      * ConstructL
   265      */
   288      */
   266     void ConstructL();
   289     void ConstructL();
   277     TChooseIapState iChooseIapState;
   300     TChooseIapState iChooseIapState;
   278 
   301 
   279     // Used for commsdat related functionalities
   302     // Used for commsdat related functionalities
   280     CMPMCommsDatAccess* iCommsDatAccess;
   303     CMPMCommsDatAccess* iCommsDatAccess;
   281 
   304 
   282     // Handle to connection UI utilities
       
   283     CConnectionUiUtilities* iConnUiUtils;
       
   284 
       
   285     // Contains state info whether PrefIapnotifs can be sent 
   305     // Contains state info whether PrefIapnotifs can be sent 
   286     // and saved IAP info structure.
   306     // and saved IAP info structure.
   287     TStoredIapInfo iStoredIapInfo;
   307     TStoredIapInfo iStoredIapInfo;
   288 
   308 
   289     // Stored available Iaps
   309     // Stored available Iaps
   292     // pointer to Session
   312     // pointer to Session
   293     CMPMServerSession* iSession;
   313     CMPMServerSession* iSession;
   294 
   314 
   295     // Pointer to Confirmation dialog.
   315     // Pointer to Confirmation dialog.
   296     CMPMConfirmDlgStarting* iConfirmDlgStarting;
   316     CMPMConfirmDlgStarting* iConfirmDlgStarting;
       
   317 
       
   318     // Pointer to the dialog active object.
       
   319     CMPMDialog* iDialog;
       
   320 
       
   321     // Pointer to Wlan query dialog.
       
   322     CMPMWlanQueryDialog* iWlanDialog;
   297 
   323 
   298     // Stores the boolean value whether next best iaps 
   324     // Stores the boolean value whether next best iaps 
   299     // exists in explicit connection start.
   325     // exists in explicit connection start.
   300     TBool iNextBestExists;
   326     TBool iNextBestExists;
   301 
   327