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

[libvirt] [PATCH 2/3] Remove vir_ prefix from default signal handler



Let's keep the signal and default signal handler name in sync.

gobject signals are generally not namespaced this way, removing
this prefix makes things look a bit nicer.
---
 libvirt-gobject/libvirt-gobject-connection.c |    8 ++++----
 libvirt-gobject/libvirt-gobject-connection.h |    8 ++++----
 libvirt-gobject/libvirt-gobject-domain.c     |   10 +++++-----
 libvirt-gobject/libvirt-gobject-domain.h     |   10 +++++-----
 libvirt-gobject/libvirt-gobject-manager.c    |    4 ++--
 libvirt-gobject/libvirt-gobject-manager.h    |    4 ++--
 libvirt-gobject/libvirt-gobject-network.h    |    4 ++--
 7 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/libvirt-gobject/libvirt-gobject-connection.c b/libvirt-gobject/libvirt-gobject-connection.c
index 8813e96..30b7792 100644
--- a/libvirt-gobject/libvirt-gobject-connection.c
+++ b/libvirt-gobject/libvirt-gobject-connection.c
@@ -173,7 +173,7 @@ static void gvir_connection_class_init(GVirConnectionClass *klass)
     signals[VIR_CONNECTION_OPENED] = g_signal_new("connection-opened",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_FIRST,
-                 G_STRUCT_OFFSET(GVirConnectionClass, vir_connection_opened),
+                 G_STRUCT_OFFSET(GVirConnectionClass, connection_opened),
                  NULL, NULL,
                  g_cclosure_marshal_VOID__VOID,
                  G_TYPE_NONE,
@@ -182,7 +182,7 @@ static void gvir_connection_class_init(GVirConnectionClass *klass)
     signals[VIR_CONNECTION_CLOSED] = g_signal_new("connection-closed",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_FIRST,
-                 G_STRUCT_OFFSET(GVirConnectionClass, vir_connection_closed),
+                 G_STRUCT_OFFSET(GVirConnectionClass, connection_closed),
                  NULL, NULL,
                  g_cclosure_marshal_VOID__VOID,
                  G_TYPE_NONE,
@@ -191,7 +191,7 @@ static void gvir_connection_class_init(GVirConnectionClass *klass)
     signals[VIR_DOMAIN_ADDED] = g_signal_new("domain-added",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_FIRST,
-                 G_STRUCT_OFFSET(GVirConnectionClass, vir_domain_added),
+                 G_STRUCT_OFFSET(GVirConnectionClass, domain_added),
                  NULL, NULL,
                  g_cclosure_marshal_VOID__OBJECT,
                  G_TYPE_NONE,
@@ -201,7 +201,7 @@ static void gvir_connection_class_init(GVirConnectionClass *klass)
     signals[VIR_DOMAIN_REMOVED] = g_signal_new("domain-removed",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_FIRST,
-                 G_STRUCT_OFFSET(GVirConnectionClass, vir_domain_removed),
+                 G_STRUCT_OFFSET(GVirConnectionClass, domain_removed),
                  NULL, NULL,
                  g_cclosure_marshal_VOID__OBJECT,
                  G_TYPE_NONE,
diff --git a/libvirt-gobject/libvirt-gobject-connection.h b/libvirt-gobject/libvirt-gobject-connection.h
index 2eb58ec..8c1d1a4 100644
--- a/libvirt-gobject/libvirt-gobject-connection.h
+++ b/libvirt-gobject/libvirt-gobject-connection.h
@@ -56,11 +56,11 @@ struct _GVirConnectionClass
     GObjectClass parent_class;
 
     /* signals */
-    void (*vir_connection_opened)(GVirConnection *conn);
-    void (*vir_connection_closed)(GVirConnection *conn);
+    void (*connection_opened)(GVirConnection *conn);
+    void (*connection_closed)(GVirConnection *conn);
 
-    void (*vir_domain_added)(GVirConnection *conn, GVirDomain *dom);
-    void (*vir_domain_removed)(GVirConnection *conn, GVirDomain *dom);
+    void (*domain_added)(GVirConnection *conn, GVirDomain *dom);
+    void (*domain_removed)(GVirConnection *conn, GVirDomain *dom);
 
     GVirStream *(*stream_new)(GVirConnection *conn, gpointer handle);
 
diff --git a/libvirt-gobject/libvirt-gobject-domain.c b/libvirt-gobject/libvirt-gobject-domain.c
index 70d8d6d..5bbd7d1 100644
--- a/libvirt-gobject/libvirt-gobject-domain.c
+++ b/libvirt-gobject/libvirt-gobject-domain.c
@@ -163,7 +163,7 @@ static void gvir_domain_class_init(GVirDomainClass *klass)
                                         G_OBJECT_CLASS_TYPE(object_class),
                                         G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE |
                                         G_SIGNAL_NO_HOOKS | G_SIGNAL_DETAILED,
-                                        G_STRUCT_OFFSET(GVirDomainClass, vir_domain_started),
+                                        G_STRUCT_OFFSET(GVirDomainClass, started),
                                         NULL, NULL,
                                         g_cclosure_marshal_VOID__VOID,
                                         G_TYPE_NONE,
@@ -173,7 +173,7 @@ static void gvir_domain_class_init(GVirDomainClass *klass)
                                         G_OBJECT_CLASS_TYPE(object_class),
                                         G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE |
                                         G_SIGNAL_NO_HOOKS | G_SIGNAL_DETAILED,
-                                        G_STRUCT_OFFSET(GVirDomainClass, vir_domain_suspended),
+                                        G_STRUCT_OFFSET(GVirDomainClass, suspended),
                                         NULL, NULL,
                                         g_cclosure_marshal_VOID__VOID,
                                         G_TYPE_NONE,
@@ -183,7 +183,7 @@ static void gvir_domain_class_init(GVirDomainClass *klass)
                                         G_OBJECT_CLASS_TYPE(object_class),
                                         G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE |
                                         G_SIGNAL_NO_HOOKS | G_SIGNAL_DETAILED,
-                                        G_STRUCT_OFFSET(GVirDomainClass, vir_domain_resumed),
+                                        G_STRUCT_OFFSET(GVirDomainClass, resumed),
                                         NULL, NULL,
                                         g_cclosure_marshal_VOID__VOID,
                                         G_TYPE_NONE,
@@ -193,7 +193,7 @@ static void gvir_domain_class_init(GVirDomainClass *klass)
                                         G_OBJECT_CLASS_TYPE(object_class),
                                         G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE |
                                         G_SIGNAL_NO_HOOKS | G_SIGNAL_DETAILED,
-                                        G_STRUCT_OFFSET(GVirDomainClass, vir_domain_stopped),
+                                        G_STRUCT_OFFSET(GVirDomainClass, stopped),
                                         NULL, NULL,
                                         g_cclosure_marshal_VOID__VOID,
                                         G_TYPE_NONE,
@@ -202,7 +202,7 @@ static void gvir_domain_class_init(GVirDomainClass *klass)
     signals[VIR_UPDATED] = g_signal_new("updated",
                                         G_OBJECT_CLASS_TYPE(object_class),
                                         G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
-                                        G_STRUCT_OFFSET(GVirDomainClass, vir_domain_updated),
+                                        G_STRUCT_OFFSET(GVirDomainClass, updated),
                                         NULL, NULL,
                                         g_cclosure_marshal_VOID__VOID,
                                         G_TYPE_NONE,
diff --git a/libvirt-gobject/libvirt-gobject-domain.h b/libvirt-gobject/libvirt-gobject-domain.h
index 6af2a92..5199f7c 100644
--- a/libvirt-gobject/libvirt-gobject-domain.h
+++ b/libvirt-gobject/libvirt-gobject-domain.h
@@ -59,11 +59,11 @@ struct _GVirDomainClass
     GObjectClass parent_class;
 
     /* signals */
-    void (*vir_domain_started)(GVirDomain *dom);
-    void (*vir_domain_stopped)(GVirDomain *dom);
-    void (*vir_domain_resumed)(GVirDomain *dom);
-    void (*vir_domain_updated)(GVirDomain *dom);
-    void (*vir_domain_suspended)(GVirDomain *dom);
+    void (*started)(GVirDomain *dom);
+    void (*stopped)(GVirDomain *dom);
+    void (*resumed)(GVirDomain *dom);
+    void (*updated)(GVirDomain *dom);
+    void (*suspended)(GVirDomain *dom);
 
     gpointer padding[20];
 };
diff --git a/libvirt-gobject/libvirt-gobject-manager.c b/libvirt-gobject/libvirt-gobject-manager.c
index ae3e4a1..5022216 100644
--- a/libvirt-gobject/libvirt-gobject-manager.c
+++ b/libvirt-gobject/libvirt-gobject-manager.c
@@ -91,7 +91,7 @@ static void gvir_manager_class_init(GVirManagerClass *klass)
     g_signal_new("connection-added",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_FIRST,
-                 G_STRUCT_OFFSET(GVirManagerClass, vir_connection_added),
+                 G_STRUCT_OFFSET(GVirManagerClass, connection_added),
                  NULL, NULL,
                  g_cclosure_marshal_VOID__OBJECT,
                  G_TYPE_NONE,
@@ -100,7 +100,7 @@ static void gvir_manager_class_init(GVirManagerClass *klass)
     g_signal_new("connection-removed",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_FIRST,
-                 G_STRUCT_OFFSET(GVirManagerClass, vir_connection_removed),
+                 G_STRUCT_OFFSET(GVirManagerClass, connection_removed),
                  NULL, NULL,
                  g_cclosure_marshal_VOID__OBJECT,
                  G_TYPE_NONE,
diff --git a/libvirt-gobject/libvirt-gobject-manager.h b/libvirt-gobject/libvirt-gobject-manager.h
index 5fe1e76..88a2dd6 100644
--- a/libvirt-gobject/libvirt-gobject-manager.h
+++ b/libvirt-gobject/libvirt-gobject-manager.h
@@ -55,8 +55,8 @@ struct _GVirManagerClass
     GObjectClass parent_class;
 
     /* Signals */
-    void (*vir_connection_added)(GVirManager *man, GVirConnection *conn);
-    void (*vir_connection_removed)(GVirManager *man, GVirConnection *conn);
+    void (*connection_added)(GVirManager *man, GVirConnection *conn);
+    void (*connection_removed)(GVirManager *man, GVirConnection *conn);
 
     gpointer padding[20];
 };
diff --git a/libvirt-gobject/libvirt-gobject-network.h b/libvirt-gobject/libvirt-gobject-network.h
index 79f37e7..7b3d2dc 100644
--- a/libvirt-gobject/libvirt-gobject-network.h
+++ b/libvirt-gobject/libvirt-gobject-network.h
@@ -55,8 +55,8 @@ struct _GVirNetworkClass
 {
     GObjectClass parent_class;
 
-    void (*vir_network_started)(GVirNetwork *net);
-    void (*vir_network_stopped)(GVirNetwork *net);
+    void (*started)(GVirNetwork *net);
+    void (*stopped)(GVirNetwork *net);
 
     gpointer padding[20];
 };
-- 
1.7.6.2


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