# HG changeset patch # User Sadrul Habib Chowdhury # Date 1210638562 0 # Node ID f1df88964b3d7de49d1850cb58a636f87f7a6fad # Parent 2012a85f8507d157f87e4d7fa7015c7f9e6a6be0 Expose the smiley API to dbus. diff -r 2012a85f8507 -r f1df88964b3d libpurple/Makefile.am --- a/libpurple/Makefile.am Tue May 13 00:27:36 2008 +0000 +++ b/libpurple/Makefile.am Tue May 13 00:29:22 2008 +0000 @@ -156,7 +156,7 @@ dbus_exported = dbus-useful.h dbus-define-api.h account.h blist.h buddyicon.h \ connection.h conversation.h core.h ft.h log.h notify.h prefs.h roomlist.h \ - savedstatuses.h status.h server.h util.h xmlnode.h prpl.h + savedstatuses.h smiley.h status.h server.h util.h xmlnode.h prpl.h purple_build_coreheaders = $(addprefix $(srcdir)/, $(purple_coreheaders)) \ $(purple_builtheaders) diff -r 2012a85f8507 -r f1df88964b3d libpurple/dbus-server.c --- a/libpurple/dbus-server.c Tue May 13 00:27:36 2008 +0000 +++ b/libpurple/dbus-server.c Tue May 13 00:29:22 2008 +0000 @@ -40,6 +40,7 @@ #include "core.h" #include "internal.h" #include "savedstatuses.h" +#include "smiley.h" #include "util.h" #include "value.h" #include "xmlnode.h" diff -r 2012a85f8507 -r f1df88964b3d libpurple/smiley.c --- a/libpurple/smiley.c Tue May 13 00:27:36 2008 +0000 +++ b/libpurple/smiley.c Tue May 13 00:29:22 2008 +0000 @@ -25,11 +25,12 @@ */ #include "internal.h" -#include "xmlnode.h" +#include "dbus-maybe.h" #include "debug.h" #include "imgstore.h" #include "smiley.h" #include "util.h" +#include "xmlnode.h" /**************************************************************************/ /* Main structures, members and constants */ @@ -305,6 +306,8 @@ static void purple_smiley_init(GTypeInstance *instance, gpointer klass) { + PurpleSmiley *smiley = PURPLE_SMILEY(instance); + PURPLE_DBUS_REGISTER_POINTER(smiley, PurpleSmiley); } static void @@ -379,6 +382,8 @@ purple_smiley_data_unstore(purple_imgstore_get_filename(smiley->img)); purple_imgstore_unref(smiley->img); + PURPLE_DBUS_UNREGISTER_POINTER(smiley); + purple_smileys_save(); }