@@ -60,7 +60,7 @@ static void efw_proto_class_init(EfwProtoClass *klass)
g_signal_new("responded",
G_OBJECT_CLASS_TYPE(klass),
G_SIGNAL_RUN_LAST,
- 0,
+ G_STRUCT_OFFSET(EfwProtoClass, responded),
NULL, NULL,
efw_proto_sigs_marshal_VOID__ENUM_UINT_UINT_UINT_POINTER_UINT,
G_TYPE_NONE,
@@ -34,6 +34,24 @@ struct _EfwProto {
struct _EfwProtoClass {
HinawaFwRespClass parent_class;
+
+ /**
+ * EfwProtoClass::responded:
+ * @self: A #EfwProto.
+ * @status: One of #HinawaSndEfwStatus.
+ * @seqnum: The sequence number of response.
+ * @category: The value of category field in the response.
+ * @command: The value of command field in the response.
+ * @frame: (array length=frame_size)(element-type guint32): The array with elements for
+ * quadlet data of response for Echo Fireworks protocol.
+ * @frame_size: The number of elements of the array.
+ *
+ * When the unit transfers asynchronous packet as response for Fireworks protocol, and the
+ * process successfully reads the content of response from ALSA Fireworks driver, the
+ * #EfwProto::responded signal handler is called with parameters of the response.
+ */
+ void (*responded)(EfwProto *self, HinawaSndEfwStatus status, guint seqnum,
+ guint category, guint command, const guint32 *frame, guint frame_size);
};
EfwProto *efw_proto_new();
GObject allows applications to override class virtual method with own method implementation in inheritance. This commit adds the class virtual method to handle 'responded' signal added in the former commit. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> --- efw-downloader/src/efw-proto.c | 2 +- efw-downloader/src/efw-proto.h | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-)