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

[virt-tools-list] [PATCH 07/47] Santize naming of device, hypervisor and os object APIs



The GObject naming conversion is lowercase, separated
by underscores. This needs to be followed to allow
gobject introspection to be auto-generated easily.

* osinfo/osinfo_device.c, osinfo/osinfo_device.h,
  osinfo/osinfo_hypervisor.c, osinfo/osinfo_hypervisor.h,
  osinfo/osinfo_os.c, osinfo/osinfo_os.h: Convert
  API naming to use lowercase + underscores. Add
  explicit constructors.
---
 osinfo/osinfo_device.c     |   10 +++++-----
 osinfo/osinfo_device.h     |    2 +-
 osinfo/osinfo_hypervisor.c |    4 ++--
 osinfo/osinfo_hypervisor.h |    4 ++--
 osinfo/osinfo_os.c         |    6 +++---
 osinfo/osinfo_os.h         |    6 +++---
 6 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/osinfo/osinfo_device.c b/osinfo/osinfo_device.c
index 41b6738..a477fae 100644
--- a/osinfo/osinfo_device.c
+++ b/osinfo/osinfo_device.c
@@ -32,11 +32,11 @@ osinfo_device_init (OsinfoDevice *self)
     self->priv = priv = OSINFO_DEVICE_GET_PRIVATE(self);
 }
 
-gchar *osinfoGetDeviceDriver(OsinfoDevice *self,
-                             gchar *devType,
-                             OsinfoOs *os,
-                             OsinfoHypervisor *hv,
-                             GError **err)
+gchar *osinfo_device_get_driver(OsinfoDevice *self,
+				gchar *devType,
+				OsinfoOs *os,
+				OsinfoHypervisor *hv,
+				GError **err)
 {
     if (!__osinfoCheckGErrorParamValid(err))
         return NULL;
diff --git a/osinfo/osinfo_device.h b/osinfo/osinfo_device.h
index 41d89ca..9883f1f 100644
--- a/osinfo/osinfo_device.h
+++ b/osinfo/osinfo_device.h
@@ -46,6 +46,6 @@ struct _OsinfoDeviceClass
 
 GType osinfo_device_get_type(void);
 
-gchar *osinfoGetDeviceDriver(OsinfoDevice *self, gchar *devType, OsinfoOs *os, OsinfoHypervisor *hv, GError **err);
+gchar *osinfo_device_get_driver(OsinfoDevice *self, gchar *devType, OsinfoOs *os, OsinfoHypervisor *hv, GError **err);
 
 #endif /* __OSINFO_DEVICE_H__ */
diff --git a/osinfo/osinfo_hypervisor.c b/osinfo/osinfo_hypervisor.c
index e2c7951..15d803d 100644
--- a/osinfo/osinfo_hypervisor.c
+++ b/osinfo/osinfo_hypervisor.c
@@ -54,7 +54,7 @@ void __osinfoClearDeviceSectionHv(OsinfoHypervisor *self, gchar *section)
     __osinfoClearDeviceSection(self->priv->sections, self->priv->sectionsAsList, section);
 }
 
-GPtrArray *osinfoGetHypervisorDeviceTypes(OsinfoHypervisor *self, GError **err)
+GPtrArray *osinfo_hypervisor_get_device_types(OsinfoHypervisor *self, GError **err)
 {
     if (!__osinfoCheckGErrorParamValid(err))
         return NULL;
@@ -76,7 +76,7 @@ GPtrArray *osinfoGetHypervisorDeviceTypes(OsinfoHypervisor *self, GError **err)
     return deviceTypes;
 }
 
-OsinfoDeviceList *osinfoGetHypervisorDevicesByType(OsinfoHypervisor *self, gchar *devType, OsinfoFilter *filter, GError **err)
+OsinfoDeviceList *osinfo_hypervisor_get_devices_by_type(OsinfoHypervisor *self, gchar *devType, OsinfoFilter *filter, GError **err)
 {
     if (!__osinfoCheckGErrorParamValid(err))
         return NULL;
diff --git a/osinfo/osinfo_hypervisor.h b/osinfo/osinfo_hypervisor.h
index 3ec4f8b..d7f1f56 100644
--- a/osinfo/osinfo_hypervisor.h
+++ b/osinfo/osinfo_hypervisor.h
@@ -48,7 +48,7 @@ struct _OsinfoHypervisorClass
 
 GType osinfo_hypervisor_get_type(void);
 
-GPtrArray *osinfoGetHypervisorDeviceTypes(OsinfoHypervisor *self, GError **err);
-OsinfoDeviceList *osinfoGetHypervisorDevicesByType(OsinfoHypervisor *self, gchar *devType, OsinfoFilter *filter, GError **err);
+GPtrArray *osinfo_hypervisor_get_device_types(OsinfoHypervisor *self, GError **err);
+OsinfoDeviceList *osinfo_hypervisor_get_devices_by_type(OsinfoHypervisor *self, gchar *devType, OsinfoFilter *filter, GError **err);
 
 #endif /* __OSINFO_HYPERVISOR_H__ */
diff --git a/osinfo/osinfo_os.c b/osinfo/osinfo_os.c
index b43940f..8420bdd 100644
--- a/osinfo/osinfo_os.c
+++ b/osinfo/osinfo_os.c
@@ -222,7 +222,7 @@ void __osinfoRemoveHvSectionFromOs(OsinfoOs *self, gchar *hvId)
     g_tree_remove(self->priv->hypervisors, hvId);
 }
 
-OsinfoDevice *osinfoGetPreferredDeviceForOs(OsinfoOs *self, OsinfoHypervisor *hv, gchar *devType, OsinfoFilter *filter, GError **err)
+OsinfoDevice *osinfo_os_get_preferred_device(OsinfoOs *self, OsinfoHypervisor *hv, gchar *devType, OsinfoFilter *filter, GError **err)
 {
     if (!__osinfoCheckGErrorParamValid(err))
         return NULL;
@@ -280,7 +280,7 @@ OsinfoDevice *osinfoGetPreferredDeviceForOs(OsinfoOs *self, OsinfoHypervisor *hv
     return NULL;
 }
 
-OsinfoOsList *osinfoGetRelatedOs(OsinfoOs *self, osinfoRelationship relshp, GError **err)
+OsinfoOsList *osinfo_os_get_related(OsinfoOs *self, osinfoRelationship relshp, GError **err)
 {
     if (!__osinfoCheckGErrorParamValid(err))
         return NULL;
@@ -316,7 +316,7 @@ OsinfoOsList *osinfoGetRelatedOs(OsinfoOs *self, osinfoRelationship relshp, GErr
     return newList;
 }
 
-OsinfoDeviceList *osinfoGetDevicesForOs(OsinfoOs *self, OsinfoHypervisor *hv, gchar *devType, OsinfoFilter *filter, GError **err)
+OsinfoDeviceList *osinfo_os_get_devices(OsinfoOs *self, OsinfoHypervisor *hv, gchar *devType, OsinfoFilter *filter, GError **err)
 {
     if (!__osinfoCheckGErrorParamValid(err))
         return NULL;
diff --git a/osinfo/osinfo_os.h b/osinfo/osinfo_os.h
index b4c6497..48db03a 100644
--- a/osinfo/osinfo_os.h
+++ b/osinfo/osinfo_os.h
@@ -50,8 +50,8 @@ struct _OsinfoOsClass
 
 GType osinfo_os_get_type(void);
 
-OsinfoDevice *osinfoGetPreferredDeviceForOs(OsinfoOs *self, OsinfoHypervisor *hv, gchar *devType, OsinfoFilter *filter, GError **err);
-OsinfoOsList *osinfoGetRelatedOs(OsinfoOs *self, osinfoRelationship relshp, GError **err);
-OsinfoDeviceList *osinfoGetDevicesForOs(OsinfoOs *self, OsinfoHypervisor *hv, gchar *devType, OsinfoFilter *filter, GError **err);
+OsinfoDevice *osinfo_os_get_preferred_device(OsinfoOs *self, OsinfoHypervisor *hv, gchar *devType, OsinfoFilter *filter, GError **err);
+OsinfoOsList *osinfo_os_get_related(OsinfoOs *self, osinfoRelationship relshp, GError **err);
+OsinfoDeviceList *osinfo_os_get_devices(OsinfoOs *self, OsinfoHypervisor *hv, gchar *devType, OsinfoFilter *filter, GError **err);
 
 #endif /* __OSINFO_OS_H__ */
-- 
1.7.2.1


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