diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2021-05-23 20:58:40 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2021-05-26 13:14:52 +0000 |
commit | 29a1c24538444eba275ac53ff7b84c71c443fb43 (patch) | |
tree | 7920b93fc777ea5fd9a92ca9835af9fa12ff7586 /src/mm-base-bearer.h | |
parent | 8913bab1c5f085e3fcb5d7838617b7386ac35681 (diff) |
base-bearer: improve comments of the load/reload_connection_status() methods
Diffstat (limited to 'src/mm-base-bearer.h')
-rw-r--r-- | src/mm-base-bearer.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/mm-base-bearer.h b/src/mm-base-bearer.h index 499ec703..a02036ca 100644 --- a/src/mm-base-bearer.h +++ b/src/mm-base-bearer.h @@ -125,9 +125,15 @@ struct _MMBaseBearerClass { GError **error); /* Monitor connection status: - * NOTE: only CONNECTED or DISCONNECTED should be reported here; this method + * + * Only CONNECTED or DISCONNECTED should be reported here; this method * is used to poll for connection status once the connection has been - * established */ + * established. + * + * This method will return MM_CORE_ERROR_UNSUPPORTED if the polling + * is not required (i.e. if we can safely rely on async indications + * sent by the modem). + */ void (* load_connection_status) (MMBaseBearer *bearer, GAsyncReadyCallback callback, gpointer user_data); @@ -137,7 +143,17 @@ struct _MMBaseBearerClass { #if defined WITH_SYSTEMD_SUSPEND_RESUME - /* Reload connection status */ + /* Reload connection status: + * + * This method should return the exact connection status of the bearer, and + * the check must always be performed (if supported). This method should not + * return MM_CORE_ERROR_UNSUPPORTED as a way to skip the operation, as in + * this case the connection monitoring is required during the quick + * suspend/resume synchronization. + * + * It is up to each protocol/plugin whether providing the same method here + * and in load_connection_status() makes sense. + */ void (* reload_connection_status) (MMBaseBearer *bearer, GAsyncReadyCallback callback, gpointer user_data); |