d: Merge upstream dmd 568496d5b, druntime 178c44ff, phobos 574bf883b.
[official-gcc.git] / libphobos / libdruntime / core / sys / windows / winber.d
blobd6a79cd3542dcba09f1d4fba183d88fdf33dbe61
1 /**
2 * Windows API header module
4 * Translated from MinGW Windows headers
6 * Authors: Stewart Gordon
7 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
8 * Source: $(DRUNTIMESRC core/sys/windows/_winber.d)
9 */
10 module core.sys.windows.winber;
11 version (Windows):
12 @system:
14 /* Comment from MinGW
15 winber.h - Header file for the Windows LDAP Basic Encoding Rules API
17 Written by Filip Navara <xnavara@volny.cz>
19 References:
20 The C LDAP Application Program Interface
21 http://www.watersprings.org/pub/id/draft-ietf-ldapext-ldap-c-api-05.txt
23 Lightweight Directory Access Protocol Reference
24 http://msdn.microsoft.com/library/en-us/netdir/ldap/ldap_reference.asp
26 This library is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31 import core.sys.windows.basetsd;
33 /* Opaque structure
34 * http://msdn.microsoft.com/library/en-us/ldap/ldap/berelement.asp
36 struct BerElement;
38 alias int ber_int_t, ber_slen_t;
39 alias uint ber_uint_t, ber_len_t, ber_tag_t;
41 align(4):
42 struct BerValue {
43 ber_len_t bv_len;
44 char* bv_val;
46 alias BerValue LDAP_BERVAL, BERVAL;
47 alias BerValue* PLDAP_BERVAL, PBERVAL;
49 enum ber_tag_t
50 LBER_ERROR = -1,
51 LBER_DEFAULT = -1,
52 LBER_USE_DER = 1;
54 /* FIXME: In MinGW, these are WINBERAPI == DECLSPEC_IMPORT. Linkage
55 * attribute?
57 extern (C) {
58 BerElement* ber_init(const(BerValue)*);
59 int ber_printf(BerElement*, const(char)*, ...);
60 int ber_flatten(BerElement*, BerValue**);
61 ber_tag_t ber_scanf(BerElement*, const(char)*, ...);
62 ber_tag_t ber_peek_tag(BerElement*, ber_len_t*);
63 ber_tag_t ber_skip_tag(BerElement*, ber_len_t*);
64 ber_tag_t ber_first_element(BerElement*, ber_len_t*, char**);
65 ber_tag_t ber_next_element(BerElement*, ber_len_t*, char*);
66 void ber_bvfree(BerValue*);
67 void ber_bvecfree(BerValue**);
68 void ber_free(BerElement*, int);
69 BerValue* ber_bvdup(BerValue*);
70 BerElement* ber_alloc_t(int);