diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2022-05-25 16:27:19 +0900 |
---|---|---|
committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2022-05-25 16:27:19 +0900 |
commit | 054bd5ebb38862f0ce4c74bbe2c37e77f3c60f2a (patch) | |
tree | a3584c7144056d9f70b686a4bfed28bf6050fa62 | |
parent | 02988c209f10a4b4de95bac4d2df55882309c665 (diff) | |
download | libhinoko-054bd5ebb38862f0ce4c74bbe2c37e77f3c60f2a.tar.gz |
fw_iso_ctx: fulfill annotation for vfunc and property
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r-- | src/fw_iso_ctx.c | 16 | ||||
-rw-r--r-- | src/fw_iso_ctx.h | 67 |
2 files changed, 83 insertions, 0 deletions
diff --git a/src/fw_iso_ctx.c b/src/fw_iso_ctx.c index 44a824b..5a74819 100644 --- a/src/fw_iso_ctx.c +++ b/src/fw_iso_ctx.c @@ -25,12 +25,26 @@ G_DEFINE_QUARK(hinoko-fw-iso-ctx-error-quark, hinoko_fw_iso_ctx_error) static void hinoko_fw_iso_ctx_default_init(HinokoFwIsoCtxInterface *iface) { + /** + * HinokoFwIsoCtx:bytes-per-chunk: + * + * The number of bytes per chunk in buffer. + * + * Since: 0.7. + */ 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)); + /** + * HinokoFwIsoCtx:chunks-per-buffer: + * + * The number of chunks per buffer. + * + * Since: 0.7. + */ g_object_interface_install_property(iface, g_param_spec_uint(CHUNKS_PER_BUFFER_PROP_NAME, "chunks-per-buffer", "The number of chunks in buffer.", @@ -43,6 +57,8 @@ static void hinoko_fw_iso_ctx_default_init(HinokoFwIsoCtxInterface *iface) * @error: (transfer none) (nullable) (in): A [struct@GLib.Error]. * * Emitted when isochronous context is stopped. + * + * Since: 0.7. */ g_signal_new(STOPPED_SIGNAL_NAME, G_TYPE_FROM_INTERFACE(iface), diff --git a/src/fw_iso_ctx.h b/src/fw_iso_ctx.h index 10294e3..b3b3fc8 100644 --- a/src/fw_iso_ctx.h +++ b/src/fw_iso_ctx.h @@ -17,17 +17,84 @@ GQuark hinoko_fw_iso_ctx_error_quark(); struct _HinokoFwIsoCtxInterface { GTypeInterface parent_iface; + /** + * HinokoFwIsoCtxInterface::stop: + * @self: A [iface@FwIsoCtx]. + * + * Virtual function to stop isochronous context. + * + * Since: 0.7. + */ void (*stop)(HinokoFwIsoCtx *self); + /** + *HinokoFwIsoCtxInterface::unmap_buffer: + * @self: A [iface@FwIsoCtx]. + * + * Virtual function to unmap intermediate buffer shared with 1394 OHCI controller for the + * context. + * + * Since: 0.7. + */ void (*unmap_buffer)(HinokoFwIsoCtx *self); + /** + * HinokoFwIsoCtxInterface::release: + * @self: A [iface@FwIsoCtx]. + * + * Virtual function to release the contest from 1394 OHCI controller. + * + * Since: 0.7. + */ void (*release)(HinokoFwIsoCtx *self); + /** + * HinokoFwIsoCtxInterface::get_cycle_timer: + * @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. + * @error: A [struct@GLib.Error]. + * + * Virtual function to tetrieve the value of cycle timer register. This method call is + * available once any isochronous context is created. + * + * Returns: TRUE if the overall operation finishes successfully, otherwise FALSE. + * + * Since: 0.7. + */ gboolean (*get_cycle_timer)(HinokoFwIsoCtx *self, gint clock_id, HinokoCycleTimer *const *cycle_timer, GError **error); + /** + * HinokoFwIsoCtxInterface::flush_completions: + * @self: A [iface@FwIsoCtx]. + * @error: A [struct@GLib.Error]. + * + * Virtual function to flush isochronous context until recent isochronous cycle. The call + * of function forces the context to queue any type of interrupt event for the recent + * isochronous cycle. Application can process the content of isochronous packet without + * waiting for actual hardware interrupt. + * + * Returns: TRUE if the overall operation finishes successfully, otherwise FALSE. + * + * Since: 0.7. + */ gboolean (*flush_completions)(HinokoFwIsoCtx *self, GError **error); + /** + * HinokoFwIsoCtxInterface::create_source: + * @self: A [iface@FwIsoCtx]. + * @source: (out): A [struct@GLib.Source]. + * @error: A [struct@GLib.Error]. + * + * Virtual function to create [struct@GLib.Source] for [struct@GLib.MainContext] to + * dispatch events for isochronous context. + * + * Returns: TRUE if the overall operation finishes successfully, otherwise FALSE. + * + * Since: 0.7. + */ gboolean (*create_source)(HinokoFwIsoCtx *self, GSource **source, GError **error); /** |