Debian Codegraph @

src/qmi-firmware-update/qfu-at-device.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) 2016 Zodiac Inflight Innovations
19 * Copyright (C) 2016-2017 Aleksander Morgado <[email protected]>
20 */
21
22 #ifndef QFU_AT_DEVICE_H
23 #define QFU_AT_DEVICE_H
24
25 #include <glib-object.h>
26 #include <gio/gio.h>
27
28 G_BEGIN_DECLS
29
30 #define QFU_TYPE_AT_DEVICE (qfu_at_device_get_type ())
31 #define QFU_AT_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QFU_TYPE_AT_DEVICE, QfuAtDevice))
32 #define QFU_AT_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QFU_TYPE_AT_DEVICE, QfuAtDeviceClass))
33 #define QFU_IS_AT_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QFU_TYPE_AT_DEVICE))
34 #define QFU_IS_AT_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QFU_TYPE_AT_DEVICE))
35 #define QFU_AT_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QFU_TYPE_AT_DEVICE, QfuAtDeviceClass))
36
37 typedef struct _QfuAtDevice QfuAtDevice;
38 typedef struct _QfuAtDeviceClass QfuAtDeviceClass;
39 typedef struct _QfuAtDevicePrivate QfuAtDevicePrivate;
40
41 struct _QfuAtDevice {
42 GObject parent;
43 QfuAtDevicePrivate *priv;
44 };
45
46 struct _QfuAtDeviceClass {
47 GObjectClass parent;
48 };
49
50 GType qfu_at_device_get_type (void);
51 G_DEFINE_AUTOPTR_CLEANUP_FUNC (QfuAtDevice, g_object_unref);
52
53 QfuAtDevice *qfu_at_device_new (GFile *file,
54 GCancellable *cancellable,
55 GError **error);
56 const gchar *qfu_at_device_get_name (QfuAtDevice *self);
57 gboolean qfu_at_device_boothold (QfuAtDevice *self,
58 GCancellable *cancellable,
59 GError **error);
60
61 G_END_DECLS
62
63 #endif /* QFU_AT_DEVICE_H */