UDK 3.2.7 C/C++ API Reference
|
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 00002 /************************************************************************* 00003 * 00004 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 00005 * 00006 * Copyright 2000, 2010 Oracle and/or its affiliates. 00007 * 00008 * OpenOffice.org - a multi-platform office productivity suite 00009 * 00010 * This file is part of OpenOffice.org. 00011 * 00012 * OpenOffice.org is free software: you can redistribute it and/or modify 00013 * it under the terms of the GNU Lesser General Public License version 3 00014 * only, as published by the Free Software Foundation. 00015 * 00016 * OpenOffice.org is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Lesser General Public License version 3 for more details 00020 * (a copy is included in the LICENSE file that accompanied this code). 00021 * 00022 * You should have received a copy of the GNU Lesser General Public License 00023 * version 3 along with OpenOffice.org. If not, see 00024 * <http://www.openoffice.org/license.html> 00025 * for a copy of the LGPLv3 License. 00026 * 00027 ************************************************************************/ 00028 00029 00030 #ifndef _OSL_PIPE_H_ 00031 #define _OSL_PIPE_H_ 00032 00033 # include <rtl/ustring.h> 00034 00035 00036 # include <osl/security.h> 00037 00038 #ifdef __cplusplus 00039 extern "C" { 00040 #endif 00041 00042 typedef enum { 00043 osl_Pipe_E_None, /* no error */ 00044 osl_Pipe_E_NotFound, /* Pipe could not be found */ 00045 osl_Pipe_E_AlreadyExists, /* Pipe already exists */ 00046 osl_Pipe_E_NoProtocol, /* Protocol not available */ 00047 osl_Pipe_E_NetworkReset, /* Network dropped connection because of reset */ 00048 osl_Pipe_E_ConnectionAbort, /* Software caused connection abort */ 00049 osl_Pipe_E_ConnectionReset, /* Connection reset by peer */ 00050 osl_Pipe_E_NoBufferSpace, /* No buffer space available */ 00051 osl_Pipe_E_TimedOut, /* Connection timed out */ 00052 osl_Pipe_E_ConnectionRefused, /* Connection refused */ 00053 osl_Pipe_E_invalidError, /* unmapped error: always last entry in enum! */ 00054 osl_Pipe_E_FORCE_EQUAL_SIZE = SAL_MAX_ENUM 00055 } oslPipeError; 00056 00057 typedef sal_uInt32 oslPipeOptions; 00058 #define osl_Pipe_OPEN 0x0000 /* open existing pipe */ 00059 #define osl_Pipe_CREATE 0x0001 /* create pipe and open it, fails if already existst */ 00060 00061 typedef struct oslPipeImpl * oslPipe; 00062 00065 SAL_DLLPUBLIC oslPipe SAL_CALL osl_createPipe( 00066 rtl_uString *strPipeName, oslPipeOptions Options, oslSecurity Security); 00067 00071 SAL_DLLPUBLIC void SAL_CALL osl_releasePipe( oslPipe ); 00072 00075 SAL_DLLPUBLIC void SAL_CALL osl_acquirePipe( oslPipe Pipe ); 00076 00079 SAL_DLLPUBLIC void SAL_CALL osl_closePipe( oslPipe ); 00080 00081 00082 SAL_DLLPUBLIC oslPipe SAL_CALL osl_acceptPipe(oslPipe Pipe); 00083 00084 SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_sendPipe(oslPipe Pipe, const void* pBuffer, sal_Int32 BufferSize); 00085 SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_receivePipe(oslPipe Pipe, void* pBuffer, sal_Int32 BufferSize); 00086 00090 SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_readPipe( oslPipe Pipe, void *pBuffer, sal_Int32 BufferSize ); 00091 00095 SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_writePipe( oslPipe Pipe, const void *pBuffer, sal_Int32 BufferSize ); 00096 00097 SAL_DLLPUBLIC oslPipeError SAL_CALL osl_getLastPipeError(oslPipe Pipe); 00098 00099 #ifdef __cplusplus 00100 } 00101 #endif 00102 00103 #endif /* _OSL_PIPE_H_ */ 00104 00105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */