|
1 /* |
|
2 * Copyright (c) 2007-2008 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: Storage to save smiley information |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CIMCVAPPSMILEYINFORMATION_H |
|
20 #define CIMCVAPPSMILEYINFORMATION_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 |
|
26 /** |
|
27 * Smiley storage for saving information of one smiley and it's |
|
28 * position inside a text. |
|
29 * |
|
30 * @lib imcvuiapp.exe |
|
31 */ |
|
32 class CIMCVAppSmileyInformation : public CBase |
|
33 { |
|
34 |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Symbian constructor |
|
39 */ |
|
40 static CIMCVAppSmileyInformation* NewL(); |
|
41 |
|
42 /** |
|
43 * Destructor |
|
44 */ |
|
45 virtual ~CIMCVAppSmileyInformation(); |
|
46 |
|
47 /** |
|
48 * Get position of smiley inside a text |
|
49 * |
|
50 * @since S60 v3.0 |
|
51 * @return position of smiley |
|
52 */ |
|
53 TInt Position() const; |
|
54 |
|
55 /** |
|
56 * Set position of smiley inside a text |
|
57 * |
|
58 * @since S60 v3.0 |
|
59 * @param aPosition Position of smiley |
|
60 */ |
|
61 void SetPosition( TInt aPosition ); |
|
62 |
|
63 /** |
|
64 * Get the icon index of this smiley. |
|
65 * |
|
66 * @since S60 v3.0 |
|
67 * @return Index to a correct icon. |
|
68 */ |
|
69 TInt Index() const; |
|
70 |
|
71 /** |
|
72 * Set icon index of this smiley, |
|
73 * |
|
74 * @since S60 v3.0 |
|
75 * @param aIndex index to an icon |
|
76 */ |
|
77 void SetIndex( TInt aIndex ); |
|
78 |
|
79 /** |
|
80 * Get smiley string |
|
81 * |
|
82 * @since S60 v3.0 |
|
83 * @return smiley string |
|
84 */ |
|
85 const TDesC& SmileyString() const; |
|
86 |
|
87 /** |
|
88 * Set smiley string. |
|
89 * |
|
90 * @since S60 v3.0 |
|
91 * @param aSmiley smiley string |
|
92 */ |
|
93 void SetSmileyStringL( const TDesC& aSmiley ); |
|
94 |
|
95 /** |
|
96 * Flag which tells that this smiley is either in icon format (ETrue) or in |
|
97 * text format (EFalse) |
|
98 * |
|
99 * @since S60 v3.0 |
|
100 * @return Smiley is icon(ETrue) or text(EFalse) |
|
101 */ |
|
102 TBool IsIcon() const; |
|
103 |
|
104 /** |
|
105 * Set format for this smiley. |
|
106 * |
|
107 * @since S60 v3.0 |
|
108 * @param aIsIcon ETrue if this is icon, EFalse if this is text |
|
109 */ |
|
110 void SetIcon( TBool aIsIcon ); |
|
111 |
|
112 |
|
113 private: |
|
114 |
|
115 /** |
|
116 * C++ constructor |
|
117 */ |
|
118 CIMCVAppSmileyInformation(); |
|
119 |
|
120 |
|
121 private: // data |
|
122 |
|
123 /** |
|
124 * Position of this smiley in text. |
|
125 */ |
|
126 TInt iPosition; |
|
127 |
|
128 /** |
|
129 * Index of smiley in icon array |
|
130 */ |
|
131 TInt iIndex; |
|
132 |
|
133 /** |
|
134 * Text that contains one smiley e.g. ":-)" |
|
135 * Own |
|
136 */ |
|
137 HBufC* iSmileyString; |
|
138 |
|
139 /** |
|
140 * Is smiley in icon(ETrue) or string(EFalse) format. |
|
141 */ |
|
142 TBool iIsIcon; |
|
143 |
|
144 }; |
|
145 |
|
146 #endif // CIMCVAPPSMILEYINFORMATION_H |