Update copyrights to 2021, using "make update-copyright"
[tor.git] / src / core / mainloop / netstatus.h
blobd2070fb87a161a9cf0821396d9e256c53f219563
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 */
7 /**
8 * @file netstatus.h
9 * @brief Header for netstatus.c
10 **/
12 #ifndef TOR_NETSTATUS_H
13 #define TOR_NETSTATUS_H
15 int net_is_disabled(void);
16 int net_is_completely_disabled(void);
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);
22 void set_network_participation(bool participation);
23 bool is_participating_on_network(void);
25 struct mainloop_state_t;
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);
32 #endif /* !defined(TOR_NETSTATUS_H) */