Tor  0.4.5.0-alpha-dev
structvar.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-2020, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
7 /**
8  * @file structvar.h
9  * @brief Header for lib/confmgt/structvar.c
10  **/
11 
12 #ifndef TOR_LIB_CONFMGT_STRUCTVAR_H
13 #define TOR_LIB_CONFMGT_STRUCTVAR_H
14 
15 struct struct_magic_decl_t;
16 struct struct_member_t;
17 struct config_line_t;
18 
19 #include <stdbool.h>
20 #include "lib/cc/torint.h"
21 
22 void struct_set_magic(void *object,
23  const struct struct_magic_decl_t *decl);
24 void struct_check_magic(const void *object,
25  const struct struct_magic_decl_t *decl);
26 
27 void *struct_get_mptr(void *object,
28  const struct struct_member_t *member);
29 const void *struct_get_ptr(const void *object,
30  const struct struct_member_t *member);
31 
32 void struct_var_free(void *object,
33  const struct struct_member_t *member);
34 int struct_var_copy(void *dest, const void *src,
35  const struct struct_member_t *member);
36 bool struct_var_eq(const void *a, const void *b,
37  const struct struct_member_t *member);
38 bool struct_var_ok(const void *object,
39  const struct struct_member_t *member);
40 void struct_var_mark_fragile(void *object,
41  const struct struct_member_t *member);
42 
43 const char *struct_var_get_name(const struct struct_member_t *member);
44 const char *struct_var_get_typename(const struct struct_member_t *member);
45 uint32_t struct_var_get_flags(const struct struct_member_t *member);
46 
47 int struct_var_kvassign(void *object, const struct config_line_t *line,
48  char **errmsg,
49  const struct struct_member_t *member);
51  const void *object,
52  const struct struct_member_t *member);
53 
54 #endif /* !defined(TOR_LIB_CONFMGT_STRUCTVAR_H) */
struct_var_kvassign
int struct_var_kvassign(void *object, const struct config_line_t *line, char **errmsg, const struct_member_t *member)
Definition: structvar.c:172
struct_var_mark_fragile
void struct_var_mark_fragile(void *object, const struct_member_t *member)
Definition: structvar.c:201
torint.h
Integer definitions used throughout Tor.
struct_var_get_typename
const char * struct_var_get_typename(const struct_member_t *member)
Definition: structvar.c:225
struct_var_free
void struct_var_free(void *object, const struct_member_t *member)
Definition: structvar.c:118
struct_var_ok
bool struct_var_ok(const void *object, const struct_member_t *member)
Definition: structvar.c:159
struct_var_get_name
const char * struct_var_get_name(const struct_member_t *member)
Definition: structvar.c:212
struct_var_get_flags
uint32_t struct_var_get_flags(const struct_member_t *member)
Definition: structvar.c:234
struct_set_magic
void struct_set_magic(void *object, const struct_magic_decl_t *decl)
Definition: structvar.c:48
struct_var_eq
bool struct_var_eq(const void *a, const void *b, const struct_member_t *member)
Definition: structvar.c:145
struct_get_ptr
const void * struct_get_ptr(const void *object, const struct_member_t *member)
Definition: structvar.c:94
struct_var_copy
int struct_var_copy(void *dest, const void *src, const struct_member_t *member)
Definition: structvar.c:131
struct_check_magic
void struct_check_magic(const void *object, const struct_magic_decl_t *decl)
Definition: structvar.c:63
struct_member_t
Definition: conftypes.h:96
config_line_t
Definition: confline.h:29
struct_get_mptr
void * struct_get_mptr(void *object, const struct_member_t *member)
Definition: structvar.c:83
struct_var_kvencode
struct config_line_t * struct_var_kvencode(const void *object, const struct_member_t *member)
Definition: structvar.c:187
struct_magic_decl_t
Definition: conftypes.h:138