[virt-tools-list] [libosinfo 1/2] 'new' -> 'create' in osinfo_media_new_from_location()
Zeeshan Ali (Khattak)
zeeshanak at gnome.org
Tue Aug 23 20:47:42 UTC 2011
From: "Zeeshan Ali (Khattak)" <zeeshanak at gnome.org>
Renaming osinfo_media_new_from_location() to
osinfo_media_create_from_location() to emphasize the factory nature
of this function.
Also the convention in g* world is to keep _new() as only thin wrappers
around g_object_new() calls.
---
docs/reference/Libosinfo-sections.txt | 2 +-
osinfo/libosinfo.syms | 2 +-
osinfo/osinfo_media.c | 8 ++++----
osinfo/osinfo_media.h | 6 +++---
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/docs/reference/Libosinfo-sections.txt b/docs/reference/Libosinfo-sections.txt
index e44b5ae..e2454da 100644
--- a/docs/reference/Libosinfo-sections.txt
+++ b/docs/reference/Libosinfo-sections.txt
@@ -403,7 +403,7 @@ OsinfoMedia
OsinfMediaoClass
OsinfMediaoPrivate
osinfo_media_new
-osinfo_media_new_from_location
+osinfo_media_create_from_location
osinfo_media_get_architecture
osinfo_media_get_url
osinfo_media_get_volume_id
diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms
index 0e9751d..6541a90 100644
--- a/osinfo/libosinfo.syms
+++ b/osinfo/libosinfo.syms
@@ -143,7 +143,7 @@ LIBOSINFO_0.0.1 {
osinfo_media_get_type;
osinfo_media_error_quark;
osinfo_media_new;
- osinfo_media_new_from_location;
+ osinfo_media_create_from_location;
osinfo_media_get_architecture;
osinfo_media_get_url;
osinfo_media_get_volume_id;
diff --git a/osinfo/osinfo_media.c b/osinfo/osinfo_media.c
index 449f45a..431ae72 100644
--- a/osinfo/osinfo_media.c
+++ b/osinfo/osinfo_media.c
@@ -127,7 +127,7 @@ OsinfoMedia *osinfo_media_new(const gchar *id,
}
/**
- * osinfo_media_new_from_location:
+ * osinfo_media_create_from_location:
* @location: the location of an installation media
* @cancellable (allow-none): a #GCancellable, or %NULL
* @error: The location where to store any error, or %NULL
@@ -139,9 +139,9 @@ OsinfoMedia *osinfo_media_new(const gchar *id,
*
* Returns: (transfer full): a new #OsinfoMedia , or NULL on error
*/
-OsinfoMedia *osinfo_media_new_from_location(const gchar *location,
- GCancellable *cancellable,
- GError **error)
+OsinfoMedia *osinfo_media_create_from_location(const gchar *location,
+ GCancellable *cancellable,
+ GError **error)
{
OsinfoMedia *ret = NULL;
PrimaryVolumeDescriptor pvd;
diff --git a/osinfo/osinfo_media.h b/osinfo/osinfo_media.h
index 9d68c6e..89eb1f6 100644
--- a/osinfo/osinfo_media.h
+++ b/osinfo/osinfo_media.h
@@ -98,9 +98,9 @@ struct _OsinfoMediaClass
GType osinfo_media_get_type(void);
OsinfoMedia *osinfo_media_new(const gchar *id, const gchar *architecture);
-OsinfoMedia *osinfo_media_new_from_location(const gchar *location,
- GCancellable *cancellable,
- GError **error);
+OsinfoMedia *osinfo_media_create_from_location(const gchar *location,
+ GCancellable *cancellable,
+ GError **error);
const gchar *osinfo_media_get_architecture(OsinfoMedia *media);
const gchar *osinfo_media_get_url(OsinfoMedia *media);
--
1.7.6
More information about the virt-tools-list
mailing list