|
1 /* |
|
2 * Copyright (c) 2004 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 * Implementation of class HFavouritesSrvStream |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 |
|
23 #include "FavouritesSrvStream.h" |
|
24 #include "FavouritesBuf.h" |
|
25 |
|
26 // ================= MEMBER FUNCTIONS ======================= |
|
27 |
|
28 // --------------------------------------------------------- |
|
29 // HFavouritesSrvStream::ReadL() |
|
30 // --------------------------------------------------------- |
|
31 // |
|
32 TInt HFavouritesSrvStream::ReadL( const RMessage2& aMessage ) |
|
33 { |
|
34 TUint8 buf[KFavouritesStreamBufSize]; |
|
35 TInt len = iHost.ReadL( buf, KFavouritesStreamBufSize ); |
|
36 if ( len ) |
|
37 { |
|
38 aMessage.WriteL( 0, TPtrC8( buf, len ) ); |
|
39 } |
|
40 return len; |
|
41 } |
|
42 |
|
43 // --------------------------------------------------------- |
|
44 // HFavouritesSrvStream::WriteL() |
|
45 // --------------------------------------------------------- |
|
46 // |
|
47 void HFavouritesSrvStream::WriteL( const RMessage2& aMessage ) |
|
48 { |
|
49 TBuf8<KFavouritesStreamBufSize> buf; |
|
50 aMessage.ReadL( 0, buf ); |
|
51 iHost.WriteL( buf.Ptr(), buf.Size() ); |
|
52 } |
|
53 |
|
54 // End of File |