filemanager/GFLM/inc/CGflmFileFinderItem.h
branchRCL_3
changeset 38 491b3ed49290
parent 36 95243422089a
child 39 65326cf895ed
equal deleted inserted replaced
36:95243422089a 38:491b3ed49290
     1 /*
       
     2 * Copyright (c) 2007 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:  File finder item definitions
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CGFLMFILEFINDERITEM_H
       
    21 #define CGFLMFILEFINDERITEM_H
       
    22 
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 #include "CGflmFileSystemItem.h"
       
    27 
       
    28 
       
    29 //  FORWARD DECLARATIONS
       
    30 
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  A class representing a file system item.
       
    36 *  A file system item is either a file or a directory.
       
    37 *
       
    38 *  @lib GFLM.lib
       
    39 *  @since 3.2
       
    40 */
       
    41 class CGflmFileFinderItem : public CGflmFileSystemItem
       
    42     {
       
    43     public:  // Constructors and destructor
       
    44 
       
    45         /**
       
    46         * Two-phased constructor.
       
    47         */
       
    48         static CGflmFileFinderItem* NewLC(
       
    49             const TEntry& aEntry,
       
    50             const TDesC& aBasePath );
       
    51 
       
    52         /**
       
    53         * Destructor.
       
    54         */
       
    55         virtual ~CGflmFileFinderItem();
       
    56 
       
    57         /**
       
    58         * Compares items by match
       
    59         * @since 3.2
       
    60         * @param aFirst Given first item for comparison
       
    61         * @param aSecond Given second item for comparison
       
    62         * @return Comparison result
       
    63         */
       
    64         static TInt CompareByMatch(
       
    65             const CGflmGroupItem& aFirst,
       
    66             const CGflmGroupItem& aSecond );
       
    67 
       
    68         /**
       
    69         * Prepares item for by match sorting
       
    70         * @since 3.2
       
    71         * @param aSearchString Given search string
       
    72         */
       
    73         void PrepareSort( const TDesC& aSearchString );
       
    74 
       
    75     private:
       
    76 
       
    77         /**
       
    78         * C++ default constructor.
       
    79         */
       
    80         CGflmFileFinderItem( const TEntry& aFSEntry );
       
    81 
       
    82         void ConstructL( const TDesC& aBasePath );
       
    83 
       
    84     private:    // Data
       
    85         TEntry iEntry;
       
    86         HBufC* iBasePath;
       
    87         TInt16 iSortValue;
       
    88     };
       
    89 
       
    90 #endif      // CGFLMFILEFINDERITEM_H
       
    91 
       
    92 // End of File