| Top |  |  |  |  | 
| gint | (*GVirStreamSinkFunc) () | 
| gint | (*GVirStreamSourceFunc) () | 
| gboolean | (*GVirStreamIOFunc) () | 
| guint | gvir_stream_add_watch () | 
| guint | gvir_stream_add_watch_full () | 
| gssize | gvir_stream_receive_all () | 
| gssize | gvir_stream_receive () | 
| gssize | gvir_stream_send_all () | 
| gssize | gvir_stream_send () | 
gint (*GVirStreamSinkFunc) (GVirStream *stream,const gchar *buf,gsize nbytes,gpointer user_data);
gint (*GVirStreamSourceFunc) (GVirStream *stream,gchar *buf,gsize nbytes,gpointer user_data);
gboolean (*GVirStreamIOFunc) (GVirStream *stream,GVirStreamIOCondition cond,gpointer opaque);
guint gvir_stream_add_watch (GVirStream *stream,GVirStreamIOCondition cond,GVirStreamIOFunc func,gpointer opaque);
Adds a watch for stream
 to the mainloop
[skip]
| stream | the stream | |
| cond | the conditions to watch for (bitfield of GVirStreamIOCondition) | |
| func | the function to call when the condition is satisfied. | [closure opaque] | 
| opaque |  user data to pass to  | [closure] | 
guint gvir_stream_add_watch_full (GVirStream *stream,gint priority,GVirStreamIOCondition cond,GVirStreamIOFunc func,gpointer opaque,GDestroyNotify notify);
Adds a watch for stream
 to the mainloop
[rename-to gvir_stream_add_watch]
| stream | the stream | |
| priority | the priority of the GVirStream source | |
| cond | the conditions to watch for (bitfield of GVirStreamIOCondition) | |
| func | the function to call when the condition is satisfied. | [closure opaque] | 
| opaque |  user data to pass to  | [closure] | 
| notify | the function to call when the source is removed | 
gssize gvir_stream_receive_all (GVirStream *stream,GCancellable *cancellable,GVirStreamSinkFunc func,gpointer user_data,GError **error);
Receive the entire data stream, sending the data to the requested data sink. This is simply a convenient alternative to virStreamRecv, for apps that do blocking-I/o.
gssize gvir_stream_receive (GVirStream *stream,gchar *buffer,gsize size,GCancellable *cancellable,GError **error);
Receive data (up to size
 bytes) from a stream.
On error -1 is returned and error
 is set accordingly.
gvir_stream_receive() can return any number of bytes, up to
size
. If more than size
 bytes have been received, the additional
data will be returned in future calls to gvir_stream_receive().
If there is no data available, a G_IO_ERROR_WOULD_BLOCK error will be
returned.
| stream | the stream | |
| buffer |  a buffer
to read data into (which should be at least  | [array length=size][element-type guint8] | 
| size | the number of bytes you want to read from the stream | |
| cancellable |  a  | [allow-none] | 
| error | GError for error reporting, or  | 
gssize gvir_stream_send_all (GVirStream *stream,GCancellable *cancellable,GVirStreamSourceFunc func,gpointer user_data,GError **error);
Send the entire data stream, sending the data to the requested data source. This is simply a convenient alternative to virStreamRecv, for apps that do blocking-I/o.
gssize gvir_stream_send (GVirStream *stream,const gchar *buffer,gsize size,GCancellable *cancellable,GError **error);
Send data (up to size
 bytes) from a stream.
On error -1 is returned and error
 is set accordingly.
gvir_stream_send() can return any number of bytes, up to
size
. If more than size
 bytes have been sendd, the additional
data will be returned in future calls to gvir_stream_send().
If there is no data available, a G_IO_ERROR_WOULD_BLOCK error will be
returned.