paludis  Version 2.6.0
pty.hh
Go to the documentation of this file.
1 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
2 
3 /*
4  * Copyright (c) 2006, 2007, 2010 Ciaran McCreesh
5  * Copyright (c) 2009 David Leverton
6  *
7  * This file is part of the Paludis package manager. Paludis is free software;
8  * you can redistribute it and/or modify it under the terms of the GNU General
9  * Public License version 2, as published by the Free Software Foundation.
10  *
11  * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
12  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14  * details.
15  *
16  * You should have received a copy of the GNU General Public License along with
17  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
18  * Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 
21 #ifndef PALUDIS_GUARD_PALUDIS_UTIL_PTY_HH
22 #define PALUDIS_GUARD_PALUDIS_UTIL_PTY_HH 1
23 
24 #include <paludis/util/channel.hh>
26 
27 /** \file
28  * Declaration for the Pty class.
29  *
30  * \ingroup g_system
31  *
32  * \section Examples
33  *
34  * - None at this time.
35  */
36 
37 namespace paludis
38 {
39  /**
40  * Thrown if a pty cannot be allocated and opened.
41  *
42  * \ingroup g_exceptions
43  * \ingroup g_system
44  * \nosubgrouping
45  */
47  public Exception
48  {
49  public:
50  ///\name Basic operations
51  ///\{
52 
53  PtyError(const std::string & message) noexcept;
54 
55  ///\}
56  };
57 
58  /**
59  * Wrapper around pty file descriptors.
60  *
61  * \ingroup g_system
62  * \nosubgrouping
63  */
65  public Channel
66  {
67  public:
68  ///\name Basic operations
69  ///\{
70 
71  Pty();
72  explicit Pty(const bool close_exec);
73  explicit Pty(const bool close_exec, const unsigned short columns, const unsigned short lines);
74 
75  virtual ~Pty();
76 
77  ///\}
78 
79  };
80 
81 }
82 
83 #endif
Definition: about_metadata-fwd.hh:23
Definition: exception.hh:74
Definition: pty.hh:46
Definition: pty.hh:64
Definition: channel.hh:44
#define PALUDIS_VISIBLE
Definition: attributes.hh:59