Cupt
|
00001 /************************************************************************** 00002 * Copyright (C) 2010 by Eugene V. Lyubimkin * 00003 * * 00004 * This program is free software; you can redistribute it and/or modify * 00005 * it under the terms of the GNU General Public License * 00006 * (version 3 or above) as published by the Free Software Foundation. * 00007 * * 00008 * This program is distributed in the hope that it will be useful, * 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00011 * GNU General Public License for more details. * 00012 * * 00013 * You should have received a copy of the GNU GPL * 00014 * along with this program; if not, write to the * 00015 * Free Software Foundation, Inc., * 00016 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * 00017 **************************************************************************/ 00018 #ifndef CUPT_PIPE_SEEN 00019 #define CUPT_PIPE_SEEN 00020 00022 00023 #include <unistd.h> 00024 00025 #include <cupt/common.hpp> 00026 00027 namespace cupt { 00028 00029 namespace internal { 00030 00031 struct PipeData; 00032 00033 } 00034 00035 // TODO/API break/: not used externally anymore, make it internal 00036 class CUPT_API Pipe 00037 { 00038 internal::PipeData* __data; 00039 Pipe(const Pipe&); 00040 public: 00041 Pipe(const string& name); 00042 virtual ~Pipe(); 00043 void useAsReader(); 00044 void useAsWriter(); 00045 int getReaderFd(); 00046 int getWriterFd(); 00047 }; 00048 00049 } 00050 00052 00053 #endif 00054