|
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 #ifndef __MENUSRVSTREAM_H__ |
|
19 #define __MENUSRVSTREAM_H__ |
|
20 |
|
21 // INCLUDES |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <s32buf.h> |
|
25 |
|
26 // FORWARD DECLARATION |
|
27 |
|
28 class RMessage2; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Server side stream object. |
|
34 */ |
|
35 NONSHARABLE_CLASS( CMenuSrvStream ): public CObject |
|
36 { |
|
37 |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * Constructor. |
|
42 * @param aHost Stream buffer hosting the stream. Ownership taken. |
|
43 */ |
|
44 inline CMenuSrvStream( MStreamBuf& aHost ); |
|
45 |
|
46 /** |
|
47 * Destructor. Releases the stream buffer. |
|
48 */ |
|
49 inline virtual ~CMenuSrvStream(); |
|
50 |
|
51 /** |
|
52 * Read data from host to client. |
|
53 * @param aMessage Message. |
|
54 * @param aLength Length. |
|
55 */ |
|
56 void ReadL( const RMessage2& aMessage, TInt& aLength ); |
|
57 |
|
58 /** |
|
59 * Write data from client to host. |
|
60 * @param aMessage Message. |
|
61 */ |
|
62 void WriteL( const RMessage2& aMessage ); |
|
63 |
|
64 /** |
|
65 * Get the stream buffer. |
|
66 */ |
|
67 inline MStreamBuf& Host(); |
|
68 |
|
69 private: // Data |
|
70 |
|
71 MStreamBuf& iHost; ///< Stream buffer hosting the stream. |
|
72 |
|
73 }; |
|
74 |
|
75 #include "menusrvstream.inl" |
|
76 |
|
77 #endif // __MENUSRVSTREAM_H__ |
|
78 |
|
79 // End of File |