2009-09-30 17:28:38 +02:00
|
|
|
/* utils.h - Defs for utility fucthe dispatcher to the various backends.ntions
|
|
|
|
* Copyright (C) 2009 Free Software Foundation, Inc.
|
|
|
|
*
|
|
|
|
* This file is part of GnuPG.
|
|
|
|
*
|
|
|
|
* GnuPG is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* GnuPG 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 General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef G13_UTILS_H
|
|
|
|
#define G13_UTILS_H
|
|
|
|
|
|
|
|
#include "../common/membuf.h"
|
|
|
|
|
2009-10-13 21:17:24 +02:00
|
|
|
/* Append a new tuple to a memory buffer. */
|
2009-09-30 17:28:38 +02:00
|
|
|
void append_tuple (membuf_t *membuf,
|
|
|
|
int tag, const void *value, size_t length);
|
|
|
|
|
2009-10-13 21:17:24 +02:00
|
|
|
/* The tuple descriptor object. */
|
|
|
|
struct tupledesc_s;
|
|
|
|
typedef struct tupledesc_s *tupledesc_t;
|
|
|
|
|
|
|
|
gpg_error_t create_tupledesc (tupledesc_t *r_tupledesc,
|
|
|
|
void *data, size_t datalen);
|
|
|
|
void destroy_tupledesc (tupledesc_t tupledesc);
|
|
|
|
tupledesc_t ref_tupledesc (tupledesc_t tupledesc);
|
|
|
|
const void *find_tuple (tupledesc_t tupledesc,
|
|
|
|
unsigned int tag, size_t *r_length);
|
|
|
|
const void *next_tuple (tupledesc_t tupledesc,
|
|
|
|
unsigned int *r_tag, size_t *r_length);
|
|
|
|
|
2009-09-30 17:28:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
#endif /*G13_UTILS_H*/
|
|
|
|
|