LibreOffice: osl/pipe.h File Reference

LibreOffice LibreOffice 24.8 SDK C/C++ API Reference |

Loading...
Searching...
No Matches
Macros | Typedefs | Enumerations | Functions
pipe.h File Reference
`#include "sal/config.h"`
`#include "osl/security.h"`
`#include "rtl/ustring.h"`
`#include "sal/saldllapi.h"`

Go to the source code of this file.

## Macros
#define | osl_Pipe_OPEN 0x0000 /*< open existing pipe */
#define | osl_Pipe_CREATE 0x0001 /*< create pipe and open it, fails if already exists */

## Typedefs
typedef sal_uInt32 | oslPipeOptions
| Pipe creation options.
typedef struct oslPipeImpl * | oslPipe

## Enumerations
enum | oslPipeError { osl_Pipe_E_None , osl_Pipe_E_NotFound , osl_Pipe_E_AlreadyExists , osl_Pipe_E_NoProtocol , osl_Pipe_E_NetworkReset , osl_Pipe_E_ConnectionAbort , osl_Pipe_E_ConnectionReset , osl_Pipe_E_NoBufferSpace , osl_Pipe_E_TimedOut , osl_Pipe_E_ConnectionRefused , osl_Pipe_E_invalidError , osl_Pipe_E_FORCE_EQUAL_SIZE = SAL_MAX_ENUM }

## Functions
SAL_DLLPUBLIC oslPipe | osl_createPipe (rtl_uString *strPipeName, oslPipeOptions Options, oslSecurity Security)
| Create or open a pipe.
SAL_DLLPUBLIC void | osl_releasePipe (oslPipe Pipe)
| Decreases the refcount of the pipe.
SAL_DLLPUBLIC void | osl_acquirePipe (oslPipe Pipe)
| Increases the refcount of the pipe.
SAL_DLLPUBLIC void | osl_closePipe (oslPipe Pipe)
| Close the pipe.
SAL_DLLPUBLIC oslPipe | osl_acceptPipe (oslPipe Pipe)
SAL_DLLPUBLIC sal_Int32 | osl_sendPipe (oslPipe Pipe, const void *pBuffer, sal_Int32 BufferSize)
SAL_DLLPUBLIC sal_Int32 | osl_receivePipe (oslPipe Pipe, void *pBuffer, sal_Int32 BufferSize)
SAL_DLLPUBLIC sal_Int32 | osl_readPipe (oslPipe Pipe, void *pBuffer, sal_Int32 BufferSize)
| Reads blocking from the pipe.
SAL_DLLPUBLIC sal_Int32 | osl_writePipe (oslPipe Pipe, const void *pBuffer, sal_Int32 BufferSize)
| Writes blocking onto the pipe.
SAL_DLLPUBLIC oslPipeError | osl_getLastPipeError (oslPipe Pipe)

## Macro Definition Documentation

## ◆ osl_Pipe_CREATE

#define osl_Pipe_CREATE 0x0001 /*< create pipe and open it, fails if already exists */

## ◆ osl_Pipe_OPEN

#define osl_Pipe_OPEN 0x0000 /*< open existing pipe */

## Typedef Documentation

## ◆ oslPipe

typedef struct oslPipeImpl* oslPipe

## ◆ oslPipeOptions

typedef sal_uInt32 oslPipeOptions

Pipe creation options.

A pipe can either be opened, or a new pipe can be created and opened.

## Enumeration Type Documentation

## ◆ oslPipeError

enum oslPipeError

Enumerator
osl_Pipe_E_None |
osl_Pipe_E_NotFound |
osl_Pipe_E_AlreadyExists |
osl_Pipe_E_NoProtocol |
osl_Pipe_E_NetworkReset |
osl_Pipe_E_ConnectionAbort |
osl_Pipe_E_ConnectionReset |
osl_Pipe_E_NoBufferSpace |
osl_Pipe_E_TimedOut |
osl_Pipe_E_ConnectionRefused |
osl_Pipe_E_invalidError |
osl_Pipe_E_FORCE_EQUAL_SIZE |

## Function Documentation

## ◆ osl_acceptPipe()

SAL_DLLPUBLIC oslPipe osl_acceptPipe | ( | oslPipe | Pipe | ) |

## ◆ osl_acquirePipe()

SAL_DLLPUBLIC void osl_acquirePipe | ( | oslPipe | Pipe | ) |

Increases the refcount of the pipe.

Parameters

  [in] | Pipe | pipe handle

See also
  osl_releasePipe

## ◆ osl_closePipe()

SAL_DLLPUBLIC void osl_closePipe | ( | oslPipe | Pipe | ) |

Close the pipe.

Any read, write or accept actions stop immediately.

Parameters

  [in] | Pipe | pipe handle

See also
  osl_createPipe

## ◆ osl_createPipe()

SAL_DLLPUBLIC oslPipe osl_createPipe | ( | rtl_uString * | strPipeName,
|  | oslPipeOptions | Options,
|  | oslSecurity | Security )

Create or open a pipe.

Parameters

  [in] | strPipeName | pipe name
  [in] | Options | create or open the pipe
  [in] | Security | pipe creator

Returns
  nullptr on failure, otherwise returns the pipe handle

See also
  osl_closePipe

## ◆ osl_getLastPipeError()

SAL_DLLPUBLIC oslPipeError osl_getLastPipeError | ( | oslPipe | Pipe | ) |

## ◆ osl_readPipe()

SAL_DLLPUBLIC sal_Int32 osl_readPipe | ( | oslPipe | Pipe,
|  | void * | pBuffer,
|  | sal_Int32 | BufferSize )

Reads blocking from the pipe.

Returns
  Number of read bytes. If less than BufferSize, the pipe was closed.

## ◆ osl_receivePipe()

SAL_DLLPUBLIC sal_Int32 osl_receivePipe | ( | oslPipe | Pipe,
|  | void * | pBuffer,
|  | sal_Int32 | BufferSize )

## ◆ osl_releasePipe()

SAL_DLLPUBLIC void osl_releasePipe | ( | oslPipe | Pipe | ) |

Decreases the refcount of the pipe.

If the refcount drops to zero, the handle is destroyed.

Parameters

  [in] | Pipe | pipe handle

See also
  osl_acquirePipe

## ◆ osl_sendPipe()

SAL_DLLPUBLIC sal_Int32 osl_sendPipe | ( | oslPipe | Pipe,
|  | const void * | pBuffer,
|  | sal_Int32 | BufferSize )

## ◆ osl_writePipe()

SAL_DLLPUBLIC sal_Int32 osl_writePipe | ( | oslPipe | Pipe,
|  | const void * | pBuffer,
|  | sal_Int32 | BufferSize )

Writes blocking onto the pipe.

Returns
  Number of written bytes. If less than BufferSize, the pipe was closed.