Mercurial > pidgin
changeset 23144:f1df88964b3d
Expose the smiley API to dbus.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Tue, 13 May 2008 00:29:22 +0000 |
parents | 2012a85f8507 |
children | 66057702ae5d |
files | libpurple/Makefile.am libpurple/dbus-server.c libpurple/smiley.c |
diffstat | 3 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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"
--- 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(); }