--- a/ipsservices/ipssosplugin/inc/ipsplgpop3connectop.h Tue Aug 31 15:04:17 2010 +0300
+++ b/ipsservices/ipssosplugin/inc/ipsplgpop3connectop.h Wed Sep 01 12:28:57 2010 +0100
@@ -26,31 +26,18 @@
* Connect operation.
* Encapsulates connection validation.
*/
-NONSHARABLE_CLASS ( CIpsPlgPop3ConnectOp ) :
- public CIpsPlgOnlineOperation
- // public MIpsPlgConnectOpCallback <qmail> not used any more
+class CIpsPlgPop3ConnectOp :
+ public CIpsPlgOnlineOperation,
+ public MIpsPlgConnectOpCallback
{
- // <qmail> MIpsPlgConnectOpCallback not used any more
-public:
+public://from MIpsPlgConnectOpCallback
+
+ void CredientialsSetL( TInt aEvent );
+ 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,
@@ -58,11 +45,10 @@
TBool aForcePopulate,
CIpsPlgTimerOperation& aActivityTimer,
TFSMailMsgId aFSMailBoxId,
- MFSMailRequestObserver* aFSOperationObserver,
+ MFSMailRequestObserver& aFSOperationObserver,
TInt aFSRequestId,
- CIpsPlgEventHandler* aEventHandler,
- TBool aSignallingAllowed=ETrue,
- TBool aFetchWillFollow=EFalse );
+ CIpsPlgEventHandler* aEventHandler=NULL,
+ TBool aSignallingAllowed=ETrue );
/**
*
@@ -70,8 +56,7 @@
virtual ~CIpsPlgPop3ConnectOp();
/**
- * From CIpsPlgBaseOperation
- * For reporting if DoRunL leaves
+ *
*/
const TDesC8& GetErrorProgressL(TInt aError);
@@ -80,27 +65,24 @@
*/
TFSProgress GetFSProgressL() 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
+ /**
+ *
+ */
+ TBool Connected() const;
-// <qmail> change ret val type
/**
- * Returns operation type
- */
- TIpsOpType IpsOpType() const;
-// </qmail>
+ *
+ */
+ virtual TInt IpsOpType() const;
- TInt GetOperationErrorCodeL( );
-
protected:
/**
+ *
+ */
+ const TDesC8& ProgressL();
+
+ /**
*
*/
void DoCancel();
@@ -110,14 +92,16 @@
*/
void DoRunL();
+ /**
+ *
+ */
+ TInt GetOperationErrorCodeL( );
+
private:
/**
*
*/
- // <qmail> MFSMailRequestObserver& changed to pointer
- // <qmail> aSignallingAllowed parameter added
- // <qmail> aFetchWillFollow parameter added
CIpsPlgPop3ConnectOp(
CMsvSession& aMsvSession,
TRequestStatus& aObserverRequestStatus,
@@ -125,61 +109,75 @@
TBool aForcePopulate,
CIpsPlgTimerOperation& aActivityTimer,
TFSMailMsgId aFSMailBoxId,
- MFSMailRequestObserver* aFSOperationObserver,
+ MFSMailRequestObserver& aFSOperationObserver,
TInt aFSRequestId,
CIpsPlgEventHandler* aEventHandler,
- TBool aSignallingAllowed,
- TBool aFetchWillFollow );
+ TBool aSignallingAllowed );
/**
*
*/
void ConstructL();
- // <qmail>
/**
- * Do.. functions handle certain state of this operation
- */
+ *
+ */
void DoConnectL();
+
+ /**
+ *
+ *
+ */
void DoPopulateL();
- // <qmail> removed TBool ValidateL() (did nothing)
- // <qmail> removed void DoQueryPasswordL() not used any more
- // <qmail> DoDisconnect -> DoDisconnectL
- void DoDisconnectL();
- // </qmail>
+ /**
+ *
+ */
+ TBool ValidateL();
+
+ /**
+ * Send user password query request to CIpsPlgEventHandler
+ * @return ETrue - if query send
+ */
+ TBool QueryUserPassL();
- // <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();
+
+ /**
+ *
+ */
+ inline void SetFlag(TUint32 aFlag);
+
+ /**
+ *
+ */
+ inline void UnsetFlag(TUint32 aFlag);
+
+ /**
+ *
+ */
+ inline TBool FlagIsSet(TUint32 aFlag) const;
+
private: // Data
- enum TOperationState
+ enum TPopConnectStates
{
EStartConnect,
EConnected,
EPopulate,
- // <qmail> removed EQueryingDetails/EQueryingDetailsBusy state
- // <qmail> new EDisconnecting state
- EDisconnecting,
- // <qmail> removed EErrInvalidDetails,
+ EQueryingDetails,
+ EQueryingDetailsBusy,
EIdle
};
- 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>
+ 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;
};
#endif