diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2023-10-30 19:15:20 +0900 |
---|---|---|
committer | 坂本 貴史 <o-takashi@sakamocchi.jp> | 2023-10-30 21:18:53 +0900 |
commit | 1d1f735a9e5da3abef5fc2b45d39a176468f18dd (patch) | |
tree | 2667223a13e7bbc0371bdedb255e45bf42f87d39 | |
parent | 71eabc32edfdda22a9dc56f567a4668c4a76188c (diff) | |
download | libhinoko-1d1f735a9e5da3abef5fc2b45d39a176468f18dd.tar.gz |
fw_iso_resource: remove sync suffix from allocation methods
The request of allocation generates completion event. In current
implementation, the method for request has async suffix, and the method to
wait for the event has sync suffix. However, these two keywords are often
heavy use in different contexts and sometimes unfriendly to developers and
users.
This commit renames sync method with wait suffix.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rwxr-xr-x | samples/iso-resource | 4 | ||||
-rw-r--r-- | src/fw_iso_resource.c | 6 | ||||
-rw-r--r-- | src/fw_iso_resource.h | 2 | ||||
-rw-r--r-- | src/hinoko.map | 3 | ||||
-rw-r--r-- | tests/fw-iso-resource | 2 | ||||
-rw-r--r-- | tests/fw-iso-resource-auto | 2 | ||||
-rw-r--r-- | tests/fw-iso-resource-once | 2 |
7 files changed, 11 insertions, 10 deletions
diff --git a/samples/iso-resource b/samples/iso-resource index 6a17e0e..bd9b72b 100755 --- a/samples/iso-resource +++ b/samples/iso-resource @@ -37,7 +37,7 @@ src.attach(ctx) for i in range(2): try: - res.allocate_sync((use_channel, ), use_bandwidth, 100) + res.allocate_wait((use_channel, ), use_bandwidth, 100) except GLib.Error as e: if e.matches(Hinoko.fw_iso_resource_error_quark(), Hinoko.FwIsoResourceError.EVENT): print(e) @@ -80,7 +80,7 @@ for i in range(2): print_props(res) try: - res.allocate_sync([use_channel], use_bandwidth, 100) + res.allocate_wait([use_channel], use_bandwidth, 100) except GLib.Error as e: if e.matches(Hinoko.fw_iso_resource_error_quark(), Hinoko.FwIsoResourceError.EVENT): print(e) diff --git a/src/fw_iso_resource.c b/src/fw_iso_resource.c index 560ef2b..1d5d8e4 100644 --- a/src/fw_iso_resource.c +++ b/src/fw_iso_resource.c @@ -202,7 +202,7 @@ gboolean hinoko_fw_iso_resource_allocate_async(HinokoFwIsoResource *self, } /** - * hinoko_fw_iso_resource_allocate_sync: + * hinoko_fw_iso_resource_allocate_wait: * @self: A [iface@FwIsoResource]. * @channel_candidates: (array length=channel_candidates_count): The array with elements for * numeric number for isochronous channel to be allocated. @@ -217,9 +217,9 @@ gboolean hinoko_fw_iso_resource_allocate_async(HinokoFwIsoResource *self, * * Returns: TRUE if the overall operation finishes successfully, otherwise FALSE. * - * Since: 0.7 + * Since: 1.0 */ -gboolean hinoko_fw_iso_resource_allocate_sync(HinokoFwIsoResource *self, +gboolean hinoko_fw_iso_resource_allocate_wait(HinokoFwIsoResource *self, const guint8 *channel_candidates, gsize channel_candidates_count, guint bandwidth, guint timeout_ms, GError **error) diff --git a/src/fw_iso_resource.h b/src/fw_iso_resource.h index 25d1638..144f6fa 100644 --- a/src/fw_iso_resource.h +++ b/src/fw_iso_resource.h @@ -111,7 +111,7 @@ gboolean hinoko_fw_iso_resource_allocate_async(HinokoFwIsoResource *self, gsize channel_candidates_count, guint bandwidth, GError **error); -gboolean hinoko_fw_iso_resource_allocate_sync(HinokoFwIsoResource *self, +gboolean hinoko_fw_iso_resource_allocate_wait(HinokoFwIsoResource *self, const guint8 *channel_candidates, gsize channel_candidates_count, guint bandwidth, guint timeout_ms, GError **error); diff --git a/src/hinoko.map b/src/hinoko.map index 98237d7..45ae687 100644 --- a/src/hinoko.map +++ b/src/hinoko.map @@ -42,7 +42,6 @@ HINOKO_0_7_0 { "hinoko_fw_iso_resource_open"; "hinoko_fw_iso_resource_create_source"; "hinoko_fw_iso_resource_allocate_async"; - "hinoko_fw_iso_resource_allocate_sync"; "hinoko_fw_iso_resource_auto_get_type"; @@ -79,6 +78,8 @@ HINOKO_0_9_0 { } HINOKO_0_8_0; HINOKO_1_0_0 { + "hinoko_fw_iso_resource_allocate_wait"; + "hinoko_fw_iso_resource_once_deallocate"; "hinoko_fw_iso_resource_once_deallocate_wait"; diff --git a/tests/fw-iso-resource b/tests/fw-iso-resource index 3b412d5..3f5e2ce 100644 --- a/tests/fw-iso-resource +++ b/tests/fw-iso-resource @@ -17,7 +17,7 @@ methods = ( 'open', 'create_source', 'allocate_async', - 'allocate_sync', + 'allocate_wait', ) vmethods = ( 'do_open', diff --git a/tests/fw-iso-resource-auto b/tests/fw-iso-resource-auto index faf8e43..0680e64 100644 --- a/tests/fw-iso-resource-auto +++ b/tests/fw-iso-resource-auto @@ -25,7 +25,7 @@ methods = ( 'open', 'create_source', 'allocate_async', - 'allocate_sync', + 'allocate_wait', ) vmethods = ( # From interface. diff --git a/tests/fw-iso-resource-once b/tests/fw-iso-resource-once index 7b3f03f..7e49669 100644 --- a/tests/fw-iso-resource-once +++ b/tests/fw-iso-resource-once @@ -22,7 +22,7 @@ methods = ( 'open', 'create_source', 'allocate_async', - 'allocate_sync', + 'allocate_wait', ) vmethods = ( # From interface. |