hinawa/auto/fw_req.rs
1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from
3// from gir-files (https://github.com/gtk-rs/gir-files)
4// DO NOT EDIT
5
6use crate::ffi;
7use glib::translate::*;
8
9glib::wrapper! {
10 /// A transaction executor to a node in IEEE 1394 bus.
11 ///
12 /// [`FwReq`][crate::FwReq] supports all types of transactions defiend in IEEE 1212.
13 ///
14 /// ## Signals
15 ///
16 ///
17 /// #### `responded`
18 /// Emitted when the node transfers asynchronous packet as response subaction for the
19 /// transaction and the process successfully reads the content of packet from Linux firewire
20 /// subsystem.
21 ///
22 /// The values of @request_tstamp and @response_tstamp are unsigned 16 bit integer including
23 /// higher 3 bits for three low order bits of second field and the rest 13 bits for cycle
24 /// field in the format of IEEE 1394 CYCLE_TIMER register.
25 ///
26 /// If the version of kernel ABI for Linux FireWire subsystem is less than 6, the
27 /// @request_tstamp and @response_tstamp argument has invalid value (=G_MAXUINT).
28 ///
29 ///
30 ///
31 /// # Implements
32 ///
33 /// [`FwReqExtManual`][trait@crate::prelude::FwReqExtManual]
34 #[doc(alias = "HinawaFwReq")]
35 pub struct FwReq(Object<ffi::HinawaFwReq, ffi::HinawaFwReqClass>);
36
37 match fn {
38 type_ => || ffi::hinawa_fw_req_get_type(),
39 }
40}
41
42impl FwReq {
43 pub const NONE: Option<&'static FwReq> = None;
44
45 /// Instantiate [`FwReq`][crate::FwReq] object and return the instance.
46 ///
47 /// # Returns
48 ///
49 /// an instance of [`FwReq`][crate::FwReq].
50 #[doc(alias = "hinawa_fw_req_new")]
51 pub fn new() -> FwReq {
52 unsafe { from_glib_full(ffi::hinawa_fw_req_new()) }
53 }
54}
55
56impl Default for FwReq {
57 fn default() -> Self {
58 Self::new()
59 }
60}