[gnome-shell] shell-global: Add wrappers for TelepathyLogger
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] shell-global: Add wrappers for TelepathyLogger
- Date: Mon, 14 Mar 2011 22:53:27 +0000 (UTC)
commit 525da01a62415ea63150dfdab53b809d9a0f7ec8
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sat Feb 26 12:32:27 2011 -0500
shell-global: Add wrappers for TelepathyLogger
gjs can't support more than one callback in the same function,
so work around this with yet another shell-global wrapper.
https://bugzilla.gnome.org/show_bug.cgi?id=643377
src/Makefile.am | 2 +-
src/shell-global.c | 27 +++++++++++++++++++++++++++
src/shell-global.h | 7 +++++++
3 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 7c251de..a018e81 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -262,7 +262,7 @@ libgnome_shell_la_LIBADD = \
libgnome_shell_la_CPPFLAGS = $(gnome_shell_cflags)
Shell-0.1.gir: libgnome-shell.la St-1.0.gir
-Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-2.91 TelepathyGLib-0.12
+Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-2.91 TelepathyGLib-0.12 TelepathyLogger-1.0
Shell_0_1_gir_CFLAGS = $(libgnome_shell_la_CPPFLAGS) -I $(srcdir)
Shell_0_1_gir_LIBS = libgnome-shell.la
Shell_0_1_gir_FILES = $(addprefix $(srcdir)/,$(libgnome_shell_la_gir_sources))
diff --git a/src/shell-global.c b/src/shell-global.c
index 67c8703..88b8224 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -2088,3 +2088,30 @@ shell_get_self_contact_features (TpConnection *self,
shell_global_get_self_contact_features_cb,
callback, NULL, NULL);
}
+
+/**
+ * shell_get_contact_events:
+ * @log_manager: A #TplLogManager
+ * @account: A #TpAccount
+ * @entity: A #TplEntity
+ * @num_events: The number of events to retrieve
+ * @callback: (scope async): User callback to run when the contact is ready
+ *
+ * Wrap tpl_log_manager_get_filtered_events_async because gjs cannot support
+ * multiple callbacks in the same function call.
+ */
+void
+shell_get_contact_events (TplLogManager *log_manager,
+ TpAccount *account,
+ TplEntity *entity,
+ guint num_events,
+ GAsyncReadyCallback callback)
+{
+ tpl_log_manager_get_filtered_events_async (log_manager,
+ account,
+ entity,
+ TPL_EVENT_MASK_TEXT,
+ num_events,
+ NULL, NULL,
+ callback, NULL);
+}
diff --git a/src/shell-global.h b/src/shell-global.h
index b3f86e3..1ca247c 100644
--- a/src/shell-global.h
+++ b/src/shell-global.h
@@ -8,6 +8,7 @@
#include <gtk/gtk.h>
#include <meta/meta-plugin.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-logger/telepathy-logger.h>
G_BEGIN_DECLS
@@ -165,6 +166,12 @@ void shell_get_self_contact_features (TpConnection *self,
const TpContactFeature *features,
ShellGetSelfContactFeaturesCb callback);
+void shell_get_contact_events (TplLogManager *log_manager,
+ TpAccount *account,
+ TplEntity *entity,
+ guint num_events,
+ GAsyncReadyCallback callback);
+
G_END_DECLS
#endif /* __SHELL_GLOBAL_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]