|
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 CPBK2VIEWIMAGECMD_H |
|
21 #define CPBK2VIEWIMAGECMD_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "CPbk2ImageCmdBase.h" |
|
25 #include <MPbk2ImageOperationObservers.h> // MPbk2ImageSetObserver |
|
26 #include <AknServerApp.h> // MAknServerAppExitObserver |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CDocumentHandler; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * View image command event handling class. |
|
35 */ |
|
36 NONSHARABLE_CLASS(CPbk2ViewImageCmd) : |
|
37 public CPbk2ImageCmdBase, |
|
38 private MAknServerAppExitObserver |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 /** |
|
42 * Creates a new instance of this class. |
|
43 * @param aUiControl A related ui control |
|
44 * @return a new instance of this class. |
|
45 */ |
|
46 static CPbk2ViewImageCmd* NewL( |
|
47 MPbk2ContactUiControl& aUiControl); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 ~CPbk2ViewImageCmd(); |
|
53 |
|
54 private: // from CPbk2ImageCmdBase |
|
55 TBool ExecuteCommandL(); |
|
56 |
|
57 private: // from MAknServerAppExitObserver |
|
58 void HandleServerAppExit( |
|
59 TInt aReason ); |
|
60 |
|
61 private: // Implementation |
|
62 CPbk2ViewImageCmd( |
|
63 MPbk2ContactUiControl& aUiControl); |
|
64 void ConstructL(); |
|
65 void ShowImageNotOpenedNoteL(); |
|
66 |
|
67 private: // Data |
|
68 /// Own: Document handler for image opening |
|
69 CDocumentHandler* iDocHandler; |
|
70 /// Own: Image file name buffer |
|
71 TFileName iFileName; |
|
72 }; |
|
73 |
|
74 #endif // CPBK2VIEWIMAGECMD_H |
|
75 |
|
76 // End of File |