diff -r dcf0eedfc1a3 -r d189ee25cf9d ipsservices/ipssosplugin/inc/ipsplgpop3connectop.h --- 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 not used any more { -public://from MIpsPlgConnectOpCallback - - void CredientialsSetL( TInt aEvent ); - public: + // 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 + */ + // MFSMailRequestObserver& changed to pointer + // aSignallingAllowed parameter added + // 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) + */ + // moved to 'public:'as defined so in base class + const TDesC8& ProgressL(); +// Connected() used from baseclass +// change ret val type /** - * - */ - virtual TInt IpsOpType() const; + * Returns operation type + */ + TIpsOpType IpsOpType() const; +// + TInt GetOperationErrorCodeL( ); + protected: /** - * - */ - const TDesC8& ProgressL(); - - /** * */ void DoCancel(); @@ -92,16 +110,14 @@ */ void DoRunL(); - /** - * - */ - TInt GetOperationErrorCodeL( ); - private: /** * */ + // MFSMailRequestObserver& changed to pointer + // aSignallingAllowed parameter added + // 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(); - + // /** - * - * - */ - 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(); + // removed TBool ValidateL() (did nothing) + // removed void DoQueryPasswordL() not used any more + // DoDisconnect -> DoDisconnectL + void DoDisconnectL(); + // - - /** - * - */ - inline void SetFlag(TUint32 aFlag); - - /** - * - */ - inline void UnsetFlag(TUint32 aFlag); - - /** - * - */ - inline TBool FlagIsSet(TUint32 aFlag) const; - + // removed flag methods as they were not used or even defined anywhere + + // 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, + // removed EQueryingDetails/EQueryingDetailsBusy state + // new EDisconnecting state + EDisconnecting, + // removed EErrInvalidDetails, EIdle }; - TInt iState; - CMsvEntry* iEntry; - TPckgBuf iProgress; - TInt iPopulateLimit; - TBool iForcePopulate; - CMsvEntrySelection* iSelection; - // not owned - CIpsPlgEventHandler* iEventHandler; - // set to true if connection is already exists - TBool iAlreadyConnected; + TOperationState iState; + // removed iEntry; + TPckgBuf iProgress; + // removed iPopulateLimit; + TBool iForcePopulate; + // removed iSelection; + CIpsPlgEventHandler* iEventHandler; // not owned + // iAlreadyConnected removed + // + TBool iFetchWillFollow; + // }; #endif