[go: nahoru, domu]

blob: fcdf69dca6dd940e3bba079502ea03e4f8db4cf7 [file] [log] [blame]
Peter Huewe9f7cc082019-05-02 18:16:28 +02001/* SPDX-License-Identifier: BSD-2-Clause */
Philip Triccae394cff2018-04-18 08:36:06 -07002/*
3 * Copyright (c) 2018, Intel Corporation
4 * All rights reserved.
Philip Triccae394cff2018-04-18 08:36:06 -07005 */
Jonas Witschel4af3ca62019-07-24 15:40:49 +02006
7#ifndef KEY_VALUE_PARSE_H
8#define KEY_VALUE_PARSE_H
9
Philip Triccae394cff2018-04-18 08:36:06 -070010#include <stdlib.h>
11
12#include "tss2_tpm2_types.h"
13
14#define KEY_VALUE_INIT { \
15 .key = NULL, \
16 .value = NULL, \
17}
18
19typedef struct {
20 char *key;
21 char *value;
22} key_value_t;
23
24typedef TSS2_RC (*KeyValueFunc) (const key_value_t* key_value,
25 void *user_data);
26bool
27parse_key_value (char *key_value_str,
28 key_value_t *key_value);
29TSS2_RC
30parse_key_value_string (char *kv_str,
31 KeyValueFunc callback,
32 void *user_data);
Jonas Witschel4af3ca62019-07-24 15:40:49 +020033
34#endif /* KEY_VALUE_PARSE_H */