|
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: CUniEditorSendUiOperation, operation for opening messages created by SendUI |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __UNIEDITORSENDUIOPERATION_H |
|
21 #define __UNIEDITORSENDUIOPERATION_H |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <e32std.h> |
|
27 |
|
28 #include "UniEditorDocument.h" |
|
29 #include "UniEditorOperation.h" |
|
30 #include "UniEditorProcessImageOperation.h" |
|
31 #include "UniEditorConvertVideoOperation.h" |
|
32 // CONSTANTS |
|
33 |
|
34 // MACROS |
|
35 |
|
36 // FORWARD DECLARATIONS |
|
37 |
|
38 class CMsgEditorView; |
|
39 class CUniEditorProcessTextOperation; |
|
40 |
|
41 // DATA TYPES |
|
42 |
|
43 // FUNCTION PROTOTYPES |
|
44 |
|
45 // CLASS DECLARATION |
|
46 |
|
47 /** |
|
48 * CUniEditorSendUiOperation, operation for opening messages created by SendUI |
|
49 * |
|
50 * @since 3.2 |
|
51 */ |
|
52 class CUniEditorSendUiOperation : public CUniEditorOperation |
|
53 { |
|
54 public: // New methods |
|
55 |
|
56 /** |
|
57 * Factory method that creates this object. |
|
58 * |
|
59 * @param aObserver |
|
60 * @return Pointer to instance in cleanup stack |
|
61 */ |
|
62 static CUniEditorSendUiOperation* NewL( |
|
63 MUniEditorOperationObserver& aObserver, |
|
64 CUniEditorDocument& aDocument, |
|
65 RFs& aFs ); |
|
66 |
|
67 /** |
|
68 * Destructor |
|
69 */ |
|
70 virtual ~CUniEditorSendUiOperation(); |
|
71 |
|
72 /** |
|
73 * Starts send ui operation |
|
74 */ |
|
75 void Start(); |
|
76 |
|
77 protected: |
|
78 |
|
79 /** |
|
80 * From CActive |
|
81 */ |
|
82 void RunL(); |
|
83 |
|
84 /** |
|
85 * From CUniEditorOperation |
|
86 */ |
|
87 void DoCancelCleanup(); |
|
88 |
|
89 /** |
|
90 * From CUniEditorOperation |
|
91 */ |
|
92 void HandleOperationEvent( TUniEditorOperationType aOperation, |
|
93 TUniEditorOperationEvent aEvent ); |
|
94 |
|
95 private: |
|
96 |
|
97 /** |
|
98 * C++ constructor. |
|
99 */ |
|
100 CUniEditorSendUiOperation( |
|
101 MUniEditorOperationObserver& aObserver, |
|
102 CUniEditorDocument& aDocument, |
|
103 RFs& aFs ); |
|
104 |
|
105 /** |
|
106 * 2nd phase constructor. |
|
107 */ |
|
108 void ConstructL(); |
|
109 |
|
110 /** |
|
111 * Performs single send ui step. |
|
112 */ |
|
113 void DoSendUiStepL(); |
|
114 |
|
115 /** |
|
116 * Performs send ui checks. |
|
117 */ |
|
118 void DoSendUiCheckL(); |
|
119 |
|
120 /** |
|
121 * Check files. |
|
122 */ |
|
123 void DoCheckFilesL(); |
|
124 |
|
125 /** |
|
126 * Prepares objects |
|
127 */ |
|
128 void DoSendUiPrepareObjectL(); |
|
129 |
|
130 /** |
|
131 * Prepased single object. |
|
132 */ |
|
133 void DoPrepareObjectL( CUniObject* aObject ); |
|
134 |
|
135 /** |
|
136 * Verifies prepared objects. |
|
137 */ |
|
138 void VerifyPreparedObjectL(); |
|
139 |
|
140 /** |
|
141 * Prepares attachments. |
|
142 */ |
|
143 void DoSendUiPrepareAttachmentsL(); |
|
144 |
|
145 protected: // data |
|
146 |
|
147 // assigned to iOperationState in base class |
|
148 enum TUniEditorSendUiState |
|
149 { |
|
150 EUniEditorSendUiCheck, |
|
151 EUniEditorSendUiPrepareObject, |
|
152 EUniEditorSendUiPrepareAttachments, |
|
153 EUniEditorSendUiEnd |
|
154 }; |
|
155 |
|
156 TUint32 iDeleteAllLimit; |
|
157 |
|
158 CUniEditorProcessImageOperation* iImageOperation; |
|
159 CUniEditorConvertVideoOperation* iVideoOperation; |
|
160 |
|
161 TInt iObjectsSize; |
|
162 TInt iPreviousSize; |
|
163 TInt iObjectNum; |
|
164 TInt iSlideNum; |
|
165 CUniObject* iPreparedObject; |
|
166 TBool iDeleteAll; |
|
167 CUniEditorProcessTextOperation* iTextOperation; |
|
168 |
|
169 }; |
|
170 |
|
171 #endif // __UNIEDITORSENDUIOPERATION_H |