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