|
1 /* |
|
2 * Copyright (c) 2002-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 delete item manager. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef TPBK2DELETEITEMMANAGER_H |
|
20 #define TPBK2DELETEITEMMANAGER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CPbk2PresentationContact; |
|
27 class MPbk2ContactEditorFieldArray; |
|
28 class MVPbkStoreContactField; |
|
29 class MPbk2ApplicationServices; |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Phonebook 2 contact editor delete item manager. |
|
34 * Responsible for managing item deletion in contact editor. |
|
35 */ |
|
36 class TPbk2DeleteItemManager |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * C++ constructor. |
|
42 * |
|
43 * @param aContact The contact to add fields to. |
|
44 * @param aFieldArray The field array for removing the field. |
|
45 * @param aAppServices Pbk2 application services. |
|
46 */ |
|
47 TPbk2DeleteItemManager( |
|
48 CPbk2PresentationContact& aContact, |
|
49 MPbk2ContactEditorFieldArray& aFieldArray, |
|
50 MPbk2ApplicationServices* aAppServices ); |
|
51 |
|
52 public: // Interface |
|
53 |
|
54 /** |
|
55 * Executes the confirmation query and deletes |
|
56 * the field that has the given control id. |
|
57 * |
|
58 * @param aControlId Id of the control to delete. |
|
59 * @return ETrue if the field was deleted. |
|
60 */ |
|
61 TBool DeleteFieldL( |
|
62 TInt aControlId ); |
|
63 |
|
64 private: // Prohibitions |
|
65 // Prohibit copy constructor when not deriving from CBase |
|
66 TPbk2DeleteItemManager( |
|
67 const TPbk2DeleteItemManager& ); |
|
68 // Prohibit assigment operator when not deriving from CBase |
|
69 TPbk2DeleteItemManager& operator=( |
|
70 const TPbk2DeleteItemManager& ); |
|
71 |
|
72 private: // Implementation |
|
73 void InformDeleteSpeedDialL( |
|
74 const MVPbkStoreContactField& storeField ) const; |
|
75 |
|
76 private: // Data |
|
77 /// Ref: The contact to add the fields |
|
78 CPbk2PresentationContact& iContact; |
|
79 /// Ref: The UI field array for adding new fields |
|
80 MPbk2ContactEditorFieldArray& iFieldArray; |
|
81 ///Ref: Pbk2 Application services |
|
82 MPbk2ApplicationServices* iAppServices; |
|
83 }; |
|
84 |
|
85 #endif // TPBK2DELETEITEMMANAGER_H |
|
86 |
|
87 // End of File |