|
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 field property selector interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MPBK2SELECTFIELDPROPERTY_H |
|
20 #define MPBK2SELECTFIELDPROPERTY_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class MVPbkFieldType; |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * Phonebook 2 field property selector interface. |
|
32 */ |
|
33 class MPbk2SelectFieldProperty |
|
34 { |
|
35 public: // Interface |
|
36 |
|
37 /** |
|
38 * Destructor. |
|
39 */ |
|
40 virtual ~MPbk2SelectFieldProperty() |
|
41 {}; |
|
42 |
|
43 /** |
|
44 * Prepares the selector. |
|
45 */ |
|
46 virtual void PrepareL() = 0; |
|
47 |
|
48 /** |
|
49 * Executes the selector. |
|
50 * |
|
51 * @return Error code given by field property selector. |
|
52 * These error codes are custom coded: |
|
53 * - KErrNone if no errors. |
|
54 * - KErrAlreadyExists if the contact contains one |
|
55 * field of the given field type and the maximum |
|
56 * number of contact fields of that type is one. |
|
57 * - KErrNotSupported if the contact does not support |
|
58 * given field type. |
|
59 */ |
|
60 virtual TInt ExecuteL() = 0; |
|
61 |
|
62 /** |
|
63 * Cancels the selection service. |
|
64 * |
|
65 * @param aCommandId Cancel command id. |
|
66 */ |
|
67 virtual void Cancel( |
|
68 TInt aCommandId ) = 0; |
|
69 |
|
70 /** |
|
71 * Returns selected field type. |
|
72 * |
|
73 * @return User selected field type. |
|
74 */ |
|
75 virtual const MVPbkFieldType* SelectedFieldType() const = 0; |
|
76 |
|
77 /** |
|
78 * Returns selected field index. |
|
79 * This is usable only when updating existing contact with a |
|
80 * detail that has a multiplicity of one and that detail already |
|
81 * exists in the contact. In that case this function returns |
|
82 * the store index of that field. In other cases |
|
83 * returns KErrNotSupported. |
|
84 * |
|
85 * @return Store index of selected field. |
|
86 */ |
|
87 virtual TInt SelectedFieldIndex() const = 0; |
|
88 }; |
|
89 |
|
90 #endif // MPBK2SELECTFIELDPROPERTY_H |
|
91 |
|
92 // End of File |