|
1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include "UT_STD.H" |
|
17 #include <s32mem.h> |
|
18 |
|
19 #define UNUSED_VAR(a) a = a |
|
20 |
|
21 const TInt KStreamDictGranularity=16; |
|
22 |
|
23 NONSHARABLE_CLASS(HDictionaryStoreBuf) : public MStreamBuf |
|
24 { |
|
25 public: |
|
26 HDictionaryStoreBuf(MStreamBuf& aBuf,CDictionaryStore& aDic,TStreamId aStreamId,TUid aUid); |
|
27 private: |
|
28 // from MStreamBuf |
|
29 void DoSynchL(); // only update the stream dic during synch |
|
30 // just delegate the rest straight through... |
|
31 void DoRelease(); |
|
32 TInt DoReadL(TAny* aPtr,TInt aMaxLength); |
|
33 TInt DoReadL(TDes8& aDes,TInt aMaxLength,TRequestStatus& aStatus); |
|
34 TStreamTransfer DoReadL(MStreamInput& anInput,TStreamTransfer aTransfer); |
|
35 void DoWriteL(const TAny* aPtr,TInt aLength); |
|
36 TInt DoWriteL(const TDesC8& aDes,TInt aMaxLength,TRequestStatus& aStatus); |
|
37 TStreamTransfer DoWriteL(MStreamOutput& anOutput,TStreamTransfer aTransfer); |
|
38 TStreamPos DoSeekL(TMark aMark,TStreamLocation aLocation,TInt anOffset); |
|
39 private: |
|
40 MStreamBuf* iRealBuf; // delegate everything to this |
|
41 CDictionaryStore* iDictionary; |
|
42 TStreamId iStreamId; // id of the actual stream in the store |
|
43 TUid iStreamUid; // Uid to be paired with the stream id in the dic |
|
44 }; |
|
45 |
|
46 NONSHARABLE_CLASS(HNullBuf) : public TMemBuf |
|
47 { |
|
48 public: |
|
49 HNullBuf(); |
|
50 private: |
|
51 void DoRelease(); |
|
52 }; |
|
53 |
|
54 //////////////////////////////////////// |
|
55 // CStreamDictionary |
|
56 //////////////////////////////////////// |
|
57 |
|
58 EXPORT_C CStreamDictionary* CStreamDictionary::NewL() |
|
59 /** Allocates, constructs and returns a pointer to a new stream dictionary. |
|
60 |
|
61 The function leaves if it cannot complete successfully. |
|
62 |
|
63 @return A pointer to the new stream dictionary object. */ |
|
64 { |
|
65 return new(ELeave) CStreamDictionary; |
|
66 } |
|
67 |
|
68 EXPORT_C CStreamDictionary* CStreamDictionary::NewLC() |
|
69 /** Allocates, constructs and returns a pointer to a new stream dictionary, putting |
|
70 the pointer onto the cleanup stack. |
|
71 |
|
72 Putting the pointer onto the cleanup stack allows the object and allocated |
|
73 resources to be cleaned up if a subsequent leave occurs. |
|
74 |
|
75 The function leaves if it cannot complete successfully. |
|
76 |
|
77 @return A pointer to the new stream dictionary object. */ |
|
78 { |
|
79 CStreamDictionary* dict=NewL(); |
|
80 CleanupStack::PushL(dict); |
|
81 return dict; |
|
82 } |
|
83 |
|
84 EXPORT_C CStreamDictionary::CStreamDictionary() |
|
85 : iArray(KStreamDictGranularity) |
|
86 {} |
|
87 |
|
88 EXPORT_C CStreamDictionary::~CStreamDictionary() |
|
89 /** Frees resources owned by the object, prior to its destruction. */ |
|
90 {} |
|
91 |
|
92 EXPORT_C void CStreamDictionary::AssignL(TUid aUid,TStreamId anId) |
|
93 /** Creates or changes an association between a UID and a stream id. |
|
94 |
|
95 If the stream dictionary already contains an entry with the same UID as aUid, |
|
96 then the associated stream id in that entry is replaced by anId. |
|
97 |
|
98 If anId has the value KNullStreamId, then the function attempts to remove |
|
99 the entry whose unique identifier matches aUid. |
|
100 |
|
101 @param aUid The UID |
|
102 @param anId The stream id. |
|
103 @see CStreamDictionary::Remove() */ |
|
104 { |
|
105 if (anId==KNullStreamId) |
|
106 { |
|
107 Remove(aUid); // default associated stream is null |
|
108 return; |
|
109 } |
|
110 // |
|
111 TEntry entry; |
|
112 entry.iUid=aUid; |
|
113 TKeyArrayFix key(_FOFF(TEntry,iUid),ECmpTUint32); |
|
114 TInt i; |
|
115 if (iArray.Find(entry,key,i)==0) |
|
116 { |
|
117 iArray[i].iId=anId; |
|
118 return; |
|
119 } |
|
120 // |
|
121 __ASSERT_DEBUG(i==iArray.Count(),User::Invariant()); |
|
122 entry.iId=anId; |
|
123 iArray.InsertL(i,entry); |
|
124 } |
|
125 |
|
126 EXPORT_C void CStreamDictionary::Remove(TUid aUid) |
|
127 /** Removes an association from the stream dictionary. |
|
128 |
|
129 The function searches the stream dictionary for an entry whose UID matches |
|
130 aUid. If a match is found, the entry is removed. If no match is found, the |
|
131 stream dictionary remains unchanged. |
|
132 |
|
133 @param aUid The UID whose matching entry is to be removed from the stream |
|
134 dictionary. */ |
|
135 { |
|
136 TEntry entry; |
|
137 entry.iUid=aUid; |
|
138 TKeyArrayFix key(_FOFF(TEntry,iUid),ECmpTUint32); |
|
139 TInt i; |
|
140 if (iArray.Find(entry,key,i)==0) |
|
141 iArray.Delete(i); |
|
142 } |
|
143 |
|
144 EXPORT_C TStreamId CStreamDictionary::At(TUid aUid) const |
|
145 /** Returns the stream id associated with the specified UID. |
|
146 |
|
147 @param aUid The UID whose associated stream id is to be returned. |
|
148 @return The stream id associated with the specified UID.KNullStreamId, if no |
|
149 entry in the stream dictionary contains the specified UID. */ |
|
150 { |
|
151 TEntry entry; |
|
152 entry.iUid=aUid; |
|
153 TKeyArrayFix key(_FOFF(TEntry,iUid),ECmpTUint32); |
|
154 TInt i; |
|
155 if (iArray.Find(entry,key,i)!=0) |
|
156 return KNullStreamId; |
|
157 // |
|
158 return iArray[i].iId; |
|
159 } |
|
160 |
|
161 EXPORT_C TBool CStreamDictionary::IsNull() const |
|
162 /** Tests whether the stream dictionary is empty. |
|
163 |
|
164 @return True, if the stream dictionary is empty. False if the stream dictionary |
|
165 contains at least one entry. */ |
|
166 { |
|
167 return iArray.Count()==0; |
|
168 } |
|
169 |
|
170 EXPORT_C void CStreamDictionary::ExternalizeL(RWriteStream& aStream) const |
|
171 /** Externalises an object of this class to a write stream. |
|
172 |
|
173 The presence of this function means that the standard templated operator<<() |
|
174 can be used to externalise objects of this class. |
|
175 |
|
176 @param aStream Stream to which the object should be externalised */ |
|
177 { |
|
178 aStream<<iArray; |
|
179 } |
|
180 |
|
181 EXPORT_C void CStreamDictionary::InternalizeL(RReadStream& aStream) |
|
182 /** Internalises an object of this class from a read stream. |
|
183 |
|
184 The presence of this function means that the standard templated operator>>() |
|
185 can be used to internalise objects of this class. |
|
186 |
|
187 Note that this function has assignment semantics. It replaces the old value |
|
188 of the object with a new value read from the read stream. |
|
189 |
|
190 @param aStream Stream from which the object should be internalised. */ |
|
191 { |
|
192 aStream>>iArray; |
|
193 } |
|
194 |
|
195 void CStreamDictionary::TEntry::ExternalizeL(RWriteStream& aStream) const |
|
196 { |
|
197 aStream<<iUid; |
|
198 aStream<<iId; |
|
199 } |
|
200 |
|
201 void CStreamDictionary::TEntry::InternalizeL(RReadStream& aStream) |
|
202 { |
|
203 aStream>>iUid; |
|
204 aStream>>iId; |
|
205 } |
|
206 |
|
207 |
|
208 //////////////////////////////////////// |
|
209 // CDictionaryStore |
|
210 //////////////////////////////////////// |
|
211 |
|
212 EXPORT_C CDictionaryStore::~CDictionaryStore() |
|
213 /** Frees resources owned by the object, prior to its destruction. */ |
|
214 { |
|
215 delete iDictionary; |
|
216 delete iStore; |
|
217 } |
|
218 |
|
219 |
|
220 EXPORT_C void CDictionaryStore::ConstructL() |
|
221 { |
|
222 iDictionary = CStreamDictionary::NewL(); |
|
223 RStoreWriteStream stream; |
|
224 iStore->SetRootL(stream.CreateLC(*iStore)); |
|
225 stream<<*iDictionary; |
|
226 stream.CommitL(); |
|
227 CleanupStack::PopAndDestroy(); // dictionary stream |
|
228 iStore->CommitL(); |
|
229 } |
|
230 |
|
231 |
|
232 EXPORT_C void CDictionaryStore::Remove(TUid aUid) |
|
233 /** Removes the stream associated with the specified UID from the dictionary store. |
|
234 |
|
235 If there is no stream associated with the specified UID, then the dictionary |
|
236 store remains unchanged. |
|
237 |
|
238 The function cannot leave; it returns whether or not it is succesful. |
|
239 |
|
240 @param aUid The UID whose associated stream is to be removed from the dictionary |
|
241 store. */ |
|
242 { |
|
243 TRAPD(ignore,RemoveL(aUid)); |
|
244 UNUSED_VAR(ignore); |
|
245 } |
|
246 |
|
247 |
|
248 EXPORT_C void CDictionaryStore::RemoveL(TUid aUid) |
|
249 /** Removes the stream associated with the specified UID from the dictionary store |
|
250 and leaves if unsuccessful. |
|
251 |
|
252 If there is no stream associated with the specified UID, then the dictionary |
|
253 store remains unchanged. |
|
254 |
|
255 @param aUid The UID whose associated stream is to be removed from the dictionary |
|
256 store. */ |
|
257 { |
|
258 TStreamId id = DictionaryL()->At(aUid); |
|
259 if (id!=KNullStreamId) |
|
260 { |
|
261 DictionaryL()->Remove(aUid); |
|
262 iStore->DeleteL(id); |
|
263 iDictionaryHasChanged=ETrue; |
|
264 } |
|
265 } |
|
266 |
|
267 |
|
268 EXPORT_C TInt CDictionaryStore::Commit() |
|
269 /** Commits changes. |
|
270 |
|
271 It establishes a new commit point and then compacts the dictionary store. |
|
272 Typically, this is done after changes to new or existing streams are complete |
|
273 and the streams themselves have been committed. |
|
274 |
|
275 Establishing a new commit point makes changes to the store permanent. Until |
|
276 such changes are committed, they can be rolled back, effectively causing the |
|
277 store to revert back to its state before the changes were made. |
|
278 |
|
279 This ensures that persistent data moves from one consistent state to another |
|
280 and guarantees the integrity of persistent store data in the event of failures. |
|
281 In particular, if a process terminates or a media failure occurs, the store |
|
282 reverts automatically to its state at the last successful commit point. |
|
283 |
|
284 @return KErrNone if successful, otherwise another of the system-wide error |
|
285 codes. */ |
|
286 { |
|
287 TRAPD(ret,CommitL()); |
|
288 return ret; |
|
289 } |
|
290 |
|
291 |
|
292 EXPORT_C void CDictionaryStore::CommitL() |
|
293 /** Commits changes and leaves if unsuccessful. |
|
294 |
|
295 @see CDictionaryStore::Commit() */ |
|
296 { |
|
297 if (iDictionaryHasChanged) |
|
298 { |
|
299 // rewrite the root stream |
|
300 RStoreWriteStream stream; |
|
301 stream.ReplaceLC(*iStore,iStore->Root()); |
|
302 stream<< *DictionaryL(); |
|
303 stream.CommitL(); |
|
304 CleanupStack::PopAndDestroy(); // dictionary stream |
|
305 } |
|
306 // commit the store |
|
307 iStore->CommitL(); |
|
308 // compact the store, ignoring any failure (commit was good) |
|
309 TRAPD( |
|
310 ignore, |
|
311 { |
|
312 if (iStore->ReclaimL() >= KDictionaryCommitThreshold) |
|
313 { |
|
314 iStore->CompactL(); |
|
315 } |
|
316 iStore->CommitL(); |
|
317 } ); |
|
318 UNUSED_VAR(ignore); |
|
319 } |
|
320 |
|
321 |
|
322 EXPORT_C void CDictionaryStore::Revert() |
|
323 /** Rolls the dictionary store back to its state at the last commit point. |
|
324 |
|
325 A commit point is set using the Commit() or CommitL() functions. |
|
326 |
|
327 The function returns, whether or not it completes successfully. |
|
328 |
|
329 @see CDictionaryStore::Commit() |
|
330 @see CDictionaryStore::CommitL() */ |
|
331 { |
|
332 TRAPD(ignore,RevertL()); |
|
333 UNUSED_VAR(ignore); |
|
334 } |
|
335 |
|
336 |
|
337 EXPORT_C void CDictionaryStore::RevertL() |
|
338 /** Rolls the dictionary store back to its state at the last commit point and leaves |
|
339 if unsuccessful. |
|
340 |
|
341 A commit point is set using the Commit() or CommitL() functions. |
|
342 |
|
343 @see CDictionaryStore::Commit() |
|
344 @see CDictionaryStore::CommitL() */ |
|
345 { |
|
346 delete iDictionary; |
|
347 iDictionary = NULL; |
|
348 iDictionaryHasChanged = EFalse; |
|
349 iStore->RevertL(); |
|
350 } |
|
351 |
|
352 |
|
353 CStreamDictionary* CDictionaryStore::DictionaryL() const |
|
354 // Returns the handle of the stream dictionary, internalizing it first if necessary |
|
355 { |
|
356 if (!iDictionary) |
|
357 { |
|
358 // create a temporary dictionary |
|
359 CStreamDictionary* dictionary = CStreamDictionary::NewLC(); |
|
360 // stream into the dictionary |
|
361 RStoreReadStream root; |
|
362 root.OpenLC(*iStore,iStore->Root()); |
|
363 root>> *dictionary; |
|
364 root.Close(); |
|
365 CleanupStack::PopAndDestroy(); // root |
|
366 // set iDictionary |
|
367 MUTABLE_CAST(CStreamDictionary*&,iDictionary) = dictionary; |
|
368 CleanupStack::Pop(); // dictionary |
|
369 } |
|
370 return iDictionary; |
|
371 } |
|
372 |
|
373 |
|
374 EXPORT_C TBool CDictionaryStore::IsNullL() const |
|
375 /** Tests whether the dictionary stores stream dictionary is empty. |
|
376 |
|
377 @return True, if the stream dictionary is empty. False, if the stream dictionary |
|
378 contains at least one entry. |
|
379 @see CStreamDictionary */ |
|
380 { |
|
381 return DictionaryL()->IsNull(); |
|
382 } |
|
383 |
|
384 |
|
385 EXPORT_C TBool CDictionaryStore::IsPresentL(TUid aUid) const |
|
386 /** Tests whether the specified UID has an associated stream within this dictionary |
|
387 store. |
|
388 |
|
389 @param aUid The UID. |
|
390 @return True, if there is a stream associated with the specified UID in the |
|
391 dictionary store; false otherwise. |
|
392 @see CStreamDictionary */ |
|
393 { |
|
394 return DictionaryL()->At(aUid)!=KNullStreamId; |
|
395 } |
|
396 |
|
397 |
|
398 MStreamBuf* CDictionaryStore::GetSourceL(TUid aUid) const |
|
399 // Opens the stream matching aUid and returns its source. |
|
400 // If no stream matches aUid an empty stream buf is returned |
|
401 // Ownership of the source is transfered to the caller. |
|
402 { |
|
403 // get the id of the stream |
|
404 TStreamId id = DictionaryL()->At(aUid); |
|
405 // open the stream if it exists, otherwise open a dummy empty stream |
|
406 if (id==KNullStreamId) |
|
407 return (new(ELeave) HNullBuf); |
|
408 else |
|
409 { |
|
410 // open the stream and steal its source |
|
411 RStoreReadStream stream; |
|
412 stream.OpenL(*iStore,id); |
|
413 return stream.Source(); |
|
414 } |
|
415 } |
|
416 |
|
417 |
|
418 MStreamBuf* CDictionaryStore::GetSinkL(TUid aUid) |
|
419 // If a stream matches aUid it is replaced ad its sink returned |
|
420 // If no stream matches aUid a new stream is created and its sink returned |
|
421 // Ownership of the sink is transfered to the caller. |
|
422 { |
|
423 // get the id of the stream |
|
424 TStreamId id = DictionaryL()->At(aUid); |
|
425 RStoreWriteStream stream; |
|
426 if (id!=KNullStreamId) |
|
427 //replace the stream |
|
428 stream.ReplaceLC(*iStore,id); |
|
429 else |
|
430 // create a new stream |
|
431 id = stream.CreateLC(*iStore); |
|
432 // create a dictionary store buffer to hold the incoming data |
|
433 MStreamBuf* buf = new(ELeave) HDictionaryStoreBuf(*stream.Sink(),*this,id,aUid); |
|
434 CleanupStack::Pop(); // stream; |
|
435 return buf; |
|
436 } |
|
437 |
|
438 |
|
439 ////////////////////////////////////////////// |
|
440 // RDictionaryReadStream |
|
441 ////////////////////////////////////////////// |
|
442 |
|
443 EXPORT_C void RDictionaryReadStream::OpenL(const CDictionaryStore& aDictStore,TUid aUid) |
|
444 // Open the stream if it exists, otherwise open a dummy empty stream |
|
445 /** Opens the stream associated with the specified UID in the specified dictionary |
|
446 store, and prepares it for reading. |
|
447 |
|
448 @param aDictStore The dictionary store containing the stream. |
|
449 @param aUid The unique identifier associated with the stream to be read. */ |
|
450 { |
|
451 Attach(aDictStore.GetSourceL(aUid)); |
|
452 } |
|
453 |
|
454 |
|
455 EXPORT_C void RDictionaryReadStream::OpenLC(const CDictionaryStore& aDictStore,TUid aUid) |
|
456 /** Opens the stream associated with the specified UID in the specified dictionary |
|
457 store, prepares it for reading, and puts a a cleanup item onto the cleanup |
|
458 stack.. |
|
459 |
|
460 Placing a cleanup item on the cleanup stack allows allocated resources to |
|
461 be cleaned up if a subsequent leave occurs. |
|
462 |
|
463 @param aDictStore The dictionary store containing the stream. |
|
464 @param aUid The unique identifier associated with the stream to be read. */ |
|
465 { |
|
466 OpenL(aDictStore,aUid); |
|
467 PushL(); |
|
468 } |
|
469 |
|
470 |
|
471 ////////////////////////////////////////////// |
|
472 // RDictionaryWriteStream |
|
473 ////////////////////////////////////////////// |
|
474 |
|
475 EXPORT_C void RDictionaryWriteStream::AssignL(CDictionaryStore& aDictStore,TUid aUid) |
|
476 // Replace the stream if it exists, otherwise create a new one |
|
477 /** Prepares a stream in the specified dictionary store for writing. |
|
478 |
|
479 If no stream is associated with the specified UID, then a new stream is created |
|
480 and an association is made between the resulting stream id and the specified |
|
481 UID. If a stream is currently associated with the specified UID, then this |
|
482 existing stream is prepared for replacement. |
|
483 |
|
484 @param aDictStore The dictionary store which contains the new or replacement |
|
485 stream. |
|
486 @param aUid The UID associated with the stream. |
|
487 @see RWriteStream::Release() */ |
|
488 { |
|
489 Attach(aDictStore.GetSinkL(aUid)); |
|
490 } |
|
491 |
|
492 |
|
493 EXPORT_C void RDictionaryWriteStream::AssignLC(CDictionaryStore& aDictStore,TUid aUid) |
|
494 /** Prepares a stream in the specified dictionary store for writing, and places |
|
495 a cleanup item for this RDictionaryWriteStream object onto the cleanup stack. |
|
496 |
|
497 If no stream is associated with the specified UID, then a new stream is created |
|
498 and an association is made between the resulting stream id and the specified |
|
499 UID. If a stream is currently associated with the specified UID, then this |
|
500 existing stream is prepared for replacement. |
|
501 |
|
502 Placing a cleanup item onto the cleanup stack allows allocated resources to |
|
503 be cleaned up if a subsequent leave occurs. |
|
504 |
|
505 @param aDictStore The dictionary store which contains the new or replacement |
|
506 stream. |
|
507 @param aUid The UID associated with the stream. */ |
|
508 { |
|
509 AssignL(aDictStore,aUid); |
|
510 PushL(); |
|
511 } |
|
512 |
|
513 |
|
514 ////////////////////////////////////////////// |
|
515 // HDictionaryStoreBuf |
|
516 ////////////////////////////////////////////// |
|
517 |
|
518 HDictionaryStoreBuf::HDictionaryStoreBuf(MStreamBuf& aBuf,CDictionaryStore& aDic,TStreamId aStreamId,TUid aUid) |
|
519 :iRealBuf(&aBuf), |
|
520 iDictionary(&aDic), |
|
521 iStreamId(aStreamId), |
|
522 iStreamUid(aUid) |
|
523 {} |
|
524 |
|
525 |
|
526 void HDictionaryStoreBuf::DoSynchL() |
|
527 // only update the stream dic during synch - this is when the stream gets added to the store |
|
528 { |
|
529 CStreamDictionary& dic = *iDictionary->DictionaryL(); |
|
530 TBool newEntry = (dic.At(iStreamUid)==KNullStreamId); |
|
531 if (iRealBuf->SizeL()>0) |
|
532 { |
|
533 dic.AssignL(iStreamUid,iStreamId); |
|
534 TInt ret = iRealBuf->Synch(); |
|
535 if (ret!=KErrNone) |
|
536 {// attempt rollback |
|
537 if (newEntry) |
|
538 dic.Remove(iStreamUid); |
|
539 __LEAVE(ret); |
|
540 } |
|
541 if (newEntry) |
|
542 iDictionary->iDictionaryHasChanged=ETrue; |
|
543 } |
|
544 else |
|
545 { |
|
546 iRealBuf->SynchL(); |
|
547 iDictionary->iStore->Delete(iStreamId); |
|
548 iDictionary->Remove(iStreamUid); |
|
549 } |
|
550 } |
|
551 |
|
552 |
|
553 void HDictionaryStoreBuf::DoRelease() |
|
554 { |
|
555 iRealBuf->Release(); |
|
556 delete this; |
|
557 } |
|
558 |
|
559 |
|
560 TInt HDictionaryStoreBuf::DoReadL(TAny* aPtr,TInt aMaxLength) |
|
561 { |
|
562 return iRealBuf->ReadL(aPtr,aMaxLength); |
|
563 } |
|
564 |
|
565 |
|
566 TInt HDictionaryStoreBuf::DoReadL(TDes8& aDes,TInt aMaxLength,TRequestStatus& aStatus) |
|
567 { |
|
568 return iRealBuf->ReadL(aDes,aMaxLength,aStatus); |
|
569 } |
|
570 |
|
571 |
|
572 TStreamTransfer HDictionaryStoreBuf::DoReadL(MStreamInput& anInput,TStreamTransfer aTransfer) |
|
573 { |
|
574 return iRealBuf->ReadL(anInput,aTransfer); |
|
575 } |
|
576 |
|
577 |
|
578 void HDictionaryStoreBuf::DoWriteL(const TAny* aPtr,TInt aLength) |
|
579 { |
|
580 iRealBuf->WriteL(aPtr,aLength); |
|
581 } |
|
582 |
|
583 |
|
584 TInt HDictionaryStoreBuf::DoWriteL(const TDesC8& aDes,TInt aMaxLength,TRequestStatus& aStatus) |
|
585 { |
|
586 return iRealBuf->WriteL(aDes,aMaxLength,aStatus); |
|
587 } |
|
588 |
|
589 |
|
590 TStreamTransfer HDictionaryStoreBuf::DoWriteL(MStreamOutput& anOutput,TStreamTransfer aTransfer) |
|
591 { |
|
592 return iRealBuf->WriteL(anOutput,aTransfer); |
|
593 } |
|
594 |
|
595 |
|
596 TStreamPos HDictionaryStoreBuf::DoSeekL(TMark aMark,TStreamLocation aLocation,TInt anOffset) |
|
597 { |
|
598 return iRealBuf->SeekL(aMark,aLocation,anOffset); |
|
599 } |
|
600 |
|
601 // class HNullBuf |
|
602 |
|
603 HNullBuf::HNullBuf() |
|
604 { |
|
605 Set(0,0,ERead); |
|
606 } |
|
607 |
|
608 void HNullBuf::DoRelease() |
|
609 { |
|
610 delete this; |
|
611 } |
|
612 |