diff -r d189ee25cf9d -r 3533d4323edc ipsservices/ipssosplugin/inc/ipsplgimap4populateop.h --- a/ipsservices/ipssosplugin/inc/ipsplgimap4populateop.h Tue Aug 31 15:04:17 2010 +0300 +++ b/ipsservices/ipssosplugin/inc/ipsplgimap4populateop.h Wed Sep 01 12:28:57 2010 +0100 @@ -15,8 +15,8 @@ * */ -#ifndef IPSPLGIMAP4POPULATEOP_H -#define IPSPLGIMAP4POPULATEOP_H +#ifndef __IPSPLGIMAP4POPULATEOP_H__ +#define __IPSPLGIMAP4POPULATEOP_H__ #include "ipsplgonlineoperation.h" @@ -24,143 +24,177 @@ /** * class CIpsPlgImap4PopulateOp -* loads message's actual content/ message parts +* */ -NONSHARABLE_CLASS ( CIpsPlgImap4PopulateOp ) : + +class CIpsPlgImap4PopulateOp : public CIpsPlgOnlineOperation { -public: + public: + + /** + * NewL() + * Basic factory function - creates dialog with standard title resource + * @param CMsvSession& + * + * + * + * + * + * + * @return CIpsPlgImap4PopulateOperation* self pointer + */ + + IMPORT_C static CIpsPlgImap4PopulateOp* NewL( + CMsvSession& aMsvSession, + TRequestStatus& aObserverRequestStatus, + TInt aPriority, + TMsvId aService, + CIpsPlgTimerOperation& aActivityTimer, + const TImImap4GetPartialMailInfo& aPartialMailInfo, + const CMsvEntrySelection& aSel, + TFSMailMsgId aFSMailBoxId, + MFSMailRequestObserver& aFSOperationObserver, + TInt aFSRequestId, + CIpsPlgEventHandler* aEventHandler, + TBool aDoFilterSelection = ETrue ); + + /** + * ~CIpsPlgImap4PopulateOp() + * destructor + */ + + virtual ~CIpsPlgImap4PopulateOp(); - /** - * NewL() - * Basic factory function - creates dialog with standard title resource - * @param aMsvSession client/server session to msvServer - * @param aObserverRequestStatus caller's status - * @param aService serviceId of the mailbox - * @param aActivityTimer mailbox specific activity timer - * @param aPartialMailInfo parameter struct for the service request to msvServer - * @param aSel selection of messages to populate (first entry contains service entry) - * @param aFSMailBoxId mailbox identifier - * @param aFSOperationObserver observer for this operation - * @param aFSRequestId client assigned request Id - * @param aEventHandler - * @param aDoFilterSelection specifies whether a full populate is requested (i.e. refetch already fecthed or not) - * @return CIpsPlgImap4PopulateOperation* self pointer - */ - // priority parameter has been removed - // MFSMailRequestObserver& changed to pointer - IMPORT_C static CIpsPlgImap4PopulateOp* NewL( - CMsvSession& aMsvSession, - TRequestStatus& aObserverRequestStatus, - TMsvId aService, - CIpsPlgTimerOperation& aActivityTimer, - const TImImap4GetPartialMailInfo& aPartialMailInfo, - const CMsvEntrySelection& aSel, - TFSMailMsgId aFSMailBoxId, - MFSMailRequestObserver* aFSOperationObserver, - TInt aFSRequestId, - CIpsPlgEventHandler* aEventHandler, - TBool aDoFilterSelection = ETrue ); + /** + * + */ + const TDesC8& ProgressL(); - virtual ~CIpsPlgImap4PopulateOp(); + + /** + * + */ + const TDesC8& GetErrorProgressL( TInt aError ); + + /** + * + */ + TFSProgress GetFSProgressL() const; + + /** + * + */ + virtual TInt IpsOpType() const; + + private: + + + /** + * CIpsPlgImap4PopulateOp() + * @param + * + * + * + * + * + * + + */ - /** - * From MsvOperation - * Gets information on the progress of the operation - * (see MsvOperation header) - */ - const TDesC8& ProgressL(); - - /** - * From CIpsPlgBaseOperation - * For reporting if DoRunL leaves - */ - const TDesC8& GetErrorProgressL( TInt aError ); - - TFSProgress GetFSProgressL() const; - - // change ret val type - /** - * Returns operation type - */ - TIpsOpType IpsOpType() const; - -private: - // priority parameter has been removed - CIpsPlgImap4PopulateOp( - CMsvSession& aMsvSession, - TRequestStatus& aObserverRequestStatus, - TMsvId aService, - CIpsPlgTimerOperation& aActivityTimer, - const TImImap4GetPartialMailInfo& aGetMailInfo, - TFSMailMsgId aFSMailBoxId, - MFSMailRequestObserver* aFSOperationObserver, - TInt aFSRequestId, - CIpsPlgEventHandler* aEventHandler ); + CIpsPlgImap4PopulateOp( + CMsvSession& aMsvSession, + TRequestStatus& aObserverRequestStatus, + TInt aPriority, + TMsvId aService, + CIpsPlgTimerOperation& aActivityTimer, + const TImImap4GetPartialMailInfo& aGetMailInfo, + TFSMailMsgId aFSMailBoxId, + MFSMailRequestObserver& aFSOperationObserver, + TInt aFSRequestId, + CIpsPlgEventHandler* aEventHandler ); + + /** + * + */ + + void ConstructL( + const CMsvEntrySelection& aSel, + TBool aDoFilterSelection ); - void ConstructL( const CMsvEntrySelection& aSel, TBool aDoFilterSelection ); - void RunL(); + /** + * + */ + + void RunL(); - void DoRunL(); - - void DoCancel(); + /** + * + */ + void DoRunL(); + + /** + * + */ + void DoCancel(); + + /** + * + */ - /** - * completes the status of the observer - */ - void Complete(); - - /** - * handle connecting state - */ - void DoConnectL(); - - /** - * Filters given selection of entries - * The result is set to internal iSelection member - * (filtering is done on basis of what is the current populate status of the particular message) - * @param aSelection list of entries to fetch - */ - void FilterSelectionL( const CMsvEntrySelection& aSelection ); - - /** - * helper for selection filtering - */ - TBool IsPartialPopulate(); + void Complete(); + + /** + * + */ + void DoConnectL(); + + /** + * + */ + void FilterSelectionL( const CMsvEntrySelection& aSelection ); + + /** + * + */ + TBool IsPartialPopulate( ); -protected: - - /** - * starts the actual populate command to msvserver - */ - void DoPopulateL(); - - // remove GetEngineProgress( const TDesC8& aProgress ); - -private: //Data - // members changed - // internal state of the operation - enum TFetchState - { - EStateIdle, - EStateConnecting, - EStateFetching, - EStateInfoEntryChange - }; - TFetchState iState; - - // parameter struct for the populate command to msvserver - TImImap4GetPartialMailInfo iPartialMailInfo; - // contains full list of messages to fetch - CMsvEntrySelection* iSelection; - // contains serviceId and one message entry id from iSelection list - // i.e. populate op loops through iSelection with this iTempSelection - CMsvEntrySelection* iTempSelection; - // not owned - CIpsPlgEventHandler* iEventHandler; - TDesC8* iFetchErrorProgress; - TPckgBuf iSyncProgress; + protected: + + /** + * + */ + void DoPopulateL(); + + /** + * From CIpsPlgOnlineoperation + */ + TInt GetEngineProgress( const TDesC8& aProgress ); + + protected: + + enum TFetchState + { + EStateIdle, + EStateConnecting, + EStateFetching, + EStateInfoEntryChange + }; + + + private: //Data + + TImImap4GetPartialMailInfo iPartialMailInfo; + RArray iSelection; + // not owned + CIpsPlgEventHandler* iEventHandler; + CMsvEntrySelection* iTempSelection; + TDesC8* iFetchErrorProgress; + TPckgBuf iSyncProgress; + TMsvId iParent; + TFetchState iState; + }; -#endif // IPSPLGIMAP4POPULATEOP_H +#endif //__IPSPLGIMAP4POPULATEOP_H__