emailuis/uicomponents/inc/fssmileydictionary.h
changeset 0 8466d47a6819
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     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:  FsSmileyDictionary's implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_FSSMILEYDICTIONARY_H
       
    20 #define C_FSSMILEYDICTIONARY_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class TSmiley
       
    25     {
       
    26     public:
       
    27         TSmiley():iText(NULL)
       
    28             {
       
    29             
       
    30             }
       
    31             
       
    32         ~TSmiley()
       
    33             {
       
    34             delete iText;
       
    35             }
       
    36     public:
       
    37         HBufC* iText;
       
    38         TFileName iFileName;
       
    39     };
       
    40 
       
    41 class CFsSmileyDictionary: public CBase
       
    42     {   
       
    43     public:    
       
    44         /**
       
    45         * NewL();
       
    46         * 
       
    47         * 
       
    48         */                         
       
    49         IMPORT_C static CFsSmileyDictionary* NewL();
       
    50         
       
    51         /**
       
    52         * ~CFsSmileyDictionary();
       
    53         * 
       
    54         * 
       
    55         */
       
    56         IMPORT_C ~CFsSmileyDictionary();
       
    57         
       
    58         /**
       
    59         * AddNewSmileyL(TSmiley* aSmiley);
       
    60         * 
       
    61         * @param aSmiley
       
    62         */
       
    63         void AddNewSmileyL(TSmiley* aSmiley);
       
    64         
       
    65         /**
       
    66         * AddNewSmileyL(const TDesC& aText, TFileName aFileName);
       
    67         * 
       
    68         * @param aText
       
    69         * @param aFileNamext
       
    70         */
       
    71         IMPORT_C void AddNewSmileyL(const TDesC& aText, TFileName aFileName);
       
    72         
       
    73         /**
       
    74         * CheckDictionaryL(TBuf<1> someCharacter);
       
    75         * 
       
    76         * @param someCharacter
       
    77         */
       
    78         TBool CheckDictionaryL(TBuf<1> someCharacter);
       
    79         
       
    80         /**
       
    81         * ResetL();
       
    82         * 
       
    83         * 
       
    84         */
       
    85         void ResetL();
       
    86         
       
    87         /**
       
    88         * IsSmiley();
       
    89         * 
       
    90         * 
       
    91         */
       
    92         TBool IsSmiley();
       
    93         
       
    94         /**
       
    95         * GetSmileyIndex();
       
    96         * 
       
    97         * 
       
    98         */
       
    99         TInt GetSmileyIndex();
       
   100         
       
   101         /**
       
   102         * GetSmileyLength(TInt aSmileyIndex);
       
   103         * 
       
   104         * @param aSmileyIndex
       
   105         */
       
   106         TInt GetSmileyLength(TInt aSmileyIndex);
       
   107         
       
   108         /**
       
   109         * GetSmileyFileName(TInt aSmileyIndex);
       
   110         * 
       
   111         * @param aSmileyIndex
       
   112         */
       
   113         TFileName GetSmileyFileName(TInt aSmileyIndex);
       
   114     
       
   115     private:
       
   116         /**
       
   117         * ConstructL();
       
   118         * 
       
   119         * 
       
   120         */
       
   121         void ConstructL();
       
   122         
       
   123         /**
       
   124         * CFsSmileyDictionary();
       
   125         * 
       
   126         * 
       
   127         */
       
   128         CFsSmileyDictionary();
       
   129     
       
   130     private:
       
   131         RArray<TSmiley*> iSmileysDictionary;
       
   132         TInt iLongestSmiley;
       
   133         TInt* iResults;
       
   134         TInt iSizeOfResultsTable;
       
   135         TInt iEndIndex;
       
   136         TInt iPositionOfCheckingLetter;
       
   137         TBool iSmileyFound;
       
   138         TInt iSmileyIndex;
       
   139     };
       
   140     
       
   141 #endif //C_FSSMILEYDICTIONARY_H
       
   142 
       
   143