|
1 /* |
|
2 * Copyright (c) 2002 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: |
|
15 * Phonebook contact editor edit contact strategy. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __CPbkContactEditorEditContact_H__ |
|
21 #define __CPbkContactEditorEditContact_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include "MPbkContactEditorStrategy.h" |
|
25 #include <e32base.h> |
|
26 #include <babitflags.h> // TBitFlags |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CPbkFFSCheck; |
|
30 class CPbkContactEngine; |
|
31 class CPbkContactItem; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * Phonebook Contact editor new contact strategy. |
|
37 */ |
|
38 NONSHARABLE_CLASS(CPbkContactEditorEditContact) : |
|
39 public CBase, |
|
40 public MPbkContactEditorStrategy |
|
41 { |
|
42 public: // Constructor and destructor |
|
43 /** |
|
44 * Creates a new instance of this class. |
|
45 * @param aEngine reference to phonebook engine |
|
46 * @param aContactItem contact item reference |
|
47 */ |
|
48 static CPbkContactEditorEditContact* NewL( |
|
49 CPbkContactEngine& aEngine, |
|
50 CPbkContactItem& aContactItem); |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 ~CPbkContactEditorEditContact(); |
|
55 |
|
56 public: // from MPbkContactEditorStrategy |
|
57 TContactItemId SaveContactL(); |
|
58 void GetHelpContext(TCoeHelpContext& aContext) const; |
|
59 void SetStateModified(); |
|
60 void SetStateInitialized(); |
|
61 void DeleteContactL(); |
|
62 TBool Saved(); |
|
63 const TDesC& DefaultTitle() const; |
|
64 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
|
65 |
|
66 private: // implementation |
|
67 CPbkContactEditorEditContact( |
|
68 CPbkContactEngine& aEngine, |
|
69 CPbkContactItem& aContactItem); |
|
70 void ConstructL(); |
|
71 |
|
72 private: // data members |
|
73 /// Ref: contact engine |
|
74 CPbkContactEngine& iEngine; |
|
75 /// Ref: Contact item |
|
76 CPbkContactItem& iContactItem; |
|
77 /// Own: FFS checker |
|
78 CPbkFFSCheck* iFFSCheck; |
|
79 /// Own: state flags |
|
80 mutable TBitFlags iStateFlags; |
|
81 }; |
|
82 |
|
83 #endif // __CPbkContactEditorEditContact_H__ |
|
84 |
|
85 // End of File |