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