wvuing/wvuiave/AppSrc/CCARecordedChatsView.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2006 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:  View for recorded chats.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CCARECORDEDCHATSVIEW_H
       
    20 #define CCARECORDEDCHATSVIEW_H
       
    21 
       
    22 // INCLUDES
       
    23 #include "CCAView.h"
       
    24 #include "mcarecipientobserver.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CCARecordedChatsContainer;
       
    28 class MCARecordedChatProvider;
       
    29 class CFindItemMenu;
       
    30 class CItemFinder;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35  *  This class is for recorded chats list view
       
    36  *
       
    37  *  @chatng.exe
       
    38  *  @since 3.2
       
    39  */
       
    40 class CCARecordedChatsView : public CCAView,
       
    41             public MCARecipientObserver
       
    42     {
       
    43     public: // Constructors and destructor
       
    44 
       
    45         /**
       
    46          * Symbian OS default constructor.
       
    47          * @param aAvkonViewResourceId Id for resource used
       
    48          *                             to construct this view
       
    49          * @param aViewId View id
       
    50          */
       
    51         void ConstructL( TInt aAvkonViewResourceId, TUid aViewId );
       
    52 
       
    53         /**
       
    54          * Destructor.
       
    55          */
       
    56         virtual ~CCARecordedChatsView();
       
    57 
       
    58 
       
    59     public: // Functions from base classes
       
    60 
       
    61         /**
       
    62          * From CAknView Handles command events. Gets called by framework
       
    63          * @param aCommand Command that was received
       
    64          */
       
    65         void HandleCommandL( TInt aCommand );
       
    66 
       
    67         /**
       
    68          * From MEikMenuObserver Dynamically initialises a menu pane.
       
    69          * The Uikon framework calls this function, if it is implemented in a
       
    70          * menu’s observer, immediately before the menu pane is activated.
       
    71          * Typically this function should inquire the value of application
       
    72          * data, and initialise menu items accordingly. This includes dimming
       
    73          * menu items, changing their text, setting the state of checked items
       
    74          * and radio buttons and dynamically adding items to a menu.
       
    75          * @param aResourceId Resource ID identifying the
       
    76          *                    menu pane to initialise
       
    77          * @param aMenuPane The in-memory representation of the menu pane
       
    78          */
       
    79         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
    80 
       
    81     public: // New public Methods
       
    82 
       
    83         /**
       
    84          *	Set provider for recorded chats.
       
    85          *	@param aChatProvider Interface to access recorded chat provider.
       
    86          */
       
    87         void SetRecordedChatProvider( MCARecordedChatProvider& aChatProvider );
       
    88 
       
    89     private: // New helper methods
       
    90 
       
    91         /**
       
    92          *	Hides context sensitive popup menu if active.
       
    93          */
       
    94         void HideContextMenu();
       
    95 
       
    96         /**
       
    97          * Resolve currently selected item type and set it to CItemFinder
       
    98          */
       
    99         void UpdateItemTypeL();
       
   100 
       
   101     private:
       
   102 
       
   103         /**
       
   104          * From CAknView, Gets called from framework when activating this view
       
   105          * @param aPrevViewId Previous view id
       
   106          * @param aCustomMessageId Custom message's id
       
   107          * @param aCustomMessage Custom message
       
   108          */
       
   109         void DoActivateL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId,
       
   110                           const TDesC8& aCustomMessage );
       
   111 
       
   112         /**
       
   113          * From CAknView, Gets called from framework when deactivating this view
       
   114          */
       
   115         void DoDeactivate();
       
   116         
       
   117         /**
       
   118         * From CAknView,ProcessCommandL
       
   119         */
       
   120         void ProcessCommandL(TInt aCommand);
       
   121 
       
   122     private: // From MCARecipientObserver
       
   123 
       
   124         /**
       
   125          * @see MCARecipientObserver
       
   126          */
       
   127         TInt ShowRecipientsListL( TInt aResourceId );
       
   128 
       
   129         /**
       
   130          * @see MCARecipientObserver
       
   131          */
       
   132         void ShowPopUpMenuL();
       
   133 
       
   134 
       
   135     private: // Data
       
   136 
       
   137         // Owns. Handle to window-owning control container class
       
   138         CCARecordedChatsContainer* iContainer;
       
   139 
       
   140         //Does not own. Cannot be set when class created.
       
   141         MCARecordedChatProvider* iRecChatArrayProvider;
       
   142 
       
   143         //owns Format for navibar date and time.
       
   144         HBufC* iFormat;
       
   145 
       
   146         //Pop-up menu for context sensitive options. Owns
       
   147         CEikMenuBar* iContextMenu;
       
   148 
       
   149         // owns. menu pane for find item functionality
       
   150         CFindItemMenu* iFindMenu;
       
   151 
       
   152         // owns.
       
   153         CItemFinder* iItemFinder;
       
   154 
       
   155         // not owned, from CCoeEnv
       
   156         CCAAppUi* iAppUI;
       
   157 
       
   158         // Flag for new options menu
       
   159         TBool iNewOptionsMenu;
       
   160 
       
   161         //Flag to denote whether file has to be recommited or not
       
   162         TBool iDirty;
       
   163 
       
   164         // Flag to denote whether object present view has been opend
       
   165         TBool iOpenObject;
       
   166     };
       
   167 
       
   168 #endif // CCARECORDEDCHATSVIEW_H
       
   169 
       
   170 // End of File