63
|
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 editor event observer interface.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef MPBK2CONTACTEDITOREVENTOBSERVER_H
|
|
20 |
#define MPBK2CONTACTEDITOREVENTOBSERVER_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <e32std.h>
|
|
24 |
#include <MVPbkContactObserver.h>
|
|
25 |
|
|
26 |
// CLASS DECLARATION
|
|
27 |
|
|
28 |
/**
|
|
29 |
* Phonebook 2 contact editor event observer interface.
|
|
30 |
*/
|
|
31 |
class MPbk2ContactEditorEventObserver
|
|
32 |
{
|
|
33 |
public: // Data types
|
|
34 |
|
|
35 |
/**
|
|
36 |
* Editor flags.
|
|
37 |
*/
|
|
38 |
enum TPbk2ContactEditorFlag
|
|
39 |
{
|
|
40 |
/// Command id
|
|
41 |
EPbk2EditorCommandId = 0x00000001,
|
|
42 |
/// Key code
|
|
43 |
EPbk2EditorKeyCode = 0x00000002
|
|
44 |
};
|
|
45 |
|
|
46 |
/**
|
|
47 |
* Additional parameters for contact editor events.
|
|
48 |
*/
|
|
49 |
struct TParams
|
|
50 |
{
|
|
51 |
/// A collection of TPbk2ContactEditorFlags
|
|
52 |
TUint32 iFlags;
|
|
53 |
/// This must be set if the flag EPbk2EditorCommandId is set
|
|
54 |
TInt iCommandId;
|
|
55 |
/// This must be set if the flag EPbk2EditorKeyCode is set
|
|
56 |
TInt iKeyCode;
|
|
57 |
};
|
|
58 |
|
|
59 |
/**
|
|
60 |
* Parameters for operation failed callback.
|
|
61 |
*/
|
|
62 |
struct TFailParams
|
|
63 |
{
|
|
64 |
/// Indicates whether the error was notified
|
|
65 |
TBool iErrorNotified;
|
|
66 |
/// Indicates whether the editor should be closed
|
|
67 |
TBool iCloseEditor;
|
|
68 |
/// Internal error code
|
|
69 |
TInt iErrorCode;
|
|
70 |
/// Spare data
|
|
71 |
TInt32 iSpare;
|
|
72 |
};
|
|
73 |
|
|
74 |
|
|
75 |
public: // Interface
|
|
76 |
|
|
77 |
/**
|
|
78 |
* Called when a contact editor operation has succesfully completed.
|
|
79 |
*
|
|
80 |
* @param aResult Result of the operation.
|
|
81 |
* @param aParams Parameters of the contact event.
|
|
82 |
*/
|
|
83 |
virtual void ContactEditorOperationCompleted(
|
|
84 |
MVPbkContactObserver::TContactOpResult aResult,
|
|
85 |
TParams aParams ) = 0;
|
|
86 |
|
|
87 |
/**
|
|
88 |
* Called when a contact editor operation has failed.
|
|
89 |
*
|
|
90 |
* @param aOpCode The operation that failed.
|
|
91 |
* @param aErrorCode System error code of the failure.
|
|
92 |
* KErrAccessDenied (when EContactCommit)
|
|
93 |
* means that the contact has not been
|
|
94 |
* locked.
|
|
95 |
* @param aParams Parameters of the event.
|
|
96 |
* @param aFailParams Extra params for error handling.
|
|
97 |
* @return Error code.
|
|
98 |
*/
|
|
99 |
virtual void ContactEditorOperationFailed(
|
|
100 |
MVPbkContactObserver::TContactOp aOpCode,
|
|
101 |
TInt aErrorCode,
|
|
102 |
TParams aParams,
|
|
103 |
TFailParams& aFailParams ) = 0;
|
|
104 |
|
|
105 |
protected: // Protected destructor
|
|
106 |
~MPbk2ContactEditorEventObserver()
|
|
107 |
{}
|
|
108 |
};
|
|
109 |
|
|
110 |
#endif // MPBK2CONTACTEDITOREVENTOBSERVER_H
|
|
111 |
|
|
112 |
// End of File
|