summaryrefslogtreecommitdiff
path: root/src/nm-connectivity.h
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2011-12-13 17:35:36 -0600
committerDan Williams <dcbw@redhat.com>2012-02-27 10:56:51 -0600
commitd47072a1a1a2e07a844fd2604f9016534e199a44 (patch)
tree0c6851ebd8ba8be8281a1b946ba442d1aca5d047 /src/nm-connectivity.h
parentd62f712d6e2ce4673143c5451b4262183c2ec585 (diff)
core: clean up and simplify connectivity check
We can just use property notifications instead of having a separate connected signal. Also clean up some formatting and make some private variable names shorter.
Diffstat (limited to 'src/nm-connectivity.h')
-rw-r--r--src/nm-connectivity.h24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/nm-connectivity.h b/src/nm-connectivity.h
index 14ba89aff9..91854e1885 100644
--- a/src/nm-connectivity.h
+++ b/src/nm-connectivity.h
@@ -34,35 +34,31 @@
#define NM_IS_CONNECTIVITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_CONNECTIVITY))
#define NM_CONNECTIVITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_CONNECTIVITY, NMConnectivityClass))
-
-#define NM_CONNECTIVITY_CHECK_RUNNING "check-running"
-#define NM_CONNECTIVITY_CHECK_URI "check-uri"
-#define NM_CONNECTIVITY_CHECK_INTERVAL "check-interval"
-#define NM_CONNECTIVITY_CHECK_RESPONSE "check-response"
+/* 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_SIGNAL_CONNECTED_CHANGED "connected-changed"
-
-
typedef struct {
GObject parent;
} NMConnectivity;
typedef struct {
GObjectClass parent;
-
- /* Signals */
- void (*connected_changed) (NMConnectivity *connectivity, gboolean connected);
} NMConnectivityClass;
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_check (NMConnectivity *connectivity);
+void nm_connectivity_check (NMConnectivity *connectivity);
-gboolean nm_connectivity_get_connected (NMConnectivity *connectivity);
+gboolean nm_connectivity_get_connected (NMConnectivity *connectivity);
#endif /* NM_CONNECTIVITY_H */