phonebookui/Phonebook2/inc/MPbk2ContactNavigation.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     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 contact navigation interface.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MPBK2CONTACTNAVIGATION_H
       
    20 #define MPBK2CONTACTNAVIGATION_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <w32std.h>
       
    24 #include <MVPbkContactViewObserver.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class MVPbkContactLink;
       
    28 class MVPbkContactViewBase;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33  * Phonebook 2 contact navigation interface.
       
    34  */
       
    35 class MPbk2ContactNavigation : public MVPbkContactViewObserver
       
    36     {
       
    37     public: // Interface
       
    38 
       
    39         /**
       
    40          * Destructor.
       
    41          */
       
    42         virtual ~MPbk2ContactNavigation()
       
    43             {}
       
    44 
       
    45        /**
       
    46          * Sets the contact view to navigate.
       
    47          *
       
    48          * @param aScrollView           The contact view to nagivate.
       
    49          * @param aOwnershipTransfered  ETrue if the ownership of scroll
       
    50          *                              view is transfered to this object.
       
    51          */
       
    52         virtual void SetScrollViewL(
       
    53                 MVPbkContactViewBase* aScrollView,
       
    54                 TBool aOwnershipTransfered ) = 0;
       
    55 
       
    56         /**
       
    57          * Updates navigation indicators.
       
    58          *
       
    59          * @param aContactLink      Contact whose position in
       
    60          *                          the view is to be indicated.
       
    61          */
       
    62         virtual void UpdateNaviIndicatorsL(
       
    63                 const MVPbkContactLink& aContactLink ) const = 0;
       
    64 
       
    65         /**
       
    66          * Handles relevant command keys by navigating
       
    67          * contacts.
       
    68          *
       
    69          * @see CCoeControl::OfferKeyEventL
       
    70          */
       
    71         virtual TBool HandleCommandKeyL(
       
    72                 const TKeyEvent& aKeyEvent,
       
    73                 TEventCode aType ) = 0;
       
    74         
       
    75         /**
       
    76          * Returns the current contact of the navigator. 
       
    77          * After MPbk2NavigationObserver::EContactDeleted the current contact
       
    78          * will be set to the next contact. If there are no more contact this
       
    79          * will return NULL in the CleanupStack.
       
    80          *
       
    81          * @return The current contact or NULL in the CleanupStack
       
    82          */
       
    83         virtual MVPbkContactLink* CurrentContactLC() const = 0;
       
    84     };
       
    85 
       
    86 #endif // MPBK2CONTACTNAVIGATION_H
       
    87 
       
    88 // End of File