|
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: ImapFolderSyncOperation.h |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __IMAPFOLDERSYNCOPERATION_H__ |
|
21 #define __IMAPFOLDERSYNCOPERATION_H__ |
|
22 |
|
23 //INCLUDES |
|
24 #include <msvapi.h> |
|
25 #include <ImumInternalApi.h> // CImumInternalApi |
|
26 |
|
27 class CBaseMtmUi; |
|
28 |
|
29 class CImapFolderSyncOperation : public CMsvOperation |
|
30 { |
|
31 public: |
|
32 /** |
|
33 * Symbian OS constructor. |
|
34 */ |
|
35 static CImapFolderSyncOperation* NewL( CImumInternalApi& aMailboxApi, TRequestStatus& aStatus, TMsvId aMailbox, CBaseMtmUi& aMtmUi ); |
|
36 |
|
37 |
|
38 /** |
|
39 * destructor |
|
40 */ |
|
41 virtual ~CImapFolderSyncOperation(); |
|
42 |
|
43 private: |
|
44 /** |
|
45 * c++ constructor |
|
46 */ |
|
47 CImapFolderSyncOperation( |
|
48 CImumInternalApi& aMailboxApi, |
|
49 TInt aPriority, |
|
50 TRequestStatus& aObserverRequestStatus, |
|
51 CBaseMtmUi& aMtmUi ); |
|
52 |
|
53 /** |
|
54 * Symbian OS constructor. |
|
55 */ |
|
56 void ConstructL( TMsvId aMailbox ); |
|
57 |
|
58 /** |
|
59 * HasSubscribedFoldersL() |
|
60 * @return ETrue if has subbed folders |
|
61 */ |
|
62 TBool HasSubscribedFoldersL(); |
|
63 |
|
64 public: |
|
65 |
|
66 /** |
|
67 * |
|
68 */ |
|
69 virtual const TDesC8& ProgressL(); |
|
70 |
|
71 /** |
|
72 * |
|
73 */ |
|
74 void SetInterval(); |
|
75 |
|
76 |
|
77 protected: |
|
78 |
|
79 /** |
|
80 * From CActive |
|
81 */ |
|
82 virtual void DoCancel(); |
|
83 |
|
84 /** |
|
85 * From CActive |
|
86 */ |
|
87 virtual void RunL(); |
|
88 |
|
89 |
|
90 private: |
|
91 |
|
92 /** |
|
93 * Counts subscribed folder |
|
94 * NOTE: This is recursive |
|
95 */ |
|
96 void CountSubscribedFoldersL( |
|
97 TMsvId aFolderId, TInt& aCount ); |
|
98 |
|
99 |
|
100 protected: // Data |
|
101 RTimer iTimer; |
|
102 TBuf8<1> iProgress; |
|
103 TTimeIntervalMinutes iInterval; |
|
104 TMsvId iMailboxId; |
|
105 CBaseMtmUi& iMtmUi; |
|
106 CImumInternalApi& iMailboxApi; |
|
107 |
|
108 CMsvOperation* iOperation; |
|
109 }; |
|
110 |
|
111 |
|
112 #endif |
|
113 // End of File |