gnutls_str.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation
00003  *
00004  * Author: Nikos Mavrogiannopoulos
00005  *
00006  * This file is part of GNUTLS.
00007  *
00008  * The GNUTLS library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
00021  * USA
00022  *
00023  */
00024 
00025 #ifndef GNUTLS_STR_H
00026 #define GNUTLS_STR_H
00027 
00028 #include <gnutls_int.h>
00029 
00030 void MHD_gtls_str_cpy (char *dest, size_t dest_tot_size, const char *src);
00031 void MHD_gtls_str_cat (char *dest, size_t dest_tot_size, const char *src);
00032 
00033 typedef struct
00034 {
00035   opaque *data;
00036   size_t max_length;
00037   size_t length;
00038   MHD_gnutls_realloc_function realloc_func;
00039   MHD_gnutls_alloc_function alloc_func;
00040   MHD_gnutls_free_function free_func;
00041 } MHD_gtls_string;
00042 
00043 void MHD_gtls_string_init (MHD_gtls_string *, MHD_gnutls_alloc_function,
00044                            MHD_gnutls_realloc_function,
00045                            MHD_gnutls_free_function);
00046 void MHD_gtls_string_clear (MHD_gtls_string *);
00047 
00048 int MHD_gtls_string_append_data (MHD_gtls_string *, const void *data,
00049                                  size_t data_size);
00050 char *MHD_gtls_bin2hex (const void *old, size_t oldlen, char *buffer,
00051                         size_t buffer_size);
00052 
00053 #endif

Generated by  doxygen 1.6.2