|
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: Deletes messages first locally and then from server |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef IPSPLGDELETEREMOTE_H |
|
19 #define IPSPLGDELETEREMOTE_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32def.h> |
|
23 #include <e32des8.h> // TDesC8 |
|
24 |
|
25 class CMsvOperation; |
|
26 class CMsvEntry; |
|
27 class CMsvEntrySelection; |
|
28 class CMsvSession; |
|
29 class TRequestStatus; |
|
30 |
|
31 /** |
|
32 * class CIpsPlgDeleteRemote |
|
33 * Encapsulates delete locally operation and delete from server operation. |
|
34 * First deletes message locally and after it has been completed, deletes from the server |
|
35 */ |
|
36 class CIpsPlgDeleteRemote : |
|
37 public CMsvOperation |
|
38 { |
|
39 public: |
|
40 /** |
|
41 * Constructor. |
|
42 */ |
|
43 static CIpsPlgDeleteRemote* NewL( |
|
44 CMsvSession& aMsvSession, |
|
45 TRequestStatus& aObserverRequestStatus, |
|
46 CMsvEntrySelection& aDeletedEntries ); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 virtual ~CIpsPlgDeleteRemote(); |
|
52 |
|
53 /** |
|
54 * |
|
55 */ |
|
56 virtual const TDesC8& ProgressL(); |
|
57 |
|
58 |
|
59 private: |
|
60 |
|
61 enum IpsPlgDeleteMessagesState |
|
62 { |
|
63 EDeletingMessagesStateLocally = 0, |
|
64 EDeletingMessagesStateFromServer |
|
65 }; |
|
66 |
|
67 /** |
|
68 * Constructor. |
|
69 */ |
|
70 CIpsPlgDeleteRemote( |
|
71 CMsvSession& aMsvSession, |
|
72 TRequestStatus& aObserverRequestStatus ); |
|
73 |
|
74 /** |
|
75 * Constructor. |
|
76 */ |
|
77 void ConstructL( CMsvEntrySelection& aDeletedEntries ); |
|
78 |
|
79 /** |
|
80 * From CActive |
|
81 */ |
|
82 void DoCancel(); |
|
83 |
|
84 /** |
|
85 * From CActive |
|
86 */ |
|
87 void RunL(); |
|
88 |
|
89 /** |
|
90 * Starts new local delete progress |
|
91 */ |
|
92 void StartNextDeleteLocally(); |
|
93 |
|
94 /** |
|
95 * Creates object of CImumDeleteMessagesLocally |
|
96 */ |
|
97 void MakeNextDeleteLocallyL(); |
|
98 |
|
99 /** |
|
100 * Starts entry delete after local delete is completed. |
|
101 */ |
|
102 void StartDeleteFromServer(); |
|
103 |
|
104 /** |
|
105 * Creates delete operation |
|
106 */ |
|
107 void MakeDeleteFromServerL(); |
|
108 |
|
109 private: |
|
110 CMsvOperation* iOperation; |
|
111 CMsvEntry* iEntry; |
|
112 CMsvEntrySelection* iEntrySelection; |
|
113 TInt iEntryCount; |
|
114 TBuf8<1> iBlank; |
|
115 IpsPlgDeleteMessagesState iState; |
|
116 |
|
117 }; |
|
118 |
|
119 #endif // IPSPLGDELETEREMOTE_H |
|
120 |
|
121 // End of File |