From 9fc3d15d29678585b2a120f944ec765dcbbf3293 Mon Sep 17 00:00:00 2001 From: Frederic Martinsons Date: Fri, 15 Oct 2021 08:27:42 +0200 Subject: api, dbus, bearer: Add ReloadStatsSupported bearer dbus property This property means that the current bearer can reload stats and read TX and RX bytes transmitted. The property is initiliazed as soon as the bearer is connected. Signed-off-by: Frederic Martinsons --- libmm-glib/mm-bearer.c | 21 +++++++++++++++++++++ libmm-glib/mm-bearer.h | 2 ++ 2 files changed, 23 insertions(+) (limited to 'libmm-glib') diff --git a/libmm-glib/mm-bearer.c b/libmm-glib/mm-bearer.c index 52ec65333..ddcfa0538 100644 --- a/libmm-glib/mm-bearer.c +++ b/libmm-glib/mm-bearer.c @@ -171,6 +171,27 @@ mm_bearer_get_connected (MMBearer *self) /*****************************************************************************/ +/** + * mm_bearer_get_reload_stats_supported: + * @self: A #MMBearer. + * + * Checks whether or not the #MMBearer supporting stats reload (to have + * RX and TX bytes of the ongoing connection). + * + * Returns: %TRUE if the #MMBearer supports these stats, #FALSE otherwise. + * + * Since: 1.20 + */ +gboolean +mm_bearer_get_reload_stats_supported (MMBearer *self) +{ + g_return_val_if_fail (MM_IS_BEARER (self), FALSE); + + return mm_gdbus_bearer_get_reload_stats_supported (MM_GDBUS_BEARER (self)); +} + +/*****************************************************************************/ + /** * mm_bearer_get_suspended: * @self: A #MMBearer. diff --git a/libmm-glib/mm-bearer.h b/libmm-glib/mm-bearer.h index 7424c8d90..c1a32cd3e 100644 --- a/libmm-glib/mm-bearer.h +++ b/libmm-glib/mm-bearer.h @@ -76,6 +76,8 @@ gchar *mm_bearer_dup_interface (MMBearer *self); gboolean mm_bearer_get_connected (MMBearer *self); +gboolean mm_bearer_get_reload_stats_supported (MMBearer *self); + gboolean mm_bearer_get_suspended (MMBearer *self); gboolean mm_bearer_get_multiplexed (MMBearer *self); -- cgit v1.2.1