contacts_plat/phonebook_2_common_ui_api/inc/MPbk2ViewExplorer.h
branchRCL_3
changeset 63 f4a778e096c2
child 64 c1e8ba0c2b16
equal deleted inserted replaced
62:5b6f26637ad3 63:f4a778e096c2
       
     1 /*
       
     2 * Copyright (c) 2005-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:  Phonebook 2 view explorer interface.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MPBK2VIEWEXPLORER_H
       
    20 #define MPBK2VIEWEXPLORER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <Pbk2ViewId.hrh>
       
    25 #include <vwsdef.h> // TVwsViewId
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class MPbk2ViewActivationTransaction;
       
    29 class CPbk2ViewState;
       
    30 class CPbk2ViewGraph;
       
    31 class CEikImage;
       
    32 
       
    33 namespace Phonebook2 {
       
    34 
       
    35 /**
       
    36  * Flags for HandleViewActivationLC.
       
    37  * @see HandleViewActivationLC
       
    38  */
       
    39 enum TPbk2ViewActivationFlags
       
    40     {
       
    41     /// Update title pane
       
    42     EUpdateTitlePane    = 0x0001,
       
    43     /// Update context pane
       
    44     EUpdateContextPane  = 0x0002,
       
    45     /// Update navi pane
       
    46     EUpdateNaviPane     = 0x0004,
       
    47     /// Update all panes
       
    48     EUpdateAll          = 0xffff
       
    49     };
       
    50 
       
    51 /// Names list view UID
       
    52 static const TUid KPbk2NamesListViewUid =       { EPbk2NamesListViewId };
       
    53 /// Contact info view UID
       
    54 static const TUid KPbk2ContactInfoViewUid =     { EPbk2ContactInfoViewId };
       
    55 /// Settings view UID
       
    56 static const TUid KPbk2SettingsViewUid =        { EPbk2SettingsViewId };
       
    57 
       
    58 } /// namespace
       
    59 
       
    60 
       
    61 // CLASS DECLARATION
       
    62 
       
    63 /**
       
    64  * Phonebook 2 view explorer interface.
       
    65  * View explorer can be used to activate views and to navigate
       
    66  * between the views.
       
    67  */
       
    68 class MPbk2ViewExplorer
       
    69     {
       
    70     public:  // Interface
       
    71 
       
    72         /**
       
    73          * Returns true if given view id indicates a Phonebook 2 view.
       
    74          *
       
    75          * @param aViewId   The id of the view to query.
       
    76          * @return  ETrue if the view is a Phonebook 2 view,
       
    77          *          EFalse otherwise.
       
    78          */
       
    79         virtual TBool IsPhonebook2View(
       
    80                 const TVwsViewId& aViewId ) const = 0;
       
    81 
       
    82         /**
       
    83          * Activates a Phonebook 2 view.
       
    84          *
       
    85          * @param aViewId       Id of the view to activate.
       
    86          * @param aViewState    The state to pass to the activated view,
       
    87          *                      can be NULL.
       
    88          * @see CAknViewAppUi::ActivateLocalViewL(TUid)
       
    89          */
       
    90         virtual void ActivatePhonebook2ViewL(
       
    91                 TUid aViewId,
       
    92                 const CPbk2ViewState* aViewState ) const = 0;
       
    93 
       
    94         /**
       
    95          * Activates the previous view.
       
    96          *
       
    97          * @param aViewState    Desired view state to restore, can be NULL.
       
    98          */
       
    99         virtual void ActivatePreviousViewL(
       
   100                 const CPbk2ViewState* aViewState ) = 0;
       
   101 
       
   102         /**
       
   103          * Updates application-level objects (view navigation state and
       
   104          * status pane) leave-safely at view activation. Called from each
       
   105          * application view's DoActivateL().
       
   106          *
       
   107          * @param aViewId               The activated view's id.
       
   108          * @param aPrevViewId           Previously active view's id.
       
   109          * @param aTitlePaneText        Text to set to title pane. If NULL
       
   110          *                              default text is used.
       
   111          * @param aContextPanePicture   Picture to set into context pane.
       
   112          *                              If NULL default picture is used.
       
   113          * @param aFlags                Combination of TPbk2ViewActivationFlags
       
   114          *                              telling which panes are to be updated.
       
   115          * @return  A transaction object. Commit the object before
       
   116          *          destroying it to keep the changes to application-level
       
   117          *          objects.
       
   118          */
       
   119         virtual MPbk2ViewActivationTransaction* HandleViewActivationLC(
       
   120                 const TUid& aViewId,
       
   121                 const TVwsViewId& aPrevViewId,
       
   122                 const TDesC* aTitlePaneText,
       
   123                 const CEikImage* aContextPanePicture,
       
   124                 TUint aFlags ) =0;
       
   125 
       
   126         /**
       
   127          * Returns Phonebook 2 view graph object.
       
   128          *
       
   129          * @return  View graph.
       
   130          */
       
   131         virtual CPbk2ViewGraph& ViewGraph() const = 0;
       
   132 
       
   133         /**
       
   134          * Returns an extension point for this interface or NULL.
       
   135          *
       
   136          * @param aExtensionUid     Extension UID.
       
   137          * @return  Extension point.
       
   138          */
       
   139         virtual TAny* ViewExplorerExtension(
       
   140                 TUid /*aExtensionUid*/ )
       
   141             {
       
   142             return NULL;
       
   143             }
       
   144 
       
   145     protected: // Disabled functions
       
   146         virtual ~MPbk2ViewExplorer()
       
   147                 {}
       
   148     };
       
   149 
       
   150 #endif // MPBK2VIEWEXPLORER_H
       
   151 
       
   152 // End of File