--- a/ipsservices/ipssosaoplugin/inc/IpsSosAOImapAgent.h Mon May 03 12:23:15 2010 +0300
+++ b/ipsservices/ipssosaoplugin/inc/IpsSosAOImapAgent.h Fri May 14 15:41:10 2010 +0300
@@ -23,9 +23,7 @@
#include <imapconnectionobserver.h>
#include <imapset.h>
#include <mtclreg.h>
-//<cmail>
#include "MFSMailRequestObserver.h"
-//</cmail>
#include "IpsSosAOBaseAgent.h"
@@ -40,7 +38,9 @@
* virtual functions.
*
*/
+//<Qmail>
NONSHARABLE_CLASS (CIpsSosAOImapAgent) : public CIpsSosAOBaseAgent,
+//</Qmail>
public MMsvImapConnectionObserver,
public MFSMailRequestObserver
{
@@ -61,35 +61,77 @@
virtual ~CIpsSosAOImapAgent();
public: // from CIpsSosAOBaseAgent
-
+ //<Qmail>
+ /**
+ * GetServerAddress
+ * @param a return parameter
+ */
virtual void GetServerAddress(
TBuf<KIpsSosAOTextBufferSize>& aIncomingServer ) const;
+ /**
+ * GetUsername
+ * @param a return parameter
+ */
virtual void GetUsername(
TBuf8<KIpsSosAOTextBufferSize>& aUsername ) const;
+ /**
+ * checks is does mailbox have connection open
+ * @return is connected or not
+ */
virtual TBool IsConnected() const;
+ /**
+ * Starts email sync
+ */
virtual void StartSyncL();
+ /**
+ * starts fetching messages
+ */
virtual void StartFetchMessagesL( const RArray<TMsvId>& aFetchMsgArray );
+ /**
+ * cancels all ongoing suboperations and disconnects
+ */
virtual void CancelAllAndDisconnectL();
+ /**
+ * cancels all suboperations
+ */
virtual void CancelAllAndDoNotDisconnect();
+ /**
+ * sets iDoNotDisconnect as ETrue
+ */
virtual void DoNotDisconnect();
+ /**
+ * sets iDoNotDisconnect as EFalse
+ */
virtual void ClearDoNotDisconnect();
+ /**
+ * pauses ongoing operations
+ */
virtual void HoldOperations();
+ /**
+ * resumes paused operations
+ */
virtual void ContinueHoldOperations();
+ /**
+ * @return current iState
+ */
virtual CIpsSosAOBaseAgent::TAgentState GetState() const;
+ /**
+ * Loads CImImap4Settings object
+ */
virtual void LoadSettingsL();
-
+ //</Qmail>
public: // MMsvImapConnectionObserver
/**
@@ -119,17 +161,32 @@
* Second phase constructor
*/
void ConstructL();
-
+ //<Qmail>
+ /**
+ * called when cancelled
+ */
virtual void DoCancel();
+ /**
+ * from CActive
+ */
virtual void RunL();
+ /**
+ * from CActive
+ */
virtual TInt RunError( TInt aError );
+ /**
+ * fetches the content of all synced messages
+ */
void PopulateAllL();
+ /**
+ * triggers async statemachine
+ */
inline void SetActiveAndCompleteThis();
-
+ //</Qmail>
private:
CMsvSession& iSession;
@@ -137,14 +194,16 @@
TMsvId iServiceId;
TAgentState iState;
TBool iDoNotDisconnect;
- CImImap4Settings* iImapSettings;
- CMsvOperation* iOngoingOp;
+ //<Qmail>
+ CImImap4Settings* iImapSettings;//owned
+ CMsvOperation* iOngoingOp;//owned
TPckgBuf<TImap4CompoundProgress> iProgressBuf;
TInt iError;
- CImap4ClientMtm* iImapClientMtm;
- CClientMtmRegistry* iMtmReg;
- RArray<TMsvId> iFoldersArray;
+ CImap4ClientMtm* iImapClientMtm;//owned
+ CClientMtmRegistry* iMtmReg;//owned
+ RArray<TMsvId> iFoldersArray;//owned
+ //<Qmail>
//<QMail>
//</QMail>