gsasl-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS gsasl/lib/src


From: gsasl-commit
Subject: CVS gsasl/lib/src
Date: Fri, 24 Sep 2004 15:33:53 +0200

Update of /home/cvs/gsasl/lib/src
In directory dopio:/tmp/cvs-serv14445/lib/src

Modified Files:
        Makefile.am gsasl.h.in 
Added Files:
        gsasl-mech.h 
Log Message:
Move mechanism stuff from gsasl.h.in to gsasl-mech.h.


--- /home/cvs/gsasl/lib/src/Makefile.am 2004/09/22 21:58:46     1.10
+++ /home/cvs/gsasl/lib/src/Makefile.am 2004/09/24 13:33:52     1.11
@@ -24,7 +24,7 @@
        -I$(srcdir)/../crypto -I../crypto
 DEFS = -DLOCALEDIR=\"$(datadir)/locale\" @DEFS@
 
-include_HEADERS = gsasl.h gsasl-compat.h
+include_HEADERS = gsasl.h gsasl-mech.h gsasl-compat.h
 
 libgsasl_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
 libgsasl_la_LIBADD = @LTLIBINTL@ ../gl/libgl.la ../crypto/libgc.la
--- /home/cvs/gsasl/lib/src/gsasl.h.in  2004/09/24 00:57:38     1.27
+++ /home/cvs/gsasl/lib/src/gsasl.h.in  2004/09/24 13:33:52     1.28
@@ -31,6 +31,8 @@
 {
 # endif
 
+# include <gsasl-mech.h>       /* Gsasl_mechanism */
+
 # define GSASL_VERSION "@PACKAGE_VERSION@"
 
   /* RFC 2222: SASL mechanisms are named by strings, from 1 to 20
@@ -192,43 +194,6 @@
   typedef int (*Gsasl_callback_function) (Gsasl * ctx, Gsasl_session * sctx,
                                          Gsasl_property prop);
 
-  /* Mechanism function prototypes. */
-  typedef int (*Gsasl_init_function) (Gsasl * ctx);
-  typedef void (*Gsasl_done_function) (Gsasl * ctx);
-  typedef int (*Gsasl_start_function) (Gsasl_session * sctx,
-                                      void **mech_data);
-  typedef int (*Gsasl_step_function) (Gsasl_session * sctx, void *mech_data,
-                                     const char *input, size_t input_len,
-                                     char **output, size_t * output_len);
-  typedef int (*Gsasl_finish_function) (Gsasl_session * sctx,
-                                       void *mech_data);
-  typedef int (*Gsasl_code_function) (Gsasl_session * sctx, void *mech_data,
-                                     const char *input, size_t input_len,
-                                     char **output, size_t * output_len);
-
-  /* Collection of mechanism functions for either client or server. */
-  struct Gsasl_mechanism_functions
-  {
-    Gsasl_init_function init;
-    Gsasl_done_function done;
-    Gsasl_start_function start;
-    Gsasl_step_function step;
-    Gsasl_finish_function finish;
-    Gsasl_code_function encode;
-    Gsasl_code_function decode;
-  };
-  typedef struct Gsasl_mechanism_functions Gsasl_mechanism_functions;
-
-  /* Information about a mechanism. */
-  struct Gsasl_mechanism
-  {
-    const char *name;
-
-    struct Gsasl_mechanism_functions client;
-    struct Gsasl_mechanism_functions server;
-  };
-  typedef struct Gsasl_mechanism Gsasl_mechanism;
-
   /* Library entry and exit points: version.c, init.c, done.c */
   extern int gsasl_init (Gsasl ** ctx);
   extern void gsasl_done (Gsasl * ctx);

--- /home/cvs/gsasl/lib/src/gsasl-mech.h        2004/09/24 13:33:53     NONE
+++ /home/cvs/gsasl/lib/src/gsasl-mech.h        2004/09/24 13:33:53     1.1
/* gsasl-mech.h --- Header file for mechanism handling in GNU SASL Library.
 * Copyright (C) 2002, 2003, 2004  Simon Josefsson
 *
 * This file is part of GNU SASL Library.
 *
 * GNU SASL Library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * GNU SASL Library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * License along with GNU SASL Library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */

#ifndef GSASL_MECH_H
# define GSASL_MECH_H

/* Mechanism function prototypes. */
typedef int (*Gsasl_init_function) (Gsasl * ctx);
typedef void (*Gsasl_done_function) (Gsasl * ctx);
typedef int (*Gsasl_start_function) (Gsasl_session * sctx,
                                     void **mech_data);
typedef int (*Gsasl_step_function) (Gsasl_session * sctx, void *mech_data,
                                    const char *input, size_t input_len,
                                    char **output, size_t * output_len);
typedef int (*Gsasl_finish_function) (Gsasl_session * sctx,
                                      void *mech_data);
typedef int (*Gsasl_code_function) (Gsasl_session * sctx, void *mech_data,
                                    const char *input, size_t input_len,
                                    char **output, size_t * output_len);

/* Collection of mechanism functions for either client or server. */
struct Gsasl_mechanism_functions
{
  Gsasl_init_function init;
  Gsasl_done_function done;
  Gsasl_start_function start;
  Gsasl_step_function step;
  Gsasl_finish_function finish;
  Gsasl_code_function encode;
  Gsasl_code_function decode;
};
typedef struct Gsasl_mechanism_functions Gsasl_mechanism_functions;

/* Information about a mechanism. */
struct Gsasl_mechanism
{
  const char *name;

  struct Gsasl_mechanism_functions client;
  struct Gsasl_mechanism_functions server;
};
typedef struct Gsasl_mechanism Gsasl_mechanism;

#endif /* GSASL_MECH_H */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]