|
1 /* |
|
2 * Copyright (c) 2006,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: CUniEditorChangeSlideOperation, asynchronous operation for changing slide |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __UNIEDITORCHANGESLIDEOPERATION_H |
|
21 #define __UNIEDITORCHANGESLIDEOPERATION_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <unislideloader.h> |
|
25 |
|
26 #include "UniEditorOperation.h" |
|
27 #include "UniEditorDocument.h" |
|
28 #include "UniEditorSaveOperation.h" |
|
29 |
|
30 // CONSTANTS |
|
31 |
|
32 // MACROS |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 |
|
36 class CUniEditorHeader; |
|
37 class CUniSlideLoader; |
|
38 class CMsgEditorView; |
|
39 |
|
40 // DATA TYPES |
|
41 |
|
42 // FUNCTION PROTOTYPES |
|
43 |
|
44 // CLASS DECLARATION |
|
45 |
|
46 /** |
|
47 * CUniEditorChangeSlideOperation, Storage for single attachment in presentation. |
|
48 * |
|
49 * @since 3.2 |
|
50 */ |
|
51 class CUniEditorChangeSlideOperation : public CUniEditorOperation, |
|
52 public MUniSlideLoaderObserver |
|
53 { |
|
54 public: // New methods |
|
55 |
|
56 /** |
|
57 * Factory method that creates this object. |
|
58 * |
|
59 * @since 3.2 |
|
60 * @param aObserver |
|
61 * @return Pointer to instance in cleanup stack |
|
62 */ |
|
63 static CUniEditorChangeSlideOperation* NewL( MUniEditorOperationObserver& aOperationObserver, |
|
64 CUniEditorDocument& aDocument, |
|
65 CUniEditorHeader& aHeader, |
|
66 CUniSlideLoader& aSlideLoader, |
|
67 CMsgEditorView& aView, |
|
68 RFs& aFs ); |
|
69 |
|
70 /** |
|
71 * Destructor |
|
72 */ |
|
73 virtual ~CUniEditorChangeSlideOperation(); |
|
74 |
|
75 /** |
|
76 * Start slide changing |
|
77 */ |
|
78 void ChangeSlide( TInt aNextNum ); |
|
79 |
|
80 private: |
|
81 |
|
82 /** |
|
83 * From MUniSlideLoaderObserver |
|
84 */ |
|
85 void SlideLoadReady( TInt aError ); |
|
86 |
|
87 /** |
|
88 * From CActive |
|
89 */ |
|
90 void RunL(); |
|
91 |
|
92 /** |
|
93 * From CUniEditorOperation |
|
94 */ |
|
95 void DoCancelCleanup(); |
|
96 |
|
97 /** |
|
98 * From CUniEditorOperation |
|
99 */ |
|
100 void HandleOperationEvent( TUniEditorOperationType aOperation, |
|
101 TUniEditorOperationEvent aEvent ); |
|
102 |
|
103 /** |
|
104 * Performs change slide step |
|
105 */ |
|
106 void DoChangeSlideStepL(); |
|
107 |
|
108 /** |
|
109 * Performs save step |
|
110 */ |
|
111 void DoSaveL(); |
|
112 |
|
113 /** |
|
114 * Performs load step |
|
115 */ |
|
116 void DoLoadL(); |
|
117 |
|
118 /** |
|
119 * Performs finalization step |
|
120 */ |
|
121 void DoFinalizeL(); |
|
122 |
|
123 protected: |
|
124 |
|
125 /** |
|
126 * Constructor. |
|
127 */ |
|
128 CUniEditorChangeSlideOperation( MUniEditorOperationObserver& aOperationObserver, |
|
129 CUniEditorDocument& aDocument, |
|
130 CUniEditorHeader& aHeader, |
|
131 CUniSlideLoader& aSlideLoader, |
|
132 CMsgEditorView& aView, |
|
133 RFs& aFs ); |
|
134 |
|
135 /** |
|
136 * 2nd phase constructor. |
|
137 */ |
|
138 void ConstructL(); |
|
139 |
|
140 protected: // data |
|
141 |
|
142 enum TUniEditorChangeSlideState |
|
143 { |
|
144 EUniEditorChangeSlideSave, |
|
145 EUniEditorChangeSlideLoad, |
|
146 EUniEditorChangeSlideFinalize, |
|
147 EUniEditorChangeSlideEnd |
|
148 }; |
|
149 |
|
150 CUniEditorHeader& iHeader; |
|
151 CUniSlideLoader& iSlideLoader; |
|
152 CMsgEditorView& iView; |
|
153 |
|
154 TInt iNextNum; |
|
155 |
|
156 CUniEditorSaveOperation* iSaveOperation; |
|
157 }; |
|
158 |
|
159 #endif // __UNIEDITORCHANGESLIDEOPERATION_H |