1 mpbkfetchcallbacks.h |
1 /* |
|
2 * Copyright (c) 2002 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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Fetch dialog MPbkFetchKeyCallback for Phonebook. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __MPbkFetchCallbacks_H__ |
|
21 #define __MPbkFetchCallbacks_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32def.h> |
|
25 #include <cntdef.h> // TContactItemId |
|
26 #include <w32std.h> // TKeyEvent, TEventCode |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CContactIdArray; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Phonebook fetch dialog key event callback. |
|
35 */ |
|
36 class MPbkFetchKeyCallback |
|
37 { |
|
38 public: |
|
39 /// Callback result code |
|
40 enum TResult |
|
41 { |
|
42 /// Ignores the key event and lets the fetch dialog process it |
|
43 EKeyWasNotConsumed, |
|
44 /// Hides the key event from the fetch dialog |
|
45 EKeyWasConsumed, |
|
46 /// Close the fetch dialog as if it was accepted |
|
47 EAccept, |
|
48 /// Close the fetch dialog as if it was canceled |
|
49 ECancel |
|
50 }; |
|
51 |
|
52 /** |
|
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. |
|
57 */ |
|
58 virtual TResult PbkFetchKeyCallbackL |
|
59 (const TKeyEvent& aKeyEvent, TEventCode aType)=0; |
|
60 |
|
61 protected: |
|
62 /** |
|
63 * Protected destructor. Derived class instances are not |
|
64 * destroyed through this interface. |
|
65 */ |
|
66 virtual ~MPbkFetchKeyCallback() { } |
|
67 }; |
|
68 |
|
69 |
|
70 /** |
|
71 * Accept callback interface for fetch dialogs. |
|
72 */ |
|
73 class MPbkFetchDlgAccept |
|
74 { |
|
75 public: |
|
76 /** |
|
77 * Result code whether fetch should be accepted, rejected or canceled. |
|
78 */ |
|
79 enum TPbkFetchAccepted |
|
80 { |
|
81 /// Fetch result is accepted and the fetch dialog is closed |
|
82 KFetchYes = 0, |
|
83 /// Fetch result is rejected and the fetch dialog remains open |
|
84 KFetchNo, |
|
85 /// Fetch result is rejected and the fetch dialog is canceled |
|
86 KFetchCanceled |
|
87 }; |
|
88 |
|
89 /** |
|
90 * Called by a fetch dialog when user makes a selection. |
|
91 * |
|
92 * @param aId Focused contact item |
|
93 * @param aMarkedEntries Selected contact items array |
|
94 * @return @see TPbkFetchAccepted |
|
95 * @see TPbkFetchAccepted |
|
96 */ |
|
97 virtual TPbkFetchAccepted PbkFetchAcceptedL |
|
98 (TContactItemId aId, CContactIdArray* aMarkedEntries) = 0; |
|
99 |
|
100 protected: |
|
101 /** |
|
102 * Protected destructor. Derived class instances are not destroyed |
|
103 * through this interface. |
|
104 */ |
|
105 virtual ~MPbkFetchDlgAccept() { } |
|
106 }; |
|
107 |
|
108 #endif // __MPbkFetchCallbacks_H__ |
|
109 |
|
110 // End of File |