emailservices/emailframework/inc/MFSMailIterator.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 07 Jan 2010 12:38:38 +0200
changeset 1 12c456ceeff2
parent 0 8466d47a6819
child 8 e1b6206813b4
child 18 578830873419
permissions -rw-r--r--
Revision: 200951 Kit: 201001

/*
* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  email list iterator
*
*/


#ifndef MFSMAILITERATOR_H
#define MFSMAILITERATOR_H

//  INCLUDES
//<cmail>
#include "cfsmailmessage.h"
//</cmail>

/**
 *  Email framework list iterator. First call should contain NULL id as begin id :
 *  eg. NextL(TFSMailId(), count, messages);
 *
 *  @lib FSFWCommonLib
 *  @since S60 v3.1
 */
class MFSMailIterator
    {

public:
									
    /**
     * Lists user given count of email objects located after user
     * given start point.
     *
     * @param aCurrentMessageId start point is id of the first message
     *        to be listed
     * @param aCount email object count to be listed
     * @param aMessages user given and owned table where plugin stores
     *        email objects
     *
     * @return true if more email objects follows after listed objects
     */
     virtual TBool NextL( TFSMailMsgId aCurrentMessageId, 
                           TUint aCount, 
                           RPointerArray<CFSMailMessage>& aMessages) = 0;
                           
    /**
      * Lists user given count of email objects located after user
      * given start point.
     *
      * @param aStartWith start point is user given string to match
      * @param aCount email object count to be listed
      * @param aMessages user given and owned table where
      *        plugin stores email objects
     *
      * @return true if more email objects follows after listed objects
     */
     virtual TBool NextL( const TDesC&  aStartWith, 
                           TUint aCount, 
                           RPointerArray<CFSMailMessage>& aMessages) = 0;
        
    /**
      * Lists user given count of email objects located before user
      * given point.
     *
      * @param aCurrentMessageId end pointer is id of the last message
      *        to be listed
      * @param aCount email object count to be listed
      * @param aMessages user given and owned table where plugin stores
      *        email objects
     *
      * @return true if more email objects exists before listed objects
     */
     virtual TBool PreviousL( TFSMailMsgId aCurrentMessageId, 
                               TUint aCount, 
                               RPointerArray<CFSMailMessage>& aMessages) = 0;
        
    /**
      * Lists user given count of email objects located before user
      * given point.
     *
      * @param aStartWith end point is user given string to match
      * @param aCount email object count to be listed
      * @param aMessages user given and owned table where plugin stores email
      *        objects
     *
      * @return true if more email objects exists before listed objects
     */
     virtual TBool PreviousL( const TDesC&  aStartWith, 
                              TUint aCount, 
                              RPointerArray<CFSMailMessage>& aMessages) = 0;
    /**
     * Destructor.
     */  
   	 virtual ~MFSMailIterator() { }; 
        	
   	};

#endif  // MFSMAILITERATOR_H


// End of File