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
This commit is contained in:
Jasper St. Pierre 2011-02-26 12:32:27 -05:00
parent 12df10b2d0
commit 525da01a62
3 changed files with 35 additions and 1 deletions

View File

@ -262,7 +262,7 @@ libgnome_shell_la_LIBADD = \
libgnome_shell_la_CPPFLAGS = $(gnome_shell_cflags) libgnome_shell_la_CPPFLAGS = $(gnome_shell_cflags)
Shell-0.1.gir: libgnome-shell.la St-1.0.gir 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_CFLAGS = $(libgnome_shell_la_CPPFLAGS) -I $(srcdir)
Shell_0_1_gir_LIBS = libgnome-shell.la Shell_0_1_gir_LIBS = libgnome-shell.la
Shell_0_1_gir_FILES = $(addprefix $(srcdir)/,$(libgnome_shell_la_gir_sources)) Shell_0_1_gir_FILES = $(addprefix $(srcdir)/,$(libgnome_shell_la_gir_sources))

View File

@ -2088,3 +2088,30 @@ shell_get_self_contact_features (TpConnection *self,
shell_global_get_self_contact_features_cb, shell_global_get_self_contact_features_cb,
callback, NULL, NULL); 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);
}

View File

@ -8,6 +8,7 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <meta/meta-plugin.h> #include <meta/meta-plugin.h>
#include <telepathy-glib/telepathy-glib.h> #include <telepathy-glib/telepathy-glib.h>
#include <telepathy-logger/telepathy-logger.h>
G_BEGIN_DECLS G_BEGIN_DECLS
@ -165,6 +166,12 @@ void shell_get_self_contact_features (TpConnection *self,
const TpContactFeature *features, const TpContactFeature *features,
ShellGetSelfContactFeaturesCb callback); ShellGetSelfContactFeaturesCb callback);
void shell_get_contact_events (TplLogManager *log_manager,
TpAccount *account,
TplEntity *entity,
guint num_events,
GAsyncReadyCallback callback);
G_END_DECLS G_END_DECLS
#endif /* __SHELL_GLOBAL_H__ */ #endif /* __SHELL_GLOBAL_H__ */