uiutils/Findutil/inc/FindUtilKorean.h
changeset 0 2f259fa3e83a
child 18 fcdfafb36fe7
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 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:         Korean Find Utilities header file. 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __FINDUTILKOREAN__
       
    21 #define __FINDUTILKOREAN__
       
    22 
       
    23 #include <e32std.h>
       
    24 
       
    25 #include "FindUtilBase.h"
       
    26 
       
    27 /**
       
    28  *  CFindUtilKorean utils class
       
    29  *
       
    30  *  This class is Korean find utils class. It handle Korean variant find
       
    31  *  in PhoneBook, LandMark, Clock and so on.
       
    32  *
       
    33  *  @lib FindUtil.dll
       
    34  *  @since S60 v3.2
       
    35  */
       
    36 NONSHARABLE_CLASS(CFindUtilKorean)
       
    37     {
       
    38     public:  // Constructors and destructor
       
    39         
       
    40         /**
       
    41          * Symbian constructor
       
    42          *
       
    43          * @since S60 v3.2
       
    44          * @return Pointer to created CFindUtilKorean object
       
    45          */    
       
    46         static CFindUtilKorean* NewL();
       
    47 
       
    48         /**
       
    49          * Destructor
       
    50          *
       
    51          * @since S60 v3.2
       
    52          */
       
    53         virtual ~CFindUtilKorean();
       
    54 
       
    55     public:
       
    56         TBool IsKoreanLanguage( const TDesC& aDes );   
       
    57  
       
    58     private:
       
    59     
       
    60         CFindUtilKorean();
       
    61 
       
    62         void ConstructL();
       
    63     
       
    64         /**
       
    65          * Compares two strings against others.
       
    66          *
       
    67          * @since S60 v3.2
       
    68          * @param aItemString for string to being compared
       
    69          * @param aSearchText for text to be used in searching
       
    70          * @return ETrue if match found, EFalse otherwise
       
    71          */    
       
    72         TBool IsFindMatchL( 
       
    73             const TDesC& aItemString, 
       
    74             const TDesC& aSearchText );
       
    75         
       
    76         /**
       
    77          * Decomposes given string to plain jamos.
       
    78          *
       
    79          * @since S60 v3.2
       
    80          * @param aString for string where decomposition is made
       
    81          * @param aDecomposedString for plain jamos
       
    82          */    
       
    83         void DecomposeToPlainJamos( 
       
    84             const TDesC& aString,
       
    85             HBufC* aDecomposedString );
       
    86         
       
    87         /**
       
    88          * Decomposes hangul syllables to single jamos.
       
    89          *
       
    90          * @since S60 v3.2
       
    91          * @param aChar for char to be decomposed
       
    92          * @param aDecomposedString for chars where jamos are gathered
       
    93          */    
       
    94         void Decompose( TChar aChar, TDes& aDecomposedString );
       
    95     
       
    96         /**
       
    97          * Checks that is given character hangul syllable or not.
       
    98          *
       
    99          * @since S60 v3.2
       
   100          * @param aChar for char to be checked
       
   101          * @return ETrue if given input is hangul syllable, EFalse otherwise
       
   102          */    
       
   103         TBool IsHangulSyllable( TChar aChar );
       
   104     
       
   105         /**
       
   106          * Checks that is given character word separator or not.
       
   107          *
       
   108          * @since S60 v3.2
       
   109          * @param aChar for char to be checked
       
   110          * @return ETrue if given character is word separator, EFalse otherwise
       
   111          */    
       
   112         TBool IsFindWordSeparator( TChar aChar );
       
   113      
       
   114        /**
       
   115          * Checks that is given character hangul compatibility jamo or not.
       
   116          *
       
   117          * @since S60 v3.2
       
   118          * @param aChar for char to be checked
       
   119          * @return ETrue if given input is hangul syllable, EFalse otherwise
       
   120          */    
       
   121         TBool IsHangulCompatibilityJamo( TChar aChar );
       
   122 
       
   123     public: 
       
   124         /**
       
   125          *
       
   126          * @since 3.2
       
   127          * @param aContactsField is a contact field string.
       
   128          * @param aWord is a search string.
       
   129          * @return If aWord has been matched with aContactsField, 
       
   130          *         ETrue is returned.
       
   131          */
       
   132         TBool Match( const TDesC& aContactsField, const TDesC& aWord );
       
   133 
       
   134         /**
       
   135          *
       
   136          * @since 3.2
       
   137          * @param aItemString is a Contact field string
       
   138          * @param aSearchText is a search string
       
   139          * @return If aSearchText has been found in aItemString, 
       
   140          *         ETrue is returned.
       
   141          */
       
   142         TBool MatchRefineL( 
       
   143             const TDesC& aItemString, 
       
   144             const TDesC &aSearchText );
       
   145 
       
   146         /**
       
   147          *
       
   148          * @since 3.2
       
   149          * @param aWord 
       
   150          * @return ETrue is returned always.
       
   151          */
       
   152         TBool IsWordValidForMatching(const TDesC& aWord);
       
   153         
       
   154          /**
       
   155          * @since 5.0
       
   156          * @param aItemString is a field string
       
   157          * @param aSearchText is a search string
       
   158          * @param aNextChars is a reference to buffer where next possible characters are saved. 
       
   159          *        The HBufC buffer may be re-allocated by this method. 
       
   160          *        In that case the pointer reference is modified to point to the re-allocated object.                              
       
   161          * @return If aSearchText has been found in aItemString, 
       
   162          *         ETrue is returned.
       
   163          * NOT IMPLMENTED
       
   164          */
       
   165         TBool MatchAdaptiveRefineL( const TDesC& aItemString, 
       
   166         							const TDesC& aSearchText, 
       
   167         							HBufC*& aNextChars);
       
   168 
       
   169     };
       
   170 
       
   171 #endif // __FINDUTILKOREAN__
       
   172 
       
   173 // End of File