telepathy-mission-control: tests/twisted/fake-network-monitor: implement the "network-metered" and "connectivity" properties of GNetworkMonitor
George Kiagiadakis
gkiagia at kemper.freedesktop.org
Sat Jan 28 11:43:24 UTC 2017
Module: telepathy-mission-control
Branch: master
Commit: d3e011a2dfaf6ecb41651de7ccc0d2bb520f3208
URL: http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=d3e011a2dfaf6ecb41651de7ccc0d2bb520f3208
Author: George Kiagiadakis <gkiagia at tolabaki.gr>
Date: Fri Jul 1 18:31:21 2016 +0300
tests/twisted/fake-network-monitor: implement the "network-metered" and "connectivity" properties of GNetworkMonitor
"connectivity" is required since glib 2.44
"network-metered" is required since glib 2.46
https://bugs.freedesktop.org/show_bug.cgi?id=96763
Reviewed-by: Diane Trout <diane at ghic.org>
---
tests/twisted/fake-network-monitor.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/tests/twisted/fake-network-monitor.c b/tests/twisted/fake-network-monitor.c
index b78d421..f8b43cd 100644
--- a/tests/twisted/fake-network-monitor.c
+++ b/tests/twisted/fake-network-monitor.c
@@ -44,7 +44,9 @@ static GType fake_network_monitor_get_type (void);
enum
{
PROP_0,
- PROP_NETWORK_AVAILABLE
+ PROP_NETWORK_AVAILABLE,
+ PROP_NETWORK_METERED,
+ PROP_CONNECTIVITY
};
static void initable_iface_init (GInitableIface *);
@@ -80,7 +82,13 @@ fake_network_monitor_get_property (GObject *object,
case PROP_NETWORK_AVAILABLE:
g_value_set_boolean (value, self->available);
break;
-
+ case PROP_NETWORK_METERED:
+ g_value_set_boolean (value, FALSE);
+ break;
+ case PROP_CONNECTIVITY:
+ g_value_set_enum (value, self->available ?
+ G_NETWORK_CONNECTIVITY_FULL : G_NETWORK_CONNECTIVITY_LOCAL);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
break;
@@ -111,6 +119,10 @@ fake_network_monitor_class_init (FakeNetworkMonitorClass *cls)
g_object_class_override_property (oclass, PROP_NETWORK_AVAILABLE,
"network-available");
+ g_object_class_override_property (oclass, PROP_NETWORK_METERED,
+ "network-metered");
+ g_object_class_override_property (oclass, PROP_CONNECTIVITY,
+ "connectivity");
}
static void
More information about the telepathy-commits
mailing list