Debian Codegraph @

src/plugins/check_deps.h

raw
1 /*
2 * Copyright (C) 2017 Red Hat, Inc.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library 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 GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
16 *
17 * Author: Vratislav Podzimek <[email protected]>
18 */
19
20 #include <glib.h>
21
22 #ifndef BD_CHECK_DEPS
23 #define BD_CHECK_DEPS
24
25 typedef struct UtilDep {
26 const gchar *name;
27 const gchar *version;
28 const gchar *ver_arg;
29 const gchar *ver_regexp;
30 } UtilDep;
31
32 typedef struct DBusDep {
33 const gchar *bus_name;
34 const gchar *obj_prefix;
35 GBusType bus_type;
36 const gchar *version;
37 const gchar *ver_prop;
38 const gchar *ver_intf;
39 const gchar *ver_path;
40 } DBusDep;
41
42 typedef struct UtilFeatureDep {
43 const gchar *util_name;
44 const gchar *feature;
45 const gchar *feature_arg;
46 const gchar *feature_regexp;
47 } UtilFeatureDep;
48
49 gboolean check_deps (volatile guint *avail_deps, guint req_deps, const UtilDep *deps_specs, guint l_deps, GMutex *deps_check_lock, GError **error);
50 gboolean check_module_deps (volatile guint *avail_deps, guint req_deps, const gchar *const*modules, guint l_modules, GMutex *deps_check_lock, GError **error);
51 gboolean check_dbus_deps (volatile guint *avail_deps, guint req_deps, const DBusDep *buses, guint l_buses, GMutex *deps_check_lock, GError **error);
52 gboolean check_features (volatile guint *avail_deps, guint req_deps, const UtilFeatureDep *deps_specs, guint l_deps, GMutex *deps_check_lock, GError **error);
53
54 #endif /* BD_CHECK_DEPS */