UDK 3.2.7 C/C++ API Reference

osl/pipe.h

Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /*
00003  * This file is part of the LibreOffice project.
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  *
00009  * This file incorporates work covered by the following license notice:
00010  *
00011  *   Licensed to the Apache Software Foundation (ASF) under one or more
00012  *   contributor license agreements. See the NOTICE file distributed
00013  *   with this work for additional information regarding copyright
00014  *   ownership. The ASF licenses this file to you under the Apache
00015  *   License, Version 2.0 (the "License"); you may not use this file
00016  *   except in compliance with the License. You may obtain a copy of
00017  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
00018  */
00019 
00020 
00021 #ifndef _OSL_PIPE_H_
00022 #define _OSL_PIPE_H_
00023 
00024 #include "sal/config.h"
00025 
00026 #include "osl/security.h"
00027 #include "rtl/ustring.h"
00028 #include "sal/saldllapi.h"
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033 
00034 typedef enum {
00035     osl_Pipe_E_None,                /* no error */
00036     osl_Pipe_E_NotFound,            /* Pipe could not be found */
00037     osl_Pipe_E_AlreadyExists,       /* Pipe already exists */
00038     osl_Pipe_E_NoProtocol,          /* Protocol not available */
00039     osl_Pipe_E_NetworkReset,        /* Network dropped connection because of reset */
00040     osl_Pipe_E_ConnectionAbort,     /* Software caused connection abort */
00041     osl_Pipe_E_ConnectionReset,     /* Connection reset by peer */
00042     osl_Pipe_E_NoBufferSpace,       /* No buffer space available */
00043     osl_Pipe_E_TimedOut,            /* Connection timed out */
00044     osl_Pipe_E_ConnectionRefused,   /* Connection refused */
00045     osl_Pipe_E_invalidError,        /* unmapped error: always last entry in enum! */
00046     osl_Pipe_E_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
00047 } oslPipeError;
00048 
00049 typedef sal_uInt32 oslPipeOptions;
00050 #define osl_Pipe_OPEN        0x0000     /* open existing pipe */
00051 #define osl_Pipe_CREATE      0x0001     /* create pipe and open it, fails if already existst */
00052 
00053 typedef struct oslPipeImpl * oslPipe;
00054 
00057 SAL_DLLPUBLIC oslPipe SAL_CALL osl_createPipe(
00058         rtl_uString *strPipeName, oslPipeOptions Options, oslSecurity Security);
00059 
00063 SAL_DLLPUBLIC void    SAL_CALL osl_releasePipe( oslPipe );
00064 
00067 SAL_DLLPUBLIC void    SAL_CALL osl_acquirePipe( oslPipe Pipe );
00068 
00071 SAL_DLLPUBLIC void    SAL_CALL osl_closePipe( oslPipe );
00072 
00073 
00074 SAL_DLLPUBLIC oslPipe SAL_CALL osl_acceptPipe(oslPipe Pipe);
00075 
00076 SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_sendPipe(oslPipe Pipe, const void* pBuffer, sal_Int32 BufferSize);
00077 SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_receivePipe(oslPipe Pipe, void* pBuffer, sal_Int32 BufferSize);
00078 
00082 SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_readPipe( oslPipe Pipe, void *pBuffer, sal_Int32 BufferSize );
00083 
00087 SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_writePipe( oslPipe Pipe, const void *pBuffer, sal_Int32 BufferSize );
00088 
00089 SAL_DLLPUBLIC oslPipeError SAL_CALL osl_getLastPipeError(oslPipe Pipe);
00090 
00091 #ifdef __cplusplus
00092 }
00093 #endif
00094 
00095 #endif  /* _OSL_PIPE_H_ */
00096 
00097 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines