Debian Codegraph @

src/qmi-firmware-update/qfu-firehose-message.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) 2019 Zodiac Inflight Innovations
19 * Copyright (C) 2019 Aleksander Morgado <[email protected]>
20 */
21
22 #ifndef QFU_FIREHOSE_MESSAGE_H
23 #define QFU_FIREHOSE_MESSAGE_H
24
25 #include <glib-object.h>
26 #include <gio/gio.h>
27
28 G_BEGIN_DECLS
29
30 gsize qfu_firehose_message_build_ping (guint8 *buffer,
31 gsize buffer_len);
32 gsize qfu_firehose_message_build_configure (guint8 *buffer,
33 gsize buffer_len,
34 guint max_payload_size_to_target_in_bytes);
35 gsize qfu_firehose_message_build_get_storage_info (guint8 *buffer,
36 gsize buffer_len);
37 gsize qfu_firehose_message_build_program (guint8 *buffer,
38 gsize buffer_len,
39 guint pages_per_block,
40 guint sector_size_in_bytes,
41 guint num_partition_sectors);
42 gsize qfu_firehose_message_build_reset (guint8 *buffer,
43 gsize buffer_len);
44
45 gboolean qfu_firehose_message_parse_response_ack (const gchar *rsp,
46 gchar **value,
47 gchar **rawmode);
48 gboolean qfu_firehose_message_parse_response_configure (const gchar *rsp,
49 guint32 *max_payload_size_to_target_in_bytes);
50 gboolean qfu_firehose_message_parse_log (const gchar *rsp,
51 gchar **value);
52
53 G_END_DECLS
54
55 #endif /* QFU_FIREHOSE_MESSAGE_H */