src/labeled_int_list.h
author us@chu.huenfield.org
Tue, 25 Dec 2018 14:46:45 +0100
branchsync
changeset 3209 c15b4ca2b52a
parent 3004 079d0bf653be
child 4792 7056435ab9e7
child 5246 67016f508d40
permissions -rw-r--r--
Replace use of Sequoia's backend with a custom key store.

- Sequoia's key store doesn't meet pep's needs (in particular, the
ability to search on a key's user id) and trying to shoehorn pep's
needs onto Sequoia's key store abstractions is just introducing
overhead with no appreciable gain in functionality.

- This patch changes the Sequoia backend to use a local sqlite
database to store the public keys.
     1 // This file is under GNU General Public License 3.0
     2 // see LICENSE.txt
     3 
     4 #pragma once
     5 
     6 #include "dynamic_api.h"
     7 #include "stringpair.h"
     8 
     9 #ifdef __cplusplus
    10 extern "C" {
    11 #endif
    12 
    13 typedef struct _labeled_int_list_t {
    14     int value;
    15     char* label;                                // UTF-8 string, null-terminated
    16     struct _labeled_int_list_t *next;           // this is a single linked list
    17 } labeled_int_list_t;
    18 
    19 DYNAMIC_API labeled_int_list_t *new_labeled_int_list(int value, const char* label);
    20 
    21 DYNAMIC_API void free_labeled_int_list(labeled_int_list_t *labeled_int_list);
    22 
    23 DYNAMIC_API labeled_int_list_t *labeled_int_list_dup(const labeled_int_list_t *src);
    24 
    25 DYNAMIC_API labeled_int_list_t *labeled_int_list_add(labeled_int_list_t *labeled_int_list, int value, const char* label);
    26 
    27 DYNAMIC_API int labeled_int_list_length(const labeled_int_list_t *labeled_int_list);
    28 
    29 #ifdef __cplusplus
    30 }
    31 #endif