diff --git a/README.rst b/README.rst index ad2d8b1a..0b8a9662 100644 --- a/README.rst +++ b/README.rst @@ -19,9 +19,11 @@ been already obsoleted and deligated the functions to `libhitaki `_, while are still kept for backward compatibility. They should not be used for applications written newly. -The latest release is `2.6.1 `_. +The latest release is `4.0.0 `_. The package archive is available in ``_ with detached signature created by `my GnuPG key `_. +I note that version 3 release is skipped to use the same major version in library itself and +gi metadata. License ======= @@ -65,9 +67,9 @@ How to build $ meson install -C build ($ meson test -C build) -When working with gobject-introspection, ``Hinawa-3.0.typelib`` should be +When working with gobject-introspection, ``Hinawa-4.0.typelib`` should be installed in your system girepository so that ``libgirepository`` can find -it. Of course, your system LD should find ELF shared object for libhinawa2. +it. Of course, your system LD should find ELF shared object for libhinawa4. Before installing, it's good to check path of the above and configure '--prefix' meson option appropriately. The environment variables, ``GI_TYPELIB_PATH`` and ``LD_LIBRARY_PATH`` are available for ad-hoc settings @@ -110,7 +112,7 @@ Example of Python3 with PyGobject import gi gi.require_version('GLib', '2.0') - gi.require_version('Hinawa', '3.0') + gi.require_version('Hinawa', '4.0') from gi.repository import GLib, Hinawa from threading import Thread @@ -166,7 +168,7 @@ This is a sample of wrap file to satisfy dependency on libhinawa by [wrap-git] directory = hinawa url = https://git.kernel.org/pub/scm/libs/ieee1394/libhinawa.git - revision = 2.6.1 + revision = 4.0.0 depth = 1 [provide] @@ -180,7 +182,7 @@ available. $ cat meson.build hinawa_dependency = dependency('hinawa', - version: '>=2.6.1' + version: '>=4.0.0' ) Loss of backward compatibility with version 1 and version 2 releases @@ -207,7 +209,7 @@ for processing it using ``GLib.MainContext``. Additionally, ``Hinawa.FwNode`` wa obsolete ``Hinawa.FwUnit`` in an aspect of topology in IEEE 1394 bus. Consequently, ``Hinawa.SndUnit`` directly derived from GObject. -Before releasing the version 3 of library, `libhitaki `_ +Before releasing the version 4 of library, `libhitaki `_ was released. The library provides ``Hitaki.SndUnit`` and its derived object classes to obsolete equivalent features in the version 2 of library. Furthermore, with the release of Linux kernel version 6.5, new events were introduced to deliver hardware time stamp for asynchronous @@ -215,7 +217,7 @@ communication. To accommodate this, ``Hinawa.CycleTime`` was added, along with s ``Hinawa.FwReq``, ``Hinawa.FwResp``, and ``Hinawa.FwFcp``, to facilitating user application processing of the hardware time stamp. -The version 3 library is specifically tailored to features in Linux FireWire subsystem, with a +The version 4 library is specifically tailored to features in Linux FireWire subsystem, with a sole focus on asynchronous communication in IEEE 1394 bus. For isochronous communication, `libhinoko `_ provides the necessary features. diff --git a/meson.build b/meson.build index 5f4bf1a6..233aa447 100644 --- a/meson.build +++ b/meson.build @@ -1,9 +1,14 @@ -project('libhinawa', 'c', - version: '2.6.1', +project('hinawa', 'c', + version: '4.0.0', license: 'LGPL-2.1+', meson_version: '>= 0.60.0', ) +version = meson.project_version().split('.') +major_version = version[0].to_int() +minor_version = version[1].to_int() +micro_version = version[2].to_int() + # Detect support level in Linux sound subsystem. cc = meson.get_compiler('c') diff --git a/samples/common/__init__.py b/samples/common/__init__.py index be4c3b70..0a5c5af2 100644 --- a/samples/common/__init__.py +++ b/samples/common/__init__.py @@ -5,7 +5,7 @@ from threading import Thread import gi -gi.require_versions({'GLib': '2.0', 'Hinawa': '3.0'}) +gi.require_versions({'GLib': '2.0', 'Hinawa': '4.0'}) from gi.repository import GLib, Hinawa CLOCK_MONOTONIC_RAW = 4 diff --git a/samples/gtk3 b/samples/gtk3 index aa0ebd78..45d95399 100755 --- a/samples/gtk3 +++ b/samples/gtk3 @@ -7,7 +7,7 @@ from struct import unpack import common import gi -gi.require_versions({'GLib': '2.0', 'Hinawa': '3.0', 'Gtk': '3.0'}) +gi.require_versions({'GLib': '2.0', 'Hinawa': '4.0', 'Gtk': '3.0'}) from gi.repository import GLib, Hinawa, Gtk @@ -45,7 +45,7 @@ def main() -> int: class Sample(Gtk.Window): def __init__(self, node): - Gtk.Window.__init__(self, title="Hinawa-3.0 gir sample") + Gtk.Window.__init__(self, title="Hinawa-4.0 gir sample") self.node = node self.req = Hinawa.FwReq.new() diff --git a/samples/gtk4 b/samples/gtk4 index 97c3e910..4c4630bc 100755 --- a/samples/gtk4 +++ b/samples/gtk4 @@ -7,7 +7,7 @@ from struct import unpack import common import gi -gi.require_versions({'GLib': '2.0', 'Hinawa': '3.0', 'Gtk': '4.0'}) +gi.require_versions({'GLib': '2.0', 'Hinawa': '4.0', 'Gtk': '4.0'}) from gi.repository import GLib, Hinawa, Gtk @@ -48,7 +48,7 @@ def main() -> int: class Sample(Gtk.Window): def __init__(self, dispatcher, node): - Gtk.Window.__init__(self, title="Hinawa-3.0 gir sample") + Gtk.Window.__init__(self, title="Hinawa-4.0 gir sample") self.node = node self.req = Hinawa.FwReq.new() diff --git a/samples/qt5 b/samples/qt5 index 019b0685..62bc9bde 100755 --- a/samples/qt5 +++ b/samples/qt5 @@ -7,7 +7,7 @@ from struct import unpack import common import gi -gi.require_versions({'GLib': '2.0', 'Hinawa': '3.0'}) +gi.require_versions({'GLib': '2.0', 'Hinawa': '4.0'}) from gi.repository import GLib, Hinawa # Qt5 python binding @@ -64,7 +64,7 @@ class Sample(QWidget): self.node = node self.req = Hinawa.FwReq.new() - self.setWindowTitle("Hinawa-3.0 gir sample") + self.setWindowTitle("Hinawa-4.0 gir sample") layout = QVBoxLayout() self.setLayout(layout) diff --git a/src/fw_fcp.c b/src/fw_fcp.c index ac1f572e..f2d00c96 100644 --- a/src/fw_fcp.c +++ b/src/fw_fcp.c @@ -184,7 +184,7 @@ static void hinawa_fw_fcp_class_init(HinawaFwFcpClass *klass) * If the version of kernel ABI for Linux FireWire subsystem is less than 6, the value of * @tstamp argument has invalid value (=G_MAXUINT). * - * Since: 3.0 + * Since: 4.0 */ fw_fcp_sigs[FW_FCP_SIG_TYPE_RESPONDED] = g_signal_new("responded", @@ -288,7 +288,7 @@ gboolean hinawa_fw_fcp_command_with_tstamp(HinawaFwFcp *self, const guint8 *cmd, * * Returns: TRUE if the overall operation finishes successfully, otherwise FALSE. * - * Since: 3.0 + * Since: 4.0 */ gboolean hinawa_fw_fcp_command(HinawaFwFcp *self, const guint8 *cmd, gsize cmd_size, guint timeout_ms, GError **error) @@ -498,7 +498,7 @@ gboolean hinawa_fw_fcp_avc_transaction_with_tstamp(HinawaFwFcp *self, * * Returns: TRUE if the overall operation finishes successfully, otherwise FALSE. * - * Since: 3.0 + * Since: 4.0 */ gboolean hinawa_fw_fcp_avc_transaction(HinawaFwFcp *self, const guint8 *cmd, gsize cmd_size, guint8 **resp, gsize *resp_size, guint timeout_ms, @@ -645,7 +645,7 @@ static HinawaFwRcode handle_requested_signal(HinawaFwResp *resp, HinawaFwTcode t * * Returns: TRUE if the overall operation finishes successfully, otherwise FALSE. * - * Since: 3.0 + * Since: 4.0 */ gboolean hinawa_fw_fcp_bind(HinawaFwFcp *self, HinawaFwNode *node, GError **error) { diff --git a/src/fw_fcp.h b/src/fw_fcp.h index d21592ef..bc2b5880 100644 --- a/src/fw_fcp.h +++ b/src/fw_fcp.h @@ -29,7 +29,7 @@ struct _HinawaFwFcpClass { * * Class closure for the [signal@FwFcp::responded] signal. * - * Since: 3.0 + * Since: 4.0 */ void (*responded)(HinawaFwFcp *self, guint generation, guint tstamp, const guint8 *frame, guint frame_size); diff --git a/src/fw_node.c b/src/fw_node.c index 86d4248c..5569d179 100644 --- a/src/fw_node.c +++ b/src/fw_node.c @@ -245,7 +245,7 @@ static void hinawa_fw_node_class_init(HinawaFwNodeClass *klass) * The numeric index for 1394 OHCI hardware used for the communication to the node. The * value is stable against bus generation. * - * Since: 3.0 + * Since: 4.0 */ fw_node_props[FW_NODE_PROP_TYPE_CARD_ID] = g_param_spec_uint("card-id", "card-id", @@ -362,7 +362,7 @@ static int update_info(HinawaFwNode *self) * * Returns: TRUE if the overall operation finishes successfully, otherwise FALSE. * - * Since: 3.0 + * Since: 4.0 */ gboolean hinawa_fw_node_open(HinawaFwNode *self, const gchar *path, gint open_flag, GError **error) { @@ -423,7 +423,7 @@ gboolean hinawa_fw_node_open(HinawaFwNode *self, const gchar *path, gint open_fl * * Returns: TRUE if the overall operation finishes successfully, otherwise FALSE. * - * Since: 3.0 + * Since: 4.0 */ gboolean hinawa_fw_node_get_config_rom(HinawaFwNode *self, const guint8 **image, gsize *length, GError **error) @@ -464,7 +464,7 @@ gboolean hinawa_fw_node_get_config_rom(HinawaFwNode *self, const guint8 **image, * * Returns: TRUE if the overall operation finishes successfully, otherwise FALSE. * - * Since: 3.0 + * Since: 4.0 */ gboolean hinawa_fw_node_read_cycle_time(HinawaFwNode *self, gint clock_id, HinawaCycleTime **cycle_time, GError **error) @@ -603,7 +603,7 @@ static void finalize_src(GSource *gsrc) * * Returns: TRUE if the overall operation finishes successfully, otherwise FALSE. * - * Since: 3.0 + * Since: 4.0 */ gboolean hinawa_fw_node_create_source(HinawaFwNode *self, GSource **gsrc, GError **error) { diff --git a/src/fw_req.c b/src/fw_req.c index 7365c13c..04fbb626 100644 --- a/src/fw_req.c +++ b/src/fw_req.c @@ -80,7 +80,7 @@ static void hinawa_fw_req_class_init(HinawaFwReqClass *klass) * If the version of kernel ABI for Linux FireWire subsystem is less than 6, the * @request_tstamp and @response_tstamp argument has invalid value (=G_MAXUINT). * - * Since: 3.0 + * Since: 4.0 */ fw_req_sigs[FW_REQ_SIG_TYPE_RESPONDED] = g_signal_new("responded", @@ -133,7 +133,7 @@ HinawaFwReq *hinawa_fw_req_new(void) * response subaction arrives and running event dispatcher reads the contents, * [signal@FwReq::responded] signal handler is called. * - * Since: 3.0 + * Since: 4.0 */ gboolean hinawa_fw_req_request(HinawaFwReq *self, HinawaFwNode *node, HinawaFwTcode tcode, guint64 addr, gsize length, guint8 **frame, gsize *frame_size, @@ -371,7 +371,7 @@ gboolean hinawa_fw_req_transaction_with_tstamp(HinawaFwReq *self, HinawaFwNode * * * Returns: TRUE if the overall operation finishes successfully, otherwise FALSE. * - * Since: 3.0 + * Since: 4.0 */ gboolean hinawa_fw_req_transaction(HinawaFwReq *self, HinawaFwNode *node, HinawaFwTcode tcode, guint64 addr, gsize length, diff --git a/src/fw_req.h b/src/fw_req.h index eba16db7..e3af8f42 100644 --- a/src/fw_req.h +++ b/src/fw_req.h @@ -31,7 +31,7 @@ struct _HinawaFwReqClass { * * Class closure for the [signal@FwReq::responded] signal. * - * Since: 3.0 + * Since: 4.0 */ void (*responded)(HinawaFwReq *self, HinawaFwRcode rcode, guint request_tstamp, guint response_tstamp, const guint8 *frame, guint frame_size); diff --git a/src/fw_resp.c b/src/fw_resp.c index 57c1acbb..39842750 100644 --- a/src/fw_resp.c +++ b/src/fw_resp.c @@ -181,7 +181,7 @@ static void hinawa_fw_resp_class_init(HinawaFwRespClass *klass) * * Returns: One of [enum@FwRcode] enumerations corresponding to rcodes defined in IEEE 1394 * specification. - * Since: 3.0 + * Since: 4.0 */ fw_resp_sigs[FW_RESP_SIG_TYPE_REQ] = g_signal_new("requested", @@ -232,7 +232,7 @@ HinawaFwResp *hinawa_fw_resp_new(void) * * Returns: TRUE if the overall operation finishes successfully, otherwise FALSE. * - * Since: 3.0 + * Since: 4.0 */ gboolean hinawa_fw_resp_reserve_within_region(HinawaFwResp *self, HinawaFwNode *node, guint64 region_start, guint64 region_end, @@ -300,7 +300,7 @@ gboolean hinawa_fw_resp_reserve_within_region(HinawaFwResp *self, HinawaFwNode * * * Returns: TRUE if the overall operation finishes successfully, otherwise FALSE. * - * Since: 3.0 + * Since: 4.0 */ gboolean hinawa_fw_resp_reserve(HinawaFwResp *self, HinawaFwNode *node, guint64 addr, guint width, GError **error) diff --git a/src/fw_resp.h b/src/fw_resp.h index c698ac06..72c03901 100644 --- a/src/fw_resp.h +++ b/src/fw_resp.h @@ -37,7 +37,7 @@ struct _HinawaFwRespClass { * Returns: One of [enum@FwRcode enumerations corresponding to rcodes defined in IEEE 1394 * specification. * - * Since: 3.0 + * Since: 4.0 */ HinawaFwRcode (*requested)(HinawaFwResp *self, HinawaFwTcode tcode, guint64 offset, guint src_node_id, guint dst_node_id, guint card_id, diff --git a/src/hinawa.map b/src/hinawa.map index bc8bbaa3..03cad53a 100644 --- a/src/hinawa.map +++ b/src/hinawa.map @@ -87,7 +87,7 @@ HINAWA_2_6_0 { "hinawa_fw_fcp_avc_transaction_with_tstamp"; } HINAWA_2_5_0; -HINAWA_3_0_0 { +HINAWA_4_0_0 { global: "hinawa_fw_node_open"; "hinawa_fw_node_get_config_rom"; diff --git a/src/meson.build b/src/meson.build index 5f723364..339ed868 100644 --- a/src/meson.build +++ b/src/meson.build @@ -54,7 +54,7 @@ vflag = '-Wl,--version-script,' + join_paths(meson.current_source_dir(), mapfile myself = library('hinawa', sources: sources + headers + privates + marshallers + enums, version: meson.project_version(), - soversion: meson.project_version().split('.')[0], + soversion: major_version, install: true, include_directories: backport_header_dir + include_directories('.'), dependencies: dependencies, @@ -74,7 +74,7 @@ pkg.generate(myself, hinawa_gir = gnome.generate_gir(myself, sources: enums + headers + sources, - nsversion: '3.0', + nsversion: '@0@.0'.format(major_version), namespace: 'Hinawa', symbol_prefix: 'hinawa_', identifier_prefix: 'Hinawa', diff --git a/tests/cycle-time b/tests/cycle-time index 6f27f594..559d1ee3 100644 --- a/tests/cycle-time +++ b/tests/cycle-time @@ -6,7 +6,7 @@ from errno import ENXIO from helper import test_struct import gi -gi.require_version('Hinawa', '3.0') +gi.require_version('Hinawa', '4.0') from gi.repository import Hinawa target_type = Hinawa.CycleTime diff --git a/tests/fw-fcp b/tests/fw-fcp index 8fe1cdca..87bc3a87 100755 --- a/tests/fw-fcp +++ b/tests/fw-fcp @@ -6,7 +6,7 @@ from errno import ENXIO from helper import test_object import gi -gi.require_version('Hinawa', '3.0') +gi.require_version('Hinawa', '4.0') from gi.repository import Hinawa target_type = Hinawa.FwFcp diff --git a/tests/fw-node b/tests/fw-node index d76f3949..8e074c8c 100644 --- a/tests/fw-node +++ b/tests/fw-node @@ -6,7 +6,7 @@ from errno import ENXIO from helper import test_object import gi -gi.require_version('Hinawa', '3.0') +gi.require_version('Hinawa', '4.0') from gi.repository import Hinawa target_type = Hinawa.FwNode diff --git a/tests/fw-req b/tests/fw-req index f4ffd112..b4fb7eb8 100755 --- a/tests/fw-req +++ b/tests/fw-req @@ -6,7 +6,7 @@ from errno import ENXIO from helper import test_object import gi -gi.require_version('Hinawa', '3.0') +gi.require_version('Hinawa', '4.0') from gi.repository import Hinawa target_type = Hinawa.FwReq diff --git a/tests/fw-resp b/tests/fw-resp index cab5b71c..02985895 100755 --- a/tests/fw-resp +++ b/tests/fw-resp @@ -6,7 +6,7 @@ from errno import ENXIO from helper import test_object import gi -gi.require_version('Hinawa', '3.0') +gi.require_version('Hinawa', '4.0') from gi.repository import Hinawa target_type = Hinawa.FwResp diff --git a/tests/hinawa-enum b/tests/hinawa-enum index b86a7c9c..6149d40a 100644 --- a/tests/hinawa-enum +++ b/tests/hinawa-enum @@ -6,7 +6,7 @@ from errno import ENXIO from helper import test_enums import gi -gi.require_version('Hinawa', '3.0') +gi.require_version('Hinawa', '4.0') from gi.repository import Hinawa fw_tcode_enumerators = ( diff --git a/tests/hinawa-functions b/tests/hinawa-functions index a4fe07b4..493ac75e 100644 --- a/tests/hinawa-functions +++ b/tests/hinawa-functions @@ -4,7 +4,7 @@ from sys import exit from errno import ENXIO import gi -gi.require_version('Hinawa', '3.0') +gi.require_version('Hinawa', '4.0') from gi.repository import Hinawa from helper import test_functions