RzConfig#
- class RzConfig#
-
- property _lock: int#
- property nodes: RzList[RzConfigNode]#
- property user: Any#
- static hold_free() None#
Calls function
rz_config_hold_free(defined in hold.c)Free a RzConfigHold object
h.- Parameters:
h – Reference to RzConfigHold
- static hold_i() bool#
Calls function
rz_config_hold_i(defined in hold.c)Save the current values of a list of config options that have integer values.
Get the current values of a list of config variables (terminated by NULL) and save them in the RzConfigHold object
h.rz_config_get_iis used to retrieve the current config values.- Parameters:
h – Reference to RzConfigHold instance
... – List of config variables to save, terminated by NULL.
- Returns:
true if at least one variable is correctly saved, false otherwise
- static hold_restore() None#
Calls function
rz_config_hold_restore(defined in hold.c)Restore whatever config options were previously saved in
h.- Parameters:
h – Reference to RzConfigHold
- static hold_s() bool#
Calls function
rz_config_hold_s(defined in hold.c)Save the current values of a list of config options that have string values.
Get the current values of a list of config variables (terminated by NULL) and save them in the RzConfigHold object
h.rz_config_getis used to retrieve the current config values.- Parameters:
h – Reference to RzConfigHold instance
... – List of config variables to save, terminated by NULL.
- Returns:
true if at least one variable is correctly saved, false otherwise
- static node_value_format_i(buf_size: size_t, i: int, node: RzConfigNode) None#
Calls function
rz_config_node_value_format_i(defined in config.c)
- add_node(node: RzConfigNode) bool#
Calls function
rz_config_add_node(defined in config.c)Appends the given node to the config
cfg.- Parameters:
cfg – The configuration the node is appended.
node – The node to append.
- Returns:
bool True if the node was successful added. False otherwise.
- eval(str: str) bool#
Calls function
rz_config_eval(defined in config.c)Sets the configuration variable and its value passed as argument.
- Parameters:
cfg – reference to RzConfig
str – reference the configuration variable string (eg, ‘asm.arch=x86’)
- get(name: str) str#
Calls function
rz_config_get(defined in config.c)Returns the value of the config variable of
nameas a string
- get_b(name: str) bool#
Calls function
rz_config_get_b(defined in config.c)Reads the value of the config variable of
nameonly and only if the variable is boolean. Returns false in case of the failure.
- get_i(name: str) int#
Calls function
rz_config_get_i(defined in config.c)Reads the value of the config variable of
nameonly and only if the variable is integer.
- hold_new() RzConfigHold#
Calls function
rz_config_hold_new(defined in hold.c)Create an opaque object to save/restore some configuration options.
- Parameters:
cfg – RzConfig reference
- Returns:
RzConfigHold allocated object
- set(name: str, value: str) RzConfigNode#
Calls function
rz_config_set(defined in config.c)Writes the string
valuein the config variable ofname.
- set_b(name: str, value: bool) RzConfigNode#
Calls function
rz_config_set_b(defined in config.c)Writes the boolean
valuein the config variable ofnameonly and only if the variable is boolean.
- set_cb(name: str, value: str, callback: CFunction[[Any, Any], bool]) RzConfigNode#
Calls function
rz_config_set_cb(defined in config.c)
- set_getter(key: str, cb: RzConfigCallback) bool#
Calls function
rz_config_set_getter(defined in config.c)
- set_i(name: str, i: int) RzConfigNode#
Calls function
rz_config_set_i(defined in config.c)Writes the integer
valuein the config variable ofnameonly and only if the variable is integer.
- set_i_cb(name: str, ivalue: int, callback: CFunction[[Any, Any], bool]) RzConfigNode#
Calls function
rz_config_set_i_cb(defined in config.c)
- set_setter(key: str, cb: RzConfigCallback) bool#
Calls function
rz_config_set_setter(defined in config.c)