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