[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [libvirt-glib] Add annotations for gvir_stream_add_watch{_full}



This should silence this compile warning:
  GEN    LibvirtGObject-1.0.gir
libvirt-gobject-stream.c:603: Warning: LibvirtGObject:
gvir_stream_add_watch: argument func: Missing (scope) annotation for
callback without GDestroyNotify (valid: call, async)

This also adds API documentation for these functions.
---
 libvirt-gobject/libvirt-gobject-stream.c |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/libvirt-gobject/libvirt-gobject-stream.c b/libvirt-gobject/libvirt-gobject-stream.c
index 6d8bbb8..6b75819 100644
--- a/libvirt-gobject/libvirt-gobject-stream.c
+++ b/libvirt-gobject/libvirt-gobject-stream.c
@@ -613,6 +613,18 @@ GSourceFuncs gvir_stream_source_funcs = {
     .finalize = gvir_stream_source_finalize,
 };
 
+
+/**
+ * gvir_stream_add_watch: (skip):
+ * @stream: the stream
+ * @cond: the conditions to watch for (bitfield of #GVirStreamIOCondition)
+ * @func: (closure opaque): the function to call when the condition is satisfied
+ * @opaque: (closure): user data to pass to @func
+ *
+ * Adds a watch for @stream to the mainloop
+ *
+ * Returns: the event source id
+ */
 guint gvir_stream_add_watch(GVirStream *stream,
                             GVirStreamIOCondition cond,
                             GVirStreamIOFunc func,
@@ -626,6 +638,20 @@ guint gvir_stream_add_watch(GVirStream *stream,
                                       NULL);
 }
 
+/**
+ * gvir_stream_add_watch_full:
+ * @stream: the stream
+ * @priority: the priority of the #GVirStream source
+ * @cond: the conditions to watch for (bitfield of #GVirStreamIOCondition)
+ * @func: (closure opaque): the function to call when the condition is satisfied
+ * @opaque: (closure): user data to pass to @func
+ * @notify: the function to call when the source is removed
+ *
+ * Adds a watch for @stream to the mainloop
+ *
+ * Returns: the event source id
+ * Rename to: gvir_stream_add_watch
+ */
 guint gvir_stream_add_watch_full(GVirStream *stream,
                                  gint priority,
                                  GVirStreamIOCondition cond,
-- 
1.7.7.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]