[libvirt-glib 5/9] Add a few GVirDomain detailled signals

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

 



---
 libvirt-gobject/libvirt-gobject-domain.c |   59 ++++++++++++++++++++++++++++++
 1 files changed, 59 insertions(+), 0 deletions(-)

diff --git a/libvirt-gobject/libvirt-gobject-domain.c b/libvirt-gobject/libvirt-gobject-domain.c
index 75e7eb9..001c787 100644
--- a/libvirt-gobject/libvirt-gobject-domain.c
+++ b/libvirt-gobject/libvirt-gobject-domain.c
@@ -49,6 +49,16 @@ enum {
     PROP_HANDLE,
 };
 
+enum {
+    VIR_STARTED,
+    VIR_SUSPENDED,
+    VIR_RESUMED,
+    VIR_STOPPED,
+    VIR_UPDATED,
+    LAST_SIGNAL
+};
+
+static gint signals[LAST_SIGNAL];
 
 #define GVIR_DOMAIN_ERROR gvir_domain_error_quark()
 
@@ -133,6 +143,55 @@ static void gvir_domain_class_init(GVirDomainClass *klass)
                                                        G_PARAM_STATIC_NICK |
                                                        G_PARAM_STATIC_BLURB));
 
+    signals[VIR_STARTED] = g_signal_new("vir-started",
+                                        G_OBJECT_CLASS_TYPE(object_class),
+                                        G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE |
+                                        G_SIGNAL_NO_HOOKS | G_SIGNAL_DETAILED,
+                                        0,
+                                        NULL, NULL,
+                                        g_cclosure_marshal_VOID__VOID,
+                                        G_TYPE_NONE,
+                                        1, G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+    signals[VIR_SUSPENDED] = g_signal_new("vir-suspended",
+                                        G_OBJECT_CLASS_TYPE(object_class),
+                                        G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE |
+                                        G_SIGNAL_NO_HOOKS | G_SIGNAL_DETAILED,
+                                        0,
+                                        NULL, NULL,
+                                        g_cclosure_marshal_VOID__VOID,
+                                        G_TYPE_NONE,
+                                        1, G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+    signals[VIR_RESUMED] = g_signal_new("vir-resumed",
+                                        G_OBJECT_CLASS_TYPE(object_class),
+                                        G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE |
+                                        G_SIGNAL_NO_HOOKS | G_SIGNAL_DETAILED,
+                                        0,
+                                        NULL, NULL,
+                                        g_cclosure_marshal_VOID__VOID,
+                                        G_TYPE_NONE,
+                                        1, G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+    signals[VIR_STOPPED] = g_signal_new("vir-stopped",
+                                        G_OBJECT_CLASS_TYPE(object_class),
+                                        G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE |
+                                        G_SIGNAL_NO_HOOKS | G_SIGNAL_DETAILED,
+                                        0,
+                                        NULL, NULL,
+                                        g_cclosure_marshal_VOID__VOID,
+                                        G_TYPE_NONE,
+                                        1, G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+    signals[VIR_UPDATED] = g_signal_new("vir-updated",
+                                        G_OBJECT_CLASS_TYPE(object_class),
+                                        G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
+                                        0,
+                                        NULL, NULL,
+                                        g_cclosure_marshal_VOID__VOID,
+                                        G_TYPE_NONE,
+                                        0);
+
     g_type_class_add_private(klass, sizeof(GVirDomainPrivate));
 }
 
-- 
1.7.6.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]