aboutsummaryrefslogtreecommitdiffstats
path: root/g13/g13tuple.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-02-11 12:32:30 +0000
committerWerner Koch <[email protected]>2016-02-13 16:06:39 +0000
commit82d12156ef5f948d44934ed44d79d24cc9e94366 (patch)
tree6c80069d24889dab4be95d7b11445bfa3d738bf4 /g13/g13tuple.h
parentg13: Add functions to handle uint in a keyblob. (diff)
downloadgnupg-82d12156ef5f948d44934ed44d79d24cc9e94366.tar.gz
gnupg-82d12156ef5f948d44934ed44d79d24cc9e94366.zip
g13: Rename utils.c to g13tuple.c
* g13/utils.c: Rename to g13tuple.c. * g13/utils.h: Rename to g13tuple.h. Change all users. * g13/Makefile.am: Adjust accordingly -- Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g13/g13tuple.h')
-rw-r--r--g13/g13tuple.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/g13/g13tuple.h b/g13/g13tuple.h
new file mode 100644
index 000000000..59cb6372d
--- /dev/null
+++ b/g13/g13tuple.h
@@ -0,0 +1,47 @@
+/* g13tuple.h - Tuple handling
+ * 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_G13TUPLE_H
+#define G13_G13TUPLE_H
+
+#include "../common/membuf.h"
+
+/* Append a new tuple to a memory buffer. */
+void append_tuple (membuf_t *membuf,
+ int tag, const void *value, size_t length);
+void append_tuple_uint (membuf_t *membuf, int tag,
+ unsigned long long value);
+
+/* 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);
+gpg_error_t find_tuple_uint (tupledesc_t tupledesc, unsigned int tag,
+ unsigned long long *r_value);
+const void *next_tuple (tupledesc_t tupledesc,
+ unsigned int *r_tag, size_t *r_length);
+
+
+#endif /*G13_G13TUPLE_H*/