diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2022-05-05 11:37:24 +0900 |
---|---|---|
committer | 坂本 貴史 <o-takashi@sakamocchi.jp> | 2022-05-05 16:09:50 +0900 |
commit | f2a2e7aaefc6cf2466fed4f24cd925047ccc3381 (patch) | |
tree | b87ae0074692251319ee995cd4af4c9fdc996a08 | |
parent | 5f69175a9f16a633060f818bfde0c855074b0185 (diff) | |
download | libhinoko-f2a2e7aaefc6cf2466fed4f24cd925047ccc3381.tar.gz |
fw_iso_ctx: make it GObject Interface
At last, this commit makes Hinoko.FwIsoCtx as GObject Interface after
long preparation.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r-- | src/fw_iso_ctx.c | 71 | ||||
-rw-r--r-- | src/fw_iso_ctx.h | 8 | ||||
-rw-r--r-- | src/fw_iso_rx_multiple.c | 26 | ||||
-rw-r--r-- | src/fw_iso_rx_multiple.h | 4 | ||||
-rw-r--r-- | src/fw_iso_rx_single.c | 19 | ||||
-rw-r--r-- | src/fw_iso_rx_single.h | 4 | ||||
-rw-r--r-- | src/fw_iso_tx.c | 18 | ||||
-rw-r--r-- | src/fw_iso_tx.h | 4 | ||||
-rw-r--r-- | src/hinoko.map | 9 | ||||
-rw-r--r-- | src/hinoko_enum_types.h | 2 | ||||
-rwxr-xr-x | tests/fw-iso-ctx | 31 | ||||
-rw-r--r-- | tests/meson.build | 1 |
12 files changed, 71 insertions, 126 deletions
diff --git a/src/fw_iso_ctx.c b/src/fw_iso_ctx.c index cc3572a..46117c0 100644 --- a/src/fw_iso_ctx.c +++ b/src/fw_iso_ctx.c @@ -5,15 +5,13 @@ /** * HinokoFwIsoCtx - * An abstract object to maintain isochronous context. + * An basic interface to operate isochronous context on 1394 OHCI controller. * - * A [class@FwIsoCtx] is an abstract object to maintain isochronous context by - * UAPI of Linux FireWire subsystem. All of operations utilize ioctl(2) with - * subsystem specific request commands. This object is designed for internal - * use, therefore a few method and properties are available for applications. + * A [iface@FwIsoCtx] is an basic interface to use UAPI of Linux FireWire subsystem to operate + * 1394 OHCI controller. */ -G_DEFINE_ABSTRACT_TYPE(HinokoFwIsoCtx, hinoko_fw_iso_ctx, G_TYPE_OBJECT) +G_DEFINE_INTERFACE(HinokoFwIsoCtx, hinoko_fw_iso_ctx, G_TYPE_OBJECT) /** * hinoko_fw_iso_ctx_error_quark: @@ -37,36 +35,21 @@ const char *const fw_iso_ctx_err_msgs[7] = { [HINOKO_FW_ISO_CTX_ERROR_CHUNK_UNREGISTERED] = "No chunk registered before starting", }; -enum fw_iso_ctx_sig_type { - FW_ISO_CTX_SIG_TYPE_STOPPED = 1, - FW_ISO_CTX_SIG_TYPE_COUNT, -}; -static guint fw_iso_ctx_sigs[FW_ISO_CTX_SIG_TYPE_COUNT] = { 0 }; - -static void fw_iso_ctx_get_property(GObject *obj, guint id, GValue *val, GParamSpec *spec) -{ - return; -} - -static void hinoko_fw_iso_ctx_class_init(HinokoFwIsoCtxClass *klass) +static void hinoko_fw_iso_ctx_default_init(HinokoFwIsoCtxInterface *iface) { - GObjectClass *gobject_class = G_OBJECT_CLASS(klass); - - gobject_class->get_property = fw_iso_ctx_get_property; - - g_object_class_install_property(gobject_class, FW_ISO_CTX_PROP_TYPE_BYTES_PER_CHUNK, + g_object_interface_install_property(iface, g_param_spec_uint(BYTES_PER_CHUNK_PROP_NAME, "bytes-per-chunk", "The number of bytes for chunk in buffer.", 0, G_MAXUINT, 0, G_PARAM_READABLE)); - g_object_class_install_property(gobject_class, FW_ISO_CTX_PROP_TYPE_CHUNKS_PER_BUFFER, + g_object_interface_install_property(iface, g_param_spec_uint(CHUNKS_PER_BUFFER_PROP_NAME, "chunks-per-buffer", "The number of chunks in buffer.", 0, G_MAXUINT, 0, G_PARAM_READABLE)); - g_object_class_install_property(gobject_class, FW_ISO_CTX_PROP_TYPE_REGISTERED_CHUNK_COUNT, + g_object_interface_install_property(iface, g_param_spec_uint(REGISTERED_CHUNK_COUNT_PROP_NAME, "registered-chunk-count", "The number of chunk to be registered.", @@ -75,29 +58,23 @@ static void hinoko_fw_iso_ctx_class_init(HinokoFwIsoCtxClass *klass) /** * HinokoFwIsoCtx::stopped: - * @self: A [class@FwIsoCtx]. + * @self: A [iface@FwIsoCtx]. * @error: (transfer none) (nullable) (in): A [struct@GLib.Error]. * * Emitted when isochronous context is stopped. */ - fw_iso_ctx_sigs[FW_ISO_CTX_SIG_TYPE_STOPPED] = - g_signal_new(STOPPED_SIGNAL_NEME, - G_OBJECT_CLASS_TYPE(klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET(HinokoFwIsoCtxClass, stopped), - NULL, NULL, - g_cclosure_marshal_VOID__BOXED, - G_TYPE_NONE, 1, G_TYPE_ERROR); -} - -static void hinoko_fw_iso_ctx_init(HinokoFwIsoCtx *self) -{ - return; + g_signal_new(STOPPED_SIGNAL_NEME, + G_TYPE_FROM_INTERFACE(iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET(HinokoFwIsoCtxInterface, stopped), + NULL, NULL, + g_cclosure_marshal_VOID__BOXED, + G_TYPE_NONE, 1, G_TYPE_ERROR); } /** * hinoko_fw_iso_ctx_get_cycle_timer: - * @self: A [class@FwIsoCtx]. + * @self: A [iface@FwIsoCtx]. * @clock_id: The numeric ID of clock source for the reference timestamp. One CLOCK_REALTIME(0), * CLOCK_MONOTONIC(1), and CLOCK_MONOTONIC_RAW(2) is available in UAPI of Linux kernel. * @cycle_timer: (inout): A [struct@CycleTimer] to store data of cycle timer. @@ -114,12 +91,12 @@ void hinoko_fw_iso_ctx_get_cycle_timer(HinokoFwIsoCtx *self, gint clock_id, g_return_if_fail(cycle_timer != NULL); g_return_if_fail(error == NULL || *error == NULL); - HINOKO_FW_ISO_CTX_CLASS(self)->get_cycle_timer(self, clock_id, cycle_timer, error); + HINOKO_FW_ISO_CTX_GET_IFACE(self)->get_cycle_timer(self, clock_id, cycle_timer, error); } /** * hinoko_fw_iso_ctx_create_source: - * @self: A [class@FwIsoCtx]. + * @self: A [iface@FwIsoCtx]. * @source: (out): A [struct@GLib.Source]. * @error: A [struct@GLib.Error]. * @@ -132,12 +109,12 @@ void hinoko_fw_iso_ctx_create_source(HinokoFwIsoCtx *self, GSource **source, GEr g_return_if_fail(source != NULL); g_return_if_fail(error == NULL || *error == NULL); - (void)HINOKO_FW_ISO_CTX_CLASS(self)->create_source(self, source, error); + (void)HINOKO_FW_ISO_CTX_GET_IFACE(self)->create_source(self, source, error); } /** * hinoko_fw_iso_ctx_stop: - * @self: A [class@FwIsoCtx]. + * @self: A [iface@FwIsoCtx]. * * Stop isochronous context. * @@ -147,12 +124,12 @@ void hinoko_fw_iso_ctx_stop(HinokoFwIsoCtx *self) { g_return_if_fail(HINOKO_IS_FW_ISO_CTX(self)); - HINOKO_FW_ISO_CTX_CLASS(self)->stop(self); + HINOKO_FW_ISO_CTX_GET_IFACE(self)->stop(self); } /** * hinoko_fw_iso_ctx_flush_completions: - * @self: A [class@FwIsoCtx]. + * @self: A [iface@FwIsoCtx]. * @error: A [struct@GLib.Error]. * * Flush isochronous context until recent isochronous cycle. The call of function forces the @@ -166,5 +143,5 @@ void hinoko_fw_iso_ctx_flush_completions(HinokoFwIsoCtx *self, GError **error) g_return_if_fail(HINOKO_IS_FW_ISO_CTX(self)); g_return_if_fail(error == NULL || *error == NULL); - (void)HINOKO_FW_ISO_CTX_CLASS(self)->flush_completions(self, error); + (void)HINOKO_FW_ISO_CTX_GET_IFACE(self)->flush_completions(self, error); } diff --git a/src/fw_iso_ctx.h b/src/fw_iso_ctx.h index 3419c40..9986ece 100644 --- a/src/fw_iso_ctx.h +++ b/src/fw_iso_ctx.h @@ -8,14 +8,14 @@ G_BEGIN_DECLS #define HINOKO_TYPE_FW_ISO_CTX (hinoko_fw_iso_ctx_get_type()) -G_DECLARE_DERIVABLE_TYPE(HinokoFwIsoCtx, hinoko_fw_iso_ctx, HINOKO, FW_ISO_CTX, GObject); +G_DECLARE_INTERFACE(HinokoFwIsoCtx, hinoko_fw_iso_ctx, HINOKO, FW_ISO_CTX, GObject); #define HINOKO_FW_ISO_CTX_ERROR hinoko_fw_iso_ctx_error_quark() GQuark hinoko_fw_iso_ctx_error_quark(); -struct _HinokoFwIsoCtxClass { - GObjectClass parent_class; +struct _HinokoFwIsoCtxInterface { + GTypeInterface parent_iface; void (*stop)(HinokoFwIsoCtx *self); @@ -28,7 +28,7 @@ struct _HinokoFwIsoCtxClass { /** * HinokoFwIsoCtxClass::stopped: - * @self: A [class@FwIsoCtx]. + * @self: A [iface@FwIsoCtx]. * @error: (transfer none) (nullable) (in): A [struct@GLib.Error]. * * Class closure for the [signal@FwIsoCtx::stopped] signal. diff --git a/src/fw_iso_rx_multiple.c b/src/fw_iso_rx_multiple.c index 626b634..08bfea5 100644 --- a/src/fw_iso_rx_multiple.c +++ b/src/fw_iso_rx_multiple.c @@ -27,9 +27,11 @@ typedef struct { guint accumulated_chunk_count; } HinokoFwIsoRxMultiplePrivate; -static void fw_iso_ctx_class_init(HinokoFwIsoCtxClass *parent_class); +static void fw_iso_ctx_iface_init(HinokoFwIsoCtxInterface *iface); -G_DEFINE_TYPE_WITH_PRIVATE(HinokoFwIsoRxMultiple, hinoko_fw_iso_rx_multiple, HINOKO_TYPE_FW_ISO_CTX) +G_DEFINE_TYPE_WITH_CODE(HinokoFwIsoRxMultiple, hinoko_fw_iso_rx_multiple, G_TYPE_OBJECT, + G_ADD_PRIVATE(HinokoFwIsoRxMultiple) + G_IMPLEMENT_INTERFACE(HINOKO_TYPE_FW_ISO_CTX, fw_iso_ctx_iface_init)) enum fw_iso_rx_multiple_prop_type { FW_ISO_RX_MULTIPLE_PROP_TYPE_CHANNELS = FW_ISO_CTX_PROP_TYPE_COUNT, @@ -70,13 +72,11 @@ static void fw_iso_rx_multiple_finalize(GObject *obj) static void hinoko_fw_iso_rx_multiple_class_init(HinokoFwIsoRxMultipleClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); - HinokoFwIsoCtxClass *parent_class = HINOKO_FW_ISO_CTX_CLASS(klass); gobject_class->get_property = fw_iso_rx_multiple_get_property; gobject_class->finalize = fw_iso_rx_multiple_finalize; fw_iso_ctx_class_override_properties(gobject_class); - fw_iso_ctx_class_init(parent_class); g_object_class_install_property(gobject_class, FW_ISO_RX_MULTIPLE_PROP_TYPE_CHANNELS, g_param_spec_boxed("channels", "channels", @@ -282,12 +282,12 @@ gboolean fw_iso_rx_multiple_create_source(HinokoFwIsoCtx *inst, GSource **source source, error); } -static void fw_iso_ctx_class_init(HinokoFwIsoCtxClass *parent_class) +static void fw_iso_ctx_iface_init(HinokoFwIsoCtxInterface *iface) { - parent_class->stop = fw_iso_rx_multiple_stop; - parent_class->get_cycle_timer = fw_iso_rx_multiple_get_cycle_timer; - parent_class->flush_completions = fw_iso_rx_multiple_flush_completions; - parent_class->create_source = fw_iso_rx_multiple_create_source; + iface->stop = fw_iso_rx_multiple_stop; + iface->get_cycle_timer = fw_iso_rx_multiple_get_cycle_timer; + iface->flush_completions = fw_iso_rx_multiple_flush_completions; + iface->create_source = fw_iso_rx_multiple_create_source; } /** @@ -346,20 +346,20 @@ void hinoko_fw_iso_rx_multiple_allocate(HinokoFwIsoRxMultiple *self, set.handle = priv->state.handle; if (ioctl(priv->state.fd, FW_CDEV_IOC_SET_ISO_CHANNELS, &set) < 0) { generate_syscall_error(error, errno, "ioctl(%s)", "FW_CDEV_IOC_SET_ISO_CHANNELS"); + hinoko_fw_iso_rx_multiple_release(self); return; } else if (set.channels == 0) { g_set_error_literal(error, HINOKO_FW_ISO_CTX_ERROR, HINOKO_FW_ISO_CTX_ERROR_NO_ISOC_CHANNEL, "No isochronous channel is available"); + hinoko_fw_iso_rx_multiple_release(self); return; } priv->channels = g_byte_array_new(); for (i = 0; i < 64; ++i) { - if (!(set.channels & (G_GUINT64_CONSTANT(1) << i))) - continue; - - g_byte_array_append(priv->channels, (const guint8 *)&i, 1); + if (set.channels & (G_GUINT64_CONSTANT(1) << i)) + g_byte_array_append(priv->channels, (const guint8 *)&i, 1); } } diff --git a/src/fw_iso_rx_multiple.h b/src/fw_iso_rx_multiple.h index f258e0a..80a577c 100644 --- a/src/fw_iso_rx_multiple.h +++ b/src/fw_iso_rx_multiple.h @@ -9,10 +9,10 @@ G_BEGIN_DECLS #define HINOKO_TYPE_FW_ISO_RX_MULTIPLE (hinoko_fw_iso_rx_multiple_get_type()) G_DECLARE_DERIVABLE_TYPE(HinokoFwIsoRxMultiple, hinoko_fw_iso_rx_multiple, HINOKO, - FW_ISO_RX_MULTIPLE, HinokoFwIsoCtx); + FW_ISO_RX_MULTIPLE, GObject); struct _HinokoFwIsoRxMultipleClass { - HinokoFwIsoCtxClass parent_class; + GObjectClass parent_class; /** * HinokoFwIsoRxMultipleClass::interrupted: diff --git a/src/fw_iso_rx_single.c b/src/fw_iso_rx_single.c index d2161e8..bdbc4ea 100644 --- a/src/fw_iso_rx_single.c +++ b/src/fw_iso_rx_single.c @@ -20,9 +20,11 @@ typedef struct { const struct fw_cdev_event_iso_interrupt *ev; } HinokoFwIsoRxSinglePrivate; -static void fw_iso_ctx_class_init(HinokoFwIsoCtxClass *parent_class); +static void fw_iso_ctx_iface_init(HinokoFwIsoCtxInterface *iface); -G_DEFINE_TYPE_WITH_PRIVATE(HinokoFwIsoRxSingle, hinoko_fw_iso_rx_single, HINOKO_TYPE_FW_ISO_CTX) +G_DEFINE_TYPE_WITH_CODE(HinokoFwIsoRxSingle, hinoko_fw_iso_rx_single, G_TYPE_OBJECT, + G_ADD_PRIVATE(HinokoFwIsoRxSingle) + G_IMPLEMENT_INTERFACE(HINOKO_TYPE_FW_ISO_CTX, fw_iso_ctx_iface_init)) enum fw_iso_rx_single_sig_type { FW_ISO_RX_SINGLE_SIG_TYPE_IRQ = 1, @@ -50,13 +52,11 @@ static void fw_iso_rx_single_finalize(GObject *obj) static void hinoko_fw_iso_rx_single_class_init(HinokoFwIsoRxSingleClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); - HinokoFwIsoCtxClass *parent_class = HINOKO_FW_ISO_CTX_CLASS(klass); gobject_class->get_property = fw_iso_rx_single_get_property; gobject_class->finalize = fw_iso_rx_single_finalize; fw_iso_ctx_class_override_properties(gobject_class); - fw_iso_ctx_class_init(parent_class); /** * HinokoFwIsoRxSingle::interrupted: @@ -191,12 +191,12 @@ gboolean fw_iso_rx_single_create_source(HinokoFwIsoCtx *inst, GSource **source, source, error); } -static void fw_iso_ctx_class_init(HinokoFwIsoCtxClass *parent_class) +static void fw_iso_ctx_iface_init(HinokoFwIsoCtxInterface *iface) { - parent_class->stop = fw_iso_rx_single_stop; - parent_class->get_cycle_timer = fw_iso_rx_single_get_cycle_timer; - parent_class->flush_completions = fw_iso_rx_single_flush_completions; - parent_class->create_source = fw_iso_rx_single_create_source; + iface->stop = fw_iso_rx_single_stop; + iface->get_cycle_timer = fw_iso_rx_single_get_cycle_timer; + iface->flush_completions = fw_iso_rx_single_flush_completions; + iface->create_source = fw_iso_rx_single_create_source; } /** @@ -355,7 +355,6 @@ void hinoko_fw_iso_rx_single_start(HinokoFwIsoRxSingle *self, const guint16 *cyc (void)fw_iso_ctx_state_start(&priv->state, cycle_match, sync, tags, error); } - /** * hinoko_fw_iso_rx_single_get_payload: * @self: A [class@FwIsoRxSingle]. diff --git a/src/fw_iso_rx_single.h b/src/fw_iso_rx_single.h index ad28cdb..0eb497e 100644 --- a/src/fw_iso_rx_single.h +++ b/src/fw_iso_rx_single.h @@ -9,10 +9,10 @@ G_BEGIN_DECLS #define HINOKO_TYPE_FW_ISO_RX_SINGLE (hinoko_fw_iso_rx_single_get_type()) G_DECLARE_DERIVABLE_TYPE(HinokoFwIsoRxSingle, hinoko_fw_iso_rx_single, HINOKO, FW_ISO_RX_SINGLE, - HinokoFwIsoCtx); + GObject); struct _HinokoFwIsoRxSingleClass { - HinokoFwIsoCtxClass parent_class; + GObjectClass parent_class; /** * HinokoFwIsoRxSingleClass::interrupted: diff --git a/src/fw_iso_tx.c b/src/fw_iso_tx.c index 657fed9..0c3bd9f 100644 --- a/src/fw_iso_tx.c +++ b/src/fw_iso_tx.c @@ -14,9 +14,11 @@ typedef struct { guint offset; } HinokoFwIsoTxPrivate; -static void fw_iso_ctx_class_init(HinokoFwIsoCtxClass *parent_class); +static void fw_iso_ctx_iface_init(HinokoFwIsoCtxInterface *iface); -G_DEFINE_TYPE_WITH_PRIVATE(HinokoFwIsoTx, hinoko_fw_iso_tx, HINOKO_TYPE_FW_ISO_CTX) +G_DEFINE_TYPE_WITH_CODE(HinokoFwIsoTx, hinoko_fw_iso_tx, G_TYPE_OBJECT, + G_ADD_PRIVATE(HinokoFwIsoTx) + G_IMPLEMENT_INTERFACE(HINOKO_TYPE_FW_ISO_CTX, fw_iso_ctx_iface_init)) enum fw_iso_tx_sig_type { FW_ISO_TX_SIG_TYPE_IRQ = 1, @@ -44,13 +46,11 @@ static void fw_iso_tx_finalize(GObject *obj) static void hinoko_fw_iso_tx_class_init(HinokoFwIsoTxClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); - HinokoFwIsoCtxClass *parent_class = HINOKO_FW_ISO_CTX_CLASS(klass); gobject_class->get_property = fw_iso_tx_get_property; gobject_class->finalize = fw_iso_tx_finalize; fw_iso_ctx_class_override_properties(gobject_class); - fw_iso_ctx_class_init(parent_class); /** * HinokoFwIsoTx::interrupted: @@ -173,12 +173,12 @@ gboolean fw_iso_tx_create_source(HinokoFwIsoCtx *inst, GSource **source, GError error); } -static void fw_iso_ctx_class_init(HinokoFwIsoCtxClass *parent_class) +static void fw_iso_ctx_iface_init(HinokoFwIsoCtxInterface *iface) { - parent_class->stop = fw_iso_tx_stop; - parent_class->get_cycle_timer = fw_iso_tx_get_cycle_timer; - parent_class->flush_completions = fw_iso_tx_flush_completions; - parent_class->create_source = fw_iso_tx_create_source; + iface->stop = fw_iso_tx_stop; + iface->get_cycle_timer = fw_iso_tx_get_cycle_timer; + iface->flush_completions = fw_iso_tx_flush_completions; + iface->create_source = fw_iso_tx_create_source; } /** diff --git a/src/fw_iso_tx.h b/src/fw_iso_tx.h index e442b73..06793e7 100644 --- a/src/fw_iso_tx.h +++ b/src/fw_iso_tx.h @@ -8,10 +8,10 @@ G_BEGIN_DECLS #define HINOKO_TYPE_FW_ISO_TX (hinoko_fw_iso_tx_get_type()) -G_DECLARE_DERIVABLE_TYPE(HinokoFwIsoTx, hinoko_fw_iso_tx, HINOKO, FW_ISO_TX, HinokoFwIsoCtx); +G_DECLARE_DERIVABLE_TYPE(HinokoFwIsoTx, hinoko_fw_iso_tx, HINOKO, FW_ISO_TX, GObject); struct _HinokoFwIsoTxClass { - HinokoFwIsoCtxClass parent_class; + GObjectClass parent_class; /** * HinokoFwIsoTxClass::interrupted: diff --git a/src/hinoko.map b/src/hinoko.map index 2b60ace..05f3fc7 100644 --- a/src/hinoko.map +++ b/src/hinoko.map @@ -4,11 +4,9 @@ HINOKO_0_1_0 { "hinoko_fw_scode_get_type"; "hinoko_fw_iso_ctx_match_flag_get_type"; - "hinoko_fw_iso_ctx_get_type"; "hinoko_fw_iso_ctx_get_cycle_timer"; "hinoko_fw_iso_ctx_create_source"; - "hinoko_fw_iso_rx_single_get_type"; "hinoko_fw_iso_rx_single_new"; "hinoko_fw_iso_rx_single_allocate"; "hinoko_fw_iso_rx_single_release"; @@ -16,7 +14,6 @@ HINOKO_0_1_0 { "hinoko_fw_iso_rx_single_unmap_buffer"; "hinoko_fw_iso_rx_single_get_payload"; - "hinoko_fw_iso_rx_multiple_get_type"; "hinoko_fw_iso_rx_multiple_new"; "hinoko_fw_iso_rx_multiple_allocate"; "hinoko_fw_iso_rx_multiple_release"; @@ -25,7 +22,6 @@ HINOKO_0_1_0 { "hinoko_fw_iso_rx_multiple_start"; "hinoko_fw_iso_rx_multiple_get_payload"; - "hinoko_fw_iso_tx_get_type"; "hinoko_fw_iso_tx_new"; "hinoko_fw_iso_tx_allocate"; "hinoko_fw_iso_tx_release"; @@ -78,8 +74,13 @@ HINOKO_0_6_0 { HINOKO_0_7_0 { global: + "hinoko_fw_iso_ctx_get_type"; "hinoko_fw_iso_ctx_stop"; + "hinoko_fw_iso_rx_single_get_type"; + "hinoko_fw_iso_rx_multiple_get_type"; + "hinoko_fw_iso_tx_get_type"; + "hinoko_fw_iso_resource_get_type"; "hinoko_fw_iso_resource_open"; "hinoko_fw_iso_resource_create_source"; diff --git a/src/hinoko_enum_types.h b/src/hinoko_enum_types.h index 69437f4..742cf4a 100644 --- a/src/hinoko_enum_types.h +++ b/src/hinoko_enum_types.h @@ -105,7 +105,7 @@ typedef enum { * @HINOKO_FW_ISO_CTX_ERROR_CHUNK_UNREGISTERED: No chunk registered before starting. * @HINOKO_FW_ISO_CTX_ERROR_NO_ISOC_CHANNEL: No isochronous channel is available. * - * A set of error code for [class@FwIsoCtx]. + * A set of error code for [iface@FwIsoCtx]. */ typedef enum { HINOKO_FW_ISO_CTX_ERROR_FAILED, diff --git a/tests/fw-iso-ctx b/tests/fw-iso-ctx deleted file mode 100755 index 4178991..0000000 --- a/tests/fw-iso-ctx +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python3 - -from sys import exit -from errno import ENXIO - -from helper import test - -import gi -gi.require_version('Hinoko', '0.0') -from gi.repository import Hinoko - -target = Hinoko.FwIsoCtx -props = ( - 'bytes-per-chunk', - 'chunks-per-buffer', - 'registered-chunk-count', -) -methods = ( - 'get_cycle_timer', - 'create_source', - 'flush_completions', -) -vmethods = ( - 'do_stopped', -) -signals = ( - 'stopped', -) - -if not test(target, props, methods, vmethods, signals): - exit(ENXIO) diff --git a/tests/meson.build b/tests/meson.build index 68c2eb3..0ca132f 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1,6 +1,5 @@ tests = [ 'hinoko-enum', - 'fw-iso-ctx', 'fw-iso-rx-single', 'fw-iso-rx-multiple', 'fw-iso-tx', |