1N/A * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 1N/A * Use is subject to license terms. 1N/A#
pragma ident "%Z%%M% %I% %E% SMI" 1N/A * The contents of this file are subject to the Netscape Public 1N/A * License Version 1.1 (the "License"); you may not use this file 1N/A * except in compliance with the License. You may obtain a copy of 1N/A * Software distributed under the License is distributed on an "AS 1N/A * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 1N/A * implied. See the License for the specific language governing 1N/A * rights and limitations under the License. 1N/A * The Original Code is Mozilla Communicator client code, released 1N/A * The Initial Developer of the Original Code is Netscape 1N/A * Communications Corporation. Portions created by Netscape are 1N/A * Copyright (C) 1998-1999 Netscape Communications Corporation. All 1N/A * Public interface for libprldap -- use NSPR (Netscape Portable Runtime) 1N/A * I/O, threads, etc. with libldap. 1N/A * Function: prldap_init(). 1N/A * Create a new LDAP session handle, but with NSPR I/O, threading, and DNS 1N/A * functions installed. 1N/A * Pass a non-zero value for the 'shared' parameter if you plan to use 1N/A * this LDAP * handle from more than one thread. 1N/A * prldap_init() returns an LDAP session handle (or NULL if an error occurs). 1N/A * Function: prldap_install_routines(). 1N/A * Install NSPR I/O, threading, and DNS functions so they will be used by 1N/A * If 'ld' is NULL, the functions are installed as the default functions 1N/A * for all new LDAP * handles). 1N/A * Pass a non-zero value for the 'shared' parameter if you plan to use 1N/A * this LDAP * handle from more than one thread. 1N/A * prldap_install_routines() returns an LDAP API error code (LDAP_SUCCESS 1N/A * if all goes well). 1N/A * Function: prldap_set_session_option(). 1N/A * Given an LDAP session handle or a session argument such is passed to 1N/A * SOCKET, POLL, NEWHANDLE, or DISPOSEHANDLE extended I/O callbacks, set 1N/A * an option that affects the prldap layer. 1N/A * If 'ld' and 'session" are both NULL, the option is set as the default 1N/A * for all new prldap sessions. 1N/A * Returns an LDAP API error code (LDAP_SUCCESS if all goes well). 1N/A * Function: prldap_get_session_option(). 1N/A * Given an LDAP session handle or a session argument such is passed to 1N/A * SOCKET, POLL, NEWHANDLE, or DISPOSEHANDLE extended I/O callbacks, retrieve 1N/A * the setting for an option that affects the prldap layer. 1N/A * If 'ld' and 'session" are both NULL, the default option value for all new 1N/A * new prldap sessions is retrieved. 1N/A * Returns an LDAP API error code (LDAP_SUCCESS if all goes well). 1N/A * Function: prldap_set_session_info(). 1N/A * Given an LDAP session handle, set some application-specific data. 1N/A * Returns an LDAP API error code (LDAP_SUCCESS if all goes well). 1N/A * Function: prldap_get_session_info(). 1N/A * Given an LDAP session handle, retrieve some application-specific data. 1N/A * Returns an LDAP API error code (LDAP_SUCCESS if all goes well, in 1N/A * which case the fields in the structure that seip points to are filled in). 1N/A * Function: prldap_set_socket_info(). 1N/A * Given an integer fd and a void * argument such as those passed to the 1N/A * extended I/O callback functions, set socket specific information. 1N/A * Returns an LDAP API error code (LDAP_SUCCESS if all goes well). 1N/A * Note: it is only safe to change soinfo_prfd from within the SOCKET 1N/A * extended I/O callback function. 1N/A * Function: prldap_get_socket_info(). 1N/A * Given an integer fd and a void * argument such as those passed to the 1N/A * extended I/O callback functions, retrieve socket specific information. 1N/A * Returns an LDAP API error code (LDAP_SUCCESS if all goes well, in 1N/A * which case the fields in the structure that soip points to are filled in). 1N/A * Function: prldap_get_default_socket_info(). 1N/A * Given an LDAP session handle, retrieve socket specific information. 1N/A * If ld is NULL, LDAP_PARAM_ERROR is returned. 1N/A * Returns an LDAP API error code (LDAP_SUCCESS if all goes well, in 1N/A * which case the fields in the structure that soip points to are filled in). 1N/A * Function: prldap_set_default_socket_info(). 1N/A * Given an LDAP session handle, set socket specific information. 1N/A * If ld is NULL, LDAP_PARAM_ERROR is returned. 1N/A * Returns an LDAP API error code (LDAP_SUCCESS if all goes well, in 1N/A * which case the fields in the structure that soip points to are filled in).