diff options
author | Aleksander Morgado <aleksandermj@chromium.org> | 2022-12-15 21:09:30 +0000 |
---|---|---|
committer | Aleksander Morgado <aleksandermj@chromium.org> | 2022-12-18 21:52:51 +0000 |
commit | 455c4860915b194c654abb6cd49bcbb483ec650b (patch) | |
tree | 4ca9912163d96e179a8217bce576ef0d1b3cc0b8 /src/mm-port.c | |
parent | 2a1851536c3c096ab4e3f26ebe6671b946e665be (diff) |
port: define new generic 'removed' signal
This signal indicates that the port is no longer accessible. Unlike a
udev port removal event, this indication may happen even if the port
is still exposed by the system.
It is designed to detect protocol proxy crashes, and so when such
event is detected by the modem, a full reprobe of the device will be
done to start from scratch the protocol management operations.
Diffstat (limited to 'src/mm-port.c')
-rw-r--r-- | src/mm-port.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mm-port.c b/src/mm-port.c index aca16b5f..f2df3933 100644 --- a/src/mm-port.c +++ b/src/mm-port.c @@ -40,6 +40,7 @@ enum { enum { TIMED_OUT, + REMOVED, LAST_SIGNAL }; @@ -287,4 +288,13 @@ mm_port_class_init (MMPortClass *klass) NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, G_TYPE_UINT); + + signals[REMOVED] = + g_signal_new (MM_PORT_SIGNAL_REMOVED, + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (MMPortClass, removed), + NULL, NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, 0); } |