sipplugins/sippsipsettingsui/inc/sipsettlistsipprofsetview.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2005 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:  The profile list view controller
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef SIP_SETT_LIST_SIP_PROF_SET_VIEW_H
       
    20 #define SIP_SETT_LIST_SIP_PROF_SET_VIEW_H
       
    21 
       
    22 //  INCLUDES
       
    23 
       
    24 #include <aknview.h>
       
    25 #include "mgssipprofilehandler.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 
       
    29 class CSIPSettListSIPProfSetContainer;
       
    30 class CSIPSettListSIPProfSetModel;
       
    31 class CAknPopupList;
       
    32 class MGSSIPProfileHandler;
       
    33     
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37 *  CSIPSettListSIPProfSetView view class
       
    38 *  @since 3.0
       
    39 *  view class for SIP Profile settings
       
    40 */
       
    41 class CSIPSettListSIPProfSetView : 
       
    42       public CAknView
       
    43     {
       
    44     public:  // Constructors and destructor
       
    45         
       
    46         /**
       
    47         * Two-phased constructor. Instance is placed on the cleanup stack
       
    48         * @param aHandler Profile handler for model
       
    49         */
       
    50         static CSIPSettListSIPProfSetView* NewLC( 
       
    51             MGSSIPProfileHandler* aHandler );
       
    52         
       
    53         /**
       
    54         * Destructor.
       
    55         */
       
    56         virtual ~CSIPSettListSIPProfSetView();
       
    57 
       
    58     public: // Functions from base classes
       
    59 
       
    60         /**
       
    61         * From CAknView.
       
    62         * Returns the UID of the view
       
    63         * @return UID of the view
       
    64         */
       
    65         TUid Id() const;        
       
    66         
       
    67     public:  
       
    68      
       
    69         /**
       
    70         * Saves all settings
       
    71         */
       
    72         TInt SaveAllSettings();     
       
    73       
       
    74     protected:  // New functions
       
    75                 
       
    76         /**
       
    77         * Saves new settings and returns back to list view
       
    78         */
       
    79         void BackToListViewL();
       
    80         
       
    81         /**
       
    82         * Opens the pop-up list on the selected item
       
    83         */
       
    84         void ChangeSettingL( TInt aCommand );
       
    85 
       
    86     private:  // Functions from base classes
       
    87                 
       
    88         /**
       
    89         * From CAknView
       
    90         * Handles the user interaction
       
    91         * @param aCommand ID of the command to respond to
       
    92         */
       
    93         void HandleCommandL( TInt aCommand ); 
       
    94 
       
    95         /**
       
    96         * From CAknView
       
    97         * Called upon the activation of the view. Creates the control
       
    98         * container and model
       
    99         */
       
   100         void DoActivateL( 
       
   101             const TVwsViewId& aPrevViewId, 
       
   102             TUid aCustomMessageId, 
       
   103             const TDesC8& aCustomMessage );
       
   104         
       
   105         /**
       
   106         * From CAknView
       
   107         * Deletes the control container and model
       
   108         */
       
   109         void DoDeactivate();
       
   110         
       
   111         /**
       
   112         * From CAknView (MEikMenuObserver)
       
   113         * Dynamically initializes the contents of the menu list
       
   114         */
       
   115         void DynInitMenuPaneL( TInt aResourceId,
       
   116                                CEikMenuPane* aMenuPane );
       
   117 
       
   118     private:    
       
   119 
       
   120         /**
       
   121         * C++ default constructor.
       
   122         * @param aHandler Profile handler for model
       
   123         */
       
   124         CSIPSettListSIPProfSetView( MGSSIPProfileHandler* aHandler );
       
   125 
       
   126         /**
       
   127         * By default Symbian 2nd phase constructor is private.
       
   128         */
       
   129         void ConstructL();
       
   130 
       
   131     private:    // Data
       
   132         
       
   133         // The view part of the profile setting view
       
   134         CSIPSettListSIPProfSetContainer* iView;
       
   135 
       
   136         // The model part of the profile setting view
       
   137         CSIPSettListSIPProfSetModel* iModel;
       
   138 
       
   139         // Profile handler
       
   140         MGSSIPProfileHandler* iHandler;
       
   141         
       
   142         // Previous view
       
   143         TVwsViewId iPrevViewId; 
       
   144         
       
   145     friend class UT_SIPSettListSIPProfSetView;
       
   146     friend class UT_SIPSettListSIPRegSetView;
       
   147     };
       
   148 
       
   149 #endif      // SIP_SETT_LIST_SIP_PROF_SET_VIEW_H   
       
   150             
       
   151 // End of File