[libgda/LIBGDA_4.2] Code cleanup



commit a9be87a3eef49de4a0c7b2823aea7f3958a4aa87
Author: Vivien Malerba <malerba gnome-db org>
Date:   Fri Mar 18 19:20:55 2011 +0100

    Code cleanup

 libgda/sqlite/virtual/gda-virtual-provider.c |   67 +-------------------------
 libgda/sqlite/virtual/gda-virtual-provider.h |    6 +-
 2 files changed, 4 insertions(+), 69 deletions(-)
---
diff --git a/libgda/sqlite/virtual/gda-virtual-provider.c b/libgda/sqlite/virtual/gda-virtual-provider.c
index f70ec59..8bdf175 100644
--- a/libgda/sqlite/virtual/gda-virtual-provider.c
+++ b/libgda/sqlite/virtual/gda-virtual-provider.c
@@ -1,6 +1,5 @@
 /* 
- * GDA common library
- * Copyright (C) 2007 The GNOME Foundation.
+ * Copyright (C) 2007 - 2011 The GNOME Foundation.
  *
  * AUTHORS:
  *      Vivien Malerba <malerba gnome-db org>
@@ -29,27 +28,9 @@
 #define PARENT_TYPE GDA_TYPE_SQLITE_PROVIDER
 #define CLASS(obj) (GDA_VIRTUAL_PROVIDER_CLASS (G_OBJECT_GET_CLASS (obj)))
 
-struct _GdaVirtualProviderPrivate {
-	int foo;
-};
-
-/* properties */
-enum
-{
-        PROP_0,
-};
-
 static void gda_virtual_provider_class_init (GdaVirtualProviderClass *klass);
 static void gda_virtual_provider_init       (GdaVirtualProvider *prov, GdaVirtualProviderClass *klass);
 static void gda_virtual_provider_finalize   (GObject *object);
-static void gda_virtual_provider_set_property (GObject *object,
-					       guint param_id,
-					       const GValue *value,
-					       GParamSpec *pspec);
-static void gda_virtual_provider_get_property (GObject *object,
-					       guint param_id,
-					       GValue *value,
-					       GParamSpec *pspec);
 static GObjectClass *parent_class = NULL;
 
 static gboolean gda_virtual_provider_close_connection (GdaServerProvider *prov,
@@ -69,16 +50,11 @@ gda_virtual_provider_class_init (GdaVirtualProviderClass *klass)
 	/* virtual methods */
 	object_class->finalize = gda_virtual_provider_finalize;
 	prov_class->close_connection = gda_virtual_provider_close_connection;
-
-	/* Properties */
-        object_class->set_property = gda_virtual_provider_set_property;
-        object_class->get_property = gda_virtual_provider_get_property;
 }
 
 static void
 gda_virtual_provider_init (GdaVirtualProvider *vprov, G_GNUC_UNUSED GdaVirtualProviderClass *klass)
 {
-	vprov->priv = g_new (GdaVirtualProviderPrivate, 1);
 }
 
 static void
@@ -88,10 +64,6 @@ gda_virtual_provider_finalize (GObject *object)
 
 	g_return_if_fail (GDA_IS_VIRTUAL_PROVIDER (prov));
 
-	/* free memory */
-	g_free (prov->priv);
-	prov->priv = NULL;
-
 	/* chain to parent class */
 	parent_class->finalize (object);
 }
@@ -103,7 +75,6 @@ gda_virtual_provider_close_connection (GdaServerProvider *prov, GdaConnection *c
 	return GDA_SERVER_PROVIDER_CLASS (parent_class)->close_connection (prov, cnc);
 }
 
-
 GType
 gda_virtual_provider_get_type (void)
 {
@@ -133,39 +104,3 @@ gda_virtual_provider_get_type (void)
 
 	return type;
 }
-
-static void
-gda_virtual_provider_set_property (GObject *object,
-				   guint param_id,
-				   G_GNUC_UNUSED const GValue *value,
-				   GParamSpec *pspec)
-{
-        GdaVirtualProvider *prov;
-
-        prov = GDA_VIRTUAL_PROVIDER (object);
-        if (prov->priv) {
-                switch (param_id) {
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
-			break;
-                }
-        }
-}
-
-static void
-gda_virtual_provider_get_property (GObject *object,
-				 guint param_id,
-				 G_GNUC_UNUSED GValue *value,
-				 GParamSpec *pspec)
-{
-        GdaVirtualProvider *prov;
-
-        prov = GDA_VIRTUAL_PROVIDER (object);
-        if (prov->priv) {
-		switch (param_id) {
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
-			break;
-		}
-        }
-}
diff --git a/libgda/sqlite/virtual/gda-virtual-provider.h b/libgda/sqlite/virtual/gda-virtual-provider.h
index 2f4ac31..fa934c1 100644
--- a/libgda/sqlite/virtual/gda-virtual-provider.h
+++ b/libgda/sqlite/virtual/gda-virtual-provider.h
@@ -37,11 +37,11 @@ G_BEGIN_DECLS
 
 typedef struct _GdaVirtualProvider      GdaVirtualProvider;
 typedef struct _GdaVirtualProviderClass GdaVirtualProviderClass;
-typedef struct _GdaVirtualProviderPrivate GdaVirtualProviderPrivate;
 
 struct _GdaVirtualProvider {
-	GdaSqliteProvider          provider;
-	GdaVirtualProviderPrivate *priv;
+	GdaSqliteProvider  provider;
+	/*< private >*/
+	void             (*_gda_reserved1) (void);
 };
 
 struct _GdaVirtualProviderClass {



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