bearermanagement/mpm/inc/mpmdialog.h
branchRCL_3
changeset 58 83ca720e2b9a
parent 0 5a93021fdf25
equal deleted inserted replaced
57:05bc53fe583b 58:83ca720e2b9a
       
     1 /*
       
     2 * Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: MPM class used for agent dialog initiation
       
    15 *
       
    16 */
       
    17 
       
    18 /**
       
    19 @file mpmdialog.h
       
    20 Mobility Policy Manager agent dialog initiation class.
       
    21 */
       
    22 
       
    23 #ifndef MPMDIALOG_H
       
    24 #define MPMDIALOG_H
       
    25 
       
    26 //  INCLUDES
       
    27 #include <e32base.h>
       
    28 #include <agentdialog.h>
       
    29 
       
    30 #include "mpmiapselection.h"
       
    31 #include "mpmdialogbase.h" 
       
    32 
       
    33 // CLASS DECLARATION
       
    34 /**
       
    35 *  MPM dialog initiation class definition.
       
    36 *
       
    37 *  @lib MPMServer.exe
       
    38 *  @since 3.0
       
    39 */
       
    40 class CMPMDialog : protected CMPMDialogBase
       
    41     {    
       
    42 public:
       
    43 
       
    44     /**
       
    45      * Two-phased constructor.
       
    46      * @param aCommDbConnPref Connection preferences
       
    47      */
       
    48     static CMPMDialog* NewL( CMPMIapSelection&          aIapSelection,
       
    49                              const RAvailableIAPList&   aIAPList,
       
    50                              TUint32                    aBearerSet,
       
    51                              CArrayPtrFlat<CMPMDialog>& aQueue,
       
    52                              CMPMServer&                aServer );
       
    53 
       
    54     /**
       
    55      * Destructor.
       
    56      */
       
    57     virtual ~CMPMDialog();
       
    58 
       
    59     /**
       
    60      * Write sort snap information to publish and subscribe.
       
    61      * 
       
    62      * Publish and subscribe is used as there is otherwise circular 
       
    63      * reference between MPM and connection dialogs which causes 
       
    64      * @since 3.2 
       
    65      */
       
    66     void PublishSortSnapInfoL();
       
    67 
       
    68 protected: // Functions from base classes
       
    69     /**
       
    70      * Called from the Base class implementation 
       
    71      * when dialog is started. In the current
       
    72      * call stack it's possible to query aDlg for 
       
    73      * more information and after that pointer is 
       
    74      * invalid.
       
    75      */
       
    76     virtual void Start( CMPMDialogBase* aDlg = NULL );
       
    77 
       
    78     
       
    79     /**
       
    80      * From CActive. Cancels UI dialog.
       
    81      * @since 3.0
       
    82      */        
       
    83     void DoCancel();
       
    84 
       
    85     /**
       
    86      * From CActive. Run when UI dialog finished.
       
    87      * @since 3.0
       
    88      */               
       
    89     void RunL();
       
    90 
       
    91     /**
       
    92      * From CActive. Run if RunL leaves.
       
    93      * @since 3.0
       
    94      * @param aError Error that caused leave.
       
    95      * @return KErrNone
       
    96      */
       
    97     TInt RunError( TInt aError );
       
    98 
       
    99 private: // New methods
       
   100     /**
       
   101      * Initiates a UI dialog towards Agent Dialog Server.
       
   102      * @since 3.0
       
   103      */
       
   104     void InitSelectConnection();
       
   105 
       
   106     /**
       
   107      * C++ default constructor.
       
   108      * @param aCommDbConnPref Connection preferences
       
   109      */
       
   110     CMPMDialog( CMPMIapSelection&           aIapSelection,
       
   111                 TUint32                     aBearerSet,
       
   112                 CArrayPtrFlat<CMPMDialog>&  aQueue,
       
   113                 CMPMServer&                 aServer );
       
   114 
       
   115     /**
       
   116      * 2nd phase constructor.
       
   117      */
       
   118     void ConstructL( const RAvailableIAPList& aIAPList );
       
   119 
       
   120     /**
       
   121      * Copies aOrigin to aCopy. 
       
   122      * @since 3.2 
       
   123      * @param aOrigin Original RAvailableIAPList.
       
   124      * @param aCopy Copy RAvailableIAPList.
       
   125      * @return KErrNone if successful, otherwise one of the 
       
   126      * system-wide error codes.
       
   127      */
       
   128     TInt CopyArray( const RAvailableIAPList& aOrigin, 
       
   129                     RAvailableIAPList&       aCopy );
       
   130 
       
   131     /**
       
   132      * Clean sort snap information from publish and subscribe.
       
   133      * 
       
   134      * @since 3.2 
       
   135      */
       
   136     void CleanSortSnapInfo();
       
   137 
       
   138 private: // Data
       
   139     // Agent Dialog server
       
   140     RGenConAgentDialogServer    iDlgServ;
       
   141 
       
   142     // Iap selection object reference
       
   143     CMPMIapSelection&           iIapSelection;
       
   144 
       
   145     // SNAP or IAP id
       
   146     TUint32                     iSnapOrIAPId;
       
   147 
       
   148     // Bearer set as a combination of
       
   149     // TExtendedConnPref::TExtendedConnBearer values.
       
   150     TUint32                     iBearerSet;
       
   151 
       
   152     // Handle to server class
       
   153     CMPMServer&                 iServer;
       
   154 
       
   155     RAvailableIAPList           iIAPList;
       
   156     };
       
   157 
       
   158 
       
   159 #endif // MPMDIALOG_H
       
   160 
       
   161 // End of file