Top |
struct | GdaDataModelLdap |
struct | GdaDataModelLdapClass |
GdaDataModelLdapPrivate | |
enum | GdaLdapSearchScope |
The GdaDataModelLdap object allows to perform LDAP searches.
Note: this type of data model is available only if the LDAP library was found at compilation time and if the LDAP provider is correctly installed.
GdaDataModel * gda_data_model_ldap_new (GdaConnection *cnc
,const gchar *base_dn
,const gchar *filter
,const gchar *attributes
,GdaLdapSearchScope scope
);
gda_data_model_ldap_new
has been deprecated since version 5.2 and should not be used in newly-written code.
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.
cnc |
an LDAP opened connection (must be a balid GdaLdapConnection) |
|
base_dn |
the base DN to search on, or |
[allow-none] |
filter |
an LDAP filter, for example "(objectClass=*)". |
[allow-none] |
attributes |
the list (CSV format) of attributes to fetch, each in the format <attname>[::<GType>]. |
[allow-none] |
scope |
the search scope |
Since: 4.2.8
GdaDataModelLdap * gda_data_model_ldap_new_with_config (GdaConnection *cnc
,const gchar *base_dn
,const gchar *filter
,const gchar *attributes
,GdaLdapSearchScope scope
);
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.
This is a convenience function intended to be used by bindings.
cnc |
an LDAP opened connection (must be a balid GdaLdapConnection) |
|
base_dn |
the base DN to search on, or |
[allow-none] |
filter |
an LDAP filter, for example "(objectClass=*)". |
[allow-none] |
attributes |
the list (CSV format) of attributes to fetch, each in the format <attname>[::<GType>]. |
[allow-none] |
scope |
the search scope |
Since: 5.2
GList * gda_data_model_ldap_compute_columns (GdaConnection *cnc
,const gchar *attributes
);
Computes the GdaColumn of the data model which would be created using attributes
when calling
gda_data_model_ldap_new()
.
cnc |
||
attributes |
a string describing which LDAP attributes to retreive, or |
[allow-none] |
Since: 4.2.8