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