emailservices/emailframework/commonlib/inc/CFSMailFolder.h
changeset 0 8466d47a6819
child 4 e7aa27f58ae1
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  common email folder object
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __FSMAILFOLDER_H
       
    20 #define __FSMAILFOLDER_H
       
    21 
       
    22 #include "cfsmailfolderbase.h"
       
    23 #include "mfsmailiterator.h"
       
    24 
       
    25 // forward declarations
       
    26 class CFSMailIterator;
       
    27 
       
    28 /**
       
    29  *  class for handling mailbox folder data
       
    30  *
       
    31  *  @lib FSFWCommonLib
       
    32  *  @since S60 S60 v3.1
       
    33  */
       
    34 class CFSMailFolder : public CFSMailFolderBase
       
    35 {
       
    36  public:
       
    37   	  
       
    38     /**
       
    39      * Two-phased constructor.
       
    40      *
       
    41      * @param aFolderId folder id in plugin containing folder
       
    42      */
       
    43      IMPORT_C static CFSMailFolder* NewL( TFSMailMsgId aFolderId );
       
    44   	
       
    45     /**
       
    46      * Two-phased constructor.
       
    47      *
       
    48      * @param aFolderId folder id in plugin containing folder
       
    49      */
       
    50      IMPORT_C static CFSMailFolder* NewLC( TFSMailMsgId aFolderId );
       
    51 
       
    52     /**
       
    53      * Destructor.
       
    54      */  
       
    55      IMPORT_C ~CFSMailFolder();
       
    56 
       
    57     /**
       
    58      * List folder messages. Function returns iterator, which user can use
       
    59      * to scroll up/down message list.
       
    60      *
       
    61      * @param aDetails describes which details each CFSMailMessage contains
       
    62      * @param aSorting describes requested sort criteria.
       
    63      *        First item in array is primary sort criteria.
       
    64      *
       
    65      * @return email list iterator, ownership is transferred to user
       
    66      */
       
    67      IMPORT_C MFSMailIterator* ListMessagesL(
       
    68         						const TFSMailDetails aDetails,
       
    69         						const RArray<TFSMailSortCriteria>& aSorting);
       
    70     /**
       
    71      * removes given message from folder
       
    72      *
       
    73      * @param aMessageId id of message to be removed
       
    74      */
       
    75      IMPORT_C void RemoveMessageL( const TFSMailMsgId aMessageId );
       
    76 
       
    77     /**
       
    78      * lists subfolders contained by this folder
       
    79      *
       
    80      * @param aSubFolderList list of subfolders
       
    81      */
       
    82   	 IMPORT_C void GetSubFoldersL(RPointerArray<CFSMailFolder>& aSubFolders);
       
    83 
       
    84     /**
       
    85      * method launches fetching of messages given by user from server
       
    86      *
       
    87      * @param aMessageIds ids of messages to be fetched
       
    88      * @param aDetails defines which details each message contains
       
    89      * @param aObserver request observer for conveying fetching progress
       
    90      *  events to user
       
    91      */
       
    92 	 IMPORT_C TInt FetchMessagesL( 	const RArray<TFSMailMsgId>& aMessageIds,
       
    93      				 				TFSMailDetails aDetails,
       
    94      				 				MFSMailRequestObserver& aObserver );
       
    95     /**
       
    96      * method to check if this folder allows copying from given folder type
       
    97      *
       
    98      * @param aFolderType folder type
       
    99      */
       
   100      IMPORT_C TBool SupportsCopyFromL( TFSFolderType aFolderType );
       
   101 
       
   102     /**
       
   103      * method to check if this folder allows moving from given folder type
       
   104      *
       
   105      * @param aFolderType folder type
       
   106      */
       
   107      IMPORT_C TBool SupportsMoveFromL( TFSFolderType aFolderType );
       
   108 
       
   109      /**
       
   110       * removes downloaded attachments from local/terminal memory 
       
   111       */
       
   112      IMPORT_C void RemoveDownLoadedAttachmentsL();
       
   113      
       
   114 public: // from  CExtendableEmail
       
   115 
       
   116      /** 
       
   117       * @see CExtendableEmail::ReleaseExtension
       
   118       */                                        
       
   119      IMPORT_C void ReleaseExtension( CEmailExtension* aExtension );
       
   120      
       
   121      /** 
       
   122       * @see CExtendableEmail::ExtensionL
       
   123       */
       
   124      IMPORT_C CEmailExtension* ExtensionL( const TUid& aInterfaceUid );
       
   125      
       
   126  protected:
       
   127 
       
   128     /**
       
   129      * C++ default constructor.
       
   130      */
       
   131   	 CFSMailFolder();
       
   132 
       
   133 private:
       
   134 
       
   135   	/**
       
   136      * Two-phased constructor
       
   137      */
       
   138 	void ConstructL( TFSMailMsgId aFolderId );
       
   139 
       
   140 private: // data
       
   141 
       
   142     /**
       
   143      * request handler for plugin requests
       
   144      */
       
   145 	 CFSMailRequestHandler* 	iRequestHandler;	
       
   146 
       
   147 };
       
   148 
       
   149 #endif