|
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: |
|
15 * Remove thumbnail command event handling class. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "CPbk2RemoveThumbnailCmd.h" |
|
22 |
|
23 #include "CPbk2ImageManager.h" |
|
24 #include <MVPbkStoreContact.h> |
|
25 |
|
26 #include <Pbk2Debug.h> |
|
27 |
|
28 |
|
29 // ================= MEMBER FUNCTIONS ======================= |
|
30 |
|
31 CPbk2RemoveThumbnailCmd::CPbk2RemoveThumbnailCmd |
|
32 (MPbk2ContactUiControl& aUiControl) : |
|
33 CPbk2ThumbnailCmdBase(aUiControl) |
|
34 { |
|
35 } |
|
36 |
|
37 void CPbk2RemoveThumbnailCmd::ConstructL() |
|
38 { |
|
39 CPbk2ThumbnailCmdBase::BaseConstructL(); |
|
40 } |
|
41 |
|
42 CPbk2RemoveThumbnailCmd* CPbk2RemoveThumbnailCmd::NewL |
|
43 (MPbk2ContactUiControl& aUiControl) |
|
44 { |
|
45 CPbk2RemoveThumbnailCmd* self = new (ELeave) |
|
46 CPbk2RemoveThumbnailCmd(aUiControl); |
|
47 CleanupStack::PushL(self); |
|
48 self->ConstructL(); |
|
49 CleanupStack::Pop(self); |
|
50 return self; |
|
51 } |
|
52 |
|
53 CPbk2RemoveThumbnailCmd::~CPbk2RemoveThumbnailCmd() |
|
54 { |
|
55 } |
|
56 |
|
57 TBool CPbk2RemoveThumbnailCmd::ExecuteCommandL() |
|
58 { |
|
59 PBK2_DEBUG_PRINT(PBK2_DEBUG_STRING |
|
60 ("CPbk2RemoveThumbnailCmd::ExecuteCommandL(0x%x), start"), this); |
|
61 |
|
62 iThumbnailManager->RemoveImage(*iStoreContact, *iFieldType); |
|
63 iStoreContact->CommitL(*this); |
|
64 |
|
65 PBK2_DEBUG_PRINT(PBK2_DEBUG_STRING |
|
66 ("CPbk2RemoveThumbnailCmd::ExecuteCommandL(0x%x), end"), this); |
|
67 |
|
68 return ETrue; |
|
69 } |
|
70 |
|
71 |
|
72 // End of File |