email_plat/email_client_api/inc/emailsorting.h
changeset 74 6c59112cfd31
parent 47 f83bd4ae1fe3
equal deleted inserted replaced
69:4e54af54a4a1 74:6c59112cfd31
       
     1 /*
       
     2 * Copyright (c) 2010 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: Email Client sort criteria definition
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef EMAILSORTING
       
    19 #define EMAILSORTING
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 namespace EmailInterface {
       
    24 
       
    25 /**
       
    26 * Sort criteria used in searching messages with MEmailMessageSearchAsync 
       
    27 * declared in memailmessagesearch.h.
       
    28 */
       
    29 class TEmailSortCriteria
       
    30 {
       
    31 public:
       
    32     /**
       
    33     * Fields for sort criteria
       
    34     */
       
    35     enum TSortField {
       
    36         EDontCare,
       
    37         EByDate,
       
    38         EBySender,
       
    39         EByRecipient,
       
    40         EBySubject,
       
    41         EByPriority,
       
    42         EByFlagStatus,
       
    43         EByUnread,
       
    44         EBySize,
       
    45         EByAttachment,
       
    46     };
       
    47     
       
    48     // is ascending sort order
       
    49     TBool iAscending;
       
    50     
       
    51     // sort by field
       
    52     TSortField iField; 
       
    53 
       
    54     inline TEmailSortCriteria() : iAscending( ETrue ), iField( EDontCare ) {}
       
    55 };
       
    56 
       
    57 typedef RArray<TEmailSortCriteria> RSortCriteriaArray;
       
    58 
       
    59 } // EmailInterface
       
    60 
       
    61 #endif // EMAILSORTING