diff -r 000000000000 -r 8466d47a6819 emailuis/uicomponents/inc/fssmileydictionary.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emailuis/uicomponents/inc/fssmileydictionary.h Thu Dec 17 08:39:21 2009 +0200 @@ -0,0 +1,143 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: FsSmileyDictionary's implementation +* +*/ + + +#ifndef C_FSSMILEYDICTIONARY_H +#define C_FSSMILEYDICTIONARY_H + +#include + +class TSmiley + { + public: + TSmiley():iText(NULL) + { + + } + + ~TSmiley() + { + delete iText; + } + public: + HBufC* iText; + TFileName iFileName; + }; + +class CFsSmileyDictionary: public CBase + { + public: + /** + * NewL(); + * + * + */ + IMPORT_C static CFsSmileyDictionary* NewL(); + + /** + * ~CFsSmileyDictionary(); + * + * + */ + IMPORT_C ~CFsSmileyDictionary(); + + /** + * AddNewSmileyL(TSmiley* aSmiley); + * + * @param aSmiley + */ + void AddNewSmileyL(TSmiley* aSmiley); + + /** + * AddNewSmileyL(const TDesC& aText, TFileName aFileName); + * + * @param aText + * @param aFileNamext + */ + IMPORT_C void AddNewSmileyL(const TDesC& aText, TFileName aFileName); + + /** + * CheckDictionaryL(TBuf<1> someCharacter); + * + * @param someCharacter + */ + TBool CheckDictionaryL(TBuf<1> someCharacter); + + /** + * ResetL(); + * + * + */ + void ResetL(); + + /** + * IsSmiley(); + * + * + */ + TBool IsSmiley(); + + /** + * GetSmileyIndex(); + * + * + */ + TInt GetSmileyIndex(); + + /** + * GetSmileyLength(TInt aSmileyIndex); + * + * @param aSmileyIndex + */ + TInt GetSmileyLength(TInt aSmileyIndex); + + /** + * GetSmileyFileName(TInt aSmileyIndex); + * + * @param aSmileyIndex + */ + TFileName GetSmileyFileName(TInt aSmileyIndex); + + private: + /** + * ConstructL(); + * + * + */ + void ConstructL(); + + /** + * CFsSmileyDictionary(); + * + * + */ + CFsSmileyDictionary(); + + private: + RArray iSmileysDictionary; + TInt iLongestSmiley; + TInt* iResults; + TInt iSizeOfResultsTable; + TInt iEndIndex; + TInt iPositionOfCheckingLetter; + TBool iSmileyFound; + TInt iSmileyIndex; + }; + +#endif //C_FSSMILEYDICTIONARY_H + +