1 | /* $Id: VBoxServicePipeBuf.h 36744 2011-04-20 10:05:09Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBoxServicePipeBuf - Pipe buffering.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2010-2011 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef ___VBoxServicePipeBuf_h
|
---|
19 | #define ___VBoxServicePipeBuf_h
|
---|
20 |
|
---|
21 | #include "VBoxServiceInternal.h"
|
---|
22 |
|
---|
23 | int VBoxServicePipeBufInit(PVBOXSERVICECTRLEXECPIPEBUF pBuf, bool fNeedNotificationPipe);
|
---|
24 | int VBoxServicePipeBufRead(PVBOXSERVICECTRLEXECPIPEBUF pBuf,
|
---|
25 | uint8_t *pbBuffer, uint32_t cbBuffer, uint32_t *pcbToRead);
|
---|
26 | int VBoxServicePipeBufPeek(PVBOXSERVICECTRLEXECPIPEBUF pBuf,
|
---|
27 | uint8_t *pbBuffer, uint32_t cbBuffer,
|
---|
28 | uint32_t cbOffset,
|
---|
29 | uint32_t *pcbRead, uint32_t *pcbLeft);
|
---|
30 | int VBoxServicePipeBufWriteToBuf(PVBOXSERVICECTRLEXECPIPEBUF pBuf,
|
---|
31 | uint8_t *pbData, uint32_t cbData, bool fPendingClose, uint32_t *pcbWritten);
|
---|
32 | int VBoxServicePipeBufWriteToPipe(PVBOXSERVICECTRLEXECPIPEBUF pBuf, RTPIPE hPipe,
|
---|
33 | size_t *pcbWritten, size_t *pcbLeft);
|
---|
34 | bool VBoxServicePipeBufIsEnabled(PVBOXSERVICECTRLEXECPIPEBUF pBuf);
|
---|
35 | bool VBoxServicePipeBufIsClosing(PVBOXSERVICECTRLEXECPIPEBUF pBuf);
|
---|
36 | int VBoxServicePipeBufSetStatus(PVBOXSERVICECTRLEXECPIPEBUF pBuf, bool fEnabled);
|
---|
37 | int VBoxServicePipeBufWaitForEvent(PVBOXSERVICECTRLEXECPIPEBUF pBuf, RTMSINTERVAL cMillies);
|
---|
38 | void VBoxServicePipeBufDestroy(PVBOXSERVICECTRLEXECPIPEBUF pBuf);
|
---|
39 |
|
---|
40 | #endif /* !___VBoxServicePipeBuf_h */
|
---|
41 |
|
---|