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 #ifndef _OSL_PIPE_DECL_HXX_ 00029 #define _OSL_PIPE_DECL_HXX_ 00030 00031 #include <osl/pipe.h> 00032 # include <osl/security.hxx> 00033 #include <rtl/ustring.hxx> 00034 00035 namespace osl { 00036 00037 class StreamPipe; 00038 00041 class Pipe 00042 { 00043 protected: 00044 oslPipe m_handle; 00045 00046 public: 00047 00051 inline Pipe(); 00052 00057 inline Pipe(const ::rtl::OUString& strName, oslPipeOptions Options); 00058 00064 inline Pipe(const ::rtl::OUString& strName, oslPipeOptions Options,const Security & rSecurity); 00065 00068 inline Pipe(const Pipe& pipe); 00069 00072 inline Pipe( oslPipe pipe, __sal_NoAcquire noacquire ); 00073 00077 inline Pipe(oslPipe Pipe); 00078 00081 inline ~Pipe(); 00082 00083 inline sal_Bool SAL_CALL is() const; 00084 00093 inline sal_Bool create( const ::rtl::OUString & strName, 00094 oslPipeOptions Options, const Security &rSec ); 00095 00104 inline sal_Bool create( const ::rtl::OUString & strName, oslPipeOptions Options = osl_Pipe_OPEN ); 00105 00108 inline void SAL_CALL clear(); 00109 00113 inline Pipe& SAL_CALL operator= (const Pipe& pipe); 00114 00118 inline Pipe& SAL_CALL operator= (const oslPipe pipe ); 00119 00123 inline sal_Bool SAL_CALL isValid() const; 00124 00125 inline sal_Bool SAL_CALL operator==( const Pipe& rPipe ) const; 00126 00129 inline void SAL_CALL close(); 00130 00133 inline oslPipeError SAL_CALL accept(StreamPipe& Connection); 00134 00135 00141 inline oslPipeError SAL_CALL getError() const; 00142 00143 inline oslPipe SAL_CALL getHandle() const; 00144 }; 00145 00148 class StreamPipe : public Pipe 00149 { 00150 public: 00151 00156 inline StreamPipe(); 00157 00161 inline StreamPipe(oslPipe Pipe); 00162 00166 inline StreamPipe(const StreamPipe& Pipe); 00167 00172 inline StreamPipe(const ::rtl::OUString& strName, oslPipeOptions Options = osl_Pipe_OPEN); 00173 00179 inline StreamPipe(const ::rtl::OUString& strName, oslPipeOptions Options, const Security &rSec ); 00180 00183 inline StreamPipe( oslPipe pipe, __sal_NoAcquire noacquire ); 00184 00190 inline StreamPipe & SAL_CALL operator=(oslPipe Pipe); 00191 00194 inline StreamPipe& SAL_CALL operator=(const Pipe& pipe); 00195 00204 inline sal_Int32 SAL_CALL recv(void* pBuffer, sal_Int32 BytesToRead) const; 00205 00213 inline sal_Int32 SAL_CALL send(const void* pBuffer, sal_Int32 BytesToSend) const; 00214 00223 inline sal_Int32 SAL_CALL read(void* pBuffer, sal_Int32 n) const; 00224 00232 sal_Int32 SAL_CALL write(const void* pBuffer, sal_Int32 n) const; 00233 }; 00234 00235 } 00236 #endif 00237 00238 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */