|
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: A command for clipboard copy |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPBK2COPYNUMBERTOCLIPBOARDCMD_H |
|
20 #define CPBK2COPYNUMBERTOCLIPBOARDCMD_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 #include <MPbk2Command.h> |
|
26 #include <MVPbkSingleContactOperationObserver.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class MPbk2ContactUiControl; |
|
30 class MPbk2CommandObserver; |
|
31 class MVPbkStoreContactField; |
|
32 class CPbk2ApplicationServices; |
|
33 |
|
34 // CLASS DECLARATIONS |
|
35 |
|
36 NONSHARABLE_CLASS(CPbk2CopyNumberToClipboardCmd) : |
|
37 public CBase, |
|
38 public MPbk2Command, |
|
39 private MVPbkSingleContactOperationObserver |
|
40 { |
|
41 public: |
|
42 static CPbk2CopyNumberToClipboardCmd* NewL(MPbk2ContactUiControl& aUiControl); |
|
43 |
|
44 ~CPbk2CopyNumberToClipboardCmd(); |
|
45 |
|
46 public: // From MPbk2Command |
|
47 void ExecuteLD(); |
|
48 void AddObserver(MPbk2CommandObserver& aObserver); |
|
49 void ResetUiControl(MPbk2ContactUiControl& aUiControl); |
|
50 |
|
51 private: // From MVPbkSingleContactOperationObserver |
|
52 void VPbkSingleContactOperationComplete( |
|
53 MVPbkContactOperationBase& aOperation, |
|
54 MVPbkStoreContact* aContact); |
|
55 void VPbkSingleContactOperationFailed( |
|
56 MVPbkContactOperationBase& aOperation, |
|
57 TInt aError); |
|
58 |
|
59 private: // implementation |
|
60 CPbk2CopyNumberToClipboardCmd( |
|
61 MPbk2ContactUiControl& aUiControl); |
|
62 void ConstructL(); |
|
63 void CopyNumberToClipboardL(); |
|
64 MVPbkStoreContactField* FocusedFieldLC |
|
65 ( MVPbkStoreContact& aStoreContact ); |
|
66 |
|
67 private: // Data |
|
68 /// Ref: ui control |
|
69 MPbk2ContactUiControl* iUiControl; |
|
70 /// Own: retrieve operation |
|
71 MVPbkContactOperationBase* iRetrieveOperation; |
|
72 /// Ref: command observer |
|
73 MPbk2CommandObserver* iObserver; |
|
74 /// Own: store contact |
|
75 MVPbkStoreContact* iStoreContact; |
|
76 /// Own: Application Services pointer |
|
77 CPbk2ApplicationServices* iAppServices; |
|
78 }; |
|
79 |
|
80 #endif // CPBK2COPYNUMBERTOCLIPBOARDCMD_H |
|
81 // End of file |