aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-06-11 14:17:04 -0500
committerTed Gould <ted@canonical.com>2009-06-11 14:17:04 -0500
commitf9aa333e5737ae0fcab56d9f4c5c9ed463011e9f (patch)
tree1d8710945e0d71240f8ba6e4bac3b14d421c2898 /src
parent01df160c30f98b6833f0e2341edf9ab94b95d801 (diff)
downloadayatana-indicator-session-f9aa333e5737ae0fcab56d9f4c5c9ed463011e9f.tar.gz
ayatana-indicator-session-f9aa333e5737ae0fcab56d9f4c5c9ed463011e9f.tar.bz2
ayatana-indicator-session-f9aa333e5737ae0fcab56d9f4c5c9ed463011e9f.zip
Some public funtions and now they can be subclassed
Diffstat (limited to 'src')
-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;
+}