source: Daodan/MinGW/include/winber.h@ 1054

Last change on this file since 1054 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 1.9 KB
RevLine 
[1046]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
25extern "C" {
26#endif
27
28#ifndef WINBERAPI
29#define WINBERAPI DECLSPEC_IMPORT
30#endif
31
32typedef struct berelement BerElement;
33typedef ULONG ber_len_t;
34#include <pshpack4.h>
35typedef 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
41typedef ULONG ber_tag_t;
42typedef INT ber_int_t;
43typedef UINT ber_uint_t;
44typedef 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
50WINBERAPI BerElement *ber_init(const BerValue*);
51WINBERAPI int ber_printf(BerElement*,const char*,...);
52WINBERAPI int ber_flatten(BerElement*,BerValue**);
53WINBERAPI ber_tag_t ber_scanf(BerElement*,const char*,...);
54WINBERAPI ber_tag_t ber_peek_tag(BerElement*,ber_len_t*);
55WINBERAPI ber_tag_t ber_skip_tag(BerElement*,ber_len_t*);
56WINBERAPI ber_tag_t ber_first_element(BerElement*,ber_len_t*,char**);
57WINBERAPI ber_tag_t ber_next_element(BerElement*,ber_len_t*,char*);
58WINBERAPI void ber_bvfree(BerValue*);
59WINBERAPI void ber_bvecfree(BerValue**);
60WINBERAPI void ber_free(BerElement*,int);
61WINBERAPI BerValue *ber_bvdup(BerValue*);
62WINBERAPI BerElement *ber_alloc_t(int);
63
64#ifdef __cplusplus
65}
66#endif
67#endif /* _WINBER_H */
Note: See TracBrowser for help on using the repository browser.