From 24f9309d6ecd559d24c54391fadef76cdbde1097 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 16 May 2025 11:19:59 -0500 Subject: serial-parsers,port-serial-at: move echo removal into serial parser Mainly because we need somewhere to stash the call end regex, and it's silly to have a 3rd instance of that in MMPortSerialAt when we already have one in the serial parsers that MMPortSerialAt relies on pretty heavily. Signed-off-by: Dan Williams --- src/mm-port-serial-at.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mm-port-serial-at.h') diff --git a/src/mm-port-serial-at.h b/src/mm-port-serial-at.h index 9ed6a218..8377d8da 100644 --- a/src/mm-port-serial-at.h +++ b/src/mm-port-serial-at.h @@ -65,6 +65,9 @@ typedef void (*MMPortSerialAtUnsolicitedMsgFn) (MMPortSerialAt *port, GMatchInfo *match_info, gpointer user_data); +typedef void (*MMPortSerialAtRemoveEchoFn) (gpointer user_data, + GByteArray *response); + #define MM_PORT_SERIAL_AT_REMOVE_ECHO "remove-echo" #define MM_PORT_SERIAL_AT_INIT_SEQUENCE_ENABLED "init-sequence-enabled" #define MM_PORT_SERIAL_AT_INIT_SEQUENCE "init-sequence" @@ -97,6 +100,7 @@ void mm_port_serial_at_enable_unsolicited_msg_handler (MMPortSerialAt *self, void mm_port_serial_at_set_response_parser (MMPortSerialAt *self, MMPortSerialAtResponseParserFn fn, + MMPortSerialAtRemoveEchoFn echo_fn, gpointer user_data, GDestroyNotify notify); @@ -113,8 +117,6 @@ gchar *mm_port_serial_at_command_finish (MMPortSerialAt *self, GError **error); /* Just for unit tests */ -void mm_port_serial_at_remove_echo (GByteArray *response); - void mm_port_serial_at_set_flags (MMPortSerialAt *self, MMPortSerialAtFlag flags); -- cgit v1.2.3-70-g09d2