|
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: A contact editor strategy interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MPBK2CONTACTEDITORSTRATEGY_H |
|
21 #define MPBK2CONTACTEDITORSTRATEGY_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "MPbk2ContactEditorEventObserver.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CPbk2PresentationContact; |
|
28 class TCoeHelpContext; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * A contact editor strategy interface. |
|
34 * |
|
35 */ |
|
36 class MPbk2ContactEditorStrategy |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * Destructor. |
|
42 */ |
|
43 virtual ~MPbk2ContactEditorStrategy() {} |
|
44 |
|
45 public: // Interface |
|
46 |
|
47 /** |
|
48 * Saves contact to the store. |
|
49 * |
|
50 * @param aObserver For notifying after save. |
|
51 * @param aParams Parameters for the observer. |
|
52 */ |
|
53 virtual void SaveContactL( |
|
54 MPbk2ContactEditorEventObserver& aObserver, |
|
55 MPbk2ContactEditorEventObserver::TParams& aParams) = 0; |
|
56 |
|
57 /** |
|
58 * Deletes the edited contact. |
|
59 * |
|
60 * @param aObserver For notifying after delete. |
|
61 * @param aParams Parameters for the observer. |
|
62 */ |
|
63 virtual void DeleteContactL( |
|
64 MPbk2ContactEditorEventObserver& aObserver, |
|
65 MPbk2ContactEditorEventObserver::TParams& aParams) = 0; |
|
66 |
|
67 /** |
|
68 * Returns the default title of the editor. |
|
69 * |
|
70 * @return The default title of the editor. |
|
71 */ |
|
72 virtual const TDesC& DefaultTitle() const = 0; |
|
73 |
|
74 /** |
|
75 * Needed for changing the edited contact on fly. |
|
76 * |
|
77 * @param aContact The new contact. |
|
78 */ |
|
79 virtual void SwitchContactL( |
|
80 CPbk2PresentationContact* aContact) = 0; |
|
81 |
|
82 /** |
|
83 * Get current editor help context |
|
84 * |
|
85 * @param aContext current editor help context |
|
86 */ |
|
87 virtual void GetHelpContext(TCoeHelpContext &aContext) const = 0; |
|
88 |
|
89 /** |
|
90 * Force the query dialog to terminate as getting choice of |
|
91 * right softkey |
|
92 * |
|
93 * @return True if a query is stopped. |
|
94 */ |
|
95 virtual TBool StopQuery() = 0; |
|
96 }; |
|
97 |
|
98 #endif // MPBK2CONTACTEDITORSTRATEGY_H |
|
99 |
|
100 // End of File |