]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/subversion/subversion/include/private/ra_svn_wrapped_sasl.h
Update svn-1.9.7 to 1.10.0.
[FreeBSD/FreeBSD.git] / contrib / subversion / subversion / include / private / ra_svn_wrapped_sasl.h
1 /*
2  * svn_wrapped_sasl.h :  wrapped SASL API
3  *
4  * ====================================================================
5  *    Licensed to the Apache Software Foundation (ASF) under one
6  *    or more contributor license agreements.  See the NOTICE file
7  *    distributed with this work for additional information
8  *    regarding copyright ownership.  The ASF licenses this file
9  *    to you under the Apache License, Version 2.0 (the
10  *    "License"); you may not use this file except in compliance
11  *    with the License.  You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  *    Unless required by applicable law or agreed to in writing,
16  *    software distributed under the License is distributed on an
17  *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18  *    KIND, either express or implied.  See the License for the
19  *    specific language governing permissions and limitations
20  *    under the License.
21  * ====================================================================
22  */
23
24 #ifndef RA_SVN_WRAPPED_SASL_H
25 #define RA_SVN_WRAPPED_SASL_H
26
27 #include <stddef.h>
28
29 #ifdef WIN32
30 #  define APR_WANT_IOVEC
31 #  include <apr_want.h>
32   /* This prevents sasl.h from redefining iovec,
33      which is always defined by APR on win32. */
34 #  define STRUCT_IOVEC_DEFINED
35 #  include <sasl.h>
36 #else
37 #  include <sasl/sasl.h>
38 #endif
39
40 /* Apple deprecated the SASL API on Mac OS X 10.11, causing a
41    moderately huge number of deprecation warnings to be emitted during
42    compilation. Consequently, we wrap the parts of the SASL API that
43    we use in a set of private functions and disable the deprecation
44    warnings for this header and the implementation file. */
45 #ifdef __APPLE__
46 #  if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
47 #    pragma GCC diagnostic push
48 #    pragma GCC diagnostic ignored "-Wdeprecated-declarations"
49 #  endif
50 #endif /* __APPLE__ */
51
52 #ifdef __cplusplus
53 extern "C" {
54 #endif /* __cplusplus */
55
56 void
57 svn_sasl__set_mutex(sasl_mutex_alloc_t *, sasl_mutex_lock_t *,
58                     sasl_mutex_unlock_t *, sasl_mutex_free_t *);
59
60 void
61 svn_sasl__done(void);
62
63 void
64 svn_sasl__dispose(sasl_conn_t **);
65
66 const char *
67 svn_sasl__errstring(int, const char *, const char **);
68
69 const char *
70 svn_sasl__errdetail(sasl_conn_t *);
71
72 int
73 svn_sasl__getprop(sasl_conn_t *, int, const void **);
74
75 int
76 svn_sasl__setprop(sasl_conn_t *, int, const void *);
77
78 int
79 svn_sasl__client_init(const sasl_callback_t *);
80
81 int
82 svn_sasl__client_new(const char *, const char *, const char *, const char *,
83                      const sasl_callback_t *, unsigned, sasl_conn_t **);
84
85 int
86 svn_sasl__client_start(sasl_conn_t *, const char *, sasl_interact_t **,
87                        const char **, unsigned *, const char **);
88
89 int
90 svn_sasl__client_step(sasl_conn_t *, const char *, unsigned,
91                       sasl_interact_t **, const char **, unsigned *);
92
93 int
94 svn_sasl__server_init(const sasl_callback_t *, const char *);
95
96 int
97 svn_sasl__server_new(const char *, const char *, const char *,
98                      const char *, const char *, const sasl_callback_t *,
99                      unsigned, sasl_conn_t **);
100
101 int
102 svn_sasl__listmech(sasl_conn_t *, const char *, const char *, const char *,
103                    const char *, const char **, unsigned *, int *);
104
105 int
106 svn_sasl__server_start(sasl_conn_t *, const char *, const char *, unsigned,
107                        const char **, unsigned *);
108
109 int
110 svn_sasl__server_step(sasl_conn_t *, const char *, unsigned,
111                       const char **, unsigned *);
112
113 int
114 svn_sasl__encode(sasl_conn_t *, const char *, unsigned,
115                  const char **, unsigned *);
116
117 int
118 svn_sasl__decode(sasl_conn_t *, const char *, unsigned,
119                  const char **, unsigned *);
120
121 #ifdef __cplusplus
122 }
123 #endif /* __cplusplus */
124
125 #ifdef __APPLE__
126 #  if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
127 #    pragma GCC diagnostic pop
128 #  endif
129 #endif /* __APPLE__ */
130
131 #endif /* RA_SVN_WRAPPED_SASL_H */