85
|
1 |
/*
|
|
2 |
* Copyright (c) 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: ?Description
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include <s32mem.h>
|
|
19 |
#include "calocalizationentry.h"
|
|
20 |
|
|
21 |
// ======== MEMBER FUNCTIONS ========
|
|
22 |
|
|
23 |
// ---------------------------------------------------------------------------
|
|
24 |
//
|
|
25 |
// ---------------------------------------------------------------------------
|
|
26 |
//
|
|
27 |
|
|
28 |
CCaLocalizationEntry::~CCaLocalizationEntry( )
|
|
29 |
{
|
94
|
30 |
iTableName.Close();
|
|
31 |
iAttribName.Close();
|
|
32 |
iStringId.Close();
|
|
33 |
iLocalName.Close();
|
|
34 |
iQmFilename.Close();
|
85
|
35 |
}
|
|
36 |
|
|
37 |
// ---------------------------------------------------------------------------
|
|
38 |
//
|
|
39 |
// ---------------------------------------------------------------------------
|
|
40 |
//
|
|
41 |
EXPORT_C CCaLocalizationEntry* CCaLocalizationEntry::NewL( )
|
|
42 |
{
|
|
43 |
CCaLocalizationEntry* loc = CCaLocalizationEntry::NewLC( );
|
|
44 |
CleanupStack::Pop( loc );
|
|
45 |
return loc;
|
|
46 |
}
|
|
47 |
|
|
48 |
// ---------------------------------------------------------------------------
|
|
49 |
//
|
|
50 |
// ---------------------------------------------------------------------------
|
|
51 |
//
|
|
52 |
EXPORT_C CCaLocalizationEntry* CCaLocalizationEntry::NewLC( )
|
|
53 |
{
|
|
54 |
CCaLocalizationEntry* self = new ( ELeave ) CCaLocalizationEntry( );
|
|
55 |
CleanupStack::PushL( self );
|
|
56 |
self->ConstructL( );
|
|
57 |
return self;
|
|
58 |
}
|
|
59 |
|
|
60 |
/*// ---------------------------------------------------------------------------
|
|
61 |
//
|
|
62 |
// ---------------------------------------------------------------------------
|
|
63 |
//
|
|
64 |
EXPORT_C void CCaLocalizationEntry::ExternalizeL( RWriteStream& aStream ) const
|
|
65 |
{
|
|
66 |
aStream.WriteInt32L( iId );
|
|
67 |
aStream.WriteInt32L( iRowId );
|
|
68 |
aStream.WriteUint32L( iTableName.Length() );
|
|
69 |
aStream.WriteL( iTableName, iTableName.Length() );
|
|
70 |
aStream.WriteUint32L( iAttribName.Length() );
|
|
71 |
aStream.WriteL( iAttribName, iAttribName.Length() );
|
|
72 |
aStream.WriteUint32L( iStringId.Length() );
|
|
73 |
aStream.WriteL( iStringId, iStringId.Length() );
|
|
74 |
aStream.CommitL();
|
|
75 |
}
|
|
76 |
|
|
77 |
// ---------------------------------------------------------------------------
|
|
78 |
//
|
|
79 |
// ---------------------------------------------------------------------------
|
|
80 |
//
|
|
81 |
EXPORT_C void CCaLocalizationEntry::InternalizeL( RReadStream& aStream )
|
|
82 |
{
|
|
83 |
iId = aStream.ReadInt32L();
|
|
84 |
iRowId = aStream.ReadInt32L();
|
|
85 |
|
|
86 |
TInt length = aStream.ReadUint32L();
|
|
87 |
iTableName.Close();
|
|
88 |
iTableName.CreateL( iTableName );
|
|
89 |
aStream.ReadL( iTableName, length );
|
|
90 |
|
|
91 |
length = aStream.ReadUint32L();
|
|
92 |
iAttribName.Close();
|
|
93 |
iAttribName.CreateL( iAttribName );
|
|
94 |
aStream.ReadL( iAttribName, length );
|
|
95 |
|
|
96 |
length = aStream.ReadUint32L();
|
|
97 |
iStringId.Close();
|
|
98 |
iStringId.CreateL( iStringId );
|
|
99 |
aStream.ReadL( iStringId, length );
|
|
100 |
}*/
|
|
101 |
|
|
102 |
// ---------------------------------------------------------------------------
|
|
103 |
//
|
|
104 |
// ---------------------------------------------------------------------------
|
|
105 |
//
|
|
106 |
void CCaLocalizationEntry::ConstructL( )
|
|
107 |
{
|
|
108 |
|
|
109 |
}
|
|
110 |
|
|
111 |
// ---------------------------------------------------------------------------
|
|
112 |
//
|
|
113 |
// ---------------------------------------------------------------------------
|
|
114 |
//
|
|
115 |
CCaLocalizationEntry::CCaLocalizationEntry( )
|
|
116 |
{
|
|
117 |
|
|
118 |
}
|
|
119 |
|
|
120 |
|
|
121 |
// ---------------------------------------------------------------------------
|
|
122 |
//
|
|
123 |
// ---------------------------------------------------------------------------
|
|
124 |
//
|
|
125 |
EXPORT_C TInt CCaLocalizationEntry::GetRowId( ) const
|
|
126 |
{
|
|
127 |
return iRowId;
|
|
128 |
}
|
|
129 |
|
|
130 |
// ---------------------------------------------------------------------------
|
|
131 |
//
|
|
132 |
// ---------------------------------------------------------------------------
|
|
133 |
//
|
|
134 |
EXPORT_C TInt CCaLocalizationEntry::GetTextId( ) const
|
|
135 |
{
|
|
136 |
return iId;
|
|
137 |
}
|
|
138 |
|
|
139 |
// ---------------------------------------------------------------------------
|
|
140 |
//
|
|
141 |
// ---------------------------------------------------------------------------
|
|
142 |
//
|
|
143 |
EXPORT_C const RBuf& CCaLocalizationEntry::GetAttributeName( ) const
|
|
144 |
{
|
|
145 |
return iAttribName;
|
|
146 |
}
|
|
147 |
|
|
148 |
|
|
149 |
// ---------------------------------------------------------------------------
|
|
150 |
//
|
|
151 |
// ---------------------------------------------------------------------------
|
|
152 |
//
|
|
153 |
EXPORT_C void CCaLocalizationEntry::SetAttributeNameL( const TDesC& aAttribName )
|
|
154 |
{
|
|
155 |
iAttribName.Close( );
|
|
156 |
iAttribName.CreateL( aAttribName );
|
|
157 |
}
|
|
158 |
|
|
159 |
// ---------------------------------------------------------------------------
|
|
160 |
//
|
|
161 |
// ---------------------------------------------------------------------------
|
|
162 |
//
|
|
163 |
EXPORT_C const RBuf& CCaLocalizationEntry::GetTableName( ) const
|
|
164 |
{
|
|
165 |
return iTableName;
|
|
166 |
}
|
|
167 |
|
|
168 |
|
|
169 |
// ---------------------------------------------------------------------------
|
|
170 |
//
|
|
171 |
// ---------------------------------------------------------------------------
|
|
172 |
//
|
|
173 |
EXPORT_C void CCaLocalizationEntry::SetTableNameL( const TDesC& aTableName )
|
|
174 |
{
|
|
175 |
iTableName.Close( );
|
|
176 |
iTableName.CreateL( aTableName );
|
|
177 |
}
|
|
178 |
|
|
179 |
// ---------------------------------------------------------------------------
|
|
180 |
//
|
|
181 |
// ---------------------------------------------------------------------------
|
|
182 |
//
|
|
183 |
EXPORT_C const RBuf& CCaLocalizationEntry::GetStringId( ) const
|
|
184 |
{
|
|
185 |
return iStringId;
|
|
186 |
}
|
|
187 |
|
|
188 |
// ---------------------------------------------------------------------------
|
|
189 |
//
|
|
190 |
// ---------------------------------------------------------------------------
|
|
191 |
//
|
94
|
192 |
EXPORT_C const RBuf& CCaLocalizationEntry::GetQmFilename( ) const
|
|
193 |
{
|
|
194 |
return iQmFilename;
|
|
195 |
}
|
|
196 |
|
|
197 |
// ---------------------------------------------------------------------------
|
|
198 |
//
|
|
199 |
// ---------------------------------------------------------------------------
|
|
200 |
//
|
|
201 |
EXPORT_C void CCaLocalizationEntry::SetQmFilenameL( const TDesC& aQmFilename )
|
|
202 |
{
|
|
203 |
iQmFilename.Close( );
|
|
204 |
iQmFilename.CreateL( aQmFilename );
|
|
205 |
}
|
|
206 |
// ---------------------------------------------------------------------------
|
|
207 |
//
|
|
208 |
// ---------------------------------------------------------------------------
|
|
209 |
//
|
85
|
210 |
EXPORT_C const RBuf& CCaLocalizationEntry::GetLocalizedString( ) const
|
|
211 |
{
|
|
212 |
return iLocalName;
|
|
213 |
}
|
|
214 |
|
|
215 |
// ---------------------------------------------------------------------------
|
|
216 |
//
|
|
217 |
// ---------------------------------------------------------------------------
|
|
218 |
//
|
|
219 |
EXPORT_C void CCaLocalizationEntry::SetLocalizedStringL( const TDesC& aLocalName )
|
|
220 |
{
|
|
221 |
iLocalName.Close( );
|
|
222 |
iLocalName.CreateL( aLocalName );
|
|
223 |
}
|
|
224 |
|
|
225 |
// ---------------------------------------------------------------------------
|
|
226 |
//
|
|
227 |
// ---------------------------------------------------------------------------
|
|
228 |
//
|
|
229 |
EXPORT_C void CCaLocalizationEntry::SetStringIdL( const TDesC& aStringId )
|
|
230 |
{
|
|
231 |
iStringId.Close( );
|
|
232 |
iStringId.CreateL( aStringId );
|
|
233 |
}
|
|
234 |
// ---------------------------------------------------------------------------
|
|
235 |
//
|
|
236 |
// ---------------------------------------------------------------------------
|
|
237 |
//
|
|
238 |
EXPORT_C void CCaLocalizationEntry::SetRowId( TUint aRowId )
|
|
239 |
{
|
|
240 |
iRowId = aRowId;
|
|
241 |
}
|
|
242 |
// ---------------------------------------------------------------------------
|
|
243 |
//
|
|
244 |
// ---------------------------------------------------------------------------
|
|
245 |
//
|
|
246 |
EXPORT_C void CCaLocalizationEntry::SetTextId( TUint aId )
|
|
247 |
{
|
|
248 |
iId = aId;
|
|
249 |
}
|
|
250 |
|