aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2023-10-30 23:06:19 +0900
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>2023-10-30 23:06:19 +0900
commitfc0cb5d64c19f5325b400613b5fd7e772a7f676e (patch)
tree476bcb8d09f2e5473f8c498b755835effc2b6adf
parent778c19021f8eb15e3d8f8e605dad8fab636b3aef (diff)
downloadhinoko-rs-fc0cb5d64c19f5325b400613b5fd7e772a7f676e.tar.gz
hinoko: regenerate API crate
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r--README.rst2
-rw-r--r--hinoko/Cargo.toml2
-rw-r--r--hinoko/README.md2
-rw-r--r--hinoko/examples/fw-iso-resource.rs8
-rw-r--r--hinoko/src/auto/enums.rs6
-rw-r--r--hinoko/src/auto/fw_iso_ctx.rs10
-rw-r--r--hinoko/src/auto/fw_iso_ir_multiple.rs13
-rw-r--r--hinoko/src/auto/fw_iso_ir_single.rs13
-rw-r--r--hinoko/src/auto/fw_iso_it.rs8
-rw-r--r--hinoko/src/auto/fw_iso_resource.rs26
-rw-r--r--hinoko/src/auto/fw_iso_resource_auto.rs18
-rw-r--r--hinoko/src/auto/fw_iso_resource_once.rs18
-rw-r--r--hinoko/src/fw_iso_ctx.rs6
-rw-r--r--hinoko/src/fw_iso_ir_single.rs2
-rw-r--r--hinoko/src/fw_iso_it.rs2
-rw-r--r--hinoko/src/subclass/fw_iso_ctx.rs2
-rw-r--r--hinoko/src/subclass/fw_iso_resource.rs18
17 files changed, 77 insertions, 79 deletions
diff --git a/README.rst b/README.rst
index 17d122f..26e0f0d 100644
--- a/README.rst
+++ b/README.rst
@@ -50,7 +50,7 @@ Dependencies
* ``libc`` >= 0.2
* ``bitflags`` >= 1.0
* ``glib`` >= 0.15
- * ``hinawa`` >= 0.8
+ * ``hinawa`` >= 0.9
* FFI crate (``hinoko-sys``)
Examples
diff --git a/hinoko/Cargo.toml b/hinoko/Cargo.toml
index a609222..b99fb6b 100644
--- a/hinoko/Cargo.toml
+++ b/hinoko/Cargo.toml
@@ -22,7 +22,7 @@ name = "hinoko"
libc = "0.2"
bitflags = "1.0"
glib = "0.15"
-hinawa = "0.8.0"
+hinawa = "0.9"
ffi = {package = "hinoko-sys", path = "sys", version = "0.3.0"}
[dev-dependencies]
diff --git a/hinoko/README.md b/hinoko/README.md
index 565e857..6536fbc 100644
--- a/hinoko/README.md
+++ b/hinoko/README.md
@@ -1,7 +1,7 @@
# hinoko crate
Rust API bindings and wrappers for
-[hinoko library](https://git.kernel.org/pub/scm/libs/ieee1394/libhinoko.git/) to operate OHCI 1394
+[hinoko library](https://git.kernel.org/pub/scm/libs/ieee1394/libhinoko.git/) to operate 1394 OHCI
hardware via Linux FireWire character device for isochronous communication in IEEE 1394 bus.
The hinoko library version 1.0 is the minimum supported version for underlying library.
diff --git a/hinoko/examples/fw-iso-resource.rs b/hinoko/examples/fw-iso-resource.rs
index 08886ba..106238e 100644
--- a/hinoko/examples/fw-iso-resource.rs
+++ b/hinoko/examples/fw-iso-resource.rs
@@ -43,9 +43,9 @@ fn main() {
let bandwidth = FwIsoResource::calculate_bandwidth(120, FwScode::S400);
- res.allocate_sync(&[CHANNEL.into()], bandwidth, TIMEOUT)
+ res.allocate_wait(&[CHANNEL.into()], bandwidth, TIMEOUT)
.unwrap();
- res.deallocate_sync(CHANNEL.into(), bandwidth, TIMEOUT)
+ res.deallocate_wait(CHANNEL.into(), bandwidth, TIMEOUT)
.unwrap();
src.destroy();
@@ -62,8 +62,8 @@ fn main() {
let src = res.create_source().unwrap();
let (dispatcher_cntr, th) = launch_dispatcher(&src);
- res.allocate_sync(&[CHANNEL], bandwidth, TIMEOUT).unwrap();
- res.deallocate_sync(TIMEOUT).unwrap();
+ res.allocate_wait(&[CHANNEL], bandwidth, TIMEOUT).unwrap();
+ res.deallocate_wait(TIMEOUT).unwrap();
src.destroy();
dispatcher_cntr.quit();
diff --git a/hinoko/src/auto/enums.rs b/hinoko/src/auto/enums.rs
index b2f7872..0be3b3b 100644
--- a/hinoko/src/auto/enums.rs
+++ b/hinoko/src/auto/enums.rs
@@ -12,7 +12,7 @@ use glib::StaticType;
use glib::Type;
use std::fmt;
-/// A set of error code for [`FwIsoCtx`][crate::FwIsoCtx].
+/// A set of error code for operations in [`FwIsoCtx`][crate::FwIsoCtx].
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HinokoFwIsoCtxError")]
@@ -241,7 +241,7 @@ impl ToValue for FwIsoCtxMode {
}
}
-/// A set of error code for [`FwIsoResourceAuto`][crate::FwIsoResourceAuto].
+/// A set of error code for operations in [`FwIsoResourceAuto`][crate::FwIsoResourceAuto].
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HinokoFwIsoResourceAutoError")]
@@ -351,7 +351,7 @@ impl ToValue for FwIsoResourceAutoError {
}
}
-/// A set of error code for [`FwIsoResource`][crate::FwIsoResource].
+/// A set of error code for operations in [`FwIsoResource`][crate::FwIsoResource].
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "HinokoFwIsoResourceError")]
diff --git a/hinoko/src/auto/fw_iso_ctx.rs b/hinoko/src/auto/fw_iso_ctx.rs
index 5b8d451..ce47d7b 100644
--- a/hinoko/src/auto/fw_iso_ctx.rs
+++ b/hinoko/src/auto/fw_iso_ctx.rs
@@ -15,10 +15,10 @@ use std::mem::transmute;
use std::ptr;
glib::wrapper! {
- /// An basic interface to operate isochronous context on 1394 OHCI controller.
+ /// A set of basic interfaces to operate isochronous context on 1394 OHCI hardware.
///
- /// A [`FwIsoCtx`][crate::FwIsoCtx] is an basic interface to use UAPI of Linux FireWire subsystem to operate
- /// 1394 OHCI controller.
+ /// [`FwIsoCtx`][crate::FwIsoCtx] includes interfaces to operate 1394 OHCI hardware for isochronous communication
+ /// by any kind of contexts.
///
/// # Implements
///
@@ -63,7 +63,7 @@ pub trait FwIsoCtxExt: 'static {
#[doc(alias = "hinoko_fw_iso_ctx_flush_completions")]
fn flush_completions(&self) -> Result<(), glib::Error>;
- /// Release the contest from 1394 OHCI controller.
+ /// Release the contest from 1394 OHCI hardware.
#[doc(alias = "hinoko_fw_iso_ctx_release")]
fn release(&self);
@@ -71,7 +71,7 @@ pub trait FwIsoCtxExt: 'static {
#[doc(alias = "hinoko_fw_iso_ctx_stop")]
fn stop(&self);
- /// Unmap intermediate buffer shared with 1394 OHCI controller for the context.
+ /// Unmap intermediate buffer shared with 1394 OHCI hardware for the context.
#[doc(alias = "hinoko_fw_iso_ctx_unmap_buffer")]
fn unmap_buffer(&self);
diff --git a/hinoko/src/auto/fw_iso_ir_multiple.rs b/hinoko/src/auto/fw_iso_ir_multiple.rs
index 2ed3142..11b5105 100644
--- a/hinoko/src/auto/fw_iso_ir_multiple.rs
+++ b/hinoko/src/auto/fw_iso_ir_multiple.rs
@@ -17,8 +17,8 @@ use std::ptr;
glib::wrapper! {
/// An object to receive isochronous packet for several channels.
///
- /// A [`FwIsoIrMultiple`][crate::FwIsoIrMultiple] receives isochronous packets for several channels by IR context for
- /// buffer-fill mode in 1394 OHCI.
+ /// [`FwIsoIrMultiple`][crate::FwIsoIrMultiple] receives isochronous packets for several channels by buffer-fill mode of
+ /// IR context in 1394 OHCI.
///
/// # Implements
///
@@ -57,8 +57,8 @@ impl Default for FwIsoIrMultiple {
///
/// [`FwIsoIrMultiple`][struct@crate::FwIsoIrMultiple]
pub trait FwIsoIrMultipleExt: 'static {
- /// Allocate an IR context to 1394 OHCI controller for buffer-fill mode. A local node of the node
- /// corresponding to the given path is used as the controller, thus any path is accepted as long as
+ /// Allocate an IR context to 1394 OHCI hardware for buffer-fill mode. A local node of the node
+ /// corresponding to the given path is used as the hardware, thus any path is accepted as long as
/// process has enough permission for the path.
/// ## `path`
/// A path to any Linux FireWire character device.
@@ -68,8 +68,7 @@ pub trait FwIsoIrMultipleExt: 'static {
#[doc(alias = "hinoko_fw_iso_ir_multiple_allocate")]
fn allocate(&self, path: &str, channels: &[u8]) -> Result<(), glib::Error>;
- /// Map an intermediate buffer to share payload of IR context with 1394 OHCI
- /// controller.
+ /// Map an intermediate buffer to share payload of IR context with 1394 OHCI hardware.
/// ## `bytes_per_chunk`
/// The maximum number of bytes for payload of isochronous packet (not payload for
/// isochronous context).
@@ -81,7 +80,7 @@ pub trait FwIsoIrMultipleExt: 'static {
/// Emitted when Linux FireWire subsystem generates interrupt event. There are two cases
/// for Linux FireWire subsystem to generate the event:
///
- /// - When OHCI 1394 controller generates hardware interrupt as a result to process the
+ /// - When 1394 OHCI hardware generates hardware interrupt as a result to process the
/// isochronous packet for the buffer chunk marked to generate hardware interrupt.
/// - When application calls [`FwIsoCtxExt::flush_completions()`][crate::prelude::FwIsoCtxExt::flush_completions()] explicitly.
///
diff --git a/hinoko/src/auto/fw_iso_ir_single.rs b/hinoko/src/auto/fw_iso_ir_single.rs
index 72a0135..01c3905 100644
--- a/hinoko/src/auto/fw_iso_ir_single.rs
+++ b/hinoko/src/auto/fw_iso_ir_single.rs
@@ -12,10 +12,9 @@ use std::ptr;
glib::wrapper! {
/// An object to receive isochronous packet for single channel.
///
- /// A [`FwIsoIrSingle`][crate::FwIsoIrSingle] receives isochronous packets for single channel by IR
- /// context for packet-per-buffer mode in 1394 OHCI. The content of packet is
- /// split to two parts; context header and context payload in a manner of Linux
- /// FireWire subsystem.
+ /// [`FwIsoIrSingle`][crate::FwIsoIrSingle] receives isochronous packets for single channel by packet-per-buffer
+ /// mode of IR context in 1394 OHCI. The content of packet is split to two parts; context header and
+ /// context payload in a manner of Linux FireWire subsystem.
///
/// # Implements
///
@@ -54,8 +53,8 @@ impl Default for FwIsoIrSingle {
///
/// [`FwIsoIrSingle`][struct@crate::FwIsoIrSingle]
pub trait FwIsoIrSingleExt: 'static {
- /// Allocate an IR context to 1394 OHCI controller for packet-per-buffer mode. A local node of the
- /// node corresponding to the given path is used as the controller, thus any path is accepted as
+ /// Allocate an IR context to 1394 OHCI hardware for packet-per-buffer mode. A local node of the
+ /// node corresponding to the given path is used as the hardware, thus any path is accepted as
/// long as process has enough permission for the path.
///
/// The header_size parameter has an effect for the content of header parameter in
@@ -76,7 +75,7 @@ pub trait FwIsoIrSingleExt: 'static {
#[doc(alias = "hinoko_fw_iso_ir_single_allocate")]
fn allocate(&self, path: &str, channel: u32, header_size: u32) -> Result<(), glib::Error>;
- /// Map intermediate buffer to share payload of IR context with 1394 OHCI controller.
+ /// Map intermediate buffer to share payload of IR context with 1394 OHCI hardware.
/// ## `maximum_bytes_per_payload`
/// The maximum number of bytes per payload of IR context.
/// ## `payloads_per_buffer`
diff --git a/hinoko/src/auto/fw_iso_it.rs b/hinoko/src/auto/fw_iso_it.rs
index 5ef64c4..05668c8 100644
--- a/hinoko/src/auto/fw_iso_it.rs
+++ b/hinoko/src/auto/fw_iso_it.rs
@@ -13,7 +13,7 @@ use std::ptr;
glib::wrapper! {
/// An object to transmit isochronous packet for single channel.
///
- /// A [`FwIsoIt`][crate::FwIsoIt] transmits isochronous packets for single channel by IT context in 1394 OHCI.
+ /// [`FwIsoIt`][crate::FwIsoIt] transmits isochronous packets for single channel by IT context in 1394 OHCI.
/// The content of packet is split to two parts; context header and context payload in a manner of
/// Linux FireWire subsystem.
///
@@ -54,8 +54,8 @@ impl Default for FwIsoIt {
///
/// [`FwIsoIt`][struct@crate::FwIsoIt]
pub trait FwIsoItExt: 'static {
- /// Allocate an IT context to 1394 OHCI controller. A local node of the node corresponding to the
- /// given path is used as the controller, thus any path is accepted as long as process has enough
+ /// Allocate an IT context to 1394 OHCI hardware. A local node of the node corresponding to the
+ /// given path is used as the hardware, thus any path is accepted as long as process has enough
/// permission for the path.
/// ## `path`
/// A path to any Linux FireWire character device.
@@ -78,7 +78,7 @@ pub trait FwIsoItExt: 'static {
header_size: u32,
) -> Result<(), glib::Error>;
- /// Map intermediate buffer to share payload of IT context with 1394 OHCI controller.
+ /// Map intermediate buffer to share payload of IT context with 1394 OHCI hardware.
/// ## `maximum_bytes_per_payload`
/// The number of bytes for payload of IT context.
/// ## `payloads_per_buffer`
diff --git a/hinoko/src/auto/fw_iso_resource.rs b/hinoko/src/auto/fw_iso_resource.rs
index e140a4b..a12ecbf 100644
--- a/hinoko/src/auto/fw_iso_resource.rs
+++ b/hinoko/src/auto/fw_iso_resource.rs
@@ -16,10 +16,10 @@ use std::mem::transmute;
use std::ptr;
glib::wrapper! {
- /// An interface object to listen events of isochronous resource allocation and deallocation.
+ /// A set of basic interfaces to listen to events about isochronous resource.
///
- /// The [`FwIsoResource`][crate::FwIsoResource] should be implemented in GObject-derived object to listen events of
- /// isochronous resource allocation and deallocation.
+ /// [`FwIsoResource`][crate::FwIsoResource] includes interfaces to listen to events about allocation and
+ /// deallocation of isochronous resource.
///
/// # Implements
///
@@ -71,8 +71,8 @@ pub trait FwIsoResourceExt: 'static {
/// # Returns
///
/// TRUE if the overall operation finishes successfully, otherwise FALSE.
- #[doc(alias = "hinoko_fw_iso_resource_allocate_async")]
- fn allocate_async(&self, channel_candidates: &[u8], bandwidth: u32) -> Result<(), glib::Error>;
+ #[doc(alias = "hinoko_fw_iso_resource_allocate")]
+ fn allocate(&self, channel_candidates: &[u8], bandwidth: u32) -> Result<(), glib::Error>;
/// Initiate allocation of isochronous resource and wait for `signal::FwIsoResource::allocated`
/// signal. One of the candidates is actually allocated for channel.
@@ -87,8 +87,8 @@ pub trait FwIsoResourceExt: 'static {
/// # Returns
///
/// TRUE if the overall operation finishes successfully, otherwise FALSE.
- #[doc(alias = "hinoko_fw_iso_resource_allocate_sync")]
- fn allocate_sync(
+ #[doc(alias = "hinoko_fw_iso_resource_allocate_wait")]
+ fn allocate_wait(
&self,
channel_candidates: &[u8],
bandwidth: u32,
@@ -130,7 +130,7 @@ pub trait FwIsoResourceExt: 'static {
/// The deallocated amount of bandwidth.
/// ## `error`
/// A [`glib::Error`][crate::glib::Error]. Error can be generated
- /// with domain of Hinoko.FwIsoResourceError and its EVENT code.
+ /// with domain of [`FwIsoResourceError`][crate::FwIsoResourceError] and its EVENT code.
#[doc(alias = "allocated")]
fn connect_allocated<F: Fn(&Self, u32, u32, Option<&glib::Error>) + 'static>(
&self,
@@ -146,7 +146,7 @@ pub trait FwIsoResourceExt: 'static {
/// The deallocated amount of bandwidth.
/// ## `error`
/// A [`glib::Error`][crate::glib::Error]. Error can be generated
- /// with domain of Hinoko.FwIsoResourceError and its EVENT code.
+ /// with domain of [`FwIsoResourceError`][crate::FwIsoResourceError] and its EVENT code.
#[doc(alias = "deallocated")]
fn connect_deallocated<F: Fn(&Self, u32, u32, Option<&glib::Error>) + 'static>(
&self,
@@ -160,11 +160,11 @@ pub trait FwIsoResourceExt: 'static {
}
impl<O: IsA<FwIsoResource>> FwIsoResourceExt for O {
- fn allocate_async(&self, channel_candidates: &[u8], bandwidth: u32) -> Result<(), glib::Error> {
+ fn allocate(&self, channel_candidates: &[u8], bandwidth: u32) -> Result<(), glib::Error> {
let channel_candidates_count = channel_candidates.len() as usize;
unsafe {
let mut error = ptr::null_mut();
- let is_ok = ffi::hinoko_fw_iso_resource_allocate_async(
+ let is_ok = ffi::hinoko_fw_iso_resource_allocate(
self.as_ref().to_glib_none().0,
channel_candidates.to_glib_none().0,
channel_candidates_count,
@@ -180,7 +180,7 @@ impl<O: IsA<FwIsoResource>> FwIsoResourceExt for O {
}
}
- fn allocate_sync(
+ fn allocate_wait(
&self,
channel_candidates: &[u8],
bandwidth: u32,
@@ -189,7 +189,7 @@ impl<O: IsA<FwIsoResource>> FwIsoResourceExt for O {
let channel_candidates_count = channel_candidates.len() as usize;
unsafe {
let mut error = ptr::null_mut();
- let is_ok = ffi::hinoko_fw_iso_resource_allocate_sync(
+ let is_ok = ffi::hinoko_fw_iso_resource_allocate_wait(
self.as_ref().to_glib_none().0,
channel_candidates.to_glib_none().0,
channel_candidates_count,
diff --git a/hinoko/src/auto/fw_iso_resource_auto.rs b/hinoko/src/auto/fw_iso_resource_auto.rs
index 9d5ba29..b5a708b 100644
--- a/hinoko/src/auto/fw_iso_resource_auto.rs
+++ b/hinoko/src/auto/fw_iso_resource_auto.rs
@@ -17,7 +17,7 @@ use std::ptr;
glib::wrapper! {
/// An object to maintain allocated isochronous resource.
///
- /// A [`FwIsoResourceAuto`][crate::FwIsoResourceAuto]is an object to maintain isochronous resource during the lifetime of
+ /// [`FwIsoResourceAuto`][crate::FwIsoResourceAuto]is an object to maintain isochronous resource during the lifetime of
/// the object. The allocated isochronous resource is kept even if the generation of the bus
/// updates. The maintenance of allocated isochronous resource is done by Linux FireWire subsystem.
///
@@ -64,8 +64,8 @@ pub trait FwIsoResourceAutoExt: 'static {
/// # Returns
///
/// TRUE if the overall operation finished successfully, otherwise FALSE.
- #[doc(alias = "hinoko_fw_iso_resource_auto_deallocate_async")]
- fn deallocate_async(&self) -> Result<(), glib::Error>;
+ #[doc(alias = "hinoko_fw_iso_resource_auto_deallocate")]
+ fn deallocate(&self) -> Result<(), glib::Error>;
/// Initiate deallocation of isochronous resource. When the deallocation is done,
/// `signal::FwIsoResource::deallocated` signal is emit to notify the result, channel, and bandwidth.
@@ -75,8 +75,8 @@ pub trait FwIsoResourceAutoExt: 'static {
/// # Returns
///
/// TRUE if the overall operation finished successfully, otherwise FALSE.
- #[doc(alias = "hinoko_fw_iso_resource_auto_deallocate_sync")]
- fn deallocate_sync(&self, timeout_ms: u32) -> Result<(), glib::Error>;
+ #[doc(alias = "hinoko_fw_iso_resource_auto_deallocate_wait")]
+ fn deallocate_wait(&self, timeout_ms: u32) -> Result<(), glib::Error>;
/// The allocated amount of bandwidth.
fn bandwidth(&self) -> u32;
@@ -99,10 +99,10 @@ pub trait FwIsoResourceAutoExt: 'static {
}
impl<O: IsA<FwIsoResourceAuto>> FwIsoResourceAutoExt for O {
- fn deallocate_async(&self) -> Result<(), glib::Error> {
+ fn deallocate(&self) -> Result<(), glib::Error> {
unsafe {
let mut error = ptr::null_mut();
- let is_ok = ffi::hinoko_fw_iso_resource_auto_deallocate_async(
+ let is_ok = ffi::hinoko_fw_iso_resource_auto_deallocate(
self.as_ref().to_glib_none().0,
&mut error,
);
@@ -115,10 +115,10 @@ impl<O: IsA<FwIsoResourceAuto>> FwIsoResourceAutoExt for O {
}
}
- fn deallocate_sync(&self, timeout_ms: u32) -> Result<(), glib::Error> {
+ fn deallocate_wait(&self, timeout_ms: u32) -> Result<(), glib::Error> {
unsafe {
let mut error = ptr::null_mut();
- let is_ok = ffi::hinoko_fw_iso_resource_auto_deallocate_sync(
+ let is_ok = ffi::hinoko_fw_iso_resource_auto_deallocate_wait(
self.as_ref().to_glib_none().0,
timeout_ms,
&mut error,
diff --git a/hinoko/src/auto/fw_iso_resource_once.rs b/hinoko/src/auto/fw_iso_resource_once.rs
index 325ba34..e47459b 100644
--- a/hinoko/src/auto/fw_iso_resource_once.rs
+++ b/hinoko/src/auto/fw_iso_resource_once.rs
@@ -11,8 +11,8 @@ use std::ptr;
glib::wrapper! {
/// An object to initiate requests and listen events of isochronous resource allocation/deallocation
- ///
/// by one shot.
+ ///
/// The [`FwIsoResourceOnce`][crate::FwIsoResourceOnce] is an object to initiate requests and listen events of isochronous
/// resource allocation/deallocation by file descriptor owned internally. The allocated resource
/// is left even if this object is destroyed, thus application is responsible for deallocation.
@@ -67,8 +67,8 @@ pub trait FwIsoResourceOnceExt: 'static {
/// # Returns
///
/// TRUE if the overall operation finishes successfully, otherwise FALSE.
- #[doc(alias = "hinoko_fw_iso_resource_once_deallocate_async")]
- fn deallocate_async(&self, channel: u32, bandwidth: u32) -> Result<(), glib::Error>;
+ #[doc(alias = "hinoko_fw_iso_resource_once_deallocate")]
+ fn deallocate(&self, channel: u32, bandwidth: u32) -> Result<(), glib::Error>;
/// Initiate deallocation of isochronous resource and wait for `signal::FwIsoResource::deallocated`
/// signal.
@@ -82,8 +82,8 @@ pub trait FwIsoResourceOnceExt: 'static {
/// # Returns
///
/// TRUE if the overall operation finishes successfully, otherwise FALSE.
- #[doc(alias = "hinoko_fw_iso_resource_once_deallocate_sync")]
- fn deallocate_sync(
+ #[doc(alias = "hinoko_fw_iso_resource_once_deallocate_wait")]
+ fn deallocate_wait(
&self,
channel: u32,
bandwidth: u32,
@@ -92,10 +92,10 @@ pub trait FwIsoResourceOnceExt: 'static {
}
impl<O: IsA<FwIsoResourceOnce>> FwIsoResourceOnceExt for O {
- fn deallocate_async(&self, channel: u32, bandwidth: u32) -> Result<(), glib::Error> {
+ fn deallocate(&self, channel: u32, bandwidth: u32) -> Result<(), glib::Error> {
unsafe {
let mut error = ptr::null_mut();
- let is_ok = ffi::hinoko_fw_iso_resource_once_deallocate_async(
+ let is_ok = ffi::hinoko_fw_iso_resource_once_deallocate(
self.as_ref().to_glib_none().0,
channel,
bandwidth,
@@ -110,7 +110,7 @@ impl<O: IsA<FwIsoResourceOnce>> FwIsoResourceOnceExt for O {
}
}
- fn deallocate_sync(
+ fn deallocate_wait(
&self,
channel: u32,
bandwidth: u32,
@@ -118,7 +118,7 @@ impl<O: IsA<FwIsoResourceOnce>> FwIsoResourceOnceExt for O {
) -> Result<(), glib::Error> {
unsafe {
let mut error = ptr::null_mut();
- let is_ok = ffi::hinoko_fw_iso_resource_once_deallocate_sync(
+ let is_ok = ffi::hinoko_fw_iso_resource_once_deallocate_wait(
self.as_ref().to_glib_none().0,
channel,
bandwidth,
diff --git a/hinoko/src/fw_iso_ctx.rs b/hinoko/src/fw_iso_ctx.rs
index f341373..41b98d8 100644
--- a/hinoko/src/fw_iso_ctx.rs
+++ b/hinoko/src/fw_iso_ctx.rs
@@ -7,13 +7,13 @@ use crate::*;
///
/// [`FwIsoCtx`][struct@crate::FwIsoCtx], [`FwIsoIrMultiple`][struct@crate::FwIsoIrMultiple], [`FwIsoIrSingle`][struct@crate::FwIsoIrSingle], [`FwIsoIt`][struct@crate::FwIsoIt]
pub trait FwIsoCtxExtManual {
- /// Retrieve the value of cycle timer register. This method call is available
- /// once any isochronous context is created.
+ /// Retrieve the value of cycle time register. This method call is available once any isochronous
+ /// context is created.
/// ## `clock_id`
/// The numeric ID of clock source for the reference timestamp. One CLOCK_REALTIME(0),
/// CLOCK_MONOTONIC(1), and CLOCK_MONOTONIC_RAW(4) is available in UAPI of Linux kernel.
/// ## `cycle_time`
- /// A [`hinawa::CycleTime`][hinawa::CycleTime] to store data of cycle timer.
+ /// A [`hinawa::CycleTime`][hinawa::CycleTime] to store data of cycle time.
///
/// # Returns
///
diff --git a/hinoko/src/fw_iso_ir_single.rs b/hinoko/src/fw_iso_ir_single.rs
index 700c4a8..b050270 100644
--- a/hinoko/src/fw_iso_ir_single.rs
+++ b/hinoko/src/fw_iso_ir_single.rs
@@ -47,7 +47,7 @@ pub trait FwIsoIrSingleExtManual {
/// Emitted when Linux FireWire subsystem generates interrupt event. There are three cases
/// for Linux FireWire subsystem to generate the event:
///
- /// - When OHCI 1394 controller generates hardware interrupt as a result to process the
+ /// - When 1394 OHCI hardware generates hardware interrupt as a result to process the
/// isochronous packet for the buffer chunk marked to generate hardware interrupt.
/// - When the size of accumulated context header for packets since the last event reaches
/// the size of memory page (usually 4,096 bytes).
diff --git a/hinoko/src/fw_iso_it.rs b/hinoko/src/fw_iso_it.rs
index 97e0789..10d1ee1 100644
--- a/hinoko/src/fw_iso_it.rs
+++ b/hinoko/src/fw_iso_it.rs
@@ -54,7 +54,7 @@ pub trait FwIsoItExtManual {
/// Emitted when Linux FireWire subsystem generates interrupt event. There are three cases
/// for Linux FireWire subsystem to generate the event:
///
- /// - When OHCI 1394 controller generates hardware interrupt as a result of processing the
+ /// - When 1394 OHCI hardware generates hardware interrupt as a result of processing the
/// isochronous packet for the buffer chunk marked to generate hardware interrupt.
/// - When the number of isochronous packets sent since the last interrupt event reaches
/// one quarter of memory page size (usually 4,096 / 4 = 1,024 packets).
diff --git a/hinoko/src/subclass/fw_iso_ctx.rs b/hinoko/src/subclass/fw_iso_ctx.rs
index 40031a8..b702555 100644
--- a/hinoko/src/subclass/fw_iso_ctx.rs
+++ b/hinoko/src/subclass/fw_iso_ctx.rs
@@ -221,7 +221,7 @@ unsafe extern "C" fn fw_iso_ctx_flush_completions<T: FwIsoCtxImpl>(
unsafe extern "C" fn fw_iso_ctx_read_cycle_time<T: FwIsoCtxImpl>(
ctx: *mut ffi::HinokoFwIsoCtx,
clock_id: c_int,
- cycle_time: *const *mut hinawa::ffi::HinawaCycleTime,
+ cycle_time: *mut *mut hinawa::ffi::HinawaCycleTime,
error: *mut *mut glib::ffi::GError,
) -> glib::ffi::gboolean {
let instance = &*(ctx as *mut T::Instance);
diff --git a/hinoko/src/subclass/fw_iso_resource.rs b/hinoko/src/subclass/fw_iso_resource.rs
index df6949a..25ffd83 100644
--- a/hinoko/src/subclass/fw_iso_resource.rs
+++ b/hinoko/src/subclass/fw_iso_resource.rs
@@ -6,7 +6,7 @@ use super::*;
pub trait FwIsoResourceImpl: ObjectImpl {
fn open(&self, resource: &Self::Type, path: &str, open_flag: i32) -> Result<(), Error>;
fn create_source(&self, resource: &Self::Type) -> Result<Source, Error>;
- fn allocate_async(
+ fn allocate(
&self,
resource: &Self::Type,
channel_candidates: &[u8],
@@ -27,7 +27,7 @@ pub trait FwIsoResourceImpl: ObjectImpl {
pub trait FwIsoResourceImplExt: ObjectSubclass {
fn parent_open(&self, resource: &Self::Type, path: &str, open_flag: i32) -> Result<(), Error>;
fn parent_create_source(&self, resource: &Self::Type) -> Result<Source, Error>;
- fn parent_allocate_async(
+ fn parent_allocate(
&self,
resource: &Self::Type,
channel_candidates: &[u8],
@@ -75,7 +75,7 @@ impl<T: FwIsoResourceImpl> FwIsoResourceImplExt for T {
}
}
- fn parent_allocate_async(
+ fn parent_allocate(
&self,
resource: &Self::Type,
channel_candidates: &[u8],
@@ -86,8 +86,8 @@ impl<T: FwIsoResourceImpl> FwIsoResourceImplExt for T {
let parent_class =
data.as_ref().parent_class() as *mut ffi::HinokoFwIsoResourceInterface;
let f = (*parent_class)
- .allocate_async
- .expect("No parent \"allocate_async\" implementation");
+ .allocate
+ .expect("No parent \"allocate\" implementation");
let mut error = std::ptr::null_mut();
let is_ok = f(
@@ -182,7 +182,7 @@ unsafe impl<T: FwIsoResourceImpl> IsImplementable<T> for FwIsoResource {
let iface = iface.as_mut();
iface.open = Some(fw_iso_resource_open::<T>);
iface.create_source = Some(fw_iso_resource_create_source::<T>);
- iface.allocate_async = Some(fw_iso_resource_allocate_async::<T>);
+ iface.allocate = Some(fw_iso_resource_allocate::<T>);
iface.allocated = Some(fw_iso_resource_allocated::<T>);
iface.deallocated = Some(fw_iso_resource_deallocated::<T>);
}
@@ -236,7 +236,7 @@ unsafe extern "C" fn fw_iso_resource_create_source<T: FwIsoResourceImpl>(
}
}
-unsafe extern "C" fn fw_iso_resource_allocate_async<T: FwIsoResourceImpl>(
+unsafe extern "C" fn fw_iso_resource_allocate<T: FwIsoResourceImpl>(
resource: *mut ffi::HinokoFwIsoResource,
channel_candidates: *const u8,
channel_candidates_count: size_t,
@@ -247,7 +247,7 @@ unsafe extern "C" fn fw_iso_resource_allocate_async<T: FwIsoResourceImpl>(
let imp = instance.imp();
let wrap: Borrowed<FwIsoResource> = from_glib_borrow(resource);
- match imp.allocate_async(
+ match imp.allocate(
wrap.unsafe_cast_ref(),
std::slice::from_raw_parts(channel_candidates, channel_candidates_count),
bandwidth.into(),
@@ -354,7 +354,7 @@ mod test {
Err(Error::new(FwIsoResourceError::Failed, "expected failure"))
}
- fn allocate_async(
+ fn allocate(
&self,
_resource: &Self::Type,
_channel_candidates: &[u8],