aboutsummaryrefslogtreecommitdiff
path: root/src/status-provider.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/status-provider.c')
-rw-r--r--src/status-provider.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/status-provider.c b/src/status-provider.c
index e18cc31..613019b 100644
--- a/src/status-provider.c
+++ b/src/status-provider.c
@@ -14,6 +14,11 @@ status_provider_class_init (StatusProviderClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ klass->status_changed = NULL;
+
+ klass->set_status = NULL;
+ klass->get_status = NULL;
+
return;
}
@@ -24,3 +29,31 @@ status_provider_init (StatusProvider *self)
return;
}
+void
+status_provider_set_status (StatusProvider * sp, StatusProviderStatus status)
+{
+ g_return_if_fail(IS_STATUS_PROVIDER(sp));
+
+ StatusProviderClass * class = STATUS_PROVIDER_CLASS(sp);
+ g_return_if_fail(class->set_status != NULL);
+
+ return class->set_status(sp, status);
+}
+
+StatusProviderStatus
+status_provider_get_status (StatusProvider * sp)
+{
+ g_return_val_if_fail(IS_STATUS_PROVIDER(sp), STATUS_PROVIDER_STATUS_OFFLINE);
+
+ StatusProviderClass * class = STATUS_PROVIDER_CLASS(sp);
+ g_return_val_if_fail(class->get_status != NULL, STATUS_PROVIDER_STATUS_OFFLINE);
+
+ return class->get_status(sp);
+}
+
+void
+status_provider_emit_status_changed (StatusProvider * sp, StatusProviderStatus newstatus)
+{
+
+ return;
+}