Tor  0.4.7.0-alpha-dev
netstatus.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-2021, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
7 /**
8  * @file netstatus.h
9  * @brief Header for netstatus.c
10  **/
11 
12 #ifndef TOR_NETSTATUS_H
13 #define TOR_NETSTATUS_H
14 
15 int net_is_disabled(void);
17 
18 void note_user_activity(time_t now);
19 void reset_user_activity(time_t now);
20 time_t get_last_user_activity_time(void);
21 
22 void set_network_participation(bool participation);
24 
25 struct mainloop_state_t;
26 
27 void netstatus_flush_to_state(struct mainloop_state_t *state, time_t now);
28 void netstatus_load_from_state(const struct mainloop_state_t *state,
29  time_t now);
30 void netstatus_note_clock_jumped(time_t seconds_diff);
31 
32 #endif /* !defined(TOR_NETSTATUS_H) */
void netstatus_load_from_state(const mainloop_state_t *state, time_t now)
Definition: netstatus.c:134
int net_is_disabled(void)
Definition: netstatus.c:25
void netstatus_note_clock_jumped(time_t seconds_diff)
Definition: netstatus.c:168
void netstatus_flush_to_state(struct mainloop_state_t *state, time_t now)
Definition: netstatus.c:119
int net_is_completely_disabled(void)
Definition: netstatus.c:34
void set_network_participation(bool participation)
Definition: netstatus.c:101
time_t get_last_user_activity_time(void)
Definition: netstatus.c:91
void reset_user_activity(time_t now)
Definition: netstatus.c:82
void note_user_activity(time_t now)
Definition: netstatus.c:63
bool is_participating_on_network(void)
Definition: netstatus.c:110