1 /* 2 * e-source-ldap.h 3 * 4 * This library is free software: you can redistribute it and/or modify it 5 * under the terms of the GNU Lesser General Public License as published by 6 * the Free Software Foundation. 7 * 8 * This library is distributed in the hope that it will be useful, but 9 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 10 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 11 * for more details. 12 * 13 * You should have received a copy of the GNU Lesser General Public License 14 * along with this library. If not, see <http://www.gnu.org/licenses/>. 15 * 16 */ 17 18 #if !defined (__LIBEDATASERVER_H_INSIDE__) && !defined (LIBEDATASERVER_COMPILATION) 19 #error "Only <libedataserver/libedataserver.h> should be included directly." 20 #endif 21 22 #ifndef E_SOURCE_LDAP_H 23 #define E_SOURCE_LDAP_H 24 25 #include <libedataserver/e-source-extension.h> 26 #include <libedataserver/e-source-enums.h> 27 28 /* Standard GObject macros */ 29 #define E_TYPE_SOURCE_LDAP \ 30 (e_source_ldap_get_type ()) 31 #define E_SOURCE_LDAP(obj) \ 32 (G_TYPE_CHECK_INSTANCE_CAST \ 33 ((obj), E_TYPE_SOURCE_LDAP, ESourceLDAP)) 34 #define E_SOURCE_LDAP_CLASS(cls) \ 35 (G_TYPE_CHECK_CLASS_CAST \ 36 ((cls), E_TYPE_SOURCE_LDAP, ESourceLDAPClass)) 37 #define E_IS_SOURCE_LDAP(obj) \ 38 (G_TYPE_CHECK_INSTANCE_TYPE \ 39 ((obj), E_TYPE_SOURCE_LDAP)) 40 #define E_IS_SOURCE_LDAP_CLASS(cls) \ 41 (G_TYPE_CHECK_CLASS_TYPE \ 42 ((cls), E_TYPE_SOURCE_LDAP)) 43 #define E_SOURCE_LDAP_GET_CLASS(obj) \ 44 (G_TYPE_INSTANCE_GET_CLASS \ 45 ((obj), E_TYPE_SOURCE_LDAP, ESourceLDAPClass)) 46 47 /** 48 * E_SOURCE_EXTENSION_LDAP_BACKEND: 49 * 50 * Pass this extension name to e_source_get_extension() to access 51 * #ESourceLDAP. This is also used as a group name in key files. 52 * 53 * Since: 3.18 54 **/ 55 #define E_SOURCE_EXTENSION_LDAP_BACKEND "LDAP Backend" 56 57 G_BEGIN_DECLS 58 59 typedef struct _ESourceLDAP ESourceLDAP; 60 typedef struct _ESourceLDAPClass ESourceLDAPClass; 61 typedef struct _ESourceLDAPPrivate ESourceLDAPPrivate; 62 63 struct _ESourceLDAP { 64 /*< private >*/ 65 ESourceExtension parent; 66 ESourceLDAPPrivate *priv; 67 }; 68 69 struct _ESourceLDAPClass { 70 ESourceExtensionClass parent_class; 71 }; 72 73 GType e_source_ldap_get_type (void); 74 ESourceLDAPAuthentication 75 e_source_ldap_get_authentication 76 (ESourceLDAP *extension); 77 void e_source_ldap_set_authentication 78 (ESourceLDAP *extension, 79 ESourceLDAPAuthentication authentication); 80 gboolean e_source_ldap_get_can_browse (ESourceLDAP *extension); 81 void e_source_ldap_set_can_browse (ESourceLDAP *extension, 82 gboolean can_browse); 83 const gchar * e_source_ldap_get_filter (ESourceLDAP *extension); 84 gchar * e_source_ldap_dup_filter (ESourceLDAP *extension); 85 void e_source_ldap_set_filter (ESourceLDAP *extension, 86 const gchar *filter); 87 guint e_source_ldap_get_limit (ESourceLDAP *extension); 88 void e_source_ldap_set_limit (ESourceLDAP *extension, 89 guint limit); 90 const gchar * e_source_ldap_get_root_dn (ESourceLDAP *extension); 91 gchar * e_source_ldap_dup_root_dn (ESourceLDAP *extension); 92 void e_source_ldap_set_root_dn (ESourceLDAP *extension, 93 const gchar *root_dn); 94 ESourceLDAPScope 95 e_source_ldap_get_scope (ESourceLDAP *extension); 96 void e_source_ldap_set_scope (ESourceLDAP *extension, 97 ESourceLDAPScope scope); 98 ESourceLDAPSecurity 99 e_source_ldap_get_security (ESourceLDAP *extension); 100 void e_source_ldap_set_security (ESourceLDAP *extension, 101 ESourceLDAPSecurity security); 102 103 G_END_DECLS 104 105 #endif /* E_SOURCE_LDAP_H */ 106