tor  0.4.2.1-alpha-dev
var_type_def_st.h
Go to the documentation of this file.
1 /* Copyright (c) 2001 Matej Pfajfar.
2  * Copyright (c) 2001-2004, Roger Dingledine.
3  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4  * Copyright (c) 2007-2019, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
26 #ifndef TOR_LIB_CONFMGT_VAR_TYPE_DEF_ST_H
27 #define TOR_LIB_CONFMGT_VAR_TYPE_DEF_ST_H
28 
29 #include <stdbool.h>
30 
31 struct config_line_t;
32 
50  int (*parse)(void *target, const char *value, char **errmsg,
51  const void *params);
66  int (*kv_parse)(void *target, const struct config_line_t *line,
67  char **errmsg, const void *params);
79  char *(*encode)(const void *value, const void *params);
92  struct config_line_t *(*kv_encode)(const char *key, const void *value,
93  const void *params);
100  void (*clear)(void *arg, const void *params);
108  bool (*eq)(const void *a, const void *b, const void *params);
116  int (*copy)(void *target, const void *value, const void *params);
124  bool (*ok)(const void *value, const void *params);
133  void (*mark_fragile)(void *value, const void *params);
134 };
135 
144  const char *name;
148  const struct var_type_fns_t *fns;
153  const void *params;
158  uint32_t flags;
159 };
160 
161 #endif /* !defined(TOR_LIB_CONFMGT_VAR_TYPE_DEF_ST_H) */
int(* kv_parse)(void *target, const struct config_line_t *line, char **errmsg, const void *params)
int(* copy)(void *target, const void *value, const void *params)
int(* parse)(void *target, const char *value, char **errmsg, const void *params)
const struct var_type_fns_t * fns
const void * params
void(* mark_fragile)(void *value, const void *params)
bool(* ok)(const void *value, const void *params)
bool(* eq)(const void *a, const void *b, const void *params)
void(* clear)(void *arg, const void *params)
const char * name