[libgda] Fixes to avoid API break in Vala and GI bindings in GI 1.31 (See Bug 667837)
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Fixes to avoid API break in Vala and GI bindings in GI 1.31 (See Bug 667837)
- Date: Mon, 23 Jan 2012 23:12:18 +0000 (UTC)
commit 397c78af6832d24813a8276d44d0acbe676133c3
Author: Daniel Espinosa <despinosa src gnome org>
Date: Mon Jan 23 14:52:56 2012 -0600
Fixes to avoid API break in Vala and GI bindings in GI 1.31 (See Bug 667837)
libgda/Gda-5.0.metadata | 2 +
libgda/Makefile.am | 2 +-
libgda/libgda-5.0.vapi | 57 ++++++++++++++++++++++++-----------------------
3 files changed, 32 insertions(+), 29 deletions(-)
---
diff --git a/libgda/Gda-5.0.metadata b/libgda/Gda-5.0.metadata
index 778867d..f460715 100644
--- a/libgda/Gda-5.0.metadata
+++ b/libgda/Gda-5.0.metadata
@@ -44,4 +44,6 @@ Holder.get_value nullable=true
Row.get_value nullable=true
Numeric.get_string nullable=true
//Numeric.number hidden=true
+// Set Gda.DataProxy() as default
+DataProxy.new skip=true
diff --git a/libgda/Makefile.am b/libgda/Makefile.am
index 9c99b8a..126bcc7 100644
--- a/libgda/Makefile.am
+++ b/libgda/Makefile.am
@@ -371,7 +371,7 @@ if ENABLE_VALA
vapi: libgda-5.0.vapi
libgda-5.0.vapi: Gda-5.0.gir
- $(VAPIGEN) --metadatadir=$(top_srcdir)/libgda --library libgda-5.0 --pkg libxml-2.0 Gda-5.0.gir
+ $(VAPIGEN) --metadatadir=$(top_srcdir)/libgda --library libgda-5.0 --pkg libxml-2.0 Gda-5.0.gir libgda-5.0-custom.vala
vapidir = $(VAPIDIR)
vapi_DATA=libgda-5.0.vapi
diff --git a/libgda/libgda-5.0.vapi b/libgda/libgda-5.0.vapi
index fc60ff8..ff721ab 100644
--- a/libgda/libgda-5.0.vapi
+++ b/libgda/libgda-5.0.vapi
@@ -149,7 +149,7 @@ namespace Gda {
public unowned Gda.ServerProvider get_provider ();
public unowned string get_provider_name ();
public unowned Gda.TransactionStatus get_transaction_status ();
- public bool insert_row_into_table_v (string table, GLib.SList<string> col_names, GLib.SList<GLib.Value> values) throws GLib.Error;
+ public bool insert_row_into_table_v (string table, GLib.SList<string> col_names, GLib.SList<GLib.Value?> values) throws GLib.Error;
public bool is_opened ();
public bool open () throws GLib.Error;
public static Gda.Connection open_from_dsn (string dsn, string? auth_string, Gda.ConnectionOptions options) throws GLib.Error;
@@ -171,7 +171,7 @@ namespace Gda {
public static void string_split (string string, string out_cnc_params, string out_provider, string out_username, string out_password);
public bool supports_feature (Gda.ConnectionFeature feature);
public bool update_meta_store (Gda.MetaContext? context) throws GLib.Error;
- public bool update_row_in_table_v (string table, string condition_column_name, GLib.Value condition_value, GLib.SList<string> col_names, GLib.SList<GLib.Value> values) throws GLib.Error;
+ public bool update_row_in_table_v (string table, string condition_column_name, GLib.Value condition_value, GLib.SList<string> col_names, GLib.SList<GLib.Value?> values) throws GLib.Error;
public string value_to_sql_string (GLib.Value from);
[NoAccessorMethod]
public string auth_string { owned get; set; }
@@ -330,8 +330,8 @@ namespace Gda {
[NoAccessorMethod]
public Gda.DataModel model { owned get; set; }
}
- [CCode (cheader_filename = "libgda/libgda.h", type_id = "gda_data_proxy_get_type ()")]
- public class DataProxy : GLib.Object, Gda.DataModel {
+ [CCode (cheader_filename = "libgda/libgda.h")]
+ public class DataProxy : GLib.Object, Gda.DataModel, Gda.DataModel {
[CCode (has_construct_function = false)]
protected DataProxy ();
public void alter_value_attributes (int proxy_row, int col, Gda.ValueAttribute alter_flags);
@@ -353,9 +353,10 @@ namespace Gda {
public int get_sample_size ();
public int get_sample_start ();
public Gda.ValueAttribute get_value_attributes (int proxy_row, int col);
- public GLib.SList<weak GLib.Value> get_values (int proxy_row, [CCode (array_length = false)] int[] cols_index, int n_cols);
+ public GLib.SList<weak GLib.Value?> get_values (int proxy_row, [CCode (array_length = false)] int[] cols_index, int n_cols);
public bool has_changed ();
public bool is_read_only ();
+ [CCode (cname = "gda_data_proxy_new")]
public static GLib.Object @new (Gda.DataModel model);
public bool row_has_changed (int proxy_row);
public bool row_is_deleted (int proxy_row);
@@ -571,7 +572,7 @@ namespace Gda {
public Gda.DataModel create_modify_data_model (string table_name);
public bool declare_foreign_key (Gda.MetaStruct? mstruct, string fk_name, string? catalog, string? schema, string table, string? ref_catalog, string? ref_schema, string ref_table, [CCode (array_length_cname = "nb_cols", array_length_pos = 8.5, array_length_type = "guint")] string[] colnames, [CCode (array_length_cname = "nb_cols", array_length_pos = 8.5, array_length_type = "guint")] string[] ref_colnames) throws GLib.Error;
public static GLib.Quark error_quark ();
- public Gda.DataModel extract_v (string select_sql, GLib.HashTable<string,GLib.Value>? vars) throws GLib.Error;
+ public Gda.DataModel extract_v (string select_sql, GLib.HashTable<string,GLib.Value?>? vars) throws GLib.Error;
public bool get_attribute_value (string att_name, out string att_value) throws GLib.Error;
public unowned Gda.Connection get_internal_connection ();
public int get_version ();
@@ -1243,22 +1244,22 @@ namespace Gda {
public bool trylock ();
public void unlock ();
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct DataMetaWrapper {
public weak GLib.Object object;
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct DataMetaWrapperClass {
public weak GLib.ObjectClass parent_class;
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct Diff {
public Gda.DiffType type;
public int old_row;
public int new_row;
public weak GLib.HashTable<void*,void*> values;
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct DsnInfo {
public weak string name;
public weak string provider;
@@ -1267,7 +1268,7 @@ namespace Gda {
public weak string auth_string;
public bool is_system;
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct MetaContext {
public weak string table_name;
public int size;
@@ -1276,7 +1277,7 @@ namespace Gda {
[CCode (array_length_cname = "size")]
public weak GLib.Value[] column_values;
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct MetaDbObject {
public Gda.MetaDbObjectType obj_type;
public bool outdated;
@@ -1292,13 +1293,13 @@ namespace Gda {
[CCode (cname = "extra.meta_view")]
public Gda.MetaView extra_meta_view;
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct MetaStoreChange {
public Gda.MetaStoreChangeType c_type;
public weak string table_name;
public weak GLib.HashTable<void*,void*> keys;
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct MetaTable {
public GLib.List<Gda.MetaTableColumn> columns;
public int pk_cols_array;
@@ -1306,7 +1307,7 @@ namespace Gda {
public GLib.List<Gda.MetaTableForeignKey> reverse_fk_list;
public GLib.List<Gda.MetaTableForeignKey> fk_list;
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct MetaTableColumn {
public weak string column_name;
public weak string column_type;
@@ -1318,7 +1319,7 @@ namespace Gda {
public GLib.Value get_attribute (string attribute);
public void set_attribute (string attribute, GLib.Value? value, GLib.DestroyNotify? destroy);
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct MetaTableForeignKey {
public Gda.MetaDbObject meta_table;
public Gda.MetaDbObject depend_on;
@@ -1329,13 +1330,13 @@ namespace Gda {
public weak string ref_pk_names_array;
public weak string fk_name;
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct MetaView {
public Gda.MetaTable table;
public weak string view_def;
public bool is_updatable;
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct ProviderInfo {
public weak string id;
public weak string location;
@@ -1343,24 +1344,24 @@ namespace Gda {
public weak Gda.Set dsn_params;
public weak Gda.Set auth_params;
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct ServerProviderHandlerInfo {
public weak Gda.Connection cnc;
public GLib.Type g_type;
public weak string dbms_type;
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct SetGroup {
public GLib.List<Gda.SetNode> nodes;
public Gda.SetSource nodes_source;
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct SetNode {
public weak Gda.Holder holder;
public weak Gda.DataModel source_model;
public int source_column;
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct SetSource {
public weak Gda.DataModel data_model;
public GLib.List<Gda.SetNode> nodes;
@@ -1369,7 +1370,7 @@ namespace Gda {
[SimpleType]
public struct SqlBuilderId : uint {
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct SqlRenderingContext {
public Gda.StatementSqlFlag flags;
public weak Gda.Set @params;
@@ -1378,12 +1379,12 @@ namespace Gda {
public weak Gda.Connection cnc;
public weak Gda.SqlRenderingValue render_value;
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct ThreadNotification {
public Gda.ThreadNotificationType type;
public uint job_id;
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct TransactionStatusEvent {
public weak Gda.TransactionStatus trans;
public Gda.TransactionStatusEventType type;
@@ -1395,7 +1396,7 @@ namespace Gda {
[CCode (cname = "pl.sub_trans")]
public weak Gda.TransactionStatus pl_sub_trans;
}
- [CCode (cheader_filename = "libgda/libgda.h")]
+ [CCode (cheader_filename = "libgda/libgda.h", has_type_id = false)]
public struct XaTransactionId {
public uint32 format;
public ushort gtrid_length;
@@ -1404,7 +1405,7 @@ namespace Gda {
public weak char[] data;
public string to_string ();
}
- [CCode (cheader_filename = "libgda/libgda.h", cname = "_GdaServerOperationNode")]
+ [CCode (cheader_filename = "libgda/libgda.h", cname = "_GdaServerOperationNode", has_type_id = false)]
public struct _ServerOperationNode {
public Gda.ServerOperationNodeType type;
public Gda.ServerOperationNodeStatus status;
@@ -1413,7 +1414,7 @@ namespace Gda {
public weak Gda.Column column;
public weak Gda.Holder param;
}
- [CCode (cheader_filename = "libgda/libgda.h", cname = "_GdaSqlParserIface")]
+ [CCode (cheader_filename = "libgda/libgda.h", cname = "_GdaSqlParserIface", has_type_id = false)]
public struct _SqlParserIface {
public weak Gda.SqlParser parser;
public weak Gda.SqlStatement parsed_statement;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]