AlterOffice
AlterOffice 3.4 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pipe.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 
3 
4 #ifndef INCLUDED_OSL_PIPE_H
5 #define INCLUDED_OSL_PIPE_H
6 
7 #include "sal/config.h"
8 
9 #include "osl/security.h"
10 #include "rtl/ustring.h"
11 #include "sal/saldllapi.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 typedef enum {
18  osl_Pipe_E_None, /*< no error */
19  osl_Pipe_E_NotFound, /*< Pipe could not be found */
20  osl_Pipe_E_AlreadyExists, /*< Pipe already exists */
21  osl_Pipe_E_NoProtocol, /*< Protocol not available */
22  osl_Pipe_E_NetworkReset, /*< Network dropped connection because of reset */
23  osl_Pipe_E_ConnectionAbort, /*< Software caused connection abort */
24  osl_Pipe_E_ConnectionReset, /*< Connection reset by peer */
25  osl_Pipe_E_NoBufferSpace, /*< No buffer space available */
26  osl_Pipe_E_TimedOut, /*< Connection timed out */
27  osl_Pipe_E_ConnectionRefused, /*< Connection refused */
28  osl_Pipe_E_invalidError, /*< unmapped error: always last entry in enum! */
30 } oslPipeError;
31 
36 typedef sal_uInt32 oslPipeOptions;
37 #define osl_Pipe_OPEN 0x0000 /*< open existing pipe */
38 #define osl_Pipe_CREATE 0x0001 /*< create pipe and open it, fails if already exists */
39 
40 typedef struct oslPipeImpl * oslPipe;
41 
52 SAL_DLLPUBLIC oslPipe SAL_CALL osl_createPipe(
53  rtl_uString *strPipeName, oslPipeOptions Options, oslSecurity Security);
54 
63 SAL_DLLPUBLIC void SAL_CALL osl_releasePipe(oslPipe Pipe);
64 
71 SAL_DLLPUBLIC void SAL_CALL osl_acquirePipe(oslPipe Pipe);
72 
81 SAL_DLLPUBLIC void SAL_CALL osl_closePipe(oslPipe Pipe);
82 
83 
84 SAL_DLLPUBLIC oslPipe SAL_CALL osl_acceptPipe(oslPipe Pipe);
85 
86 SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_sendPipe(oslPipe Pipe, const void* pBuffer, sal_Int32 BufferSize);
87 SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_receivePipe(oslPipe Pipe, void* pBuffer, sal_Int32 BufferSize);
88 
92 SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_readPipe( oslPipe Pipe, void *pBuffer, sal_Int32 BufferSize );
93 
97 SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_writePipe( oslPipe Pipe, const void *pBuffer, sal_Int32 BufferSize );
98 
99 SAL_DLLPUBLIC oslPipeError SAL_CALL osl_getLastPipeError(oslPipe Pipe);
100 
101 #ifdef __cplusplus
102 }
103 #endif
104 
105 #endif // INCLUDED_OSL_PIPE_H
106 
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: pipe.h:20
SAL_DLLPUBLIC void osl_acquirePipe(oslPipe Pipe)
Increases the refcount of the pipe.
Definition: pipe.h:24
Definition: pipe.h:25
SAL_DLLPUBLIC sal_Int32 osl_writePipe(oslPipe Pipe, const void *pBuffer, sal_Int32 BufferSize)
Writes blocking onto the pipe.
SAL_DLLPUBLIC sal_Int32 osl_readPipe(oslPipe Pipe, void *pBuffer, sal_Int32 BufferSize)
Reads blocking from the pipe.
Definition: pipe.h:29
Definition: pipe.h:22
Definition: pipe.h:18
sal_uInt32 oslPipeOptions
Pipe creation options.
Definition: pipe.h:36
Definition: pipe.h:23
SAL_DLLPUBLIC void osl_closePipe(oslPipe Pipe)
Close the pipe.
SAL_DLLPUBLIC void osl_releasePipe(oslPipe Pipe)
Decreases the refcount of the pipe.
Definition: pipe.h:27
SAL_DLLPUBLIC oslPipe osl_acceptPipe(oslPipe Pipe)
void * oslSecurity
Process handle.
Definition: security.h:29
SAL_DLLPUBLIC oslPipeError osl_getLastPipeError(oslPipe Pipe)
SAL_DLLPUBLIC sal_Int32 osl_receivePipe(oslPipe Pipe, void *pBuffer, sal_Int32 BufferSize)
Definition: pipe.h:19
#define SAL_MAX_ENUM
Definition: types.h:185
Definition: pipe.h:26
Definition: pipe.h:21
struct oslPipeImpl * oslPipe
Definition: pipe.h:40
SAL_DLLPUBLIC sal_Int32 osl_sendPipe(oslPipe Pipe, const void *pBuffer, sal_Int32 BufferSize)
Definition: pipe.h:28
oslPipeError
Definition: pipe.h:17
SAL_DLLPUBLIC oslPipe osl_createPipe(rtl_uString *strPipeName, oslPipeOptions Options, oslSecurity Security)
Create or open a pipe.
#define SAL_DLLPUBLIC
Definition: saldllapi.h:14