|
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 new contact strategy. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __CPbkContactEditorNewContact_H__ |
|
21 #define __CPbkContactEditorNewContact_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include "MPbkContactEditorStrategy.h" |
|
25 #include <babitflags.h> // TBitFlags |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CPbkFFSCheck; |
|
29 class CPbkContactEngine; |
|
30 class CPbkContactItem; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * Phonebook Contact editor new contact strategy. |
|
36 */ |
|
37 NONSHARABLE_CLASS(CPbkContactEditorNewContact) : |
|
38 public CBase, |
|
39 public MPbkContactEditorStrategy |
|
40 { |
|
41 public: // Constructor and destructor |
|
42 /** |
|
43 * Creates a new instance of this class. |
|
44 * @param aEngine reference to phonebook engine |
|
45 * @param aContactItem reference to the contact item |
|
46 */ |
|
47 static CPbkContactEditorNewContact* NewL( |
|
48 CPbkContactEngine& aEngine, |
|
49 CPbkContactItem& aContactItem); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 ~CPbkContactEditorNewContact(); |
|
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 CPbkContactEditorNewContact( |
|
68 CPbkContactEngine& aEngine, |
|
69 CPbkContactItem& iContactItem); |
|
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: Default title |
|
80 HBufC* iDefaultTitle; |
|
81 /// Own: state flags |
|
82 mutable TBitFlags iStateFlags; |
|
83 /// Own: the contact id of the new contact |
|
84 TContactItemId iContactId; |
|
85 }; |
|
86 |
|
87 #endif // __CPbkContactEditorNewContact_H__ |
|
88 |
|
89 // End of File |