[gnome-db] libgda: using g_param_spec_object() instead of g_param_spec_pointer()



I just committed a large but repetitive patch (attached) to make libgda
use specific types for its properties. I've tested it with libgnomedb
test-dynwidgets test, and it seems to be OK.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
? depcomp
? libgda-3.0.pc
? libgda_almost_no_pointer_properties.patch
? with_dbname.patch
? gda-sharp/gda-sharp-3.0.pc
? libgda/gda-enum-types.c
? libgda/gda-enum-types.h
? libgda/s-enum-types-c
? libgda/s-enum-types-h
? libgda/graph/Makefile
? libgda/graph/Makefile.in
? libgda/handlers/Makefile
? libgda/handlers/Makefile.in
? libgda/sql-delimiter/Makefile
? libgda/sql-delimiter/Makefile.in
? libgda/sql-delimiter/gda-test-delimiter
? libgda/sql-delimiter/lexer.c
? libgda/sql-delimiter/parser.c
? libgda/sql-delimiter/parser.h
? libgda/sql-delimiter/parser.output
? libgda/sql-transaction/Makefile
? libgda/sql-transaction/Makefile.in
? libgda/sql-transaction/lexer.c
? libgda/sql-transaction/parser.c
? libgda/sql-transaction/parser.h
? libgda/sql-transaction/parser.output
? libgda/sql-transaction/sql_parser_test
? po/stamp-it
? providers/bdb/Makefile
? providers/bdb/Makefile.in
? providers/bdb/bdb_specs_dsn.xml
? providers/ldap/ldap_specs_dsn.xml
? providers/mysql/mysql_specs_add_column.xml
? providers/mysql/mysql_specs_create_db.xml
? providers/mysql/mysql_specs_create_index.xml
? providers/mysql/mysql_specs_create_table.xml
? providers/mysql/mysql_specs_drop_column.xml
? providers/mysql/mysql_specs_drop_db.xml
? providers/mysql/mysql_specs_drop_index.xml
? providers/mysql/mysql_specs_drop_table.xml
? providers/mysql/mysql_specs_dsn.xml
? providers/mysql/mysql_specs_rename_table.xml
? providers/postgres/postgres_specs_add_column.xml
? providers/postgres/postgres_specs_create_db.xml
? providers/postgres/postgres_specs_create_index.xml
? providers/postgres/postgres_specs_create_table.xml
? providers/postgres/postgres_specs_drop_column.xml
? providers/postgres/postgres_specs_drop_db.xml
? providers/postgres/postgres_specs_drop_index.xml
? providers/postgres/postgres_specs_drop_table.xml
? providers/postgres/postgres_specs_dsn.xml
? providers/postgres/postgres_specs_rename_table.xml
? providers/sqlite/sqlite_specs_add_column.xml
? providers/sqlite/sqlite_specs_create_db.xml
? providers/sqlite/sqlite_specs_create_index.xml
? providers/sqlite/sqlite_specs_create_table.xml
? providers/sqlite/sqlite_specs_drop_db.xml
? providers/sqlite/sqlite_specs_drop_index.xml
? providers/sqlite/sqlite_specs_drop_table.xml
? providers/sqlite/sqlite_specs_dsn.xml
? providers/sqlite/sqlite_specs_rename_table.xml
? testing/gda-test-connection
? testing/gda-test-model-query
? testing/gda-test-models
? testing/gda-test-server-operation
? testing/gda-test-sql
? tools/gda-author-dict-file
? tools/gda-diagnose
? tools/gda-inspect-dict-file
? tools/gda-list-config
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libgda/ChangeLog,v
retrieving revision 1.937
diff -u -p -r1.937 ChangeLog
--- ChangeLog	9 Dec 2006 14:47:06 -0000	1.937
+++ ChangeLog	15 Dec 2006 15:43:15 -0000
@@ -1,3 +1,43 @@
+2006-12-15  Murray Cumming,,,  <set EMAIL_ADDRESS environment variable>
+
+
+	* libgda/gda-connection.c:
+	* libgda/gda-data-access-wrapper.c:
+	* libgda/gda-data-model-import.c:
+	* libgda/gda-data-model-iter.c:
+	* libgda/gda-data-model-query.c:
+	* libgda/gda-data-proxy.c:
+	* libgda/gda-dict-aggregate.c: 
+	* libgda/gda-dict-database.c:
+	* libgda/gda-dict-field.c:
+	* libgda/gda-dict-function.c:
+	* libgda/gda-dict-table.c:
+	* libgda/gda-dict-type.c:
+	* libgda/gda-graphviz.c:
+	* libgda/gda-object-ref.c: 
+	* libgda/gda-object.c:
+	* libgda/gda-parameter.c:
+	* libgda/gda-query-condition.c:
+	* libgda/gda-query-field-agg.c:
+	* libgda/gda-query-field-all.c:
+	* libgda/gda-query-field-field.c:
+	* libgda/gda-query-field-func.c:
+	* libgda/gda-query-field-value.c:
+	* libgda/gda-query-join.c:
+	* libgda/gda-query-target.c:
+	* libgda/gda-query.c:
+	* libgda/gda-row.c:
+	* libgda/gda-server-operation.c:
+	* libgda/graph/gda-graph-item.c:
+	* libgda/graph/gda-graph.c: class_init(), get_property(), and 
+	set_property() functions: Register and use properties as specific object 
+	types, instead of using the pointer parameter type. As well as being a lot 
+	clearer and more robust, this allows language bindings and RAD tools to 
+	know what type the parameters are.
+
+	There are still some properties called prop which have unknown type and which 
+	do not seem to be used.
+
 2006-12-09  Vivien Malerba <malerba gnome-db org>
 
 	* libgda/gda-data-model-query.[ch]: added a 
Index: libgda/gda-connection.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-connection.c,v
retrieving revision 1.93
diff -u -p -r1.93 gda-connection.c
--- libgda/gda-connection.c	9 Dec 2006 14:47:10 -0000	1.93
+++ libgda/gda-connection.c	15 Dec 2006 15:43:17 -0000
@@ -162,7 +162,8 @@ gda_connection_class_init (GdaConnection
         object_class->get_property = gda_connection_get_property;
 
 	g_object_class_install_property (object_class, PROP_CLIENT,
-                                         g_param_spec_pointer ("client", _("GdaClient to use"), NULL,
+                                         g_param_spec_object ("client", _("GdaClient to use"), NULL,
+                                                               GDA_TYPE_CLIENT,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_DSN,
                                          g_param_spec_string ("dsn", _("DSN to use"), NULL, NULL,
@@ -171,7 +172,8 @@ gda_connection_class_init (GdaConnection
                                          g_param_spec_string ("cnc_string", _("Connection string to use"), NULL, NULL,
 							      (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_PROVIDER_OBJ,
-                                         g_param_spec_pointer ("provider_obj", _("Provider to use"), NULL,
+                                         g_param_spec_object ("provider_obj", _("Provider to use"), NULL,
+                                                               GDA_TYPE_SERVER_PROVIDER,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 
         g_object_class_install_property (object_class, PROP_USERNAME,
@@ -308,7 +310,12 @@ gda_connection_set_property (GObject *ob
         if (cnc->priv) {
                 switch (param_id) {
                 case PROP_CLIENT:
-			cnc->priv->client = g_value_get_pointer (value);
+                        if(cnc->priv->client)
+                          g_object_unref(cnc->priv->client);
+
+			cnc->priv->client = g_value_get_object (value);
+                        g_object_ref(cnc->priv->client);
+
 			break;
                 case PROP_DSN:
 			gda_connection_set_dsn (cnc, g_value_get_string (value));
@@ -320,7 +327,10 @@ gda_connection_set_property (GObject *ob
 				cnc->priv->cnc_string = g_strdup (g_value_get_string (value));
                         break;
                 case PROP_PROVIDER_OBJ:
-			cnc->priv->provider_obj = g_value_get_pointer (value);
+                        if(cnc->priv->provider_obj)
+                          g_object_unref(cnc->priv->provider_obj);
+
+			cnc->priv->provider_obj = g_value_get_object (value);
 			g_object_ref (G_OBJECT (cnc->priv->provider_obj));
                         break;
                 case PROP_USERNAME:
@@ -348,7 +358,7 @@ gda_connection_get_property (GObject *ob
         if (cnc->priv) {
                 switch (param_id) {
                 case PROP_CLIENT:
-			g_value_set_pointer (value, cnc->priv->client);
+			g_value_set_object (value, G_OBJECT (cnc->priv->client));
 			break;
                 case PROP_DSN:
 			g_value_set_string (value, cnc->priv->dsn);
@@ -357,7 +367,7 @@ gda_connection_get_property (GObject *ob
 			g_value_set_string (value, cnc->priv->cnc_string);
 			break;
                 case PROP_PROVIDER_OBJ:
-			g_value_set_pointer (value, cnc->priv->provider_obj);
+			g_value_set_object (value, G_OBJECT (cnc->priv->provider_obj));
                         break;
                 case PROP_USERNAME:
 			g_value_set_string (value, cnc->priv->username);
Index: libgda/gda-data-access-wrapper.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-data-access-wrapper.c,v
retrieving revision 1.3
diff -u -p -r1.3 gda-data-access-wrapper.c
--- libgda/gda-data-access-wrapper.c	8 May 2006 12:30:36 -0000	1.3
+++ libgda/gda-data-access-wrapper.c	15 Dec 2006 15:43:17 -0000
@@ -129,7 +129,8 @@ gda_data_access_wrapper_class_init (GdaD
 	object_class->set_property = gda_data_access_wrapper_set_property;
         object_class->get_property = gda_data_access_wrapper_get_property;
 	g_object_class_install_property (object_class, PROP_MODEL,
-                                         g_param_spec_pointer ("model", "Data model being worked on", NULL,
+                                         g_param_spec_object ("model", "Data model being worked on", NULL,
+                                                              GDA_TYPE_DATA_MODEL,
 							      G_PARAM_READABLE | G_PARAM_WRITABLE |
 							      G_PARAM_CONSTRUCT_ONLY));
 
@@ -259,9 +260,7 @@ gda_data_access_wrapper_set_property (GO
 	if (model->priv) {
 		switch (param_id) {
 		case PROP_MODEL: {
-			GdaDataModel *mod;
-
-			mod = g_value_get_pointer (value);
+			GdaDataModel *mod = g_value_get_object(value);
 			if (mod) {
 				g_return_if_fail (GDA_IS_DATA_MODEL (mod));
 				model->priv->model_access_flags = gda_data_model_get_access_flags (mod);
@@ -276,6 +275,10 @@ gda_data_access_wrapper_set_property (GO
 					model->priv->rows = g_hash_table_new_full (g_direct_hash, g_direct_equal,
 										   NULL, (GDestroyNotify) g_object_unref);
 				}
+  
+                                if(model->priv->model)
+                                  g_object_unref(model->priv->model);
+
 				model->priv->model = mod;
 				g_object_ref (mod);
 				gda_object_connect_destroy (GDA_OBJECT (mod), 
@@ -303,7 +306,7 @@ gda_data_access_wrapper_get_property (GO
 	if (model->priv) {
 		switch (param_id) {
 		case PROP_MODEL:
-			g_value_set_pointer (value, model->priv->model);
+			g_value_set_object (value, G_OBJECT (model->priv->model));
 			break;
 		default:
 			g_assert_not_reached ();
Index: libgda/gda-data-model-import.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-data-model-import.c,v
retrieving revision 1.9
diff -u -p -r1.9 gda-data-model-import.c
--- libgda/gda-data-model-import.c	8 Nov 2006 06:37:58 -0000	1.9
+++ libgda/gda-data-model-import.c	15 Dec 2006 15:43:17 -0000
@@ -225,7 +225,8 @@ gda_data_model_import_class_init (GdaDat
 							      G_PARAM_READABLE | G_PARAM_WRITABLE |
 							      G_PARAM_CONSTRUCT_ONLY));
 	g_object_class_install_property (object_class, PROP_OPTIONS,
-                                         g_param_spec_pointer ("options", "Options to configure the import", NULL,
+                                         g_param_spec_object ("options", "Options to configure the import", NULL,
+                                                               GDA_TYPE_PARAMETER_LIST,
 							       G_PARAM_READABLE | G_PARAM_WRITABLE |
 							       G_PARAM_CONSTRUCT_ONLY));
 
@@ -454,7 +455,6 @@ gda_data_model_import_set_property (GObj
 {
 	GdaDataModelImport *model;
 	const gchar *string;
-	gpointer data;
 
 	model = GDA_DATA_MODEL_IMPORT (object);
 	if (model->priv) {
@@ -511,15 +511,19 @@ gda_data_model_import_set_property (GObj
 			model->priv->data_start = model->priv->src.string;
 			model->priv->data_length = strlen (model->priv->src.string);
 			break;
-		case PROP_XML_NODE:
-			data = g_value_get_pointer (value);
+		case PROP_XML_NODE: {
+			gpointer data = g_value_get_pointer (value);
 			if (!data)
 				return;
 			model->priv->format = FORMAT_XML_NODE;
-			model->priv->extract.node.node = g_value_get_pointer (value);
+			model->priv->extract.node.node = data;
 			break;
+                }
 		case PROP_OPTIONS:
-			model->priv->options = g_value_get_pointer (value);
+                        if(model->priv->options)
+                          g_object_unref(model->priv->options);
+
+			model->priv->options = g_value_get_object (value);
 			if (model->priv->options) {
 				if (!GDA_IS_PARAMETER_LIST (model->priv->options)) {
 					g_warning (_("\"options\" property is not a GdaParameterList object"));
Index: libgda/gda-data-model-iter.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-data-model-iter.c,v
retrieving revision 1.8
diff -u -p -r1.8 gda-data-model-iter.c
--- libgda/gda-data-model-iter.c	9 Dec 2006 14:47:10 -0000	1.8
+++ libgda/gda-data-model-iter.c	15 Dec 2006 15:43:18 -0000
@@ -186,11 +186,13 @@ gda_data_model_iter_class_init (GdaDataM
 	object_class->set_property = gda_data_model_iter_set_property;
 	object_class->get_property = gda_data_model_iter_get_property;
 	g_object_class_install_property (object_class, PROP_DATA_MODEL,
-					 g_param_spec_pointer ("data_model", "Data model for which the iter is for", NULL, 
+					 g_param_spec_object ("data_model", "Data model for which the iter is for", NULL,
+                                                               GDA_TYPE_DATA_MODEL, 
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE |
 								G_PARAM_CONSTRUCT_ONLY)));
 	g_object_class_install_property (object_class, PROP_FORCED_MODEL,
-					 g_param_spec_pointer ("forced_model", NULL, NULL, 
+					 g_param_spec_object ("forced_model", NULL, NULL, 
+                                                               GDA_TYPE_DATA_MODEL,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_CURRENT_ROW,
 					 g_param_spec_int ("current_row", "Current represented row in the data model", 
@@ -375,7 +377,6 @@ gda_data_model_iter_set_property (GObjec
 				  GParamSpec *pspec)
 {
 	GdaDataModelIter *iter;
-	gpointer ptr;
 
 	iter = GDA_DATA_MODEL_ITER (object);
 	if (iter->priv) {
@@ -387,7 +388,7 @@ gda_data_model_iter_set_property (GObjec
 			GdaDict *dict;
 			GdaColumn *column;
 
-			ptr = g_value_get_pointer (value);
+			GObject* ptr = g_value_get_object (value);
 			g_return_if_fail (ptr && GDA_IS_DATA_MODEL (ptr));
 			model = GDA_DATA_MODEL (ptr);
 			
@@ -415,8 +416,8 @@ gda_data_model_iter_set_property (GObjec
 							    G_CALLBACK (destroyed_param_cb), iter);
 			}
 		}
-		case PROP_FORCED_MODEL:
-			ptr = g_value_get_pointer (value);
+		case PROP_FORCED_MODEL: {
+			GdaDataModel* ptr = g_value_get_object (value);
 			g_return_if_fail (ptr && GDA_IS_DATA_MODEL (ptr));
 
 			if (iter->priv->data_model) {
@@ -434,6 +435,7 @@ gda_data_model_iter_set_property (GObjec
 			iter->priv->model_changes_signals [1] = g_signal_connect (G_OBJECT (ptr), "row_removed",
 										  G_CALLBACK (model_row_removed_cb), iter);
 			break;
+                }
 		case PROP_CURRENT_ROW:
 			if (iter->priv->row != g_value_get_int (value)) {
                                 iter->priv->row = g_value_get_int (value);
@@ -461,7 +463,7 @@ gda_data_model_iter_get_property (GObjec
 		switch (param_id) {
 		case PROP_DATA_MODEL:
 		case PROP_FORCED_MODEL:
-			g_value_set_pointer (value, iter->priv->data_model);
+			g_value_set_object (value, G_OBJECT (iter->priv->data_model));
 			break;
 		case PROP_CURRENT_ROW:
 			g_value_set_int (value, iter->priv->row);
Index: libgda/gda-data-model-query.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-data-model-query.c,v
retrieving revision 1.21
diff -u -p -r1.21 gda-data-model-query.c
--- libgda/gda-data-model-query.c	9 Dec 2006 14:47:10 -0000	1.21
+++ libgda/gda-data-model-query.c	15 Dec 2006 15:43:18 -0000
@@ -169,25 +169,29 @@ gda_data_model_query_class_init (GdaData
 	object_class->set_property = gda_data_model_query_set_property;
         object_class->get_property = gda_data_model_query_get_property;
 	g_object_class_install_property (object_class, PROP_SEL_QUERY,
-                                         g_param_spec_pointer ("query", "SELECT query", 
+                                         g_param_spec_object ("query", "SELECT query", 
 							       "SELECT Query to be executed to populate "
 							       "the model with data", 
+                                                               GDA_TYPE_QUERY,
 							       G_PARAM_READABLE | G_PARAM_WRITABLE |
 							       G_PARAM_CONSTRUCT_ONLY));
 
 	g_object_class_install_property (object_class, PROP_INS_QUERY,
-                                         g_param_spec_pointer ("insert_query", "INSERT query", 
+                                         g_param_spec_object ("insert_query", "INSERT query", 
 							       "INSERT Query to be executed to add data",
+                                                               GDA_TYPE_QUERY,
 							       G_PARAM_READABLE | G_PARAM_WRITABLE));
 
 	g_object_class_install_property (object_class, PROP_UPD_QUERY,
-                                         g_param_spec_pointer ("update_query", "UPDATE query", 
+                                         g_param_spec_object ("update_query", "UPDATE query", 
 							       "UPDATE Query to be executed to update data",
+                                                               GDA_TYPE_QUERY,
 							       G_PARAM_READABLE | G_PARAM_WRITABLE));
 
 	g_object_class_install_property (object_class, PROP_DEL_QUERY,
-                                         g_param_spec_pointer ("delete_query", "DELETE query", 
+                                         g_param_spec_object ("delete_query", "DELETE query", 
 							       "DELETE Query to be executed to remove data",
+                                                               GDA_TYPE_QUERY,
 							       G_PARAM_READABLE | G_PARAM_WRITABLE));
 
 	/* virtual functions */
@@ -363,7 +367,7 @@ gda_data_model_query_set_property (GObje
 			}
 
 			/* use @query without making a copy of it */
-			model->priv->queries[qindex] = (GdaQuery *) g_value_get_pointer (value);
+			model->priv->queries[qindex] = (GdaQuery *) g_value_get_object (value);
 			if (model->priv->queries[qindex]) {
 				g_object_ref (model->priv->queries[qindex]);
 				g_signal_connect (model->priv->queries[qindex], "to_be_destroyed",
@@ -461,7 +465,7 @@ gda_data_model_query_get_property (GObje
 		case PROP_INS_QUERY:
 		case PROP_UPD_QUERY:
 		case PROP_DEL_QUERY:
-			g_value_set_pointer (value, model->priv->queries[qindex]);
+			g_value_set_object (value, G_OBJECT (model->priv->queries[qindex]));
 			break;
 		default:
 			g_assert_not_reached ();
Index: libgda/gda-data-proxy.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-data-proxy.c,v
retrieving revision 1.25
diff -u -p -r1.25 gda-data-proxy.c
--- libgda/gda-data-proxy.c	9 Dec 2006 14:47:11 -0000	1.25
+++ libgda/gda-data-proxy.c	15 Dec 2006 15:43:18 -0000
@@ -405,7 +405,8 @@ gda_data_proxy_class_init (GdaDataProxyC
 	object_class->get_property = gda_data_proxy_get_property;
 
 	g_object_class_install_property (object_class, PROP_MODEL,
-					 g_param_spec_pointer ("model", _("Data model"), NULL,
+					 g_param_spec_object ("model", _("Data model"), NULL,
+                                                               GDA_TYPE_DATA_MODEL,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE |
 								G_PARAM_CONSTRUCT_ONLY)));
 	g_object_class_install_property (object_class, PROP_ADD_NULL_ENTRY,
@@ -591,7 +592,7 @@ gda_data_proxy_set_property (GObject *ob
 		switch (param_id) {
 		case PROP_MODEL:
 			g_assert (!proxy->priv->model);
-			model = (GdaDataModel*) g_value_get_pointer (value);
+			model = (GdaDataModel*) g_value_get_object (value);
 			g_return_if_fail (GDA_IS_DATA_MODEL (model));
 
 			if (! (gda_data_model_get_access_flags (model) & GDA_DATA_MODEL_ACCESS_RANDOM)) {
Index: libgda/gda-dict-aggregate.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-dict-aggregate.c,v
retrieving revision 1.5
diff -u -p -r1.5 gda-dict-aggregate.c
--- libgda/gda-dict-aggregate.c	8 Nov 2006 06:37:59 -0000	1.5
+++ libgda/gda-dict-aggregate.c	15 Dec 2006 15:43:19 -0000
@@ -135,6 +135,11 @@ gda_dict_aggregate_class_init (GdaDictAg
 	/* Properties */
 	object_class->set_property = gda_dict_aggregate_set_property;
 	object_class->get_property = gda_dict_aggregate_get_property;
+
+        /* TODO: What kind of object is this meant to be?
+           When we know, we should use g_param_spec_object() instead of g_param_spec_pointer().
+           murrayc.
+         */
 	g_object_class_install_property (object_class, PROP,
 					 g_param_spec_pointer ("prop", NULL, NULL, (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 
@@ -226,16 +231,16 @@ gda_dict_aggregate_set_property (GObject
 			const GValue *value,
 			GParamSpec *pspec)
 {
-	gpointer ptr;
 	GdaDictAggregate *gda_dict_aggregate;
 
 	gda_dict_aggregate = GDA_DICT_AGGREGATE (object);
 	if (gda_dict_aggregate->priv) {
 		switch (param_id) {
-		case PROP:
+		case PROP: {
 			/* FIXME */
-			ptr = g_value_get_pointer (value);
+			gpointer ptr = g_value_get_pointer (value);
 			break;
+                }
 		}
 	}
 }
Index: libgda/gda-dict-database.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-dict-database.c,v
retrieving revision 1.9
diff -u -p -r1.9 gda-dict-database.c
--- libgda/gda-dict-database.c	3 Dec 2006 19:33:09 -0000	1.9
+++ libgda/gda-dict-database.c	15 Dec 2006 15:43:19 -0000
@@ -295,6 +295,11 @@ gda_dict_database_class_init (GdaDictDat
 	/* Properties */
 	object_class->set_property = gda_dict_database_set_property;
 	object_class->get_property = gda_dict_database_get_property;
+
+        /* TODO: What kind of object is this meant to be?
+           When we know, we should use g_param_spec_object() instead of g_param_spec_pointer().
+           murrayc.
+         */
 	g_object_class_install_property (object_class, PROP,
 					 g_param_spec_pointer ("prop", NULL, NULL, (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 
Index: libgda/gda-dict-field.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-dict-field.c,v
retrieving revision 1.12
diff -u -p -r1.12 gda-dict-field.c
--- libgda/gda-dict-field.c	8 Nov 2006 06:37:59 -0000	1.12
+++ libgda/gda-dict-field.c	15 Dec 2006 15:43:20 -0000
@@ -188,7 +188,8 @@ gda_dict_field_class_init (GdaDictFieldC
 	object_class->set_property = gda_dict_field_set_property;
 	object_class->get_property = gda_dict_field_get_property;
 	g_object_class_install_property (object_class, PROP_DB_TABLE,
-					 g_param_spec_pointer ("db_table", NULL, NULL, 
+					 g_param_spec_object ("db_table", NULL, NULL, 
+                                                               GDA_TYPE_DICT_TABLE,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_PLUGIN,
                                          g_param_spec_string ("entry_plugin", NULL, NULL, NULL,
@@ -303,26 +304,26 @@ gda_dict_field_set_property (GObject *ob
 			     const GValue *value,
 			     GParamSpec *pspec)
 {
-	gpointer ptr;
 	GdaDictField *gda_dict_field;
 
 	gda_dict_field = GDA_DICT_FIELD (object);
 	if (gda_dict_field->priv) {
 		switch (param_id) {
-		case PROP_DB_TABLE:
+		case PROP_DB_TABLE: {
 			if (gda_dict_field->priv->table) {
 				g_signal_handlers_disconnect_by_func (G_OBJECT (gda_dict_field->priv->table),
 								      G_CALLBACK (destroyed_object_cb), gda_dict_field);
-				gda_dict_field->priv->table = NULL;
+				gda_dict_field->priv->table = NULL; /* TODO: unref it? */
 			}
 
-			ptr = g_value_get_pointer (value);
+			GdaDictTable* ptr = GDA_DICT_TABLE (g_value_get_object (value));
 			if (ptr && GDA_IS_DICT_TABLE (ptr)) {
-				gda_dict_field->priv->table = GDA_DICT_TABLE (ptr);
+				gda_dict_field->priv->table = GDA_DICT_TABLE (ptr); /* TODO: ref it? */
 				gda_object_connect_destroy (ptr,
 							 G_CALLBACK (destroyed_object_cb), gda_dict_field);
 			}
 			break;
+                }
 		case PROP_PLUGIN:
 			g_free (gda_dict_field->priv->plugin);
 			if (g_value_get_string (value))
@@ -346,7 +347,7 @@ gda_dict_field_get_property (GObject *ob
 	if (gda_dict_field->priv) {
 		switch (param_id) {
 		case PROP_DB_TABLE:
-			g_value_set_pointer (value, gda_dict_field->priv->table);
+			g_value_set_object (value, G_OBJECT (gda_dict_field->priv->table));
 			break;
 		case PROP_PLUGIN:
 			g_value_set_string (value, gda_dict_field->priv->plugin);
Index: libgda/gda-dict-function.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-dict-function.c,v
retrieving revision 1.7
diff -u -p -r1.7 gda-dict-function.c
--- libgda/gda-dict-function.c	8 Nov 2006 06:37:59 -0000	1.7
+++ libgda/gda-dict-function.c	15 Dec 2006 15:43:20 -0000
@@ -136,6 +136,11 @@ gda_dict_function_class_init (GdaDictFun
 	/* Properties */
 	object_class->set_property = gda_dict_function_set_property;
 	object_class->get_property = gda_dict_function_get_property;
+
+        /* TODO: What kind of object is this meant to be?
+           When we know, we should use g_param_spec_object() instead of g_param_spec_pointer().
+           murrayc.
+         */
 	g_object_class_install_property (object_class, PROP,
 					 g_param_spec_pointer ("prop", NULL, NULL, (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 
Index: libgda/gda-dict-table.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-dict-table.c,v
retrieving revision 1.11
diff -u -p -r1.11 gda-dict-table.c
--- libgda/gda-dict-table.c	3 Dec 2006 19:33:10 -0000	1.11
+++ libgda/gda-dict-table.c	15 Dec 2006 15:43:20 -0000
@@ -196,7 +196,8 @@ gda_dict_table_class_init (GdaDictTableC
 	object_class->set_property = gda_dict_table_set_property;
 	object_class->get_property = gda_dict_table_get_property;
 	g_object_class_install_property (object_class, PROP_DB,
-					 g_param_spec_pointer ("database", NULL, NULL, 
+					 g_param_spec_object ("database", NULL, NULL, 
+                                                               GDA_TYPE_DICT_DATABASE,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_IS_VIEW,
 					 g_param_spec_boolean ("is-view", NULL, NULL, FALSE,
@@ -344,16 +345,16 @@ gda_dict_table_set_property (GObject *ob
 			const GValue *value,
 			GParamSpec *pspec)
 {
-	gpointer ptr;
 	GdaDictTable *gda_dict_table;
 
 	gda_dict_table = GDA_DICT_TABLE (object);
 	if (gda_dict_table->priv) {
 		switch (param_id) {
-		case PROP_DB:
-			ptr = g_value_get_pointer (value);
+		case PROP_DB: {
+			GdaDictDatabase* ptr = g_value_get_object (value);
 			gda_dict_table_set_database (gda_dict_table, GDA_DICT_DATABASE (ptr));
 			break;
+                }
 		case PROP_IS_VIEW:
 			gda_dict_table->priv->is_view = g_value_get_boolean (value);
 			break;
@@ -373,7 +374,7 @@ gda_dict_table_get_property (GObject *ob
 	if (gda_dict_table->priv) {
 		switch (param_id) {
 		case PROP_DB:
-			g_value_set_pointer (value, gda_dict_table->priv->db);
+			g_value_set_object (value, G_OBJECT (gda_dict_table->priv->db));
 			break;
 		case PROP_IS_VIEW:
 			g_value_set_boolean (value, gda_dict_table->priv->is_view);
Index: libgda/gda-dict-type.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-dict-type.c,v
retrieving revision 1.5
diff -u -p -r1.5 gda-dict-type.c
--- libgda/gda-dict-type.c	8 Nov 2006 06:37:59 -0000	1.5
+++ libgda/gda-dict-type.c	15 Dec 2006 15:43:20 -0000
@@ -129,6 +129,11 @@ gda_dict_type_class_init (GdaDictTypeCla
 	/* Properties */
 	object_class->set_property = gda_dict_type_set_property;
 	object_class->get_property = gda_dict_type_get_property;
+
+        /* TODO: What kind of object is this meant to be?
+           When we know, we should use g_param_spec_object() instead of g_param_spec_pointer().
+           murrayc.
+         */
 	g_object_class_install_property (object_class, PROP,
 					 g_param_spec_pointer ("prop", NULL, NULL, (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 }
Index: libgda/gda-graphviz.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-graphviz.c,v
retrieving revision 1.4
diff -u -p -r1.4 gda-graphviz.c
--- libgda/gda-graphviz.c	24 May 2006 16:45:11 -0000	1.4
+++ libgda/gda-graphviz.c	15 Dec 2006 15:43:21 -0000
@@ -122,6 +122,11 @@ gda_graphviz_class_init (GdaGraphvizClas
 	/* Properties */
 	object_class->set_property = gda_graphviz_set_property;
 	object_class->get_property = gda_graphviz_get_property;
+
+        /* TODO: What kind of object is this meant to be?
+           When we know, we should use g_param_spec_object() instead of g_param_spec_pointer().
+           murrayc.
+         */
 	g_object_class_install_property (object_class, PROP,
 					 g_param_spec_pointer ("prop", NULL, NULL, 
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
Index: libgda/gda-object-ref.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-object-ref.c,v
retrieving revision 1.3
diff -u -p -r1.3 gda-object-ref.c
--- libgda/gda-object-ref.c	28 Aug 2006 19:34:11 -0000	1.3
+++ libgda/gda-object-ref.c	15 Dec 2006 15:43:21 -0000
@@ -169,10 +169,11 @@ gda_object_ref_class_init (GdaObjectRefC
 	object_class->set_property = gda_object_ref_set_property;
 	object_class->get_property = gda_object_ref_get_property;
 	g_object_class_install_property (object_class, PROP_HELPER_REF,
-					 g_param_spec_pointer ("helper_ref", "Pointer to a Query object for target "
+					 g_param_spec_object ("helper_ref", "Pointer to a Query object for target "
 							       "resolution, or a GdaObjectRef referencing a target"
 							       "for a field resolution",
 							       NULL, 
+                                                               GDA_TYPE_OBJECT, /* Either a GdaQuery or a GdaObjectRef */
 							       G_PARAM_READABLE | G_PARAM_WRITABLE));
 	g_object_class_install_property (object_class, PROP_OBJ_NAME,
 					 g_param_spec_string ("obj_name", "Name of the object as when it was last found",
@@ -384,15 +385,13 @@ gda_object_ref_set_property (GObject *ob
 			     const GValue *value,
 			     GParamSpec *pspec)
 {
-	gpointer ptr;
-	GdaObjectRef *ref;
+	GdaObjectRef* ref = GDA_OBJECT_REF (object);
 
-	ref = GDA_OBJECT_REF (object);
 	if (ref->priv) {
 		switch (param_id) {
-		case PROP_HELPER_REF:
-			ptr = g_value_get_pointer (value);
-			if ((gpointer) ref->priv->helper_ref != ptr) {
+		case PROP_HELPER_REF: {
+			GdaObject* ptr = g_value_get_object (value);
+			if (ref->priv->helper_ref != ptr) {
 				if (ref->priv->helper_ref) 
 					helper_ref_destroyed_cb (ref->priv->helper_ref, ref);
 				
@@ -403,6 +402,7 @@ gda_object_ref_set_property (GObject *ob
 				}
 			}
 			break;
+                }
 		case PROP_OBJ_NAME:
 			g_free (ref->priv->obj_name);
 			ref->priv->obj_name = NULL;
@@ -425,7 +425,7 @@ gda_object_ref_get_property (GObject *ob
 	if (ref->priv) {
 		switch (param_id) {
 		case PROP_HELPER_REF:
-			g_value_set_pointer (value, ref->priv->helper_ref);
+			g_value_set_object (value, G_OBJECT (ref->priv->helper_ref));
 			break;
 		case PROP_OBJ_NAME:
 			g_value_set_string (value, ref->priv->obj_name);
Index: libgda/gda-object.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-object.c,v
retrieving revision 1.4
diff -u -p -r1.4 gda-object.c
--- libgda/gda-object.c	10 Sep 2006 14:19:18 -0000	1.4
+++ libgda/gda-object.c	15 Dec 2006 15:43:21 -0000
@@ -194,8 +194,9 @@ gda_object_class_init (GdaObjectClass * 
 	object_class->set_property = gda_object_set_property;
 	object_class->get_property = gda_object_get_property;
 	g_object_class_install_property (object_class, PROP_DICT,
-					 g_param_spec_pointer ("dict", "GdaDict", 
+					 g_param_spec_object ("dict", "GdaDict", 
 							       "Dictionary to which the object is related", 
+                                                               GDA_TYPE_DICT,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE | 
 								G_PARAM_CONSTRUCT_ONLY)));
 	g_object_class_install_property (object_class, PROP_BLOCK_CHANGED,
@@ -291,21 +292,22 @@ gda_object_set_property (GObject *object
 			 const GValue *value,
 			 GParamSpec *pspec)
 {
-	gpointer ptr;
 	GdaObject *gdaobj;
 
 	gdaobj = GDA_OBJECT (object);
 	if (gdaobj->priv) {
 		switch (param_id) {
-		case PROP_DICT:
-			ptr = g_value_get_pointer (value);
-			gdaobj->priv->dict = ASSERT_DICT (ptr);
+		case PROP_DICT: {
+			GdaDict* ptr = g_value_get_object (value);
+
+			gdaobj->priv->dict = ASSERT_DICT (ptr); /* TODO: Check/unref the existing value? */
 			if (!gdaobj->priv->dict)
 				g_error (_("LibGda must be initialized before any usage."));
 
 			g_object_add_weak_pointer (G_OBJECT (gdaobj->priv->dict),
 						   (gpointer) & (gdaobj->priv->dict));
 			break;
+                }
 		case PROP_BLOCK_CHANGED:
 			if (g_value_get_boolean (value))
 				gda_object_block_changed (gdaobj);
@@ -331,7 +333,7 @@ gda_object_get_property (GObject *object
 	if (gdaobj->priv) {
 		switch (param_id) {
 		case PROP_DICT:
-			g_value_set_pointer (value, gdaobj->priv->dict);
+			g_value_set_object (value, G_OBJECT (gdaobj->priv->dict));
 			break;
 		case PROP_BLOCK_CHANGED:
 			g_value_set_boolean (value, gdaobj->priv->changed_locked);
Index: libgda/gda-parameter.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-parameter.c,v
retrieving revision 1.41
diff -u -p -r1.41 gda-parameter.c
--- libgda/gda-parameter.c	8 Nov 2006 06:37:59 -0000	1.41
+++ libgda/gda-parameter.c	15 Dec 2006 15:43:21 -0000
@@ -209,13 +209,16 @@ gda_parameter_class_init (GdaParameterCl
 					 g_param_spec_boolean ("use_default_value", NULL, NULL, FALSE,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_SIMPLE_BIND,
-					 g_param_spec_pointer ("simple_bind", NULL, NULL, 
+					 g_param_spec_object ("simple_bind", NULL, NULL, 
+                                                               GDA_TYPE_PARAMETER,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_FULL_BIND,
-					 g_param_spec_pointer ("full_bind", NULL, NULL, 
+					 g_param_spec_object ("full_bind", NULL, NULL, 
+                                                               GDA_TYPE_PARAMETER,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_RESTRICT_MODEL,
-                                         g_param_spec_pointer ("restrict_model", NULL, NULL,
+                                         g_param_spec_object ("restrict_model", NULL, NULL,
+                                                               GDA_TYPE_DATA_MODEL,
                                                                (G_PARAM_READABLE | G_PARAM_WRITABLE)));
         g_object_class_install_property (object_class, PROP_RESTRICT_COLUMN,
                                          g_param_spec_int ("restrict_column", NULL, NULL,
@@ -494,16 +497,17 @@ gda_parameter_set_property    (GObject *
 
 			break;
 		case PROP_SIMPLE_BIND:
-			gda_parameter_bind_to_param (parameter, g_value_get_pointer (value));
+			gda_parameter_bind_to_param (parameter, GDA_PARAMETER (g_value_get_object (value)));
 			break;
 		case PROP_FULL_BIND:
-			gda_parameter_set_full_bind_param (parameter, g_value_get_pointer (value));
+			gda_parameter_set_full_bind_param (parameter, GDA_PARAMETER (g_value_get_object (value)));
 			break;
-		case PROP_RESTRICT_MODEL:
-			ptr = g_value_get_pointer (value);
+		case PROP_RESTRICT_MODEL: {
+			GdaDataModel* ptr = g_value_get_object (value);
 			g_return_if_fail (gda_parameter_restrict_values (parameter, 
 									 (GdaDataModel *)ptr, -1, NULL));
 			break;
+                }
 		case PROP_RESTRICT_COLUMN:
 			parameter->priv->restrict_col = g_value_get_int (value);
 			break;
@@ -531,13 +535,13 @@ gda_parameter_get_property    (GObject *
 			g_value_set_boolean (value, parameter->priv->default_forced);
 			break;
 		case PROP_SIMPLE_BIND:
-			g_value_set_pointer (value, parameter->priv->change_with);
+			g_value_set_object (value, G_OBJECT (parameter->priv->change_with));
 			break;
 		case PROP_FULL_BIND:
-			g_value_set_pointer (value, parameter->priv->alias_of);
+			g_value_set_object (value, G_OBJECT (parameter->priv->alias_of));
 			break;
 		case PROP_RESTRICT_MODEL:
-			g_value_set_pointer (value, parameter->priv->restrict_model);
+			g_value_set_object (value, G_OBJECT (parameter->priv->restrict_model));
 			break;
 		case PROP_RESTRICT_COLUMN:
 			g_value_set_int (value, parameter->priv->restrict_col);
Index: libgda/gda-query-condition.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-query-condition.c,v
retrieving revision 1.6
diff -u -p -r1.6 gda-query-condition.c
--- libgda/gda-query-condition.c	15 Sep 2006 18:19:10 -0000	1.6
+++ libgda/gda-query-condition.c	15 Dec 2006 15:43:22 -0000
@@ -204,11 +204,13 @@ gda_query_condition_class_init (GdaQuery
 	object_class->set_property = gda_query_condition_set_property;
 	object_class->get_property = gda_query_condition_get_property;
 	g_object_class_install_property (object_class, PROP_QUERY,
-					 g_param_spec_pointer ("query", "Query to which the condition belongs", NULL, 
+					 g_param_spec_object ("query", "Query to which the condition belongs", NULL, 
+                                                               GDA_TYPE_QUERY,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE |
 								G_PARAM_CONSTRUCT_ONLY)));
 	g_object_class_install_property (object_class, PROP_JOIN,
-					 g_param_spec_pointer ("join", NULL, NULL, 
+					 g_param_spec_object ("join", NULL, NULL, 
+                                                               GDA_TYPE_QUERY_JOIN,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_COND_TYPE,
 					 g_param_spec_int ("cond_type", "Type of condition", NULL,
@@ -497,8 +499,8 @@ gda_query_condition_set_property (GObjec
 	condition = GDA_QUERY_CONDITION (object);
 	if (condition->priv) {
 		switch (param_id) {
-		case PROP_QUERY:
-			ptr = g_value_get_pointer (value);
+		case PROP_QUERY: {
+			GdaQuery* ptr = g_value_get_object (value);
                         g_return_if_fail (ptr && GDA_IS_QUERY (ptr));
 
                         if (condition->priv->query) {
@@ -515,7 +517,7 @@ gda_query_condition_set_property (GObjec
 			gda_object_connect_destroy (ptr, G_CALLBACK (destroyed_object_cb), condition);
 			gda_query_declare_condition (condition->priv->query, condition);
 
-			dict = gda_object_get_dict (ptr);
+			dict = gda_object_get_dict (GDA_OBJECT(ptr));
 			for (i=0; i<3; i++) {
 				condition->priv->ops[i] = GDA_OBJECT_REF (gda_object_ref_new (dict));
 				g_signal_connect (G_OBJECT (condition->priv->ops[i]), "ref_lost",
@@ -525,8 +527,9 @@ gda_query_condition_set_property (GObjec
 			g_object_get (G_OBJECT (ptr), "cond_serial", &id, NULL);
 			gda_query_object_set_int_id (GDA_QUERY_OBJECT (object), id);			
 			break;
-		case PROP_JOIN:
-			ptr = g_value_get_pointer (value);
+                }
+		case PROP_JOIN: {
+			GdaQueryJoin* ptr = GDA_QUERY_JOIN (g_value_get_object (value));
 			if (ptr) {
 				g_return_if_fail (GDA_IS_QUERY_JOIN (ptr));
 				g_return_if_fail (gda_query_join_get_query (GDA_QUERY_JOIN (ptr)) == condition->priv->query);
@@ -547,6 +550,7 @@ gda_query_condition_set_property (GObjec
 				gda_object_connect_destroy (ptr, G_CALLBACK (destroyed_object_cb), condition);
 			}
 			break;
+                }
 		case PROP_COND_TYPE:
 			if (condition->priv->type == g_value_get_int (value))
 				return;
@@ -570,10 +574,10 @@ gda_query_condition_get_property (GObjec
         if (condition->priv) {
                 switch (param_id) {
                 case PROP_QUERY:
-			g_value_set_pointer (value, condition->priv->query);
+			g_value_set_object (value, G_OBJECT (condition->priv->query));
                         break;
 		case PROP_JOIN:
-			g_value_set_pointer (value, condition->priv->join);
+			g_value_set_object (value, G_OBJECT (condition->priv->join));
                         break;
 		case PROP_COND_TYPE:
 			g_value_set_int (value, condition->priv->type);
Index: libgda/gda-query-field-agg.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-query-field-agg.c,v
retrieving revision 1.7
diff -u -p -r1.7 gda-query-field-agg.c
--- libgda/gda-query-field-agg.c	24 Sep 2006 18:23:37 -0000	1.7
+++ libgda/gda-query-field-agg.c	15 Dec 2006 15:43:22 -0000
@@ -217,12 +217,14 @@ gda_query_field_agg_class_init (GdaQuery
 	object_class->set_property = gda_query_field_agg_set_property;
 	object_class->get_property = gda_query_field_agg_get_property;
 	g_object_class_install_property (object_class, PROP_QUERY,
-					 g_param_spec_pointer ("query", "Query to which the field belongs", NULL, 
+					 g_param_spec_object ("query", "Query to which the field belongs", NULL, 
+                                                               GDA_TYPE_QUERY,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE |
 								G_PARAM_CONSTRUCT_ONLY)));
 
 	g_object_class_install_property (object_class, PROP_AGG_OBJ,
-					 g_param_spec_pointer ("aggregate", "A pointer to a GdaDictAggregate", NULL, 
+					 g_param_spec_object ("aggregate", "A pointer to a GdaDictAggregate", NULL,
+                                                               GDA_TYPE_DICT_AGGREGATE, 
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_AGG_NAME,
 					 g_param_spec_string ("aggregate_name", "Name of the aggregate to represent", NULL, NULL,
@@ -339,15 +341,14 @@ gda_query_field_agg_set_property (GObjec
 			GParamSpec *pspec)
 {
 	GdaQueryFieldAgg *fagg;
-	gpointer ptr;
 	guint id;
 	const gchar *str;
 
 	fagg = GDA_QUERY_FIELD_AGG (object);
 	if (fagg->priv) {
 		switch (param_id) {
-		case PROP_QUERY:
-			ptr = g_value_get_pointer (value);
+		case PROP_QUERY: {
+			GdaQuery* ptr = GDA_QUERY (g_value_get_object (value));
 			g_return_if_fail (ptr && GDA_IS_QUERY (ptr));
 
 			if (fagg->priv->query) {
@@ -367,11 +368,13 @@ gda_query_field_agg_set_property (GObjec
 			g_object_get (G_OBJECT (ptr), "field_serial", &id, NULL);
 			gda_query_object_set_int_id (GDA_QUERY_OBJECT (fagg), id);
 			break;
-		case PROP_AGG_OBJ:
-			ptr = g_value_get_pointer (value);
+                }
+		case PROP_AGG_OBJ: {
+			GdaDictAggregate* ptr = GDA_DICT_AGGREGATE(g_value_get_object (value));
 			g_return_if_fail (GDA_IS_DICT_AGGREGATE (ptr));
 			gda_object_ref_set_ref_object (fagg->priv->agg_ref, GDA_OBJECT (ptr));
 			break;
+                }
 		case PROP_AGG_NAME:
 			str = g_value_get_string (value);
 			gda_object_ref_set_ref_name (fagg->priv->agg_ref, GDA_TYPE_DICT_AGGREGATE, 
@@ -398,10 +401,10 @@ gda_query_field_agg_get_property (GObjec
 	if (fagg->priv) {
 		switch (param_id) {
 		case PROP_QUERY:
-			g_value_set_pointer (value, fagg->priv->query);
+			g_value_set_object (value, G_OBJECT (fagg->priv->query));
 			break;
 		case PROP_AGG_OBJ:
-			g_value_set_pointer (value, gda_object_ref_get_ref_object (fagg->priv->agg_ref));
+			g_value_set_object (value, G_OBJECT (gda_object_ref_get_ref_object (fagg->priv->agg_ref)));
 			break;
 		case PROP_AGG_NAME:
 		case PROP_AGG_ID:
Index: libgda/gda-query-field-all.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-query-field-all.c,v
retrieving revision 1.4
diff -u -p -r1.4 gda-query-field-all.c
--- libgda/gda-query-field-all.c	15 Sep 2006 18:19:10 -0000	1.4
+++ libgda/gda-query-field-all.c	15 Dec 2006 15:43:22 -0000
@@ -214,12 +214,14 @@ gda_query_field_all_class_init (GdaQuery
 	object_class->set_property = gda_query_field_all_set_property;
 	object_class->get_property = gda_query_field_all_get_property;
 	g_object_class_install_property (object_class, PROP_QUERY,
-					 g_param_spec_pointer ("query", "Query to which the field belongs", NULL, 
+					 g_param_spec_object ("query", "Query to which the field belongs", NULL, 
+                                                               GDA_TYPE_QUERY,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE | 
 								G_PARAM_CONSTRUCT_ONLY)));
 
 	g_object_class_install_property (object_class, PROP_TARGET_OBJ,
-					 g_param_spec_pointer ("target", "A pointer to a GdaQueryTarget", NULL, 
+					 g_param_spec_object ("target", "A pointer to a GdaQueryTarget", NULL,
+                                                               GDA_TYPE_QUERY_TARGET, 
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_TARGET_NAME,
 					 g_param_spec_string ("target_name", "Name or alias of a query target", NULL, NULL,
@@ -342,15 +344,14 @@ gda_query_field_all_set_property (GObjec
 				  GParamSpec *pspec)
 {
 	GdaQueryFieldAll *fall;
-	gpointer ptr;
 	const gchar *str;
 	guint id;
 
 	fall = GDA_QUERY_FIELD_ALL (object);
 	if (fall->priv) {
 		switch (param_id) {
-		case PROP_QUERY:
-			ptr = g_value_get_pointer (value);
+		case PROP_QUERY: {
+			GdaQuery* ptr = GDA_QUERY (g_value_get_object (value));
 			g_return_if_fail (GDA_IS_QUERY (ptr));
 			g_return_if_fail (gda_object_get_dict (GDA_OBJECT (ptr)) == gda_object_get_dict (GDA_OBJECT (fall)));
 
@@ -377,11 +378,13 @@ gda_query_field_all_set_property (GObjec
 			g_object_get (G_OBJECT (ptr), "field_serial", &id, NULL);
 			gda_query_object_set_int_id (GDA_QUERY_OBJECT (fall), id);
 			break;
-		case PROP_TARGET_OBJ:
-			ptr = g_value_get_pointer (value);
+                }
+		case PROP_TARGET_OBJ: {
+			GdaQueryTarget* ptr = GDA_QUERY_TARGET (g_value_get_object (value));
 			g_return_if_fail (GDA_IS_QUERY_TARGET (ptr));
 			gda_object_ref_set_ref_object (fall->priv->target_ref, GDA_OBJECT (ptr));
 			break;
+                }
 		case PROP_TARGET_NAME:
 			str = g_value_get_string (value);
 			gda_object_ref_set_ref_name (fall->priv->target_ref, GDA_TYPE_QUERY_TARGET, 
@@ -408,10 +411,10 @@ gda_query_field_all_get_property (GObjec
 	if (fall->priv) {
 		switch (param_id) {
 		case PROP_QUERY:
-			g_value_set_pointer (value, fall->priv->query);
+			g_value_set_object (value, G_OBJECT (fall->priv->query));
 			break;
 		case PROP_TARGET_OBJ:
-			g_value_set_pointer (value, gda_object_ref_get_ref_object (fall->priv->target_ref));
+			g_value_set_object (value, G_OBJECT (gda_object_ref_get_ref_object (fall->priv->target_ref)));
 			break;
 		case PROP_TARGET_NAME:
 		case PROP_TARGET_ID:
Index: libgda/gda-query-field-field.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-query-field-field.c,v
retrieving revision 1.12
diff -u -p -r1.12 gda-query-field-field.c
--- libgda/gda-query-field-field.c	12 Nov 2006 19:38:48 -0000	1.12
+++ libgda/gda-query-field-field.c	15 Dec 2006 15:43:23 -0000
@@ -227,12 +227,14 @@ gda_query_field_field_class_init (GdaQue
 	object_class->set_property = gda_query_field_field_set_property;
 	object_class->get_property = gda_query_field_field_get_property;
 	g_object_class_install_property (object_class, PROP_QUERY,
-					 g_param_spec_pointer ("query", "Query to which the field belongs", NULL, 
+					 g_param_spec_object ("query", "Query to which the field belongs", NULL, 
+                                                               GDA_TYPE_QUERY,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE |
 								G_PARAM_CONSTRUCT_ONLY)));
 
 	g_object_class_install_property (object_class, PROP_VALUE_PROVIDER_OBJECT,
-					 g_param_spec_pointer ("value_provider", NULL, NULL, 
+					 g_param_spec_object ("value_provider", NULL, NULL, 
+                                                               GDA_TYPE_QUERY_FIELD,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_VALUE_PROVIDER_XML_ID,
 					 g_param_spec_string ("value_provider_xml_id", NULL, NULL, NULL,
@@ -242,7 +244,8 @@ gda_query_field_field_class_init (GdaQue
                                                               (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 
 	g_object_class_install_property (object_class, PROP_TARGET_OBJ,
-					 g_param_spec_pointer ("target", "A pointer to a GdaQueryTarget", NULL, 
+					 g_param_spec_object ("target", "A pointer to a GdaQueryTarget", NULL, 
+                                                               GDA_TYPE_QUERY_TARGET,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_TARGET_NAME,
 					 g_param_spec_string ("target_name", "Name or alias of a query target", NULL, NULL,
@@ -252,7 +255,8 @@ gda_query_field_field_class_init (GdaQue
 							      G_PARAM_WRITABLE));
 
 	g_object_class_install_property (object_class, PROP_FIELD_OBJ,
-					 g_param_spec_pointer ("field", "A pointer to a GdaEntityField", NULL, 
+					 g_param_spec_object ("field", "A pointer to a GdaEntityField", NULL, 
+                                                               GDA_TYPE_ENTITY_FIELD,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_FIELD_NAME,
 					 g_param_spec_string ("field_name", "Name of an entity field", NULL, NULL,
@@ -393,7 +397,6 @@ gda_query_field_field_set_property (GObj
 				    GParamSpec *pspec)
 {
 	GdaQueryFieldField *ffield;
-	gpointer ptr;
 	const gchar *val;
 	GdaDict *dict;
 	guint id;
@@ -402,8 +405,8 @@ gda_query_field_field_set_property (GObj
 	ffield = GDA_QUERY_FIELD_FIELD (object);
 	if (ffield->priv) {
 		switch (param_id) {
-		case PROP_QUERY:
-			ptr = g_value_get_pointer (value);
+		case PROP_QUERY: {
+			GdaQuery* ptr = GDA_QUERY (g_value_get_object (value));
 			g_return_if_fail (GDA_IS_QUERY (ptr));
 			g_return_if_fail (gda_object_get_dict (GDA_OBJECT (ptr)) == gda_object_get_dict (GDA_OBJECT (ffield)));
 
@@ -433,8 +436,9 @@ gda_query_field_field_set_property (GObj
 			g_object_get (G_OBJECT (ptr), "field_serial", &id, NULL);
 			gda_query_object_set_int_id (GDA_QUERY_OBJECT (ffield), id);
 			break;
-		case PROP_VALUE_PROVIDER_OBJECT:
-			ptr = g_value_get_pointer (value);
+                }
+		case PROP_VALUE_PROVIDER_OBJECT: {
+			GdaQueryField* ptr = GDA_QUERY_FIELD (g_value_get_object (value));
 			if (ptr) {
 				g_return_if_fail (GDA_IS_QUERY_FIELD (ptr));
 				g_return_if_fail (gda_entity_field_get_entity (GDA_ENTITY_FIELD (ptr)) == 
@@ -442,7 +446,7 @@ gda_query_field_field_set_property (GObj
 				if (!ffield->priv->value_prov_ref)
 					ffield->priv->value_prov_ref = GDA_OBJECT_REF (gda_object_ref_new (gda_object_get_dict (GDA_OBJECT (ffield))));
 				gda_object_ref_set_ref_object_type (ffield->priv->value_prov_ref,
-								 ptr, GDA_TYPE_ENTITY_FIELD);
+								 GDA_OBJECT(ptr), GDA_TYPE_ENTITY_FIELD);
 			}
 			else {
 				if (ffield->priv->value_prov_ref) {
@@ -451,6 +455,7 @@ gda_query_field_field_set_property (GObj
 				}
 			}
 			break;
+                }
 		case PROP_VALUE_PROVIDER_XML_ID:
 			val = g_value_get_string (value);
 			if (val && *val) {
@@ -484,11 +489,12 @@ gda_query_field_field_set_property (GObj
 			if (val)
 				ffield->priv->plugin = g_strdup (val);
 			break;
-		case PROP_TARGET_OBJ:
-			ptr = g_value_get_pointer (value);
+		case PROP_TARGET_OBJ: {
+			GdaQueryTarget* ptr = GDA_QUERY_TARGET (g_value_get_object (value));
 			g_return_if_fail (GDA_IS_QUERY_TARGET (ptr));
 			gda_object_ref_set_ref_object (ffield->priv->target_ref, GDA_OBJECT (ptr));
 			break;
+                }
 		case PROP_TARGET_NAME:
 			str = g_value_get_string (value);
 			gda_object_ref_set_ref_name (ffield->priv->target_ref, GDA_TYPE_QUERY_TARGET, 
@@ -499,11 +505,12 @@ gda_query_field_field_set_property (GObj
 			gda_object_ref_set_ref_name (ffield->priv->target_ref, GDA_TYPE_QUERY_TARGET, 
 						     REFERENCE_BY_XML_ID, str);
 			break;
-		case PROP_FIELD_OBJ:
-			ptr = g_value_get_pointer (value);
+		case PROP_FIELD_OBJ: {
+			GdaEntityField* ptr = GDA_ENTITY_FIELD (g_value_get_object (value));
 			g_return_if_fail (GDA_IS_ENTITY_FIELD (ptr));
 			gda_object_ref_set_ref_object (ffield->priv->field_ref, GDA_OBJECT (ptr));
 			break;
+                }
 		case PROP_FIELD_NAME:
 			str = g_value_get_string (value);
 			gda_object_ref_set_ref_name (ffield->priv->field_ref, GDA_TYPE_ENTITY_FIELD, 
@@ -530,14 +537,14 @@ gda_query_field_field_get_property (GObj
 	if (ffield->priv) {
 		switch (param_id) {
 		case PROP_QUERY:
-			g_value_set_pointer (value, ffield->priv->query);
+			g_value_set_object (value, G_OBJECT (ffield->priv->query));
 			break;
 		case PROP_VALUE_PROVIDER_OBJECT:
 			if (ffield->priv->value_prov_ref)
-				g_value_set_pointer (value, 
-						     gda_object_ref_get_ref_object (ffield->priv->value_prov_ref));
+				g_value_set_object (value, 
+						     G_OBJECT (gda_object_ref_get_ref_object (ffield->priv->value_prov_ref)));
 			else
-				g_value_set_pointer (value, NULL);
+				g_value_set_object (value, NULL);
 			break;
 		case PROP_VALUE_PROVIDER_XML_ID:
 			if (ffield->priv->value_prov_ref)
@@ -562,10 +569,10 @@ gda_query_field_field_get_property (GObj
 			}
 			break;
 		case PROP_TARGET_OBJ:
-			g_value_set_pointer (value, gda_object_ref_get_ref_object (ffield->priv->target_ref));
+			g_value_set_object (value, G_OBJECT (gda_object_ref_get_ref_object (ffield->priv->target_ref)));
 			break;
 		case PROP_FIELD_OBJ:
-			g_value_set_pointer (value, gda_object_ref_get_ref_object (ffield->priv->field_ref));
+			g_value_set_object (value, G_OBJECT (gda_object_ref_get_ref_object (ffield->priv->field_ref)));
 			break;
 		case PROP_TARGET_NAME:
 		case PROP_TARGET_ID:
Index: libgda/gda-query-field-func.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-query-field-func.c,v
retrieving revision 1.7
diff -u -p -r1.7 gda-query-field-func.c
--- libgda/gda-query-field-func.c	24 Sep 2006 18:23:37 -0000	1.7
+++ libgda/gda-query-field-func.c	15 Dec 2006 15:43:23 -0000
@@ -218,12 +218,14 @@ gda_query_field_func_class_init (GdaQuer
 	object_class->set_property = gda_query_field_func_set_property;
 	object_class->get_property = gda_query_field_func_get_property;
 	g_object_class_install_property (object_class, PROP_QUERY,
-					 g_param_spec_pointer ("query", "Query to which the field belongs", NULL, 
+					 g_param_spec_object ("query", "Query to which the field belongs", NULL, 
+                                                               GDA_TYPE_QUERY,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE |
 								G_PARAM_CONSTRUCT_ONLY)));
 
 	g_object_class_install_property (object_class, PROP_FUNC_OBJ,
-					 g_param_spec_pointer ("function", "A pointer to a GdaDictFunction", NULL, 
+					 g_param_spec_object ("function", "A pointer to a GdaDictFunction", NULL,
+                                                               GDA_TYPE_DICT_FUNCTION, 
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_FUNC_NAME,
 					 g_param_spec_string ("function_name", "Name of the function to represent", NULL, NULL,
@@ -344,15 +346,14 @@ gda_query_field_func_set_property (GObje
 				   GParamSpec *pspec)
 {
 	GdaQueryFieldFunc *ffunc;
-	gpointer ptr;
 	guint id;
 	const gchar *str;
 
 	ffunc = GDA_QUERY_FIELD_FUNC (object);
 	if (ffunc->priv) {
 		switch (param_id) {
-		case PROP_QUERY:
-			ptr = g_value_get_pointer (value);
+		case PROP_QUERY: {
+			GdaQuery* ptr = GDA_QUERY (g_value_get_object (value));
 			g_return_if_fail (GDA_IS_QUERY (ptr));
 
 			if (ffunc->priv->query) {
@@ -372,11 +373,13 @@ gda_query_field_func_set_property (GObje
 			g_object_get (G_OBJECT (ptr), "field_serial", &id, NULL);
 			gda_query_object_set_int_id (GDA_QUERY_OBJECT (ffunc), id);
 			break;
-		case PROP_FUNC_OBJ:
-			ptr = g_value_get_pointer (value);
+                }
+		case PROP_FUNC_OBJ: {
+			GdaDictFunction* ptr = GDA_DICT_FUNCTION (g_value_get_object (value));
 			g_return_if_fail (GDA_IS_DICT_FUNCTION (ptr));
 			gda_object_ref_set_ref_object (ffunc->priv->func_ref, GDA_OBJECT (ptr));
 			break;
+                }
 		case PROP_FUNC_NAME:
 			str = g_value_get_string (value);
 			gda_object_ref_set_ref_name (ffunc->priv->func_ref, GDA_TYPE_DICT_FUNCTION, 
@@ -403,10 +406,10 @@ gda_query_field_func_get_property (GObje
 	if (ffunc->priv) {
 		switch (param_id) {
 		case PROP_QUERY:
-			g_value_set_pointer (value, ffunc->priv->query);
+			g_value_set_object (value, G_OBJECT (ffunc->priv->query));
 			break;
 		case PROP_FUNC_OBJ:
-			g_value_set_pointer (value, gda_object_ref_get_ref_object (ffunc->priv->func_ref));
+			g_value_set_object (value, G_OBJECT (gda_object_ref_get_ref_object (ffunc->priv->func_ref)));
 			break;
 		case PROP_FUNC_NAME:
 		case PROP_FUNC_ID:
Index: libgda/gda-query-field-value.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-query-field-value.c,v
retrieving revision 1.14
diff -u -p -r1.14 gda-query-field-value.c
--- libgda/gda-query-field-value.c	8 Nov 2006 06:37:59 -0000	1.14
+++ libgda/gda-query-field-value.c	15 Dec 2006 15:43:24 -0000
@@ -235,7 +235,8 @@ gda_query_field_value_class_init (GdaQue
 	object_class->set_property = gda_query_field_value_set_property;
 	object_class->get_property = gda_query_field_value_get_property;
 	g_object_class_install_property (object_class, PROP_QUERY,
-					 g_param_spec_pointer ("query", "Query to which the field belongs", NULL, 
+					 g_param_spec_object ("query", "Query to which the field belongs", NULL, 
+                                                               GDA_TYPE_QUERY,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE |
 								G_PARAM_CONSTRUCT_ONLY)));
         g_object_class_install_property (object_class, PROP_GDA_TYPE,
@@ -243,7 +244,8 @@ gda_query_field_value_class_init (GdaQue
 							   0, G_MAXULONG, GDA_TYPE_NULL,
 							   (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_RESTRICT_MODEL,
-                                         g_param_spec_pointer ("restrict_model", NULL, NULL,
+                                         g_param_spec_object ("restrict_model", NULL, NULL,
+                                                               GDA_TYPE_DATA_MODEL,
                                                                (G_PARAM_READABLE | G_PARAM_WRITABLE)));
         g_object_class_install_property (object_class, PROP_RESTRICT_COLUMN,
                                          g_param_spec_int ("restrict_column", NULL, NULL,
@@ -384,15 +386,14 @@ gda_query_field_value_set_property (GObj
 				    GParamSpec *pspec)
 {
 	GdaQueryFieldValue *field;
-	gpointer ptr;
 	const gchar *str;
 	guint id;
 
 	field = GDA_QUERY_FIELD_VALUE (object);
 	if (field->priv) {
 		switch (param_id) {
-		case PROP_QUERY:
-			ptr = g_value_get_pointer (value);
+		case PROP_QUERY: {
+			GdaQuery* ptr = GDA_QUERY (g_value_get_object (value));
 			g_return_if_fail (ptr && GDA_IS_QUERY (ptr));
 
 			if (field->priv->query) {
@@ -409,15 +410,17 @@ gda_query_field_value_set_property (GObj
 			g_object_get (G_OBJECT (ptr), "field_serial", &id, NULL);
 			gda_query_object_set_int_id (GDA_QUERY_OBJECT (field), id);
 			break;
+                }
 		case PROP_GDA_TYPE:
 			field->priv->g_type = g_value_get_ulong (value);
 			break;
-		case PROP_RESTRICT_MODEL:
-			ptr = g_value_get_pointer (value);
+		case PROP_RESTRICT_MODEL: {
+			GdaDataModel* ptr = GDA_DATA_MODEL (g_value_get_object (value));
 			g_return_if_fail (gda_query_field_value_restrict (field, 
-									  (GdaDataModel *)ptr, -1,
+									  ptr, -1,
 									  NULL));
 			break;
+                }
 		case PROP_RESTRICT_COLUMN:
 			field->priv->restrict_col = g_value_get_int (value);
 			break;
@@ -445,13 +448,13 @@ gda_query_field_value_get_property (GObj
 	if (field->priv) {
 		switch (param_id) {
 		case PROP_QUERY:
-			g_value_set_pointer (value, field->priv->query);
+			g_value_set_object (value, G_OBJECT (field->priv->query));
 			break;
 		case PROP_GDA_TYPE:
 			g_value_set_ulong (value, field->priv->g_type);
 			break;
 		case PROP_RESTRICT_MODEL:
-			g_value_set_pointer (value, field->priv->restrict_model);
+			g_value_set_object (value, G_OBJECT (field->priv->restrict_model));
 			break;
 		case PROP_RESTRICT_COLUMN:
 			g_value_set_int (value, field->priv->restrict_col);
Index: libgda/gda-query-join.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-query-join.c,v
retrieving revision 1.4
diff -u -p -r1.4 gda-query-join.c
--- libgda/gda-query-join.c	15 Sep 2006 18:19:10 -0000	1.4
+++ libgda/gda-query-join.c	15 Dec 2006 15:43:24 -0000
@@ -214,19 +214,22 @@ gda_query_join_class_init (GdaQueryJoinC
 	object_class->get_property = gda_query_join_get_property;
 
 	g_object_class_install_property (object_class, PROP_QUERY,
-					 g_param_spec_pointer ("query", "Query to which the field belongs", NULL, 
+					 g_param_spec_object ("query", "Query to which the field belongs", NULL, 
+                                                               GDA_TYPE_QUERY,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE |
 								G_PARAM_CONSTRUCT_ONLY)));
 
 	g_object_class_install_property (object_class, PROP_TARGET1_OBJ,
-					 g_param_spec_pointer ("target1", "A pointer to a GdaQueryTarget", NULL, 
+					 g_param_spec_object ("target1", "A pointer to a GdaQueryTarget", NULL, 
+                                                               GDA_TYPE_QUERY_TARGET,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_TARGET1_ID,
 					 g_param_spec_string ("target1_id", "XML ID of a target", NULL, NULL,
 							      G_PARAM_WRITABLE));
 
 	g_object_class_install_property (object_class, PROP_TARGET2_OBJ,
-					 g_param_spec_pointer ("target2", "A pointer to a GdaQueryTarget", NULL, 
+					 g_param_spec_object ("target2", "A pointer to a GdaQueryTarget", NULL, 
+                                                               GDA_TYPE_QUERY_TARGET,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_TARGET2_ID,
 					 g_param_spec_string ("target2_id", "XML ID of a target", NULL, NULL,
@@ -520,7 +523,6 @@ gda_query_join_set_property (GObject *ob
 			     const GValue *value,
 			     GParamSpec *pspec)
 {
-	gpointer ptr;
 	GdaQueryJoin *join;
 	GdaDict *dict;
 	const gchar *str;
@@ -528,8 +530,8 @@ gda_query_join_set_property (GObject *ob
 	join = GDA_QUERY_JOIN (object);
 	if (join->priv) {
 		switch (param_id) {
-		case PROP_QUERY:
-			ptr = g_value_get_pointer (value);
+		case PROP_QUERY: {
+			GdaQuery* ptr = GDA_QUERY (g_value_get_object (value));
 			g_return_if_fail (GDA_IS_QUERY (ptr));
 			dict = gda_object_get_dict (GDA_OBJECT (join));
 			g_return_if_fail (gda_object_get_dict (GDA_OBJECT (ptr)) == dict);
@@ -562,21 +564,24 @@ gda_query_join_set_property (GObject *ob
 					  G_CALLBACK (target_ref_lost_cb), join);
 
 			break;
-		case PROP_TARGET1_OBJ:
-			ptr = g_value_get_pointer (value);
+                }
+		case PROP_TARGET1_OBJ: {
+			GdaQueryTarget* ptr = GDA_QUERY_TARGET (g_value_get_object (value));
 			g_return_if_fail (GDA_IS_QUERY_TARGET (ptr));
 			gda_object_ref_set_ref_object (join->priv->target1, GDA_OBJECT (ptr));
 			break;
+                }
 		case PROP_TARGET1_ID:
 			str = g_value_get_string (value);
 			gda_object_ref_set_ref_name (join->priv->target1, GDA_TYPE_QUERY_TARGET, 
 						     REFERENCE_BY_XML_ID, str);
 			break;
-		case PROP_TARGET2_OBJ:
-			ptr = g_value_get_pointer (value);
+		case PROP_TARGET2_OBJ: {
+			GdaQueryTarget* ptr = GDA_QUERY_TARGET (g_value_get_object (value));
 			g_return_if_fail (GDA_IS_QUERY_TARGET (ptr));
 			gda_object_ref_set_ref_object (join->priv->target2, GDA_OBJECT (ptr));
 			break;
+                }
 		case PROP_TARGET2_ID:
 			str = g_value_get_string (value);
 			gda_object_ref_set_ref_name (join->priv->target2, GDA_TYPE_QUERY_TARGET, 
@@ -598,13 +603,13 @@ gda_query_join_get_property (GObject *ob
 	if (join->priv) {
 		switch (param_id) {
 			case PROP_QUERY:
-			g_value_set_pointer (value, join->priv->query);
+			g_value_set_object (value, G_OBJECT (join->priv->query));
 			break;
 		case PROP_TARGET1_OBJ:
-			g_value_set_pointer (value, gda_object_ref_get_ref_object (join->priv->target1));
+			g_value_set_object (value, G_OBJECT (gda_object_ref_get_ref_object (join->priv->target1)));
 			break;
 		case PROP_TARGET2_OBJ:
-			g_value_set_pointer (value, gda_object_ref_get_ref_object (join->priv->target2));
+			g_value_set_object (value, G_OBJECT (gda_object_ref_get_ref_object (join->priv->target2)));
 			break;
 		default:
 			g_assert_not_reached ();
Index: libgda/gda-query-target.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-query-target.c,v
retrieving revision 1.8
diff -u -p -r1.8 gda-query-target.c
--- libgda/gda-query-target.c	12 Nov 2006 19:38:48 -0000	1.8
+++ libgda/gda-query-target.c	15 Dec 2006 15:43:24 -0000
@@ -196,12 +196,14 @@ gda_query_target_class_init (GdaQueryTar
 	object_class->set_property = gda_query_target_set_property;
 	object_class->get_property = gda_query_target_get_property;
 	g_object_class_install_property (object_class, PROP_QUERY,
-					 g_param_spec_pointer ("query", "Query to which the target belongs", NULL, 
+					 g_param_spec_object ("query", "Query to which the target belongs", NULL, 
+                                                               GDA_TYPE_QUERY,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE |
 								G_PARAM_CONSTRUCT_ONLY)));
 
 	g_object_class_install_property (object_class, PROP_ENTITY_OBJ,
-					 g_param_spec_pointer ("entity", "A pointer to a GdaEntity", NULL, 
+					 g_param_spec_object ("entity", "A pointer to a GdaEntity", NULL, 
+                                                               GDA_TYPE_ENTITY,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_ENTITY_NAME,
 					 g_param_spec_string ("entity_name", "Name an entity", NULL, NULL,
@@ -358,7 +360,6 @@ gda_query_target_set_property (GObject *
 			       const GValue *value,
 			       GParamSpec *pspec)
 {
-	gpointer ptr;
 	GdaQueryTarget *target;
 	guint id;
 	const gchar *str;
@@ -367,8 +368,8 @@ gda_query_target_set_property (GObject *
 	target = GDA_QUERY_TARGET (object);
 	if (target->priv) {
 		switch (param_id) {
-		case PROP_QUERY:
-			ptr = g_value_get_pointer (value);
+		case PROP_QUERY: {
+			GdaQuery* ptr = GDA_QUERY (g_value_get_object (value));
 			g_return_if_fail (GDA_IS_QUERY (ptr));
 			g_return_if_fail (gda_object_get_dict (GDA_OBJECT (ptr)) == gda_object_get_dict (GDA_OBJECT (target)));
 			
@@ -389,11 +390,13 @@ gda_query_target_set_property (GObject *
 			g_object_get (G_OBJECT (ptr), "target_serial", &id, NULL);
 			gda_query_object_set_int_id (GDA_QUERY_OBJECT (target), id);
 			break;
-		case PROP_ENTITY_OBJ:
-			ptr = g_value_get_pointer (value);
+                }
+		case PROP_ENTITY_OBJ: {
+			GdaEntity* ptr = GDA_ENTITY (g_value_get_object (value));
 			g_return_if_fail (GDA_IS_ENTITY (ptr));
 			gda_object_ref_set_ref_object (target->priv->entity_ref, GDA_OBJECT (ptr));
 			break;
+                }
 		case PROP_ENTITY_NAME:
 			str = g_value_get_string (value);
 			gda_object_ref_set_ref_name (target->priv->entity_ref, GDA_TYPE_DICT_TABLE, 
@@ -425,10 +428,10 @@ gda_query_target_get_property (GObject *
 	if (target->priv) {
 		switch (param_id) {
 		case PROP_QUERY:
-			g_value_set_pointer (value, target->priv->query);
+			g_value_set_object (value, G_OBJECT (target->priv->query));
 			break;
 		case PROP_ENTITY_OBJ:
-			g_value_set_pointer (value, gda_object_ref_get_ref_object (target->priv->entity_ref));
+			g_value_set_object (value, G_OBJECT (gda_object_ref_get_ref_object (target->priv->entity_ref)));
 			break;
 		case PROP_ENTITY_NAME:
 		case PROP_ENTITY_ID:
Index: libgda/gda-query.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-query.c,v
retrieving revision 1.22
diff -u -p -r1.22 gda-query.c
--- libgda/gda-query.c	12 Nov 2006 19:38:48 -0000	1.22
+++ libgda/gda-query.c	15 Dec 2006 15:43:26 -0000
@@ -400,6 +400,10 @@ gda_query_class_init (GdaQueryClass * kl
 	g_object_class_install_property (object_class, PROP_SERIAL_COND,
 					 g_param_spec_uint ("cond_serial", NULL, NULL, 
 							    1, G_MAXUINT, 1, G_PARAM_READABLE));
+
+        /* Note that this is actually a GSList*, 
+         * but there does not seem to be a way to define that in the properties system:
+         */
 	g_object_class_install_property (object_class, PROP_REALLY_ALL_FIELDS,
 					 g_param_spec_pointer ("really_all_fields", NULL, NULL, G_PARAM_READABLE));
 
Index: libgda/gda-row.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-row.c,v
retrieving revision 1.46
diff -u -p -r1.46 gda-row.c
--- libgda/gda-row.c	8 May 2006 12:30:39 -0000	1.46
+++ libgda/gda-row.c	15 Dec 2006 15:43:26 -0000
@@ -106,8 +106,13 @@ gda_row_class_init (GdaRowClass *klass)
         object_class->get_property = gda_row_get_property;
 
 	g_object_class_install_property (object_class, PROP_MODEL,
-                                         g_param_spec_pointer ("model", NULL, NULL, 
+                                         g_param_spec_object ("model", NULL, NULL, 
+                                                               GDA_TYPE_DATA_MODEL,
 							       G_PARAM_READABLE | G_PARAM_WRITABLE));
+
+        /* Note that this is actually a GList*, 
+         * but there does not seem to be a way to define that in the properties system:
+         */
 	g_object_class_install_property (object_class, PROP_VALUES,
                                          g_param_spec_pointer ("values", NULL, NULL, 
 							       G_PARAM_WRITABLE));
@@ -181,7 +186,7 @@ gda_row_set_property (GObject *object,
         if (row->priv) {
                 switch (param_id) {
                 case PROP_MODEL:
-			gda_row_set_model (row, g_value_get_pointer (value));
+			gda_row_set_model (row, GDA_DATA_MODEL (g_value_get_object(value)));
                         break;
                 case PROP_VALUES: {
 			const GList *l;
@@ -235,7 +240,7 @@ gda_row_get_property (GObject *object,
         if (row->priv) {
                 switch (param_id) {
                 case PROP_MODEL:
-			g_value_set_pointer (value, gda_row_get_model (row));
+			g_value_set_object (value, G_OBJECT (gda_row_get_model (row)));
                         break;
                 case PROP_VALUES:
 		case PROP_NB_VALUES:
Index: libgda/gda-server-operation.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-server-operation.c,v
retrieving revision 1.10
diff -u -p -r1.10 gda-server-operation.c
--- libgda/gda-server-operation.c	8 Nov 2006 06:37:59 -0000	1.10
+++ libgda/gda-server-operation.c	15 Dec 2006 15:43:26 -0000
@@ -165,13 +165,16 @@ gda_server_operation_class_init (GdaServ
 	object_class->get_property = gda_server_operation_get_property;
 
 	g_object_class_install_property (object_class, PROP_DICT,
-					 g_param_spec_pointer ("dict", NULL, NULL, 
+					 g_param_spec_object ("dict", NULL, NULL, 
+                                                               GDA_TYPE_DICT,
 							       G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
 	g_object_class_install_property (object_class, PROP_CNC,
-					 g_param_spec_pointer ("connection", NULL, NULL, 
+					 g_param_spec_object ("connection", NULL, NULL, 
+                                                               GDA_TYPE_CONNECTION,
 							       G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
 	g_object_class_install_property (object_class, PROP_PROV,
-					 g_param_spec_pointer ("provider_obj", NULL, NULL, 
+					 g_param_spec_object ("provider_obj", NULL, NULL, 
+                                                               GDA_TYPE_SERVER_PROVIDER,
 							       G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
 	g_object_class_install_property (object_class, PROP_SPEC_FILE,
 					 g_param_spec_string ("spec_file", NULL, NULL, 
@@ -516,14 +519,14 @@ gda_server_operation_set_property (GObje
 			if (op->priv->dict)
 				g_object_unref (op->priv->dict);
 
-			op->priv->dict = ASSERT_DICT (g_value_get_pointer (value));
+			op->priv->dict = ASSERT_DICT (g_value_get_object (value));
 			g_object_ref (op->priv->dict);
 			break;
 		case PROP_CNC:
 			if (op->priv->cnc)
 				g_object_unref (op->priv->cnc);
 
-			op->priv->cnc = g_value_get_pointer (value);
+			op->priv->cnc = GDA_CONNECTION( g_value_get_object (value));
 			op->priv->cnc_set = TRUE;
 
 			if (op->priv->cnc) {
@@ -539,10 +542,10 @@ gda_server_operation_set_property (GObje
 			}
 			break;
 		case PROP_PROV:
-			if (g_value_get_pointer (value)) {
+			if (g_value_get_object (value)) {
 				if (op->priv->prov)
 					g_object_unref (op->priv->prov);
-				op->priv->prov = g_value_get_pointer (value);
+				op->priv->prov = g_value_get_object(value);
 				g_object_ref (op->priv->prov);
 			}
 			op->priv->prov_set = TRUE;
Index: libgda/graph/gda-graph-item.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/graph/gda-graph-item.c,v
retrieving revision 1.3
diff -u -p -r1.3 gda-graph-item.c
--- libgda/graph/gda-graph-item.c	8 May 2006 12:30:54 -0000	1.3
+++ libgda/graph/gda-graph-item.c	15 Dec 2006 15:43:26 -0000
@@ -151,7 +151,8 @@ gda_graph_item_class_init (GdaGraphItemC
 	object_class->get_property = gda_graph_item_get_property;
 
 	g_object_class_install_property (object_class, PROP_REF_OBJECT,
-					 g_param_spec_pointer ("ref_object", NULL, NULL, 
+					 g_param_spec_object ("ref_object", NULL, NULL, 
+                                                               GDA_TYPE_OBJECT_REF,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 
 	/* virtual functions */
@@ -258,7 +259,6 @@ gda_graph_item_set_property (GObject *ob
 			   GParamSpec *pspec)
 {
 	GdaGraphItem *graph;
-	gpointer ptr;
 
 	graph = GDA_GRAPH_ITEM (object);
 	if (graph->priv) {
@@ -266,7 +266,7 @@ gda_graph_item_set_property (GObject *ob
 		case PROP_REF_OBJECT:
 			g_assert (graph->priv->ref_object);
 			if (graph->priv->ref_object) {
-				ptr = g_value_get_pointer (value);
+				GObject* ptr = g_value_get_object (value);
 				gda_object_ref_set_ref_object (graph->priv->ref_object, ptr);
 			}
 			break;
@@ -287,7 +287,7 @@ gda_graph_item_get_property (GObject *ob
                 switch (param_id) {
                 case PROP_REF_OBJECT:
 			g_assert (graph->priv->ref_object);
-			g_value_set_pointer (value, 
+			g_value_set_object (value, 
 					     gda_object_ref_get_ref_object (graph->priv->ref_object));
                         break;
                 }
Index: libgda/graph/gda-graph.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/graph/gda-graph.c,v
retrieving revision 1.4
diff -u -p -r1.4 gda-graph.c
--- libgda/graph/gda-graph.c	28 Aug 2006 19:34:12 -0000	1.4
+++ libgda/graph/gda-graph.c	15 Dec 2006 15:43:26 -0000
@@ -186,7 +186,8 @@ gda_graph_class_init (GdaGraphClass * cl
 	object_class->get_property = gda_graph_get_property;
 
 	g_object_class_install_property (object_class, PROP_REF_OBJECT,
-					 g_param_spec_pointer ("ref_object", NULL, NULL, 
+					 g_param_spec_object ("ref_object", NULL, NULL, 
+                                                               GDA_TYPE_OBJECT_REF,
 							       (G_PARAM_READABLE | G_PARAM_WRITABLE)));
 	g_object_class_install_property (object_class, PROP_GRAPH_TYPE,
 					 g_param_spec_int ("graph_type", NULL, NULL, 
@@ -336,7 +337,6 @@ gda_graph_set_property (GObject *object,
 		       GParamSpec *pspec)
 {
 	GdaGraph *graph;
-	gpointer ptr;
 
 	graph = GDA_GRAPH (object);
 	if (graph->priv) {
@@ -346,7 +346,7 @@ gda_graph_set_property (GObject *object,
 				init_ref_object (graph);
 
 			if (graph->priv->ref_object) {
-				ptr = g_value_get_pointer (value);
+				GdaObject* ptr = GDA_OBJECT (g_value_get_object (value));
 				g_signal_handlers_block_by_func (G_OBJECT (graph->priv->ref_object),
 								 G_CALLBACK (ref_object_ref_lost_cb), graph);
 				gda_object_ref_set_ref_object (graph->priv->ref_object, ptr);
@@ -374,10 +374,10 @@ gda_graph_get_property (GObject *object,
                 switch (param_id) {
                 case PROP_REF_OBJECT:
 			if (graph->priv->ref_object) 
-				g_value_set_pointer (value, 
+				g_value_set_object (value, 
 						     gda_object_ref_get_ref_object (graph->priv->ref_object));
 			else
-				g_value_set_pointer (value, NULL);
+				g_value_set_object (value, NULL);
                         break;
 		case PROP_GRAPH_TYPE:
 			g_value_set_int (value, graph->priv->type);


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