|
| PollableInputStream (PollableInputStream &&src) noexcept |
|
PollableInputStream & | operator= (PollableInputStream &&src) noexcept |
|
| ~PollableInputStream () noexcept override |
|
GPollableInputStream * | gobj () |
| Provides access to the underlying C GObject.
|
|
const GPollableInputStream * | gobj () const |
| Provides access to the underlying C GObject.
|
|
bool | can_poll () const |
| Checks if stream is actually pollable.
|
|
bool | is_readable () const |
| Checks if stream can be read.
|
|
gssize | read_nonblocking (void *buffer, gsize count, const Glib::RefPtr< Cancellable > &cancellable) |
| Attempts to read up to count bytes from stream into buffer, as with g_input_stream_read().
|
|
gssize | read_nonblocking (void *buffer, gsize count) |
| A read_nonblocking() convenience overload.
|
|
| Interface () |
| A Default constructor.
|
|
| Interface (Interface &&src) noexcept |
|
Interface & | operator= (Interface &&src) noexcept |
|
| Interface (const Glib::Interface_Class &interface_class) |
| Called by constructors of derived classes.
|
|
| Interface (GObject *castitem) |
| Called by constructors of derived classes.
|
|
| ~Interface () noexcept override |
|
| Interface (const Interface &)=delete |
|
Interface & | operator= (const Interface &)=delete |
|
GObject * | gobj () |
|
const GObject * | gobj () const |
|
| ObjectBase (const ObjectBase &)=delete |
|
ObjectBase & | operator= (const ObjectBase &)=delete |
|
void | set_property_value (const Glib::ustring & property_name, const Glib::ValueBase & value) |
| You probably want to use a specific property_*() accessor method instead.
|
|
void | get_property_value (const Glib::ustring & property_name, Glib::ValueBase & value) const |
| You probably want to use a specific property_*() accessor method instead.
|
|
template<class PropertyType > |
void | set_property (const Glib::ustring & property_name, const PropertyType & value) |
| You probably want to use a specific property_*() accessor method instead.
|
|
template<class PropertyType > |
void | get_property (const Glib::ustring & property_name, PropertyType & value) const |
| You probably want to use a specific property_*() accessor method instead.
|
|
template<class PropertyType > |
PropertyType | get_property (const Glib::ustring & property_name) const |
| You probably want to use a specific property_*() accessor method instead.
|
|
sigc::connection | connect_property_changed (const Glib::ustring & property_name, const sigc::slot< void()> &slot) |
| You can use the signal_changed() signal of the property proxy instead.
|
|
sigc::connection | connect_property_changed (const Glib::ustring & property_name, sigc::slot< void()> &&slot) |
| You can use the signal_changed() signal of the property proxy instead.
|
|
void | freeze_notify () |
| Increases the freeze count on object.
|
|
void | thaw_notify () |
| Reverts the effect of a previous call to freeze_notify().
|
|
virtual void | reference () const |
| Increment the reference count for this object.
|
|
virtual void | unreference () const |
| Decrement the reference count for this object.
|
|
GObject * | gobj () |
| Provides access to the underlying C GObject.
|
|
const GObject * | gobj () const |
| Provides access to the underlying C GObject.
|
|
GObject * | gobj_copy () const |
| Give a ref-ed copy to someone. Use for direct struct access.
|
|
PollableInputStream - Interface for pollable input streams.
PollableInputStream is implemented by InputStreams that can be polled for readiness to read. This can be used when interfacing with a non-GIO API that expects UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
- Since glibmm 2.34:
Attempts to read up to count bytes from stream into buffer, as with g_input_stream_read().
If stream is not currently readable, this will immediately return Gio::Error::WOULD_BLOCK, and you can use g_pollable_input_stream_create_source() to create a Source that will be triggered when stream is readable.
Note that since this method never blocks, you cannot actually use cancellable to cancel it. However, it will return an error if cancellable has already been cancelled when you call, which may happen if you call this method after a source triggers due to having been cancelled.
The behaviour of this method is undefined if g_pollable_input_stream_can_poll() returns false
for stream.
- Parameters
-
buffer | A buffer to read data into (which should be at least count bytes long). |
count | The number of bytes you want to read. |
cancellable | A Cancellable, or nullptr . |
- Returns
- The number of bytes read, or -1 on error (including Gio::Error::WOULD_BLOCK).
- Exceptions
-