[libgda] GdaMetaContext API for bindings improvements. * Added gda_meta_context_get_type to convert to GBoxed
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] GdaMetaContext API for bindings improvements. * Added gda_meta_context_get_type to convert to GBoxed
- Date: Tue, 14 Feb 2012 20:28:07 +0000 (UTC)
commit 56f04b7d9fd46e934f350230328fece37a504a91
Author: Daniel Espinosa <despinosa src gnome org>
Date: Tue Feb 14 14:05:37 2012 -0600
GdaMetaContext API for bindings improvements.
* Added gda_meta_context_get_type to convert to GBoxed type and allow its use in bindings
libgda/Gda-5.0.gir | 288 +++++-
libgda/gda-attributes-manager.c | 2 +-
libgda/gda-meta-store.c | 9 +-
libgda/gda-meta-store.h | 6 +-
libgda/libgda-5.0.vapi | 2073 ---------------------------------------
libgda/libgda.symbols | 1 +
6 files changed, 276 insertions(+), 2103 deletions(-)
---
diff --git a/libgda/Gda-5.0.gir b/libgda/Gda-5.0.gir
index e34346f..72d911a 100644
--- a/libgda/Gda-5.0.gir
+++ b/libgda/Gda-5.0.gir
@@ -7453,6 +7453,171 @@ row it was on was the last one).</doc>
c:type="GdaDataModelIterPrivate"
disguised="1">
</record>
+ <class name="DataModelLdap"
+ c:symbol-prefix="data_model_ldap"
+ c:type="GdaDataModelLdap"
+ parent="GObject.Object"
+ glib:type-name="GdaDataModelLdap"
+ glib:get-type="gda_data_model_ldap_get_type"
+ glib:type-struct="DataModelLdapClass">
+ <implements name="DataModel"/>
+ <function name="compute_columns"
+ c:identifier="gda_data_model_ldap_compute_columns"
+ version="4.2.8">
+ <doc xml:whitespace="preserve">Computes the #GdaColumn of the data model which would be created using @attributes when calling
+gda_data_model_ldap_new().</doc>
+ <return-value transfer-ownership="full">
+ <doc xml:whitespace="preserve">a list of #GdaColumn objects</doc>
+ <type name="GLib.List" c:type="GList*">
+ <type name="Column"/>
+ </type>
+ </return-value>
+ <parameters>
+ <parameter name="cnc" transfer-ownership="none">
+ <doc xml:whitespace="preserve">a #GdaConnection</doc>
+ <type name="Connection" c:type="GdaConnection*"/>
+ </parameter>
+ <parameter name="attributes"
+ transfer-ownership="none"
+ allow-none="1">
+ <doc xml:whitespace="preserve">a string describing which LDAP attributes to retreive, or %NULL</doc>
+ <type name="utf8" c:type="gchar*"/>
+ </parameter>
+ </parameters>
+ </function>
+ <function name="new"
+ c:identifier="gda_data_model_ldap_new"
+ version="4.2.8">
+ <doc xml:whitespace="preserve">Creates a new #GdaDataModel object to extract some LDAP contents. The returned data model will
+contain one row for each LDAP entry returned by the search, and will
+always return the DN (Distinguished Name) of the LDAP entry as first column. Other atttibutes
+may be mapped to other columns, see the @attributes argument.
+
+Note that the actual LDAP search command is not executed until necessary (when using the returned
+data model).
+
+The @base_dn is the point in the LDAP's DIT (Directory Information Tree) from where the search will
+occur, for example "dc=gda,dc=org". A %NULL value indicates that the starting point for the
+search will be the one specified when opening the LDAP connection.
+
+The @filter argument is a valid LDAP filter string, for example "(uidNumber=1001)". If %NULL, then
+a default search filter of "(objectClass=*)" will be used.
+
+ attributes specifies which LDAP attributes the search must return. It is a comma separated list
+of attribute names, for example "uidNumber, mail, uid, jpegPhoto" (spaces between attribute names
+are ignored). If %NULL, then no attribute will be fetched. See gda_ldap_connection_declare_table()
+for more information about this argument.
+
+ scope is the scope of search specified when the LDAP search is actually executed.
+
+In case of multi valued attributes, an error will be returned when trying to read the attribute:
+gda_data_model_iter_get_value_at() will return %NULL when using an iterator.</doc>
+ <return-value transfer-ownership="full">
+ <doc xml:whitespace="preserve">a new #GdaDataModel</doc>
+ <type name="DataModel" c:type="GdaDataModel*"/>
+ </return-value>
+ <parameters>
+ <parameter name="cnc" transfer-ownership="none">
+ <doc xml:whitespace="preserve">an LDAP opened connection (must be a balid #GdaLdapConnection)</doc>
+ <type name="Connection" c:type="GdaConnection*"/>
+ </parameter>
+ <parameter name="base_dn" transfer-ownership="none" allow-none="1">
+ <doc xml:whitespace="preserve">the base DN to search on, or %NULL</doc>
+ <type name="utf8" c:type="gchar*"/>
+ </parameter>
+ <parameter name="filter" transfer-ownership="none" allow-none="1">
+ <doc xml:whitespace="preserve">an LDAP filter, for example "(objectClass=*)"</doc>
+ <type name="utf8" c:type="gchar*"/>
+ </parameter>
+ <parameter name="attributes"
+ transfer-ownership="none"
+ allow-none="1">
+ <doc xml:whitespace="preserve">the list (CSV format) of attributes to fetch, each in the format &lt;attname&gt;[::&lt;GType&gt;]</doc>
+ <type name="utf8" c:type="gchar*"/>
+ </parameter>
+ <parameter name="scope" transfer-ownership="none">
+ <doc xml:whitespace="preserve">the search scope</doc>
+ <type name="LdapSearchScope" c:type="GdaLdapSearchScope"/>
+ </parameter>
+ </parameters>
+ </function>
+ <property name="attributes"
+ readable="0"
+ writable="1"
+ construct-only="1"
+ transfer-ownership="none">
+ <type name="utf8"/>
+ </property>
+ <property name="base"
+ writable="1"
+ construct-only="1"
+ transfer-ownership="none">
+ <type name="utf8"/>
+ </property>
+ <property name="cnc"
+ writable="1"
+ construct-only="1"
+ transfer-ownership="none">
+ <type name="Connection"/>
+ </property>
+ <property name="filter"
+ writable="1"
+ construct-only="1"
+ transfer-ownership="none">
+ <type name="utf8"/>
+ </property>
+ <property name="scope"
+ writable="1"
+ construct-only="1"
+ transfer-ownership="none">
+ <type name="gint"/>
+ </property>
+ <field name="object">
+ <type name="GObject.Object" c:type="GObject"/>
+ </field>
+ <field name="priv">
+ <type name="DataModelLdapPrivate" c:type="GdaDataModelLdapPrivate*"/>
+ </field>
+ </class>
+ <record name="DataModelLdapClass"
+ c:type="GdaDataModelLdapClass"
+ glib:is-gtype-struct-for="DataModelLdap">
+ <field name="parent_class">
+ <type name="GObject.ObjectClass" c:type="GObjectClass"/>
+ </field>
+ <field name="_gda_reserved1" introspectable="0">
+ <callback name="_gda_reserved1">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ </callback>
+ </field>
+ <field name="_gda_reserved2" introspectable="0">
+ <callback name="_gda_reserved2">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ </callback>
+ </field>
+ <field name="_gda_reserved3" introspectable="0">
+ <callback name="_gda_reserved3">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ </callback>
+ </field>
+ <field name="_gda_reserved4" introspectable="0">
+ <callback name="_gda_reserved4">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ </callback>
+ </field>
+ </record>
+ <record name="DataModelLdapPrivate"
+ c:type="GdaDataModelLdapPrivate"
+ disguised="1">
+ </record>
<class name="DataPivot"
c:symbol-prefix="data_pivot"
c:type="GdaDataPivot"
@@ -10102,6 +10267,14 @@ otherwise.</doc>
</enumeration>
<record name="HolderPrivate" c:type="GdaHolderPrivate" disguised="1">
</record>
+ <enumeration name="LdapSearchScope" c:type="GdaLdapSearchScope">
+ <doc xml:whitespace="preserve">Defines the search scope of an LDAP search command, relative to the base object.</doc>
+ <member name="base" value="1" c:identifier="GDA_LDAP_SEARCH_BASE"/>
+ <member name="onelevel"
+ value="2"
+ c:identifier="GDA_LDAP_SEARCH_ONELEVEL"/>
+ <member name="subtree" value="3" c:identifier="GDA_LDAP_SEARCH_SUBTREE"/>
+ </enumeration>
<interface name="Lockable"
c:symbol-prefix="lockable"
c:type="GdaLockable"
@@ -10201,7 +10374,11 @@ This function can be used even if g_thread_init() has not yet been called, and,
</callback>
</field>
</record>
- <record name="MetaContext" c:type="GdaMetaContext">
+ <record name="MetaContext"
+ c:type="GdaMetaContext"
+ glib:type-name="GdaMetaContext"
+ glib:get-type="gda_meta_context_get_type"
+ c:symbol-prefix="meta_context">
<doc xml:whitespace="preserve">The <structname>GdaMetaContext</structname> represents a meta data modification
context: the <emphasis>how</emphasis> when used with gda_meta_store_modify_with_context(),
and the <emphasis>what</emphasis> when used with gda_connection_update_meta_store().
@@ -10232,18 +10409,46 @@ Don't try to use #gda_meta_context_free on a struct that was created manually.</
<type name="GLib.GValue"/>
</type>
</field>
- <method name="add_column" c:identifier="gda_meta_context_add_column">
+ <constructor name="new"
+ c:identifier="gda_meta_context_new"
+ version="5.2">
+ <doc xml:whitespace="preserve">Creates a new #GdaMetaContext struct with a #GHashTable to store column/value pairs, using
+given @table_name in the context.
+
+store column name/value pairs.</doc>
+ <return-value transfer-ownership="full">
+ <doc xml:whitespace="preserve">a new #GdaMetaContext struct with a copied table's name and a new created hash to</doc>
+ <type name="MetaContext" c:type="GdaMetaContext*"/>
+ </return-value>
+ <parameters>
+ <parameter name="table_name" transfer-ownership="none">
+ <doc xml:whitespace="preserve">the column's value</doc>
+ <type name="utf8" c:type="gchar*"/>
+ </parameter>
+ </parameters>
+ </constructor>
+ <method name="add_column"
+ c:identifier="gda_meta_context_add_column"
+ version="5.2">
+ <doc xml:whitespace="preserve">Insert a new column/value pair to the given context @ctx. Column, must be a column in the given table's
+name setted by #gda_meta_context_set_table () (a table in the <link linkend="information_schema">database
+schema</link>).
+
+Column's name and value is copied and destroied when #gda_meta_context_free is called.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="column" transfer-ownership="none">
+ <doc xml:whitespace="preserve">the column's name</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
+ <doc xml:whitespace="preserve">the column's value</doc>
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
- <parameter name="cnc" transfer-ownership="none">
+ <parameter name="cnc" transfer-ownership="none" allow-none="1">
+ <doc xml:whitespace="preserve">a #GdaConnection to be used when identifier are normalized, or NULL</doc>
<type name="Connection" c:type="GdaConnection*"/>
</parameter>
</parameters>
@@ -10304,24 +10509,6 @@ about database's tables.</doc>
</parameter>
</parameters>
</method>
- <function name="new"
- c:identifier="gda_meta_context_new"
- version="5.2"
- introspectable="0">
- <doc xml:whitespace="preserve">Creates a new #GdaMetaContext struct with a #GHashTable to store column/value pairs, using
-given @table in the context.
-
-store column name/value pairs.</doc>
- <return-value transfer-ownership="full">
- <doc xml:whitespace="preserve">a new #GdaMetaContext struct with a copied table's name and a new created hash to</doc>
- <type name="MetaContext" c:type="GdaMetaContext*"/>
- </return-value>
- <parameters>
- <parameter name="table_name" transfer-ownership="none">
- <type name="utf8" c:type="gchar*"/>
- </parameter>
- </parameters>
- </function>
</record>
<record name="MetaDbObject" c:type="GdaMetaDbObject">
<doc xml:whitespace="preserve">Struture to hold information about each database object (tables, views, ...),
@@ -22144,6 +22331,65 @@ priority over the GdaTreeMgrColumns:connection property.</doc>
</record>
<record name="TreeMgrLabelPriv" c:type="GdaTreeMgrLabelPriv" disguised="1">
</record>
+ <class name="TreeMgrLdap"
+ c:symbol-prefix="tree_mgr_ldap"
+ c:type="GdaTreeMgrLdap"
+ parent="TreeManager"
+ glib:type-name="GdaTreeMgrLdap"
+ glib:get-type="gda_tree_mgr_ldap_get_type"
+ glib:type-struct="TreeMgrLdapClass">
+ <constructor name="new"
+ c:identifier="gda_tree_mgr_ldap_new"
+ version="4.2.8">
+ <doc xml:whitespace="preserve">Creates a new #GdaTreeManager object which will list the children of the LDAP entry which Distinguished name
+is @dn. If @dn is %NULL, then the tree manager will look in the tree itself for an attribute named "dn" and
+use it.</doc>
+ <return-value transfer-ownership="full">
+ <doc xml:whitespace="preserve">a new #GdaTreeManager object</doc>
+ <type name="TreeManager" c:type="GdaTreeManager*"/>
+ </return-value>
+ <parameters>
+ <parameter name="cnc" transfer-ownership="none">
+ <doc xml:whitespace="preserve">a #GdaConnection object</doc>
+ <type name="Connection" c:type="GdaConnection*"/>
+ </parameter>
+ <parameter name="dn" transfer-ownership="none" allow-none="1">
+ <doc xml:whitespace="preserve">an LDAP Distinguished Name or %NULL</doc>
+ <type name="utf8" c:type="gchar*"/>
+ </parameter>
+ </parameters>
+ </constructor>
+ <property name="connection"
+ introspectable="0"
+ writable="1"
+ construct-only="1"
+ transfer-ownership="none">
+ <doc xml:whitespace="preserve">Defines the #GdaLdapConnection to get information from.</doc>
+ <type/>
+ </property>
+ <property name="dn"
+ writable="1"
+ construct-only="1"
+ transfer-ownership="none">
+ <doc xml:whitespace="preserve">Defines the Distinguised Name of the LDAP entry to list children from</doc>
+ <type name="utf8"/>
+ </property>
+ <field name="object">
+ <type name="TreeManager" c:type="GdaTreeManager"/>
+ </field>
+ <field name="priv">
+ <type name="TreeMgrLdapPriv" c:type="GdaTreeMgrLdapPriv*"/>
+ </field>
+ </class>
+ <record name="TreeMgrLdapClass"
+ c:type="GdaTreeMgrLdapClass"
+ glib:is-gtype-struct-for="TreeMgrLdap">
+ <field name="object_class">
+ <type name="TreeManagerClass" c:type="GdaTreeManagerClass"/>
+ </field>
+ </record>
+ <record name="TreeMgrLdapPriv" c:type="GdaTreeMgrLdapPriv" disguised="1">
+ </record>
<class name="TreeMgrSchemas"
c:symbol-prefix="tree_mgr_schemas"
c:type="GdaTreeMgrSchemas"
diff --git a/libgda/gda-attributes-manager.c b/libgda/gda-attributes-manager.c
index fa82328..5572adb 100644
--- a/libgda/gda-attributes-manager.c
+++ b/libgda/gda-attributes-manager.c
@@ -89,7 +89,7 @@ objattrs_unref (ObjAttrs *attrs)
}
/**
- * gda_attributes_manager_new: (skip)
+ * gda_attributes_manager_new:
* @for_objects: set to TRUE if attributes will be set on objects.
* @signal_func: (allow-none): a function to be called whenever an attribute changes on an object (if @for_objects is TRUE), or %NULL
* @signal_data: user data passed as last argument of @signal_func when it is called
diff --git a/libgda/gda-meta-store.c b/libgda/gda-meta-store.c
index be60976..5c66f61 100644
--- a/libgda/gda-meta-store.c
+++ b/libgda/gda-meta-store.c
@@ -76,7 +76,7 @@ gda_meta_context_copy (GdaMetaContext *ctx)
Register GdaMetaContext type
*/
GType
-_gda_meta_context_get_type (void)
+gda_meta_context_get_type (void)
{
static GType type = 0;
@@ -109,11 +109,10 @@ _gda_meta_context_get_type (void)
/**
* gda_meta_context_new:
- * @ctx: a #GdaMetaContext struct to add column/value pais to
- * @table: (transfer none): the column's value
+ * @table_name: (transfer none): the column's value
*
* Creates a new #GdaMetaContext struct with a #GHashTable to store column/value pairs, using
- * given @table in the context.
+ * given @table_name in the context.
*
* Return: (transfer full): a new #GdaMetaContext struct with a copied table's name and a new created hash to
* store column name/value pairs.
@@ -166,7 +165,7 @@ gda_meta_context_get_table (GdaMetaContext *ctx)
}
/**
- * gda_meta_context_insert_column:
+ * gda_meta_context_add_column:
* @ctx: a #GdaMetaContext struct to add column/value pais to
* @column: (transfer none): the column's name
* @value: (transfer none): the column's value
diff --git a/libgda/gda-meta-store.h b/libgda/gda-meta-store.h
index 2b56e14..84ca4df 100644
--- a/libgda/gda-meta-store.h
+++ b/libgda/gda-meta-store.h
@@ -70,8 +70,8 @@ typedef struct {
} GdaMetaStoreChange;
-/* Pointer type for GdaMetaContext (not a boxed type!) */
-#define GDA_TYPE_META_CONTEXT (_gda_meta_context_get_type())
+/* Pointer type for GdaMetaContext */
+#define GDA_TYPE_META_CONTEXT (gda_meta_context_get_type())
/**
* GdaMetaContext:
@@ -201,7 +201,7 @@ gboolean gda_meta_store_undeclare_foreign_key (GdaMetaStore *store,
const gchar *ref_catalog, const gchar *ref_schema, const gchar *ref_table,
GError **error);
-GType _gda_meta_context_get_type (void) G_GNUC_CONST;
+GType gda_meta_context_get_type (void) G_GNUC_CONST;
GdaMetaContext* gda_meta_context_new (const gchar* table_name);
void gda_meta_context_set_table (GdaMetaContext *ctx, const gchar *table);
const gchar* gda_meta_context_get_table (GdaMetaContext *ctx);
diff --git a/libgda/libgda.symbols b/libgda/libgda.symbols
index 912f69b..1040a56 100644
--- a/libgda/libgda.symbols
+++ b/libgda/libgda.symbols
@@ -439,6 +439,7 @@
gda_log_error
gda_log_is_enabled
gda_log_message
+ gda_meta_context_get_type
gda_meta_context_new
gda_meta_context_set_table
gda_meta_context_get_table
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]