edelib 2.0.0
|
00001 /* 00002 * $Id: Pty.h 2839 2009-09-28 11:36:20Z karijes $ 00003 * 00004 * A class for handling pseudoterminals (PTYs) 00005 * Copyright (c) 2006-2008 edelib authors 00006 * 00007 * This file was a part of the KDE project, module kdesu. 00008 * Copyright (C) 1999,2000 Geert Jansen <jansen@kde.org> 00009 * 00010 * This library is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Lesser General Public 00012 * License as published by the Free Software Foundation; either 00013 * version 2 of the License, or (at your option) any later version. 00014 * 00015 * This library is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Lesser General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Lesser General Public License 00021 * along with this library. If not, see <http://www.gnu.org/licenses/>. 00022 */ 00023 00024 #ifndef __EDELIB_PTY_H__ 00025 #define __EDELIB_PTY_H__ 00026 00027 #include "edelib-global.h" 00028 00029 EDELIB_NS_BEGIN 00030 00038 class EDELIB_API PTY { 00039 private: 00040 int ptyfd; 00041 char *ptyname, *ttyname; 00042 00043 E_DISABLE_CLASS_COPY(PTY) 00044 public: 00048 PTY(); 00049 00053 ~PTY(); 00054 00059 int getpt(); 00060 00065 int grantpt(); 00066 00071 int unlockpt(); 00072 00076 const char *ptsname(); 00077 }; 00078 00079 EDELIB_NS_END 00080 #endif