Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

276 lines
9.2 KiB

  1. /*
  2. * proto-ldap.h
  3. * function prototypes for ldap library
  4. */
  5. #ifndef LDAPFUNCDECL
  6. #ifdef _WIN32
  7. #define LDAPFUNCDECL __declspec( dllexport )
  8. #else /* _WIN32 */
  9. #define LDAPFUNCDECL
  10. #endif /* _WIN32 */
  11. #endif /* LDAPFUNCDECL */
  12. /*
  13. * in abandon.c:
  14. */
  15. LDAPFUNCDECL int __cdecl ldap_abandon( LDAP *ld, int msgid );
  16. /*
  17. * in add.c:
  18. */
  19. LDAPFUNCDECL int __cdecl ldap_add( LDAP *ld, char *dn, LDAPMod **attrs );
  20. LDAPFUNCDECL int __cdecl ldap_add_s( LDAP *ld, char *dn, LDAPMod **attrs );
  21. /*
  22. * in bind.c:
  23. */
  24. LDAPFUNCDECL int __cdecl ldap_bind( LDAP *ld, char *who, char *passwd, int authmethod );
  25. LDAPFUNCDECL int __cdecl ldap_bind_s( LDAP *ld, char *who, char *cred, int method );
  26. #ifdef LDAP_REFERRALS
  27. LDAPFUNCDECL void __cdecl ldap_set_rebind_proc( LDAP *ld, int (*rebindproc)( LDAP *ld,
  28. char **dnp, char **passwdp, int *authmethodp, int freeit ));
  29. #endif /* LDAP_REFERRALS */
  30. /*
  31. * in sbind.c:
  32. */
  33. LDAPFUNCDECL int __cdecl ldap_simple_bind( LDAP *ld, char *who, char *passwd );
  34. LDAPFUNCDECL int __cdecl ldap_simple_bind_s( LDAP *ld, char *who, char *passwd );
  35. /*
  36. * in kbind.c:
  37. */
  38. LDAPFUNCDECL int __cdecl ldap_kerberos_bind_s( LDAP *ld, char *who );
  39. LDAPFUNCDECL int __cdecl ldap_kerberos_bind1( LDAP *ld, char *who );
  40. LDAPFUNCDECL int __cdecl ldap_kerberos_bind1_s( LDAP *ld, char *who );
  41. LDAPFUNCDECL int __cdecl ldap_kerberos_bind2( LDAP *ld, char *who );
  42. LDAPFUNCDECL int __cdecl ldap_kerberos_bind2_s( LDAP *ld, char *who );
  43. #ifndef NO_CACHE
  44. /*
  45. * in cache.c
  46. */
  47. LDAPFUNCDECL int __cdecl ldap_enable_cache( LDAP *ld, long timeout, long maxmem );
  48. LDAPFUNCDECL void __cdecl ldap_disable_cache( LDAP *ld );
  49. LDAPFUNCDECL void __cdecl ldap_set_cache_options( LDAP *ld, unsigned long opts );
  50. LDAPFUNCDECL void __cdecl ldap_destroy_cache( LDAP *ld );
  51. LDAPFUNCDECL void __cdecl ldap_flush_cache( LDAP *ld );
  52. LDAPFUNCDECL void __cdecl ldap_uncache_entry( LDAP *ld, char *dn );
  53. LDAPFUNCDECL void __cdecl ldap_uncache_request( LDAP *ld, int msgid );
  54. #endif /* !NO_CACHE */
  55. /*
  56. * in compare.c:
  57. */
  58. LDAPFUNCDECL int __cdecl ldap_compare( LDAP *ld, char *dn, char *attr, char *value );
  59. LDAPFUNCDECL int __cdecl ldap_compare_s( LDAP *ld, char *dn, char *attr, char *value );
  60. /*
  61. * in delete.c:
  62. */
  63. LDAPFUNCDECL int __cdecl ldap_delete( LDAP *ld, char *dn );
  64. LDAPFUNCDECL int __cdecl ldap_delete_s( LDAP *ld, char *dn );
  65. /*
  66. * in error.c:
  67. */
  68. LDAPFUNCDECL int __cdecl ldap_result2error( LDAP *ld, LDAPMessage *r, int freeit );
  69. LDAPFUNCDECL char * __cdecl ldap_err2string( int err );
  70. LDAPFUNCDECL void __cdecl ldap_perror( LDAP *ld, char *s );
  71. /*
  72. * in modify.c:
  73. */
  74. LDAPFUNCDECL int __cdecl ldap_modify( LDAP *ld, char *dn, LDAPMod **mods );
  75. LDAPFUNCDECL int __cdecl ldap_modify_s( LDAP *ld, char *dn, LDAPMod **mods );
  76. /*
  77. * in modrdn.c:
  78. */
  79. LDAPFUNCDECL int __cdecl ldap_modrdn( LDAP *ld, char *dn, char *newrdn );
  80. LDAPFUNCDECL int __cdecl ldap_modrdn_s( LDAP *ld, char *dn, char *newrdn );
  81. LDAPFUNCDECL int __cdecl ldap_modrdn2( LDAP *ld, char *dn, char *newrdn,
  82. int deleteoldrdn );
  83. LDAPFUNCDECL int __cdecl ldap_modrdn2_s( LDAP *ld, char *dn, char *newrdn,
  84. int deleteoldrdn);
  85. /*
  86. * in open.c:
  87. */
  88. LDAPFUNCDECL LDAP * __cdecl ldap_open( char *host, int port );
  89. LDAPFUNCDECL LDAP * __cdecl ldap_init( char *defhost, int defport );
  90. /*
  91. * in getentry.c:
  92. */
  93. LDAPFUNCDECL LDAPMessage * __cdecl ldap_first_entry( LDAP *ld, LDAPMessage *chain );
  94. LDAPFUNCDECL LDAPMessage * __cdecl ldap_next_entry( LDAP *ld, LDAPMessage *entry );
  95. LDAPFUNCDECL int __cdecl ldap_count_entries( LDAP *ld, LDAPMessage *chain );
  96. /*
  97. * in addentry.c
  98. */
  99. LDAPFUNCDECL LDAPMessage * __cdecl ldap_delete_result_entry( LDAPMessage **list,
  100. LDAPMessage *e );
  101. LDAPFUNCDECL void __cdecl ldap_add_result_entry( LDAPMessage **list, LDAPMessage *e );
  102. /*
  103. * in getdn.c
  104. */
  105. LDAPFUNCDECL char * __cdecl ldap_get_dn( LDAP *ld, LDAPMessage *entry );
  106. LDAPFUNCDECL char * __cdecl ldap_dn2ufn( char *dn );
  107. LDAPFUNCDECL char ** __cdecl ldap_explode_dn( char *dn, int notypes );
  108. LDAPFUNCDECL char ** __cdecl ldap_explode_dns( char *dn );
  109. LDAPFUNCDECL int __cdecl ldap_is_dns_dn( char *dn );
  110. /*
  111. * in getattr.c
  112. */
  113. LDAPFUNCDECL char * __cdecl ldap_first_attribute( LDAP *ld, LDAPMessage *entry,
  114. BerElement **ber );
  115. LDAPFUNCDECL char * __cdecl ldap_next_attribute( LDAP *ld, LDAPMessage *entry,
  116. BerElement *ber );
  117. /*
  118. * in getvalues.c
  119. */
  120. LDAPFUNCDECL char ** __cdecl ldap_get_values( LDAP *ld, LDAPMessage *entry, char *target );
  121. LDAPFUNCDECL struct berval ** __cdecl ldap_get_values_len( LDAP *ld, LDAPMessage *entry,
  122. char *target );
  123. LDAPFUNCDECL int __cdecl ldap_count_values( char **vals );
  124. LDAPFUNCDECL int __cdecl ldap_count_values_len( struct berval **vals );
  125. LDAPFUNCDECL void __cdecl ldap_value_free( char **vals );
  126. LDAPFUNCDECL void __cdecl ldap_value_free_len( struct berval **vals );
  127. /*
  128. * in result.c:
  129. */
  130. LDAPFUNCDECL int __cdecl ldap_result( LDAP *ld, int msgid, int all,
  131. struct timeval *timeout, LDAPMessage **result );
  132. LDAPFUNCDECL int __cdecl ldap_msgfree( LDAPMessage *lm );
  133. LDAPFUNCDECL int __cdecl ldap_msgdelete( LDAP *ld, int msgid );
  134. /*
  135. * in search.c:
  136. */
  137. LDAPFUNCDECL int __cdecl ldap_search( LDAP *ld, char *base, int scope, char *filter,
  138. char **attrs, int attrsonly );
  139. LDAPFUNCDECL int __cdecl ldap_search_s( LDAP *ld, char *base, int scope, char *filter,
  140. char **attrs, int attrsonly, LDAPMessage **res );
  141. LDAPFUNCDECL int __cdecl ldap_search_st( LDAP *ld, char *base, int scope, char *filter,
  142. char **attrs, int attrsonly, struct timeval *timeout, LDAPMessage **res );
  143. /*
  144. * in ufn.c
  145. */
  146. LDAPFUNCDECL int __cdecl ldap_ufn_search_c( LDAP *ld, char *ufn, char **attrs,
  147. int attrsonly, LDAPMessage **res, int (*cancelproc)( void *cl ),
  148. void *cancelparm );
  149. LDAPFUNCDECL int __cdecl ldap_ufn_search_ct( LDAP *ld, char *ufn, char **attrs,
  150. int attrsonly, LDAPMessage **res, int (*cancelproc)( void *cl ),
  151. void *cancelparm, char *tag1, char *tag2, char *tag3 );
  152. LDAPFUNCDECL int __cdecl ldap_ufn_search_s( LDAP *ld, char *ufn, char **attrs,
  153. int attrsonly, LDAPMessage **res );
  154. LDAPFUNCDECL LDAPFiltDesc * __cdecl ldap_ufn_setfilter( LDAP *ld, char *fname );
  155. LDAPFUNCDECL void __cdecl ldap_ufn_setprefix( LDAP *ld, char *prefix );
  156. LDAPFUNCDECL int __cdecl ldap_ufn_timeout( void *tvparam );
  157. /*
  158. * in unbind.c
  159. */
  160. LDAPFUNCDECL int __cdecl ldap_unbind( LDAP *ld );
  161. LDAPFUNCDECL int __cdecl ldap_unbind_s( LDAP *ld );
  162. /*
  163. * in getfilter.c
  164. */
  165. LDAPFUNCDECL LDAPFiltDesc * __cdecl ldap_init_getfilter( char *fname );
  166. LDAPFUNCDECL LDAPFiltDesc * __cdecl ldap_init_getfilter_buf( char *buf, long buflen );
  167. LDAPFUNCDECL LDAPFiltInfo * __cdecl ldap_getfirstfilter( LDAPFiltDesc *lfdp, char *tagpat,
  168. char *value );
  169. LDAPFUNCDECL LDAPFiltInfo * __cdecl ldap_getnextfilter( LDAPFiltDesc *lfdp );
  170. LDAPFUNCDECL void __cdecl ldap_setfilteraffixes( LDAPFiltDesc *lfdp, char *prefix, char *suffix );
  171. LDAPFUNCDECL void __cdecl ldap_build_filter( char *buf, unsigned long buflen,
  172. char *pattern, char *prefix, char *suffix, char *attr,
  173. char *value, char **valwords );
  174. /*
  175. * in free.c
  176. */
  177. LDAPFUNCDECL void __cdecl ldap_getfilter_free( LDAPFiltDesc *lfdp );
  178. LDAPFUNCDECL void __cdecl ldap_mods_free( LDAPMod **mods, int freemods );
  179. /*
  180. * in friendly.c
  181. */
  182. LDAPFUNCDECL char * __cdecl ldap_friendly_name( char *filename, char *uname,
  183. FriendlyMap **map );
  184. LDAPFUNCDECL void __cdecl ldap_free_friendlymap( FriendlyMap **map );
  185. /*
  186. * in cldap.c
  187. */
  188. LDAPFUNCDECL LDAP *cldap_open( char *host, int port );
  189. LDAPFUNCDECL void cldap_close( LDAP *ld );
  190. LDAPFUNCDECL int cldap_search_s( LDAP *ld, char *base, int scope, char *filter,
  191. char **attrs, int attrsonly, LDAPMessage **res, char *logdn );
  192. LDAPFUNCDECL void cldap_setretryinfo( LDAP *ld, int tries, int timeout );
  193. /*
  194. * in sort.c
  195. */
  196. LDAPFUNCDECL int ldap_sort_entries( LDAP *ld, LDAPMessage **chain, char *attr,
  197. int (*cmp)() );
  198. LDAPFUNCDECL int ldap_sort_values( LDAP *ld, char **vals, int (*cmp)() );
  199. LDAPFUNCDECL int ldap_sort_strcasecmp( char **a, char **b );
  200. /*
  201. * in url.c
  202. */
  203. LDAPFUNCDECL int __cdecl ldap_is_ldap_url( char *url );
  204. LDAPFUNCDECL int __cdecl ldap_url_parse( char *url, LDAPURLDesc **ludpp );
  205. LDAPFUNCDECL void __cdecl ldap_free_urldesc( LDAPURLDesc *ludp );
  206. LDAPFUNCDECL int __cdecl ldap_url_search( LDAP *ld, char *url, int attrsonly );
  207. LDAPFUNCDECL int __cdecl ldap_url_search_s( LDAP *ld, char *url, int attrsonly,
  208. LDAPMessage **res );
  209. LDAPFUNCDECL int __cdecl ldap_url_search_st( LDAP *ld, char *url, int attrsonly,
  210. struct timeval *timeout, LDAPMessage **res );
  211. /*
  212. * in charset.c
  213. */
  214. #ifdef STR_TRANSLATION
  215. LDAPFUNCDECL void __cdecl ldap_set_string_translators( LDAP *ld,
  216. BERTranslateProc encode_proc, BERTranslateProc decode_proc );
  217. LDAPFUNCDECL int __cdecl ldap_translate_from_t61( LDAP *ld, char **bufp,
  218. unsigned long *lenp, int free_input );
  219. LDAPFUNCDECL int __cdecl ldap_translate_to_t61( LDAP *ld, char **bufp,
  220. unsigned long *lenp, int free_input );
  221. LDAPFUNCDECL void __cdecl ldap_enable_translation( LDAP *ld, LDAPMessage *entry,
  222. int enable );
  223. #ifdef LDAP_CHARSET_8859
  224. LDAPFUNCDECL int __cdecl ldap_t61_to_8859( char **bufp, unsigned long *buflenp,
  225. int free_input );
  226. LDAPFUNCDECL int __cdecl ldap_8859_to_t61( char **bufp, unsigned long *buflenp,
  227. int free_input );
  228. #endif /* LDAP_CHARSET_8859 */
  229. #endif /* STR_TRANSLATION */
  230. #ifdef WINSOCK
  231. /*
  232. * in msdos/winsock/wsa.c
  233. */
  234. LDAPFUNCDECL void __cdecl ldap_memfree( void *p );
  235. #endif /* WINSOCK */