|
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 server app assign select create |
|
15 * : new property phase. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CPBK2SELECTCREATENEWPROPERTYPHASE_H |
|
21 #define CPBK2SELECTCREATENEWPROPERTYPHASE_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <MPbk2ExitCallback.h> |
|
26 #include "MPbk2ServicePhase.h" |
|
27 #include <TVPbkContactStoreUriPtr.h> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CVPbkContactLinkArray; |
|
31 class MPbk2ServicePhaseObserver; |
|
32 class MVPbkContactLinkArray; |
|
33 class MPbk2SelectFieldProperty; |
|
34 class MPbk2DialogEliminator; |
|
35 class MVPbkStoreContact; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * Phonebook 2 server app assign select create new property phase. |
|
41 * Responsible for selecting single assign property. |
|
42 */ |
|
43 class CPbk2SelectCreateNewPropertyPhase : |
|
44 public CActive, |
|
45 public MPbk2ServicePhase, |
|
46 private MPbk2ExitCallback |
|
47 { |
|
48 public: // Construction |
|
49 |
|
50 /** |
|
51 * Creates a new instance of this class. |
|
52 * |
|
53 * @param aSavingStoreUri Saving store uri |
|
54 * @param aObserver Observer. |
|
55 * @param aFilterBuffer Address select filter buffer. |
|
56 * @param aSelectFieldProperty Select field property. |
|
57 * @param aResult Selection result. |
|
58 * @param aNoteFlags Information note flags. |
|
59 * @return A new instance of this class. |
|
60 */ |
|
61 static CPbk2SelectCreateNewPropertyPhase* NewL( |
|
62 TVPbkContactStoreUriPtr aSavingStoreUri, |
|
63 MPbk2ServicePhaseObserver& aObserver, |
|
64 HBufC8* aFilterBuffer, |
|
65 MPbk2SelectFieldProperty*& aSelectFieldProperty, |
|
66 TInt& aResult, |
|
67 TUint& aNoteFlags ); |
|
68 |
|
69 /** |
|
70 * Destructor. |
|
71 */ |
|
72 ~CPbk2SelectCreateNewPropertyPhase(); |
|
73 |
|
74 public: // From MPbk2ServicePhase |
|
75 void LaunchServicePhaseL(); |
|
76 void CancelServicePhase(); |
|
77 void RequestCancelL( |
|
78 TInt aExitCommandId ); |
|
79 void AcceptDelayedL( |
|
80 const TDesC8& aContactLinkBuffer ); |
|
81 MVPbkContactLinkArray* Results() const; |
|
82 TInt ExtraResultData() const; |
|
83 MVPbkStoreContact* TakeStoreContact(); |
|
84 HBufC* FieldContent() const; |
|
85 |
|
86 public: // From MPbk2ExitCallback |
|
87 TBool OkToExitL( |
|
88 TInt aCommandId ); |
|
89 |
|
90 private: // From CActive |
|
91 void RunL(); |
|
92 TInt RunError( |
|
93 TInt aError ); |
|
94 void DoCancel(); |
|
95 |
|
96 private: // Implementation |
|
97 CPbk2SelectCreateNewPropertyPhase( |
|
98 TVPbkContactStoreUriPtr aSavingStoreUri, |
|
99 MPbk2ServicePhaseObserver& aObserver, |
|
100 HBufC8* aFilterBuffer, |
|
101 MPbk2SelectFieldProperty*& aSelectFieldProperty, |
|
102 TInt& aResult, |
|
103 TUint& aNoteFlags ); |
|
104 void SelectFieldL(); |
|
105 void AppendResultL( |
|
106 const MVPbkStoreContact* aStoreContact ); |
|
107 void IssueRequest(); |
|
108 |
|
109 private: // Data |
|
110 /// Own: contact store uri ptr |
|
111 TVPbkContactStoreUriPtr iSavingStoreUri; |
|
112 /// Ref: Observer |
|
113 MPbk2ServicePhaseObserver& iObserver; |
|
114 /// Own: Store contact |
|
115 MVPbkStoreContact* iStoreContact; |
|
116 /// Own: To check is this destroyed |
|
117 TBool* iDestroyedPtr; |
|
118 /// Ref: Select field dialog eliminator |
|
119 MPbk2DialogEliminator* iSelectFieldDialogEliminator; |
|
120 /// Ref: Address select filter buffer |
|
121 HBufC8* iFilterBuffer; |
|
122 /// Ref: Select field property |
|
123 MPbk2SelectFieldProperty*& iSelectFieldProperty; |
|
124 /// Own: Selected field index |
|
125 TInt& iResult; |
|
126 /// Ref: Information note flags |
|
127 TUint& iNoteFlags; |
|
128 }; |
|
129 |
|
130 #endif // CPBK2SELECTCREATENEWPROPERTYPHASE_H |
|
131 |
|
132 // End of File |