[libgdamm] Adapt to null value changes in libgda.



commit 3b07840672d35800c59342ca79bc8659a39ffd64
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Jun 16 10:04:01 2011 +0200

    Adapt to null value changes in libgda.
    
    * libgda/src/libgda_methods.defs: Regenerated.
    * libgda/libgdamm/value.[h|cc]: Value() constructor: Call the new
    gda_value_new_null() because libgda no longer uses gtype=0 (invalid) to mean
      NULL. Addded set_null(), wrapping the new gda_value_set_null() function.

 ChangeLog                      |    9 ++
 libgda/libgdamm/value.cc       |    7 +-
 libgda/libgdamm/value.h        |    1 +
 libgda/src/libgda_methods.defs |  222 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 238 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5b387a5..db26592 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-06-16  Murray Cumming  <murrayc murrayc com>
+
+	Adapt to null value changes in libgda.
+
+	* libgda/src/libgda_methods.defs: Regenerated.
+	* libgda/libgdamm/value.[h|cc]: Value() constructor: Call the new 
+	gda_value_new_null() because libgda no longer uses gtype=0 (invalid) to mean 
+  NULL. Addded set_null(), wrapping the new gda_value_set_null() function.
+
 2011-03-30  Murray Cumming  <murrayc murrayc com>
 
 	Adjust the compiler warning flags used with --enable-warnings=fatal.
diff --git a/libgda/libgdamm/value.cc b/libgda/libgdamm/value.cc
index 08fb729..2df7223 100644
--- a/libgda/libgdamm/value.cc
+++ b/libgda/libgdamm/value.cc
@@ -195,7 +195,7 @@ Value::Value()
 :
   Glib::ValueBase()
 {
-  //Creates a null. TODO: Is this really equivalent to gda_value_new_null()?
+  init(gda_value_new_null());
 }
 
 Value::Value(const Value& src)
@@ -242,6 +242,11 @@ bool Value::is_null() const
   return gda_value_is_null(const_cast<GValue*>(gobj()));
 }
 
+void Value::set_null()
+{
+  gda_value_set_null( gobj() );
+}
+
 bool Value::is_number() const
 {
   return gda_value_is_number(const_cast<GValue*>(gobj()));
diff --git a/libgda/libgdamm/value.h b/libgda/libgdamm/value.h
index 4e342f5..68644e1 100644
--- a/libgda/libgdamm/value.h
+++ b/libgda/libgdamm/value.h
@@ -124,6 +124,7 @@ public:
   GType get_value_type() const;
 
   bool is_null() const;
+  void set_null();
 
   bool is_number() const;
 
diff --git a/libgda/src/libgda_methods.defs b/libgda/src/libgda_methods.defs
index 6f606d8..ac66dad 100644
--- a/libgda/src/libgda_methods.defs
+++ b/libgda/src/libgda_methods.defs
@@ -75,6 +75,13 @@
   (gtype-id "GDA_TYPE_DATA_MODEL_ARRAY")
 )
 
+(define-object DataModelBdb
+  (in-module "Gda")
+  (parent "GObject")
+  (c-name "GdaDataModelBdb")
+  (gtype-id "GDA_TYPE_DATA_MODEL_BDB")
+)
+
 (define-object DataModelDir
   (in-module "Gda")
   (parent "GObject")
@@ -89,6 +96,13 @@
   (gtype-id "GDA_TYPE_DATA_MODEL_IMPORT")
 )
 
+(define-object DataModelLdap
+  (in-module "Gda")
+  (parent "GObject")
+  (c-name "GdaDataModelLdap")
+  (gtype-id "GDA_TYPE_DATA_MODEL_LDAP")
+)
+
 (define-object DataProxy
   (in-module "Gda")
   (parent "GObject")
@@ -256,6 +270,13 @@
   (gtype-id "GDA_TYPE_TREE_MGR_LABEL")
 )
 
+(define-object TreeMgrLdap
+  (in-module "Gda")
+  (parent "GdaTreeManager")
+  (c-name "GdaTreeMgrLdap")
+  (gtype-id "GDA_TYPE_TREE_MGR_LDAP")
+)
+
 (define-object TreeMgrSchemas
   (in-module "Gda")
   (parent "GdaTreeManager")
@@ -516,6 +537,8 @@
     '("feature-non-supported-error" "GDA_DATA_MODEL_FEATURE_NON_SUPPORTED_ERROR")
     '("file-exist-error" "GDA_DATA_MODEL_FILE_EXIST_ERROR")
     '("xml-format-error" "GDA_DATA_MODEL_XML_FORMAT_ERROR")
+    '("truncated-error" "GDA_DATA_MODEL_TRUNCATED_ERROR")
+    '("other-error" "GDA_DATA_MODEL_OTHER_ERROR")
   )
 )
 
@@ -528,6 +551,17 @@
   )
 )
 
+(define-enum LdapSearchScope
+  (in-module "Gda")
+  (c-name "GdaLdapSearchScope")
+  (gtype-id "GDA_TYPE_LDAP_SEARCH_SCOPE")
+  (values
+    '("base" "GDA_LDAP_SEARCH_BASE")
+    '("onelevel" "GDA_LDAP_SEARCH_ONELEVEL")
+    '("subtree" "GDA_LDAP_SEARCH_SUBTREE")
+  )
+)
+
 (define-enum DataProxyError
   (in-module "Gda")
   (c-name "GdaDataProxyError")
@@ -2512,6 +2546,15 @@
   (varargs #t)
 )
 
+(define-function gda_data_model_array_new_with_g_types_v
+  (c-name "gda_data_model_array_new_with_g_types_v")
+  (return-type "GdaDataModel*")
+  (parameters
+    '("gint" "cols")
+    '("GType*" "types")
+  )
+)
+
 (define-function gda_data_model_array_new
   (c-name "gda_data_model_array_new")
   (is-constructor-of "GdaDataModelArray")
@@ -2557,6 +2600,37 @@
 
 
 
+;; From gda-data-model-bdb.h
+
+(define-function gda_data_model_bdb_get_type
+  (c-name "gda_data_model_bdb_get_type")
+  (return-type "GType")
+)
+
+(define-function gda_data_model_bdb_new
+  (c-name "gda_data_model_bdb_new")
+  (is-constructor-of "GdaDataModelBdb")
+  (return-type "GdaDataModel*")
+  (parameters
+    '("const-gchar*" "filename")
+    '("const-gchar*" "db_name")
+  )
+)
+
+(define-method get_errors
+  (of-object "GdaDataModelBdb")
+  (c-name "gda_data_model_bdb_get_errors")
+  (return-type "const-GSList*")
+)
+
+(define-method clean_errors
+  (of-object "GdaDataModelBdb")
+  (c-name "gda_data_model_bdb_clean_errors")
+  (return-type "none")
+)
+
+
+
 ;; From gda-data-model-dir.h
 
 (define-function gda_data_model_dir_get_type
@@ -2829,6 +2903,12 @@
   )
 )
 
+(define-method get_exceptions
+  (of-object "GdaDataModel")
+  (c-name "gda_data_model_get_exceptions")
+  (return-type "GError**")
+)
+
 (define-method export_to_string
   (of-object "GdaDataModel")
   (c-name "gda_data_model_export_to_string")
@@ -3079,6 +3159,37 @@
 
 
 
+;; From gda-data-model-ldap.h
+
+(define-function gda_data_model_ldap_get_type
+  (c-name "gda_data_model_ldap_get_type")
+  (return-type "GType")
+)
+
+(define-function gda_data_model_ldap_new
+  (c-name "gda_data_model_ldap_new")
+  (is-constructor-of "GdaDataModelLdap")
+  (return-type "GdaDataModel*")
+  (parameters
+    '("GdaConnection*" "cnc")
+    '("const-gchar*" "base_dn")
+    '("const-gchar*" "filter")
+    '("const-gchar*" "attributes")
+    '("GdaLdapSearchScope" "scope")
+  )
+)
+
+(define-function gda_data_model_ldap_compute_columns
+  (c-name "gda_data_model_ldap_compute_columns")
+  (return-type "GList*")
+  (parameters
+    '("GdaConnection*" "cnc")
+    '("const-gchar*" "attributes")
+  )
+)
+
+
+
 ;; From gda-data-model-private.h
 
 (define-method add_data_from_xml_node
@@ -3517,6 +3628,11 @@
   (return-type "GType")
 )
 
+(define-function gda_ldap_search_scope_get_type
+  (c-name "gda_ldap_search_scope_get_type")
+  (return-type "GType")
+)
+
 (define-function gda_data_model_iter_error_get_type
   (c-name "gda_data_model_iter_error_get_type")
   (return-type "GType")
@@ -4016,6 +4132,17 @@
   (varargs #t)
 )
 
+(define-method extract_v
+  (of-object "GdaMetaStore")
+  (c-name "gda_meta_store_extract_v")
+  (return-type "GdaDataModel*")
+  (parameters
+    '("const-gchar*" "select_sql")
+    '("GHashTable*" "vars")
+    '("GError**" "error")
+  )
+)
+
 (define-method modify
   (of-object "GdaMetaStore")
   (c-name "gda_meta_store_modify")
@@ -4029,6 +4156,21 @@
   (varargs #t)
 )
 
+(define-method modify_v
+  (of-object "GdaMetaStore")
+  (c-name "gda_meta_store_modify_v")
+  (return-type "gboolean")
+  (parameters
+    '("const-gchar*" "table_name")
+    '("GdaDataModel*" "new_data")
+    '("const-gchar*" "condition")
+    '("gint" "nvalues")
+    '("const-gchar**" "value_names")
+    '("const-GValue**" "values")
+    '("GError**" "error")
+  )
+)
+
 (define-method modify_with_context
   (of-object "GdaMetaStore")
   (c-name "gda_meta_store_modify_with_context")
@@ -4605,6 +4747,15 @@
   (varargs #t)
 )
 
+(define-method get_value_at_path
+  (of-object "GdaServerOperation")
+  (c-name "gda_server_operation_get_value_at_path")
+  (return-type "const-GValue*")
+  (parameters
+    '("const-gchar*" "path")
+  )
+)
+
 (define-method get_sql_identifier_at
   (of-object "GdaServerOperation")
   (c-name "gda_server_operation_get_sql_identifier_at")
@@ -4617,6 +4768,17 @@
   (varargs #t)
 )
 
+(define-method get_sql_identifier_at_path
+  (of-object "GdaServerOperation")
+  (c-name "gda_server_operation_get_sql_identifier_at_path")
+  (return-type "gchar*")
+  (parameters
+    '("GdaConnection*" "cnc")
+    '("GdaServerProvider*" "prov")
+    '("const-gchar*" "path")
+  )
+)
+
 (define-method set_value_at
   (of-object "GdaServerOperation")
   (c-name "gda_server_operation_set_value_at")
@@ -4629,6 +4791,17 @@
   (varargs #t)
 )
 
+(define-method set_value_at_path
+  (of-object "GdaServerOperation")
+  (c-name "gda_server_operation_set_value_at_path")
+  (return-type "gboolean")
+  (parameters
+    '("const-gchar*" "value")
+    '("const-gchar*" "path")
+    '("GError**" "error")
+  )
+)
+
 (define-method save_data_to_xml
   (of-object "GdaServerOperation")
   (c-name "gda_server_operation_save_data_to_xml")
@@ -5858,6 +6031,16 @@
   )
 )
 
+(define-method update_children
+  (of-object "GdaTree")
+  (c-name "gda_tree_update_children")
+  (return-type "gboolean")
+  (parameters
+    '("GdaTreeNode*" "node")
+    '("GError**" "error")
+  )
+)
+
 (define-method get_nodes_in_path
   (of-object "GdaTree")
   (c-name "gda_tree_get_nodes_in_path")
@@ -6024,6 +6207,25 @@
 
 
 
+;; From gda-tree-mgr-ldap.h
+
+(define-function gda_tree_mgr_ldap_get_type
+  (c-name "gda_tree_mgr_ldap_get_type")
+  (return-type "GType")
+)
+
+(define-function gda_tree_mgr_ldap_new
+  (c-name "gda_tree_mgr_ldap_new")
+  (is-constructor-of "GdaTreeMgrLdap")
+  (return-type "GdaTreeManager*")
+  (parameters
+    '("GdaConnection*" "cnc")
+    '("const-gchar*" "dn")
+  )
+)
+
+
+
 ;; From gda-tree-mgr-schemas.h
 
 (define-function gda_tree_mgr_schemas_get_type
@@ -6250,6 +6452,16 @@
   (varargs #t)
 )
 
+(define-function gda_utility_check_data_model_v
+  (c-name "gda_utility_check_data_model_v")
+  (return-type "gboolean")
+  (parameters
+    '("GdaDataModel*" "model")
+    '("gint" "nbcols")
+    '("GType*" "types")
+  )
+)
+
 (define-function gda_utility_data_model_dump_data_to_xml
   (c-name "gda_utility_data_model_dump_data_to_xml")
   (return-type "gboolean")
@@ -6436,6 +6648,11 @@
   )
 )
 
+(define-function gda_value_new_null
+  (c-name "gda_value_new_null")
+  (return-type "GValue*")
+)
+
 (define-function gda_value_new_binary
   (c-name "gda_value_new_binary")
   (return-type "GValue*")
@@ -6777,6 +6994,11 @@
   )
 )
 
+(define-function gda_null_get_type
+  (c-name "gda_null_get_type")
+  (return-type "GType")
+)
+
 (define-function gda_numeric_get_type
   (c-name "gda_numeric_get_type")
   (return-type "GType")



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