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