--- a/ipsservices/ipssosplugin/inc/ipsplgpop3connectop.h Thu Aug 19 09:38:05 2010 +0300
+++ b/ipsservices/ipssosplugin/inc/ipsplgpop3connectop.h Tue Aug 31 15:04:17 2010 +0300
@@ -26,18 +26,31 @@
* Connect operation.
* Encapsulates connection validation.
*/
-class CIpsPlgPop3ConnectOp :
- public CIpsPlgOnlineOperation,
- public MIpsPlgConnectOpCallback
+NONSHARABLE_CLASS ( CIpsPlgPop3ConnectOp ) :
+ public CIpsPlgOnlineOperation
+ // public MIpsPlgConnectOpCallback <qmail> not used any more
{
-public://from MIpsPlgConnectOpCallback
-
- void CredientialsSetL( TInt aEvent );
- public:
+ // <qmail> MIpsPlgConnectOpCallback not used any more
+public:
- /**
- *
- */
+ /**
+ * NewL
+ * @param aMsvSession client/server session to MsvServer
+ * @param aObserverRequestStatus client status
+ * @param aService serviceId of the mailbox
+ * @param aForcePopulate whether to populate fetched messages
+ * @param aActivityTimer mailbox specific activity timer
+ * @param aFSMailBoxId specifies mailbox
+ * @param aFSOperationObserver observer callback pointer
+ * @param aFSRequestId client assigned identifier for the request instance
+ * @param aEventHandler event handler for sending sync events
+ * @param aSignallingAllowed for asynchronous request response message
+ * @param aFetchWillFollow used when connection must be kept open
+ * @return new instance of the class
+ */
+ // <qmail> MFSMailRequestObserver& changed to pointer
+ // <qmail> aSignallingAllowed parameter added
+ // <qmail> aFetchWillFollow parameter added
static CIpsPlgPop3ConnectOp* NewL(
CMsvSession& aMsvSession,
TRequestStatus& aObserverRequestStatus,
@@ -45,10 +58,11 @@
TBool aForcePopulate,
CIpsPlgTimerOperation& aActivityTimer,
TFSMailMsgId aFSMailBoxId,
- MFSMailRequestObserver& aFSOperationObserver,
+ MFSMailRequestObserver* aFSOperationObserver,
TInt aFSRequestId,
- CIpsPlgEventHandler* aEventHandler=NULL,
- TBool aSignallingAllowed=ETrue );
+ CIpsPlgEventHandler* aEventHandler,
+ TBool aSignallingAllowed=ETrue,
+ TBool aFetchWillFollow=EFalse );
/**
*
@@ -56,7 +70,8 @@
virtual ~CIpsPlgPop3ConnectOp();
/**
- *
+ * From CIpsPlgBaseOperation
+ * For reporting if DoRunL leaves
*/
const TDesC8& GetErrorProgressL(TInt aError);
@@ -65,24 +80,27 @@
*/
TFSProgress GetFSProgressL() const;
- /**
- *
- */
- TBool Connected() const;
+ /**
+ * From MsvOperation
+ * Gets information on the progress of the operation
+ * (see MsvOperation header)
+ */
+ // <qmail> moved to 'public:'as defined so in base class
+ const TDesC8& ProgressL();
+// <qmail> Connected() used from baseclass
+// <qmail> change ret val type
/**
- *
- */
- virtual TInt IpsOpType() const;
+ * Returns operation type
+ */
+ TIpsOpType IpsOpType() const;
+// </qmail>
+ TInt GetOperationErrorCodeL( );
+
protected:
/**
- *
- */
- const TDesC8& ProgressL();
-
- /**
*
*/
void DoCancel();
@@ -92,16 +110,14 @@
*/
void DoRunL();
- /**
- *
- */
- TInt GetOperationErrorCodeL( );
-
private:
/**
*
*/
+ // <qmail> MFSMailRequestObserver& changed to pointer
+ // <qmail> aSignallingAllowed parameter added
+ // <qmail> aFetchWillFollow parameter added
CIpsPlgPop3ConnectOp(
CMsvSession& aMsvSession,
TRequestStatus& aObserverRequestStatus,
@@ -109,75 +125,61 @@
TBool aForcePopulate,
CIpsPlgTimerOperation& aActivityTimer,
TFSMailMsgId aFSMailBoxId,
- MFSMailRequestObserver& aFSOperationObserver,
+ MFSMailRequestObserver* aFSOperationObserver,
TInt aFSRequestId,
CIpsPlgEventHandler* aEventHandler,
- TBool aSignallingAllowed );
+ TBool aSignallingAllowed,
+ TBool aFetchWillFollow );
/**
*
*/
void ConstructL();
- /**
- *
- */
- void DoConnectL();
-
+ // <qmail>
/**
- *
- *
- */
- void DoPopulateL();
- /**
- *
- */
- TBool ValidateL();
-
- /**
- * Send user password query request to CIpsPlgEventHandler
- * @return ETrue - if query send
+ * Do.. functions handle certain state of this operation
*/
- TBool QueryUserPassL();
+ void DoConnectL();
+ void DoPopulateL();
+ // <qmail> removed TBool ValidateL() (did nothing)
+ // <qmail> removed void DoQueryPasswordL() not used any more
+ // <qmail> DoDisconnect -> DoDisconnectL
+ void DoDisconnectL();
+ // </qmail>
-
- /**
- *
- */
- inline void SetFlag(TUint32 aFlag);
-
- /**
- *
- */
- inline void UnsetFlag(TUint32 aFlag);
-
- /**
- *
- */
- inline TBool FlagIsSet(TUint32 aFlag) const;
-
+ // <qmail> removed flag methods as they were not used or even defined anywhere
+
+ // <qmail> new function
+ /**
+ * Reads populate limit from account's settings and converts it to member variable
+ */
+ TInt GetPopulateLimitFromSettingsL();
private: // Data
- enum TPopConnectStates
+ enum TOperationState
{
EStartConnect,
EConnected,
EPopulate,
- EQueryingDetails,
- EQueryingDetailsBusy,
+ // <qmail> removed EQueryingDetails/EQueryingDetailsBusy state
+ // <qmail> new EDisconnecting state
+ EDisconnecting,
+ // <qmail> removed EErrInvalidDetails,
EIdle
};
- TInt iState;
- CMsvEntry* iEntry;
- TPckgBuf<TPop3Progress> iProgress;
- TInt iPopulateLimit;
- TBool iForcePopulate;
- CMsvEntrySelection* iSelection;
- // not owned
- CIpsPlgEventHandler* iEventHandler;
- // set to true if connection is already exists
- TBool iAlreadyConnected;
+ TOperationState iState;
+ // <qmail> removed iEntry;
+ TPckgBuf<TPop3Progress> iProgress;
+ // <qmail> removed iPopulateLimit;
+ TBool iForcePopulate;
+ // <qmail> removed iSelection;
+ CIpsPlgEventHandler* iEventHandler; // not owned
+ // <qmail> iAlreadyConnected removed
+ // <qmail>
+ TBool iFetchWillFollow;
+ // </qmail>
};
#endif