FreeRDP
libwinpr/pipe/pipe.h
1 
20 #ifndef WINPR_PIPE_PRIVATE_H
21 #define WINPR_PIPE_PRIVATE_H
22 
23 #ifndef _WIN32
24 
25 #include <winpr/pipe.h>
26 #include <winpr/collections.h>
27 
28 #include "../handle/handle.h"
29 
30 struct winpr_pipe
31 {
32  WINPR_HANDLE common;
33 
34  int fd;
35 };
36 typedef struct winpr_pipe WINPR_PIPE;
37 
38 typedef struct winpr_named_pipe WINPR_NAMED_PIPE;
39 
40 typedef void (*fnUnrefNamedPipe)(WINPR_NAMED_PIPE* pNamedPipe);
41 
43 {
44  WINPR_HANDLE common;
45 
46  int clientfd;
47  int serverfd;
48 
49  char* name;
50  char* lpFileName;
51  char* lpFilePath;
52 
53  BOOL ServerMode;
54  DWORD dwOpenMode;
55  DWORD dwPipeMode;
56  DWORD nMaxInstances;
57  DWORD nOutBufferSize;
58  DWORD nInBufferSize;
59  DWORD nDefaultTimeOut;
60  DWORD dwFlagsAndAttributes;
61  LPOVERLAPPED lpOverlapped;
62 
63  fnUnrefNamedPipe pfnUnrefNamedPipe;
64 };
65 
66 BOOL winpr_destroy_named_pipe(WINPR_NAMED_PIPE* pNamedPipe);
67 
68 BOOL NamedPipeRead(PVOID Object, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
69  LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped);
70 BOOL NamedPipeWrite(PVOID Object, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite,
71  LPDWORD lpNumberOfBytesWritten, LPOVERLAPPED lpOverlapped);
72 
73 #endif
74 
75 #endif /* WINPR_PIPE_PRIVATE_H */