|
UDK 3.2.7 C/C++ API Reference
|
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 #ifndef _OSL_PIPE_DECL_HXX_ 00020 #define _OSL_PIPE_DECL_HXX_ 00021 00022 #include <osl/pipe.h> 00023 # include <osl/security.hxx> 00024 #include <rtl/ustring.hxx> 00025 00026 namespace osl { 00027 00028 class StreamPipe; 00029 00032 class Pipe 00033 { 00034 protected: 00035 oslPipe m_handle; 00036 00037 public: 00038 00042 inline Pipe(); 00043 00048 inline Pipe(const ::rtl::OUString& strName, oslPipeOptions Options); 00049 00055 inline Pipe(const ::rtl::OUString& strName, oslPipeOptions Options,const Security & rSecurity); 00056 00059 inline Pipe(const Pipe& pipe); 00060 00063 inline Pipe( oslPipe pipe, __sal_NoAcquire noacquire ); 00064 00068 inline Pipe(oslPipe Pipe); 00069 00072 inline ~Pipe(); 00073 00074 inline sal_Bool SAL_CALL is() const; 00075 00084 inline sal_Bool create( const ::rtl::OUString & strName, 00085 oslPipeOptions Options, const Security &rSec ); 00086 00095 inline sal_Bool create( const ::rtl::OUString & strName, oslPipeOptions Options = osl_Pipe_OPEN ); 00096 00099 inline void SAL_CALL clear(); 00100 00104 inline Pipe& SAL_CALL operator= (const Pipe& pipe); 00105 00109 inline Pipe& SAL_CALL operator= (const oslPipe pipe ); 00110 00114 inline sal_Bool SAL_CALL isValid() const; 00115 00116 inline sal_Bool SAL_CALL operator==( const Pipe& rPipe ) const; 00117 00120 inline void SAL_CALL close(); 00121 00124 inline oslPipeError SAL_CALL accept(StreamPipe& Connection); 00125 00126 00132 inline oslPipeError SAL_CALL getError() const; 00133 00134 inline oslPipe SAL_CALL getHandle() const; 00135 }; 00136 00139 class StreamPipe : public Pipe 00140 { 00141 public: 00142 00147 inline StreamPipe(); 00148 00152 inline StreamPipe(oslPipe Pipe); 00153 00157 inline StreamPipe(const StreamPipe& Pipe); 00158 00163 inline StreamPipe(const ::rtl::OUString& strName, oslPipeOptions Options = osl_Pipe_OPEN); 00164 00170 inline StreamPipe(const ::rtl::OUString& strName, oslPipeOptions Options, const Security &rSec ); 00171 00174 inline StreamPipe( oslPipe pipe, __sal_NoAcquire noacquire ); 00175 00181 inline StreamPipe & SAL_CALL operator=(oslPipe Pipe); 00182 00185 inline StreamPipe& SAL_CALL operator=(const Pipe& pipe); 00186 00195 inline sal_Int32 SAL_CALL recv(void* pBuffer, sal_Int32 BytesToRead) const; 00196 00204 inline sal_Int32 SAL_CALL send(const void* pBuffer, sal_Int32 BytesToSend) const; 00205 00214 inline sal_Int32 SAL_CALL read(void* pBuffer, sal_Int32 n) const; 00215 00223 sal_Int32 SAL_CALL write(const void* pBuffer, sal_Int32 n) const; 00224 }; 00225 00226 } 00227 #endif 00228 00229 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
1.7.3