Skip to content

Commit

Permalink
hinawa/hinawa-sys: regenerate crates for libhinawa v2.5.0
Browse files Browse the repository at this point in the history
The crates are regenerated from libhinawa v2.5.0:
 * https://github.com/alsa-project/libhinawa/releases/tag/2.5.0
  • Loading branch information
takaswie committed May 26, 2022
1 parent df4b3f2 commit ad1dd76
Show file tree
Hide file tree
Showing 31 changed files with 1,412 additions and 3,580 deletions.
2,503 changes: 1,198 additions & 1,305 deletions Hinawa-3.0.gir

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``.

* `<https://github.com/alsa-project/libhinawa>`_

* 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
=======
Expand All @@ -23,7 +25,7 @@ Dependencies
============

* Rust version 1.57 or later (edition 2021)
* `libhinawa <https://github.com/alsa-project/libhinawa>`_
* `libhinawa 2.5.0 or later <https://github.com/alsa-project/libhinawa>`_
* FFI crate (``hinawa-sys``)

* ``libc`` >= 0.2
Expand Down
2 changes: 1 addition & 1 deletion gir-files
2 changes: 1 addition & 1 deletion hinawa-sys/Gir.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
109 changes: 18 additions & 91 deletions hinawa-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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()
}
}
Expand All @@ -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()
}
}
Expand All @@ -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()
}
}
Expand All @@ -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()
}
}
Expand All @@ -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()
}
}
Expand All @@ -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()
}
}
Expand All @@ -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()
}
}
Expand All @@ -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()
}
}
Expand All @@ -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()
}
}
Expand All @@ -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
//=========================================================================
Expand Down Expand Up @@ -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,
Expand Down
Loading

0 comments on commit ad1dd76

Please sign in to comment.