Pty.h
/*
* $Id: Pty.h 2839 2009-09-28 11:36:20Z karijes $
*
* A class for handling pseudoterminals (PTYs)
* Copyright (c) 2006-2008 edelib authors
*
* This file was a part of the KDE project, module kdesu.
* Copyright (C) 1999,2000 Geert Jansen <jansen@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __EDELIB_PTY_H__
#define __EDELIB_PTY_H__
#include "edelib-global.h"
EDELIB_NS_BEGIN
class EDELIB_API PTY {
private:
int ptyfd;
char *ptyname, *ttyname;
E_DISABLE_CLASS_COPY(PTY)
public:
PTY();
~PTY();
int getpt();
int grantpt();
int unlockpt();
const char *ptsname();
};
EDELIB_NS_END
#endif
edelib::PTY
emulate pty api
Definition: Pty.h:38
E_DISABLE_CLASS_COPY
#define E_DISABLE_CLASS_COPY(klass)
Definition: edelib-global.h:161