emailuis/emailui/inc/FreestyleEmailUiSettingsListView.h
changeset 2 5253a20d2a1e
parent 0 8466d47a6819
child 20 efd4f1afd43e
equal deleted inserted replaced
1:12c456ceeff2 2:5253a20d2a1e
     1 /*
     1 /*
     2 * Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2005 - 2009 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    13 *
    13 *
    14 * Description:  Freestyle Email header file
    14 * Description:  Freestyle Email header file
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
       
    19 
       
    20 #ifndef FSEMAILSETTINGSLISTVIEW_H
    18 #ifndef FSEMAILSETTINGSLISTVIEW_H
    21 #define FSEMAILSETTINGSLISTVIEW_H
    19 #define FSEMAILSETTINGSLISTVIEW_H
    22 
    20 
    23 // SYSTEM INCLUDES
    21 //  SYSTEM INCLUDES
    24 #include <eiklbv.h>
    22 #include <eiklbv.h>
    25 
    23 
       
    24 //  INTERNAL INCLUDES
    26 #include "FreestyleEmailUiViewBase.h"
    25 #include "FreestyleEmailUiViewBase.h"
    27 
    26 
    28 // FORWARD DECLARATIONS
    27 //  FORWARD DECLARATIONS
    29 class CFsEmailSettingsList;
    28 class CFsEmailSettingsList;
    30 class CFSMailClient;
    29 class CFSMailClient;
    31 class CFreestyleEmailUiAppUi;
    30 class CFreestyleEmailUiAppUi;
    32 class CAsyncCallBack;
    31 class CAsyncCallBack;
       
    32 class CAknStylusPopUpMenu;
       
    33 
    33 
    34 
    34 // CLASS DECLARATION
    35 // CLASS DECLARATION
    35 class CFsEmailSettingsListView : public CFsEmailUiViewBase
    36 class CFsEmailSettingsListView : public CFsEmailUiViewBase
    36 	{
    37 	{
    37 public:
    38 public:	// Constructors and destructor.
    38 	// constructors and destructor
    39 
    39 	static CFsEmailSettingsListView* NewL( 
    40 	static CFsEmailSettingsListView* NewL( 
    40 			CFSMailClient& aMailClient,
    41 			CFSMailClient& aMailClient,
    41 			CFreestyleEmailUiAppUi* aAppUi,
    42 			CFreestyleEmailUiAppUi* aAppUi,
    42 			CAlfControlGroup& aControlGroup );
    43 			CAlfControlGroup& aControlGroup );
    43 	
    44 	
    46 			CFreestyleEmailUiAppUi* aAppUi, 
    47 			CFreestyleEmailUiAppUi* aAppUi, 
    47 			CAlfControlGroup& aControlGroup );        
    48 			CAlfControlGroup& aControlGroup );        
    48 	
    49 	
    49 	virtual ~CFsEmailSettingsListView();
    50 	virtual ~CFsEmailSettingsListView();
    50 
    51 
    51 public:
    52 
    52 	// from base class CAknView
    53 private: // Construction.
       
    54 
       
    55 	CFsEmailSettingsListView( CAlfControlGroup& aControlGroup,
       
    56 							  CFreestyleEmailUiAppUi& aAppUi,
       
    57 							  CFSMailClient& aMailClient );
       
    58 
       
    59     void ConstructL();
       
    60 
       
    61 
       
    62 public: // From base class CAknView.
       
    63 
       
    64 	/**
       
    65 	 * @return The UID for this view
       
    66 	 */
    53 	TUid Id() const;
    67 	TUid Id() const;
       
    68 
       
    69 	/**
       
    70 	 * Handles commands for this view (override).
       
    71 	 * @param aCommand The ID of the command to handle.
       
    72 	 */
    54 	void HandleCommandL( TInt aCommand );
    73 	void HandleCommandL( TInt aCommand );
    55 
    74 
    56 public:
    75 
    57 	// set main list index in parent
    76 public: // New methods.
       
    77 
       
    78 	/**
       
    79 	 * Set the main list index in parent.
       
    80 	 * @param aIndex The index to set.
       
    81 	 */
    58 	void SetSelectedMainListIndex( TInt aIndex );
    82 	void SetSelectedMainListIndex( TInt aIndex );
    59 	
    83 
    60 	// get main list index from parent
    84 	/**
    61 	TInt GetSelectedMainListIndex()const;
    85 	 * Returns the main list index from parent.
       
    86 	 * @return The list index.
       
    87 	 */
       
    88 	TInt GetSelectedMainListIndex() const;
    62 
    89 
    63 	void StartMailboxAsyncQueryL();
    90 	void StartMailboxAsyncQueryL();
    64 
    91 
    65 protected:
    92 	/**
    66 	// from base class CAknView
    93 	 * Displays the pop-up menu.
    67     // <cmail> Toolbar
    94 	 * @param aPosition The position of the pop-up menu.
    68     /*void DoActivateL(
    95 	 */
    69 		const TVwsViewId& aPrevViewId,
    96 	void DisplayStylusPopUpMenu( const TPoint& aPosition );
    70 		TUid aCustomMessageId,
    97 	
    71 		const TDesC8& aCustomMessage );*/
    98 
    72     // </cmail> Toolbar
    99 protected: // From base class CAknView.
    73     void ChildDoDeactivate();                
   100 
       
   101 	/**
       
   102 	 * Handle status pane size change for this view (override).
       
   103 	 */
    74 	void HandleStatusPaneSizeChange();
   104 	void HandleStatusPaneSizeChange();
    75 	void DynInitMenuPaneL(
   105 
    76 			TInt aResourceId, 
   106 	void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPan );
    77 			CEikMenuPane* aMenuPan );
       
    78 	
   107 	
    79 // <cmail> Toolbar    
   108   
    80 private: // from
   109 protected: // From CFsEmailUiViewBase.
    81     
   110 
       
   111 	/**
       
   112 	 *	Handles user actions during activation of the view, 
       
   113 	 *	such as initializing the content.
       
   114 	 */
       
   115     void ChildDoDeactivate();   
       
   116 
    82     /**
   117     /**
    83      * @see CFsEmailUiViewBase::ChildDoActivateL
   118      * @see CFsEmailUiViewBase::ChildDoActivateL
    84      */
   119      */
    85     void ChildDoActivateL( const TVwsViewId& aPrevViewId,
   120     void ChildDoActivateL( const TVwsViewId& aPrevViewId,
    86             TUid aCustomMessageId,
   121 						   TUid aCustomMessageId,
    87             const TDesC8& aCustomMessage );
   122 						   const TDesC8& aCustomMessage );
    88    
   123 
    89 // </cmail> Toolbar    
   124 
    90 	
   125 private: // New methods.
    91 private:
   126 
    92 	CFsEmailSettingsListView( CAlfControlGroup& aControlGroup,
       
    93 	        CFreestyleEmailUiAppUi& aAppUi, CFSMailClient& aMailClient );
       
    94     void ConstructL();
       
    95     
       
    96 	void SetupStatusPaneL();
   127 	void SetupStatusPaneL();
       
   128 
       
   129 	/** 
       
   130 	 * Sets application default title when leaving this view.
       
   131 	 */
    97 	void CleanupStatusPaneL();
   132 	void CleanupStatusPaneL();
    98 	
   133 	
    99 	static TInt DisplayCreateQuery( TAny* aViewPtr );
   134 	static TInt DisplayCreateQuery( TAny* aViewPtr );
       
   135 
   100 	void DisplayCreateMailboxNoteIfNeededL();	
   136 	void DisplayCreateMailboxNoteIfNeededL();	
   101 	
   137 
   102 private: 
   138 
       
   139 private: // Data.
       
   140 
   103 	CFsEmailSettingsList* iFsEmailSettingsList;
   141 	CFsEmailSettingsList* iFsEmailSettingsList;
   104 	CFSMailClient& iMailClient;
   142 	CFSMailClient& iMailClient;
   105 	TBool iMailboxSettings;
   143 	TBool iMailboxSettings;
   106 	TInt iContainerListIndex;
   144 	TInt iContainerListIndex;
       
   145 
   107 	// Async callback for create mailbox query      	
   146 	// Async callback for create mailbox query      	
   108     CAsyncCallBack* iAsyncCallback;	
   147     CAsyncCallBack* iAsyncCallback;	
       
   148 
       
   149     // A long tap detector and a pop-up menu that is invoked by long tap
       
   150     // events. Used for e.g. deleting mail boxes.
       
   151     CAknStylusPopUpMenu* iStylusPopUpMenu;
   109 	};
   152 	};
   110 
   153 
   111 #endif // FSEMAILSETTINGSLISTVIEW_H			
   154 #endif // FSEMAILSETTINGSLISTVIEW_H
       
   155