aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2023-07-23 10:49:49 +0900
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>2023-10-03 21:45:12 +0900
commit7d03d4289f53ed779856ad095d241c865b8a85d5 (patch)
tree963f8dc29f1c2944343d05324ee5ea79cba43ede
parent924684fd9f39ddb67d20f771ea1c0a2f636e2cd4 (diff)
downloadlibhinawa-7d03d4289f53ed779856ad095d241c865b8a85d5.tar.gz
fw_fcp: change signature of FwFcp.avc_transaction()
The function was defined to return void, while it has an argument for GLib.Error. In GNOME convention, such function should return gboolean. This commit change the signature according to the convention. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r--src/fw_fcp.c15
-rw-r--r--src/fw_fcp.h6
-rw-r--r--src/hinawa.map3
3 files changed, 12 insertions, 12 deletions
diff --git a/src/fw_fcp.c b/src/fw_fcp.c
index e044cf6..0bb20cb 100644
--- a/src/fw_fcp.c
+++ b/src/fw_fcp.c
@@ -458,18 +458,19 @@ end:
* the case that AV/C INTERIM status is arrived, thus the caller should expand the timeout in
* advance for the case.
*
- * Since: 2.1.
- * Deprecated: 2.6: Use [method@FwFcp.avc_transaction_with_tstamp], instead.
+ * Returns: TRUE if the overall operation finishes successfully, otherwise FALSE.
+ *
+ * Since: 3.0.
*/
-void hinawa_fw_fcp_avc_transaction(HinawaFwFcp *self, const guint8 *cmd, gsize cmd_size,
- guint8 *const *resp, gsize *resp_size, guint timeout_ms,
- GError **error)
+gboolean hinawa_fw_fcp_avc_transaction(HinawaFwFcp *self, const guint8 *cmd, gsize cmd_size,
+ guint8 **resp, gsize *resp_size, guint timeout_ms,
+ GError **error)
{
struct waiter w;
guint tstamp[3];
- (void)complete_avc_transaction(self, cmd, cmd_size, resp, resp_size, timeout_ms, &w,
- tstamp, error);
+ return complete_avc_transaction(self, cmd, cmd_size, resp, resp_size, timeout_ms, &w,
+ tstamp, error);
}
/**
diff --git a/src/fw_fcp.h b/src/fw_fcp.h
index ad80279..346682b 100644
--- a/src/fw_fcp.h
+++ b/src/fw_fcp.h
@@ -61,9 +61,9 @@ gboolean hinawa_fw_fcp_command(HinawaFwFcp *self, const guint8 *cmd, gsize cmd_s
gboolean hinawa_fw_fcp_command_with_tstamp(HinawaFwFcp *self, const guint8 *cmd, gsize cmd_size,
guint tstamp[2], guint timeout_ms, GError **error);
-void hinawa_fw_fcp_avc_transaction(HinawaFwFcp *self, const guint8 *cmd, gsize cmd_size,
- guint8 *const *resp, gsize *resp_size, guint timeout_ms,
- GError **error);
+gboolean hinawa_fw_fcp_avc_transaction(HinawaFwFcp *self, const guint8 *cmd, gsize cmd_size,
+ guint8 **resp, gsize *resp_size, guint timeout_ms,
+ GError **error);
gboolean hinawa_fw_fcp_avc_transaction_with_tstamp(HinawaFwFcp *self, const guint8 *cmd,
gsize cmd_size, guint8 **resp, gsize *resp_size,
guint tstamp[3], guint timeout_ms, GError **error);
diff --git a/src/hinawa.map b/src/hinawa.map
index 0acbeb7..108a9f2 100644
--- a/src/hinawa.map
+++ b/src/hinawa.map
@@ -59,8 +59,6 @@ HINAWA_2_1_0 {
"hinawa_fw_req_transaction_async";
"hinawa_fw_req_transaction_sync";
-
- "hinawa_fw_fcp_avc_transaction";
} HINAWA_2_0_0;
HINAWA_2_2_0 {
@@ -113,4 +111,5 @@ HINAWA_3_0_0 {
"hinawa_fw_fcp_bind";
"hinawa_fw_fcp_command";
+ "hinawa_fw_fcp_avc_transaction";
} HINAWA_2_6_0;