equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2007-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 * Library to add s32strm support for IPC (ie. stream via multiple IPC read/writes instead of |
|
16 * copying to a buffer and streaming to/from there. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 /** |
|
22 @file |
|
23 @internalTechnology |
|
24 @released |
|
25 */ |
|
26 #ifndef __IPCBUF_H__ |
|
27 #define __IPCBUF_H__ |
|
28 |
|
29 #include <e32base.h> |
|
30 #include <s32buf.h> |
|
31 |
|
32 _LIT(KIpcBufPanic, "IpcBuf"); |
|
33 |
|
34 class RIpcBuf : public MStreamBuf |
|
35 { |
|
36 public: |
|
37 IMPORT_C void Open(const RMessagePtr2& aMessage, TInt aMessageSlot); |
|
38 |
|
39 protected: |
|
40 IMPORT_C TStreamPos DoSeekL(TMark aMark, TStreamLocation aLocation, TInt anOffset); |
|
41 |
|
42 IMPORT_C TInt DoReadL(TAny *aPtr, TInt aMaxLength); |
|
43 IMPORT_C void DoWriteL(const TAny* aPtr,TInt aLength); |
|
44 |
|
45 private: |
|
46 enum TIpcBufPanic |
|
47 { |
|
48 EIpcBufSeekUnknownLocation, |
|
49 EIpcBufSeekBadOffset |
|
50 }; |
|
51 |
|
52 private: |
|
53 TInt iReadPos; |
|
54 TInt iWritePos; |
|
55 RMessagePtr2 iMessage; |
|
56 TInt iMessageSlot; |
|
57 }; |
|
58 |
|
59 |
|
60 |
|
61 #endif /* __IPCBUF_H__ */ |