33 * |
33 * |
34 * Is created by IpsSosAOBaseAgent, contains pop spesific |
34 * Is created by IpsSosAOBaseAgent, contains pop spesific |
35 * implementations of base class pure virtual functions. |
35 * implementations of base class pure virtual functions. |
36 * |
36 * |
37 */ |
37 */ |
38 class CIpsSosAOPopAgent : public CIpsSosAOBaseAgent |
38 //<Qmail> |
|
39 NONSHARABLE_CLASS (CIpsSosAOPopAgent) : public CIpsSosAOBaseAgent |
|
40 //</Qmail> |
39 { |
41 { |
40 public: |
42 public: |
41 |
43 |
42 /** |
44 /** |
43 * Two phased constructor |
45 * Two phased constructor |
52 * Destructor |
54 * Destructor |
53 */ |
55 */ |
54 virtual ~CIpsSosAOPopAgent(); |
56 virtual ~CIpsSosAOPopAgent(); |
55 |
57 |
56 public: // from CIpsSosAOBaseAgent |
58 public: // from CIpsSosAOBaseAgent |
57 |
59 //<Qmail> |
|
60 /** |
|
61 * GetServerAddress |
|
62 * @param a return parameter |
|
63 */ |
58 virtual void GetServerAddress( |
64 virtual void GetServerAddress( |
59 TBuf<KIpsSosAOTextBufferSize>& aIncomingServer ) const; |
65 TBuf<KIpsSosAOTextBufferSize>& aIncomingServer ) const; |
60 |
66 |
|
67 /** |
|
68 * GetUsername |
|
69 * @param a return parameter |
|
70 */ |
61 virtual void GetUsername( |
71 virtual void GetUsername( |
62 TBuf8<KIpsSosAOTextBufferSize>& aUsername ) const; |
72 TBuf8<KIpsSosAOTextBufferSize>& aUsername ) const; |
63 |
73 |
|
74 /** |
|
75 * checks is does mailbox have connection open |
|
76 * @return is connected or not |
|
77 */ |
64 virtual TBool IsConnected() const; |
78 virtual TBool IsConnected() const; |
65 |
79 |
|
80 /** |
|
81 * Starts email sync |
|
82 */ |
66 virtual void StartSyncL(); |
83 virtual void StartSyncL(); |
67 |
84 |
|
85 /** |
|
86 * starts fetching messages |
|
87 */ |
68 virtual void StartFetchMessagesL( const RArray<TMsvId>& aFetchMsgArray ); |
88 virtual void StartFetchMessagesL( const RArray<TMsvId>& aFetchMsgArray ); |
69 |
89 |
|
90 /** |
|
91 * cancels all ongoing suboperations and disconnects |
|
92 */ |
70 virtual void CancelAllAndDisconnectL(); |
93 virtual void CancelAllAndDisconnectL(); |
71 |
94 |
|
95 /** |
|
96 * cancels all suboperations |
|
97 */ |
72 virtual void CancelAllAndDoNotDisconnect(); |
98 virtual void CancelAllAndDoNotDisconnect(); |
73 |
99 |
|
100 /** |
|
101 * sets iDoNotDisconnect as ETrue |
|
102 */ |
74 virtual void DoNotDisconnect(); |
103 virtual void DoNotDisconnect(); |
75 |
104 |
|
105 /** |
|
106 * sets iDoNotDisconnect as EFalse |
|
107 */ |
76 virtual void ClearDoNotDisconnect(); |
108 virtual void ClearDoNotDisconnect(); |
77 |
109 |
|
110 /** |
|
111 * pauses ongoing operations |
|
112 */ |
78 virtual void HoldOperations(); |
113 virtual void HoldOperations(); |
79 |
114 |
|
115 /** |
|
116 * resumes paused operations |
|
117 */ |
80 virtual void ContinueHoldOperations(); |
118 virtual void ContinueHoldOperations(); |
81 |
119 |
|
120 /** |
|
121 * @return current iState |
|
122 */ |
82 virtual CIpsSosAOBaseAgent::TAgentState GetState() const; |
123 virtual CIpsSosAOBaseAgent::TAgentState GetState() const; |
83 |
124 |
|
125 /** |
|
126 * Loads CImPop3Settings object |
|
127 */ |
84 virtual void LoadSettingsL(); |
128 virtual void LoadSettingsL(); |
85 |
129 //</Qmail> |
86 private: |
130 private: |
87 |
131 |
88 /** |
132 /** |
89 * Constructor |
133 * Constructor |
90 */ |
134 */ |
95 |
139 |
96 /** |
140 /** |
97 * Second phase constructor |
141 * Second phase constructor |
98 */ |
142 */ |
99 void ConstructL(); |
143 void ConstructL(); |
100 |
144 //<Qmail> |
|
145 /** |
|
146 * called when cancelled |
|
147 */ |
101 virtual void DoCancel(); |
148 virtual void DoCancel(); |
102 |
149 |
|
150 /** |
|
151 * from CActive |
|
152 */ |
103 virtual void RunL(); |
153 virtual void RunL(); |
104 |
154 |
|
155 /** |
|
156 * from CActive |
|
157 */ |
105 virtual TInt RunError( TInt aError ); |
158 virtual TInt RunError( TInt aError ); |
106 |
159 |
|
160 /** |
|
161 * fetches the content of all synced messages |
|
162 */ |
107 void PopulateAllL(); |
163 void PopulateAllL(); |
108 |
164 |
|
165 /** |
|
166 * triggers async statemachine |
|
167 */ |
109 inline void SetActiveAndCompleteThis(); |
168 inline void SetActiveAndCompleteThis(); |
110 |
169 //</Qmail> |
111 |
170 |
112 private: |
171 private: |
113 |
172 |
114 CMsvSession& iSession; |
173 CMsvSession& iSession; |
115 MIpsSosAOAgentOperationResponse& iOpResponse; |
174 MIpsSosAOAgentOperationResponse& iOpResponse; |
116 TMsvId iServiceId; |
175 TMsvId iServiceId; |
117 TBool iSyncStartedSignaled; |
176 TBool iSyncStartedSignaled; |
118 TAgentState iState; |
177 TAgentState iState; |
119 TBool iDoNotDisconnect; |
178 TBool iDoNotDisconnect; |
120 CImPop3Settings* iPopSettings; |
179 //<Qmail> |
121 CMsvOperation* iOngoingOp; |
180 CImPop3Settings* iPopSettings;//owned |
|
181 CMsvOperation* iOngoingOp;//owned |
122 |
182 |
123 TPckgBuf<TPop3Progress> iProgressBuf; |
183 TPckgBuf<TPop3Progress> iProgressBuf; |
124 CMsvEntrySelection* iSelection; |
184 CMsvEntrySelection* iSelection;//owned |
125 TInt iError; |
185 TInt iError; |
126 CPop3ClientMtm* iPopClientMtm; |
186 CPop3ClientMtm* iPopClientMtm;//owned |
127 CClientMtmRegistry* iMtmReg; |
187 CClientMtmRegistry* iMtmReg;//owned |
|
188 //</Qmail> |
128 TInt iPopulateLimit; |
189 TInt iPopulateLimit; |
129 |
190 |
130 }; |
191 }; |
131 |
192 |
132 |
193 |
133 #endif /*IPSSOSAOPOPAGENT_H_*/ |
194 #endif /*IPSSOSAOPOPAGENT_H*/ |