Debian Codegraph @

src/qmi-firmware-update/qfu-helpers-sysfs.h

raw
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * qmi-firmware-update -- Command line tool to update firmware in QMI devices
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * Copyright (C) 2022 VMware, Inc.
19 */
20
21 #ifndef QFU_HELPERS_SYSFS_H
22 #define QFU_HELPERS_SYSFS_H
23
24 #include "config.h"
25 #include <gio/gio.h>
26
27 #if defined WITH_UDEV
28 # error udev found
29 #endif
30
31 G_BEGIN_DECLS
32
33 gchar *qfu_helpers_sysfs_find_by_file (GFile *file,
34 GError **error);
35 gchar *qfu_helpers_sysfs_find_by_device_info (guint16 vid,
36 guint16 pid,
37 guint busnum,
38 guint devnum,
39 GError **error);
40
41 GList *qfu_helpers_sysfs_list_devices (QfuHelpersDeviceType device_type,
42 QfuHelpersDeviceMode device_mode,
43 const gchar *sysfs_path);
44
45 void qfu_helpers_sysfs_wait_for_device (QfuHelpersDeviceType device_type,
46 QfuHelpersDeviceMode device_mode,
47 const gchar *sysfs_path,
48 const gchar *peer_port,
49 GCancellable *cancellable,
50 GAsyncReadyCallback callback,
51 gpointer user_data);
52 GFile *qfu_helpers_sysfs_wait_for_device_finish (GAsyncResult *res,
53 GError **error);
54
55 G_END_DECLS
56
57 #endif /* QFU_HELPERS_SYSFS_H */