12#ifndef TOR_HIBERNATE_H
13#define TOR_HIBERNATE_H
32 const char *question,
char **answer,
34uint64_t get_accounting_max_total(
void);
36bool accounting_tor_is_dormant(
void);
38#ifdef HIBERNATE_PRIVATE
42 HIBERNATE_STATE_LIVE=1,
45 HIBERNATE_STATE_EXITING=2,
48 HIBERNATE_STATE_LOWBANDWIDTH=3,
51 HIBERNATE_STATE_DORMANT=4,
54 HIBERNATE_STATE_INITIAL=5
58void hibernate_set_state_for_testing_(hibernate_state_t newstate);
time_t accounting_get_end_time(void)
int accounting_parse_options(const or_options_t *options, int validate_only)
int getinfo_helper_accounting(control_connection_t *conn, const char *question, char **answer, const char **errmsg)
int accounting_record_bandwidth_usage(time_t now, or_state_t *state)
void accounting_add_bytes(size_t n_read, size_t n_written, int seconds)
void consider_hibernation(time_t now)
int we_are_fully_hibernating(void)
void configure_accounting(time_t now)
int accounting_is_enabled(const or_options_t *options)
int we_are_shutting_down(void)
void accounting_free_all(void)
void accounting_run_housekeeping(time_t now)
int we_are_hibernating(void)
void hibernate_begin_shutdown(void)
uint64_t get_accounting_bytes(void)
int accounting_get_interval_length(void)
Macros to implement mocking and selective exposure for the test code.
#define MOCK_DECL(rv, funcname, arglist)