diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2023-06-30 12:00:30 +0900 |
---|---|---|
committer | 坂本 貴史 <o-takashi@sakamocchi.jp> | 2023-06-30 18:41:23 +0900 |
commit | 00889611496f89efb3b404f07d1a3f0e3f47bfcd (patch) | |
tree | f2c5310fc3e85096527e56aa32a06e6875333ba6 | |
parent | b5cecfc928386aa3e1b9467aabc0c214e9c1e573 (diff) | |
download | libhinawa-00889611496f89efb3b404f07d1a3f0e3f47bfcd.tar.gz |
fw_req: refine the order of argument for new signal
It is preferable to locate the arguments for variable-length of array in
the end of argument list.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r-- | src/fw_req.c | 18 | ||||
-rw-r--r-- | src/fw_req.h | 8 | ||||
-rw-r--r-- | src/hinawa_sigs_marshal.list | 2 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/fw_req.c b/src/fw_req.c index cbd56da..a0c3efa 100644 --- a/src/fw_req.c +++ b/src/fw_req.c @@ -156,11 +156,11 @@ static void hinawa_fw_req_class_init(HinawaFwReqClass *klass) * HinawaFwReq::responded2: * @self: A [class@FwReq]. * @rcode: One of [enum@FwRcode]. + * @request_tstamp: The isochronous cycle at which the request was sent. + * @response_tstamp: The isochronous cycle at which the response arrived. * @frame: (array length=frame_size)(element-type guint8): The array with elements for * byte data of response subaction for transaction. * @frame_size: The number of elements of the array. - * @request_tstamp: The isochronous cycle at which the request was sent. - * @response_tstamp: The isochronous cycle at which the response arrived. * * 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 @@ -181,9 +181,9 @@ static void hinawa_fw_req_class_init(HinawaFwReqClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(HinawaFwReqClass, responded2), NULL, NULL, - hinawa_sigs_marshal_VOID__ENUM_POINTER_UINT_UINT_UINT, + hinawa_sigs_marshal_VOID__ENUM_UINT_UINT_POINTER_UINT, G_TYPE_NONE, - 5, HINAWA_TYPE_FW_RCODE, G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_UINT, + 5, HINAWA_TYPE_FW_RCODE, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_POINTER, G_TYPE_UINT); } @@ -315,8 +315,8 @@ struct waiter { GMutex mutex; }; -static void handle_responded2_signal(HinawaFwReq *self, HinawaFwRcode rcode, const guint8 *frame, - guint frame_size, guint request_tstamp, guint response_tstamp, +static void handle_responded2_signal(HinawaFwReq *self, HinawaFwRcode rcode, guint request_tstamp, + guint response_tstamp, const guint8 *frame, guint frame_size, gpointer user_data) { struct waiter *w = (struct waiter *)user_data; @@ -551,7 +551,7 @@ void hinawa_fw_req_handle_response(HinawaFwReq *self, const struct fw_cdev_event if (klass->responded2 != NULL || g_signal_has_handler_pending(self, fw_req_sigs[FW_REQ_SIG_TYPE_RESPONDED2], 0, TRUE)) { g_signal_emit(self, fw_req_sigs[FW_REQ_SIG_TYPE_RESPONDED2], 0, event->rcode, - event->data, event->length, G_MAXUINT, G_MAXUINT); + G_MAXUINT, G_MAXUINT, event->data, event->length); } else if (klass->responded != NULL || g_signal_has_handler_pending(self, fw_req_sigs[FW_REQ_SIG_TYPE_RESPONDED], 0, TRUE)) { g_signal_emit(self, fw_req_sigs[FW_REQ_SIG_TYPE_RESPONDED], 0, event->rcode, @@ -571,8 +571,8 @@ void hinawa_fw_req_handle_response2(HinawaFwReq *self, const struct fw_cdev_even if (klass->responded2 != NULL || g_signal_has_handler_pending(self, fw_req_sigs[FW_REQ_SIG_TYPE_RESPONDED2], 0, TRUE)) { g_signal_emit(self, fw_req_sigs[FW_REQ_SIG_TYPE_RESPONDED2], 0, event->rcode, - event->data, event->length, event->request_tstamp, - event->response_tstamp); + event->request_tstamp, event->response_tstamp, event->data, + event->length); } else if (klass->responded != NULL || g_signal_has_handler_pending(self, fw_req_sigs[FW_REQ_SIG_TYPE_RESPONDED], 0, TRUE)) { g_signal_emit(self, fw_req_sigs[FW_REQ_SIG_TYPE_RESPONDED], 0, event->rcode, diff --git a/src/fw_req.h b/src/fw_req.h index 9b5a6fb..66c24bf 100644 --- a/src/fw_req.h +++ b/src/fw_req.h @@ -37,18 +37,18 @@ struct _HinawaFwReqClass { * HinawaFwReqClass::responded2: * @self: A [class@FwReq]. * @rcode: One of [enum@FwRcode]. + * @request_tstamp: The isochronous cycle at which the request was sent. + * @response_tstamp: The isochronous cycle at which the response arrived. * @frame: (array length=frame_size)(element-type guint8): The array with elements for * byte data of response subaction for transaction. * @frame_size: The number of elements of the array. - * @request_tstamp: The isochronous cycle at which the request was sent. - * @response_tstamp: The isochronous cycle at which the response arrived. * * Class closure for the [signal@FwReq::responded2] signal. * * Since: 2.6 */ - void (*responded2)(HinawaFwReq *self, HinawaFwRcode rcode, const guint8 *frame, - guint frame_size, guint request_tstamp, guint response_tstamp); + void (*responded2)(HinawaFwReq *self, HinawaFwRcode rcode, guint request_tstamp, + guint response_tstamp, const guint8 *frame, guint frame_size); }; HinawaFwReq *hinawa_fw_req_new(void); diff --git a/src/hinawa_sigs_marshal.list b/src/hinawa_sigs_marshal.list index 311d2da..1e7bd1d 100644 --- a/src/hinawa_sigs_marshal.list +++ b/src/hinawa_sigs_marshal.list @@ -1,7 +1,7 @@ ENUM:ENUM VOID:UINT,UINT,UINT VOID:ENUM,POINTER,UINT -VOID:ENUM,POINTER,UINT,UINT,UINT +VOID:ENUM,UINT,UINT,POINTER,UINT VOID:ENUM,UINT,UINT,UINT,POINTER,UINT VOID:POINTER,UINT VOID:UINT,POINTER,UINT |