Reactos
at master 64 lines 1.9 kB view raw
1/* 2 winber.h - Header file for the Windows LDAP Basic Encoding Rules API 3 4 Written by Filip Navara <xnavara@volny.cz> 5 6 References: 7 The C LDAP Application Program Interface 8 http://www.watersprings.org/pub/id/draft-ietf-ldapext-ldap-c-api-05.txt 9 10 Lightweight Directory Access Protocol Reference 11 http://msdn.microsoft.com/library/en-us/netdir/ldap/ldap_reference.asp (DEAD_LINK) 12 13 This library is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16*/ 17 18#ifndef _WINBER_H 19#define _WINBER_H 20 21#ifdef __cplusplus 22extern "C" { 23#endif 24 25#ifndef WINBERAPI 26#define WINBERAPI DECLSPEC_IMPORT 27#endif 28 29typedef struct berelement BerElement; 30typedef ULONG ber_len_t; 31#include <pshpack4.h> 32typedef struct berval { 33 ber_len_t bv_len; 34 char *bv_val; 35} BerValue, LDAP_BERVAL, *PLDAP_BERVAL, BERVAL, *PBERVAL; 36#include <poppack.h> 37 38typedef ULONG ber_tag_t; 39typedef INT ber_int_t; 40typedef UINT ber_uint_t; 41typedef INT ber_slen_t; 42 43#define LBER_ERROR ((ber_tag_t)-1) 44#define LBER_DEFAULT ((ber_tag_t)-1) 45#define LBER_USE_DER 0x01 46 47WINBERAPI BerElement *ber_init(const BerValue*); 48WINBERAPI int ber_printf(BerElement*,const char*,...); 49WINBERAPI int ber_flatten(BerElement*,BerValue**); 50WINBERAPI ber_tag_t ber_scanf(BerElement*,const char*,...); 51WINBERAPI ber_tag_t ber_peek_tag(BerElement*,ber_len_t*); 52WINBERAPI ber_tag_t ber_skip_tag(BerElement*,ber_len_t*); 53WINBERAPI ber_tag_t ber_first_element(BerElement*,ber_len_t*,char**); 54WINBERAPI ber_tag_t ber_next_element(BerElement*,ber_len_t*,char*); 55WINBERAPI void ber_bvfree(BerValue*); 56WINBERAPI void ber_bvecfree(BerValue**); 57WINBERAPI void ber_free(BerElement*,int); 58WINBERAPI BerValue *ber_bvdup(BerValue*); 59WINBERAPI BerElement *ber_alloc_t(int); 60 61#ifdef __cplusplus 62} 63#endif 64#endif /* _WINBER_H */