|
1 /* |
|
2 * Copyright (c) 2006 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 * Used to reset a service's pre-created messages when the service changes |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef __SMTPRESETPRECREATIONOP_H__ |
|
20 #define __SMTPRESETPRECREATIONOP_H__ |
|
21 |
|
22 #include "SmtpPreCreationOpBase.h" |
|
23 |
|
24 // |
|
25 class CMsvEmailConnectionProgressProvider; |
|
26 class CMtmStore; |
|
27 |
|
28 |
|
29 /** |
|
30 * CSmtpResetPreCreationOp |
|
31 * |
|
32 * Used to reset a service's pre-created messages when the service changes. |
|
33 */ |
|
34 class CSmtpResetPreCreationOp : public CSmtpPreCreationOpBase |
|
35 { |
|
36 public: |
|
37 /** |
|
38 * |
|
39 */ |
|
40 static CSmtpResetPreCreationOp* NewL( |
|
41 CMsvSession& aMsvSession, |
|
42 TRequestStatus& aObserverRequestStatus, |
|
43 TMsvId aServiceId ); |
|
44 |
|
45 ~CSmtpResetPreCreationOp(); |
|
46 |
|
47 protected: |
|
48 /** |
|
49 * From CActive |
|
50 */ |
|
51 virtual void RunL(); |
|
52 |
|
53 /** |
|
54 * From CActive |
|
55 */ |
|
56 void DoRunL(); |
|
57 |
|
58 /** |
|
59 * From CActive |
|
60 */ |
|
61 virtual TInt RunError(TInt aError); |
|
62 |
|
63 private: |
|
64 /** |
|
65 * |
|
66 */ |
|
67 CSmtpResetPreCreationOp( |
|
68 CMsvSession& aMsvSession, |
|
69 TRequestStatus& aObserverRequestStatus, |
|
70 TMsvId aServiceId ); |
|
71 |
|
72 /** |
|
73 * |
|
74 */ |
|
75 void ConstructL(); |
|
76 |
|
77 /** |
|
78 * |
|
79 */ |
|
80 void DeleteMessageL(); |
|
81 |
|
82 /** |
|
83 * |
|
84 */ |
|
85 void CreateMessageL(); |
|
86 |
|
87 private: // Data |
|
88 enum TState { EStateIdle, EStateDelete, EStateCreate }; |
|
89 TState iState; |
|
90 }; |
|
91 |
|
92 |
|
93 |
|
94 #endif |