LibreOffice: osl/pipe.h Source File

LibreOffice LibreOffice 26.2 SDK C/C++ API Reference

Loading...
Searching...
No Matches
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 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20/*
21 * This file is part of LibreOffice published API.
22 */
23
24#ifndef INCLUDED_OSL_PIPE_H
25#define INCLUDED_OSL_PIPE_H
26
27#include "sal/config.h"
28
29#include "osl/security.h"
30#include "rtl/ustring.h"
31#include "sal/saldllapi.h"
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37 typedef enum {
38 osl_Pipe_E_None, /*< no error */
39 osl_Pipe_E_NotFound, /*< Pipe could not be found */
40 osl_Pipe_E_AlreadyExists, /*< Pipe already exists */
41 osl_Pipe_E_NoProtocol, /*< Protocol not available */
42 osl_Pipe_E_NetworkReset, /*< Network dropped connection because of reset */
43 osl_Pipe_E_ConnectionAbort, /*< Software caused connection abort */
44 osl_Pipe_E_ConnectionReset, /*< Connection reset by peer */
45 osl_Pipe_E_NoBufferSpace, /*< No buffer space available */
46 osl_Pipe_E_TimedOut, /*< Connection timed out */
47 osl_Pipe_E_ConnectionRefused, /*< Connection refused */
48 osl_Pipe_E_invalidError, /*< unmapped error: always last entry in enum! */
49 osl_Pipe_E_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
50} oslPipeError;
51
56 typedef sal_uInt32 oslPipeOptions;
57#define osl_Pipe_OPEN 0x0000 /*< open existing pipe */
58#define osl_Pipe_CREATE 0x0001 /*< create pipe and open it, fails if already exists */
59
60 typedef struct oslPipeImpl * oslPipe;
61
72 SAL_DLLPUBLIC oslPipe SAL_CALL osl_createPipe(
73 rtl_uString *strPipeName, oslPipeOptions Options, oslSecurity Security);
74
83 SAL_DLLPUBLIC void SAL_CALL osl_releasePipe(oslPipe Pipe);
84
91 SAL_DLLPUBLIC void SAL_CALL osl_acquirePipe(oslPipe Pipe);
92
101 SAL_DLLPUBLIC void SAL_CALL osl_closePipe(oslPipe Pipe);
102
103
104 SAL_DLLPUBLIC oslPipe SAL_CALL osl_acceptPipe(oslPipe Pipe);
105
106 SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_sendPipe(oslPipe Pipe, const void* pBuffer, sal_Int32 BufferSize);
107 SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_receivePipe(oslPipe Pipe, void* pBuffer, sal_Int32 BufferSize);
108
112 SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_readPipe( oslPipe Pipe, void *pBuffer, sal_Int32 BufferSize );
113
117 SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_writePipe( oslPipe Pipe, const void *pBuffer, sal_Int32 BufferSize );
118
119 SAL_DLLPUBLIC oslPipeError SAL_CALL osl_getLastPipeError(oslPipe Pipe);
120
121#ifdef __cplusplus
122}
123#endif
124
125#endif // INCLUDED_OSL_PIPE_H
126
127/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
saldllapi.h
SAL_DLLPUBLIC
#define SAL_DLLPUBLIC
Definition saldllapi.h:34
config.h
SAL_MAX_ENUM
#define SAL_MAX_ENUM
Definition types.h:205
ustring.h
oslPipeError
oslPipeError
Definition pipe.h:37
osl_Pipe_E_ConnectionReset
@ osl_Pipe_E_ConnectionReset
Definition pipe.h:44
osl_Pipe_E_TimedOut
@ osl_Pipe_E_TimedOut
Definition pipe.h:46
osl_Pipe_E_ConnectionRefused
@ osl_Pipe_E_ConnectionRefused
Definition pipe.h:47
osl_Pipe_E_None
@ osl_Pipe_E_None
Definition pipe.h:38
osl_Pipe_E_NetworkReset
@ osl_Pipe_E_NetworkReset
Definition pipe.h:42
osl_Pipe_E_NoBufferSpace
@ osl_Pipe_E_NoBufferSpace
Definition pipe.h:45
osl_Pipe_E_ConnectionAbort
@ osl_Pipe_E_ConnectionAbort
Definition pipe.h:43
osl_Pipe_E_NotFound
@ osl_Pipe_E_NotFound
Definition pipe.h:39
osl_Pipe_E_FORCE_EQUAL_SIZE
@ osl_Pipe_E_FORCE_EQUAL_SIZE
Definition pipe.h:49
osl_Pipe_E_AlreadyExists
@ osl_Pipe_E_AlreadyExists
Definition pipe.h:40
osl_Pipe_E_NoProtocol
@ osl_Pipe_E_NoProtocol
Definition pipe.h:41
osl_Pipe_E_invalidError
@ osl_Pipe_E_invalidError
Definition pipe.h:48
osl_writePipe
SAL_DLLPUBLIC sal_Int32 osl_writePipe(oslPipe Pipe, const void *pBuffer, sal_Int32 BufferSize)
Writes blocking onto the pipe.
osl_readPipe
SAL_DLLPUBLIC sal_Int32 osl_readPipe(oslPipe Pipe, void *pBuffer, sal_Int32 BufferSize)
Reads blocking from the pipe.
oslPipeOptions
sal_uInt32 oslPipeOptions
Pipe creation options.
Definition pipe.h:56
osl_sendPipe
SAL_DLLPUBLIC sal_Int32 osl_sendPipe(oslPipe Pipe, const void *pBuffer, sal_Int32 BufferSize)
oslPipe
struct oslPipeImpl * oslPipe
Definition pipe.h:60
osl_acceptPipe
SAL_DLLPUBLIC oslPipe osl_acceptPipe(oslPipe Pipe)
osl_closePipe
SAL_DLLPUBLIC void osl_closePipe(oslPipe Pipe)
Close the pipe.
osl_acquirePipe
SAL_DLLPUBLIC void osl_acquirePipe(oslPipe Pipe)
Increases the refcount of the pipe.
osl_receivePipe
SAL_DLLPUBLIC sal_Int32 osl_receivePipe(oslPipe Pipe, void *pBuffer, sal_Int32 BufferSize)
osl_createPipe
SAL_DLLPUBLIC oslPipe osl_createPipe(rtl_uString *strPipeName, oslPipeOptions Options, oslSecurity Security)
Create or open a pipe.
osl_getLastPipeError
SAL_DLLPUBLIC oslPipeError osl_getLastPipeError(oslPipe Pipe)
osl_releasePipe
SAL_DLLPUBLIC void osl_releasePipe(oslPipe Pipe)
Decreases the refcount of the pipe.
security.h
oslSecurity
void * oslSecurity
Process handle.
Definition security.h:49