[libdmapsharing] Vala-related clean up: DMAPRecord, DMAPDb & DMAPRecordFactory Signed-off-by: W. Michael Petullo <mik
- From: W. Michael Petullo <wmpetullo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdmapsharing] Vala-related clean up: DMAPRecord, DMAPDb & DMAPRecordFactory Signed-off-by: W. Michael Petullo <mik
- Date: Thu, 9 Dec 2010 04:06:52 +0000 (UTC)
commit 4d34871f2b2d2ac906e1b1d76de05d079bacb87c
Author: W. Michael Petullo <mike flyn org>
Date: Wed Dec 8 22:06:05 2010 -0600
Vala-related clean up: DMAPRecord, DMAPDb & DMAPRecordFactory
Signed-off-by: W. Michael Petullo <mike flyn org>
libdmapsharing/dmap-db.c | 6 +++---
libdmapsharing/dmap-db.h | 18 +++++++++---------
libdmapsharing/dmap-record-factory.c | 6 +++---
libdmapsharing/dmap-record-factory.h | 20 ++++++++++----------
libdmapsharing/dmap-record.c | 6 +++---
libdmapsharing/dmap-record.h | 18 +++++++++---------
tests/test-daap-record-factory.c | 6 +++---
tests/test-daap-record.c | 6 +++---
tests/test-dmap-db.c | 6 +++---
tests/test-dpap-record-factory.c | 6 +++---
tests/test-dpap-record.c | 12 ++++++------
11 files changed, 55 insertions(+), 55 deletions(-)
---
diff --git a/libdmapsharing/dmap-db.c b/libdmapsharing/dmap-db.c
index 310b836..c12ca2c 100644
--- a/libdmapsharing/dmap-db.c
+++ b/libdmapsharing/dmap-db.c
@@ -31,13 +31,13 @@ typedef struct FilterData {
static gint dmap_db_init_count = 0;
static void
-dmap_db_init (DMAPDbInterface *iface)
+dmap_db_init (DMAPDbIface *iface)
{
dmap_db_init_count++;
}
static void
-dmap_db_finalize (DMAPDbInterface *iface)
+dmap_db_finalize (DMAPDbIface *iface)
{
dmap_db_init_count--;
}
@@ -49,7 +49,7 @@ dmap_db_get_type (void)
static GType object_type = 0;
if (!object_type) {
static const GTypeInfo object_info = {
- sizeof(DMAPDbInterface),
+ sizeof(DMAPDbIface),
(GBaseInitFunc) dmap_db_init,
(GBaseFinalizeFunc) dmap_db_finalize
};
diff --git a/libdmapsharing/dmap-db.h b/libdmapsharing/dmap-db.h
index b001fb9..ea40fa7 100644
--- a/libdmapsharing/dmap-db.h
+++ b/libdmapsharing/dmap-db.h
@@ -28,11 +28,11 @@
G_BEGIN_DECLS
/**
- * TYPE_DMAP_DB:
+ * DMAP_TYPE_DB:
*
* The type for #DMAPDb.
*/
-#define TYPE_DMAP_DB (dmap_db_get_type ())
+#define DMAP_TYPE_DB (dmap_db_get_type ())
/**
* DMAP_DB:
* @o: Object which is subject to casting.
@@ -42,15 +42,15 @@ G_BEGIN_DECLS
* certain runtime checks to identify invalid casts.
*/
#define DMAP_DB(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
- TYPE_DMAP_DB, DMAPDb))
+ DMAP_TYPE_DB, DMAPDb))
/**
* IS_DMAP_DB:
- * @o: Instance to check for being a %TYPE_DMAP_DB.
+ * @o: Instance to check for being a %DMAP_TYPE_DB.
*
- * Checks whether a valid #GTypeInstance pointer is of type %TYPE_DMAP_DB.
+ * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_DB.
*/
#define IS_DMAP_DB(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
- TYPE_DMAP_DB))
+ DMAP_TYPE_DB))
/**
* DMAP_DB_GET_INTERFACE:
* @o: a #DMAPDb instance.
@@ -60,12 +60,12 @@ G_BEGIN_DECLS
* Returns: pointer to object interface structure.
*/
#define DMAP_DB_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
- TYPE_DMAP_DB, DMAPDbInterface))
+ DMAP_TYPE_DB, DMAPDbIface))
typedef struct _DMAPDb DMAPDb;
-typedef struct _DMAPDbInterface DMAPDbInterface;
+typedef struct _DMAPDbIface DMAPDbIface;
-struct _DMAPDbInterface {
+struct _DMAPDbIface {
GTypeInterface parent;
guint (*add) (DMAPDb *db, DMAPRecord *record);
diff --git a/libdmapsharing/dmap-record-factory.c b/libdmapsharing/dmap-record-factory.c
index fa33a82..37b7df6 100644
--- a/libdmapsharing/dmap-record-factory.c
+++ b/libdmapsharing/dmap-record-factory.c
@@ -23,13 +23,13 @@
static gint dmap_record_factory_init_count = 0;
static void
-dmap_record_factory_init (DMAPRecordFactoryInterface *iface)
+dmap_record_factory_init (DMAPRecordFactoryIface *iface)
{
dmap_record_factory_init_count++;
}
static void
-dmap_record_factory_finalize (DMAPRecordFactoryInterface *iface)
+dmap_record_factory_finalize (DMAPRecordFactoryIface *iface)
{
dmap_record_factory_init_count--;
}
@@ -41,7 +41,7 @@ dmap_record_factory_get_type (void)
static GType object_type = 0;
if (!object_type) {
static const GTypeInfo object_info = {
- sizeof(DMAPRecordFactoryInterface),
+ sizeof(DMAPRecordFactoryIface),
(GBaseInitFunc) dmap_record_factory_init,
(GBaseFinalizeFunc) dmap_record_factory_finalize
};
diff --git a/libdmapsharing/dmap-record-factory.h b/libdmapsharing/dmap-record-factory.h
index b02c85f..e953ce2 100644
--- a/libdmapsharing/dmap-record-factory.h
+++ b/libdmapsharing/dmap-record-factory.h
@@ -28,11 +28,11 @@
G_BEGIN_DECLS
/**
- * TYPE_DMAP_RECORD_FACTORY:
+ * DMAP_TYPE_RECORD_FACTORY:
*
* The type for #DMAPRecordFactory.
*/
-#define TYPE_DMAP_RECORD_FACTORY (dmap_record_factory_get_type ())
+#define DMAP_TYPE_RECORD_FACTORY (dmap_record_factory_get_type ())
/**
* DMAP_RECORD_FACTORY:
* @o: Object which is subject to casting.
@@ -42,16 +42,16 @@ G_BEGIN_DECLS
* certain runtime checks to identify invalid casts.
*/
#define DMAP_RECORD_FACTORY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
- TYPE_DMAP_RECORD_FACTORY, DMAPRecordFactory))
+ DMAP_TYPE_RECORD_FACTORY, DMAPRecordFactory))
/**
* IS_DMAP_RECORD_FACTORY:
- * @o: Instance to check for being a %TYPE_DMAP_RECORD_FACTORY.
+ * @o: Instance to check for being a %DMAP_TYPE_RECORD_FACTORY.
*
* Checks whether a valid #GTypeInstance pointer is of type
- * %TYPE_DMAP_RECORD_FACTORY.
+ * %DMAP_TYPE_RECORD_FACTORY.
*/
#define IS_DMAP_RECORD_FACTORY(o)(G_TYPE_CHECK_INSTANCE_TYPE ((o), \
- TYPE_DMAP_RECORD_FACTORY))
+ DMAP_TYPE_RECORD_FACTORY))
/**
* DMAP_RECORD_FACTORY_GET_INTERFACE:
* @o: a #DMAPRecordFactory instance.
@@ -62,13 +62,13 @@ G_BEGIN_DECLS
*/
#define DMAP_RECORD_FACTORY_GET_INTERFACE(o) \
(G_TYPE_INSTANCE_GET_INTERFACE ((o), \
- TYPE_DMAP_RECORD_FACTORY, \
- DMAPRecordFactoryInterface))
+ DMAP_TYPE_RECORD_FACTORY, \
+ DMAPRecordFactoryIface))
typedef struct _DMAPRecordFactory DMAPRecordFactory;
-typedef struct _DMAPRecordFactoryInterface DMAPRecordFactoryInterface;
+typedef struct _DMAPRecordFactoryIface DMAPRecordFactoryIface;
-struct _DMAPRecordFactoryInterface {
+struct _DMAPRecordFactoryIface {
GTypeInterface parent;
DMAPRecord *(*create) (DMAPRecordFactory *factory, gpointer user_data);
diff --git a/libdmapsharing/dmap-record.c b/libdmapsharing/dmap-record.c
index ecf3862..d876e0b 100644
--- a/libdmapsharing/dmap-record.c
+++ b/libdmapsharing/dmap-record.c
@@ -23,13 +23,13 @@
static gint dmap_record_init_count = 0;
static void
-dmap_record_init (DMAPRecordInterface *iface)
+dmap_record_init (DMAPRecordIface *iface)
{
dmap_record_init_count++;
}
static void
-dmap_record_finalize (DMAPRecordInterface *iface)
+dmap_record_finalize (DMAPRecordIface *iface)
{
dmap_record_init_count--;
}
@@ -41,7 +41,7 @@ dmap_record_get_type (void)
static GType object_type = 0;
if (!object_type) {
static const GTypeInfo object_info = {
- sizeof(DMAPRecordInterface),
+ sizeof(DMAPRecordIface),
(GBaseInitFunc) dmap_record_init,
(GBaseFinalizeFunc) dmap_record_finalize
};
diff --git a/libdmapsharing/dmap-record.h b/libdmapsharing/dmap-record.h
index 9a432d2..35823e0 100644
--- a/libdmapsharing/dmap-record.h
+++ b/libdmapsharing/dmap-record.h
@@ -26,11 +26,11 @@
G_BEGIN_DECLS
/**
- * TYPE_DMAP_RECORD:
+ * DMAP_TYPE_RECORD:
*
* The type for #DMAPRecord.
*/
-#define TYPE_DMAP_RECORD (dmap_record_get_type ())
+#define DMAP_TYPE_RECORD (dmap_record_get_type ())
/**
* DMAP_RECORD:
* @o: Object which is subject to casting.
@@ -40,15 +40,15 @@ G_BEGIN_DECLS
* certain runtime checks to identify invalid casts.
*/
#define DMAP_RECORD(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
- TYPE_DMAP_RECORD, DMAPRecord))
+ DMAP_TYPE_RECORD, DMAPRecord))
/**
* IS_DMAP_RECORD:
- * @o: Instance to check for being a %TYPE_DMAP_RECORD.
+ * @o: Instance to check for being a %DMAP_TYPE_RECORD.
*
- * Checks whether a valid #GTypeInstance pointer is of type %TYPE_DMAP_RECORD.
+ * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_RECORD.
*/
#define IS_DMAP_RECORD(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
- TYPE_DMAP_RECORD))
+ DMAP_TYPE_RECORD))
/**
* DAAP_RECORD_GET_INTERFACE:
* @o: a #DAAPRecord instance.
@@ -58,12 +58,12 @@ G_BEGIN_DECLS
* Returns: pointer to object class structure.
*/
#define DMAP_RECORD_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
- TYPE_DMAP_RECORD, DMAPRecordInterface))
+ DMAP_TYPE_RECORD, DMAPRecordIface))
typedef struct _DMAPRecord DMAPRecord;
-typedef struct _DMAPRecordInterface DMAPRecordInterface;
+typedef struct _DMAPRecordIface DMAPRecordIface;
-struct _DMAPRecordInterface {
+struct _DMAPRecordIface {
GTypeInterface parent;
GByteArray * (*to_blob) (DMAPRecord *record);
diff --git a/tests/test-daap-record-factory.c b/tests/test-daap-record-factory.c
index 7c0f94f..c2f03ed 100644
--- a/tests/test-daap-record-factory.c
+++ b/tests/test-daap-record-factory.c
@@ -40,15 +40,15 @@ test_daap_record_factory_class_init (TestDAAPRecordFactoryClass *klass)
static void
test_daap_record_factory_interface_init (gpointer iface, gpointer data)
{
- DMAPRecordFactoryInterface *factory = iface;
+ DMAPRecordFactoryIface *factory = iface;
- g_assert (G_TYPE_FROM_INTERFACE (factory) == TYPE_DMAP_RECORD_FACTORY);
+ g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY);
factory->create = test_daap_record_factory_create;
}
G_DEFINE_TYPE_WITH_CODE (TestDAAPRecordFactory, test_daap_record_factory, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (TYPE_DMAP_RECORD_FACTORY,
+ G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY,
test_daap_record_factory_interface_init))
TestDAAPRecordFactory *
diff --git a/tests/test-daap-record.c b/tests/test-daap-record.c
index a6bc017..01fc448 100644
--- a/tests/test-daap-record.c
+++ b/tests/test-daap-record.c
@@ -269,14 +269,14 @@ test_daap_record_daap_iface_init (gpointer iface, gpointer data)
static void
test_daap_record_dmap_iface_init (gpointer iface, gpointer data)
{
- DMAPRecordInterface *dmap_record = iface;
+ DMAPRecordIface *dmap_record = iface;
- g_assert (G_TYPE_FROM_INTERFACE (dmap_record) == TYPE_DMAP_RECORD);
+ g_assert (G_TYPE_FROM_INTERFACE (dmap_record) == DMAP_TYPE_RECORD);
}
G_DEFINE_TYPE_WITH_CODE (TestDAAPRecord, test_daap_record, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (TYPE_DAAP_RECORD, test_daap_record_daap_iface_init)
- G_IMPLEMENT_INTERFACE (TYPE_DMAP_RECORD, test_daap_record_dmap_iface_init))
+ G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, test_daap_record_dmap_iface_init))
static void
test_daap_record_finalize (GObject *object)
diff --git a/tests/test-dmap-db.c b/tests/test-dmap-db.c
index 73a1fb1..6955b6b 100644
--- a/tests/test-dmap-db.c
+++ b/tests/test-dmap-db.c
@@ -81,9 +81,9 @@ test_dmap_db_class_init (TestDMAPDbClass *klass)
static void
test_dmap_db_interface_init (gpointer iface, gpointer data)
{
- DMAPDbInterface *dmap_db = iface;
+ DMAPDbIface *dmap_db = iface;
- g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == TYPE_DMAP_DB);
+ g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == DMAP_TYPE_DB);
dmap_db->add = test_dmap_db_add;
dmap_db->lookup_by_id = test_dmap_db_lookup_by_id;
@@ -92,7 +92,7 @@ test_dmap_db_interface_init (gpointer iface, gpointer data)
}
G_DEFINE_TYPE_WITH_CODE (TestDMAPDb, test_dmap_db, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (TYPE_DMAP_DB,
+ G_IMPLEMENT_INTERFACE (DMAP_TYPE_DB,
test_dmap_db_interface_init))
TestDMAPDb *
diff --git a/tests/test-dpap-record-factory.c b/tests/test-dpap-record-factory.c
index e9d3ef8..66e03cb 100644
--- a/tests/test-dpap-record-factory.c
+++ b/tests/test-dpap-record-factory.c
@@ -40,15 +40,15 @@ test_dpap_record_factory_class_init (TestDPAPRecordFactoryClass *klass)
static void
test_dpap_record_factory_interface_init (gpointer iface, gpointer data)
{
- DMAPRecordFactoryInterface *factory = iface;
+ DMAPRecordFactoryIface *factory = iface;
- g_assert (G_TYPE_FROM_INTERFACE (factory) == TYPE_DMAP_RECORD_FACTORY);
+ g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY);
factory->create = test_dpap_record_factory_create;
}
G_DEFINE_TYPE_WITH_CODE (TestDPAPRecordFactory, test_dpap_record_factory, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (TYPE_DMAP_RECORD_FACTORY,
+ G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY,
test_dpap_record_factory_interface_init))
TestDPAPRecordFactory *
diff --git a/tests/test-dpap-record.c b/tests/test-dpap-record.c
index 0384cd0..f02aafe 100644
--- a/tests/test-dpap-record.c
+++ b/tests/test-dpap-record.c
@@ -203,9 +203,9 @@ test_dpap_record_class_init (TestDPAPRecordClass *klass)
static void
test_dpap_record_dpap_iface_init (gpointer iface, gpointer data)
{
- DPAPRecordInterface *dpap_record = iface;
+ DPAPRecordIface *dpap_record = iface;
- g_assert (G_TYPE_FROM_INTERFACE (dpap_record) == TYPE_DPAP_RECORD);
+ g_assert (G_TYPE_FROM_INTERFACE (dpap_record) == DPAP_TYPE_RECORD);
dpap_record->read = test_dpap_record_read;
}
@@ -213,14 +213,14 @@ test_dpap_record_dpap_iface_init (gpointer iface, gpointer data)
static void
test_dpap_record_dmap_iface_init (gpointer iface, gpointer data)
{
- DMAPRecordInterface *dmap_record = iface;
+ DMAPRecordIface *dmap_record = iface;
- g_assert (G_TYPE_FROM_INTERFACE (dmap_record) == TYPE_DMAP_RECORD);
+ g_assert (G_TYPE_FROM_INTERFACE (dmap_record) == DMAP_TYPE_RECORD);
}
G_DEFINE_TYPE_WITH_CODE (TestDPAPRecord, test_dpap_record, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (TYPE_DPAP_RECORD, test_dpap_record_dpap_iface_init)
- G_IMPLEMENT_INTERFACE (TYPE_DMAP_RECORD, test_dpap_record_dmap_iface_init))
+ G_IMPLEMENT_INTERFACE (DPAP_TYPE_RECORD, test_dpap_record_dpap_iface_init)
+ G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, test_dpap_record_dmap_iface_init))
static void
test_dpap_record_finalize (GObject *object)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]