device: renew dhcp leases on awake for software devices
[NetworkManager.git] / src / main-utils.h
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* NetworkManager -- Network link manager
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  *
18  * Copyright (C) 2014 Red Hat, Inc.
19  */
20
21 #ifndef __MAIN_UTILS_H__
22 #define __MAIN_UTILS_H__
23
24 #include "nm-default.h"
25
26 void     nm_main_utils_ensure_root (void);
27
28 void     nm_main_utils_setup_signals (GMainLoop *main_loop);
29
30 void     nm_main_utils_ensure_statedir (void);
31 void     nm_main_utils_ensure_rundir (void);
32
33 gboolean nm_main_utils_write_pidfile (const char *pidfile);
34
35 void     nm_main_utils_ensure_not_running_pidfile (const char *pidfile);
36
37 gboolean nm_main_utils_early_setup (const char *progname,
38                                     int *argc,
39                                     char **argv[],
40                                     GOptionEntry *options,
41                                     void (*option_context_hook) (gpointer user_data, GOptionContext *opt_ctx),
42                                     gpointer option_context_hook_data,
43                                     const char *summary);
44
45 /* The following functions are not implemented inside nm-main-utils.c, instead
46  * main.c and nm-iface-helper.c */
47
48 void nm_main_config_reload (int signal);
49
50 #endif /* __MAIN_UTILS_H__ */