edelib 2.1.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List

Pty.h
1 /*
2 * $Id: Pty.h 2839 2009-09-28 11:36:20Z karijes $
3 *
4 * A class for handling pseudoterminals (PTYs)
5 * Copyright (c) 2006-2008 edelib authors
6 *
7 * This file was a part of the KDE project, module kdesu.
8 * Copyright (C) 1999,2000 Geert Jansen <jansen@kde.org>
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this library. If not, see <http://www.gnu.org/licenses/>.
22 */
23
24 #ifndef __EDELIB_PTY_H__
25 #define __EDELIB_PTY_H__
26
27 #include "edelib-global.h"
28
29 EDELIB_NS_BEGIN
30
38 class EDELIB_API PTY {
39 private:
40 int ptyfd;
41 char *ptyname, *ttyname;
42
43 E_DISABLE_CLASS_COPY(PTY)
44 public:
48 PTY();
49
53 ~PTY();
54
59 int getpt();
60
65 int grantpt();
66
71 int unlockpt();
72
76 const char *ptsname();
77 };
78
79 EDELIB_NS_END
80 #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