diff -r d189ee25cf9d -r 3533d4323edc ipsservices/ipssosplugin/inc/ipsplgsmtpoperation.h --- a/ipsservices/ipssosplugin/inc/ipsplgsmtpoperation.h Tue Aug 31 15:04:17 2010 +0300 +++ b/ipsservices/ipssosplugin/inc/ipsplgsmtpoperation.h Wed Sep 01 12:28:57 2010 +0100 @@ -21,24 +21,32 @@ #include #include "ipsplgcommon.h" -// -#include "ipsplgbaseoperation.h" +#include "ipsplgonlineoperation.h" // for MIpsPlgConnectOpCallback class CClientMtmRegistry; -class MFSMailRequestObserver; -// /** * Class for smtp related operations * + * This class encapsulates SMTP send new message and send pending messages + * operations. + * + * This class requires CIpsPlgEventHandler for QueryUsrPassL method + * for handling login problems. Because this class is exported and + * CIpsPlgEventHandler isn`t, to avoid problems, iEventHandler is passed + * as TAny* and can be set only from ipssosplugin. + * * @lib ipssosplugin.lib * @since FS 1.0 */ -// base class changed: CMsvOperation -> CIpsPlgBaseOperation, MIpsPlgConnectOpCallback removed -NONSHARABLE_CLASS( CIpsPlgSmtpOperation ) : public CIpsPlgBaseOperation +//should this class inherited from online operation +NONSHARABLE_CLASS( CIpsPlgSmtpOperation ) : + public CMsvOperation, + public MIpsPlgConnectOpCallback { +public: //from MIpsPlgConnectOpCallback -// CredientialsSetL removed + void CredientialsSetL( TInt aEvent ); public: @@ -48,12 +56,11 @@ * @since FS 1.0 * @return None */ - // aPriority, aUsePublishSubscribe parameters removed, aFSOperationObserver, aFSRequestId added IMPORT_C static CIpsPlgSmtpOperation* NewL( CMsvSession& aMsvSession, + TInt aPriority, TRequestStatus& aObserverRequestStatus, - MFSMailRequestObserver* aFSOperationObserver = NULL, - TInt aFSRequestId = KErrNotFound ); + TBool aUsePublishSubscribe ); /** * Symbian 2nd phase construcror @@ -61,12 +68,11 @@ * @since FS 1.0 * @return None */ - // aPriority, aUsePublishSubscribe parameters removed, aFSOperationObserver, aFSRequestId added IMPORT_C static CIpsPlgSmtpOperation* NewLC( CMsvSession& aMsvSession, + TInt aPriority, TRequestStatus& aObserverRequestStatus, - MFSMailRequestObserver* aOperationObserver = NULL, - TInt aFSRequestId = KErrNotFound ); + TBool aUsePublishSubscribe ); /** * Class destructor @@ -81,19 +87,6 @@ */ virtual const TDesC8& ProgressL(); -// - virtual const TDesC8& GetErrorProgressL( TInt aError ); - - virtual TFSProgress GetFSProgressL() const; -// - -// change ret val type - /** - * Returns operation type - */ - TIpsOpType IpsOpType() const; -// - /** * Stard sending operation * @@ -120,12 +113,10 @@ * @since FS 1.0 * @return None */ - // aPriority parameter removed, aFSOperationObserver, aFSRequestId added CIpsPlgSmtpOperation( CMsvSession& aMsvSession, - TRequestStatus& aObserverRequestStatus, - MFSMailRequestObserver* aFSOperationObserver, - TInt aFSRequestId ); + TInt aPriority, + TRequestStatus& aObserverRequestStatus ); /** * Constructor for leaving methods @@ -152,8 +143,9 @@ { EIdle, EMovingOutbox, // moving mail to OutBox folder - ESending // sending mail - // EQueryingDetails, EQueryingDetailsBusy removed + ESending, // sending mail + EQueryingDetails, // querying for password + EQueryingDetailsBusy, // another operation is querying for details }; /** @@ -162,11 +154,6 @@ * @since FS 1.0 */ void RunL( ); - -// - TInt RunError( TInt aError ); -// - void DoCancel( ); /** @@ -195,21 +182,22 @@ */ void ValidateAddressArrayL( const CDesCArray& aRecipients ); - // QueryUserPassL() function removed + /** + * Send user password query request to CIpsPlgEventHandler + * @return ETrue - if query send + */ + TBool QueryUserPassL(); + private: - CSmtpClientMtm* iSmtpMtm; - CMsvOperation* iOperation; - CMsvEntrySelection* iSelection; - CClientMtmRegistry* iMtmRegistry; - TInt iState; - TMsvId iSmtpService; -// - MFSMailRequestObserver* iFSOperationObserver; - TFSProgress iFSProgress; -// - // not owned - TAny* iEventHandler; // pointer to CIpsPlgEventHandler + CSmtpClientMtm* iSmtpMtm; + CMsvOperation* iOperation; + CMsvEntrySelection* iSelection; + CClientMtmRegistry* iMtmRegistry; + TInt iState; + TMsvId iSmtpService; + // not owned + TAny* iEventHandler; // pointer to CIpsPlgEventHandler }; #endif /* IPSPLGSENDOPERATION_H */