equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2004-2009 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 the License "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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "NullStream.h" |
|
20 |
|
21 // TNullBuf //////////////////////////////////////////////////////////////////// |
|
22 |
|
23 TNullBuf::TNullBuf() : |
|
24 iBytesWritten(0) |
|
25 { |
|
26 } |
|
27 |
|
28 void TNullBuf::DoWriteL(const TAny* /*aPtr*/,TInt aLength) |
|
29 { |
|
30 iBytesWritten += aLength; |
|
31 } |
|
32 |
|
33 TUint TNullBuf::BytesWritten() |
|
34 { |
|
35 return iBytesWritten; |
|
36 } |
|
37 |
|
38 // RNullWriteStream //////////////////////////////////////////////////////////// |
|
39 |
|
40 RNullWriteStream::RNullWriteStream() |
|
41 { |
|
42 Attach(&iSink); |
|
43 } |
|
44 |
|
45 TUint RNullWriteStream::BytesWritten() |
|
46 { |
|
47 return iSink.BytesWritten(); |
|
48 } |