1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* NetworkManager -- Network link manager
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.
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.
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.
18 * Copyright (C) 2014 Red Hat, Inc.
21 #ifndef __MAIN_UTILS_H__
22 #define __MAIN_UTILS_H__
24 #include "nm-default.h"
26 void nm_main_utils_ensure_root (void);
28 void nm_main_utils_setup_signals (GMainLoop *main_loop);
30 void nm_main_utils_ensure_statedir (void);
31 void nm_main_utils_ensure_rundir (void);
33 gboolean nm_main_utils_write_pidfile (const char *pidfile);
35 void nm_main_utils_ensure_not_running_pidfile (const char *pidfile);
37 gboolean nm_main_utils_early_setup (const char *progname,
40 GOptionEntry *options,
41 void (*option_context_hook) (gpointer user_data, GOptionContext *opt_ctx),
42 gpointer option_context_hook_data,
45 /* The following functions are not implemented inside nm-main-utils.c, instead
46 * main.c and nm-iface-helper.c */
48 void nm_main_config_reload (int signal);
50 #endif /* __MAIN_UTILS_H__ */