wvuing/wvuiave/AppSrc/MCAViewSwitcher.h
branchRCL_3
changeset 13 a941bc465d9f
parent 0 094583676ce7
equal deleted inserted replaced
12:6ca72c0fe49a 13:a941bc465d9f
       
     1 /*
       
     2 * Copyright (c) 2003-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:  General interface for switching chat-client views
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MCAVIEWSWITCHER_H
       
    20 #define MCAVIEWSWITCHER_H
       
    21 
       
    22 #include <e32cmn.h>
       
    23 #include "CAExternalInterface.h"
       
    24 //FORWARD DECLARATIONS
       
    25 class MCAStoredContact;
       
    26 class CCAStatusPaneHandler;
       
    27 class CEikButtonGroupContainer;
       
    28 
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  General interface for switching chat-client views
       
    34 *
       
    35 *  @lib chat.app
       
    36 *  @since 1.2
       
    37 */
       
    38 class MCAViewSwitcher
       
    39     {
       
    40 
       
    41     public: // New functions
       
    42 
       
    43         /**
       
    44         * Activates the given view.
       
    45         * @param TUid Id of the view to be activated
       
    46         */
       
    47         virtual void SwitchViewL( TUid aViewId ) = 0;
       
    48 
       
    49         /**
       
    50         * Activates the last view or given view if there is none.
       
    51         * @param TUid Id of the view to be activated
       
    52         */
       
    53         virtual void SwitchViewBackL( TUid aViewId, TUid aCustomMessageId = KUidMainView,
       
    54                                       const TDesC8& aCustomMessage = KNullDesC8 ) = 0;
       
    55 
       
    56         /**
       
    57          * Switches view to given viewid
       
    58          * @param aViewId View id
       
    59          * @param aCustomMessageId Custom message id
       
    60          * @param aCustomMessage Custom message
       
    61          */
       
    62         virtual void SwitchViewL( TUid aViewId,
       
    63                                   TUid aCustomMessageId,
       
    64                                   const TDesC8& aCustomMessage ) = 0;
       
    65 
       
    66         /**
       
    67          * Register info to switch back to given view
       
    68          * @param aViewId View id to register for back-function
       
    69          * @param aCustomMessageId Custom message id
       
    70          * @param aCustomMessage pointer to Custom message,
       
    71          *                       ownership is transfered
       
    72          * @param aNextView The view which is activated next
       
    73          */
       
    74         virtual void RegisterSwitchBack( TUid aViewId,
       
    75                                          TUid aCustomMessageId,
       
    76                                          HBufC8* aCustomMessage,
       
    77                                          TUid aNextView ) = 0;
       
    78 
       
    79         /**
       
    80          * Deregisters switch back info.
       
    81          * @since S60 v3.1
       
    82          * @param aViewId Id of view to be deregistered
       
    83          * @param aTarget Identification of view, wv id
       
    84          *                if view is conversation view,
       
    85          *                group id if view is chat view.
       
    86          */
       
    87         virtual void DeRegisterSwitchBack( TUid aViewId,
       
    88                                            const TDesC& aTarget ) = 0;
       
    89 
       
    90         /**
       
    91          * Returns handle to statuspane
       
    92          * @return Statuspane instance
       
    93          */
       
    94         virtual CCAStatusPaneHandler* CAStatusPane() const = 0;
       
    95 
       
    96         /**
       
    97          * Checks if view exists.
       
    98          * @param aViewId View id
       
    99          * @return ETrue, if exists, EFalse if not.
       
   100          */
       
   101         virtual TBool ViewExists( TUid aViewId ) = 0;
       
   102 
       
   103         /**
       
   104          * @return Active view's id
       
   105          */
       
   106         virtual TUid ActiveViewId() = 0;
       
   107 
       
   108     protected:
       
   109 
       
   110         /**
       
   111          * Destructor
       
   112          */
       
   113         virtual ~MCAViewSwitcher() {};
       
   114 
       
   115     };
       
   116 
       
   117 #endif      // MCAVIEWSWITCHER_H
       
   118 
       
   119 // End of File