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:
|
|
15 |
* Set image command event handling class.
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef CPBK2SETIMAGECMD_H
|
|
21 |
#define CPBK2SETIMAGECMD_H
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include "CPbk2ImageCmdBase.h"
|
|
25 |
#include <MPbk2ImageOperationObservers.h> // MPbk2ImageSetObserver
|
|
26 |
#include <MMGFetchVerifier.h> // MMGFetchVerifier
|
|
27 |
#include <MediaFileTypes.hrh>
|
|
28 |
#include <badesca.h>
|
|
29 |
#include <AknProgressDialog.h>
|
|
30 |
|
|
31 |
|
|
32 |
// FORWARD DECLARATIONS
|
|
33 |
class CAknWaitDialog;
|
|
34 |
class CPbk2DrmManager;
|
|
35 |
|
|
36 |
// CLASS DECLARATION
|
|
37 |
|
|
38 |
/**
|
|
39 |
* Set image command event handling class.
|
|
40 |
*/
|
|
41 |
NONSHARABLE_CLASS(CPbk2SetImageCmd) :
|
|
42 |
public CPbk2ImageCmdBase,
|
|
43 |
public MProgressDialogCallback,
|
|
44 |
private MPbk2ImageSetObserver,
|
|
45 |
private MMGFetchVerifier
|
|
46 |
{
|
|
47 |
public: // Constructors and destructor
|
|
48 |
/**
|
|
49 |
* Creates a new instance of this class.
|
|
50 |
* @param aUiControl A related ui control
|
|
51 |
* @return a new instance of this class.
|
|
52 |
*/
|
|
53 |
static CPbk2SetImageCmd* NewL(
|
|
54 |
MPbk2ContactUiControl& aUiControl);
|
|
55 |
|
|
56 |
/**
|
|
57 |
* Destructor.
|
|
58 |
*/
|
|
59 |
~CPbk2SetImageCmd();
|
|
60 |
|
|
61 |
/**
|
|
62 |
* Wrap 'MGFetch::RunL'
|
|
63 |
*/
|
|
64 |
static TBool MGFetchL( CDesCArray& aSelectedFiles,
|
|
65 |
TMediaFileType aMediaType,
|
|
66 |
TBool aMultiSelect,
|
|
67 |
MMGFetchVerifier* aVerifier );
|
|
68 |
|
|
69 |
private: // from CPbk2ImageCmdBase
|
|
70 |
TBool ExecuteCommandL();
|
|
71 |
|
|
72 |
private: // from MPbkImageSetObserver
|
|
73 |
void Pbk2ImageSetComplete(
|
|
74 |
MPbk2ImageOperation& aOperation);
|
|
75 |
void Pbk2ImageSetFailed(
|
|
76 |
MPbk2ImageOperation& aOperation,
|
|
77 |
TInt aError);
|
|
78 |
|
|
79 |
private: // from MProgressDialogCallback
|
|
80 |
void DialogDismissedL( TInt aButtonId );
|
|
81 |
|
|
82 |
private: // from MMGFetchVerifier
|
|
83 |
TBool VerifySelectionL(
|
|
84 |
const MDesCArray* aSelectedFiles);
|
|
85 |
private: // Implementation
|
|
86 |
CPbk2SetImageCmd(
|
|
87 |
MPbk2ContactUiControl& aUiControl);
|
|
88 |
void ConstructL();
|
|
89 |
void Cancel();
|
|
90 |
void DismissWaitNote();
|
|
91 |
void SetImageRefL(
|
|
92 |
const TDesC& aFileName);
|
|
93 |
|
|
94 |
TBool DoVerifySelectionL(
|
|
95 |
const MDesCArray* aSelectedFiles);
|
|
96 |
void ShowErrorNoteL();
|
|
97 |
|
|
98 |
private: // Data
|
|
99 |
/// Own: image set operation
|
|
100 |
MPbk2ImageOperation* iImageOperation;
|
|
101 |
/// Own: wait note dialog
|
|
102 |
CAknWaitDialog* iWaitNote;
|
|
103 |
/// Own: DRM support
|
|
104 |
CPbk2DrmManager* iDrmManager;
|
|
105 |
TBool iVerificationFailed;
|
|
106 |
TBool iImageSetFailed;
|
|
107 |
TInt iImageSetError;
|
|
108 |
};
|
|
109 |
|
|
110 |
#endif // CPBK2SETIMAGECMD_H
|
|
111 |
|
|
112 |
// End of File
|