ipsservices/ipssosplugin/inc/ipsplgsmtpoperation.h
branchRCL_3
changeset 24 d189ee25cf9d
parent 8 e1b6206813b4
child 25 3533d4323edc
equal deleted inserted replaced
23:dcf0eedfc1a3 24:d189ee25cf9d
    19 #ifndef IPSPLGSENDOPERATION_H
    19 #ifndef IPSPLGSENDOPERATION_H
    20 #define IPSPLGSENDOPERATION_H
    20 #define IPSPLGSENDOPERATION_H
    21 
    21 
    22 #include <smtcmtm.h>
    22 #include <smtcmtm.h>
    23 #include "ipsplgcommon.h"
    23 #include "ipsplgcommon.h"
    24 #include "ipsplgonlineoperation.h" // for MIpsPlgConnectOpCallback
    24 // <qmail>
       
    25 #include "ipsplgbaseoperation.h"
    25 
    26 
    26 class CClientMtmRegistry;
    27 class CClientMtmRegistry;
       
    28 class MFSMailRequestObserver;
       
    29 // </qmail>
    27 
    30 
    28 /**
    31 /**
    29  *  Class for smtp related operations
    32  *  Class for smtp related operations
    30  *
       
    31  *  This class encapsulates SMTP send new message and send pending messages
       
    32  *  operations.
       
    33  *
       
    34  *  This class requires CIpsPlgEventHandler for QueryUsrPassL method
       
    35  *  for handling login problems. Because this class is exported and
       
    36  *  CIpsPlgEventHandler isn`t, to avoid problems, iEventHandler is passed
       
    37  *  as TAny* and can be set only from ipssosplugin.
       
    38  *
    33  *
    39  *  @lib ipssosplugin.lib
    34  *  @lib ipssosplugin.lib
    40  *  @since FS 1.0
    35  *  @since FS 1.0
    41  */
    36  */
    42 //should this class inherited from online operation
    37 // <qmail> base class changed: CMsvOperation -> CIpsPlgBaseOperation, MIpsPlgConnectOpCallback removed
    43 NONSHARABLE_CLASS( CIpsPlgSmtpOperation ) :
    38 NONSHARABLE_CLASS( CIpsPlgSmtpOperation ) : public CIpsPlgBaseOperation
    44     public CMsvOperation,
       
    45     public MIpsPlgConnectOpCallback
       
    46     {
    39     {
    47 public: //from MIpsPlgConnectOpCallback
    40 
    48 
    41 // <qmail> CredientialsSetL removed 
    49     void CredientialsSetL( TInt aEvent );
       
    50 
    42 
    51 public:
    43 public:
    52 
    44 
    53     /**
    45     /**
    54      * Symbian 2nd phase construcror
    46      * Symbian 2nd phase construcror
    55      *
    47      *
    56      * @since FS 1.0
    48      * @since FS 1.0
    57      * @return None
    49      * @return None
    58      */
    50      */
       
    51     // <qmail> aPriority, aUsePublishSubscribe parameters removed, aFSOperationObserver, aFSRequestId added
    59     IMPORT_C static CIpsPlgSmtpOperation* NewL( 
    52     IMPORT_C static CIpsPlgSmtpOperation* NewL( 
    60         CMsvSession& aMsvSession, 
    53         CMsvSession& aMsvSession, 
    61         TInt aPriority, 
       
    62         TRequestStatus& aObserverRequestStatus,
    54         TRequestStatus& aObserverRequestStatus,
    63         TBool aUsePublishSubscribe );
    55         MFSMailRequestObserver* aFSOperationObserver = NULL,
       
    56         TInt aFSRequestId = KErrNotFound );
    64 
    57 
    65     /**
    58     /**
    66      * Symbian 2nd phase construcror
    59      * Symbian 2nd phase construcror
    67      *
    60      *
    68      * @since FS 1.0
    61      * @since FS 1.0
    69      * @return None
    62      * @return None
    70      */
    63      */
       
    64     // <qmail> aPriority, aUsePublishSubscribe parameters removed, aFSOperationObserver, aFSRequestId added
    71     IMPORT_C static CIpsPlgSmtpOperation* NewLC(
    65     IMPORT_C static CIpsPlgSmtpOperation* NewLC(
    72         CMsvSession& aMsvSession, 
    66         CMsvSession& aMsvSession, 
    73         TInt aPriority, 
       
    74         TRequestStatus& aObserverRequestStatus,
    67         TRequestStatus& aObserverRequestStatus,
    75         TBool aUsePublishSubscribe );
    68         MFSMailRequestObserver* aOperationObserver = NULL,
       
    69         TInt aFSRequestId = KErrNotFound );
    76 
    70 
    77     /**
    71     /**
    78      * Class destructor
    72      * Class destructor
    79      *
    73      *
    80      * @since FS 1.0
    74      * @since FS 1.0
    85     /**
    79     /**
    86      * From CMsvOperation
    80      * From CMsvOperation
    87      */ 
    81      */ 
    88     virtual const TDesC8& ProgressL();
    82     virtual const TDesC8& ProgressL();
    89     
    83     
       
    84 // <qmail>
       
    85     virtual const TDesC8& GetErrorProgressL( TInt aError );
       
    86 
       
    87     virtual TFSProgress GetFSProgressL() const;
       
    88 // </qmail>
       
    89 
       
    90 // <qmail> change ret val type
       
    91     /**
       
    92      * Returns operation type
       
    93      */
       
    94     TIpsOpType IpsOpType() const;
       
    95 // </qmail>
       
    96 
    90     /**
    97     /**
    91      * Stard sending operation
    98      * Stard sending operation
    92      *
    99      *
    93      * @param aSelection message selection for send messages
   100      * @param aSelection message selection for send messages
    94      * @since FS 1.0
   101      * @since FS 1.0
   111      * Class constructor
   118      * Class constructor
   112      *
   119      *
   113      * @since FS 1.0
   120      * @since FS 1.0
   114      * @return None
   121      * @return None
   115      */
   122      */
       
   123     // <qmail> aPriority parameter removed, aFSOperationObserver, aFSRequestId added
   116     CIpsPlgSmtpOperation( 
   124     CIpsPlgSmtpOperation( 
   117         CMsvSession& aMsvSession, 
   125         CMsvSession& aMsvSession, 
   118         TInt aPriority, 
   126         TRequestStatus& aObserverRequestStatus,
   119         TRequestStatus& aObserverRequestStatus );
   127         MFSMailRequestObserver* aFSOperationObserver,
       
   128         TInt aFSRequestId );
   120     
   129     
   121     /**
   130     /**
   122      * Constructor for leaving methods
   131      * Constructor for leaving methods
   123      *
   132      *
   124      * @since FS 1.0
   133      * @since FS 1.0
   141 
   150 
   142     enum TIpsSendState
   151     enum TIpsSendState
   143         {
   152         {
   144         EIdle,
   153         EIdle,
   145         EMovingOutbox,          // moving mail to OutBox folder
   154         EMovingOutbox,          // moving mail to OutBox folder
   146         ESending,               // sending mail
   155         ESending                // sending mail
   147         EQueryingDetails,       // querying for password
   156 		// <qmail> EQueryingDetails, EQueryingDetailsBusy removed
   148         EQueryingDetailsBusy,   // another operation is querying for details
       
   149         };
   157         };
   150 
   158 
   151     /**
   159     /**
   152      * From CActive
   160      * From CActive
   153      *
   161      *
   154      * @since FS 1.0
   162      * @since FS 1.0
   155      */
   163      */
   156     void RunL( );
   164     void RunL( );
       
   165 
       
   166 // <qmail>
       
   167     TInt RunError( TInt aError );
       
   168 // </qmail>
       
   169 
   157     void DoCancel( );
   170     void DoCancel( );
   158     
   171     
   159     /**
   172     /**
   160      *
   173      *
   161      * @since FS 1.0
   174      * @since FS 1.0
   180      * Either returns silently if everything id ok, or leaves with KErrBadName
   193      * Either returns silently if everything id ok, or leaves with KErrBadName
   181      * @param aRecipients array of addresses
   194      * @param aRecipients array of addresses
   182      */
   195      */
   183     void ValidateAddressArrayL( const CDesCArray& aRecipients );
   196     void ValidateAddressArrayL( const CDesCArray& aRecipients );
   184 
   197 
   185     /**
   198 	// <qmail> QueryUserPassL() function removed
   186      * Send user password query request to CIpsPlgEventHandler
       
   187      * @return ETrue - if query send
       
   188      */
       
   189     TBool QueryUserPassL();
       
   190 
       
   191 private:
   199 private:
   192 
   200 
   193     CSmtpClientMtm*     iSmtpMtm;
   201     CSmtpClientMtm*         iSmtpMtm;
   194     CMsvOperation*      iOperation;
   202     CMsvOperation*          iOperation;
   195     CMsvEntrySelection* iSelection;
   203     CMsvEntrySelection*     iSelection;
   196     CClientMtmRegistry* iMtmRegistry;
   204     CClientMtmRegistry*     iMtmRegistry;
   197     TInt                iState;
   205     TInt                    iState;
   198     TMsvId              iSmtpService;
   206     TMsvId                  iSmtpService;
   199     // not owned
   207 // <qmail>
   200     TAny*               iEventHandler; // pointer to CIpsPlgEventHandler
   208     MFSMailRequestObserver* iFSOperationObserver;
       
   209     TFSProgress             iFSProgress;
       
   210 // </qmail>
       
   211 	// not owned
       
   212     TAny*               	iEventHandler; // pointer to CIpsPlgEventHandler
   201     };
   213     };
   202 
   214 
   203 #endif /* IPSPLGSENDOPERATION_H */
   215 #endif /* IPSPLGSENDOPERATION_H */