comparison win32/winber.d @ 1:4a9dcbd9e54f

-files of 0.13 beta -fixes so that it now compiles with the current dmd version
author marton@basel.hu
date Tue, 05 Apr 2011 20:44:01 +0200
parents
children
comparison
equal deleted inserted replaced
0:586e4a649642 1:4a9dcbd9e54f
1 /***********************************************************************\
2 * winber.d *
3 * *
4 * Windows API header module *
5 * *
6 * Translated from MinGW Windows headers *
7 * by Stewart Gordon *
8 * *
9 * Placed into public domain *
10 \***********************************************************************/
11 module win32.winber;
12
13 /* Comment from MinGW
14 winber.h - Header file for the Windows LDAP Basic Encoding Rules API
15
16 Written by Filip Navara <xnavara@volny.cz>
17
18 References:
19 The C LDAP Application Program Interface
20 http://www.watersprings.org/pub/id/draft-ietf-ldapext-ldap-c-api-05.txt
21
22 Lightweight Directory Access Protocol Reference
23 http://msdn.microsoft.com/library/en-us/netdir/ldap/ldap_reference.asp
24
25 This library is distributed in the hope that it will be useful,
26 but WITHOUT ANY WARRANTY; without even the implied warranty of
27 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28 */
29
30 /* Opaque structure
31 * http://msdn.microsoft.com/library/en-us/ldap/ldap/berelement.asp
32 */
33 struct BerElement;
34
35 alias int ber_int_t, ber_slen_t;
36 alias uint ber_uint_t, ber_len_t, ber_tag_t;
37
38 align(4):
39 struct BerValue {
40 ber_len_t bv_len;
41 char* bv_val;
42 }
43 alias BerValue LDAP_BERVAL, BERVAL;
44 alias BerValue* PLDAP_BERVAL, PBERVAL;
45
46 const ber_tag_t
47 LBER_ERROR = -1,
48 LBER_DEFAULT = -1,
49 LBER_USE_DER = 1;
50
51 /* FIXME: In MinGW, these are WINBERAPI == DECLSPEC_IMPORT. Linkage
52 * attribute?
53 */
54 extern (C) {
55 BerElement* ber_init(BerValue*);
56 int ber_printf(BerElement*, char*, ...);
57 int ber_flatten(BerElement*, BerValue**);
58 ber_tag_t ber_scanf(BerElement*, char*, ...);
59 ber_tag_t ber_peek_tag(BerElement*, ber_len_t*);
60 ber_tag_t ber_skip_tag(BerElement*, ber_len_t*);
61 ber_tag_t ber_first_element(BerElement*, ber_len_t*, char**);
62 ber_tag_t ber_next_element(BerElement*, ber_len_t*, char*);
63 void ber_bvfree(BerValue*);
64 void ber_bvecfree(BerValue**);
65 void ber_free(BerElement*, int);
66 BerValue* ber_bvdup(BerValue*);
67 BerElement* ber_alloc_t(int);
68 }