2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Fetch dialog MPbkFetchKeyCallback for Phonebook.
20 #ifndef __MPbkFetchCallbacks_H__
21 #define __MPbkFetchCallbacks_H__
25 #include <cntdef.h> // TContactItemId
26 #include <w32std.h> // TKeyEvent, TEventCode
28 // FORWARD DECLARATIONS
29 class CContactIdArray;
34 * Phonebook fetch dialog key event callback.
36 class MPbkFetchKeyCallback
39 /// Callback result code
42 /// Ignores the key event and lets the fetch dialog process it
44 /// Hides the key event from the fetch dialog
46 /// Close the fetch dialog as if it was accepted
48 /// Close the fetch dialog as if it was canceled
53 * Callback function for key presses in fetch.
54 * @param aKeyEvent The key event.
55 * @param aType The type of event.
56 * @return Callback result.
58 virtual TResult PbkFetchKeyCallbackL
59 (const TKeyEvent& aKeyEvent, TEventCode aType)=0;
63 * Protected destructor. Derived class instances are not
64 * destroyed through this interface.
66 virtual ~MPbkFetchKeyCallback() { }
71 * Accept callback interface for fetch dialogs.
73 class MPbkFetchDlgAccept
77 * Result code whether fetch should be accepted, rejected or canceled.
79 enum TPbkFetchAccepted
81 /// Fetch result is accepted and the fetch dialog is closed
83 /// Fetch result is rejected and the fetch dialog remains open
85 /// Fetch result is rejected and the fetch dialog is canceled
90 * Called by a fetch dialog when user makes a selection.
92 * @param aId Focused contact item
93 * @param aMarkedEntries Selected contact items array
94 * @return @see TPbkFetchAccepted
95 * @see TPbkFetchAccepted
97 virtual TPbkFetchAccepted PbkFetchAcceptedL
98 (TContactItemId aId, CContactIdArray* aMarkedEntries) = 0;
102 * Protected destructor. Derived class instances are not destroyed
103 * through this interface.
105 virtual ~MPbkFetchDlgAccept() { }
108 #endif // __MPbkFetchCallbacks_H__