aboutsummaryrefslogtreecommitdiff
path: root/libindicator/indicator-object.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-11-03 16:38:05 -0600
committerTed Gould <ted@canonical.com>2009-11-03 16:38:05 -0600
commit258f461b7bcd5d3c811a41fe6a7ad4ffae73f4be (patch)
tree0f0eafe9f5b6349f13c5f563600a8aed02159aa3 /libindicator/indicator-object.c
parent78868a0db98b9f2dc9a52b5f104f6f76a5dae549 (diff)
downloadlibayatana-indicator-258f461b7bcd5d3c811a41fe6a7ad4ffae73f4be.tar.gz
libayatana-indicator-258f461b7bcd5d3c811a41fe6a7ad4ffae73f4be.tar.bz2
libayatana-indicator-258f461b7bcd5d3c811a41fe6a7ad4ffae73f4be.zip
Creating the actual backing function for indicator_object_get_entries.
Diffstat (limited to 'libindicator/indicator-object.c')
-rw-r--r--libindicator/indicator-object.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c
index 8c683da..db4b819 100644
--- a/libindicator/indicator-object.c
+++ b/libindicator/indicator-object.c
@@ -256,3 +256,29 @@ get_entries_default (IndicatorObject * io)
return g_list_append(NULL, &(priv->entry));
}
+
+/**
+ indicator_object_get_entires:
+ @io: #IndicatorObject to query
+
+ This function looks on the class for the object and calls
+ it's #IndicatorObjectClass::get_entries function. The
+ list should be owned by the caller, but the individual
+ enteries should not be.
+
+ Return value: A list if #IndicatorObjectEntry structures or
+ NULL if there is an error.
+*/
+GList *
+indicator_object_get_entries (IndicatorObject * io)
+{
+ g_return_val_if_fail(INDICATOR_IS_OBJECT(io), NULL);
+ IndicatorObjectClass * class = INDICATOR_OBJECT_GET_CLASS(io);
+
+ if (class->get_entries) {
+ return class->get_entries(io);
+ }
+
+ g_error("No get_entries function on object. It must have been deleted?!?!");
+ return NULL;
+}