|
1 /* |
|
2 * Copyright (c) 2007-2008 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: Remove child part operation |
|
15 * |
|
16 */ |
|
17 |
|
18 // <qmail> |
|
19 #ifndef IPSPLGREMOVECHILDPARTOPERATION_H |
|
20 #define IPSPLGREMOVECHILDPARTOPERATION_H |
|
21 |
|
22 class MFSMailRequestObserver; |
|
23 |
|
24 NONSHARABLE_CLASS ( CIpsPlgRemoveChildPartOperation ): public CIpsPlgBaseOperation |
|
25 { |
|
26 public: |
|
27 /** |
|
28 * Constructor. |
|
29 */ |
|
30 static CIpsPlgRemoveChildPartOperation* NewL( |
|
31 CMsvSession& aMsvSession, |
|
32 TRequestStatus& aObserverRequestStatus, |
|
33 const TFSMailMsgId& aMessageId, |
|
34 const TFSMailMsgId& aPartId, |
|
35 MFSMailRequestObserver& aOperationObserver, |
|
36 const TInt aRequestId); |
|
37 |
|
38 /** |
|
39 * Destructor. |
|
40 */ |
|
41 virtual ~CIpsPlgRemoveChildPartOperation(); |
|
42 |
|
43 public: // From CIpsPlgBaseOperation |
|
44 |
|
45 virtual const TDesC8& ProgressL(); |
|
46 |
|
47 virtual const TDesC8& GetErrorProgressL(TInt aError); |
|
48 |
|
49 virtual TFSProgress GetFSProgressL() const; |
|
50 |
|
51 TIpsOpType IpsOpType() const; |
|
52 |
|
53 protected: |
|
54 /** |
|
55 * Constructor. |
|
56 */ |
|
57 CIpsPlgRemoveChildPartOperation( |
|
58 CMsvSession& aMsvSession, |
|
59 TRequestStatus& aObserverRequestStatus, |
|
60 const TFSMailMsgId& aMessageId, |
|
61 const TFSMailMsgId& aPartId, |
|
62 MFSMailRequestObserver& aOperationObserver, |
|
63 const TInt aRequestId); |
|
64 |
|
65 /** |
|
66 * Constructor. |
|
67 */ |
|
68 void ConstructL(); |
|
69 |
|
70 /** |
|
71 * From CActive |
|
72 */ |
|
73 void RunL(); |
|
74 |
|
75 /** |
|
76 * From CActive |
|
77 */ |
|
78 void DoCancel(); |
|
79 |
|
80 /** |
|
81 * From CActive |
|
82 */ |
|
83 TInt RunError(TInt aError); |
|
84 |
|
85 void SignalFSObserver(TInt aStatus, CFSMailMessagePart* aMessagePart ); |
|
86 |
|
87 private: |
|
88 void GetMessageEntryL( TMsvId aId, |
|
89 CMsvEntry*& aMessageEntry, |
|
90 CImEmailMessage*& aImEmailMessage ); |
|
91 |
|
92 void CleanCachedMessageEntries(); |
|
93 |
|
94 void StartOperationL(); |
|
95 |
|
96 protected: |
|
97 TFSMailMsgId iMessageId; |
|
98 TFSMailMsgId iPartId; |
|
99 MFSMailRequestObserver& iOperationObserver; // not owned |
|
100 CImEmailMessage* iMessage; |
|
101 CMsvEntry* iCachedEntry; |
|
102 CImEmailMessage* iCachedEmailMessage; |
|
103 TFSProgress iFSProgress; |
|
104 }; |
|
105 |
|
106 #endif // IPSPLGREMOVECHILDPARTOPERATION_H |
|
107 |
|
108 // </qmail> |
|
109 |