63
|
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 remove from top contacts command
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef CPBK2NLXREMOVEFROMTOPCONTACTSCMD_H
|
|
20 |
#define CPBK2NLXREMOVEFROMTOPCONTACTSCMD_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <e32base.h>
|
|
24 |
#include <MPbk2Command.h>
|
|
25 |
#include <MVPbkOperationObserver.h>
|
|
26 |
|
|
27 |
#include "CPbk2DelayedWaitNote.h"
|
|
28 |
|
|
29 |
// FORWARD DECLARATIONS
|
|
30 |
class MPbk2ContactUiControl;
|
|
31 |
class CVPbkTopContactManager;
|
|
32 |
class MVPbkContactOperationBase;
|
|
33 |
|
|
34 |
// CLASS DECLARATION
|
|
35 |
|
|
36 |
/**
|
|
37 |
* Phonebook 2 remove from top contacts command object.
|
|
38 |
*/
|
|
39 |
class CPbk2NlxRemoveFromTopContactsCmd :
|
|
40 |
public CActive,
|
|
41 |
public MPbk2Command,
|
|
42 |
public MVPbkOperationObserver,
|
|
43 |
public MVPbkOperationErrorObserver,
|
|
44 |
public MPbk2ProcessDecoratorObserver
|
|
45 |
{
|
|
46 |
public: // Construction and destruction
|
|
47 |
|
|
48 |
/**
|
|
49 |
* Creates a new instance of this class.
|
|
50 |
*
|
|
51 |
* @param Pbk2 Contact Ui control
|
|
52 |
* @return A new instance of this class.
|
|
53 |
*/
|
|
54 |
static CPbk2NlxRemoveFromTopContactsCmd* NewL(
|
|
55 |
MPbk2ContactUiControl& aUiControl );
|
|
56 |
|
|
57 |
/**
|
|
58 |
* Destructor.
|
|
59 |
*/
|
|
60 |
~CPbk2NlxRemoveFromTopContactsCmd();
|
|
61 |
public: // From MVPbkOpeartionObserver
|
|
62 |
void VPbkOperationCompleted( MVPbkContactOperationBase* aOperation );
|
|
63 |
public: // From MVPbkOpeartionErrorObserver
|
|
64 |
void VPbkOperationFailed(
|
|
65 |
MVPbkContactOperationBase* aOperation ,
|
|
66 |
TInt aError );
|
|
67 |
|
|
68 |
public: //From MPbk2Command
|
|
69 |
void ExecuteLD();
|
|
70 |
void ResetUiControl( MPbk2ContactUiControl& aUiControl );
|
|
71 |
void AddObserver( MPbk2CommandObserver& aObserver );
|
|
72 |
|
|
73 |
private: //Construction
|
|
74 |
CPbk2NlxRemoveFromTopContactsCmd(
|
|
75 |
MPbk2ContactUiControl& aUiControl );
|
|
76 |
void ConstructL();
|
|
77 |
|
|
78 |
private://From CActive
|
|
79 |
void DoCancel();
|
|
80 |
void RunL();
|
|
81 |
TInt RunError(TInt aError);
|
|
82 |
|
|
83 |
private: // From MPbk2ProcessDecoratorObserver
|
|
84 |
void ProcessDismissed( TInt aCancelCode );
|
|
85 |
|
|
86 |
private: // Implementation
|
|
87 |
void RemoveTopContactL();
|
|
88 |
void ShowDelayedWaitNoteL();
|
|
89 |
|
|
90 |
private: // Data
|
|
91 |
//Ref
|
|
92 |
MPbk2CommandObserver* iCommandObserver;
|
|
93 |
//Ref
|
|
94 |
MPbk2ContactUiControl *iUiControl;
|
|
95 |
//Own:
|
|
96 |
MVPbkContactOperationBase* iVPbkContactOperationBase;
|
|
97 |
//Own:
|
|
98 |
CVPbkTopContactManager* iVPbkTopContactManager;
|
|
99 |
|
|
100 |
CPbk2DelayedWaitNote* iDelayedWaitNote;
|
|
101 |
};
|
|
102 |
|
|
103 |
#endif // CPBK2NLXREMOVEFROMTOPCONTACTSCMD_H
|
|
104 |
|
|
105 |
// End of File
|