diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-06-25 04:49:20 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-06-25 08:13:30 +0200 |
commit | 2f7088999dc3aa7a4032e2a593b49a146854897e (patch) | |
tree | c504c160c5f111a9dffa6c1c23bb83afa3c3025a /include/osl | |
parent | 3fe969eba649fe390008044fe23a8a9bc9276a14 (diff) |
osl: document pipe functionality
Change-Id: I1b2fa0db88bf9b25283ff532f9634eb4605775c3
Reviewed-on: https://gerrit.libreoffice.org/39221
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'include/osl')
-rw-r--r-- | include/osl/pipe.h | 67 |
1 files changed, 48 insertions, 19 deletions
diff --git a/include/osl/pipe.h b/include/osl/pipe.h index 82604334d178..5c176dd48250 100644 --- a/include/osl/pipe.h +++ b/include/osl/pipe.h @@ -32,41 +32,70 @@ extern "C" { #endif typedef enum { - osl_Pipe_E_None, /* no error */ - osl_Pipe_E_NotFound, /* Pipe could not be found */ - osl_Pipe_E_AlreadyExists, /* Pipe already exists */ - osl_Pipe_E_NoProtocol, /* Protocol not available */ - osl_Pipe_E_NetworkReset, /* Network dropped connection because of reset */ - osl_Pipe_E_ConnectionAbort, /* Software caused connection abort */ - osl_Pipe_E_ConnectionReset, /* Connection reset by peer */ - osl_Pipe_E_NoBufferSpace, /* No buffer space available */ - osl_Pipe_E_TimedOut, /* Connection timed out */ - osl_Pipe_E_ConnectionRefused, /* Connection refused */ - osl_Pipe_E_invalidError, /* unmapped error: always last entry in enum! */ + osl_Pipe_E_None, /*< no error */ + osl_Pipe_E_NotFound, /*< Pipe could not be found */ + osl_Pipe_E_AlreadyExists, /*< Pipe already exists */ + osl_Pipe_E_NoProtocol, /*< Protocol not available */ + osl_Pipe_E_NetworkReset, /*< Network dropped connection because of reset */ + osl_Pipe_E_ConnectionAbort, /*< Software caused connection abort */ + osl_Pipe_E_ConnectionReset, /*< Connection reset by peer */ + osl_Pipe_E_NoBufferSpace, /*< No buffer space available */ + osl_Pipe_E_TimedOut, /*< Connection timed out */ + osl_Pipe_E_ConnectionRefused, /*< Connection refused */ + osl_Pipe_E_invalidError, /*< unmapped error: always last entry in enum! */ osl_Pipe_E_FORCE_EQUAL_SIZE = SAL_MAX_ENUM } oslPipeError; +/** Pipe creation options. + + A pipe can either be opened, or a new pipe can be created and opened. +*/ typedef sal_uInt32 oslPipeOptions; -#define osl_Pipe_OPEN 0x0000 /* open existing pipe */ -#define osl_Pipe_CREATE 0x0001 /* create pipe and open it, fails if already exists */ +#define osl_Pipe_OPEN 0x0000 /*< open existing pipe */ +#define osl_Pipe_CREATE 0x0001 /*< create pipe and open it, fails if already exists */ typedef struct oslPipeImpl * oslPipe; +/** Create or open a pipe. + + @param[in] strPipeName pipe name + @param[in] Options create or open the pipe + @param[in] Security pipe creator + + @returns nullptr on failure, otherwise returns the pipe handle + + @see osl_closePipe +*/ SAL_DLLPUBLIC oslPipe SAL_CALL osl_createPipe( rtl_uString *strPipeName, oslPipeOptions Options, oslSecurity Security); -/** decreases the refcount of the pipe. +/** Decreases the refcount of the pipe. + If the refcount drops to zero, the handle is destroyed. + + @param[in] Pipe pipe handle + + @see osl_acquirePipe */ -SAL_DLLPUBLIC void SAL_CALL osl_releasePipe( oslPipe ); +SAL_DLLPUBLIC void SAL_CALL osl_releasePipe(oslPipe Pipe); + +/** Increases the refcount of the pipe. + + @param[in] Pipe pipe handle -/** increases the refcount of the pipe. + @see osl_releasePipe */ -SAL_DLLPUBLIC void SAL_CALL osl_acquirePipe( oslPipe Pipe ); +SAL_DLLPUBLIC void SAL_CALL osl_acquirePipe(oslPipe Pipe); + +/** Close the pipe. + + Any read, write or accept actions stop immediately. + + @param[in] Pipe pipe handle -/** closes the pipe, any read,write or accept actions stop immeadiatly. + @see osl_createPipe */ -SAL_DLLPUBLIC void SAL_CALL osl_closePipe( oslPipe ); +SAL_DLLPUBLIC void SAL_CALL osl_closePipe(oslPipe Pipe); SAL_DLLPUBLIC oslPipe SAL_CALL osl_acceptPipe(oslPipe Pipe); |