clfwrapper/ClientSrc/CCLFSortingStyleimpl.h
changeset 0 c53acadfccc6
equal deleted inserted replaced
-1:000000000000 0:c53acadfccc6
       
     1 /*
       
     2 * Copyright (c) 2002-2009 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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CCLFSORTINGSTYLEIMPL_H
       
    21 #define CCLFSORTINGSTYLEIMPL_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <MCLFSortingStyle.h>
       
    25 #include <e32base.h>
       
    26 
       
    27 class TResourceReader;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 *  This class implements MCLFSortingStyle interface.
       
    33 *
       
    34 *  @lib ContentListingFramework.lib
       
    35 *  @since S60 3.0
       
    36 */
       
    37 NONSHARABLE_CLASS( CCLFSortingStyleImpl ) : public CBase,
       
    38                                             public MCLFSortingStyle
       
    39     {
       
    40     public:  // Constructors and destructor
       
    41 
       
    42         /**
       
    43         * Two-phased constructor.
       
    44         */
       
    45         static CCLFSortingStyleImpl* NewLC();
       
    46 
       
    47         /**
       
    48         * Two-phased constructor.
       
    49         */
       
    50         static CCLFSortingStyleImpl* NewLC( TResourceReader& aResource );
       
    51 
       
    52         /**
       
    53         * Destructor.
       
    54         */
       
    55         virtual ~CCLFSortingStyleImpl();
       
    56 
       
    57     protected:  // Functions from base classes
       
    58 
       
    59         /**
       
    60         * From MCLFSortingStyle
       
    61         */
       
    62         void ResetL();
       
    63 
       
    64         /**
       
    65         * From MCLFSortingStyle
       
    66         */
       
    67         void AddFieldL( TCLFFieldId aFieldId );
       
    68 
       
    69         /**
       
    70         * From MCLFSortingStyle
       
    71         */
       
    72         void GetFieldsL( RArray<TCLFFieldId>& aArray ) const;
       
    73 
       
    74         /**
       
    75         * From MCLFSortingStyle
       
    76         */
       
    77         void SetOrdering( TCLFSortingStyleOrdering aOrdering );
       
    78 
       
    79         /**
       
    80         * From MCLFSortingStyle
       
    81         */
       
    82         TCLFSortingStyleOrdering Ordering() const;
       
    83 
       
    84         /**
       
    85         * From MCLFSortingStyle
       
    86         */
       
    87         void SetSortingDataType( TCLFItemDataType aDataType );
       
    88 
       
    89         /**
       
    90         * From MCLFSortingStyle
       
    91         */
       
    92         TCLFItemDataType SortingDataType() const;
       
    93 
       
    94         /**
       
    95         * From MCLFSortingStyle
       
    96         */
       
    97         void SetUndefinedItemPosition(
       
    98                     TCLFUndefinedItemPosition aUndefinedItemPosition );
       
    99 
       
   100         /**
       
   101         * From MCLFSortingStyle
       
   102         */
       
   103         TCLFUndefinedItemPosition UndefinedItemPosition() const;
       
   104 
       
   105 
       
   106     private:
       
   107 
       
   108         /**
       
   109         * C++ default constructor.
       
   110         */
       
   111         CCLFSortingStyleImpl();
       
   112 
       
   113         /**
       
   114         * By default Symbian 2nd phase constructor is private.
       
   115         */
       
   116         void ConstructL( TResourceReader& aResource );
       
   117 
       
   118     private:    // Data
       
   119         // Own: field ID array
       
   120         RArray<TCLFFieldId> iFieldIDArray;
       
   121         // Own: data type
       
   122         TCLFItemDataType iDataType;
       
   123         // Own: sorting ordering
       
   124         TCLFSortingStyleOrdering iOrdering;
       
   125         // Own:
       
   126         TCLFUndefinedItemPosition iUndefinedItemPosition;
       
   127 
       
   128     };
       
   129 
       
   130 #endif      // CCLFSORTINGSTYLEIMPL_H
       
   131 
       
   132 // End of File