2 * Copyright (c) 2003-2007 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: User dictionary interface
32 #ifndef _PTI_USERDICENTRY_H
33 #define _PTI_USERDICENTRY_H
39 const TInt KMaxUserDictionaryEntrySize = 100;
42 * An interface class for accessing items in user dictionary.
44 class MPtiUserDictionaryEntry
48 * Returns a pointer to the word held by this user dictionary entry.
51 * @return A pointer to user dictionary word.
53 virtual TPtrC Word() const = 0;
56 * Returns a pointer to latin alphabet "reading" version for this user
57 * dictionary entry. Needed for Japanese input.
60 * @return A pointer to reading word
62 virtual TPtrC Reading() const = 0; // Needed for Japanese input.
65 * Sets word for this user dictionary entry. This version also
68 * @param aWord A descriptor containing word to be set.
69 * @param aReading A descriptor containing reading text for aWord.
72 virtual void SetWord(TDesC& aWord, TDesC& aReading) = 0;
75 * Sets word for this user dictionary entry. This version
76 * sets reading text to same value as "word":
78 * @param aWord A descriptor containing word to be set.
81 virtual void SetWord(TDesC& aWord) = 0;
86 * This is implementation of MPtiUserDictionaryEntry interface
87 * for latin languages (or any other language, which needs
88 * only one component (=word) for user dictionary entry).
89 * Implementation of Reading() method is same as implementation of
92 class TPtiUserDictionaryEntry : public MPtiUserDictionaryEntry
95 inline TPtiUserDictionaryEntry();
96 inline TPtiUserDictionaryEntry(const TDesC& aWord);
98 inline TPtrC Word() const;
99 inline TPtrC Reading() const;
100 inline void SetWord(TDesC& aWord, TDesC& aReading);
101 inline void SetWord(TDesC& aWord);
104 TBuf<KMaxUserDictionaryEntrySize> iEntry;
107 #include "PtiUserDicEntry.inl"