• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

KLDAP Library

  • sources
  • kde-4.14
  • kdepimlibs
  • kldap
w32-ldap-help.h
1 //krazy:excludeall=style
2 /* w32-ldap-help.h - Map utf8 based API into a wchar_t API.
3 
4  Copyright (c) 2010 Andre Heinecke <aheinecke@intevation.de>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef W32_LDAP_HELP_H
23 #define W32_LDAP_HELP_H
24 
25 #include <windows.h>
26 #ifdef UNICODE
27 # undef UNICODE
28 # include <winldap.h>
29 # include <winber.h>
30 # define UNICODE
31 #else
32 # include <winldap.h>
33 # include <winber.h>
34 #endif // UNICODE
35 
36 /*
37  * From the openldap manpage:
38  * ber_len_t is an unsigned integer of at least 32 bits used to represent
39  * a length. It is commonly equivalent to a size_t. ber_slen_t is the
40  * signed variant to ber_len_t.
41  */
42 typedef ULONG ber_len_t;
43 
44 #ifndef timeval
45 #define timeval l_timeval
46 #endif
47 
48 /* Redirect used ldap functions to functions with win_ prefix
49  * to further redirect those depending on the Windows Flavour */
50 //#define ldap_err2string(a) win_ldap_err2string(a)
51 #define ldap_init(a,b) win_ldap_init(a,b)
52 #define ldap_sasl_bind(a, b, c, d, e, f, g) \
53  win_ldap_sasl_bind(a, b, c, d, e, f, g)
54 #define ldap_sasl_bind_s(a, b, c, d, e, f, g) \
55  win_ldap_sasl_bind_s(a, b, c, d, e, f, g)
56 #define ldap_parse_sasl_bind_result ( a, b, c, d, e ) \
57  win_ldap_parse_sasl_bind_result((a), (b), (c), (d), (e))
58 #define ldap_get_dn(a, b) win_ldap_get_dn(a,b)
59 #define ldap_memfree(a) win_ldap_memfree(a)
60 #define ldap_mods_free(a, b) win_ldap_mods_free(a, b)
61 #define ldap_first_attribute(a, b, c) \
62  win_ldap_first_attribute(a, b, c)
63 #define ldap_get_values_len(a, b, c) \
64  win_ldap_get_values_len(a, b, c)
65 #define ldap_next_attribute(a, b, c ) \
66  win_ldap_next_attribute(a, b, c)
67 #define ldap_parse_result(a, b, c, d, e, f, g, h) \
68  win_ldap_parse_result(a, b, c, d, e, f, g, h)
69 #define ldap_parse_extended_result(a, b, c, d, e) \
70  win_ldap_parse_extended_result(a, b, c, d, e)
71 #define ldap_add_ext(a, b, c, d, e, f) \
72  win_ldap_add_ext((a), (b), (c), (d), (e), (f))
73 #define ldap_add_ext_s(a, b, c, d, e) \
74  win_ldap_add_ext_s((a), (b), (c), (d), (e))
75 # define ldap_compare_ext_s(a, b, c, d, e, f) \
76  win_ldap_compare_ext_s((a), (b), (c), (d), (e), (f))
77 # define ldap_compare_ext(a, b, c, d, e, f, g) \
78  win_ldap_compare_ext((a), (b), (c), (d), (e), (f), (g))
79 # define ldap_modify_ext_s(a, b, c, d, e ) \
80  win_ldap_modify_ext_s((a), (b), (c), (d), (e))
81 # define ldap_search_ext(a, b, c, d, e, f, g, h, i, j, k) \
82  win_ldap_search_ext((a), (b), (c), (d), (e), (f), (g), (h), (i), (j), (k))
83 #define ldap_rename_ext( a, b, c, d, e, f, g, h ) \
84  win_ldap_rename_ext((a), (b), (c), (d), (e), (f), (g), (h) )
85 #define ldap_rename( a, b, c, d, e, f, g, h ) \
86  ldap_rename_ext((a), (b), (c), (d), (e), (f), (g), (h) )
87 #define ldap_delete_ext(a, b, c, d, e ) \
88  win_ldap_delete_ext((a), (b), (c), (d), (e) )
89 #define ldap_modify_ext(a, b, c, d, e, f ) \
90  win_ldap_modify_ext( (a), (b), (c), (d), (e), (f))
91 #define ldap_abandon_ext(a, b, c, d) \
92  win_ldap_abandon_ext((a), (b), (c), (d))
93 #define ldap_controls_free(a) win_ldap_controls_free(a)
94 
95 // Use the functions that are available on the platform
96 // or redirect to wrapper functions
97 
98 /* Windows offers ASCII variants of most LDAP functions
99  * we only have to ensure that those are used */
100 # define LDAPControl LDAPControlA
101 # define LDAPMod LDAPModA
102 # define win_ldap_init(a,b) ldap_initA ((a), (b))
103 # define win_ldap_simple_bind_s(a,b,c) ldap_simple_bind_sA ((a), (b), (c))
104 # define win_ldap_sasl_bind(a, b, c, d, e, f, g) \
105  ldap_sasl_bindA(a, b, c, d, e, f, g)
106 # define win_ldap_sasl_bind_s(a, b, c, d, e, f, g) \
107  ldap_sasl_bind_sA(a, b, c, d, e, f, g)
108 # define win_ldap_search_st(a,b,c,d,e,f,g,h) \
109  ldap_search_stA ((a), (b), (c), (d), (e), (f), (g), (h))
110 # define win_ldap_search_ext(a, b, c, d, e, f, g, h, i, j, k) \
111  my_win_ldap_search_ext((a), (b), (c), (d), (e), (f), (g), (h), (i), (j), (k))
112 # define win_ldap_get_dn(a, b) ldap_get_dnA((a), (b))
113 # define win_ldap_first_attribute(a,b,c) ldap_first_attributeA ((a), (b), (c))
114 # define win_ldap_next_attribute(a,b,c) ldap_next_attributeA ((a), (b), (c))
115 # define win_ldap_get_values_len(a,b,c) ldap_get_values_lenA ((a), (b), (c))
116 # define win_ldap_memfree(a) ldap_memfreeA ((a))
117 # define win_ldap_err2string(a) ldap_err2stringA((a))
118 # define win_ldap_controls_free(a) ldap_controls_freeA((a))
119 # define win_ldap_mods_free(a, b) ldap_mods_freeA((a), (b))
120 # define win_ldap_add_ext(a, b, c, d, e, f) \
121  ldap_add_extA((a), (b), (c), (d), (e), ((ulong*)f))
122 # define win_ldap_add_ext_s(a, b, c, d, e) \
123  ldap_add_ext_sA((a), (b), (c), (d), (e))
124 # define win_ldap_parse_extended_result(a, b, c, d, e ) \
125  ldap_parse_extended_resultA((*a), (b), (c), (d), (e))
126 # define win_ldap_parse_result(a, b, c, d, e, f, g, h ) \
127  ldap_parse_resultA((a), (b), ((ulong *)c), (d), (e), (f), (g), (h))
128 # define win_ldap_modify_ext_s(a, b, c, d, e ) \
129  ldap_modify_ext_sW((a), (b), (c), (d), (e))
130 # define win_ldap_compare_ext_s(a, b, c, d, e, f ) \
131  ldap_compare_ext_sA((a), (b), (c), (d), (e), (f))
132 #endif /*W32_LDAP_HELP_H*/
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KLDAP Library

Skip menu "KLDAP Library"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal