My Project
UDK 3.2.7 C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pipe_decl.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
3  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * Copyright 2000, 2010 Oracle and/or its affiliates.
7  *
8  * OpenOffice.org - a multi-platform office productivity suite
9  *
10  * This file is part of OpenOffice.org.
11  *
12  * OpenOffice.org is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU Lesser General Public License version 3
14  * only, as published by the Free Software Foundation.
15  *
16  * OpenOffice.org is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Lesser General Public License version 3 for more details
20  * (a copy is included in the LICENSE file that accompanied this code).
21  *
22  * You should have received a copy of the GNU Lesser General Public License
23  * version 3 along with OpenOffice.org. If not, see
24  * <http://www.openoffice.org/license.html>
25  * for a copy of the LGPLv3 License.
26  *
27  ************************************************************************/
28 #ifndef _OSL_PIPE_DECL_HXX_
29 #define _OSL_PIPE_DECL_HXX_
30 
31 #include <osl/pipe.h>
32 # include <osl/security.hxx>
33 #include <rtl/ustring.hxx>
34 
35 namespace osl {
36 
37 class StreamPipe;
38 
41 class Pipe
42 {
43 protected:
45 
46 public:
47 
51  inline Pipe();
52 
57  inline Pipe(const ::rtl::OUString& strName, oslPipeOptions Options);
58 
64  inline Pipe(const ::rtl::OUString& strName, oslPipeOptions Options,const Security & rSecurity);
65 
68  inline Pipe(const Pipe& pipe);
69 
72  inline Pipe( oslPipe pipe, __sal_NoAcquire noacquire );
73 
77  inline Pipe(oslPipe Pipe);
78 
81  inline ~Pipe();
82 
83  inline sal_Bool SAL_CALL is() const;
84 
93  inline sal_Bool create( const ::rtl::OUString & strName,
94  oslPipeOptions Options, const Security &rSec );
95 
104  inline sal_Bool create( const ::rtl::OUString & strName, oslPipeOptions Options = osl_Pipe_OPEN );
105 
108  inline void SAL_CALL clear();
109 
113  inline Pipe& SAL_CALL operator= (const Pipe& pipe);
114 
118  inline Pipe& SAL_CALL operator= (const oslPipe pipe );
119 
123  inline sal_Bool SAL_CALL isValid() const;
124 
125  inline sal_Bool SAL_CALL operator==( const Pipe& rPipe ) const;
126 
129  inline void SAL_CALL close();
130 
133  inline oslPipeError SAL_CALL accept(StreamPipe& Connection);
134 
135 
141  inline oslPipeError SAL_CALL getError() const;
142 
143  inline oslPipe SAL_CALL getHandle() const;
144 };
145 
148 class StreamPipe : public Pipe
149 {
150 public:
151 
156  inline StreamPipe();
157 
161  inline StreamPipe(oslPipe Pipe);
162 
166  inline StreamPipe(const StreamPipe& Pipe);
167 
172  inline StreamPipe(const ::rtl::OUString& strName, oslPipeOptions Options = osl_Pipe_OPEN);
173 
179  inline StreamPipe(const ::rtl::OUString& strName, oslPipeOptions Options, const Security &rSec );
180 
183  inline StreamPipe( oslPipe pipe, __sal_NoAcquire noacquire );
184 
190  inline StreamPipe & SAL_CALL operator=(oslPipe Pipe);
191 
194  inline StreamPipe& SAL_CALL operator=(const Pipe& pipe);
195 
204  inline sal_Int32 SAL_CALL recv(void* pBuffer, sal_Int32 BytesToRead) const;
205 
213  inline sal_Int32 SAL_CALL send(const void* pBuffer, sal_Int32 BytesToSend) const;
214 
223  inline sal_Int32 SAL_CALL read(void* pBuffer, sal_Int32 n) const;
224 
232  sal_Int32 SAL_CALL write(const void* pBuffer, sal_Int32 n) const;
233 };
234 
235 }
236 #endif
237 
238 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */