ipsservices/ipssosplugin/inc/ipsplgsosbaseplugin.h
changeset 72 64e38f08e49c
parent 53 bf7eb7911fc5
child 68 83cc6bae1de8
equal deleted inserted replaced
65:478bc57ad291 72:64e38f08e49c
    58 //<Qmail>
    58 //<Qmail>
    59 public: //from MStateObserverCallback
    59 public: //from MStateObserverCallback
    60     void ActiveFolderChanged(
    60     void ActiveFolderChanged(
    61         const TFSMailMsgId& aActiveMailboxId,
    61         const TFSMailMsgId& aActiveMailboxId,
    62         const TFSMailMsgId& aActiveFolderId);
    62         const TFSMailMsgId& aActiveFolderId);
    63     
    63 
    64 public://from CExtendableEmail
    64 public://from CExtendableEmail
    65 
    65 
    66     CEmailExtension* ExtensionL( const TUid& aInterfaceUid );
    66     CEmailExtension* ExtensionL( const TUid& aInterfaceUid );
    67 //</Qmail>    
    67 //</Qmail>
    68 public:
    68 public:
    69 
    69 
    70     /**
    70     /**
    71     * ~CIpsPlgSosBasePlugin
    71     * ~CIpsPlgSosBasePlugin
    72     * Destructor
    72     * Destructor
    73     */
    73     */
    74     IMPORT_C virtual ~CIpsPlgSosBasePlugin();
    74     IMPORT_C virtual ~CIpsPlgSosBasePlugin();
    75     
    75 
    76 public: //from MIpsPlgSingleOpWatcher
    76 public: //from MIpsPlgSingleOpWatcher
    77 
    77 
    78     /**
    78     /**
    79     *
    79     *
    80     */
    80     */
   138         const RArray<TFSMailMsgId>& aMessageIds,
   138         const RArray<TFSMailMsgId>& aMessageIds,
   139         RArray<TFSMailMsgId>& aNewMessages,
   139         RArray<TFSMailMsgId>& aNewMessages,
   140         const TFSMailMsgId& aSourceFolderId,
   140         const TFSMailMsgId& aSourceFolderId,
   141         const TFSMailMsgId& aDestinationFolderId );
   141         const TFSMailMsgId& aDestinationFolderId );
   142 
   142 
   143     virtual MDesCArray* GetMrusL( const TFSMailMsgId& aMailBoxId );
       
   144 
       
   145     virtual void SetMrusL(
       
   146             const TFSMailMsgId& aMailBoxId,
       
   147             MDesCArray* aNewMruList );
       
   148 
       
   149     virtual const TFSProgress GetLastSyncStatusL(
   143     virtual const TFSProgress GetLastSyncStatusL(
   150         const TFSMailMsgId& aMailBoxId );
   144         const TFSMailMsgId& aMailBoxId );
   151 
   145 
   152     virtual TInt CancelSyncL( const TFSMailMsgId& aMailBoxId );
   146     virtual TInt CancelSyncL( const TFSMailMsgId& aMailBoxId );
   153 
   147 
   183 
   177 
   184     virtual void DeleteMessagesByUidL(
   178     virtual void DeleteMessagesByUidL(
   185         const TFSMailMsgId& aMailBoxId,
   179         const TFSMailMsgId& aMailBoxId,
   186         const TFSMailMsgId& aFolderId,
   180         const TFSMailMsgId& aFolderId,
   187         const RArray<TFSMailMsgId>& aMessages );
   181         const RArray<TFSMailMsgId>& aMessages );
   188 		
   182 
   189 //<qmail>
   183 //<qmail>
   190     virtual void DeleteMessagesByUidL(
   184     virtual void DeleteMessagesByUidL(
   191         const TFSMailMsgId& aMailBoxId,
   185         const TFSMailMsgId& aMailBoxId,
   192         const TFSMailMsgId& aFolderId,
   186         const TFSMailMsgId& aFolderId,
   193         const RArray<TFSMailMsgId>& aMessages,
   187         const RArray<TFSMailMsgId>& aMessages,
   197 
   191 
   198     // MESSAGE STORE OPERATIONS
   192     // MESSAGE STORE OPERATIONS
   199 
   193 
   200     virtual CFSMailMessage* CreateMessageToSendL(
   194     virtual CFSMailMessage* CreateMessageToSendL(
   201         const TFSMailMsgId& aMailBoxId );
   195         const TFSMailMsgId& aMailBoxId );
   202     
   196 
   203 // <qmail>
   197 // <qmail>
   204     /**
   198     /**
   205      * Creates new email message to message store asynchronously
   199      * Creates new email message to message store asynchronously
   206      *
   200      *
   207      * @param aMailBoxId msv entry id to mailbox which setting are used
   201      * @param aMailBoxId msv entry id to mailbox which setting are used
   226      * @param aMailBoxId msv entry id to mailbox which setting are used
   220      * @param aMailBoxId msv entry id to mailbox which setting are used
   227      * @param aOriginalMessageId id of the forwarded message
   221      * @param aOriginalMessageId id of the forwarded message
   228      * @param aOperationObserver Observer for the operation
   222      * @param aOperationObserver Observer for the operation
   229      * @param aRequestId Id of the operation
   223      * @param aRequestId Id of the operation
   230      */
   224      */
   231     virtual void CreateForwardMessageL( 
   225     virtual void CreateForwardMessageL(
   232         const TFSMailMsgId& aMailBoxId,
   226         const TFSMailMsgId& aMailBoxId,
   233         const TFSMailMsgId& aOriginalMessageId,
   227         const TFSMailMsgId& aOriginalMessageId,
   234         MFSMailRequestObserver& aOperationObserver,
   228         MFSMailRequestObserver& aOperationObserver,
   235         const TInt aRequestId,
   229         const TInt aRequestId,
   236         const TDesC& aHeaderDescriptor = KNullDesC );
   230         const TDesC& aHeaderDescriptor = KNullDesC );
   250      * @param aOriginalMessageId id of the replied message
   244      * @param aOriginalMessageId id of the replied message
   251      * @param aReplyToAll reply to all recipients
   245      * @param aReplyToAll reply to all recipients
   252      * @param aOperationObserver Observer for the operation
   246      * @param aOperationObserver Observer for the operation
   253      * @param aRequestId Id of the operation
   247      * @param aRequestId Id of the operation
   254      */
   248      */
   255     virtual void CreateReplyMessageL( 
   249     virtual void CreateReplyMessageL(
   256         const TFSMailMsgId& aMailBoxId, 
   250         const TFSMailMsgId& aMailBoxId,
   257         const TFSMailMsgId& aOriginalMessageId,
   251         const TFSMailMsgId& aOriginalMessageId,
   258         const TBool aReplyToAll,
   252         const TBool aReplyToAll,
   259         MFSMailRequestObserver& aOperationObserver,
   253         MFSMailRequestObserver& aOperationObserver,
   260         const TInt aRequestId,
   254         const TInt aRequestId,
   261         const TDesC& aHeaderDescriptor );
   255         const TDesC& aHeaderDescriptor );
   262 // </qmail>
   256 // </qmail>
   263        
   257 
   264     virtual void StoreMessageL(
   258     virtual void StoreMessageL(
   265         const TFSMailMsgId& aMailBoxId,
   259         const TFSMailMsgId& aMailBoxId,
   266         CFSMailMessage& aMessage );
   260         CFSMailMessage& aMessage );
   267 
   261 
   268 
   262 
   271             const TFSMailMsgId& aMailBoxId,
   265             const TFSMailMsgId& aMailBoxId,
   272             RPointerArray<CFSMailMessage> &messages,
   266             RPointerArray<CFSMailMessage> &messages,
   273             MFSMailRequestObserver& aOperationObserver,
   267             MFSMailRequestObserver& aOperationObserver,
   274             const TInt aRequestId );
   268             const TInt aRequestId );
   275     // </qmail>
   269     // </qmail>
   276             
   270 
   277     virtual void GetMessagesL(
   271     virtual void GetMessagesL(
   278         const TFSMailMsgId& aMailBoxId,
   272         const TFSMailMsgId& aMailBoxId,
   279         const TFSMailMsgId& aFolderId,
   273         const TFSMailMsgId& aFolderId,
   280         const RArray<TFSMailMsgId>& aMessageIds,
   274         const RArray<TFSMailMsgId>& aMessageIds,
   281         RPointerArray<CFSMailMessage>& aMessageList,
   275         RPointerArray<CFSMailMessage>& aMessageList,
   301         const TFSMailMsgId& aParentFolderId,
   295         const TFSMailMsgId& aParentFolderId,
   302         const TFSMailMsgId& aMessageId,
   296         const TFSMailMsgId& aMessageId,
   303         const TFSMailMsgId& aParentPartId,
   297         const TFSMailMsgId& aParentPartId,
   304         const TDesC& aContentType,
   298         const TDesC& aContentType,
   305         const TDesC& aFilePath );
   299         const TDesC& aFilePath );
   306     
   300 
   307     // <qmail>
   301     // <qmail>
   308     virtual void NewChildPartFromFileL(
   302     virtual void NewChildPartFromFileL(
   309         const TFSMailMsgId& aMailBoxId,
   303         const TFSMailMsgId& aMailBoxId,
   310         const TFSMailMsgId& aParentFolderId,
   304         const TFSMailMsgId& aParentFolderId,
   311         const TFSMailMsgId& aMessageId,
   305         const TFSMailMsgId& aMessageId,
   312         const TFSMailMsgId& aParentPartId,
   306         const TFSMailMsgId& aParentPartId,
   313         const TDesC& aContentType,
   307         const TDesC& aContentType,
   314         const TDesC& aFilePath, 
   308         const TDesC& aFilePath,
   315         MFSMailRequestObserver& aOperationObserver,
   309         MFSMailRequestObserver& aOperationObserver,
   316         const TInt aRequestId );
   310         const TInt aRequestId );
   317     // </qmail>
   311     // </qmail>
   318 
   312 
   319     /**
   313     /**
   345         const TFSMailMsgId& aMailBoxId,
   339         const TFSMailMsgId& aMailBoxId,
   346         const TFSMailMsgId& aParentFolderId,
   340         const TFSMailMsgId& aParentFolderId,
   347         const TFSMailMsgId& aMessageId,
   341         const TFSMailMsgId& aMessageId,
   348         const TFSMailMsgId& aParentPartId,
   342         const TFSMailMsgId& aParentPartId,
   349         const TFSMailMsgId& aPartId);
   343         const TFSMailMsgId& aPartId);
   350     
   344 
   351     // <qmail>
   345     // <qmail>
   352     virtual void RemoveChildPartL(
   346     virtual void RemoveChildPartL(
   353         const TFSMailMsgId& aMailBoxId,
   347         const TFSMailMsgId& aMailBoxId,
   354         const TFSMailMsgId& aParentFolderId,
   348         const TFSMailMsgId& aParentFolderId,
   355         const TFSMailMsgId& aMessageId,
   349         const TFSMailMsgId& aMessageId,
   356         const TFSMailMsgId& aParentPartId,
   350         const TFSMailMsgId& aParentPartId,
   357         const TFSMailMsgId& aPartId,
   351         const TFSMailMsgId& aPartId,
   358         MFSMailRequestObserver& aOperationObserver,
   352         MFSMailRequestObserver& aOperationObserver,
   359         const TInt aRequestId );
   353         const TInt aRequestId );
   360     // </qmail>
   354     // </qmail>
   361         
   355 
   362     virtual CFSMailMessagePart* MessagePartL(
   356     virtual CFSMailMessagePart* MessagePartL(
   363         const TFSMailMsgId& aMailBoxId,
   357         const TFSMailMsgId& aMailBoxId,
   364         const TFSMailMsgId& aParentFolderId,
   358         const TFSMailMsgId& aParentFolderId,
   365         const TFSMailMsgId& aMessageId,
   359         const TFSMailMsgId& aMessageId,
   366         const TFSMailMsgId& aMessagePartId);
   360         const TFSMailMsgId& aMessagePartId);
   690         CMsvEntry*& aMessageEntry,
   684         CMsvEntry*& aMessageEntry,
   691         CImEmailMessage*& aImEmailMessage );
   685         CImEmailMessage*& aImEmailMessage );
   692 
   686 
   693     /**
   687     /**
   694 	 * Takes ownership of the cached objects or creates new ones
   688 	 * Takes ownership of the cached objects or creates new ones
   695 	 */     	 
   689 	 */
   696 	void TakeMessageEntryLC(
   690 	void TakeMessageEntryLC(
   697 		TMsvId aId,
   691 		TMsvId aId,
   698         CMsvEntry*& aMessageEntry,
   692         CMsvEntry*& aMessageEntry,
   699         CImEmailMessage*& aImEmailMessage );
   693         CImEmailMessage*& aImEmailMessage );
   700     
   694 
   701     /**
   695     /**
   702      * Return objects to cache, deleting old ones in the cache if necessary
   696      * Return objects to cache, deleting old ones in the cache if necessary
   703      */         
   697      */
   704     void ReturnMessageEntry(
   698     void ReturnMessageEntry(
   705         CMsvEntry* aMessageEntry,
   699         CMsvEntry* aMessageEntry,
   706         CImEmailMessage* aImEmailMessage );
   700         CImEmailMessage* aImEmailMessage );
   707         
   701 
   708     /*
   702     /*
   709      * Cleans up the cached messages entries that have accessed with
   703      * Cleans up the cached messages entries that have accessed with
   710      * GetMessageEntryL()
   704      * GetMessageEntryL()
   711      */
   705      */
   712     void CleanCachedMessageEntries();
   706     void CleanCachedMessageEntries();
   729     void DeleteAndRemoveOperation(
   723     void DeleteAndRemoveOperation(
   730             const TInt aOpArrayIndex, TInt aCompleteCode );
   724             const TInt aOpArrayIndex, TInt aCompleteCode );
   731 
   725 
   732     /**
   726     /**
   733      * Fixes the forward (or reply) message header parts (that are copied
   727      * Fixes the forward (or reply) message header parts (that are copied
   734      * to msg content) in case that caller has provided an own header 
   728      * to msg content) in case that caller has provided an own header
   735      * descriptor for these parts.
   729      * descriptor for these parts.
   736      */
   730      */
   737     void FixReplyForwardHeaderL(
   731     void FixReplyForwardHeaderL(
   738             CFSMailMessage* aMessage,
   732             CFSMailMessage* aMessage,
   739             const TFSMailMsgId& aMailBoxId,
   733             const TFSMailMsgId& aMailBoxId,
   740             const TFSMailMsgId& aOriginalMessageId,
   734             const TFSMailMsgId& aOriginalMessageId,
   741             const TDesC& aHeaderDescriptor );
   735             const TDesC& aHeaderDescriptor );
   742     
   736 
   743 private:
   737 private:
   744 
   738 
   745     /**
   739     /**
   746     * Maps symbian msv api's folder type to fs folder type
   740     * Maps symbian msv api's folder type to fs folder type
   747     */
   741     */
   833     // branding id i.e. "yahoo.com" or "google"
   827     // branding id i.e. "yahoo.com" or "google"
   834     HBufC*  iBrandingId;
   828     HBufC*  iBrandingId;
   835 
   829 
   836     // flag indicates is instance under FSEmail.exe
   830     // flag indicates is instance under FSEmail.exe
   837     TBool iIsUnderUiProcess;
   831     TBool iIsUnderUiProcess;
   838     
   832 
   839     //<Qmail>
   833     //<Qmail>
   840     CIpsStateExtension*    iStateExtension;//owned
   834     CIpsStateExtension*    iStateExtension;//owned
   841     //</Qmail>
   835     //</Qmail>
   842 	};
   836 	};
   843 
   837