bearermanagement/mpm/inc/mpmiapselection.h
changeset 20 9c97ad6591ae
parent 18 fcbbe021d614
child 32 5c4486441ae6
equal deleted inserted replaced
18:fcbbe021d614 20:9c97ad6591ae
    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 CMPMWlanQueryDialog;
    28 class CMPMConfirmDlgStarting;
    27 class CMPMConfirmDlgStarting;
    29 class TMpmConnPref;
    28 class TMpmConnPref;
    30 
       
    31 enum TOfflineNoteResponse
       
    32     {
       
    33     EOfflineResponseUndefined,
       
    34     EOfflineResponseYes,
       
    35     EOfflineResponseNo
       
    36     };
       
    37 
    29 
    38 /**
    30 /**
    39  * Handles IAP selection. MPM Server session
    31  * Handles IAP selection. MPM Server session
    40  * uses the class to select the best available 
    32  * uses the class to select the best available 
    41  * IAP.
    33  * IAP.
    71 public: // CMPMServerSession interface    
    63 public: // CMPMServerSession interface    
    72     /**
    64     /**
    73      * Two-phased constructor.
    65      * Two-phased constructor.
    74      */
    66      */
    75     static CMPMIapSelection* NewL( CMPMCommsDatAccess*  aCommsDatAccess,
    67     static CMPMIapSelection* NewL( CMPMCommsDatAccess*  aCommsDatAccess,
    76                                    CMPMServerSession*   aSession );
    68                                    CMPMServerSession*   aSession,
       
    69                                    CConnectionUiUtilities* aConnUiUtils );
    77     
    70     
    78     /**
    71     /**
    79      * Destructor.
    72      * Destructor.
    80      */
    73      */
    81     virtual ~CMPMIapSelection();
    74     virtual ~CMPMIapSelection();
    93      * If necessary performs Wlan scan. 
    86      * If necessary performs Wlan scan. 
    94      *
    87      *
    95      * @since S60 v3.2
    88      * @since S60 v3.2
    96      */
    89      */
    97     void ExplicitConnectionL();
    90     void ExplicitConnectionL();
    98 
       
    99     /**
       
   100      * Updates connection dialog contents if 
       
   101      * the dilog is shown
       
   102      *
       
   103      * @since S60 v3.2
       
   104      */
       
   105     void UpdateConnectionDialogL();
       
   106 
    91 
   107 public:
    92 public:
   108     /**
    93     /**
   109      * Starts Wlan query if Iap is wlan iap.
    94      * Starts Wlan query if Iap is wlan iap.
   110      *
    95      *
   214      * occurred in selection
   199      * occurred in selection
   215      * @param aError Error value 
   200      * @param aError Error value 
   216      *
   201      *
   217      */
   202      */
   218     void HandleUserSelectionL( TBool aIsIap, TUint32 aId, TInt aError  );
   203     void HandleUserSelectionL( TBool aIsIap, TUint32 aId, TInt aError  );
   219 
       
   220     /**
       
   221      * Returns the stored user response to the offline note
       
   222      * @since 3.2
       
   223      */
       
   224     TOfflineNoteResponse OfflineNoteResponse();
       
   225 
       
   226     /**
       
   227      * Stores the user response to the offline note
       
   228      * @since 3.2
       
   229      * @param aResponse Offline note response
       
   230      */
       
   231     void SetOfflineNoteResponse( TOfflineNoteResponse aResponse );
       
   232 
       
   233     /**
       
   234      * Iap selection is notified that conenction is started. 
       
   235      * Offline note response is reseted.
       
   236      *
       
   237      * @since 3.2
       
   238      */
       
   239     void ConnectionStarted();
       
   240 
   204 
   241     /**
   205     /**
   242      * Get original MPM connection preferences
   206      * Get original MPM connection preferences
   243      * @since 5.2
   207      * @since 5.2
   244      */
   208      */
   301 
   265 
   302     /**
   266     /**
   303      * C++ default constructor.
   267      * C++ default constructor.
   304      */
   268      */
   305     CMPMIapSelection( CMPMCommsDatAccess*   aCommsDatAccess,
   269     CMPMIapSelection( CMPMCommsDatAccess*   aCommsDatAccess,
   306                       CMPMServerSession*    aSession );
   270                       CMPMServerSession*    aSession,
       
   271                       CConnectionUiUtilities* aConnUiUtils );
   307 
   272 
   308     /**
   273     /**
   309      * ConstructL
   274      * ConstructL
   310      */
   275      */
   311     void ConstructL();
   276     void ConstructL();
   322     TChooseIapState iChooseIapState;
   287     TChooseIapState iChooseIapState;
   323 
   288 
   324     // Used for commsdat related functionalities
   289     // Used for commsdat related functionalities
   325     CMPMCommsDatAccess* iCommsDatAccess;
   290     CMPMCommsDatAccess* iCommsDatAccess;
   326 
   291 
       
   292     // Handle to connection UI utilities
       
   293     CConnectionUiUtilities* iConnUiUtils;
       
   294 
   327     // Contains state info whether PrefIapnotifs can be sent 
   295     // Contains state info whether PrefIapnotifs can be sent 
   328     // and saved IAP info structure.
   296     // and saved IAP info structure.
   329     TStoredIapInfo iStoredIapInfo;
   297     TStoredIapInfo iStoredIapInfo;
   330 
   298 
   331     // Stored available Iaps
   299     // Stored available Iaps
   335     CMPMServerSession* iSession;
   303     CMPMServerSession* iSession;
   336 
   304 
   337     // Pointer to Confirmation dialog.
   305     // Pointer to Confirmation dialog.
   338     CMPMConfirmDlgStarting* iConfirmDlgStarting;
   306     CMPMConfirmDlgStarting* iConfirmDlgStarting;
   339 
   307 
   340     // Pointer to the dialog active object.
       
   341     CMPMDialog* iDialog;
       
   342 
       
   343     // Pointer to Wlan query dialog.
   308     // Pointer to Wlan query dialog.
   344     CMPMWlanQueryDialog* iWlanDialog;
   309     CMPMWlanQueryDialog* iWlanDialog;
   345 
   310 
   346     // Stores the boolean value whether next best iaps 
   311     // Stores the boolean value whether next best iaps 
   347     // exists in explicit connection start.
   312     // exists in explicit connection start.
   353     // Snap selected by user.
   318     // Snap selected by user.
   354     TUint32 iUserSelectionSnapId;
   319     TUint32 iUserSelectionSnapId;
   355 
   320 
   356     // State of impilict connection start
   321     // State of impilict connection start
   357     TImplicitConnectionState iImplicitState;
   322     TImplicitConnectionState iImplicitState;
   358 
       
   359     // Offline note response for the connection. 
       
   360     // Offline note must be displayed only once 
       
   361     // during the connection (not for each wlan iap of a snap).
       
   362     TOfflineNoteResponse iOfflineNoteResponse;
       
   363 
   323 
   364     // True if connection is roaming (set when displaying offline note)
   324     // True if connection is roaming (set when displaying offline note)
   365     TBool iIsRoaming;
   325     TBool iIsRoaming;
   366 
   326 
   367     // True if user has selected "Known and new" for join wlan networks
   327     // True if user has selected "Known and new" for join wlan networks