diff options
Diffstat (limited to 'extensions/source/config/ldap/ldapaccess.hxx')
-rw-r--r-- | extensions/source/config/ldap/ldapaccess.hxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/extensions/source/config/ldap/ldapaccess.hxx b/extensions/source/config/ldap/ldapaccess.hxx index b2ea7970952e..97db4e1a9d60 100644 --- a/extensions/source/config/ldap/ldapaccess.hxx +++ b/extensions/source/config/ldap/ldapaccess.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -51,18 +51,18 @@ struct LdapUserProfile; class LdapUserProfileMap; typedef LDAP_API(int) (LDAP_CALL *t_ldap_unbind_s)( LDAP *ld ); -typedef LDAP_API(int) (LDAP_CALL *t_ldap_simple_bind_s)( LDAP *ld, const char *who, const char *passwd ); -typedef LDAP_API(int) (LDAP_CALL *t_ldap_set_option)( LDAP *ld, int option, const void *optdata ); +typedef LDAP_API(int) (LDAP_CALL *t_ldap_simple_bind_s)( LDAP *ld, const char *who, const char *passwd ); +typedef LDAP_API(int) (LDAP_CALL *t_ldap_set_option)( LDAP *ld, int option, const void *optdata ); typedef LDAP_API(char *) (LDAP_CALL *t_ldap_err2string)( int err ); typedef LDAP_API(LDAP *) (LDAP_CALL *t_ldap_init)( const char *defhost, int defport ); typedef LDAP_API(int) (LDAP_CALL *t_ldap_msgfree)( LDAPMessage *lm ); typedef LDAP_API(char *) (LDAP_CALL *t_ldap_get_dn)( LDAP *ld, LDAPMessage *entry ); -typedef LDAP_API(LDAPMessage *) (LDAP_CALL *t_ldap_first_entry)( LDAP *ld, LDAPMessage *chain ); +typedef LDAP_API(LDAPMessage *) (LDAP_CALL *t_ldap_first_entry)( LDAP *ld, LDAPMessage *chain ); typedef LDAP_API(char *) (LDAP_CALL *t_ldap_first_attribute)( LDAP *ld, LDAPMessage *entry, void **ptr ); typedef LDAP_API(char *) (LDAP_CALL *t_ldap_next_attribute)( LDAP *ld, LDAPMessage *entry, void *ptr ); -typedef LDAP_API(int) (LDAP_CALL *t_ldap_search_s)( LDAP *ld, const char *base, int scope, const char *filter, char **attrs, int attrsonly, LDAPMessage **res ); +typedef LDAP_API(int) (LDAP_CALL *t_ldap_search_s)( LDAP *ld, const char *base, int scope, const char *filter, char **attrs, int attrsonly, LDAPMessage **res ); typedef LDAP_API(void) (LDAP_CALL *t_ldap_value_free)( char **vals ); -typedef LDAP_API(char **) (LDAP_CALL *t_ldap_get_values)( LDAP *ld, LDAPMessage *entry, const char *target ); +typedef LDAP_API(char **) (LDAP_CALL *t_ldap_get_values)( LDAP *ld, LDAPMessage *entry, const char *target ); typedef LDAP_API(void) (LDAP_CALL *t_ldap_memfree)( void *p ); //------------------------------------------------------------------------------ /** Struct containing the information on LDAP connection */ @@ -87,11 +87,11 @@ struct LdapDefinition typedef std::map< rtl::OUString, rtl::OUString > LdapData; // key/value pairs /** Class encapulating all LDAP functionality */ -class LdapConnection +class LdapConnection { friend struct LdapMessageHolder; public: - + /** Default constructor */ LdapConnection(void) : mConnection(NULL),mLdapDefinition() {} /** Destructor, releases the connection */ @@ -101,7 +101,7 @@ public: throw (ldap::LdapConnectionException, ldap::LdapGenericException); - /** + /** Gets LdapUserProfile from LDAP repository for specified user @param aUser name of logged on user @param aUserProfileMap Map containing LDAP->00o mapping @@ -118,16 +118,16 @@ public: /** finds DN of user @return DN of User */ - rtl::OString findUserDn(const rtl::OString& aUser) + rtl::OString findUserDn(const rtl::OString& aUser) throw (lang::IllegalArgumentException, - ldap::LdapConnectionException, + ldap::LdapConnectionException, ldap::LdapGenericException); void loadModule(); static t_ldap_err2string s_p_err2string; private: - + void initConnection() throw (ldap::LdapConnectionException); void disconnect(); @@ -136,20 +136,20 @@ private: @return sal_True if connection is valid, sal_False otherwise */ bool isValid(void) const { return mConnection != NULL ; } - + void connectSimple() throw (ldap::LdapConnectionException, ldap::LdapGenericException); - + /** LDAP connection object */ LDAP* mConnection ; LdapDefinition mLdapDefinition; - static oslModule s_Ldap_Module; + static oslModule s_Ldap_Module; static t_ldap_value_free s_p_value_free; static t_ldap_get_values s_p_get_values; static t_ldap_unbind_s s_p_unbind_s; - static t_ldap_simple_bind_s s_p_simple_bind_s; + static t_ldap_simple_bind_s s_p_simple_bind_s; static t_ldap_set_option s_p_set_option; static t_ldap_init s_p_init; static t_ldap_msgfree s_p_msgfree; @@ -158,7 +158,7 @@ private: static t_ldap_first_attribute s_p_first_attribute; static t_ldap_next_attribute s_p_next_attribute; static t_ldap_search_s s_p_search_s; - + static t_ldap_memfree s_p_memfree; } ; |