|
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 command for setting ringing tone. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPGUSETTONECMD_H |
|
20 #define CPGUSETTONECMD_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <CPbk2SetToneBase.h> |
|
25 #include <MPbk2ContactRelocatorObserver.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MPbk2ContactUiControl; |
|
29 class MVPbkStoreContact; |
|
30 class MVPbkFieldType; |
|
31 class CPbk2ContactRelocator; |
|
32 class MVPbkContactLinkArray; |
|
33 class MVPbkContactGroup; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * A command for setting ringing tone. |
|
39 * |
|
40 */ |
|
41 NONSHARABLE_CLASS(CPguSetToneCmd) : |
|
42 public CPbk2SetToneBase |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Creates a new instance of this class. |
|
48 * @param aUiControl UI control. |
|
49 * @return A new instance of this class. |
|
50 */ |
|
51 static CPguSetToneCmd* NewL( |
|
52 MPbk2ContactUiControl& aUiControl ); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 ~CPguSetToneCmd(); |
|
58 |
|
59 private: // From MPbk2ContactRelocatorObserver |
|
60 void ContactRelocatedL( |
|
61 MVPbkStoreContact* aRelocatedContact ); |
|
62 void ContactRelocationFailed( |
|
63 TInt aReason, |
|
64 MVPbkStoreContact* aContact ); |
|
65 void ContactsRelocationFailed( |
|
66 TInt aReason, |
|
67 CVPbkContactLinkArray* aContacts ); |
|
68 void RelocationProcessComplete(); |
|
69 |
|
70 private: // From MVPbkSingleContactOperationObserver |
|
71 void VPbkSingleContactOperationComplete( |
|
72 MVPbkContactOperationBase& aOperation, |
|
73 MVPbkStoreContact* aContact); |
|
74 void VPbkSingleContactOperationFailed( |
|
75 MVPbkContactOperationBase& aOperation, |
|
76 TInt aError); |
|
77 |
|
78 private: // From MVPbkContactObserver |
|
79 void ContactOperationCompleted(TContactOpResult aResult); |
|
80 void ContactOperationFailed |
|
81 (TContactOp aOpCode, TInt aErrorCode, TBool aErrorNotified); |
|
82 |
|
83 private: // Implementation |
|
84 CPguSetToneCmd( |
|
85 MPbk2ContactUiControl& aUiControl ); |
|
86 void ConstructL(); |
|
87 void SetToneL(); |
|
88 void DoRelocateContactsL(); |
|
89 void CreateLinkArrayL( MVPbkContactLinkArray* aArray ); |
|
90 void ConfirmationL(); |
|
91 |
|
92 private: // data |
|
93 /// Own: contacts which are belonging to group |
|
94 CVPbkContactLinkArray* iContacts; |
|
95 /// Own: current contact retrieved from link array |
|
96 MVPbkStoreContact* iCurrentContact; |
|
97 /// Ref: group |
|
98 MVPbkContactGroup* iGroup; |
|
99 /// Own: current contact index |
|
100 TInt iCurrentIndex; |
|
101 /// Own: flag indicating is process decorator already started |
|
102 TBool iIsStarted; |
|
103 }; |
|
104 |
|
105 #endif // CPGUSETTONECMD_H |
|
106 |
|
107 // End of File |