|
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 |
|
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 #if __GNUC__ >= 3 |
|
21 #pragma GCC system_header |
|
22 #endif |
|
23 |
|
24 #ifdef __cplusplus |
|
25 extern "C" { |
|
26 #endif |
|
27 |
|
28 #ifndef WINBERAPI |
|
29 #define WINBERAPI DECLSPEC_IMPORT |
|
30 #endif |
|
31 |
|
32 typedef struct berelement BerElement; |
|
33 typedef ULONG ber_len_t; |
|
34 #include <pshpack4.h> |
|
35 typedef struct berval { |
|
36 ber_len_t bv_len; |
|
37 char *bv_val; |
|
38 } BerValue, LDAP_BERVAL, *PLDAP_BERVAL, BERVAL, *PBERVAL; |
|
39 #include <poppack.h> |
|
40 |
|
41 typedef ULONG ber_tag_t; |
|
42 typedef INT ber_int_t; |
|
43 typedef UINT ber_uint_t; |
|
44 typedef INT ber_slen_t; |
|
45 |
|
46 #define LBER_ERROR ((ber_tag_t)-1) |
|
47 #define LBER_DEFAULT ((ber_tag_t)-1) |
|
48 #define LBER_USE_DER 0x01 |
|
49 |
|
50 WINBERAPI BerElement *ber_init(const BerValue*); |
|
51 WINBERAPI int ber_printf(BerElement*,const char*,...); |
|
52 WINBERAPI int ber_flatten(BerElement*,BerValue**); |
|
53 WINBERAPI ber_tag_t ber_scanf(BerElement*,const char*,...); |
|
54 WINBERAPI ber_tag_t ber_peek_tag(BerElement*,ber_len_t*); |
|
55 WINBERAPI ber_tag_t ber_skip_tag(BerElement*,ber_len_t*); |
|
56 WINBERAPI ber_tag_t ber_first_element(BerElement*,ber_len_t*,char**); |
|
57 WINBERAPI ber_tag_t ber_next_element(BerElement*,ber_len_t*,char*); |
|
58 WINBERAPI void ber_bvfree(BerValue*); |
|
59 WINBERAPI void ber_bvecfree(BerValue**); |
|
60 WINBERAPI void ber_free(BerElement*,int); |
|
61 WINBERAPI BerValue *ber_bvdup(BerValue*); |
|
62 WINBERAPI BerElement *ber_alloc_t(int); |
|
63 |
|
64 #ifdef __cplusplus |
|
65 } |
|
66 #endif |
|
67 #endif /* _WINBER_H */ |