2019-09-10 11:19:01 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2019-09-25 13:13:40 +02:00
|
|
|
/*
|
2014-10-29 09:36:47 -05:00
|
|
|
* Copyright (C) 2014 Red Hat, Inc.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef __MAIN_UTILS_H__
|
|
|
|
|
#define __MAIN_UTILS_H__
|
|
|
|
|
|
2015-03-13 20:57:18 +01:00
|
|
|
void nm_main_utils_ensure_root (void);
|
|
|
|
|
|
2015-01-12 11:31:10 -05:00
|
|
|
void nm_main_utils_setup_signals (GMainLoop *main_loop);
|
2014-10-29 09:36:47 -05:00
|
|
|
|
2016-03-21 12:01:26 +01:00
|
|
|
void nm_main_utils_ensure_statedir (void);
|
2015-03-13 22:55:39 +01:00
|
|
|
void nm_main_utils_ensure_rundir (void);
|
|
|
|
|
|
2014-10-29 09:36:47 -05:00
|
|
|
gboolean nm_main_utils_write_pidfile (const char *pidfile);
|
|
|
|
|
|
2015-03-13 23:06:29 +01:00
|
|
|
void nm_main_utils_ensure_not_running_pidfile (const char *pidfile);
|
2014-10-29 09:36:47 -05:00
|
|
|
|
|
|
|
|
gboolean nm_main_utils_early_setup (const char *progname,
|
|
|
|
|
int *argc,
|
2015-03-13 20:47:03 +01:00
|
|
|
char **argv[],
|
2014-10-29 09:36:47 -05:00
|
|
|
GOptionEntry *options,
|
2014-07-09 15:17:01 +02:00
|
|
|
void (*option_context_hook) (gpointer user_data, GOptionContext *opt_ctx),
|
|
|
|
|
gpointer option_context_hook_data,
|
2014-10-29 09:36:47 -05:00
|
|
|
const char *summary);
|
|
|
|
|
|
2014-07-09 18:36:20 +02:00
|
|
|
/* The following functions are not implemented inside nm-main-utils.c, instead
|
|
|
|
|
* main.c and nm-iface-helper.c */
|
|
|
|
|
|
2015-06-25 21:10:32 +02:00
|
|
|
void nm_main_config_reload (int signal);
|
2014-07-09 18:36:20 +02:00
|
|
|
|
2014-10-29 09:36:47 -05:00
|
|
|
#endif /* __MAIN_UTILS_H__ */
|