Skip to content

Version 2.1.0 release

Compare
Choose a tag to compare
@takaswie takaswie released this 17 Aug 03:40
· 252 commits to master since this release

In this release, the minor part of version is incremented so that some
symbols are newly available as public API. The new features are
categorized to two parts; enhancement for error reporting and
introduction of signal-based asynchronous API.

Enhancement for error reporting

In the initial release, libhinawa have used GError for error reporting.
However the implementation is not necessarily following to guidelines of
GError. In the release, the implementation is improved for enhancement.

At first, below public symbols are obsoleted. They are not declared in
public headers, thus the change brings no regressions for applications
except for symbol maintenance.

  • hinawa_fw_req_quark
  • hinawa_fw_resp_quark
  • hinawa_fw_fcp_quark
  • hinawa_snd_unit_quark
  • hinawa_snd_dice_quark
  • hinawa_snd_efw_quark
  • hinawa_snd_dg00x_quark
  • hinawa_snd_motu_quark
  • hinawa_snd_tscm_quark
  • hinawa_fw_node_quark

Secondly, below public symbols are defined for GQuark value and declared
in public headers, so that they can represent unique value for domains of
GError.

  • hinawa_fw_node_error_quark
  • hinawa_fw_req_error_quark
  • hinawa_fw_fcp_error_quark
  • hinawa_snd_unit_error_quark
  • hinawa_snd_dice_error_quark
  • hinawa_snd_efw_error_quark

Thirdly, below public symbols are defined for GLib enumerations and
declared in public headers, so that they can represent actual error code
for GError.

  • hinawa_fw_node_error_get_type()
  • hinawa_fw_fcp_error_get_type()
  • hinawa_snd_unit_error_get_type()
  • hinawa_snd_dice_error_get_type()

However, for hinawa_fw_req_error_quark() and hinawa_snd_efw_error_quark(),
it's inconvenient to use standard way for the name of enumerations. For
these two error domains, error codes come from below enumerations:

  • hinawa_fw_rcode_get_type()
  • hinawa_snd_efw_status_get_type()

Finally, many error checks are simplified according to GLib's guideline so
that programming errors should not reported by GError. The error of invalid
arguments and unexpected function call is not handled by GError. In the
cases, function call just returns with warnings.

Introduction of signal-based asynchronous API

In the initial release, libhinawa have used synchronous API to finish some
types of transaction. The call of API has an effect to wait for event by
yielding processor, therefore the process is blocked. However it's useful
for some kind of applications to receive signal as event notification
instead of blocking process. In this note, I call it 'asynchronous API'.

GObject supports signaling. In the release, event notification is
implemented by the mechanism and below signals are added:

  • HinawaFwReq.responded
  • HinawaSndEfw.responded
  • HinawaFwFcp.responded

Additionally, below asynchronous APIs are added:

  • hinawa_fw_req_transaction_async()
  • hinawa_snd_efw_transaction_async()
  • hinawa_fw_fcp_command()

Furthermore, below synchronous APIs are added for refactoring to existent APIs:

  • hinawa_fw_req_transaction_sync
  • hinawa_snd_efw_transaction_sync
  • hinawa_fw_fcp_avc_transaction