From ad1dd763a1c214f63da72d8509c3e0380e3182cb Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Thu, 26 May 2022 21:29:23 +0900 Subject: [PATCH] hinawa/hinawa-sys: regenerate crates for libhinawa v2.5.0 The crates are regenerated from libhinawa v2.5.0: * https://github.com/alsa-project/libhinawa/releases/tag/2.5.0 --- Hinawa-3.0.gir | 2503 ++++++++--------- README.rst | 10 +- gir | 2 +- gir-files | 2 +- hinawa-sys/Gir.toml | 2 +- hinawa-sys/src/lib.rs | 109 +- hinawa-sys/tests/abi.rs | 19 + hinawa-sys/tests/constant.c | 10 + hinawa-sys/tests/layout.c | 1 + hinawa-sys/versions.txt | 4 +- hinawa/Gir.toml | 109 +- hinawa/src/auto/enums.rs | 647 +---- hinawa/src/auto/fw_fcp.rs | 40 - hinawa/src/auto/fw_req.rs | 50 - hinawa/src/auto/fw_resp.rs | 41 - hinawa/src/auto/mod.rs | 33 +- hinawa/src/auto/snd_dg00x.rs | 93 - hinawa/src/auto/snd_dice.rs | 116 - hinawa/src/auto/snd_efw.rs | 100 - hinawa/src/auto/snd_motu.rs | 93 - .../auto/snd_motu_register_dsp_parameter.rs | 101 - hinawa/src/auto/snd_tscm.rs | 103 - hinawa/src/auto/snd_unit.rs | 320 --- hinawa/src/auto/versions.txt | 4 +- hinawa/src/enums.rs | 74 - hinawa/src/lib.rs | 10 +- hinawa/src/snd_efw.rs | 134 - hinawa/src/snd_motu.rs | 106 - hinawa/src/snd_motu_register_dsp_parameter.rs | 108 - hinawa/src/snd_tscm.rs | 22 - hinawa/src/snd_unit.rs | 26 - 31 files changed, 1412 insertions(+), 3580 deletions(-) delete mode 100644 hinawa/src/auto/snd_dg00x.rs delete mode 100644 hinawa/src/auto/snd_dice.rs delete mode 100644 hinawa/src/auto/snd_efw.rs delete mode 100644 hinawa/src/auto/snd_motu.rs delete mode 100644 hinawa/src/auto/snd_motu_register_dsp_parameter.rs delete mode 100644 hinawa/src/auto/snd_tscm.rs delete mode 100644 hinawa/src/auto/snd_unit.rs delete mode 100644 hinawa/src/enums.rs delete mode 100644 hinawa/src/snd_efw.rs delete mode 100644 hinawa/src/snd_motu.rs delete mode 100644 hinawa/src/snd_motu_register_dsp_parameter.rs delete mode 100644 hinawa/src/snd_tscm.rs delete mode 100644 hinawa/src/snd_unit.rs diff --git a/Hinawa-3.0.gir b/Hinawa-3.0.gir index 5242f4b..119034b 100644 --- a/Hinawa-3.0.gir +++ b/Hinawa-3.0.gir @@ -15,114 +15,6 @@ and/or use gtk-doc annotations. --> shared-library="libhinawa.so.2" c:identifier-prefixes="Hinawa" c:symbol-prefixes="hinawa_"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - glib:type-name="HinawaFwFcp" glib:get-type="hinawa_fw_fcp_get_type" glib:type-struct="FwFcpClass"> - + A FCP transaction executor to node in IEEE 1394 bus. +A HinawaFwFcp supports Function Control Protocol (FCP) in IEC 61883-1, in which no way is defined +to match response against command by the contents of frames. In 'AV/C Digital Interface Command +Set General Specification Version 4.2' (Sep 1 2004, 1394TA), a pair of command and response is +loosely matched by the contents of frames. + +Any of transaction frames should be aligned to 8bit (byte). This class is an application of +[class@FwReq] / [class@FwResp]. + Instantiate #HinawaFwFcp object and return the instance. - + line="205">Instantiate [class@FwFcp] object and return the instance. + an instance of #HinawaFwFcp. + line="210">an instance of [class@FwFcp]. When the unit transfers asynchronous packet as response for Echo Audio Fireworks -protocol, and the process successfully reads the content of packet from ALSA -Fireworks driver, the #HinawaFwFcpClass::responded signal handler is called with -parameters of the response. - + line="20">Class closure for the [signal@FwFcp::responded] signal. + @@ -158,13 +57,13 @@ parameters of the response. A #HinawaFwFcp. + line="22">A [class@FwFcp]. The array with elements for byte + line="23">The array with elements for byte data of response for Function Control Protocol. @@ -173,7 +72,7 @@ parameters of the response. The number of elements of the array. + line="25">The number of elements of the array. @@ -184,11 +83,12 @@ parameters of the response. throws="1"> Finish the pair of AV/C command and response transactions. The timeout_ms parameter is -used to wait for response transaction since the command transaction is initiated, ignoring -#HinawaFwFcp:timeout property of instance. The timeout is not expanded in the case that AV/C -INTERIM status is arrived, thus the caller should expand the timeout in advance for the case. - + line="280">Finish the pair of asynchronous transaction for AV/C command and response transactions. The +timeout_ms parameter is used to wait for response transaction since the command transaction is +initiated, ignoring [property@FwFcp:timeout] property of instance. The timeout is not expanded in +the case that AV/C INTERIM status is arrived, thus the caller should expand the timeout in +advance for the case. + @@ -196,13 +96,13 @@ INTERIM status is arrived, thus the caller should expand the timeout in advance A #HinawaFwFcp. + line="282">A [class@FwFcp]. An array with elements for request byte data. The value of + line="283">An array with elements for request byte data. The value of this argument should point to the array and immutable. @@ -211,7 +111,7 @@ INTERIM status is arrived, thus the caller should expand the timeout in advance The size of array for request in byte unit. + line="285">The size of array for request in byte unit. An array with elements for response byte data. Callers + line="286">An array with elements for response byte data. Callers should give it for buffer with enough space against the request since this library performs no reallocation. Due to the reason, the value of this argument should point to the pointer to the array and immutable. The content of array is mutable. @@ -234,14 +134,14 @@ INTERIM status is arrived, thus the caller should expand the timeout in advance transfer-ownership="none"> The size of array for response in byte unit. The value of this argument should point to + line="290">The size of array for response in byte unit. The value of this argument should point to the numerical number and mutable. The timeout to wait for response transaction since command transactions finishes. + line="292">The timeout to wait for response transaction since command transactions finishes. @@ -252,8 +152,8 @@ INTERIM status is arrived, thus the caller should expand the timeout in advance throws="1"> Start to listen to FCP responses. - + line="422">Start to listen to FCP responses. + @@ -261,13 +161,13 @@ INTERIM status is arrived, thus the caller should expand the timeout in advance A #HinawaFwFcp. + line="424">A [class@FwFcp]. A #HinawaFwNode. + line="425">A [class@FwNode]. @@ -278,9 +178,9 @@ INTERIM status is arrived, thus the caller should expand the timeout in advance throws="1"> Transfer command frame for FCP. When receiving response frame for FCP, -#HinawaFwFcp::responded signal is emitted. - + line="218">Transfer command frame for FCP. When receiving response frame for FCP, [signal@FwFcp::responded] +signal is emitted. + @@ -288,13 +188,13 @@ INTERIM status is arrived, thus the caller should expand the timeout in advance A #HinawaFwFcp. + line="220">A [class@FwFcp]. An array with elements for request byte data. The value of this + line="221">An array with elements for request byte data. The value of this argument should point to the array and immutable. @@ -303,13 +203,13 @@ INTERIM status is arrived, thus the caller should expand the timeout in advance The size of array for request in byte unit. + line="223">The size of array for request in byte unit. The timeout to wait for response subaction of transaction for command frame. + line="224">The timeout to wait for response subaction of transaction for command frame. @@ -322,10 +222,11 @@ INTERIM status is arrived, thus the caller should expand the timeout in advance throws="1"> Finish the pair of command and response transactions for FCP. The value of #HinawaFwFcp:timeout -property is used to wait for response transaction since the command transaction is initiated. - Use #hinawa_fw_fcp_avc_transaction(), instead. - + line="368">Finish the pair of command and response transactions for FCP. The value of +[property@FwFcp:timeout] property is used to wait for response transaction since the command +transaction is initiated. + Use [method@FwFcp.avc_transaction], instead. + @@ -333,15 +234,14 @@ property is used to wait for response transaction since the command transaction A #HinawaFwFcp. + line="370">A [class@FwFcp]. An array with elements for - request byte data. The value of this argument should point to - the array and immutable. + line="371">An array with elements for request byte data. The + value of this argument should point to the array and immutable. @@ -349,7 +249,7 @@ property is used to wait for response transaction since the command transaction The size of array for request in byte unit. + line="373">The size of array for request in byte unit. An array with elements - for response byte data. Callers should give it for buffer with - enough space against the request since this library performs no - reallocation. Due to the reason, the value of this argument - should point to the pointer to the array and immutable. The - content of array is mutable. + line="374">An array with elements for response byte + data. Callers should give it for buffer with enough space against the request + since this library performs no reallocation. Due to the reason, the value of this + argument should point to the pointer to the array and immutable. The content of + array is mutable. @@ -374,9 +273,8 @@ property is used to wait for response transaction since the command transaction transfer-ownership="none"> The size of array for response in byte unit. The value of - this argument should point to the numerical number and - mutable. + line="379">The size of array for response in byte unit. The value of this argument should + point to the numerical number and mutable. @@ -384,8 +282,8 @@ property is used to wait for response transaction since the command transaction Stop to listen to FCP responses. - + line="452">Stop to listen to FCP responses. + @@ -393,12 +291,15 @@ property is used to wait for response transaction since the command transaction A #HinawaFwFcp. + line="454">A [class@FwFcp]. + Whether this protocol is bound to any instance of HinawaFwNode. Since 1.4 - Use timeout_ms parameter of #hinawa_fw_fcp_avc_transaction(). + line="144">Since 1.4 + Use timeout_ms parameter of [method@FwFcp.avc_transaction]. - - - When the unit transfers asynchronous packet as response for Echo Audio Fireworks -protocol, and the process successfully reads the content of packet from ALSA -Fireworks driver, the #HinawaFwFcp::responded signal handler is called with parameters -of the response. + line="176">Emitted when the node transfers asynchronous packet as response for FCP and the process +successfully read the content of packet. @@ -433,8 +329,8 @@ of the response. The array with elements for byte - data of response for Function Control Protocol. + line="179">The array with elements for byte + data of response for FCP. @@ -442,7 +338,7 @@ of the response. The number of elements of the array. + line="181">The number of elements of the array. @@ -451,13 +347,13 @@ of the response. - + - + @@ -465,13 +361,13 @@ of the response. A #HinawaFwFcp. + line="22">A [class@FwFcp]. The array with elements for byte + line="23">The array with elements for byte data of response for Function Control Protocol. @@ -480,7 +376,7 @@ of the response. The number of elements of the array. + line="25">The number of elements of the array. @@ -495,7 +391,7 @@ of the response. glib:error-domain="hinawa-fw-fcp-error-quark"> A set of error code for GError with domain which equals to #hinawa_fw_fcp_error_quark(). + line="177">A set of error code for [struct@GLib.Error] with domain which equals to Hinawa.FwFcpError. glib:name="HINAWA_FW_FCP_ERROR_TIMEOUT"> The transaction is canceled due to response timeout. + line="179">The transaction is canceled due to response timeout. glib:name="HINAWA_FW_FCP_ERROR_LARGE_RESP"> The size of response is larger than expected. + line="180">The size of response is larger than expected. Return the GQuark for error domain of GError which has code in #HinawaFwFcpError. + line="20">Return the [alias@GLib.Quark] for [struct@GLib.Error] which has code in Hinawa.FwFcpError. A #GQuark. + line="27">A [alias@GLib.Quark]. - - - - + An event listener for FireWire node +A [class@FwNode] is an event listener for a specified node on IEEE 1394 bus. This class is an +application of Linux FireWire subsystem. All of operations utilize ioctl(2) with subsystem +specific request commands. + Instantiate #HinawaFwNode object and return the instance. - + line="288">Instantiate [class@FwNode] object and return the instance. + an instance of #HinawaFwNode. + line="293">an instance of [class@FwNode]. When IEEE 1394 bus is updated, the #HinawaFwNodeClass::bus-update handler is called. -The handlers can read current generation in the bus via 'generation' -property. - + line="20">Class closure for the [signal@FwNode::bus-update]. + @@ -565,7 +463,7 @@ property. A #HinawaFwNode. + line="22">A [class@FwNode]. @@ -573,9 +471,8 @@ property. When phicical FireWire devices are disconnected from IEEE 1394 bus, -the #HinawaFwNodeClass::disconnected handler is called. - + line="30">Class closure for the [signal@FwNode::disconnected]. + @@ -583,7 +480,7 @@ the #HinawaFwNodeClass::disconnected handler is called. A #HinawaFwNode + line="32">A [class@FwNode] @@ -594,9 +491,9 @@ the #HinawaFwNodeClass::disconnected handler is called. throws="1"> Create Gsource for GMainContext to dispatch events for the node on IEEE 1394 -bus. - + line="505">Create [struct@GLib.Source] for [struct@GLib.MainContext] to dispatch events for the node on +IEEE 1394 bus. + @@ -604,7 +501,7 @@ bus. A #HinawaFwNode. + line="507">A [class@FwNode]. transfer-ownership="full"> A #GSource. + line="508">A [struct@GLib.Source]. @@ -624,8 +521,8 @@ bus. throws="1"> Get cached content of configuration ROM aligned to big-endian. - + line="384">Get cached content of configuration ROM aligned to big-endian. + @@ -633,7 +530,7 @@ bus. A #HinawaFwNode + line="386">A [class@FwNode] transfer-ownership="none"> The content of - configuration ROM. + line="387">The content of configuration ROM. @@ -654,7 +550,7 @@ bus. transfer-ownership="full"> The number of bytes consists of the configuration rom. + line="388">The number of bytes consists of the configuration rom. @@ -665,8 +561,8 @@ bus. throws="1"> Open Linux FireWire character device to operate node on IEEE 1394 bus. - + line="329">Open Linux FireWire character device to operate node on IEEE 1394 bus. + @@ -674,13 +570,13 @@ bus. A #HinawaFwNode + line="331">A [class@FwNode] A path to Linux FireWire character device + line="332">A path to Linux FireWire character device @@ -688,37 +584,54 @@ bus. + Node ID of node which plays role of bus manager at current generation of bus topology. + Current generation of bus topology. + Node ID of node which plays role of isochronous resource manager at current generation +of bus topology. + Node ID of node which application uses to communicate to node associated to instance of +object at current generation of bus topology. In general, it is for 1394 OHCI controller. + Node ID of node associated to instance of object at current generation of bus topology. +This parameter is effective after the association. + Node ID of root node in bus topology at current generation of the bus topology. - - - When IEEE 1394 bus is updated, the #HinawaFwNode::bus-update signal is generated. -Handlers can read current generation in the bus via 'generation' -property. + line="242">Emitted when IEEE 1394 bus is updated. Handlers can read current generation in the bus +via [property@FwNode:generation] property. @@ -726,8 +639,8 @@ property. When phicical FireWire devices are disconnected from IEEE 1394 bus, -the #HinawaFwNode::disconnected signal is generated. + line="260">Emitted when the node is not available anymore due to removal from IEEE 1394 bus. It's +preferable to call [method@GObject.Object.unref] immediately to release file descriptor. @@ -736,13 +649,13 @@ the #HinawaFwNode::disconnected signal is generated. - + - + @@ -750,7 +663,7 @@ the #HinawaFwNode::disconnected signal is generated. A #HinawaFwNode. + line="22">A [class@FwNode]. @@ -758,7 +671,7 @@ the #HinawaFwNode::disconnected signal is generated. - + @@ -766,7 +679,7 @@ the #HinawaFwNode::disconnected signal is generated. A #HinawaFwNode + line="32">A [class@FwNode] @@ -781,7 +694,7 @@ the #HinawaFwNode::disconnected signal is generated. glib:error-domain="hinawa-fw-node-error-quark"> A set of error code for GError with domain which equals to #hinawa_fw_node_error_quark(). + line="141">A set of error code for [struct@GLib.Error] with domain which equals to Hinawa.FwNodeError. glib:name="HINAWA_FW_NODE_ERROR_DISCONNECTED"> The node associated to the instance is disconnected. + line="143">The node associated to the instance is disconnected. glib:name="HINAWA_FW_NODE_ERROR_OPENED"> The instance is already associated to node by opening + line="144">The instance is already associated to node by opening firewire character device. glib:name="HINAWA_FW_NODE_ERROR_NOT_OPENED"> The instance is not associated to node by opening + line="146">The instance is not associated to node by opening firewire character device. glib:name="HINAWA_FW_NODE_ERROR_FAILED"> The system call fails. + line="148">The system call fails. Return the GQuark for error domain of GError which has code in #HinawaFwNodeError. + line="41">Return the [alias@GLib.Quark] for [struct@GLib.Error] with Hinawa.FwNodeError domain. A #GQuark. + line="48">A [alias@GLib.Quark]. - - - glib:type-name="HinawaFwReq" glib:get-type="hinawa_fw_req_get_type" glib:type-struct="FwReqClass"> - + A transaction executor to a FireWire unit. +A HinawaFwReq supports some types of transactions in IEEE 1212. Mainly for read, write and lock +operations. + +This class is an application of Linux FireWire subsystem. All of operations utilize ioctl(2) +with subsystem specific request commands. + Instantiate #HinawaFwReq object and return the instance. - + line="158">Instantiate [class@FwReq] object and return the instance. + an instance of #HinawaFwReq. + line="163">an instance of [class@FwReq]. - - Return the GQuark for error domain of GError which has code in #HinawaFwRcode. - - A #GQuark. - - - When the unit transfers asynchronous packet as response subaction for the transaction, -and the process successfully reads the content of packet from Linux firewire subsystem, -the #HinawaFwReqClass::responded handler is called. - + line="20">Class closure for the [signal@FwReq::responded] signal. + @@ -992,19 +895,19 @@ the #HinawaFwReqClass::responded handler is called. A #HinawaFwReq. + line="22">A [class@FwReq]. One of #HinawaFwRcode. + line="23">One of [enum@FwRcode]. The array with elements for + line="24">The array with elements for byte data of response subaction for transaction. @@ -1013,7 +916,7 @@ the #HinawaFwReqClass::responded handler is called. The number of elements of the array. + line="26">The number of elements of the array. @@ -1026,10 +929,10 @@ the #HinawaFwReqClass::responded handler is called. throws="1"> Execute request subaction of transaction to the given node according to given code, then wait -for response subaction within #HinawaFwReq:timeout. - Use #hinawa_fw_req_transaction_sync(), instead. - + line="383">Execute request subaction of transaction to the given node according to given code, then wait +for response subaction within the value of timeout argument. + Use [method@FwReq.transaction_sync] instead. + @@ -1037,31 +940,31 @@ for response subaction within #HinawaFwReq:timeout. A #HinawaFwReq. + line="385">A [class@FwReq]. A #HinawaFwNode. + line="386">A [class@FwNode]. A transaction code of HinawaFwTcode. + line="387">A transaction code of [enum@FwTcode]. A destination address of target device + line="388">A destination address of target device The range of address in byte unit. + line="389">The range of address in byte unit. transfer-ownership="full"> An array with elements for byte - data. Callers should give it for buffer with enough space against the - request since this library performs no reallocation. Due to the - reason, the value of this argument should point to the pointer to the - array and immutable. The content of array is mutable for read and - lock transaction. + line="390">An array with elements for byte data. Callers should + give it for buffer with enough space against the request since this library performs no + reallocation. Due to the reason, the value of this argument should point to the pointer + to the array and immutable. The content of array is mutable for read and lock + transaction. @@ -1086,9 +988,8 @@ for response subaction within #HinawaFwReq:timeout. transfer-ownership="none"> The size of array in byte unit. The value of this argument - should point to the numerical number and mutable for read and - lock transaction. + line="395">The size of array in byte unit. The value of this argument should point to the + numerical number and mutable for read and lock transaction. @@ -1099,10 +1000,10 @@ for response subaction within #HinawaFwReq:timeout. throws="1"> Execute request subaction of transactions to the given node according to given code. When the -response subaction arrives and read the contents, #HinawaFwReq::responded signal handler is called + line="171">Execute request subaction of transactions to the given node according to given code. When the +response subaction arrives and read the contents, [signal@FwReq::responded] signal handler is called as long as event dispatcher runs. - + @@ -1110,31 +1011,31 @@ as long as event dispatcher runs. A #HinawaFwReq. + line="173">A [class@FwReq]. A #HinawaFwNode. + line="174">A [class@FwNode]. A transaction code of HinawaFwTcode. + line="175">A transaction code of [enum@FwTcode]. A destination address of target device + line="176">A destination address of target device The range of address in byte unit. + line="177">The range of address in byte unit. transfer-ownership="full"> An array with elements for byte - data. Callers should give it for buffer with enough space against the - request since this library performs no reallocation. Due to the - reason, the value of this argument should point to the pointer to the - array and immutable. The content of array is mutable for read and - lock transaction. + line="178">An array with elements for byte data. Callers should + give it for buffer with enough space against the request since this library performs no + reallocation. Due to the reason, the value of this argument should point to the pointer + to the array and immutable. The content of array is mutable for read and lock + transaction. @@ -1159,9 +1059,8 @@ as long as event dispatcher runs. transfer-ownership="none"> The size of array in byte unit. The value of this argument - should point to the numerical number and mutable for read and - lock transaction. + line="183">The size of array in byte unit. The value of this argument should point to the + numerical number and mutable for read and lock transaction. @@ -1172,10 +1071,10 @@ as long as event dispatcher runs. throws="1"> Execute request subaction of transaction to the given node according to given code, then wait -for response subaction within the given timeout. The #HinawaFwReq:timeout property of instance -is ignored. - + line="286">Execute request subaction of transaction to the given node according to given code, then wait +for response subaction within the given timeout. The [property@FwReq:timeout] property of +instance is ignored. + @@ -1183,31 +1082,31 @@ is ignored. A #HinawaFwReq. + line="288">A [class@FwReq]. A #HinawaFwNode. + line="289">A [class@FwNode]. A transaction code of HinawaFwTcode. + line="290">A transaction code of [enum@FwTcode]. A destination address of target device + line="291">A destination address of target device The range of address in byte unit. + line="292">The range of address in byte unit. transfer-ownership="full"> An array with elements for byte - data. Callers should give it for buffer with enough space against the - request since this library performs no reallocation. Due to the - reason, the value of this argument should point to the pointer to the - array and immutable. The content of array is mutable for read and - lock transaction. + line="293">An array with elements for byte data. Callers should + give it for buffer with enough space against the request since this library performs no + reallocation. Due to the reason, the value of this argument should point to the pointer + to the array and immutable. The content of array is mutable for read and lock + transaction. @@ -1232,15 +1130,14 @@ is ignored. transfer-ownership="none"> The size of array in byte unit. The value of this argument - should point to the numerical number and mutable for read and - lock transaction. + line="298">The size of array in byte unit. The value of this argument should point to the + numeric number and mutable for read and lock transaction. The timeout to wait for response subaction of the transaction since request + line="300">The timeout to wait for response subaction of the transaction since request subaction is initiated, in milliseconds. @@ -1253,21 +1150,18 @@ is ignored. writable="1" construct="1" transfer-ownership="none"> - Use timeout_ms parameter of #hinawa_fw_req_transaction_sync(). + Use timeout_ms parameter of [method@FwReq.transaction_sync]. - - - When the unit transfers asynchronous packet as response subaction for the transaction, -and the process successfully reads the content of packet from Linux firewire subsystem, -the #HinawaFwReq::responded signal handler is called. + line="128">Emitted when the unit transfers asynchronous packet as response subaction for the +transaction and the process successfully reads the content of packet from Linux firewire +subsystem. @@ -1275,13 +1169,13 @@ the #HinawaFwReq::responded signal handler is called. One of #HinawaFwRcode. + line="131">One of [enum@FwRcode]. The array with elements for + line="132">The array with elements for byte data of response subaction for transaction. @@ -1290,7 +1184,7 @@ the #HinawaFwReq::responded signal handler is called. The number of elements of the array. + line="134">The number of elements of the array. @@ -1299,13 +1193,13 @@ the #HinawaFwReq::responded signal handler is called. - + - + @@ -1313,19 +1207,19 @@ the #HinawaFwReq::responded signal handler is called. A #HinawaFwReq. + line="22">A [class@FwReq]. One of #HinawaFwRcode. + line="23">One of [enum@FwRcode]. The array with elements for + line="24">The array with elements for byte data of response subaction for transaction. @@ -1334,16 +1228,127 @@ the #HinawaFwReq::responded signal handler is called. The number of elements of the array. + line="26">The number of elements of the array. - - - + + A set of error code for [class@Hinawa.FwReq]. Each of them has the same value as the +corresponding enumeration in [enum@Hinawa.FwRcode]. + + For error of conflicting. + + + For error of data. + + + For error of type. + + + For error of address. + + + For error of sending. + + + For cancellation. + + + For busyness. + + + For generation. + + + For no acknowledge. + + + For rcode out of specification. + + + Return the [alias@GLib.Quark] for [struct@GLib.Error] with code of [enum@FwRcode]. + + A [alias@GLib.Quark]. + + + + glib:type-name="HinawaFwResp" glib:get-type="hinawa_fw_resp_get_type" glib:type-struct="FwRespClass"> - + A transaction responder for request initiated by node in IEEE 1394 bus. +The [class@FwResp] responds transaction initiated by node in IEEE 1394 bus. + +This class is an application of Linux FireWire subsystem. All of operations utilize ioctl(2) +with subsystem specific request commands. + Instantiate #HinawaFwResp object and return the instance. - + line="224">Instantiate [class@FwResp] object and return the instance. + a new instance of #HinawaFwResp. + line="229">a new instance of [class@FwResp]. When any node transfers requests to the range of address to which this object listening, -the #HinawaFwRespClass::requested signal handler is called with #HinawaFwTcode, without the -case that #HinawaFwRespClass::requested2 signal handler is already assigned. - -The handler can get data frame by a call of #hinawa_fw_resp_get_req_frame() and set data -frame by a call of #hinawa_fw_resp_set_resp_frame(), then returns rcode. - Use #HinawaFwRespClass::requested2, instead. - + line="20">Class closure for the [signal@FwResp::requested] signal. + Use [vfunc@FwResp.requested2], instead. + One of #HinawaRcode enumerators corresponding to rcodes defined in IEEE 1394 -specification. + line="27">One of [enum@FwRcode] enumerations corresponding to rcodes defined in IEEE 1394 + specification. A #HinawaFwResp + line="22">A [class@FwResp] One of #HinawaTcode enumerators + line="23">One of [enum@FwTcode] enumerations @@ -1400,15 +1407,12 @@ specification. When any node transfers request subaction to the range of address to which this object -listening, the #HinawaFwResp::requested signal handler is called with arrived frame for -the subaction. The handler is expected to call #hinawa_fw_resp_set_resp_frame() with -frame and return rcode for response subaction. - + line="34">Class closure for the [signal@FwResp::requested2] signal. + One of #HinawaRcode enumerators corresponding to rcodes defined in IEEE 1394 + line="49">One of [enum@FwRcode enumerations corresponding to rcodes defined in IEEE 1394 specification. @@ -1416,49 +1420,49 @@ frame and return rcode for response subaction. A #HinawaFwResp + line="36">A [class@FwResp] One of #HinawaTcode enumerations + line="37">One of [enum@FwTcode] enumerations The address offset at which the transaction arrives. + line="38">The address offset at which the transaction arrives. The node ID of source for the transaction. + line="39">The node ID of source for the transaction. The node ID of destination for the transaction. + line="40">The node ID of destination for the transaction. The index of card corresponding to 1394 OHCI controller. + line="41">The index of card corresponding to 1394 OHCI controller. The generation of bus when the transaction is transferred. + line="42">The generation of bus when the transaction is transferred. The array with elements for byte + line="43">The array with elements for byte data. @@ -1467,7 +1471,7 @@ frame and return rcode for response subaction. The length of bytes for the frame. + line="45">The length of bytes for the frame. @@ -1479,10 +1483,10 @@ frame and return rcode for response subaction. deprecated-version="2.2"> Retrieve byte frame to be requested. - handler for #HinawaFwResp::requested2 signal can receive the frame in its + line="359">Retrieve byte frame to be requested. + handler for [signal@FwResp::requested2] signal can receive the frame in its argument. - + @@ -1490,7 +1494,7 @@ frame and return rcode for response subaction. A #HinawaFwResp + line="361">A [class@FwResp] transfer-ownership="none"> a 8bit array for response - frame. + line="362">a 8bit array for response frame. @@ -1511,7 +1514,7 @@ frame and return rcode for response subaction. transfer-ownership="full"> The length of bytes for the frame. + line="363">The length of bytes for the frame. @@ -1521,8 +1524,8 @@ frame and return rcode for response subaction. version="1.4."> stop to listen to a range of address in host controller. - + line="319">stop to listen to a range of address in local node (e.g. OHCI 1394 controller). + @@ -1530,7 +1533,7 @@ frame and return rcode for response subaction. A HinawaFwResp. + line="321">A [class@FwResp]. @@ -1541,10 +1544,10 @@ frame and return rcode for response subaction. throws="1"> Start to listen to a range of address in host controller which connects to the node. The function -is a variant of #hinawa_fw_resp_reserve_within_region() so that the exact range of address should + line="298">Start to listen to a range of address in host controller which connects to the node. The function +is a variant of [method@FwResp.reserve_within_region] so that the exact range of address should be reserved as given. - + @@ -1552,25 +1555,25 @@ be reserved as given. A #HinawaFwResp. + line="300">A [class@FwResp]. A #HinawaFwNode. + line="301">A [class@FwNode]. A start address to listen to in host controller. + line="302">A start address to listen to in host controller. The byte width of address to listen to host controller. + line="303">The byte width of address to listen to host controller. @@ -1581,10 +1584,10 @@ be reserved as given. throws="1"> Start to listen to range of address equals to #width in local node (e.g. 1394 OHCI host + line="237">Start to listen to range of address equals to #width in local node (e.g. 1394 OHCI host controller), which is used to communicate to the node given as parameter. The range of address -is looked up in region between #region_start and #region_end. - +is looked up in region between region_start and region_end. + @@ -1592,31 +1595,31 @@ is looked up in region between #region_start and #region_end. A #HinawaFwResp. + line="239">A [class@FwResp]. A #HinawaFwNode. + line="240">A [class@FwNode]. Start offset of address region in which range of address is looked up. + line="241">Start offset of address region in which range of address is looked up. End offset of address region in which range of address is looked up. + line="242">End offset of address region in which range of address is looked up. The width for range of address to be looked up. + line="243">The width for range of address to be looked up. @@ -1626,8 +1629,8 @@ is looked up in region between #region_start and #region_end. version="2.0"> Register byte frame as response. - + line="388">Register byte frame as response. + @@ -1635,14 +1638,13 @@ is looked up in region between #region_start and #region_end. A #HinawaFwResp + line="390">A [class@FwResp] a 8bit array for response - frame. + line="391">a 8bit array for response frame. @@ -1650,26 +1652,32 @@ is looked up in region between #region_start and #region_end. The length of bytes for the frame. + line="392">The length of bytes for the frame. + Whether a range of address is reserved or not in host controller. + The start offset of reserved address range. + The width of reserved address range. - - - deprecated-version="2.2"> When any node transfers requests to the range of address to which this object listening, -the #HinawaFwResp::requested signal handler is called with #HinawaFwTcode, without the -case that #HinawaFwResp::requested2 signal handler is already assigned. + line="157">Emitted when any node transfers requests to the range of address to which this object +listening, the [signal@FwResp::requested] signal handler is called with [enum@FwTcode], +without the case that [signal@FwResp::requested2] signal handler is already assigned. -The handler can get data frame by a call of #hinawa_fw_resp_get_req_frame() and set data -frame by a call of #hinawa_fw_resp_set_resp_frame(), then returns rcode. - Use #HinawaFwResp::requested2, instead. +The handler can get data frame by a call of [method@FwResp.get_req_frame] and set data +frame by a call of [method@FwResp.set_resp_frame], then returns [enum@FwRcode] for +response subaction. + Use [signal@FwResp::requested2], instead. One of #HinawaRcode enumerators corresponding to rcodes defined in IEEE 1394 -specification. + line="170">One of [enum@FwRcode] enumerations corresponding to rcodes defined in IEEE 1394 + specification. One of #HinawaTcode enumerators + line="160">One of [enum@FwTcode] enumerations. @@ -1703,14 +1712,14 @@ specification. When any node transfers request subaction to the range of address to which this object -listening, the #HinawaFwResp::requested signal handler is called with arrived frame for -the subaction. The handler is expected to call #hinawa_fw_resp_set_resp_frame() with -frame and return rcode for response subaction. + line="185">Emitted when any node transfers request subaction to the range of address to which this +object listening, the [signal@FwResp::requested] signal handler is called with arrived +frame for the subaction. The handler is expected to call [method@FwResp.set_resp_frame] +with frame and return [enum@FwRcode] for response subaction. One of #HinawaRcode enumerators corresponding to rcodes defined in IEEE 1394 + line="203">One of [enum@FwRcode] enumerations corresponding to rcodes defined in IEEE 1394 specification. @@ -1718,43 +1727,43 @@ frame and return rcode for response subaction. One of #HinawaTcode enumerations + line="188">One of [enum@FwTcode] enumerations The address offset at which the transaction arrives. + line="189">The address offset at which the transaction arrives. The node ID of source for the transaction. + line="190">The node ID of source for the transaction. The node ID of destination for the transaction. + line="191">The node ID of destination for the transaction. The index of card corresponding to 1394 OHCI controller. + line="192">The index of card corresponding to 1394 OHCI controller. The generation of bus when the transaction is transferred. + line="193">The generation of bus when the transaction is transferred. The array with elements for byte + line="194">The array with elements for byte data. @@ -1763,7 +1772,7 @@ frame and return rcode for response subaction. The length of bytes for the frame. + line="196">The length of bytes for the frame. @@ -1772,31 +1781,31 @@ frame and return rcode for response subaction. - + - + One of #HinawaRcode enumerators corresponding to rcodes defined in IEEE 1394 -specification. + line="27">One of [enum@FwRcode] enumerations corresponding to rcodes defined in IEEE 1394 + specification. A #HinawaFwResp + line="22">A [class@FwResp] One of #HinawaTcode enumerators + line="23">One of [enum@FwTcode] enumerations @@ -1804,11 +1813,11 @@ specification. - + One of #HinawaRcode enumerators corresponding to rcodes defined in IEEE 1394 + line="49">One of [enum@FwRcode enumerations corresponding to rcodes defined in IEEE 1394 specification. @@ -1816,49 +1825,49 @@ specification. A #HinawaFwResp + line="36">A [class@FwResp] One of #HinawaTcode enumerations + line="37">One of [enum@FwTcode] enumerations The address offset at which the transaction arrives. + line="38">The address offset at which the transaction arrives. The node ID of source for the transaction. + line="39">The node ID of source for the transaction. The node ID of destination for the transaction. + line="40">The node ID of destination for the transaction. The index of card corresponding to 1394 OHCI controller. + line="41">The index of card corresponding to 1394 OHCI controller. The generation of bus when the transaction is transferred. + line="42">The generation of bus when the transaction is transferred. The array with elements for byte + line="43">The array with elements for byte data. @@ -1867,7 +1876,7 @@ specification. The length of bytes for the frame. + line="45">The length of bytes for the frame. @@ -1882,7 +1891,7 @@ specification. glib:error-domain="hinawa-fw-resp-error-quark"> A set of error code for GError with domain which equals to #hinawa_fw_resp_error_quark(). + line="161">A set of error code for [struct@GLib.Error] with domain which equals to Hinawa.FwRespError. glib:name="HINAWA_FW_RESP_ERROR_FAILED"> The generic system call error. + line="163">The generic system call error. glib:name="HINAWA_FW_RESP_ERROR_RESERVED"> The instance is already associated to reserved address range. + line="164">The instance is already associated to reserved address range. glib:name="HINAWA_FW_RESP_ERROR_ADDR_SPACE_USED"> The address space is used exclusively. + line="165">The address space is used exclusively. Return the GQuark for error domain of GError which has code in #HinawaFwRespError. + line="18">Return the [alias@GLib.Quark] for error domain of [struct@GLib.Error] which has code in +Hinawa.FwRespError. A #GQuark. + line="26">A [alias@GLib.Quark]. - - - line="24">For lock request for vendor-dependent. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + A notification listener for Digidesign Digi 00x models. +A [class@SndDg00x] listen to Dg00x notification and generates signal when received. + libhitaki library provides [class@Hitaki.SndDigi00x] as the alternative. + + version="1.3." + deprecated="1" + deprecated-version="2.5."> Instantiate #HinawaSndDg00x object and return the instance. - + line="53">Instantiate [class@SndDg00x] object and return the instance. + Use [method@Hitaki.SndDigi00x.new] instead. + an instance of #HinawaSndDg00x. + line="58">an instance of [class@SndDg00x]. - + When Dg00x models transfer notification, the #HinawaSndDg00xClass::message handler is -called. - + line="16">Class closure for the [signal@SndDg00x::message] signal. + Use implementation of [vfunc@Hitaki.QuadletNotification.notified] in + [class@Hitaki.SndDigi00x] instead. + @@ -2475,13 +2154,13 @@ called. A #HinawaSndDg00x + line="18">A [class@SndDg00x] A message + line="19">A message @@ -2489,11 +2168,15 @@ called. Open ALSA hwdep character device and check it for Dg00x devices. - + line="68">Open ALSA hwdep character device and check it for Dg00x devices. + Use implementation of [method@Hitaki.AlsaFirewire.open] + [class@Hitaki.SndDigi00x] for instead. + @@ -2501,13 +2184,13 @@ called. A #HinawaSndUnit + line="70">A [class@SndDg00x] A full path of a special file for ALSA hwdep character device + line="71">A full path of a special file for ALSA hwdep character device @@ -2515,11 +2198,16 @@ called. - + When Dg00x models transfer notification, the #HinawaSndDg00x::message signal is -generated. + line="27">Emitted when Dg00x models transfer notification. + Use implementation of [signal@Hitaki.QuadletNotification::notified] in + [class@Hitaki.SndDigi00x] instead. @@ -2527,7 +2215,7 @@ generated. A message + line="30">A message @@ -2536,13 +2224,13 @@ generated. - + - + @@ -2550,13 +2238,13 @@ generated. A #HinawaSndDg00x + line="18">A [class@SndDg00x] A message + line="19">A message @@ -2566,31 +2254,45 @@ generated. - + A notification listener for Dice models. +A [class@SndDice] listen to Dice notification and generates signal when received. + libhitaki library provides [class@Hitaki.SndDice] as the alternative. + + version="1.3." + deprecated="1" + deprecated-version="2.5."> Instantiate #HinawaSndDice object and return the instance. - + line="98">Instantiate [class@SndDice] object and return the instance. + Use [method@Hitaki.SndDice.new] instead. + an instance of #HinawaSndDice. + line="103">an instance of [class@SndDice]. - + When Dice models transfer notification, the #HinawaSndDiceClass::notified handler is -called. - + line="20">Class closure for the [signal@SndDice::notified]. + Use implementation of [class@Hitaki.SndDice] for + [vfunc@Hitaki.QuadletNotification.notified] instead. + @@ -2598,13 +2300,13 @@ called. A #HinawaSndDice + line="22">A [class@SndDice] A notification message + line="23">A notification message @@ -2612,11 +2314,15 @@ called. Open ALSA hwdep character device and check it for Dice devices. - + line="113">Open ALSA hwdep character device and check it for Dice devices. + Use implementation of [method@Hitaki.AlsaFirewire.open] in + [class@Hitaki.SndDice] instead. + @@ -2624,13 +2330,13 @@ called. A #HinawaSndUnit + line="115">A [class@SndDice] A full path of a special file for ALSA hwdep character device + line="116">A full path of a special file for ALSA hwdep character device @@ -2638,12 +2344,16 @@ called. Execute write transactions to the given address, then wait and check -notification. - + line="146">Execute write transactions to the given address, then wait and check notification. + Use [class@FwReq] to send write request transaction to the unit, then use + implementaion of [signal@Hitaki.QuadletNotification::notified] in + [class@Hitaki.SndDice] to wait for notification. + @@ -2651,20 +2361,19 @@ notification. A #HinawaSndDice + line="148">A [class@SndDice] A destination address of target device + line="149">A destination address of target device An array with elements for quadlet - data to transmit. + line="150">An array with elements for quadlet data to transmit. @@ -2672,13 +2381,13 @@ notification. The number of quadlets in the frame. + line="151">The number of quadlets in the frame. bit flag to wait + line="152">bit flag to wait @@ -2686,14 +2395,16 @@ notification. - - - - + When Dice models transfer notification, the #HinawaSndDice::notified signal is -generated. + line="72">Emitted when Dice unit transfers notification. + Use implementation of [class@Hitaki.SndDice] for + [signal@Hitaki.QuadletNotification::notified] instead. @@ -2710,13 +2421,13 @@ generated. - + - + @@ -2724,13 +2435,13 @@ generated. A #HinawaSndDice + line="22">A [class@SndDice] A notification message + line="23">A notification message @@ -2739,13 +2450,16 @@ generated. A set of error code for GError with domain which equals to #hinawa_snd_dice_error_quark(). + line="220">A set of error code for [structGLib.Error] with domain which equals to Hinawa.SndDiceError. + Use Hitaki.AlsaFirewireError in libhitaki library instead. glib:name="HINAWA_SND_DICE_ERROR_TIMEOUT"> The transaction is canceled due to response timeout. + line="222">The transaction is canceled due to response timeout. + version="2.1" + deprecated="1" + deprecated-version="2.5."> Return the GQuark for error domain of GError which has code in #HinawaSndDiceError. + line="16">Return the [alias@GLib.Quark] for [struct@GLib.Error] which has code in Hinawa.SndDiceError. A #GQuark. + line="24">A [alias@GLib.Quark]. - - - - - + A transaction executor for Fireworks models. +A [class@SndEfw] is an application of Echo Fireworks Transaction. + libhitaki library provides [class@Hitaki.SndEfw] as the alternative. + + Instantiate #HinawaSndEfw object and return the instance. - + line="105">Instantiate [class@SndEfw] object and return the instance. + Use [method@Hitaki.SndEfw.new] instead. + an instance of #HinawaSndEfw. + line="110">an instance of [class@SndEfw]. + version="2.1" + deprecated="1" + deprecated-version="2.5."> Return the GQuark for error domain of GError which has code in #HinawaSndEfwStatus. + line="16">Return the [alias@GLib.Quark] for error domain of [struct@GLib.Error] which has code in +[enum@SndEfwStatus]. + Use Hitaki.EfwProtocolError instead. A #GQuark. + line="25">A [alias@GLib.Quark]. - + When the unit transfers asynchronous packet as response for Echo Audio Fireworks -protocol, and the process successfully reads the content of response from ALSA -Fireworks driver, the #HinawaSndEfwClass::responded signal handler is called with parameters -of the response. - + line="20">Class closure for the [signal@SndEfw::responded] signal. + Use implementation of [vfunc@Hitaki.EfwProtocol.responded] in + [class@Hitaki.SndEfw] instead. + @@ -2820,37 +2551,37 @@ of the response. A #HinawaSndEfw. + line="22">A [class@SndEfw]. One of #HinawaSndEfwStatus. + line="23">One of [enum@SndEfwStatus]. The sequence number of response. + line="24">The sequence number of response. The value of category field in the response. + line="25">The value of category field in the response. The value of command field in the response. + line="26">The value of command field in the response. The array with elements for + line="27">The array with elements for quadlet data of response for Echo Fireworks protocol. @@ -2859,7 +2590,7 @@ of the response. The number of elements of the array. + line="29">The number of elements of the array. @@ -2867,11 +2598,15 @@ of the response. Open ALSA hwdep character device and check it for Fireworks devices. - + line="120">Open ALSA hwdep character device and check it for Fireworks devices. + Use implementation of [method@Hitaki.AlsaFirewire.open] in + [class@Hitaki.SndEfw] instead. + @@ -2879,13 +2614,13 @@ of the response. A #HinawaSndUnit + line="122">A [class@SndEfw] A full path of a special file for ALSA hwdep character device + line="123">A full path of a special file for ALSA hwdep character device @@ -2893,12 +2628,16 @@ of the response. Transfer request of transaction according to Echo Fireworks Transaction protocol, then wait for + line="339">Transfer request of transaction according to Echo Fireworks Transaction protocol, then wait for the response of transaction within 200 millisecond timeout. - + Use implementation of [method@Hitaki.EfwProtocol.transaction] in + [class@Hitaki.SndEfw] instead. + @@ -2906,19 +2645,19 @@ the response of transaction within 200 millisecond timeout. A #HinawaSndEfw. + line="341">A [class@SndEfw]. one of category for the transaction. + line="342">one of category for the transaction. one of commands for the transaction. + line="343">one of commands for the transaction. allow-none="1"> An array with elements for - quadlet data as arguments for command. + line="344">An array with elements for quadlet data as + arguments for command. @@ -2936,7 +2675,7 @@ the response of transaction within 200 millisecond timeout. The number of quadlets in the args array. + line="346">The number of quadlets in the args array. transfer-ownership="full"> An array with elements for - quadlet data to save parameters in response. Callers should give it - for buffer with enough space against the request since this library - performs no reallocation. Due to the reason, the value of this - argument should point to the pointer to the array and immutable. - The content of array is mutable for parameters in response. + line="347">An array with elements for quadlet data to save + parameters in response. Callers should give it for buffer with enough space against + the request since this library performs no reallocation. Due to the reason, the value + of this argument should point to the pointer to the array and immutable. The content + of array is mutable for parameters in response. @@ -2961,7 +2699,7 @@ the response of transaction within 200 millisecond timeout. transfer-ownership="none"> The number of quadlets in the params array. + line="352">The number of quadlets in the params array. @@ -2969,12 +2707,17 @@ the response of transaction within 200 millisecond timeout. Transfer asynchronous transaction for command frame of Echo Fireworks protocol. When receiving -asynchronous transaction for response frame, #HinawaSndEfw::responded GObject signal is emitted. - + line="152">Transfer asynchronous transaction for command frame of Echo Fireworks protocol. When receiving +asynchronous transaction for response frame, [signal@SndEfw::responded] GObject signal is +emitted. + Use implementation of [method@Hitaki.EfwProtocol.transmit_request] in + [class@Hitaki.SndEfw] instead. + @@ -2982,19 +2725,19 @@ asynchronous transaction for response frame, #HinawaSndEfw::responded GObject si A #HinawaSndEfw. + line="154">A [class@SndEfw]. One of category for the transaction. + line="155">One of category for the transaction. One of commands for the transaction. + line="156">One of commands for the transaction. An array with elements for quadlet data as + line="157">An array with elements for quadlet data as arguments for command. @@ -3012,7 +2755,7 @@ asynchronous transaction for response frame, #HinawaSndEfw::responded GObject si The number of quadlets in the args array. + line="159">The number of quadlets in the args array. The sequence number for response transaction; + line="160">The sequence number for response transaction; @@ -3029,12 +2772,16 @@ asynchronous transaction for response frame, #HinawaSndEfw::responded GObject si Transfer asynchronous transaction for command frame of Echo Fireworks protocol, then wait + line="254">Transfer asynchronous transaction for command frame of Echo Fireworks protocol, then wait asynchronous transaction for response frame within the given timeout. - + Use implementation of [method@Hitaki.EfwProtocol.transaction] in + [class@Hitaki.SndEfw] instead. + @@ -3042,19 +2789,19 @@ asynchronous transaction for response frame within the given timeout. A #HinawaSndEfw. + line="256">A [class@SndEfw]. one of category for the transaction. + line="257">one of category for the transaction. one of commands for the transaction. + line="258">one of commands for the transaction. allow-none="1"> An array with elements for - quadlet data as arguments for command. + line="259">An array with elements for quadlet data as + arguments for command. @@ -3072,7 +2819,7 @@ asynchronous transaction for response frame within the given timeout. The number of quadlets in the args array. + line="261">The number of quadlets in the args array. allow-none="1"> An array with elements for - quadlet data to save parameters in response. Callers should give it - for buffer with enough space against the request since this library - performs no reallocation. Due to the reason, the value of this - argument should point to the pointer to the array and immutable. - The content of array is mutable for parameters in response. + line="262">An array with elements for quadlet data + to save parameters in response. Callers should give it for buffer with enough space + against the request since this library performs no reallocation. Due to the reason, + the value of this argument should point to the pointer to the array and immutable. The + content of array is mutable for parameters in response. @@ -3099,13 +2845,13 @@ asynchronous transaction for response frame within the given timeout. transfer-ownership="none"> The number of quadlets in the params array. + line="267">The number of quadlets in the params array. The timeout to wait for response of the transaction since request is transferred in + line="268">The timeout to wait for response of the transaction since request is transferred in milliseconds. @@ -3114,16 +2860,19 @@ asynchronous transaction for response frame within the given timeout. - - - - + When the unit transfers asynchronous packet as response for Echo Audio Fireworks -protocol, and the process successfully reads the content of response from ALSA -Fireworks driver, the #HinawaSndEfw::responded signal handler is called with parameters -of the response. + line="69">Emitted when the unit transfers asynchronous packet as response for Echo Audio Fireworks +protocol, and the process successfully reads the content of response from ALSA Fireworks +driver, the [signal@SndEfw::responded] signal handler is called with parameters of the +response. + Use implementation of [class@Hitaki.SndEfw] for + [signal@Hitaki.EfwProtocol::responded] instead. @@ -3131,31 +2880,31 @@ of the response. One of #HinawaSndEfwStatus. + line="72">One of [enum@SndEfwStatus]. The sequence number of response. + line="73">The sequence number of response. The value of category field in the response. + line="74">The value of category field in the response. The value of command field in the response. + line="75">The value of command field in the response. The array with elements for + line="76">The array with elements for quadlet data of response for Echo Fireworks protocol. @@ -3164,7 +2913,7 @@ of the response. The number of elements of the array. + line="78">The number of elements of the array. @@ -3173,13 +2922,13 @@ of the response. - + - + @@ -3187,37 +2936,37 @@ of the response. A #HinawaSndEfw. + line="22">A [class@SndEfw]. One of #HinawaSndEfwStatus. + line="23">One of [enum@SndEfwStatus]. The sequence number of response. + line="24">The sequence number of response. The value of category field in the response. + line="25">The value of category field in the response. The value of command field in the response. + line="26">The value of command field in the response. The array with elements for + line="27">The array with elements for quadlet data of response for Echo Fireworks protocol. @@ -3226,24 +2975,24 @@ of the response. The number of elements of the array. + line="29">The number of elements of the array. - - - A set of status code for Echo Audio Fireworks Transaction. + line="233">A set of status code for Echo Audio Fireworks Transaction. + Use Hitaki.EfwProtocolError in libhitaki library instead. glib:name="HINAWA_SND_EFW_STATUS_OK"> The transaction finishes successfully. + line="235">The transaction finishes successfully. glib:name="HINAWA_SND_EFW_STATUS_BAD"> The request or response includes invalid header. + line="236">The request or response includes invalid header. glib:name="HINAWA_SND_EFW_STATUS_BAD_COMMAND"> The request includes invalid category or command. + line="237">The request includes invalid category or command. glib:name="HINAWA_SND_EFW_STATUS_COMM_ERR"> The transaction fails due to communication error. + line="238">The transaction fails due to communication error. glib:name="HINAWA_SND_EFW_STATUS_BAD_QUAD_COUNT"> The number of quadlets in transaction is invalid. + line="239">The number of quadlets in transaction is invalid. glib:name="HINAWA_SND_EFW_STATUS_UNSUPPORTED"> The request is not supported. + line="240">The request is not supported. glib:name="HINAWA_SND_EFW_STATUS_TIMEOUT"> The transaction is canceled due to response timeout. + line="241">The transaction is canceled due to response timeout. glib:name="HINAWA_SND_EFW_STATUS_DSP_TIMEOUT"> The operation for DSP did not finish within timeout. + line="242">The operation for DSP did not finish within timeout. glib:name="HINAWA_SND_EFW_STATUS_BAD_RATE"> The request includes invalid value for sampling frequency. + line="243">The request includes invalid value for sampling frequency. glib:name="HINAWA_SND_EFW_STATUS_BAD_CLOCK"> The request includes invalid value for source of clock. + line="244">The request includes invalid value for source of clock. glib:name="HINAWA_SND_EFW_STATUS_BAD_CHANNEL"> The request includes invalid value for the number of channel. + line="245">The request includes invalid value for the number of channel. glib:name="HINAWA_SND_EFW_STATUS_BAD_PAN"> The request includes invalid value for panning. + line="246">The request includes invalid value for panning. glib:name="HINAWA_SND_EFW_STATUS_FLASH_BUSY"> The on-board flash is busy and not operable. + line="247">The on-board flash is busy and not operable. glib:name="HINAWA_SND_EFW_STATUS_BAD_MIRROR"> The request includes invalid value for mirroring channel. + line="248">The request includes invalid value for mirroring channel. glib:name="HINAWA_SND_EFW_STATUS_BAD_LED"> The request includes invalid value for LED. + line="249">The request includes invalid value for LED. glib:name="HINAWA_SND_EFW_STATUS_BAD_PARAMETER"> The request includes invalid value of parameter. + line="250">The request includes invalid value of parameter. glib:name="HINAWA_SND_EFW_STATUS_LARGE_RESP"> The size of response is larger than expected. + line="251">The size of response is larger than expected. - + A notification listener for Motu models. +A [class@SndMotu] is an application of asynchronous notification defined by Mark of the Unicorn +(MOTU). + libhitaki library provides [class@Hitaki.SndMotu] as the alternative. + + version="1.3." + deprecated="1" + deprecated-version="2.5."> Instantiate #HinawaSndMotu object and return the instance. - + line="85">Instantiate [class@SndMotu] object and return the instance. + Use [method@Hitaki.SndMotu.new] instead. + an instance of #HinawaSndMotu. + line="90">an instance of [class@SndMotu]. - + When Motu models transfer notification, the #HinawaSndMotuClass::notified handler is -called. - + line="16">Class closure for the [signal@SndMotu::notified] signal. + Use implementation of [vfunc@Hitaki.QuadletNotification.notified] + in [class@Hitaki.SndMotu] instead. + @@ -3433,27 +3197,27 @@ called. A #HinawaSndMotu + line="18">A [class@SndMotu] A notification message + line="19">A notification message - + When MOTU register DSP models transfer events by messages in the sequence of isochronous -packet, the #HinawaSndMotuClass::register_dsp_changed handle is called. -The event consists of encoded data. The most significant byte is the type of message. The -next two bytes are identifier 0 and 1. The least significant byte is value. The meaning -of identifier 0, 1 and value is decided depending on the type. For detail, see -`sound/firewire/motu/motu-register-dsp-message-parser.c` in Linux kernel. - + line="29">Class closure for the [signal@SndMotu::register-dsp-changed] signal. + Use implementation [vfunc@Hitaki.MotuRegisterDsp.changed] in + [class@Hitaki.SndMotu] instead. + @@ -3461,13 +3225,13 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see A #HinawaSndMotu + line="31">A [class@SndMotu] The array with element for + line="32">The array with element for unsigned 32 bit encoded data. @@ -3476,7 +3240,7 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see The length of events. + line="34">The length of events. @@ -3484,11 +3248,15 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see Open ALSA hwdep character device and check it for Motu devices. - + line="100">Open ALSA hwdep character device and check it for Motu devices. + Use implementation of [method@Hitaki.AlsaFirewire.open] in + [class@Hitaki.SndMotu] instead. + @@ -3496,13 +3264,13 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see A #HinawaSndUnit + line="102">A [class@SndMotu] A full path of a special file for ALSA hwdep character device + line="103">A full path of a special file for ALSA hwdep character device @@ -3510,11 +3278,15 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see Read data of meter information for command DSP models. - + line="181">Read data of meter information for command DSP models. + Use implementation of [method@Hitaki.MotuCommandDsp.read_float_meter] in + [class@Hitaki.SndMotu] instead. + @@ -3522,7 +3294,7 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see A #HinawaSndMotu + line="183">A [class@SndMotu] The data for meter. + line="184">The data for meter. @@ -3543,11 +3315,15 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see Read data of meter information for register DSP models. - + line="152">Read data of meter information for register DSP models. + Use implementation of [method@Hitaki.MotuRegisterDsp.read_byte_meter] in + [class@Hitaki.SndMotu] instead. + @@ -3555,7 +3331,7 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see A #HinawaSndMotu + line="154">A [class@SndMotu] The data of meter. Index 0 to 23 for inputs and index 24 + line="155">The data of meter. Index 0 to 23 for inputs and index 24 to 47 for outputs. @@ -3575,11 +3351,15 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see Read parameter for register DSP models. - + line="122">Read parameter for register DSP models. + Use implementation of [method@Hitaki.MotuRegisterDsp.read_parameter] in + [class@Hitaki.SndMotu] instead. + @@ -3587,7 +3367,7 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see A #HinawaSndMotu. + line="124">A [class@SndMotu]. A #HinawaSndMotuRegisterDspParameter. + line="125">A [struct@SndMotuRegisterDspParameter]. @@ -3605,14 +3385,16 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see - - - - + When Motu models transfer notification, the #HinawaSndMotu::notified signal is -generated. + line="32">Emitted when Motu models transfer notification. + Use implementation of [signal@Hitaki.QuadletNotification::notified] + in [class@Hitaki.SndMotu] instead. @@ -3625,15 +3407,20 @@ generated. - + When MOTU register DSP models transfer events by messages in the sequence of isochronous -packet, the #HinawaSndMotu::register-dsp-changed signal is emit. -The event consists of encoded data. The most significant byte is the type of message. The -next two bytes are identifier 0 and 1. The least significant byte is value. The meaning -of identifier 0, 1 and value is decided depending on the type. For detail, see -`sound/firewire/motu/motu-register-dsp-message-parser.c` in Linux kernel. + line="52">Emitted when MOTU register DSP models transfer events by messages in the sequence of +isochronous packet. The event consists of encoded data. The most significant byte is the +type of message. The next two bytes are identifier 0 and 1. The least significant byte +is value. The meaning of identifier 0, 1 and value is decided depending on the type. +For detail, see `sound/firewire/motu/motu-register-dsp-message-parser.c` in Linux kernel. + Use implementation [signal@Hitaki.MotuRegisterDsp::changed] in + [class@Hitaki.SndMotu] instead. @@ -3641,7 +3428,7 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see The array with element for + line="55">The array with element for unsigned 32 bit encoded data. @@ -3650,7 +3437,7 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see The length of events. + line="57">The length of events. @@ -3659,13 +3446,13 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see - + - + @@ -3673,13 +3460,13 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see A #HinawaSndMotu + line="18">A [class@SndMotu] A notification message + line="19">A notification message @@ -3687,7 +3474,7 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see - + @@ -3695,13 +3482,13 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see A #HinawaSndMotu + line="31">A [class@SndMotu] The array with element for + line="32">The array with element for unsigned 32 bit encoded data. @@ -3710,21 +3497,28 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see The length of events. + line="34">The length of events. - - - + A boxed object for container of parameter in register DSP model. +A [struct@SndMotuRegisterDspParameter] is a boxed object for container of parameter in register +DSP model. + libhitaki library provides [struct@Hitaki.SndMotuRegisterDspParameter] as the + alternative. @@ -3734,26 +3528,34 @@ of identifier 0, 1 and value is decided depending on the type. For detail, see + version="2.4" + deprecated="1" + deprecated-version="2.5."> Instantiate #HinawaSndMotuRegisterDspParameter object and return the instance. + line="30">Instantiate [struct@SndMotuRegisterDspParameter] object and return the instance. + Use [method@Hitaki.SndMotuRegisterDspParameter.new] instead. an instance of #HinawaSndMotuRegisterDspParameter. + line="35">an instance of [struct@SndMotuRegisterDspParameter]. + c:identifier="hinawa_snd_motu_register_dsp_parameter_get_headphone_output_paired_assignment" + deprecated="1" + deprecated-version="2.5."> Get the array with elements for the data of paired headphone output source. The data has index + line="273">Get the array with elements for the data of paired headphone output source. The data has index value of source. + Use + [method@Hitaki.SndMotuRegisterDspParameter.get_headphone_output_paired_assignment] + instead. @@ -3763,7 +3565,7 @@ value of source. A #HinawaSndMotuRegisterDspParameter. + line="275">A [struct@SndMotuRegisterDspParameter]. @@ -3773,17 +3575,22 @@ value of source. transfer-ownership="full"> The value of paired headphone assignment. + line="276">The value of paired headphone assignment. + c:identifier="hinawa_snd_motu_register_dsp_parameter_get_headphone_output_paired_volume" + deprecated="1" + deprecated-version="2.5."> Get the array with elements for the data of paired headphone output volume. The data has volume + line="249">Get the array with elements for the data of paired headphone output volume. The data has volume value between 0x00 and 0x80. + Use + [method@Hitaki.SndMotuRegisterDspParameter.get_headphone_output_paired_volume] + instead. @@ -3793,7 +3600,7 @@ value between 0x00 and 0x80. A #HinawaSndMotuRegisterDspParameter. + line="251">A [struct@SndMotuRegisterDspParameter]. @@ -3803,21 +3610,24 @@ value between 0x00 and 0x80. transfer-ownership="full"> The value of paired headphone output. + line="252">The value of paired headphone output. + c:identifier="hinawa_snd_motu_register_dsp_parameter_get_input_flag" + deprecated="1" + deprecated-version="2.5."> Get the array with elements for the data of input flags. The data consists of bit flags below: + line="376">Get the array with elements for the data of input flags. The data consists of bit flags below: - 0x01: whether to make paired input - 0x02: whether to enable phantom powering - 0x04: whether to enable attenuation pad - 0x08: whether to detect plug insert to jack + Use [method@Hitaki.SndMotuRegisterDspParameter.get_input_flag] instead. @@ -3827,7 +3637,7 @@ value between 0x00 and 0x80. A #HinawaSndMotuRegisterDspParameter. + line="378">A [struct@SndMotuRegisterDspParameter]. @@ -3837,7 +3647,7 @@ value between 0x00 and 0x80. transfer-ownership="none"> The array with elements for the data of input + line="379">The array with elements for the data of input flags. @@ -3846,10 +3656,12 @@ value between 0x00 and 0x80. + c:identifier="hinawa_snd_motu_register_dsp_parameter_get_input_gain_and_invert" + deprecated="1" + deprecated-version="2.5."> Get the array with elements for input gain and invert flags. The interpretation of data is + line="345">Get the array with elements for input gain and invert flags. The interpretation of data is different in below two groups: - Ultralite @@ -3858,6 +3670,8 @@ different in below two groups: - Audio Express and 4 pre - 0x3f: the gain - 0x40: whether to invert phase of the input + Use [method@Hitaki.SndMotuRegisterDspParameter.get_input_gain_and_invert] + instead. @@ -3867,7 +3681,7 @@ different in below two groups: A #HinawaSndMotuRegisterDspParameter. + line="347">A [struct@SndMotuRegisterDspParameter]. @@ -3877,7 +3691,7 @@ different in below two groups: transfer-ownership="none"> The array with elements for the data + line="348">The array with elements for the data of input gain and invert flags. @@ -3886,11 +3700,15 @@ different in below two groups: + c:identifier="hinawa_snd_motu_register_dsp_parameter_get_line_input_boost_flag" + deprecated="1" + deprecated-version="2.5."> Get the data for flags of line input boost. The data consists of bit flags for corresponding line + line="297">Get the data for flags of line input boost. The data consists of bit flags for corresponding line input channel. When the flag stands, the input is boosted. + Use [method@Hitaki.SndMotuRegisterDspParameter.get_line_input_boost_flag] + instead. @@ -3900,7 +3718,7 @@ input channel. When the flag stands, the input is boosted. A #HinawaSndMotuRegisterDspParameter. + line="299">A [struct@SndMotuRegisterDspParameter]. @@ -3910,18 +3728,23 @@ input channel. When the flag stands, the input is boosted. transfer-ownership="full"> The flag of boost for line input. + line="300">The flag of boost for line input. + c:identifier="hinawa_snd_motu_register_dsp_parameter_get_line_input_nominal_level_flag" + deprecated="1" + deprecated-version="2.5."> Get the data for flags of line input nominal level. The data consists of bit flags for + line="320">Get the data for flags of line input nominal level. The data consists of bit flags for corresponding line input channel. When the flag stands, the nominal level of input is +4 dBu, else -10 dBV. + Use + [method@Hitaki.SndMotuRegisterDspParameter.get_line_input_nominal_level_flag] + instead. @@ -3931,7 +3754,7 @@ else -10 dBV. A #HinawaSndMotuRegisterDspParameter. + line="322">A [struct@SndMotuRegisterDspParameter]. @@ -3941,17 +3764,21 @@ else -10 dBV. transfer-ownership="full"> The flag of boost for line input. + line="323">The flag of boost for line input. + c:identifier="hinawa_snd_motu_register_dsp_parameter_get_main_output_paired_volume" + deprecated="1" + deprecated-version="2.5."> Get the array with elements for the data of paired main output volume. The data has volume value + line="226">Get the array with elements for the data of paired main output volume. The data has volume value between 0x00 and 0x80. + Use [method@Hitaki.SndMotuRegisterDspParameter.get_main_output_paired_volume] + instead. @@ -3961,7 +3788,7 @@ between 0x00 and 0x80. A #HinawaSndMotuRegisterDspParameter. + line="228">A [struct@SndMotuRegisterDspParameter]. @@ -3971,20 +3798,24 @@ between 0x00 and 0x80. transfer-ownership="full"> The value of paired main output. + line="229">The value of paired main output. + c:identifier="hinawa_snd_motu_register_dsp_parameter_get_mixer_output_paired_flag" + deprecated="1" + deprecated-version="2.5."> Get the array with elements for the data of paired output flags in indicated mixer. The data + line="199">Get the array with elements for the data of paired output flags in indicated mixer. The data consists of bit flags and masks below: - 0x0f: the mask for destination of paired output - 0x10: whether to enable mute for paired output + Use [method@Hitaki.SndMotuRegisterDspParameter.get_mixer_output_paired_flag] + instead. @@ -3994,7 +3825,7 @@ consists of bit flags and masks below: A #HinawaSndMotuRegisterDspParameter. + line="201">A [struct@SndMotuRegisterDspParameter]. @@ -4004,7 +3835,7 @@ consists of bit flags and masks below: transfer-ownership="none"> The array with elements for the data of paired + line="202">The array with elements for the data of paired output flag. @@ -4013,11 +3844,15 @@ consists of bit flags and masks below: + c:identifier="hinawa_snd_motu_register_dsp_parameter_get_mixer_output_paired_volume" + deprecated="1" + deprecated-version="2.5."> Get the array with elements for the data of paired output volume in indicated mixer. The data + line="175">Get the array with elements for the data of paired output volume in indicated mixer. The data has gain value between 0x00 and 0x80. + Use [method@Hitaki.SndMotuRegisterDspParameter.get_mixer_output_paired_volume] + instead. @@ -4027,7 +3862,7 @@ has gain value between 0x00 and 0x80. A #HinawaSndMotuRegisterDspParameter. + line="177">A [struct@SndMotuRegisterDspParameter]. @@ -4037,7 +3872,7 @@ has gain value between 0x00 and 0x80. transfer-ownership="none"> The array with elements for the data of + line="178">The array with elements for the data of paired output volume. @@ -4046,14 +3881,17 @@ has gain value between 0x00 and 0x80. + c:identifier="hinawa_snd_motu_register_dsp_parameter_get_mixer_source_flag" + deprecated="1" + deprecated-version="2.5."> Get the array with elements for the data of source flags in indicated mixer. The data consists of + line="95">Get the array with elements for the data of source flags in indicated mixer. The data consists of bit flags below: - 0x01: whether to enable mute function for the source. - 0x02: whether to enable solo function for the source. + Use [method@Hitaki.SndMotuRegisterDspParameter.get_mixer_source_flag] instead. @@ -4063,14 +3901,14 @@ bit flags below: A #HinawaSndMotuRegisterDspParameter. + line="97">A [struct@SndMotuRegisterDspParameter]. the numeric index of mixer, up to 4. + line="98">the numeric index of mixer, up to 4. The array with elements for the data of source + line="99">The array with elements for the data of source flag. @@ -4088,11 +3926,14 @@ bit flags below: + c:identifier="hinawa_snd_motu_register_dsp_parameter_get_mixer_source_gain" + deprecated="1" + deprecated-version="2.5."> Get the array with elements for the data of source gains in indicated mixer. The data has gain + line="45">Get the array with elements for the data of source gains in indicated mixer. The data has gain value between 0x00 and 0x80. + Use [method@Hitaki.SndMotuRegisterDspParameter.get_mixer_source_gain] instead. @@ -4102,14 +3943,14 @@ value between 0x00 and 0x80. A #HinawaSndMotuRegisterDspParameter. + line="47">A [struct@SndMotuRegisterDspParameter]. the numeric index of mixer, up to 4. + line="48">the numeric index of mixer, up to 4. transfer-ownership="none"> The array with elements for the data of source + line="49">The array with elements for the data of source gains. @@ -4127,11 +3968,15 @@ value between 0x00 and 0x80. + c:identifier="hinawa_snd_motu_register_dsp_parameter_get_mixer_source_paired_balance" + deprecated="1" + deprecated-version="2.5."> Get the array with elements for the data of paired source L/R balance in indicated mixer. The + line="123">Get the array with elements for the data of paired source L/R balance in indicated mixer. The data has L/R balance value between 0x00 and 0x80. + Use [method@Hitaki.SndMotuRegisterDspParameter.get_mixer_source_paired_balance] + instead. @@ -4141,14 +3986,14 @@ data has L/R balance value between 0x00 and 0x80. A #HinawaSndMotuRegisterDspParameter. + line="125">A [struct@SndMotuRegisterDspParameter]. the numeric index of mixer, up to 4. + line="126">the numeric index of mixer, up to 4. transfer-ownership="none"> The array with elements for the data of + line="127">The array with elements for the data of paired source L/R balance. @@ -4166,11 +4011,15 @@ data has L/R balance value between 0x00 and 0x80. + c:identifier="hinawa_snd_motu_register_dsp_parameter_get_mixer_source_paired_width" + deprecated="1" + deprecated-version="2.5."> Get the array with elements for the data of paired source width in indicated mixer. The data + line="149">Get the array with elements for the data of paired source width in indicated mixer. The data has width value between 0x00 and 0x80. + Use [method@Hitaki.SndMotuRegisterDspParameter.get_mixer_source_paired_width] + instead. @@ -4180,14 +4029,14 @@ has width value between 0x00 and 0x80. A #HinawaSndMotuRegisterDspParameter. + line="151">A [struct@SndMotuRegisterDspParameter]. the numeric index of mixer, up to 4. + line="152">the numeric index of mixer, up to 4. transfer-ownership="none"> The array with elements for the data of + line="153">The array with elements for the data of paired source width. @@ -4205,11 +4054,14 @@ has width value between 0x00 and 0x80. + c:identifier="hinawa_snd_motu_register_dsp_parameter_get_mixer_source_pan" + deprecated="1" + deprecated-version="2.5."> Get the array with elements for the data of source pans in indicated mixer. The data has pan + line="70">Get the array with elements for the data of source pans in indicated mixer. The data has pan value between 0x00 and 0x80. + Use [method@Hitaki.SndMotuRegisterDspParameter.get_mixer_source_pan] instead. @@ -4219,14 +4071,14 @@ value between 0x00 and 0x80. A #HinawaSndMotuRegisterDspParameter. + line="72">A [struct@SndMotuRegisterDspParameter]. the numeric index of mixer, up to 4. + line="73">the numeric index of mixer, up to 4. transfer-ownership="none"> The array with elements for the data of source + line="74">The array with elements for the data of source pan. @@ -4247,31 +4099,45 @@ value between 0x00 and 0x80. - + A state reader for Tascam FireWire models +A [class@SndTscm] is an application of protocol defined by TASCAM. + libhitaki library provides [class@Hitaki.SndTascam] as the alternative. + + version="1.3." + deprecated="1" + deprecated-version="2.5."> Instantiate #HinawaSndTscm object and return the instance. - + line="61">Instantiate [class@SndTscm] object and return the instance. + Use [method@Hitaki.SndTascam.new] instead. + an instance of #HinawaSndTscm. + line="66">an instance of [class@SndTscm]. - + When TASCAM FireWire unit transfer control message, the #HinawaSndTscmClass::control -handler is emitted. - + line="16">Class closure for the [signal@SndTscm::control] signal. + Use implementation of [vfunc@Hitaki.TascamProtocol.changed] in + [class@Hitaki.SndTascam] instead. + @@ -4279,25 +4145,25 @@ handler is emitted. A #HinawaSndTscm + line="18">A [class@SndTscm] the numerical index on image of status and control info. + line="19">the numeric index on image of status and control info. the value of info before changed. + line="20">the value of info before changed. the value of info after changed. + line="21">the value of info after changed. @@ -4305,15 +4171,19 @@ handler is emitted. Get the latest states of target device. - + line="98">Get the latest states of target device. + Use implementation of [method@Hitaki.TascamProtocol.read_state] in + [class@Hitaki.SndTascam] instead. + state image. + line="105">state image. @@ -4322,7 +4192,7 @@ handler is emitted. A #HinawaSndTscm + line="100">A [class@SndTscm] @@ -4330,11 +4200,15 @@ handler is emitted. Open ALSA hwdep character device and check it for Dg00x devices. - + line="76">Open ALSA hwdep character device and check it for Tascam devices. + Use implementation of [method@Hitaki.AlsaFirewire.open] in + [class@Hitaki.SndTascam] instead. + @@ -4342,13 +4216,13 @@ handler is emitted. A #HinawaSndUnit + line="78">A [class@SndTscm] A full path of a special file for ALSA hwdep character device + line="79">A full path of a special file for ALSA hwdep character device @@ -4356,14 +4230,17 @@ handler is emitted. - - - - + When TASCAM FireWire unit transfer control message, the #HinawaSndTscm::control -signal is emitted. + line="31">Emitted when TASCAM FireWire unit transfer control message. +is emitted. + Use implementation of [signal@Hitaki.TascamProtocol::changed] in + [class@Hitaki.SndTascam] instead. @@ -4371,19 +4248,19 @@ signal is emitted. the numerical index on image of status and control info. + line="34">the numeric index on image of status and control info. the value of info before changed. + line="35">the value of info before changed. the value of info after changed. + line="36">the value of info after changed. @@ -4392,13 +4269,13 @@ signal is emitted. - + - + @@ -4406,64 +4283,74 @@ signal is emitted. A #HinawaSndTscm + line="18">A [class@SndTscm] the numerical index on image of status and control info. + line="19">the numeric index on image of status and control info. the value of info before changed. + line="20">the value of info before changed. the value of info after changed. + line="21">the value of info after changed. - - - - + An event listener for ALSA FireWire sound devices. +This class is an application of ALSA FireWire stack. Any functionality which ALSA drivers in the +stack can be available. + libhitaki library provides [class@Hitaki.SndUnit] as the alternative. + + version="1.3." + deprecated="1" + deprecated-version="2.5."> Instantiate #HinawaSndUnit object and return the instance. - + line="259">Instantiate [class@SndUnit] object and return the instance. + Use [method@Hitaki.SndUnit.new] instead. + an instance of #HinawaSndUnit. + line="264">an instance of [class@SndUnit]. - + When the sound card is not available anymore due to unbinding driver -or hot unplugging, this signal is emit. The owner of this object -should call g_object_free() as quickly as possible to release ALSA -hwdep character device. - + line="33">Class closure for the [signal@SndUnit::disconnected]. + Use change notify signal of + [property@Hitaki.AlsaFirewire:is-disconnected] instead. + @@ -4471,17 +4358,21 @@ hwdep character device. A #HinawaSndUnit + line="35">A [class@SndUnit] - + When ALSA kernel-streaming status is changed, this #HinawaSndUnitClass::lock_status -handler is called. - + line="20">Class closure for the [signal@SndUnit::lock-status], + Use change notify signal of [property@Hitaki.AlsaFirewire:is-locked] + instead. + @@ -4489,13 +4380,13 @@ handler is called. A #HinawaSndUnit + line="22">A [class@SndUnit] %TRUE when locked, %FALSE when unlocked. + line="23">%TRUE when locked, %FALSE when unlocked. @@ -4503,11 +4394,16 @@ handler is called. Create Gsource for GMainContext to dispatch events for the sound device. - + line="613">Create [struct@GLib.Source] for [struct@GLib.MainContext] to dispatch events for the sound +device. + Use implementation of [method@Hitaki.AlsaFirewire.create_source] in + [class@Hitaki.SndUnit] instead. + @@ -4515,7 +4411,7 @@ handler is called. A #HinawaSndUnit. + line="615">A [class@SndUnit]. transfer-ownership="full"> A #GSource. + line="616">A [struct@GLib.Source]. + version="2.0." + deprecated="1" + deprecated-version="2.5."> Retrieve an instance of #HinawaFwNode associated to the given unit. - + line="357">Retrieve an instance of [class@FwNode] associated to the given unit. + Instantiate [class@FwNode] according to + [property@Hitaki.AlsaFirewire:node-device] instead. + @@ -4543,7 +4443,7 @@ handler is called. A #HinawaSndUnit. + line="359">A [class@SndUnit]. transfer-ownership="none"> A #HinawaFwNode. + line="360">A [class@FwNode]. @@ -4560,11 +4460,15 @@ handler is called. Disallow ALSA to start kernel-streaming. - + line="380">Disallow corresponding ALSA driver to start packet streaming. + Use implementation of [method@Hitaki.AlsaFirewire.lock] in + [class@Hitaki.SndUnit] instead. + @@ -4572,7 +4476,7 @@ handler is called. A #HinawaSndUnit + line="382">A [class@SndUnit] @@ -4580,11 +4484,15 @@ handler is called. Open ALSA hwdep character device and check it for FireWire sound devices. - + line="274">Open ALSA hwdep character device and check it for FireWire sound devices. + Use implementation of [method@Hitaki.AlsaFirewire.open] in + [class@Hitaki.SndUnit] instead. + @@ -4592,13 +4500,13 @@ handler is called. A #HinawaSndUnit + line="276">A [class@SndUnit] A full path of a special file for ALSA hwdep character device + line="277">A full path of a special file for ALSA hwdep character device @@ -4606,11 +4514,15 @@ handler is called. Allow ALSA to start kernel-streaming. - + line="414">Allow corresponding ALSA driver to start packet streaming. + Use implementation of [method@Hitaki.AlsaFirewire.unlock] in + [class@Hitaki.SndUnit] instead. + @@ -4618,48 +4530,81 @@ handler is called. A #HinawaSndUnit + line="416">A [class@SndUnit] - + + Use [property@Hitaki.AlsaFirewire:card_id] instead. - + + Use [property@Hitaki.AlsaFirewire:node-device] instead. - + + Use [property@Hitaki.AlsaFirewire:guid] instead. - + + Use [property@Hitaki.AlsaFirewire:is-locked] instead. - + + Use [property@Hitaki.AlsaFirewire:unit-type] instead. - - - - + When the sound card is not available anymore due to unbinding driver -or hot unplugging, this signal is emit. The owner of this object -should call g_object_free() as quickly as possible to release ALSA -hwdep character device. + line="229">Emitted when the sound card is not available anymore due to unbinding driver or hot +unplugging. The owner of this object should call [method@GObject.Object.unref] as +quickly as possible to release ALSA hwdep character device. + Use change notify signal of + [property@Hitaki.AlsaFirewire:is-disconnected] instead. - + When ALSA kernel-streaming status is changed, this #HinawaSndUnit::lock-status -signal is generated. + line="208">Emitted when corresponding ALSA driver changes status of lock by starting/stopping +packet streaming requested by ALSA PCM/Rawmidi applications. + Use change notify signal of [property@Hitaki.AlsaFirewire:is-locked] + instead. @@ -4667,7 +4612,7 @@ signal is generated. %TRUE when locked, %FALSE when unlocked. + line="211">%TRUE when locked, %FALSE when unlocked. @@ -4676,13 +4621,13 @@ signal is generated. - + - + @@ -4690,13 +4635,13 @@ signal is generated. A #HinawaSndUnit + line="22">A [class@SndUnit] %TRUE when locked, %FALSE when unlocked. + line="23">%TRUE when locked, %FALSE when unlocked. @@ -4704,7 +4649,7 @@ signal is generated. - + @@ -4712,7 +4657,7 @@ signal is generated. A #HinawaSndUnit + line="35">A [class@SndUnit] @@ -4721,13 +4666,16 @@ signal is generated. A set of error code for GError with domain which equals to #hinawa_snd_unit_error_quark(). + line="191">A set of error code for [struct@GLib.Error] with domain which equals to Hinawa.SndUnitError. + Use Hitaki.AlsaFirewireError in libhitaki library instead. glib:name="HINAWA_SND_UNIT_ERROR_DISCONNECTED"> The hwdep device associated to the instance is disconnected. + line="193">The hwdep device associated to the instance is disconnected. glib:name="HINAWA_SND_UNIT_ERROR_USED"> The hedep device is already in use. + line="194">The hedep device is already in use. glib:name="HINAWA_SND_UNIT_ERROR_OPENED"> The instance is already associated to unit by opening hwdep + line="195">The instance is already associated to unit by opening hwdep character device. glib:name="HINAWA_SND_UNIT_ERROR_NOT_OPENED"> The instance is not associated to unit yet by opening hwdep + line="197">The instance is not associated to unit yet by opening hwdep character device. glib:name="HINAWA_SND_UNIT_ERROR_LOCKED"> The hwdep device is already locked for kernel packet streaming. + line="199">The hwdep device is already locked for kernel packet streaming. glib:name="HINAWA_SND_UNIT_ERROR_UNLOCKED"> The hwdep device is not locked for kernel packet streaming yet. + line="200">The hwdep device is not locked for kernel packet streaming yet. glib:name="HINAWA_SND_UNIT_ERROR_WRONG_CLASS"> The hwdep device is not for the unit expected by the class. + line="201">The hwdep device is not for the unit expected by the class. glib:name="HINAWA_SND_UNIT_ERROR_FAILED"> The system call fails. + line="202">The system call fails. + version="2.1" + deprecated="1" + deprecated-version="2.5."> Return the GQuark for error domain of GError which has code in #HinawaSndUnitError. + line="25">Return the [alias@GLib.Quark] for [struct@GLib.Error] which has code in Hinawa.SndUnitError. + Use Hitaki.AlsaFirewireError instead. A #GQuark. + line="33">A [alias@GLib.Quark]. - - - A representation of type for sound unit defined by Linux sound subsystem. + line="114">A representation of type for sound unit defined by Linux sound subsystem. + Use [enum@Hitaki.AlsaFirewireType] in libhitaki library instead. glib:name="HINAWA_SND_UNIT_TYPE_DICE"> The type of DICE ASIC. + line="116">The type of DICE ASIC. glib:name="HINAWA_SND_UNIT_TYPE_FIREWORKS"> The type of Fireworks board module. + line="117">The type of Fireworks board module. glib:name="HINAWA_SND_UNIT_TYPE_BEBOB"> The type of BeBoB ASIC. + line="118">The type of BeBoB ASIC. glib:name="HINAWA_SND_UNIT_TYPE_OXFW"> The type of OXFW ASIC + line="119">The type of OXFW ASIC glib:name="HINAWA_SND_UNIT_TYPE_DIGI00X"> The type of Digi00x series. + line="120">The type of Digi00x series. glib:name="HINAWA_SND_UNIT_TYPE_TASCAM"> The type of Tascam FireWire series. + line="121">The type of Tascam FireWire series. glib:name="HINAWA_SND_UNIT_TYPE_MOTU"> The type of MOTU FireWire series. + line="122">The type of MOTU FireWire series. glib:name="HINAWA_SND_UNIT_TYPE_FIREFACE"> The type of RME Fireface series. + line="123">The type of RME Fireface series. - - A HinawaFwFcp supports Function Control Protocol (FCP) in IEC 61883-1, in which no way is defined -to match response against command by the contents of frames. In 'AV/C Digital Interface Command -Set General Specification Version 4.2' (Sep 1 2004, 1394TA), a pair of command and response is -loosely matched by the contents of frames. For convenience, HinawaFwFcp supports synchronous API -of command and response for AV/C specification. - -Any of transaction frames should be aligned to 8bit (byte). -This class is an application of #HinawaFwReq / #HinawaFwResp. - Return the GQuark for error domain of GError which has code in #HinawaFwFcpError. + line="20">Return the [alias@GLib.Quark] for [struct@GLib.Error] which has code in Hinawa.FwFcpError. A #GQuark. + line="27">A [alias@GLib.Quark]. - - A #HinawaFwNode is an event listener for a specified node on IEEE 1394 bus. -This class is an application of Linux FireWire subsystem. -All of operations utilize ioctl(2) with subsystem specific request commands. - Return the GQuark for error domain of GError which has code in #HinawaFwNodeError. + line="41">Return the [alias@GLib.Quark] for [struct@GLib.Error] with Hinawa.FwNodeError domain. A #GQuark. + line="48">A [alias@GLib.Quark]. - + A HinawaFwReq supports some types of transactions in IEEE 1212. Mainly for -read, write and lock operations. - -This class is an application of Linux FireWire subsystem. All of operations -utilize ioctl(2) with subsystem specific request commands. - - - A HinawaFwResp responds requests from any units. - -This class is an application of Linux FireWire subsystem. All of operations -utilize ioctl(2) with subsystem specific request commands. - + line="19">Return the [alias@GLib.Quark] for [struct@GLib.Error] with code of [enum@FwRcode]. + + A [alias@GLib.Quark]. + + + Return the GQuark for error domain of GError which has code in #HinawaFwRespError. + line="18">Return the [alias@GLib.Quark] for error domain of [struct@GLib.Error] which has code in +Hinawa.FwRespError. A #GQuark. + line="26">A [alias@GLib.Quark]. - - A #HinawaSndDg00x listen to Dg00x notification and generates signal when -received. This inherits #HinawaSndUnit. - - - A #HinawaSndDice listen to Dice notification and generates signal when -received. This inherits #HinawaSndUnit. - + version="2.1" + deprecated="1" + deprecated-version="2.5."> Return the GQuark for error domain of GError which has code in #HinawaSndDiceError. + line="16">Return the [alias@GLib.Quark] for [struct@GLib.Error] which has code in Hinawa.SndDiceError. A #GQuark. + line="24">A [alias@GLib.Quark]. - - A #HinawaSndEfw is an application of Echo Fireworks Transaction (EFT). -This inherits #HinawaSndUnit. - - - A #HinawaSndMotu is an application of asynchronous notification defined by -Mark of the Unicorn (MOTU). This inherits #HinawaSndUnit. - - - A #HinawaSndMotuRegisterDspParameter is a boxed object for container of parameter in register -DSP model. - - - A #HinawaSndTscm is an application of protocol defined by TASCAM. This -inherits #HinawaSndUnit. - - - This class is an application of ALSA FireWire stack. Any functionality which -ALSA drivers in the stack can be available. - + version="2.1" + deprecated="1" + deprecated-version="2.5."> Return the GQuark for error domain of GError which has code in #HinawaSndUnitError. + line="25">Return the [alias@GLib.Quark] for [struct@GLib.Error] which has code in Hinawa.SndUnitError. + Use Hitaki.AlsaFirewireError instead. A #GQuark. + line="33">A [alias@GLib.Quark]. diff --git a/README.rst b/README.rst index 870d05e..076bd25 100644 --- a/README.rst +++ b/README.rst @@ -2,17 +2,19 @@ hinawa Rust bindings ==================== -2022/03/17 +2022/05/26 Takashi Sakamoto Introduction ============ -* This repository includes FFI and API bindings for ``libhinawa2`` which provides ``Hinawa-3.0.gir``. +* This repository includes FFI and API bindings for ``libhinawa2`` v2.5.0 or later which + provides ``Hinawa-3.0.gir``. * ``_ -* Unfortunately, it includes no support for ``libhinawa 1`` or former (``Hinawa-2.0.gir`` or ``Hinawa-1.0.gir``). +* Unfortunately, it includes no support for ``libhinawa 1`` or former (``Hinawa-2.0.gir`` or + ``Hinawa-1.0.gir``) as well as sound unit support deprecated at libhinawa v2.5.0. License ======= @@ -23,7 +25,7 @@ Dependencies ============ * Rust version 1.57 or later (edition 2021) -* `libhinawa `_ +* `libhinawa 2.5.0 or later `_ * FFI crate (``hinawa-sys``) * ``libc`` >= 0.2 diff --git a/gir b/gir index 78e3d3c..c8a7a13 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit 78e3d3c223436bd056b312fe54d845eea8d29f27 +Subproject commit c8a7a13d2c4d3a57ae646e38a821d57243cf7983 diff --git a/gir-files b/gir-files index 5ca6054..7ebd447 160000 --- a/gir-files +++ b/gir-files @@ -1 +1 @@ -Subproject commit 5ca60543e148201f01474866273c35a2c79fc6d5 +Subproject commit 7ebd4478b4a575ebe733bce9a39e0ded27eac7d3 diff --git a/hinawa-sys/Gir.toml b/hinawa-sys/Gir.toml index d8b08fa..f54c3e5 100644 --- a/hinawa-sys/Gir.toml +++ b/hinawa-sys/Gir.toml @@ -3,7 +3,7 @@ girs_directories = ["../gir-files", ".."] work_mode = "sys" library = "Hinawa" version = "3.0" -min_cfg_version = "2.4" +min_cfg_version = "2.5" single_version_file = "." external_libraries = [ "GLib", diff --git a/hinawa-sys/src/lib.rs b/hinawa-sys/src/lib.rs index 32e4d0e..2bb7bb5 100644 --- a/hinawa-sys/src/lib.rs +++ b/hinawa-sys/src/lib.rs @@ -45,6 +45,18 @@ pub const HINAWA_FW_RCODE_GENERATION: HinawaFwRcode = 19; pub const HINAWA_FW_RCODE_NO_ACK: HinawaFwRcode = 20; pub const HINAWA_FW_RCODE_INVALID: HinawaFwRcode = 21; +pub type HinawaFwReqError = c_int; +pub const HINAWA_FW_REQ_ERROR_CONFLICT_ERROR: HinawaFwReqError = 4; +pub const HINAWA_FW_REQ_ERROR_DATA_ERROR: HinawaFwReqError = 5; +pub const HINAWA_FW_REQ_ERROR_TYPE_ERROR: HinawaFwReqError = 6; +pub const HINAWA_FW_REQ_ERROR_ADDRESS_ERROR: HinawaFwReqError = 7; +pub const HINAWA_FW_REQ_ERROR_SEND_ERROR: HinawaFwReqError = 16; +pub const HINAWA_FW_REQ_ERROR_CANCELLED: HinawaFwReqError = 17; +pub const HINAWA_FW_REQ_ERROR_BUSY: HinawaFwReqError = 18; +pub const HINAWA_FW_REQ_ERROR_GENERATION: HinawaFwReqError = 19; +pub const HINAWA_FW_REQ_ERROR_NO_ACK: HinawaFwReqError = 20; +pub const HINAWA_FW_REQ_ERROR_INVALID: HinawaFwReqError = 21; + pub type HinawaFwRespError = c_int; pub const HINAWA_FW_RESP_ERROR_FAILED: HinawaFwRespError = 0; pub const HINAWA_FW_RESP_ERROR_RESERVED: HinawaFwRespError = 1; @@ -129,14 +141,6 @@ impl ::std::fmt::Debug for HinawaFwFcpClass { } } -#[repr(C)] -pub struct _HinawaFwFcpPrivate { - _data: [u8; 0], - _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, -} - -pub type HinawaFwFcpPrivate = *mut _HinawaFwFcpPrivate; - #[derive(Copy, Clone)] #[repr(C)] pub struct HinawaFwNodeClass { @@ -155,14 +159,6 @@ impl ::std::fmt::Debug for HinawaFwNodeClass { } } -#[repr(C)] -pub struct _HinawaFwNodePrivate { - _data: [u8; 0], - _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, -} - -pub type HinawaFwNodePrivate = *mut _HinawaFwNodePrivate; - #[derive(Copy, Clone)] #[repr(C)] pub struct HinawaFwReqClass { @@ -179,14 +175,6 @@ impl ::std::fmt::Debug for HinawaFwReqClass { } } -#[repr(C)] -pub struct _HinawaFwReqPrivate { - _data: [u8; 0], - _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, -} - -pub type HinawaFwReqPrivate = *mut _HinawaFwReqPrivate; - #[derive(Copy, Clone)] #[repr(C)] pub struct HinawaFwRespClass { @@ -217,14 +205,6 @@ impl ::std::fmt::Debug for HinawaFwRespClass { } } -#[repr(C)] -pub struct _HinawaFwRespPrivate { - _data: [u8; 0], - _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, -} - -pub type HinawaFwRespPrivate = *mut _HinawaFwRespPrivate; - #[derive(Copy, Clone)] #[repr(C)] pub struct HinawaSndDg00xClass { @@ -257,14 +237,6 @@ impl ::std::fmt::Debug for HinawaSndDiceClass { } } -#[repr(C)] -pub struct _HinawaSndDicePrivate { - _data: [u8; 0], - _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, -} - -pub type HinawaSndDicePrivate = *mut _HinawaSndDicePrivate; - #[derive(Copy, Clone)] #[repr(C)] pub struct HinawaSndEfwClass { @@ -291,14 +263,6 @@ impl ::std::fmt::Debug for HinawaSndEfwClass { } } -#[repr(C)] -pub struct _HinawaSndEfwPrivate { - _data: [u8; 0], - _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, -} - -pub type HinawaSndEfwPrivate = *mut _HinawaSndEfwPrivate; - #[derive(Copy, Clone)] #[repr(C)] pub struct HinawaSndMotuClass { @@ -317,14 +281,6 @@ impl ::std::fmt::Debug for HinawaSndMotuClass { } } -#[repr(C)] -pub struct _HinawaSndMotuPrivate { - _data: [u8; 0], - _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, -} - -pub type HinawaSndMotuPrivate = *mut _HinawaSndMotuPrivate; - #[derive(Copy, Clone)] #[repr(C)] pub struct HinawaSndMotuRegisterDspParameter { @@ -354,14 +310,6 @@ impl ::std::fmt::Debug for HinawaSndTscmClass { } } -#[repr(C)] -pub struct _HinawaSndTscmPrivate { - _data: [u8; 0], - _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, -} - -pub type HinawaSndTscmPrivate = *mut _HinawaSndTscmPrivate; - #[derive(Copy, Clone)] #[repr(C)] pub struct HinawaSndUnitClass { @@ -380,27 +328,17 @@ impl ::std::fmt::Debug for HinawaSndUnitClass { } } -#[repr(C)] -pub struct _HinawaSndUnitPrivate { - _data: [u8; 0], - _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, -} - -pub type HinawaSndUnitPrivate = *mut _HinawaSndUnitPrivate; - // Classes #[derive(Copy, Clone)] #[repr(C)] pub struct HinawaFwFcp { pub parent_instance: HinawaFwResp, - pub priv_: *mut HinawaFwFcpPrivate, } impl ::std::fmt::Debug for HinawaFwFcp { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("HinawaFwFcp @ {:p}", self)) .field("parent_instance", &self.parent_instance) - .field("priv_", &self.priv_) .finish() } } @@ -409,14 +347,12 @@ impl ::std::fmt::Debug for HinawaFwFcp { #[repr(C)] pub struct HinawaFwNode { pub parent_instance: gobject::GObject, - pub priv_: *mut HinawaFwNodePrivate, } impl ::std::fmt::Debug for HinawaFwNode { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("HinawaFwNode @ {:p}", self)) .field("parent_instance", &self.parent_instance) - .field("priv_", &self.priv_) .finish() } } @@ -425,14 +361,12 @@ impl ::std::fmt::Debug for HinawaFwNode { #[repr(C)] pub struct HinawaFwReq { pub parent_instance: gobject::GObject, - pub priv_: *mut HinawaFwReqPrivate, } impl ::std::fmt::Debug for HinawaFwReq { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("HinawaFwReq @ {:p}", self)) .field("parent_instance", &self.parent_instance) - .field("priv_", &self.priv_) .finish() } } @@ -441,14 +375,12 @@ impl ::std::fmt::Debug for HinawaFwReq { #[repr(C)] pub struct HinawaFwResp { pub parent_instance: gobject::GObject, - pub priv_: *mut HinawaFwRespPrivate, } impl ::std::fmt::Debug for HinawaFwResp { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("HinawaFwResp @ {:p}", self)) .field("parent_instance", &self.parent_instance) - .field("priv_", &self.priv_) .finish() } } @@ -471,14 +403,12 @@ impl ::std::fmt::Debug for HinawaSndDg00x { #[repr(C)] pub struct HinawaSndDice { pub parent_instance: HinawaSndUnit, - pub priv_: *mut HinawaSndDicePrivate, } impl ::std::fmt::Debug for HinawaSndDice { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("HinawaSndDice @ {:p}", self)) .field("parent_instance", &self.parent_instance) - .field("priv_", &self.priv_) .finish() } } @@ -487,14 +417,12 @@ impl ::std::fmt::Debug for HinawaSndDice { #[repr(C)] pub struct HinawaSndEfw { pub parent_instance: HinawaSndUnit, - pub priv_: *mut HinawaSndEfwPrivate, } impl ::std::fmt::Debug for HinawaSndEfw { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("HinawaSndEfw @ {:p}", self)) .field("parent_instance", &self.parent_instance) - .field("priv_", &self.priv_) .finish() } } @@ -503,14 +431,12 @@ impl ::std::fmt::Debug for HinawaSndEfw { #[repr(C)] pub struct HinawaSndMotu { pub parent_instance: HinawaSndUnit, - pub priv_: *mut HinawaSndMotuPrivate, } impl ::std::fmt::Debug for HinawaSndMotu { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("HinawaSndMotu @ {:p}", self)) .field("parent_instance", &self.parent_instance) - .field("priv_", &self.priv_) .finish() } } @@ -519,14 +445,12 @@ impl ::std::fmt::Debug for HinawaSndMotu { #[repr(C)] pub struct HinawaSndTscm { pub parent_instance: HinawaSndUnit, - pub priv_: *mut HinawaSndTscmPrivate, } impl ::std::fmt::Debug for HinawaSndTscm { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("HinawaSndTscm @ {:p}", self)) .field("parent_instance", &self.parent_instance) - .field("priv_", &self.priv_) .finish() } } @@ -535,14 +459,12 @@ impl ::std::fmt::Debug for HinawaSndTscm { #[repr(C)] pub struct HinawaSndUnit { pub parent_instance: gobject::GObject, - pub priv_: *mut HinawaSndUnitPrivate, } impl ::std::fmt::Debug for HinawaSndUnit { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("HinawaSndUnit @ {:p}", self)) .field("parent_instance", &self.parent_instance) - .field("priv_", &self.priv_) .finish() } } @@ -567,6 +489,12 @@ extern "C" { //========================================================================= pub fn hinawa_fw_rcode_get_type() -> GType; + //========================================================================= + // HinawaFwReqError + //========================================================================= + pub fn hinawa_fw_req_error_get_type() -> GType; + pub fn hinawa_fw_req_error_quark() -> glib::GQuark; + //========================================================================= // HinawaFwRespError //========================================================================= @@ -730,7 +658,6 @@ extern "C" { //========================================================================= pub fn hinawa_fw_req_get_type() -> GType; pub fn hinawa_fw_req_new() -> *mut HinawaFwReq; - pub fn hinawa_fw_req_error_quark() -> glib::GQuark; pub fn hinawa_fw_req_transaction( self_: *mut HinawaFwReq, node: *mut HinawaFwNode, diff --git a/hinawa-sys/tests/abi.rs b/hinawa-sys/tests/abi.rs index a13a804..b784982 100644 --- a/hinawa-sys/tests/abi.rs +++ b/hinawa-sys/tests/abi.rs @@ -111,6 +111,7 @@ impl Results { } #[test] +#[cfg(target_os = "linux")] fn cross_validate_constants_with_c() { let mut c_constants: Vec<(String, String)> = Vec::new(); @@ -151,6 +152,7 @@ fn cross_validate_constants_with_c() { } #[test] +#[cfg(target_os = "linux")] fn cross_validate_layout_with_c() { let mut c_layouts = Vec::new(); @@ -274,6 +276,13 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[ alignment: align_of::(), }, ), + ( + "HinawaFwReqError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ( "HinawaFwResp", Layout { @@ -441,6 +450,16 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) HINAWA_FW_RCODE_NO_ACK", "20"), ("(gint) HINAWA_FW_RCODE_SEND_ERROR", "16"), ("(gint) HINAWA_FW_RCODE_TYPE_ERROR", "6"), + ("(gint) HINAWA_FW_REQ_ERROR_ADDRESS_ERROR", "7"), + ("(gint) HINAWA_FW_REQ_ERROR_BUSY", "18"), + ("(gint) HINAWA_FW_REQ_ERROR_CANCELLED", "17"), + ("(gint) HINAWA_FW_REQ_ERROR_CONFLICT_ERROR", "4"), + ("(gint) HINAWA_FW_REQ_ERROR_DATA_ERROR", "5"), + ("(gint) HINAWA_FW_REQ_ERROR_GENERATION", "19"), + ("(gint) HINAWA_FW_REQ_ERROR_INVALID", "21"), + ("(gint) HINAWA_FW_REQ_ERROR_NO_ACK", "20"), + ("(gint) HINAWA_FW_REQ_ERROR_SEND_ERROR", "16"), + ("(gint) HINAWA_FW_REQ_ERROR_TYPE_ERROR", "6"), ("(gint) HINAWA_FW_RESP_ERROR_ADDR_SPACE_USED", "2"), ("(gint) HINAWA_FW_RESP_ERROR_FAILED", "0"), ("(gint) HINAWA_FW_RESP_ERROR_RESERVED", "1"), diff --git a/hinawa-sys/tests/constant.c b/hinawa-sys/tests/constant.c index 3cc3e8e..fa2b2b1 100644 --- a/hinawa-sys/tests/constant.c +++ b/hinawa-sys/tests/constant.c @@ -46,6 +46,16 @@ int main() { PRINT_CONSTANT((gint) HINAWA_FW_RCODE_NO_ACK); PRINT_CONSTANT((gint) HINAWA_FW_RCODE_SEND_ERROR); PRINT_CONSTANT((gint) HINAWA_FW_RCODE_TYPE_ERROR); + PRINT_CONSTANT((gint) HINAWA_FW_REQ_ERROR_ADDRESS_ERROR); + PRINT_CONSTANT((gint) HINAWA_FW_REQ_ERROR_BUSY); + PRINT_CONSTANT((gint) HINAWA_FW_REQ_ERROR_CANCELLED); + PRINT_CONSTANT((gint) HINAWA_FW_REQ_ERROR_CONFLICT_ERROR); + PRINT_CONSTANT((gint) HINAWA_FW_REQ_ERROR_DATA_ERROR); + PRINT_CONSTANT((gint) HINAWA_FW_REQ_ERROR_GENERATION); + PRINT_CONSTANT((gint) HINAWA_FW_REQ_ERROR_INVALID); + PRINT_CONSTANT((gint) HINAWA_FW_REQ_ERROR_NO_ACK); + PRINT_CONSTANT((gint) HINAWA_FW_REQ_ERROR_SEND_ERROR); + PRINT_CONSTANT((gint) HINAWA_FW_REQ_ERROR_TYPE_ERROR); PRINT_CONSTANT((gint) HINAWA_FW_RESP_ERROR_ADDR_SPACE_USED); PRINT_CONSTANT((gint) HINAWA_FW_RESP_ERROR_FAILED); PRINT_CONSTANT((gint) HINAWA_FW_RESP_ERROR_RESERVED); diff --git a/hinawa-sys/tests/layout.c b/hinawa-sys/tests/layout.c index 568b53c..6dbc21a 100644 --- a/hinawa-sys/tests/layout.c +++ b/hinawa-sys/tests/layout.c @@ -17,6 +17,7 @@ int main() { printf("%s;%zu;%zu\n", "HinawaFwRcode", sizeof(HinawaFwRcode), alignof(HinawaFwRcode)); printf("%s;%zu;%zu\n", "HinawaFwReq", sizeof(HinawaFwReq), alignof(HinawaFwReq)); printf("%s;%zu;%zu\n", "HinawaFwReqClass", sizeof(HinawaFwReqClass), alignof(HinawaFwReqClass)); + printf("%s;%zu;%zu\n", "HinawaFwReqError", sizeof(HinawaFwReqError), alignof(HinawaFwReqError)); printf("%s;%zu;%zu\n", "HinawaFwResp", sizeof(HinawaFwResp), alignof(HinawaFwResp)); printf("%s;%zu;%zu\n", "HinawaFwRespClass", sizeof(HinawaFwRespClass), alignof(HinawaFwRespClass)); printf("%s;%zu;%zu\n", "HinawaFwRespError", sizeof(HinawaFwRespError), alignof(HinawaFwRespError)); diff --git a/hinawa-sys/versions.txt b/hinawa-sys/versions.txt index 00e8a32..1313169 100644 --- a/hinawa-sys/versions.txt +++ b/hinawa-sys/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 78e3d3c22343) +Generated by gir (https://github.com/gtk-rs/gir @ c8a7a13d2c4d) from -from gir-files (https://github.com/gtk-rs/gir-files @ 5ca60543e148) +from gir-files (https://github.com/gtk-rs/gir-files @ 7ebd4478b4a5) diff --git a/hinawa/Gir.toml b/hinawa/Gir.toml index 2d7a43a..5f3717e 100644 --- a/hinawa/Gir.toml +++ b/hinawa/Gir.toml @@ -4,21 +4,17 @@ work_mode = "normal" library = "Hinawa" version = "3.0" use_gi_docgen = true -min_cfg_version = "3.0" +min_cfg_version = "2.5" +deprecate_by_min_version = true single_version_file = true generate = [ "Hinawa.FwRcode", "Hinawa.FwTcode", - "Hinawa.SndUnitType", "Hinawa.FwNodeError", + "Hinawa.FwReqError", "Hinawa.FwRespError", "Hinawa.FwFcpError", - "Hinawa.SndUnitError", - "Hinawa.SndDiceError", - "Hinawa.SndEfwStatus", - "Hinawa.SndDice", - "Hinawa.SndDg00x", ] manual = [ @@ -88,102 +84,3 @@ manual_traits = ["FwFcpExtManual"] pattern = "responded" ignore = true doc_trait_name = "FwFcpExtManual" - -[[object]] -name = "Hinawa.SndUnit" -status = "generate" -manual_traits = ["SndUnitExtManual"] - [[object.function]] - pattern = "open" - ignore = true - doc_trait_name = "SndUnitExtManual" - -[[object]] -name = "Hinawa.SndEfw" -status = "generate" -manual_traits = ["SndEfwExtManual"] - [[object.function]] - pattern = "transaction_sync" - ignore = true - doc_trait_name = "SndEfwExtManual" - [[object.function]] - pattern = "transaction" - ignore = true - doc_trait_name = "SndEfwExtManual" - [[object.signal]] - pattern = "responded" - ignore = true - doc_trait_name = "SndEfwExtManual" - [[object.function]] - pattern = "error_quark" - ignore = true - -[[object]] -name = "Hinawa.SndTscm" -status = "generate" -manual_traits = ["SndTscmExtManual"] - [[object.function]] - pattern = "get_state" - ignore = true - doc_trait_name = "SndTscmExtManual" - -[[object]] -name = "Hinawa.SndMotu" -status = "generate" -manual_traits = ["SndMotuExtManual"] - [[object.signal]] - pattern = "register-dsp-changed" - ignore = true - [[object.function]] - pattern = "read_register_dsp_parameter" - ignore = true - doc_trait_name = "SndMotuExtManual" - [[object.function]] - pattern = "read_register_dsp_meter" - ignore = true - doc_trait_name = "SndMotuExtManual" - [[object.function]] - pattern = "read_command_dsp_meter" - ignore = true - doc_trait_name = "SndMotuExtManual" - -[[object]] -name = "Hinawa.SndMotuRegisterDspParameter" -status = "generate" -manual_traits = ["SndMotuRegisterDspParameterExtManual"] - [[object.function]] - pattern = "get_input_flag" - ignore = true - doc_trait_name = "SndMotuRegisterDspParameterExtManual" - [[object.function]] - pattern = "get_input_gain_and_invert" - ignore = true - doc_trait_name = "SndMotuRegisterDspParameterExtManual" - [[object.function]] - pattern = "get_mixer_output_paired_flag" - ignore = true - doc_trait_name = "SndMotuRegisterDspParameterExtManual" - [[object.function]] - pattern = "get_mixer_output_paired_volume" - ignore = true - doc_trait_name = "SndMotuRegisterDspParameterExtManual" - [[object.function]] - pattern = "get_mixer_source_flag" - ignore = true - doc_trait_name = "SndMotuRegisterDspParameterExtManual" - [[object.function]] - pattern = "get_mixer_source_gain" - ignore = true - doc_trait_name = "SndMotuRegisterDspParameterExtManual" - [[object.function]] - pattern = "get_mixer_source_paired_balance" - ignore = true - doc_trait_name = "SndMotuRegisterDspParameterExtManual" - [[object.function]] - pattern = "get_mixer_source_paired_width" - ignore = true - doc_trait_name = "SndMotuRegisterDspParameterExtManual" - [[object.function]] - pattern = "get_mixer_source_pan" - ignore = true - doc_trait_name = "SndMotuRegisterDspParameterExtManual" diff --git a/hinawa/src/auto/enums.rs b/hinawa/src/auto/enums.rs index a0f1279..0333087 100644 --- a/hinawa/src/auto/enums.rs +++ b/hinawa/src/auto/enums.rs @@ -351,6 +351,154 @@ impl ToValue for FwRcode { } } +#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] +#[non_exhaustive] +#[doc(alias = "HinawaFwReqError")] +pub enum FwReqError { + #[doc(alias = "HINAWA_FW_REQ_ERROR_CONFLICT_ERROR")] + ConflictError, + #[doc(alias = "HINAWA_FW_REQ_ERROR_DATA_ERROR")] + DataError, + #[doc(alias = "HINAWA_FW_REQ_ERROR_TYPE_ERROR")] + TypeError, + #[doc(alias = "HINAWA_FW_REQ_ERROR_ADDRESS_ERROR")] + AddressError, + #[doc(alias = "HINAWA_FW_REQ_ERROR_SEND_ERROR")] + SendError, + #[doc(alias = "HINAWA_FW_REQ_ERROR_CANCELLED")] + Cancelled, + #[doc(alias = "HINAWA_FW_REQ_ERROR_BUSY")] + Busy, + #[doc(alias = "HINAWA_FW_REQ_ERROR_GENERATION")] + Generation, + #[doc(alias = "HINAWA_FW_REQ_ERROR_NO_ACK")] + NoAck, + #[doc(alias = "HINAWA_FW_REQ_ERROR_INVALID")] + Invalid, + #[doc(hidden)] + __Unknown(i32), +} + +impl fmt::Display for FwReqError { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!( + f, + "FwReqError::{}", + match *self { + Self::ConflictError => "ConflictError", + Self::DataError => "DataError", + Self::TypeError => "TypeError", + Self::AddressError => "AddressError", + Self::SendError => "SendError", + Self::Cancelled => "Cancelled", + Self::Busy => "Busy", + Self::Generation => "Generation", + Self::NoAck => "NoAck", + Self::Invalid => "Invalid", + _ => "Unknown", + } + ) + } +} + +#[doc(hidden)] +impl IntoGlib for FwReqError { + type GlibType = ffi::HinawaFwReqError; + + fn into_glib(self) -> ffi::HinawaFwReqError { + match self { + Self::ConflictError => ffi::HINAWA_FW_REQ_ERROR_CONFLICT_ERROR, + Self::DataError => ffi::HINAWA_FW_REQ_ERROR_DATA_ERROR, + Self::TypeError => ffi::HINAWA_FW_REQ_ERROR_TYPE_ERROR, + Self::AddressError => ffi::HINAWA_FW_REQ_ERROR_ADDRESS_ERROR, + Self::SendError => ffi::HINAWA_FW_REQ_ERROR_SEND_ERROR, + Self::Cancelled => ffi::HINAWA_FW_REQ_ERROR_CANCELLED, + Self::Busy => ffi::HINAWA_FW_REQ_ERROR_BUSY, + Self::Generation => ffi::HINAWA_FW_REQ_ERROR_GENERATION, + Self::NoAck => ffi::HINAWA_FW_REQ_ERROR_NO_ACK, + Self::Invalid => ffi::HINAWA_FW_REQ_ERROR_INVALID, + Self::__Unknown(value) => value, + } + } +} + +#[doc(hidden)] +impl FromGlib for FwReqError { + unsafe fn from_glib(value: ffi::HinawaFwReqError) -> Self { + match value { + ffi::HINAWA_FW_REQ_ERROR_CONFLICT_ERROR => Self::ConflictError, + ffi::HINAWA_FW_REQ_ERROR_DATA_ERROR => Self::DataError, + ffi::HINAWA_FW_REQ_ERROR_TYPE_ERROR => Self::TypeError, + ffi::HINAWA_FW_REQ_ERROR_ADDRESS_ERROR => Self::AddressError, + ffi::HINAWA_FW_REQ_ERROR_SEND_ERROR => Self::SendError, + ffi::HINAWA_FW_REQ_ERROR_CANCELLED => Self::Cancelled, + ffi::HINAWA_FW_REQ_ERROR_BUSY => Self::Busy, + ffi::HINAWA_FW_REQ_ERROR_GENERATION => Self::Generation, + ffi::HINAWA_FW_REQ_ERROR_NO_ACK => Self::NoAck, + ffi::HINAWA_FW_REQ_ERROR_INVALID => Self::Invalid, + value => Self::__Unknown(value), + } + } +} + +impl ErrorDomain for FwReqError { + fn domain() -> Quark { + unsafe { from_glib(ffi::hinawa_fw_req_error_quark()) } + } + + fn code(self) -> i32 { + self.into_glib() + } + + fn from(code: i32) -> Option { + match code { + ffi::HINAWA_FW_REQ_ERROR_CONFLICT_ERROR => Some(Self::ConflictError), + ffi::HINAWA_FW_REQ_ERROR_DATA_ERROR => Some(Self::DataError), + ffi::HINAWA_FW_REQ_ERROR_TYPE_ERROR => Some(Self::TypeError), + ffi::HINAWA_FW_REQ_ERROR_ADDRESS_ERROR => Some(Self::AddressError), + ffi::HINAWA_FW_REQ_ERROR_SEND_ERROR => Some(Self::SendError), + ffi::HINAWA_FW_REQ_ERROR_CANCELLED => Some(Self::Cancelled), + ffi::HINAWA_FW_REQ_ERROR_BUSY => Some(Self::Busy), + ffi::HINAWA_FW_REQ_ERROR_GENERATION => Some(Self::Generation), + ffi::HINAWA_FW_REQ_ERROR_NO_ACK => Some(Self::NoAck), + ffi::HINAWA_FW_REQ_ERROR_INVALID => Some(Self::Invalid), + value => Some(Self::__Unknown(value)), + } + } +} + +impl StaticType for FwReqError { + fn static_type() -> Type { + unsafe { from_glib(ffi::hinawa_fw_req_error_get_type()) } + } +} + +impl glib::value::ValueType for FwReqError { + type Type = Self; +} + +unsafe impl<'a> FromValue<'a> for FwReqError { + type Checker = glib::value::GenericValueTypeChecker; + + unsafe fn from_value(value: &'a glib::Value) -> Self { + from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + } +} + +impl ToValue for FwReqError { + fn to_value(&self) -> glib::Value { + let mut value = glib::Value::for_value_type::(); + unsafe { + glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); + } + value + } + + fn value_type(&self) -> glib::Type { + Self::static_type() + } +} + #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "HinawaFwRespError")] @@ -618,502 +766,3 @@ impl ToValue for FwTcode { Self::static_type() } } - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] -#[non_exhaustive] -#[doc(alias = "HinawaSndDiceError")] -pub enum SndDiceError { - #[doc(alias = "HINAWA_SND_DICE_ERROR_TIMEOUT")] - Timeout, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for SndDiceError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "SndDiceError::{}", - match *self { - Self::Timeout => "Timeout", - _ => "Unknown", - } - ) - } -} - -#[doc(hidden)] -impl IntoGlib for SndDiceError { - type GlibType = ffi::HinawaSndDiceError; - - fn into_glib(self) -> ffi::HinawaSndDiceError { - match self { - Self::Timeout => ffi::HINAWA_SND_DICE_ERROR_TIMEOUT, - Self::__Unknown(value) => value, - } - } -} - -#[doc(hidden)] -impl FromGlib for SndDiceError { - unsafe fn from_glib(value: ffi::HinawaSndDiceError) -> Self { - match value { - ffi::HINAWA_SND_DICE_ERROR_TIMEOUT => Self::Timeout, - value => Self::__Unknown(value), - } - } -} - -impl ErrorDomain for SndDiceError { - fn domain() -> Quark { - unsafe { from_glib(ffi::hinawa_snd_dice_error_quark()) } - } - - fn code(self) -> i32 { - self.into_glib() - } - - fn from(code: i32) -> Option { - match code { - ffi::HINAWA_SND_DICE_ERROR_TIMEOUT => Some(Self::Timeout), - value => Some(Self::__Unknown(value)), - } - } -} - -impl StaticType for SndDiceError { - fn static_type() -> Type { - unsafe { from_glib(ffi::hinawa_snd_dice_error_get_type()) } - } -} - -impl glib::value::ValueType for SndDiceError { - type Type = Self; -} - -unsafe impl<'a> FromValue<'a> for SndDiceError { - type Checker = glib::value::GenericValueTypeChecker; - - unsafe fn from_value(value: &'a glib::Value) -> Self { - from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl ToValue for SndDiceError { - fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::(); - unsafe { - glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); - } - value - } - - fn value_type(&self) -> glib::Type { - Self::static_type() - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] -#[non_exhaustive] -#[doc(alias = "HinawaSndEfwStatus")] -pub enum SndEfwStatus { - #[doc(alias = "HINAWA_SND_EFW_STATUS_OK")] - Ok, - #[doc(alias = "HINAWA_SND_EFW_STATUS_BAD")] - Bad, - #[doc(alias = "HINAWA_SND_EFW_STATUS_BAD_COMMAND")] - BadCommand, - #[doc(alias = "HINAWA_SND_EFW_STATUS_COMM_ERR")] - CommErr, - #[doc(alias = "HINAWA_SND_EFW_STATUS_BAD_QUAD_COUNT")] - BadQuadCount, - #[doc(alias = "HINAWA_SND_EFW_STATUS_UNSUPPORTED")] - Unsupported, - #[doc(alias = "HINAWA_SND_EFW_STATUS_TIMEOUT")] - Timeout, - #[doc(alias = "HINAWA_SND_EFW_STATUS_DSP_TIMEOUT")] - DspTimeout, - #[doc(alias = "HINAWA_SND_EFW_STATUS_BAD_RATE")] - BadRate, - #[doc(alias = "HINAWA_SND_EFW_STATUS_BAD_CLOCK")] - BadClock, - #[doc(alias = "HINAWA_SND_EFW_STATUS_BAD_CHANNEL")] - BadChannel, - #[doc(alias = "HINAWA_SND_EFW_STATUS_BAD_PAN")] - BadPan, - #[doc(alias = "HINAWA_SND_EFW_STATUS_FLASH_BUSY")] - FlashBusy, - #[doc(alias = "HINAWA_SND_EFW_STATUS_BAD_MIRROR")] - BadMirror, - #[doc(alias = "HINAWA_SND_EFW_STATUS_BAD_LED")] - BadLed, - #[doc(alias = "HINAWA_SND_EFW_STATUS_BAD_PARAMETER")] - BadParameter, - #[doc(alias = "HINAWA_SND_EFW_STATUS_LARGE_RESP")] - LargeResp, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for SndEfwStatus { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "SndEfwStatus::{}", - match *self { - Self::Ok => "Ok", - Self::Bad => "Bad", - Self::BadCommand => "BadCommand", - Self::CommErr => "CommErr", - Self::BadQuadCount => "BadQuadCount", - Self::Unsupported => "Unsupported", - Self::Timeout => "Timeout", - Self::DspTimeout => "DspTimeout", - Self::BadRate => "BadRate", - Self::BadClock => "BadClock", - Self::BadChannel => "BadChannel", - Self::BadPan => "BadPan", - Self::FlashBusy => "FlashBusy", - Self::BadMirror => "BadMirror", - Self::BadLed => "BadLed", - Self::BadParameter => "BadParameter", - Self::LargeResp => "LargeResp", - _ => "Unknown", - } - ) - } -} - -#[doc(hidden)] -impl IntoGlib for SndEfwStatus { - type GlibType = ffi::HinawaSndEfwStatus; - - fn into_glib(self) -> ffi::HinawaSndEfwStatus { - match self { - Self::Ok => ffi::HINAWA_SND_EFW_STATUS_OK, - Self::Bad => ffi::HINAWA_SND_EFW_STATUS_BAD, - Self::BadCommand => ffi::HINAWA_SND_EFW_STATUS_BAD_COMMAND, - Self::CommErr => ffi::HINAWA_SND_EFW_STATUS_COMM_ERR, - Self::BadQuadCount => ffi::HINAWA_SND_EFW_STATUS_BAD_QUAD_COUNT, - Self::Unsupported => ffi::HINAWA_SND_EFW_STATUS_UNSUPPORTED, - Self::Timeout => ffi::HINAWA_SND_EFW_STATUS_TIMEOUT, - Self::DspTimeout => ffi::HINAWA_SND_EFW_STATUS_DSP_TIMEOUT, - Self::BadRate => ffi::HINAWA_SND_EFW_STATUS_BAD_RATE, - Self::BadClock => ffi::HINAWA_SND_EFW_STATUS_BAD_CLOCK, - Self::BadChannel => ffi::HINAWA_SND_EFW_STATUS_BAD_CHANNEL, - Self::BadPan => ffi::HINAWA_SND_EFW_STATUS_BAD_PAN, - Self::FlashBusy => ffi::HINAWA_SND_EFW_STATUS_FLASH_BUSY, - Self::BadMirror => ffi::HINAWA_SND_EFW_STATUS_BAD_MIRROR, - Self::BadLed => ffi::HINAWA_SND_EFW_STATUS_BAD_LED, - Self::BadParameter => ffi::HINAWA_SND_EFW_STATUS_BAD_PARAMETER, - Self::LargeResp => ffi::HINAWA_SND_EFW_STATUS_LARGE_RESP, - Self::__Unknown(value) => value, - } - } -} - -#[doc(hidden)] -impl FromGlib for SndEfwStatus { - unsafe fn from_glib(value: ffi::HinawaSndEfwStatus) -> Self { - match value { - ffi::HINAWA_SND_EFW_STATUS_OK => Self::Ok, - ffi::HINAWA_SND_EFW_STATUS_BAD => Self::Bad, - ffi::HINAWA_SND_EFW_STATUS_BAD_COMMAND => Self::BadCommand, - ffi::HINAWA_SND_EFW_STATUS_COMM_ERR => Self::CommErr, - ffi::HINAWA_SND_EFW_STATUS_BAD_QUAD_COUNT => Self::BadQuadCount, - ffi::HINAWA_SND_EFW_STATUS_UNSUPPORTED => Self::Unsupported, - ffi::HINAWA_SND_EFW_STATUS_TIMEOUT => Self::Timeout, - ffi::HINAWA_SND_EFW_STATUS_DSP_TIMEOUT => Self::DspTimeout, - ffi::HINAWA_SND_EFW_STATUS_BAD_RATE => Self::BadRate, - ffi::HINAWA_SND_EFW_STATUS_BAD_CLOCK => Self::BadClock, - ffi::HINAWA_SND_EFW_STATUS_BAD_CHANNEL => Self::BadChannel, - ffi::HINAWA_SND_EFW_STATUS_BAD_PAN => Self::BadPan, - ffi::HINAWA_SND_EFW_STATUS_FLASH_BUSY => Self::FlashBusy, - ffi::HINAWA_SND_EFW_STATUS_BAD_MIRROR => Self::BadMirror, - ffi::HINAWA_SND_EFW_STATUS_BAD_LED => Self::BadLed, - ffi::HINAWA_SND_EFW_STATUS_BAD_PARAMETER => Self::BadParameter, - ffi::HINAWA_SND_EFW_STATUS_LARGE_RESP => Self::LargeResp, - value => Self::__Unknown(value), - } - } -} - -impl StaticType for SndEfwStatus { - fn static_type() -> Type { - unsafe { from_glib(ffi::hinawa_snd_efw_status_get_type()) } - } -} - -impl glib::value::ValueType for SndEfwStatus { - type Type = Self; -} - -unsafe impl<'a> FromValue<'a> for SndEfwStatus { - type Checker = glib::value::GenericValueTypeChecker; - - unsafe fn from_value(value: &'a glib::Value) -> Self { - from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl ToValue for SndEfwStatus { - fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::(); - unsafe { - glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); - } - value - } - - fn value_type(&self) -> glib::Type { - Self::static_type() - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] -#[non_exhaustive] -#[doc(alias = "HinawaSndUnitError")] -pub enum SndUnitError { - #[doc(alias = "HINAWA_SND_UNIT_ERROR_DISCONNECTED")] - Disconnected, - #[doc(alias = "HINAWA_SND_UNIT_ERROR_USED")] - Used, - #[doc(alias = "HINAWA_SND_UNIT_ERROR_OPENED")] - Opened, - #[doc(alias = "HINAWA_SND_UNIT_ERROR_NOT_OPENED")] - NotOpened, - #[doc(alias = "HINAWA_SND_UNIT_ERROR_LOCKED")] - Locked, - #[doc(alias = "HINAWA_SND_UNIT_ERROR_UNLOCKED")] - Unlocked, - #[doc(alias = "HINAWA_SND_UNIT_ERROR_WRONG_CLASS")] - WrongClass, - #[doc(alias = "HINAWA_SND_UNIT_ERROR_FAILED")] - Failed, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for SndUnitError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "SndUnitError::{}", - match *self { - Self::Disconnected => "Disconnected", - Self::Used => "Used", - Self::Opened => "Opened", - Self::NotOpened => "NotOpened", - Self::Locked => "Locked", - Self::Unlocked => "Unlocked", - Self::WrongClass => "WrongClass", - Self::Failed => "Failed", - _ => "Unknown", - } - ) - } -} - -#[doc(hidden)] -impl IntoGlib for SndUnitError { - type GlibType = ffi::HinawaSndUnitError; - - fn into_glib(self) -> ffi::HinawaSndUnitError { - match self { - Self::Disconnected => ffi::HINAWA_SND_UNIT_ERROR_DISCONNECTED, - Self::Used => ffi::HINAWA_SND_UNIT_ERROR_USED, - Self::Opened => ffi::HINAWA_SND_UNIT_ERROR_OPENED, - Self::NotOpened => ffi::HINAWA_SND_UNIT_ERROR_NOT_OPENED, - Self::Locked => ffi::HINAWA_SND_UNIT_ERROR_LOCKED, - Self::Unlocked => ffi::HINAWA_SND_UNIT_ERROR_UNLOCKED, - Self::WrongClass => ffi::HINAWA_SND_UNIT_ERROR_WRONG_CLASS, - Self::Failed => ffi::HINAWA_SND_UNIT_ERROR_FAILED, - Self::__Unknown(value) => value, - } - } -} - -#[doc(hidden)] -impl FromGlib for SndUnitError { - unsafe fn from_glib(value: ffi::HinawaSndUnitError) -> Self { - match value { - ffi::HINAWA_SND_UNIT_ERROR_DISCONNECTED => Self::Disconnected, - ffi::HINAWA_SND_UNIT_ERROR_USED => Self::Used, - ffi::HINAWA_SND_UNIT_ERROR_OPENED => Self::Opened, - ffi::HINAWA_SND_UNIT_ERROR_NOT_OPENED => Self::NotOpened, - ffi::HINAWA_SND_UNIT_ERROR_LOCKED => Self::Locked, - ffi::HINAWA_SND_UNIT_ERROR_UNLOCKED => Self::Unlocked, - ffi::HINAWA_SND_UNIT_ERROR_WRONG_CLASS => Self::WrongClass, - ffi::HINAWA_SND_UNIT_ERROR_FAILED => Self::Failed, - value => Self::__Unknown(value), - } - } -} - -impl ErrorDomain for SndUnitError { - fn domain() -> Quark { - unsafe { from_glib(ffi::hinawa_snd_unit_error_quark()) } - } - - fn code(self) -> i32 { - self.into_glib() - } - - fn from(code: i32) -> Option { - match code { - ffi::HINAWA_SND_UNIT_ERROR_DISCONNECTED => Some(Self::Disconnected), - ffi::HINAWA_SND_UNIT_ERROR_USED => Some(Self::Used), - ffi::HINAWA_SND_UNIT_ERROR_OPENED => Some(Self::Opened), - ffi::HINAWA_SND_UNIT_ERROR_NOT_OPENED => Some(Self::NotOpened), - ffi::HINAWA_SND_UNIT_ERROR_LOCKED => Some(Self::Locked), - ffi::HINAWA_SND_UNIT_ERROR_UNLOCKED => Some(Self::Unlocked), - ffi::HINAWA_SND_UNIT_ERROR_WRONG_CLASS => Some(Self::WrongClass), - ffi::HINAWA_SND_UNIT_ERROR_FAILED => Some(Self::Failed), - _ => Some(Self::Failed), - } - } -} - -impl StaticType for SndUnitError { - fn static_type() -> Type { - unsafe { from_glib(ffi::hinawa_snd_unit_error_get_type()) } - } -} - -impl glib::value::ValueType for SndUnitError { - type Type = Self; -} - -unsafe impl<'a> FromValue<'a> for SndUnitError { - type Checker = glib::value::GenericValueTypeChecker; - - unsafe fn from_value(value: &'a glib::Value) -> Self { - from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl ToValue for SndUnitError { - fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::(); - unsafe { - glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); - } - value - } - - fn value_type(&self) -> glib::Type { - Self::static_type() - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] -#[non_exhaustive] -#[doc(alias = "HinawaSndUnitType")] -pub enum SndUnitType { - #[doc(alias = "HINAWA_SND_UNIT_TYPE_DICE")] - Dice, - #[doc(alias = "HINAWA_SND_UNIT_TYPE_FIREWORKS")] - Fireworks, - #[doc(alias = "HINAWA_SND_UNIT_TYPE_BEBOB")] - Bebob, - #[doc(alias = "HINAWA_SND_UNIT_TYPE_OXFW")] - Oxfw, - #[doc(alias = "HINAWA_SND_UNIT_TYPE_DIGI00X")] - Digi00x, - #[doc(alias = "HINAWA_SND_UNIT_TYPE_TASCAM")] - Tascam, - #[doc(alias = "HINAWA_SND_UNIT_TYPE_MOTU")] - Motu, - #[doc(alias = "HINAWA_SND_UNIT_TYPE_FIREFACE")] - Fireface, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for SndUnitType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "SndUnitType::{}", - match *self { - Self::Dice => "Dice", - Self::Fireworks => "Fireworks", - Self::Bebob => "Bebob", - Self::Oxfw => "Oxfw", - Self::Digi00x => "Digi00x", - Self::Tascam => "Tascam", - Self::Motu => "Motu", - Self::Fireface => "Fireface", - _ => "Unknown", - } - ) - } -} - -#[doc(hidden)] -impl IntoGlib for SndUnitType { - type GlibType = ffi::HinawaSndUnitType; - - fn into_glib(self) -> ffi::HinawaSndUnitType { - match self { - Self::Dice => ffi::HINAWA_SND_UNIT_TYPE_DICE, - Self::Fireworks => ffi::HINAWA_SND_UNIT_TYPE_FIREWORKS, - Self::Bebob => ffi::HINAWA_SND_UNIT_TYPE_BEBOB, - Self::Oxfw => ffi::HINAWA_SND_UNIT_TYPE_OXFW, - Self::Digi00x => ffi::HINAWA_SND_UNIT_TYPE_DIGI00X, - Self::Tascam => ffi::HINAWA_SND_UNIT_TYPE_TASCAM, - Self::Motu => ffi::HINAWA_SND_UNIT_TYPE_MOTU, - Self::Fireface => ffi::HINAWA_SND_UNIT_TYPE_FIREFACE, - Self::__Unknown(value) => value, - } - } -} - -#[doc(hidden)] -impl FromGlib for SndUnitType { - unsafe fn from_glib(value: ffi::HinawaSndUnitType) -> Self { - match value { - ffi::HINAWA_SND_UNIT_TYPE_DICE => Self::Dice, - ffi::HINAWA_SND_UNIT_TYPE_FIREWORKS => Self::Fireworks, - ffi::HINAWA_SND_UNIT_TYPE_BEBOB => Self::Bebob, - ffi::HINAWA_SND_UNIT_TYPE_OXFW => Self::Oxfw, - ffi::HINAWA_SND_UNIT_TYPE_DIGI00X => Self::Digi00x, - ffi::HINAWA_SND_UNIT_TYPE_TASCAM => Self::Tascam, - ffi::HINAWA_SND_UNIT_TYPE_MOTU => Self::Motu, - ffi::HINAWA_SND_UNIT_TYPE_FIREFACE => Self::Fireface, - value => Self::__Unknown(value), - } - } -} - -impl StaticType for SndUnitType { - fn static_type() -> Type { - unsafe { from_glib(ffi::hinawa_snd_unit_type_get_type()) } - } -} - -impl glib::value::ValueType for SndUnitType { - type Type = Self; -} - -unsafe impl<'a> FromValue<'a> for SndUnitType { - type Checker = glib::value::GenericValueTypeChecker; - - unsafe fn from_value(value: &'a glib::Value) -> Self { - from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl ToValue for SndUnitType { - fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::(); - unsafe { - glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); - } - value - } - - fn value_type(&self) -> glib::Type { - Self::static_type() - } -} diff --git a/hinawa/src/auto/fw_fcp.rs b/hinawa/src/auto/fw_fcp.rs index 969d17a..a99ceb6 100644 --- a/hinawa/src/auto/fw_fcp.rs +++ b/hinawa/src/auto/fw_fcp.rs @@ -52,18 +52,8 @@ pub trait FwFcpExt: 'static { #[doc(alias = "is-bound")] fn is_bound(&self) -> bool; - #[cfg_attr(feature = "v2_1", deprecated = "Since 2.1")] - fn timeout(&self) -> u32; - - #[cfg_attr(feature = "v2_1", deprecated = "Since 2.1")] - fn set_timeout(&self, timeout: u32); - #[doc(alias = "is-bound")] fn connect_is_bound_notify(&self, f: F) -> SignalHandlerId; - - #[deprecated = "Since 2.1"] - #[doc(alias = "timeout")] - fn connect_timeout_notify(&self, f: F) -> SignalHandlerId; } impl> FwFcpExt for O { @@ -112,14 +102,6 @@ impl> FwFcpExt for O { glib::ObjectExt::property(self.as_ref(), "is-bound") } - fn timeout(&self) -> u32 { - glib::ObjectExt::property(self.as_ref(), "timeout") - } - - fn set_timeout(&self, timeout: u32) { - glib::ObjectExt::set_property(self.as_ref(), "timeout", &timeout) - } - fn connect_is_bound_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_is_bound_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::HinawaFwFcp, @@ -141,28 +123,6 @@ impl> FwFcpExt for O { ) } } - - fn connect_timeout_notify(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn notify_timeout_trampoline, F: Fn(&P) + 'static>( - this: *mut ffi::HinawaFwFcp, - _param_spec: glib::ffi::gpointer, - f: glib::ffi::gpointer, - ) { - let f: &F = &*(f as *const F); - f(FwFcp::from_glib_borrow(this).unsafe_cast_ref()) - } - unsafe { - let f: Box_ = Box_::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"notify::timeout\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( - notify_timeout_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } } impl fmt::Display for FwFcp { diff --git a/hinawa/src/auto/fw_req.rs b/hinawa/src/auto/fw_req.rs index 738c1f6..18fad3f 100644 --- a/hinawa/src/auto/fw_req.rs +++ b/hinawa/src/auto/fw_req.rs @@ -3,14 +3,8 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; use glib::translate::*; -use std::boxed::Box as Box_; use std::fmt; -use std::mem::transmute; glib::wrapper! { #[doc(alias = "HinawaFwReq")] @@ -36,50 +30,6 @@ impl Default for FwReq { } } -pub trait FwReqExt: 'static { - #[cfg_attr(feature = "v2_1", deprecated = "Since 2.1")] - fn timeout(&self) -> u32; - - #[cfg_attr(feature = "v2_1", deprecated = "Since 2.1")] - fn set_timeout(&self, timeout: u32); - - #[deprecated = "Since 2.1"] - #[doc(alias = "timeout")] - fn connect_timeout_notify(&self, f: F) -> SignalHandlerId; -} - -impl> FwReqExt for O { - fn timeout(&self) -> u32 { - glib::ObjectExt::property(self.as_ref(), "timeout") - } - - fn set_timeout(&self, timeout: u32) { - glib::ObjectExt::set_property(self.as_ref(), "timeout", &timeout) - } - - fn connect_timeout_notify(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn notify_timeout_trampoline, F: Fn(&P) + 'static>( - this: *mut ffi::HinawaFwReq, - _param_spec: glib::ffi::gpointer, - f: glib::ffi::gpointer, - ) { - let f: &F = &*(f as *const F); - f(FwReq::from_glib_borrow(this).unsafe_cast_ref()) - } - unsafe { - let f: Box_ = Box_::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"notify::timeout\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( - notify_timeout_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } -} - impl fmt::Display for FwReq { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("FwReq") diff --git a/hinawa/src/auto/fw_resp.rs b/hinawa/src/auto/fw_resp.rs index 26229f1..2c5493a 100644 --- a/hinawa/src/auto/fw_resp.rs +++ b/hinawa/src/auto/fw_resp.rs @@ -4,8 +4,6 @@ // DO NOT EDIT use crate::FwNode; -use crate::FwRcode; -use crate::FwTcode; use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; @@ -66,13 +64,6 @@ pub trait FwRespExt: 'static { fn width(&self) -> u32; - #[deprecated = "Since 2.2"] - #[doc(alias = "requested")] - fn connect_requested FwRcode + 'static>( - &self, - f: F, - ) -> SignalHandlerId; - #[doc(alias = "is-reserved")] fn connect_is_reserved_notify(&self, f: F) -> SignalHandlerId; @@ -156,38 +147,6 @@ impl> FwRespExt for O { glib::ObjectExt::property(self.as_ref(), "width") } - fn connect_requested FwRcode + 'static>( - &self, - f: F, - ) -> SignalHandlerId { - unsafe extern "C" fn requested_trampoline< - P: IsA, - F: Fn(&P, FwTcode) -> FwRcode + 'static, - >( - this: *mut ffi::HinawaFwResp, - tcode: ffi::HinawaFwTcode, - f: glib::ffi::gpointer, - ) -> ffi::HinawaFwRcode { - let f: &F = &*(f as *const F); - f( - FwResp::from_glib_borrow(this).unsafe_cast_ref(), - from_glib(tcode), - ) - .into_glib() - } - unsafe { - let f: Box_ = Box_::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"requested\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( - requested_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } - fn connect_is_reserved_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_is_reserved_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::HinawaFwResp, diff --git a/hinawa/src/auto/mod.rs b/hinawa/src/auto/mod.rs index 6ad08fc..e0b9a32 100644 --- a/hinawa/src/auto/mod.rs +++ b/hinawa/src/auto/mod.rs @@ -15,48 +15,17 @@ pub use self::fw_req::FwReq; mod fw_resp; pub use self::fw_resp::FwResp; -mod snd_dg00x; -pub use self::snd_dg00x::SndDg00x; - -mod snd_dice; -pub use self::snd_dice::SndDice; - -mod snd_efw; -pub use self::snd_efw::SndEfw; - -mod snd_motu; -pub use self::snd_motu::SndMotu; - -mod snd_tscm; -pub use self::snd_tscm::SndTscm; - -mod snd_unit; -pub use self::snd_unit::SndUnit; - -mod snd_motu_register_dsp_parameter; -pub use self::snd_motu_register_dsp_parameter::SndMotuRegisterDspParameter; - mod enums; pub use self::enums::FwFcpError; pub use self::enums::FwNodeError; pub use self::enums::FwRcode; +pub use self::enums::FwReqError; pub use self::enums::FwRespError; pub use self::enums::FwTcode; -pub use self::enums::SndDiceError; -pub use self::enums::SndEfwStatus; -pub use self::enums::SndUnitError; -pub use self::enums::SndUnitType; #[doc(hidden)] pub mod traits { pub use super::fw_fcp::FwFcpExt; pub use super::fw_node::FwNodeExt; - pub use super::fw_req::FwReqExt; pub use super::fw_resp::FwRespExt; - pub use super::snd_dg00x::SndDg00xExt; - pub use super::snd_dice::SndDiceExt; - pub use super::snd_efw::SndEfwExt; - pub use super::snd_motu::SndMotuExt; - pub use super::snd_tscm::SndTscmExt; - pub use super::snd_unit::SndUnitExt; } diff --git a/hinawa/src/auto/snd_dg00x.rs b/hinawa/src/auto/snd_dg00x.rs deleted file mode 100644 index a3e9ae9..0000000 --- a/hinawa/src/auto/snd_dg00x.rs +++ /dev/null @@ -1,93 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use crate::SndUnit; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::fmt; -use std::mem::transmute; -use std::ptr; - -glib::wrapper! { - #[doc(alias = "HinawaSndDg00x")] - pub struct SndDg00x(Object) @extends SndUnit; - - match fn { - type_ => || ffi::hinawa_snd_dg00x_get_type(), - } -} - -impl SndDg00x { - pub const NONE: Option<&'static SndDg00x> = None; - - #[doc(alias = "hinawa_snd_dg00x_new")] - pub fn new() -> SndDg00x { - unsafe { from_glib_full(ffi::hinawa_snd_dg00x_new()) } - } -} - -impl Default for SndDg00x { - fn default() -> Self { - Self::new() - } -} - -pub trait SndDg00xExt: 'static { - #[doc(alias = "hinawa_snd_dg00x_open")] - fn open(&self, path: &str) -> Result<(), glib::Error>; - - #[doc(alias = "message")] - fn connect_message(&self, f: F) -> SignalHandlerId; -} - -impl> SndDg00xExt for O { - fn open(&self, path: &str) -> Result<(), glib::Error> { - unsafe { - let mut error = ptr::null_mut(); - let _ = ffi::hinawa_snd_dg00x_open( - self.as_ref().to_glib_none().0, - path.to_glib_none().0, - &mut error, - ); - if error.is_null() { - Ok(()) - } else { - Err(from_glib_full(error)) - } - } - } - - fn connect_message(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn message_trampoline, F: Fn(&P, u32) + 'static>( - this: *mut ffi::HinawaSndDg00x, - message: libc::c_uint, - f: glib::ffi::gpointer, - ) { - let f: &F = &*(f as *const F); - f(SndDg00x::from_glib_borrow(this).unsafe_cast_ref(), message) - } - unsafe { - let f: Box_ = Box_::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"message\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( - message_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } -} - -impl fmt::Display for SndDg00x { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SndDg00x") - } -} diff --git a/hinawa/src/auto/snd_dice.rs b/hinawa/src/auto/snd_dice.rs deleted file mode 100644 index 9009f4e..0000000 --- a/hinawa/src/auto/snd_dice.rs +++ /dev/null @@ -1,116 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use crate::SndUnit; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::fmt; -use std::mem::transmute; -use std::ptr; - -glib::wrapper! { - #[doc(alias = "HinawaSndDice")] - pub struct SndDice(Object) @extends SndUnit; - - match fn { - type_ => || ffi::hinawa_snd_dice_get_type(), - } -} - -impl SndDice { - pub const NONE: Option<&'static SndDice> = None; - - #[doc(alias = "hinawa_snd_dice_new")] - pub fn new() -> SndDice { - unsafe { from_glib_full(ffi::hinawa_snd_dice_new()) } - } -} - -impl Default for SndDice { - fn default() -> Self { - Self::new() - } -} - -pub trait SndDiceExt: 'static { - #[doc(alias = "hinawa_snd_dice_open")] - fn open(&self, path: &str) -> Result<(), glib::Error>; - - #[doc(alias = "hinawa_snd_dice_transaction")] - fn transaction(&self, addr: u64, frame: &[u32], bit_flag: u32) -> Result<(), glib::Error>; - - #[doc(alias = "notified")] - fn connect_notified(&self, f: F) -> SignalHandlerId; -} - -impl> SndDiceExt for O { - fn open(&self, path: &str) -> Result<(), glib::Error> { - unsafe { - let mut error = ptr::null_mut(); - let _ = ffi::hinawa_snd_dice_open( - self.as_ref().to_glib_none().0, - path.to_glib_none().0, - &mut error, - ); - if error.is_null() { - Ok(()) - } else { - Err(from_glib_full(error)) - } - } - } - - fn transaction(&self, addr: u64, frame: &[u32], bit_flag: u32) -> Result<(), glib::Error> { - let frame_count = frame.len() as usize; - unsafe { - let mut error = ptr::null_mut(); - let _ = ffi::hinawa_snd_dice_transaction( - self.as_ref().to_glib_none().0, - addr, - frame.to_glib_none().0, - frame_count, - bit_flag, - &mut error, - ); - if error.is_null() { - Ok(()) - } else { - Err(from_glib_full(error)) - } - } - } - - fn connect_notified(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn notified_trampoline, F: Fn(&P, u32) + 'static>( - this: *mut ffi::HinawaSndDice, - message: libc::c_uint, - f: glib::ffi::gpointer, - ) { - let f: &F = &*(f as *const F); - f(SndDice::from_glib_borrow(this).unsafe_cast_ref(), message) - } - unsafe { - let f: Box_ = Box_::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"notified\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( - notified_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } -} - -impl fmt::Display for SndDice { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SndDice") - } -} diff --git a/hinawa/src/auto/snd_efw.rs b/hinawa/src/auto/snd_efw.rs deleted file mode 100644 index 0baefb1..0000000 --- a/hinawa/src/auto/snd_efw.rs +++ /dev/null @@ -1,100 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use crate::SndUnit; -use glib::object::IsA; -use glib::translate::*; -use std::fmt; -use std::mem; -use std::ptr; - -glib::wrapper! { - #[doc(alias = "HinawaSndEfw")] - pub struct SndEfw(Object) @extends SndUnit; - - match fn { - type_ => || ffi::hinawa_snd_efw_get_type(), - } -} - -impl SndEfw { - pub const NONE: Option<&'static SndEfw> = None; - - #[doc(alias = "hinawa_snd_efw_new")] - pub fn new() -> SndEfw { - unsafe { from_glib_full(ffi::hinawa_snd_efw_new()) } - } -} - -impl Default for SndEfw { - fn default() -> Self { - Self::new() - } -} - -pub trait SndEfwExt: 'static { - #[doc(alias = "hinawa_snd_efw_open")] - fn open(&self, path: &str) -> Result<(), glib::Error>; - - #[doc(alias = "hinawa_snd_efw_transaction_async")] - fn transaction_async( - &self, - category: u32, - command: u32, - args: &[u32], - ) -> Result; -} - -impl> SndEfwExt for O { - fn open(&self, path: &str) -> Result<(), glib::Error> { - unsafe { - let mut error = ptr::null_mut(); - let _ = ffi::hinawa_snd_efw_open( - self.as_ref().to_glib_none().0, - path.to_glib_none().0, - &mut error, - ); - if error.is_null() { - Ok(()) - } else { - Err(from_glib_full(error)) - } - } - } - - fn transaction_async( - &self, - category: u32, - command: u32, - args: &[u32], - ) -> Result { - let arg_count = args.len() as usize; - unsafe { - let mut resp_seqnum = mem::MaybeUninit::uninit(); - let mut error = ptr::null_mut(); - let _ = ffi::hinawa_snd_efw_transaction_async( - self.as_ref().to_glib_none().0, - category, - command, - args.to_glib_none().0, - arg_count, - resp_seqnum.as_mut_ptr(), - &mut error, - ); - let resp_seqnum = resp_seqnum.assume_init(); - if error.is_null() { - Ok(resp_seqnum) - } else { - Err(from_glib_full(error)) - } - } - } -} - -impl fmt::Display for SndEfw { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SndEfw") - } -} diff --git a/hinawa/src/auto/snd_motu.rs b/hinawa/src/auto/snd_motu.rs deleted file mode 100644 index 48b7806..0000000 --- a/hinawa/src/auto/snd_motu.rs +++ /dev/null @@ -1,93 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use crate::SndUnit; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::fmt; -use std::mem::transmute; -use std::ptr; - -glib::wrapper! { - #[doc(alias = "HinawaSndMotu")] - pub struct SndMotu(Object) @extends SndUnit; - - match fn { - type_ => || ffi::hinawa_snd_motu_get_type(), - } -} - -impl SndMotu { - pub const NONE: Option<&'static SndMotu> = None; - - #[doc(alias = "hinawa_snd_motu_new")] - pub fn new() -> SndMotu { - unsafe { from_glib_full(ffi::hinawa_snd_motu_new()) } - } -} - -impl Default for SndMotu { - fn default() -> Self { - Self::new() - } -} - -pub trait SndMotuExt: 'static { - #[doc(alias = "hinawa_snd_motu_open")] - fn open(&self, path: &str) -> Result<(), glib::Error>; - - #[doc(alias = "notified")] - fn connect_notified(&self, f: F) -> SignalHandlerId; -} - -impl> SndMotuExt for O { - fn open(&self, path: &str) -> Result<(), glib::Error> { - unsafe { - let mut error = ptr::null_mut(); - let _ = ffi::hinawa_snd_motu_open( - self.as_ref().to_glib_none().0, - path.to_glib_none().0, - &mut error, - ); - if error.is_null() { - Ok(()) - } else { - Err(from_glib_full(error)) - } - } - } - - fn connect_notified(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn notified_trampoline, F: Fn(&P, u32) + 'static>( - this: *mut ffi::HinawaSndMotu, - message: libc::c_uint, - f: glib::ffi::gpointer, - ) { - let f: &F = &*(f as *const F); - f(SndMotu::from_glib_borrow(this).unsafe_cast_ref(), message) - } - unsafe { - let f: Box_ = Box_::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"notified\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( - notified_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } -} - -impl fmt::Display for SndMotu { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SndMotu") - } -} diff --git a/hinawa/src/auto/snd_motu_register_dsp_parameter.rs b/hinawa/src/auto/snd_motu_register_dsp_parameter.rs deleted file mode 100644 index 673c8ec..0000000 --- a/hinawa/src/auto/snd_motu_register_dsp_parameter.rs +++ /dev/null @@ -1,101 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use glib::translate::*; -use std::mem; - -glib::wrapper! { - #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] - pub struct SndMotuRegisterDspParameter(Boxed); - - match fn { - copy => |ptr| glib::gobject_ffi::g_boxed_copy(ffi::hinawa_snd_motu_register_dsp_parameter_get_type(), ptr as *mut _) as *mut ffi::HinawaSndMotuRegisterDspParameter, - free => |ptr| glib::gobject_ffi::g_boxed_free(ffi::hinawa_snd_motu_register_dsp_parameter_get_type(), ptr as *mut _), - type_ => || ffi::hinawa_snd_motu_register_dsp_parameter_get_type(), - } -} - -impl SndMotuRegisterDspParameter { - #[doc(alias = "hinawa_snd_motu_register_dsp_parameter_new")] - pub fn new() -> SndMotuRegisterDspParameter { - unsafe { from_glib_full(ffi::hinawa_snd_motu_register_dsp_parameter_new()) } - } - - #[doc(alias = "hinawa_snd_motu_register_dsp_parameter_get_headphone_output_paired_assignment")] - #[doc(alias = "get_headphone_output_paired_assignment")] - pub fn headphone_output_paired_assignment(&self) -> u8 { - unsafe { - let mut assignment = mem::MaybeUninit::uninit(); - ffi::hinawa_snd_motu_register_dsp_parameter_get_headphone_output_paired_assignment( - self.to_glib_none().0, - assignment.as_mut_ptr(), - ); - let assignment = assignment.assume_init(); - assignment - } - } - - #[doc(alias = "hinawa_snd_motu_register_dsp_parameter_get_headphone_output_paired_volume")] - #[doc(alias = "get_headphone_output_paired_volume")] - pub fn headphone_output_paired_volume(&self) -> u8 { - unsafe { - let mut volume = mem::MaybeUninit::uninit(); - ffi::hinawa_snd_motu_register_dsp_parameter_get_headphone_output_paired_volume( - self.to_glib_none().0, - volume.as_mut_ptr(), - ); - let volume = volume.assume_init(); - volume - } - } - - #[doc(alias = "hinawa_snd_motu_register_dsp_parameter_get_line_input_boost_flag")] - #[doc(alias = "get_line_input_boost_flag")] - pub fn line_input_boost_flag(&self) -> u8 { - unsafe { - let mut boost_flag = mem::MaybeUninit::uninit(); - ffi::hinawa_snd_motu_register_dsp_parameter_get_line_input_boost_flag( - self.to_glib_none().0, - boost_flag.as_mut_ptr(), - ); - let boost_flag = boost_flag.assume_init(); - boost_flag - } - } - - #[doc(alias = "hinawa_snd_motu_register_dsp_parameter_get_line_input_nominal_level_flag")] - #[doc(alias = "get_line_input_nominal_level_flag")] - pub fn line_input_nominal_level_flag(&self) -> u8 { - unsafe { - let mut nominal_level_flag = mem::MaybeUninit::uninit(); - ffi::hinawa_snd_motu_register_dsp_parameter_get_line_input_nominal_level_flag( - self.to_glib_none().0, - nominal_level_flag.as_mut_ptr(), - ); - let nominal_level_flag = nominal_level_flag.assume_init(); - nominal_level_flag - } - } - - #[doc(alias = "hinawa_snd_motu_register_dsp_parameter_get_main_output_paired_volume")] - #[doc(alias = "get_main_output_paired_volume")] - pub fn main_output_paired_volume(&self) -> u8 { - unsafe { - let mut volume = mem::MaybeUninit::uninit(); - ffi::hinawa_snd_motu_register_dsp_parameter_get_main_output_paired_volume( - self.to_glib_none().0, - volume.as_mut_ptr(), - ); - let volume = volume.assume_init(); - volume - } - } -} - -impl Default for SndMotuRegisterDspParameter { - fn default() -> Self { - Self::new() - } -} diff --git a/hinawa/src/auto/snd_tscm.rs b/hinawa/src/auto/snd_tscm.rs deleted file mode 100644 index 140742b..0000000 --- a/hinawa/src/auto/snd_tscm.rs +++ /dev/null @@ -1,103 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use crate::SndUnit; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::fmt; -use std::mem::transmute; -use std::ptr; - -glib::wrapper! { - #[doc(alias = "HinawaSndTscm")] - pub struct SndTscm(Object) @extends SndUnit; - - match fn { - type_ => || ffi::hinawa_snd_tscm_get_type(), - } -} - -impl SndTscm { - pub const NONE: Option<&'static SndTscm> = None; - - #[doc(alias = "hinawa_snd_tscm_new")] - pub fn new() -> SndTscm { - unsafe { from_glib_full(ffi::hinawa_snd_tscm_new()) } - } -} - -impl Default for SndTscm { - fn default() -> Self { - Self::new() - } -} - -pub trait SndTscmExt: 'static { - #[doc(alias = "hinawa_snd_tscm_open")] - fn open(&self, path: &str) -> Result<(), glib::Error>; - - #[doc(alias = "control")] - fn connect_control(&self, f: F) -> SignalHandlerId; -} - -impl> SndTscmExt for O { - fn open(&self, path: &str) -> Result<(), glib::Error> { - unsafe { - let mut error = ptr::null_mut(); - let _ = ffi::hinawa_snd_tscm_open( - self.as_ref().to_glib_none().0, - path.to_glib_none().0, - &mut error, - ); - if error.is_null() { - Ok(()) - } else { - Err(from_glib_full(error)) - } - } - } - - fn connect_control(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn control_trampoline< - P: IsA, - F: Fn(&P, u32, u32, u32) + 'static, - >( - this: *mut ffi::HinawaSndTscm, - index: libc::c_uint, - before: libc::c_uint, - after: libc::c_uint, - f: glib::ffi::gpointer, - ) { - let f: &F = &*(f as *const F); - f( - SndTscm::from_glib_borrow(this).unsafe_cast_ref(), - index, - before, - after, - ) - } - unsafe { - let f: Box_ = Box_::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"control\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( - control_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } -} - -impl fmt::Display for SndTscm { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SndTscm") - } -} diff --git a/hinawa/src/auto/snd_unit.rs b/hinawa/src/auto/snd_unit.rs deleted file mode 100644 index ce3d671..0000000 --- a/hinawa/src/auto/snd_unit.rs +++ /dev/null @@ -1,320 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use crate::FwNode; -use crate::SndUnitType; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::fmt; -use std::mem::transmute; -use std::ptr; - -glib::wrapper! { - #[doc(alias = "HinawaSndUnit")] - pub struct SndUnit(Object); - - match fn { - type_ => || ffi::hinawa_snd_unit_get_type(), - } -} - -impl SndUnit { - pub const NONE: Option<&'static SndUnit> = None; - - #[doc(alias = "hinawa_snd_unit_new")] - pub fn new() -> SndUnit { - unsafe { from_glib_full(ffi::hinawa_snd_unit_new()) } - } -} - -impl Default for SndUnit { - fn default() -> Self { - Self::new() - } -} - -pub trait SndUnitExt: 'static { - #[doc(alias = "hinawa_snd_unit_create_source")] - fn create_source(&self) -> Result; - - #[doc(alias = "hinawa_snd_unit_get_node")] - #[doc(alias = "get_node")] - fn node(&self) -> FwNode; - - #[doc(alias = "hinawa_snd_unit_lock")] - fn lock(&self) -> Result<(), glib::Error>; - - #[doc(alias = "hinawa_snd_unit_unlock")] - fn unlock(&self) -> Result<(), glib::Error>; - - fn card(&self) -> u32; - - fn device(&self) -> Option; - - fn guid(&self) -> u64; - - fn is_streaming(&self) -> bool; - - #[doc(alias = "type")] - fn type_(&self) -> SndUnitType; - - #[doc(alias = "disconnected")] - fn connect_disconnected(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "lock-status")] - fn connect_lock_status(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "card")] - fn connect_card_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "device")] - fn connect_device_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "guid")] - fn connect_guid_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "streaming")] - fn connect_streaming_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "type")] - fn connect_type_notify(&self, f: F) -> SignalHandlerId; -} - -impl> SndUnitExt for O { - fn create_source(&self) -> Result { - unsafe { - let mut gsrc = ptr::null_mut(); - let mut error = ptr::null_mut(); - let _ = ffi::hinawa_snd_unit_create_source( - self.as_ref().to_glib_none().0, - &mut gsrc, - &mut error, - ); - if error.is_null() { - Ok(from_glib_full(gsrc)) - } else { - Err(from_glib_full(error)) - } - } - } - - fn node(&self) -> FwNode { - unsafe { - let mut node = ptr::null_mut(); - ffi::hinawa_snd_unit_get_node(self.as_ref().to_glib_none().0, &mut node); - from_glib_none(node) - } - } - - fn lock(&self) -> Result<(), glib::Error> { - unsafe { - let mut error = ptr::null_mut(); - let _ = ffi::hinawa_snd_unit_lock(self.as_ref().to_glib_none().0, &mut error); - if error.is_null() { - Ok(()) - } else { - Err(from_glib_full(error)) - } - } - } - - fn unlock(&self) -> Result<(), glib::Error> { - unsafe { - let mut error = ptr::null_mut(); - let _ = ffi::hinawa_snd_unit_unlock(self.as_ref().to_glib_none().0, &mut error); - if error.is_null() { - Ok(()) - } else { - Err(from_glib_full(error)) - } - } - } - - fn card(&self) -> u32 { - glib::ObjectExt::property(self.as_ref(), "card") - } - - fn device(&self) -> Option { - glib::ObjectExt::property(self.as_ref(), "device") - } - - fn guid(&self) -> u64 { - glib::ObjectExt::property(self.as_ref(), "guid") - } - - fn is_streaming(&self) -> bool { - glib::ObjectExt::property(self.as_ref(), "streaming") - } - - fn type_(&self) -> SndUnitType { - glib::ObjectExt::property(self.as_ref(), "type") - } - - fn connect_disconnected(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn disconnected_trampoline, F: Fn(&P) + 'static>( - this: *mut ffi::HinawaSndUnit, - f: glib::ffi::gpointer, - ) { - let f: &F = &*(f as *const F); - f(SndUnit::from_glib_borrow(this).unsafe_cast_ref()) - } - unsafe { - let f: Box_ = Box_::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"disconnected\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( - disconnected_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } - - fn connect_lock_status(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn lock_status_trampoline, F: Fn(&P, bool) + 'static>( - this: *mut ffi::HinawaSndUnit, - state: glib::ffi::gboolean, - f: glib::ffi::gpointer, - ) { - let f: &F = &*(f as *const F); - f( - SndUnit::from_glib_borrow(this).unsafe_cast_ref(), - from_glib(state), - ) - } - unsafe { - let f: Box_ = Box_::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"lock-status\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( - lock_status_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } - - fn connect_card_notify(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn notify_card_trampoline, F: Fn(&P) + 'static>( - this: *mut ffi::HinawaSndUnit, - _param_spec: glib::ffi::gpointer, - f: glib::ffi::gpointer, - ) { - let f: &F = &*(f as *const F); - f(SndUnit::from_glib_borrow(this).unsafe_cast_ref()) - } - unsafe { - let f: Box_ = Box_::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"notify::card\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( - notify_card_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } - - fn connect_device_notify(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn notify_device_trampoline, F: Fn(&P) + 'static>( - this: *mut ffi::HinawaSndUnit, - _param_spec: glib::ffi::gpointer, - f: glib::ffi::gpointer, - ) { - let f: &F = &*(f as *const F); - f(SndUnit::from_glib_borrow(this).unsafe_cast_ref()) - } - unsafe { - let f: Box_ = Box_::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"notify::device\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( - notify_device_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } - - fn connect_guid_notify(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn notify_guid_trampoline, F: Fn(&P) + 'static>( - this: *mut ffi::HinawaSndUnit, - _param_spec: glib::ffi::gpointer, - f: glib::ffi::gpointer, - ) { - let f: &F = &*(f as *const F); - f(SndUnit::from_glib_borrow(this).unsafe_cast_ref()) - } - unsafe { - let f: Box_ = Box_::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"notify::guid\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( - notify_guid_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } - - fn connect_streaming_notify(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn notify_streaming_trampoline, F: Fn(&P) + 'static>( - this: *mut ffi::HinawaSndUnit, - _param_spec: glib::ffi::gpointer, - f: glib::ffi::gpointer, - ) { - let f: &F = &*(f as *const F); - f(SndUnit::from_glib_borrow(this).unsafe_cast_ref()) - } - unsafe { - let f: Box_ = Box_::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"notify::streaming\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( - notify_streaming_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } - - fn connect_type_notify(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn notify_type_trampoline, F: Fn(&P) + 'static>( - this: *mut ffi::HinawaSndUnit, - _param_spec: glib::ffi::gpointer, - f: glib::ffi::gpointer, - ) { - let f: &F = &*(f as *const F); - f(SndUnit::from_glib_borrow(this).unsafe_cast_ref()) - } - unsafe { - let f: Box_ = Box_::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"notify::type\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( - notify_type_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } -} - -impl fmt::Display for SndUnit { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("SndUnit") - } -} diff --git a/hinawa/src/auto/versions.txt b/hinawa/src/auto/versions.txt index 00e8a32..1313169 100644 --- a/hinawa/src/auto/versions.txt +++ b/hinawa/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 78e3d3c22343) +Generated by gir (https://github.com/gtk-rs/gir @ c8a7a13d2c4d) from -from gir-files (https://github.com/gtk-rs/gir-files @ 5ca60543e148) +from gir-files (https://github.com/gtk-rs/gir-files @ 7ebd4478b4a5) diff --git a/hinawa/src/enums.rs b/hinawa/src/enums.rs deleted file mode 100644 index 255c1fb..0000000 --- a/hinawa/src/enums.rs +++ /dev/null @@ -1,74 +0,0 @@ -// SPDX-License-Identifier: MIT -use glib::error::ErrorDomain; -use glib::translate::*; -use glib::Quark; -use hinawa_sys; - -use FwRcode; -use SndEfwStatus; - -pub type FwReqError = FwRcode; - -impl ErrorDomain for FwReqError { - fn domain() -> Quark { - unsafe { from_glib(hinawa_sys::hinawa_fw_req_error_quark()) } - } - - fn code(self) -> i32 { - self.to_glib() - } - - fn from(code: i32) -> Option { - let val = match code { - 0 => Self::Complete, - 4 => Self::ConflictError, - 5 => Self::DataError, - 6 => Self::TypeError, - 7 => Self::AddressError, - 16 => Self::SendError, - 17 => Self::Cancelled, - 18 => Self::Busy, - 19 => Self::Generation, - 20 => Self::NoAck, - 21 => Self::Invalid, - value => Self::__Unknown(value), - }; - Some(val) - } -} - -pub type SndEfwError = SndEfwStatus; - -impl ErrorDomain for SndEfwError { - fn domain() -> Quark { - unsafe { from_glib(hinawa_sys::hinawa_snd_efw_error_quark()) } - } - - fn code(self) -> i32 { - self.to_glib() - } - - fn from(code: i32) -> Option { - let val = match code { - 0 => Self::Ok, - 1 => Self::Bad, - 2 => Self::BadCommand, - 3 => Self::CommErr, - 4 => Self::BadQuadCount, - 5 => Self::Unsupported, - 6 => Self::Timeout, - 7 => Self::DspTimeout, - 8 => Self::BadRate, - 9 => Self::BadClock, - 10 => Self::BadChannel, - 11 => Self::BadPan, - 12 => Self::FlashBusy, - 13 => Self::BadMirror, - 14 => Self::BadLed, - 15 => Self::BadParameter, - 16 => Self::LargeResp, - code => Self::__Unknown(code), - }; - Some(val) - } -} diff --git a/hinawa/src/lib.rs b/hinawa/src/lib.rs index 595cc32..1f93ca9 100644 --- a/hinawa/src/lib.rs +++ b/hinawa/src/lib.rs @@ -4,18 +4,10 @@ mod fw_fcp; mod fw_node; mod fw_req; mod fw_resp; -mod snd_efw; -mod snd_motu; -mod snd_motu_register_dsp_parameter; -mod snd_tscm; -mod snd_unit; pub mod subclass; -pub use crate::{ - auto::*, fw_node::*, fw_req::*, fw_resp::*, snd_efw::*, snd_motu::*, - snd_motu_register_dsp_parameter::*, snd_tscm::*, snd_unit::*, -}; +pub use crate::{auto::*, fw_node::*, fw_req::*, fw_resp::*}; pub use ffi; use glib::{signal::*, translate::*, Cast, IsA, SignalHandlerId}; diff --git a/hinawa/src/snd_efw.rs b/hinawa/src/snd_efw.rs deleted file mode 100644 index 5a1fb7d..0000000 --- a/hinawa/src/snd_efw.rs +++ /dev/null @@ -1,134 +0,0 @@ -// SPDX-License-Identifier: MIT -use crate::*; - -pub trait SndEfwExtManual { - fn transaction( - &self, - category: u32, - command: u32, - args: &[u32], - params: &mut [u32], - ) -> Result; - fn transaction_sync( - &self, - category: u32, - command: u32, - args: Option<&[u32]>, - params: Option<&mut [u32]>, - timeout_ms: u32, - ) -> Result; - fn connect_responded(&self, f: F) -> SignalHandlerId - where - F: Fn(&Self, SndEfwStatus, u32, u32, u32, &[u32]) + 'static; -} - -impl> SndEfwExtManual for O { - fn transaction( - &self, - category: u32, - command: u32, - args: &[u32], - params: &mut [u32], - ) -> Result { - unsafe { - let mut param_count = params.len(); - let mut error = std::ptr::null_mut(); - - ffi::hinawa_snd_efw_transaction( - self.as_ref().to_glib_none().0, - category, - command, - args.as_ptr(), - args.len() as usize, - &mut params.as_mut_ptr(), - &mut param_count, - &mut error, - ); - - if error.is_null() { - Ok(param_count) - } else { - Err(from_glib_full(error)) - } - } - } - - fn transaction_sync( - &self, - category: u32, - command: u32, - args: Option<&[u32]>, - params: Option<&mut [u32]>, - timeout_ms: u32, - ) -> Result { - unsafe { - let (arg_ptr, arg_count) = match args { - Some(a) => (a.as_ptr(), a.len()), - None => (std::ptr::null(), 0), - }; - let (mut param_ptr, mut param_count) = match params { - Some(p) => (p.as_mut_ptr(), p.len()), - None => (std::ptr::null_mut(), 0), - }; - let mut error = std::ptr::null_mut(); - - ffi::hinawa_snd_efw_transaction_sync( - self.as_ref().to_glib_none().0, - category, - command, - arg_ptr, - arg_count, - &mut param_ptr, - &mut param_count, - timeout_ms, - &mut error, - ); - - if error.is_null() { - Ok(param_count) - } else { - Err(from_glib_full(error)) - } - } - } - - fn connect_responded(&self, f: F) -> SignalHandlerId - where - F: Fn(&Self, SndEfwStatus, u32, u32, u32, &[u32]) + 'static, - { - unsafe extern "C" fn responded_trampoline( - this: *mut ffi::HinawaSndEfw, - status: ffi::HinawaSndEfwStatus, - seqnum: u32, - command: u32, - category: u32, - frame: *const u32, - length: libc::c_uint, - f: glib::ffi::gpointer, - ) where - P: IsA, - F: Fn(&P, SndEfwStatus, u32, u32, u32, &[u32]) + 'static, - { - let f: &F = &*(f as *const F); - f( - &SndEfw::from_glib_borrow(this).unsafe_cast_ref(), - from_glib(status), - seqnum, - command, - category, - std::slice::from_raw_parts(frame, length as usize), - ) - } - unsafe { - let f: std::boxed::Box = std::boxed::Box::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"responded\0".as_ptr() as *const _, - Some(std::mem::transmute::<_, unsafe extern "C" fn()>( - responded_trampoline:: as *const (), - )), - std::boxed::Box::into_raw(f), - ) - } - } -} diff --git a/hinawa/src/snd_motu.rs b/hinawa/src/snd_motu.rs deleted file mode 100644 index fd69acb..0000000 --- a/hinawa/src/snd_motu.rs +++ /dev/null @@ -1,106 +0,0 @@ -// SPDX-License-Identifier: MIT -use crate::*; - -pub trait SndMotuExtManual { - fn read_register_dsp_parameter( - &self, - param: &mut SndMotuRegisterDspParameter, - ) -> Result<(), glib::Error>; - fn read_register_dsp_meter(&self, meter: &mut [u8; 48]) -> Result<(), glib::Error>; - fn read_command_dsp_meter(&self, meter: &mut [f32; 400]) -> Result<(), glib::Error>; - fn connect_register_dsp_changed(&self, f: F) - -> SignalHandlerId; -} - -impl> SndMotuExtManual for O { - fn read_register_dsp_parameter( - &self, - param: &mut SndMotuRegisterDspParameter, - ) -> Result<(), glib::Error> { - unsafe { - let mut error = std::ptr::null_mut(); - - ffi::hinawa_snd_motu_read_register_dsp_parameter( - self.as_ref().to_glib_none().0, - ¶m.to_glib_none_mut().0, - &mut error, - ); - - if error.is_null() { - Ok(()) - } else { - Err(from_glib_full(error)) - } - } - } - - fn read_register_dsp_meter(&self, meter: &mut [u8; 48]) -> Result<(), glib::Error> { - unsafe { - let ptr: *mut [u8; 48] = meter; - let mut error = std::ptr::null_mut(); - - ffi::hinawa_snd_motu_read_register_dsp_meter( - self.as_ref().to_glib_none().0, - &ptr, - &mut error, - ); - - if error.is_null() { - Ok(()) - } else { - Err(from_glib_full(error)) - } - } - } - - fn read_command_dsp_meter(&self, meter: &mut [f32; 400]) -> Result<(), glib::Error> { - unsafe { - let ptr: *mut [f32; 400] = meter; - let mut error = std::ptr::null_mut(); - - ffi::hinawa_snd_motu_read_command_dsp_meter( - self.as_ref().to_glib_none().0, - &ptr, - &mut error, - ); - - if error.is_null() { - Ok(()) - } else { - Err(from_glib_full(error)) - } - } - } - - fn connect_register_dsp_changed(&self, f: F) -> SignalHandlerId - where - F: Fn(&Self, &[u32]) + 'static, - { - unsafe extern "C" fn register_dsp_changed_trampoline( - this: *mut ffi::HinawaSndMotu, - events: *const u32, - length: libc::c_uint, - f: glib::ffi::gpointer, - ) where - P: IsA, - F: Fn(&P, &[u32]) + 'static, - { - let f: &F = &*(f as *const F); - f( - &SndMotu::from_glib_borrow(this).unsafe_cast_ref(), - std::slice::from_raw_parts(events, length as usize), - ) - } - unsafe { - let f: std::boxed::Box = std::boxed::Box::new(f); - connect_raw( - self.as_ptr() as *mut _, - b"register-dsp-changed\0".as_ptr() as *const _, - Some(std::mem::transmute::<_, unsafe extern "C" fn()>( - register_dsp_changed_trampoline:: as *const (), - )), - std::boxed::Box::into_raw(f), - ) - } - } -} diff --git a/hinawa/src/snd_motu_register_dsp_parameter.rs b/hinawa/src/snd_motu_register_dsp_parameter.rs deleted file mode 100644 index 1c1ab38..0000000 --- a/hinawa/src/snd_motu_register_dsp_parameter.rs +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-License-Identifier: MIT -use crate::*; - -impl SndMotuRegisterDspParameter { - pub fn get_input_flag(&self) -> &[u8; 10] { - unsafe { - let mut ptr = std::ptr::null_mut() as *const [u8; 10]; - ffi::hinawa_snd_motu_register_dsp_parameter_get_input_flag( - self.to_glib_none().0, - &mut ptr, - ); - &*ptr - } - } - - pub fn get_input_gain_and_invert(&self) -> &[u8; 10] { - unsafe { - let mut ptr = std::ptr::null_mut() as *const [u8; 10]; - ffi::hinawa_snd_motu_register_dsp_parameter_get_input_gain_and_invert( - self.to_glib_none().0, - &mut ptr, - ); - &*ptr - } - } - - pub fn get_mixer_output_paired_flag(&self) -> &[u8; 4] { - unsafe { - let mut ptr = std::ptr::null_mut() as *const [u8; 4]; - ffi::hinawa_snd_motu_register_dsp_parameter_get_mixer_output_paired_flag( - self.to_glib_none().0, - &mut ptr, - ); - &*ptr - } - } - - pub fn get_mixer_output_paired_volume(&self) -> &[u8; 4] { - unsafe { - let mut ptr = std::ptr::null_mut() as *const [u8; 4]; - ffi::hinawa_snd_motu_register_dsp_parameter_get_mixer_output_paired_volume( - self.to_glib_none().0, - &mut ptr, - ); - &*ptr - } - } - - pub fn get_mixer_source_flag(&self, mixer: usize) -> &[u8; 20] { - unsafe { - let mut ptr = std::ptr::null_mut() as *const [u8; 20]; - ffi::hinawa_snd_motu_register_dsp_parameter_get_mixer_source_flag( - self.to_glib_none().0, - mixer, - &mut ptr, - ); - &*ptr - } - } - - pub fn get_mixer_source_gain(&self, mixer: usize) -> &[u8; 20] { - unsafe { - let mut ptr = std::ptr::null_mut() as *const [u8; 20]; - ffi::hinawa_snd_motu_register_dsp_parameter_get_mixer_source_gain( - self.to_glib_none().0, - mixer, - &mut ptr, - ); - &*ptr - } - } - - pub fn get_mixer_source_paired_balance(&self, mixer: usize) -> &[u8; 20] { - unsafe { - let mut ptr = std::ptr::null_mut() as *const [u8; 20]; - ffi::hinawa_snd_motu_register_dsp_parameter_get_mixer_source_paired_balance( - self.to_glib_none().0, - mixer, - &mut ptr, - ); - &*ptr - } - } - - pub fn get_mixer_source_paired_width(&self, mixer: usize) -> &[u8; 20] { - unsafe { - let mut ptr = std::ptr::null_mut() as *const [u8; 20]; - ffi::hinawa_snd_motu_register_dsp_parameter_get_mixer_source_paired_width( - self.to_glib_none().0, - mixer, - &mut ptr, - ); - &*ptr - } - } - - pub fn get_mixer_source_pan(&self, mixer: usize) -> &[u8; 20] { - unsafe { - let mut ptr = std::ptr::null_mut() as *const [u8; 20]; - ffi::hinawa_snd_motu_register_dsp_parameter_get_mixer_source_pan( - self.to_glib_none().0, - mixer, - &mut ptr, - ); - &*ptr - } - } -} diff --git a/hinawa/src/snd_tscm.rs b/hinawa/src/snd_tscm.rs deleted file mode 100644 index 7097c13..0000000 --- a/hinawa/src/snd_tscm.rs +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: MIT -use crate::*; - -pub trait SndTscmExtManual { - fn get_state(&self) -> Result<&[u32; 64], glib::Error>; -} - -impl> SndTscmExtManual for O { - fn get_state(&self) -> Result<&[u32; 64], glib::Error> { - unsafe { - let mut error = std::ptr::null_mut(); - - let image = ffi::hinawa_snd_tscm_get_state(self.as_ref().to_glib_none().0, &mut error); - - if error.is_null() { - Ok(&*image) - } else { - Err(from_glib_full(error)) - } - } - } -} diff --git a/hinawa/src/snd_unit.rs b/hinawa/src/snd_unit.rs deleted file mode 100644 index 373367a..0000000 --- a/hinawa/src/snd_unit.rs +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: MIT -use crate::*; - -pub trait SndUnitExtManual { - fn open(&self, path: &str) -> Result<(), glib::Error>; -} - -impl> SndUnitExtManual for O { - fn open(&self, path: &str) -> Result<(), glib::Error> { - unsafe { - let mut error = std::ptr::null_mut(); - - let _ = ffi::hinawa_snd_unit_open( - self.as_ref().to_glib_none().0, - path.to_glib_none().0, - &mut error, - ); - - if error.is_null() { - Ok(()) - } else { - Err(from_glib_full(error)) - } - } - } -}