|
Packit |
2ba279 |
/*
|
|
Packit |
2ba279 |
* Copyright (C) 2017 Red Hat, Inc.
|
|
Packit |
2ba279 |
*
|
|
Packit |
2ba279 |
* This library is free software; you can redistribute it and/or
|
|
Packit |
2ba279 |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
2ba279 |
* License as published by the Free Software Foundation; either
|
|
Packit |
2ba279 |
* version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
2ba279 |
*
|
|
Packit |
2ba279 |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
2ba279 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
2ba279 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
2ba279 |
* Lesser General Public License for more details.
|
|
Packit |
2ba279 |
*
|
|
Packit |
2ba279 |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
2ba279 |
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
2ba279 |
*
|
|
Packit |
2ba279 |
* Author: Vratislav Podzimek <vpodzime@redhat.com>
|
|
Packit |
2ba279 |
*/
|
|
Packit |
2ba279 |
|
|
Packit |
2ba279 |
#include <glib.h>
|
|
Packit |
2ba279 |
|
|
Packit |
2ba279 |
typedef struct UtilDep {
|
|
Packit |
2ba279 |
const gchar *name;
|
|
Packit |
2ba279 |
const gchar *version;
|
|
Packit |
2ba279 |
const gchar *ver_arg;
|
|
Packit |
2ba279 |
const gchar *ver_regexp;
|
|
Packit |
2ba279 |
} UtilDep;
|
|
Packit |
2ba279 |
|
|
Packit |
2ba279 |
typedef struct DBusDep {
|
|
Packit |
2ba279 |
const gchar *bus_name;
|
|
Packit |
2ba279 |
const gchar *obj_prefix;
|
|
Packit |
2ba279 |
GBusType bus_type;
|
|
Packit |
2ba279 |
} DBusDep;
|
|
Packit |
2ba279 |
|
|
Packit |
2ba279 |
typedef struct UtilFeatureDep {
|
|
Packit |
2ba279 |
const gchar *util_name;
|
|
Packit |
2ba279 |
const gchar *feature;
|
|
Packit |
2ba279 |
const gchar *feature_arg;
|
|
Packit |
2ba279 |
const gchar *feature_regexp;
|
|
Packit |
2ba279 |
} UtilFeatureDep;
|
|
Packit |
2ba279 |
|
|
Packit |
2ba279 |
gboolean check_deps (volatile guint *avail_deps, guint req_deps, const UtilDep *deps_specs, guint l_deps, GMutex *deps_check_lock, GError **error);
|
|
Packit |
2ba279 |
gboolean check_module_deps (volatile guint *avail_deps, guint req_deps, const gchar *const*modules, guint l_modules, GMutex *deps_check_lock, GError **error);
|
|
Packit |
2ba279 |
gboolean check_dbus_deps (volatile guint *avail_deps, guint req_deps, const DBusDep *buses, guint l_buses, GMutex *deps_check_lock, GError **error);
|
|
Packit |
2ba279 |
gboolean check_features (volatile guint *avail_deps, guint req_deps, const UtilFeatureDep *deps_specs, guint l_deps, GMutex *deps_check_lock, GError **error);
|