aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2022-05-25 16:27:19 +0900
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>2022-05-25 16:27:19 +0900
commit5b9239affb2f1c3f0af519d375fe2a9f037779ae (patch)
tree67d54720155ba5d49d4a842776d98d5ddec5a515
parent8bd723e97fe16fca44338be28477007c6b91e618 (diff)
downloadlibhinoko-5b9239affb2f1c3f0af519d375fe2a9f037779ae.tar.gz
fw_iso_resource: add constant to immutable array
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r--src/fw_iso_resource.c8
-rw-r--r--src/fw_iso_resource.h13
-rw-r--r--src/fw_iso_resource_auto.c2
-rw-r--r--src/fw_iso_resource_once.c2
4 files changed, 12 insertions, 13 deletions
diff --git a/src/fw_iso_resource.c b/src/fw_iso_resource.c
index a82a923..22a483b 100644
--- a/src/fw_iso_resource.c
+++ b/src/fw_iso_resource.c
@@ -148,7 +148,7 @@ gboolean hinoko_fw_iso_resource_create_source(HinokoFwIsoResource *self, GSource
* Since: 0.7.
*/
gboolean hinoko_fw_iso_resource_allocate_async(HinokoFwIsoResource *self,
- guint8 *channel_candidates,
+ const guint8 *channel_candidates,
gsize channel_candidates_count,
guint bandwidth, GError **error)
{
@@ -182,9 +182,9 @@ gboolean hinoko_fw_iso_resource_allocate_async(HinokoFwIsoResource *self,
* Since: 0.7.
*/
gboolean hinoko_fw_iso_resource_allocate_sync(HinokoFwIsoResource *self,
- guint8 *channel_candidates,
- gsize channel_candidates_count,
- guint bandwidth, guint timeout_ms, GError **error)
+ const guint8 *channel_candidates,
+ gsize channel_candidates_count, guint bandwidth,
+ guint timeout_ms, GError **error)
{
struct fw_iso_resource_waiter w;
diff --git a/src/fw_iso_resource.h b/src/fw_iso_resource.h
index 2b3c966..b23ecbb 100644
--- a/src/fw_iso_resource.h
+++ b/src/fw_iso_resource.h
@@ -20,9 +20,8 @@ struct _HinokoFwIsoResourceInterface {
gboolean (*open)(HinokoFwIsoResource *self, const gchar *path, gint open_flag,
GError **error);
- gboolean (*allocate_async)(HinokoFwIsoResource *self,
- guint8 *channel_candidates, gsize channel_candidates_count,
- guint bandwidth, GError **error);
+ gboolean (*allocate_async)(HinokoFwIsoResource *self, const guint8 *channel_candidates,
+ gsize channel_candidates_count, guint bandwidth, GError **error);
gboolean (*create_source)(HinokoFwIsoResource *self, GSource **source, GError **error);
@@ -64,14 +63,14 @@ gboolean hinoko_fw_iso_resource_create_source(HinokoFwIsoResource *self, GSource
GError **error);
gboolean hinoko_fw_iso_resource_allocate_async(HinokoFwIsoResource *self,
- guint8 *channel_candidates,
+ const guint8 *channel_candidates,
gsize channel_candidates_count,
guint bandwidth, GError **error);
gboolean hinoko_fw_iso_resource_allocate_sync(HinokoFwIsoResource *self,
- guint8 *channel_candidates,
- gsize channel_candidates_count,
- guint bandwidth, guint timeout_ms, GError **error);
+ const guint8 *channel_candidates,
+ gsize channel_candidates_count, guint bandwidth,
+ guint timeout_ms, GError **error);
guint hinoko_fw_iso_resource_calculate_bandwidth(guint bytes_per_payload,
HinokoFwScode scode);
diff --git a/src/fw_iso_resource_auto.c b/src/fw_iso_resource_auto.c
index 4cb59a4..cecc1d3 100644
--- a/src/fw_iso_resource_auto.c
+++ b/src/fw_iso_resource_auto.c
@@ -141,7 +141,7 @@ static gboolean fw_iso_resource_auto_open(HinokoFwIsoResource *inst, const gchar
}
static gboolean fw_iso_resource_auto_allocate_async(HinokoFwIsoResource *inst,
- guint8 *channel_candidates,
+ const guint8 *channel_candidates,
gsize channel_candidates_count,
guint bandwidth,
GError **error)
diff --git a/src/fw_iso_resource_once.c b/src/fw_iso_resource_once.c
index 99d01a5..7b77240 100644
--- a/src/fw_iso_resource_once.c
+++ b/src/fw_iso_resource_once.c
@@ -72,7 +72,7 @@ static gboolean fw_iso_resource_once_open(HinokoFwIsoResource *inst, const gchar
}
static gboolean fw_iso_resource_once_allocate_async(HinokoFwIsoResource *inst,
- guint8 *channel_candidates,
+ const guint8 *channel_candidates,
gsize channel_candidates_count,
guint bandwidth, GError **error)
{