From a4256940da049f91bbbea5e53e469a59ea9c10f7 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Fri, 25 Oct 2013 21:20:58 +0200 Subject: Imported Upstream version 0.9.8.8 --- src/nm-connectivity.h | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'src/nm-connectivity.h') diff --git a/src/nm-connectivity.h b/src/nm-connectivity.h index 6f6ee165..98a00884 100644 --- a/src/nm-connectivity.h +++ b/src/nm-connectivity.h @@ -1,4 +1,3 @@ - /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager -- Network link manager * @@ -24,6 +23,7 @@ #include #include +#include #include "NetworkManager.h" @@ -35,12 +35,10 @@ #define NM_CONNECTIVITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_CONNECTIVITY, NMConnectivityClass)) /* Properties */ -#define NM_CONNECTIVITY_RUNNING "running" #define NM_CONNECTIVITY_URI "uri" #define NM_CONNECTIVITY_INTERVAL "interval" #define NM_CONNECTIVITY_RESPONSE "response" -#define NM_CONNECTIVITY_CONNECTED "connected" - +#define NM_CONNECTIVITY_STATE "state" typedef struct { GObject parent; @@ -52,15 +50,20 @@ typedef struct { GType nm_connectivity_get_type (void); +NMConnectivity *nm_connectivity_new (const gchar *check_uri, + guint check_interval, + const gchar *check_response); -NMConnectivity *nm_connectivity_new (const gchar *check_uri, - guint check_interval, - const gchar *check_response); - -void nm_connectivity_start_check (NMConnectivity *connectivity); +void nm_connectivity_set_online (NMConnectivity *self, + gboolean online); -void nm_connectivity_stop_check (NMConnectivity *connectivity); +NMConnectivityState nm_connectivity_get_state (NMConnectivity *self); -gboolean nm_connectivity_get_connected (NMConnectivity *connectivity); +void nm_connectivity_check_async (NMConnectivity *self, + GAsyncReadyCallback callback, + gpointer user_data); +NMConnectivityState nm_connectivity_check_finish (NMConnectivity *self, + GAsyncResult *result, + GError **error); #endif /* NM_CONNECTIVITY_H */ -- cgit 1.3.0-6-gf8a5