2 * svn_wrapped_sasl.h : wrapped SASL API
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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
21 * ====================================================================
24 #ifndef RA_SVN_WRAPPED_SASL_H
25 #define RA_SVN_WRAPPED_SASL_H
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
37 # include <sasl/sasl.h>
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. */
46 # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
47 # pragma GCC diagnostic push
48 # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
50 #endif /* __APPLE__ */
54 #endif /* __cplusplus */
57 svn_sasl__set_mutex(sasl_mutex_alloc_t *, sasl_mutex_lock_t *,
58 sasl_mutex_unlock_t *, sasl_mutex_free_t *);
64 svn_sasl__dispose(sasl_conn_t **);
67 svn_sasl__errstring(int, const char *, const char **);
70 svn_sasl__errdetail(sasl_conn_t *);
73 svn_sasl__getprop(sasl_conn_t *, int, const void **);
76 svn_sasl__setprop(sasl_conn_t *, int, const void *);
79 svn_sasl__client_init(const sasl_callback_t *);
82 svn_sasl__client_new(const char *, const char *, const char *, const char *,
83 const sasl_callback_t *, unsigned, sasl_conn_t **);
86 svn_sasl__client_start(sasl_conn_t *, const char *, sasl_interact_t **,
87 const char **, unsigned *, const char **);
90 svn_sasl__client_step(sasl_conn_t *, const char *, unsigned,
91 sasl_interact_t **, const char **, unsigned *);
94 svn_sasl__server_init(const sasl_callback_t *, const char *);
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 **);
102 svn_sasl__listmech(sasl_conn_t *, const char *, const char *, const char *,
103 const char *, const char **, unsigned *, int *);
106 svn_sasl__server_start(sasl_conn_t *, const char *, const char *, unsigned,
107 const char **, unsigned *);
110 svn_sasl__server_step(sasl_conn_t *, const char *, unsigned,
111 const char **, unsigned *);
114 svn_sasl__encode(sasl_conn_t *, const char *, unsigned,
115 const char **, unsigned *);
118 svn_sasl__decode(sasl_conn_t *, const char *, unsigned,
119 const char **, unsigned *);
123 #endif /* __cplusplus */
126 # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
127 # pragma GCC diagnostic pop
129 #endif /* __APPLE__ */
131 #endif /* RA_SVN_WRAPPED_SASL_H */