textinput/peninputvkbcn/ctrlinc/AknFepVkbPinyinAnalyserDb.h
changeset 0 eb1f2e154e89
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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:  Pen input related enums
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef AKNFEPVKBPINYINANALYSERDB_H
       
    19 #define AKNFEPVKBPINYINANALYSERDB_H
       
    20 
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 enum TPinyinAnalyserDbType
       
    25     {
       
    26     EPinyinAnalyserTypePinyin,
       
    27     EPinyinAnalyserTypeZhuyin
       
    28     };
       
    29 
       
    30 enum TSpellType
       
    31 {
       
    32     ESpellVowel,
       
    33     ESpellConsonant,
       
    34     ESpellSpecialConsonnant
       
    35 };
       
    36 const TUint16 KProgramSeparator = 0x002e;
       
    37 /**
       
    38  *  Composition no chars ui state
       
    39  *  It provides key event handling and internal event handling in composition no chars state
       
    40  *
       
    41  *  @lib peninputvkbcn.lib
       
    42  *  @since S60 v3.2
       
    43  */
       
    44 class CPinyinAnalyserDbFeed : public CBase
       
    45     {
       
    46 public:
       
    47 
       
    48     /**
       
    49      * Two-phased constructor.
       
    50      *
       
    51      * @since S60 v3.2
       
    52      * @param aUiStateMgr The vkb ui state manager
       
    53      * @param aContext The vkb layout context
       
    54      * @return The pointer point to CAknFepVkbPinyinAnalyser type object
       
    55      */
       
    56     static CPinyinAnalyserDbFeed* NewL( TPinyinAnalyserDbType aType );
       
    57         
       
    58     /**
       
    59      * Destructor.
       
    60      *
       
    61      * @since S60 v3.2
       
    62      */
       
    63     virtual ~CPinyinAnalyserDbFeed();
       
    64     
       
    65     /**
       
    66      * Get the Number of whole spell set.        
       
    67      *
       
    68      * @since S60 V4.0        
       
    69      */ 
       
    70     TInt GetSpellCount() const;
       
    71     
       
    72     /**
       
    73      * Get the Number of whole spell set.        
       
    74      *
       
    75      * @since S60 V4.0        
       
    76      * @param The index for the spell.
       
    77      */ 
       
    78     const TPtrC GetSpellByIndex( TInt aIndex ) const;
       
    79     
       
    80     /**
       
    81      * Get the Number of spell elements.        
       
    82      *
       
    83      * @since S60 V4.0        
       
    84      */ 
       
    85     TInt GetSpellElementCount() const;
       
    86     
       
    87     /**
       
    88      * Get the unicode number for spell element index.       
       
    89      *
       
    90      * @since S60 V4.0        
       
    91      * @param The index for the spell element.
       
    92      */ 
       
    93     TUint16 GetSpellElementByIndex( TInt aIndex ) const;
       
    94     
       
    95     TBool IsNormalElement( TUint16 aCode ) const;
       
    96     
       
    97     TSpellType GetSpellElementType( TUint16 aCode ) const;
       
    98     
       
    99     TBool IsFirstElement( TUint16 aCode ) const;
       
   100     
       
   101 private:
       
   102     CPinyinAnalyserDbFeed();
       
   103     
       
   104     void ConstructL( TPinyinAnalyserDbType aType );
       
   105     
       
   106 private:
       
   107     TPtrC iSpellBuf;
       
   108     TPtrC iSpellLenBuf;
       
   109     TUint16 iSpellElemBase;
       
   110     TUint16 iSpellElemLen;
       
   111     TPtrC iSpellTypeBuf;
       
   112     TPtrC iNoFirstElements;
       
   113     };
       
   114 
       
   115 #include "AknFepVkbPinyinAnalyserDb.inl"
       
   116 
       
   117 #endif //AKNFEPVKBPINYINANALYSERDB_H