gsasl  2.2.1
gsasl-mech.h
Go to the documentation of this file.
1 /* gsasl-mech.h --- Header file for mechanism handling in GNU SASL Library.
2  * Copyright (C) 2002-2024 Simon Josefsson
3  *
4  * This file is part of GNU SASL Library.
5  *
6  * GNU SASL Library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public License
8  * as published by the Free Software Foundation; either version 2.1 of
9  * the License, or (at your option) any later version.
10  *
11  * GNU SASL 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  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License License along with GNU SASL Library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef GSASL_MECH_H
24 # define GSASL_MECH_H
25 
49 typedef int (*Gsasl_init_function) (Gsasl * ctx);
50 
58 typedef void (*Gsasl_done_function) (Gsasl * ctx);
59 
70 typedef int (*Gsasl_start_function) (Gsasl_session * sctx, void **mech_data);
71 
100 typedef int (*Gsasl_step_function) (Gsasl_session * sctx, void *mech_data,
101  const char *input, size_t input_len,
102  char **output, size_t *output_len);
103 
112 typedef void (*Gsasl_finish_function) (Gsasl_session * sctx, void *mech_data);
113 
134 typedef int (*Gsasl_code_function) (Gsasl_session * sctx, void *mech_data,
135  const char *input, size_t input_len,
136  char **output, size_t *output_len);
137 
152 {
160 };
162 
172 {
173  const char *name;
174 
177 };
178 typedef struct Gsasl_mechanism Gsasl_mechanism;
179 
180 /* Register new mechanism: register.c. */
181 extern _GSASL_API int gsasl_register (Gsasl * ctx,
182  const Gsasl_mechanism * mech);
183 
184 #endif /* GSASL_MECH_H */
int(* Gsasl_start_function)(Gsasl_session *sctx, void **mech_data)
Definition: gsasl-mech.h:70
int(* Gsasl_step_function)(Gsasl_session *sctx, void *mech_data, const char *input, size_t input_len, char **output, size_t *output_len)
Definition: gsasl-mech.h:100
void(* Gsasl_done_function)(Gsasl *ctx)
Definition: gsasl-mech.h:58
void(* Gsasl_finish_function)(Gsasl_session *sctx, void *mech_data)
Definition: gsasl-mech.h:112
int(* Gsasl_init_function)(Gsasl *ctx)
Definition: gsasl-mech.h:49
int(* Gsasl_code_function)(Gsasl_session *sctx, void *mech_data, const char *input, size_t input_len, char **output, size_t *output_len)
Definition: gsasl-mech.h:134
_GSASL_API int gsasl_register(Gsasl *ctx, const Gsasl_mechanism *mech)
Definition: register.c:39
#define _GSASL_API
Definition: gsasl.h:49
Gsasl_start_function start
Definition: gsasl-mech.h:155
Gsasl_code_function encode
Definition: gsasl-mech.h:158
Gsasl_finish_function finish
Definition: gsasl-mech.h:157
Gsasl_step_function step
Definition: gsasl-mech.h:156
Gsasl_init_function init
Definition: gsasl-mech.h:153
Gsasl_code_function decode
Definition: gsasl-mech.h:159
Gsasl_done_function done
Definition: gsasl-mech.h:154
const char * name
Definition: gsasl-mech.h:173
struct Gsasl_mechanism_functions server
Definition: gsasl-mech.h:176
struct Gsasl_mechanism_functions client
Definition: gsasl-mech.h:175
Definition: internal.h:37