|
1 // Copyright (c) 2005-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 #ifndef __IPCSTREAM_H__ |
|
17 #define __IPCSTREAM_H__ |
|
18 |
|
19 #include <s32mem.h> |
|
20 #include "IpcDefs.h" |
|
21 |
|
22 /** |
|
23 IPC, server-side class. |
|
24 |
|
25 HIpcStream class is part of the server-side IPC framework, used for transferring large blocks of |
|
26 data to/from the client side. |
|
27 |
|
28 @internalComponent |
|
29 */ |
|
30 NONSHARABLE_CLASS(HIpcStream) |
|
31 { |
|
32 public: |
|
33 inline HIpcStream(MStreamBuf* aHost, TInt aReadPos); |
|
34 ~HIpcStream(); |
|
35 |
|
36 TInt ReadL(const RMessage2& aMessage); |
|
37 void WriteL(const RMessage2& aMessage); |
|
38 inline TInt SizeL(); |
|
39 void SynchL(); |
|
40 |
|
41 private: |
|
42 MStreamBuf& iHost; |
|
43 TInt iRPos; |
|
44 TInt iWPos; |
|
45 |
|
46 }; |
|
47 |
|
48 /** |
|
49 IPC, server-side class. |
|
50 |
|
51 HIpcReadBuf class is part of the server-side IPC framework, used for transferring large blocks of |
|
52 data to the client side. |
|
53 |
|
54 The difference between HIpcReadBuf and HIpcBufBuf is that HIpcReadBuf does not allocate memory for |
|
55 the data. It keeps just a pointer to the data which needs to be sent to the client side. |
|
56 |
|
57 @see HIpcStream |
|
58 |
|
59 @internalComponent |
|
60 */ |
|
61 NONSHARABLE_CLASS(HIpcReadBuf) : public TMemBuf |
|
62 { |
|
63 public: |
|
64 inline static HIpcReadBuf* NewL(const TDesC8& aDes); |
|
65 |
|
66 private: |
|
67 inline HIpcReadBuf(const TDesC8& aDes); |
|
68 virtual void DoRelease(); |
|
69 |
|
70 }; |
|
71 |
|
72 #include "IPCStream.inl" |
|
73 |
|
74 #endif//__IPCSTREAM_H__ |