1 // Generated by gmmproc 2.64.2 -- DO NOT MODIFY! 2 #ifndef _GIOMM_UNIXINPUTSTREAM_H 3 #define _GIOMM_UNIXINPUTSTREAM_H 4 5 6 #include <glibmm/ustring.h> 7 #include <sigc++/sigc++.h> 8 9 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- 10 11 /* Copyright (C) 2007 The gtkmm Development Team 12 * 13 * This library is free software; you can redistribute it and/or 14 * modify it under the terms of the GNU Lesser General Public 15 * License as published by the Free Software Foundation; either 16 * version 2.1 of the License, or (at your option) any later version. 17 * 18 * This library is distributed in the hope that it will be useful, 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 * Lesser General Public License for more details. 22 * 23 * You should have received a copy of the GNU Lesser General Public 24 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 25 */ 26 27 #include <giomm/inputstream.h> 28 29 30 #ifndef DOXYGEN_SHOULD_SKIP_THIS 31 using GUnixInputStream = struct _GUnixInputStream; 32 using GUnixInputStreamClass = struct _GUnixInputStreamClass; 33 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 34 35 36 #ifndef DOXYGEN_SHOULD_SKIP_THIS 37 namespace Gio 38 { class GIOMM_API UnixInputStream_Class; } // namespace Gio 39 #endif //DOXYGEN_SHOULD_SKIP_THIS 40 41 namespace Gio 42 { 43 44 /** 45 * UnixInputStream implements InputStream for reading from a unix file 46 * descriptor, including asynchronous operations. The file descriptor must be 47 * selectable, so it doesn't work with opened files. 48 * 49 * @ingroup Streams 50 * 51 * @newin{2,16} 52 */ 53 54 class GIOMM_API UnixInputStream : public Gio::InputStream 55 { 56 57 #ifndef DOXYGEN_SHOULD_SKIP_THIS 58 59 public: 60 using CppObjectType = UnixInputStream; 61 using CppClassType = UnixInputStream_Class; 62 using BaseObjectType = GUnixInputStream; 63 using BaseClassType = GUnixInputStreamClass; 64 65 // noncopyable 66 UnixInputStream(const UnixInputStream&) = delete; 67 UnixInputStream& operator=(const UnixInputStream&) = delete; 68 69 private: friend class UnixInputStream_Class; 70 static CppClassType unixinputstream_class_; 71 72 protected: 73 explicit UnixInputStream(const Glib::ConstructParams& construct_params); 74 explicit UnixInputStream(GUnixInputStream* castitem); 75 76 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 77 78 public: 79 80 UnixInputStream(UnixInputStream&& src) noexcept; 81 UnixInputStream& operator=(UnixInputStream&& src) noexcept; 82 83 ~UnixInputStream() noexcept override; 84 85 /** Get the GType for this class, for use with the underlying GObject type system. 86 */ 87 static GType get_type() G_GNUC_CONST; 88 89 #ifndef DOXYGEN_SHOULD_SKIP_THIS 90 91 92 static GType get_base_type() G_GNUC_CONST; 93 #endif 94 95 ///Provides access to the underlying C GObject. gobj()96 GUnixInputStream* gobj() { return reinterpret_cast<GUnixInputStream*>(gobject_); } 97 98 ///Provides access to the underlying C GObject. gobj()99 const GUnixInputStream* gobj() const { return reinterpret_cast<GUnixInputStream*>(gobject_); } 100 101 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. 102 GUnixInputStream* gobj_copy(); 103 104 private: 105 106 //This is not available on Win32. 107 //This source file will not be compiled on Win32, 108 //and no class defined in it will be registered by wrap_init(). 109 110 111 protected: 112 explicit UnixInputStream(int fd, bool close_fd); 113 114 115 public: 116 117 static Glib::RefPtr<UnixInputStream> create(int fd, bool close_fd); 118 119 120 /** Sets whether the file descriptor of @a stream shall be closed 121 * when the stream is closed. 122 * 123 * @newin{2,20} 124 * 125 * @param close_fd <tt>true</tt> to close the file descriptor when done. 126 */ 127 void set_close_fd(bool close_fd = true); 128 129 /** Returns whether the file descriptor of @a stream will be 130 * closed when the stream is closed. 131 * 132 * @newin{2,20} 133 * 134 * @return <tt>true</tt> if the file descriptor is closed when done. 135 */ 136 bool get_close_fd() const; 137 138 /** Return the UNIX file descriptor that the stream reads from. 139 * 140 * @newin{2,20} 141 * 142 * @return The file descriptor of @a stream. 143 */ 144 int get_fd() const; 145 146 /** The file descriptor that the stream reads from. 147 * 148 * @newin{2,20} 149 * 150 * Default value: -1 151 * 152 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 153 * or receive notification when the value of the property changes. 154 */ 155 Glib::PropertyProxy_ReadOnly< int > property_fd() const; 156 157 158 /** Whether to close the file descriptor when the stream is closed. 159 * 160 * @newin{2,20} 161 * 162 * Default value: <tt>true</tt> 163 * 164 * @return A PropertyProxy that allows you to get or set the value of the property, 165 * or receive notification when the value of the property changes. 166 */ 167 Glib::PropertyProxy< bool > property_close_fd() ; 168 169 /** Whether to close the file descriptor when the stream is closed. 170 * 171 * @newin{2,20} 172 * 173 * Default value: <tt>true</tt> 174 * 175 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 176 * or receive notification when the value of the property changes. 177 */ 178 Glib::PropertyProxy_ReadOnly< bool > property_close_fd() const; 179 180 181 public: 182 183 public: 184 //C++ methods used to invoke GTK+ virtual functions: 185 186 protected: 187 //GTK+ Virtual Functions (override these to change behaviour): 188 189 //Default Signal Handlers:: 190 191 192 }; 193 194 } // namespace Gio 195 196 197 namespace Glib 198 { 199 /** A Glib::wrap() method for this object. 200 * 201 * @param object The C instance. 202 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. 203 * @result A C++ instance that wraps this C instance. 204 * 205 * @relates Gio::UnixInputStream 206 */ 207 GIOMM_API 208 Glib::RefPtr<Gio::UnixInputStream> wrap(GUnixInputStream* object, bool take_copy = false); 209 } 210 211 212 #endif /* _GIOMM_UNIXINPUTSTREAM_H */ 213 214