pidgin.custom_smiley: 5438cf91: Expose smiley API to perl plugins.

sadrul at pidgin.im sadrul at pidgin.im
Mon May 12 22:50:49 EDT 2008


-----------------------------------------------------------------
Revision: 5438cf91ac36226aeafda8e41bb181f9d6474fac
Ancestor: 5ff73a1d1551900799733ad80872bdf14810437a
Author: sadrul at pidgin.im
Date: 2008-05-13T02:24:17
Branch: im.pidgin.pidgin.custom_smiley
URL: http://d.pidgin.im/viewmtn/revision/info/5438cf91ac36226aeafda8e41bb181f9d6474fac

Added files:
        libpurple/plugins/perl/common/Smiley.xs
Modified files:
        libpurple/plugins/perl/Makefile.am
        libpurple/plugins/perl/common/MANIFEST
        libpurple/plugins/perl/common/Makefile.mingw
        libpurple/plugins/perl/common/Purple.xs
        libpurple/plugins/perl/common/module.h
        libpurple/plugins/perl/common/typemap

ChangeLog: 

Expose smiley API to perl plugins.

-------------- next part --------------
============================================================
--- libpurple/plugins/perl/common/Smiley.xs	e0784581f8fc0869f7349d2862b2572e13873631
+++ libpurple/plugins/perl/common/Smiley.xs	e0784581f8fc0869f7349d2862b2572e13873631
@@ -0,0 +1,81 @@
+#include "module.h"
+
+MODULE = Purple::Smiley  PACKAGE = Purple::Smiley  PREFIX = purple_smiley_
+PROTOTYPES: ENABLE
+
+Purple::Smiley
+purple_smiley_new(img, shortcut)
+	Purple::StoredImage img
+	const char * shortcut
+
+Purple::Smiley
+purple_smiley_new_from_file(shortcut, filepath)
+	const char * shortcut
+	const char * filepath
+
+void
+purple_smiley_delete(smiley)
+	Purple::Smiley smiley
+
+gboolean
+purple_smiley_set_shortcut(smiley, shortcut)
+	Purple::Smiley smiley
+	const char * shortcut
+
+void
+purple_smiley_set_data(smiley, data, data_len, keepfilename)
+	Purple::Smiley  smiley
+	guchar * data
+	size_t  data_len
+	gboolean keepfilename
+
+const char *
+purple_smiley_get_shortcut(smiley)
+	Purple::Smiley smiley
+
+const char *
+purple_smiley_get_checksum(smiley)
+	Purple::Smiley smiley
+
+Purple::StoredImage
+purple_smiley_get_stored_image(smiley)
+	Purple::Smiley smiley
+
+gconstpointer
+purple_smiley_get_data(smiley, len)
+	Purple::Smiley smiley
+	size_t * len
+
+const char *
+purple_smiley_get_extension(smiley)
+	Purple::Smiley smiley
+
+
+gchar_own *
+purple_smiley_get_full_path(smiley)
+	Purple::Smiley smiley
+
+
+MODULE = Purple::Smiley  PACKAGE = Purple::Smileys  PREFIX = purple_smileys_
+PROTOTYPES: ENABLE
+
+void
+purple_smileys_get_all()
+PREINIT:
+    GList *l;
+PPCODE:
+    for (l = purple_smileys_get_all(); l != NULL; l = g_list_delete_link(l, l)) {
+        XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::Smiley")));
+    }
+
+Purple::Smiley
+purple_smileys_find_by_shortcut(shortcut)
+	const char * shortcut
+
+Purple::Smiley
+purple_smileys_find_by_checksum(checksum)
+	const char * checksum
+
+const char *
+purple_smileys_get_storing_dir()
+
============================================================
--- libpurple/plugins/perl/Makefile.am	f60600face567614b375d8f6d7dec8944b333657
+++ libpurple/plugins/perl/Makefile.am	2e55380c5c2f7c49954e8c410da96b350cd16250
@@ -67,6 +67,7 @@ common_sources = \
 	common/SavedStatuses.xs \
 	common/Server.xs \
 	common/Signal.xs \
+	common/Smiley.xs \
 	common/Sound.xs \
 	common/Status.xs \
 	common/Stringref.xs \
============================================================
--- libpurple/plugins/perl/common/MANIFEST	19013bdb48de6c1e3bfd9e6c8901e1785c2d96a8
+++ libpurple/plugins/perl/common/MANIFEST	b568b3bdac66d26d776b645ed17b0980d3ebdae8
@@ -28,6 +28,7 @@ Signal.xs
 SavedStatuses.xs
 Server.xs
 Signal.xs
+Smiley.xs
 Sound.xs
 Status.xs
 Stringref.xs
============================================================
--- libpurple/plugins/perl/common/Makefile.mingw	5cfb735d7fa6566083d0381353f8ee711b658a0d
+++ libpurple/plugins/perl/common/Makefile.mingw	f748523212e430553c00a46fc38a9c926cf96262
@@ -61,8 +61,9 @@ XS_FILES =		Account.xs \
 				Roomlist.xs \
 				SSLConn.xs \
 				SavedStatuses.xs \
+				Server.xs \
 				Signal.xs \
-				Server.xs \
+				Smiley.xs \
 				Sound.xs \
 				Status.xs \
 				Stringref.xs \
============================================================
--- libpurple/plugins/perl/common/Purple.xs	6a4886992c3878d84bde921ba4df22c8f21846ca
+++ libpurple/plugins/perl/common/Purple.xs	ce3849342be8f7337ca94c9b31378f0ef076f00c
@@ -30,6 +30,7 @@ PURPLE_PERL_BOOT_PROTO(Signal);
 PURPLE_PERL_BOOT_PROTO(SavedStatus);
 PURPLE_PERL_BOOT_PROTO(Serv);
 PURPLE_PERL_BOOT_PROTO(Signal);
+PURPLE_PERL_BOOT_PROTO(Smiley);
 PURPLE_PERL_BOOT_PROTO(Sound);
 PURPLE_PERL_BOOT_PROTO(Status);
 PURPLE_PERL_BOOT_PROTO(Stringref);
@@ -68,6 +69,7 @@ BOOT:
 	PURPLE_PERL_BOOT(SavedStatus);
 	PURPLE_PERL_BOOT(Serv);
 	PURPLE_PERL_BOOT(Signal);
+	PURPLE_PERL_BOOT(Smiley);
 	PURPLE_PERL_BOOT(Sound);
 	PURPLE_PERL_BOOT(Status);
 	PURPLE_PERL_BOOT(Stringref);
============================================================
--- libpurple/plugins/perl/common/module.h	e2f5c01868185ca35148d1c80cb90c4e9eaf59f0
+++ libpurple/plugins/perl/common/module.h	869d0f20fb06641fc6d97b1c2a9f9af7cef8087b
@@ -51,6 +51,7 @@ typedef struct group *Purple__Group;
 #include "savedstatuses.h"
 #include "server.h"
 #include "signals.h"
+#include "smiley.h"
 #include "sound.h"
 #include "sslconn.h"
 #include "status.h"
@@ -240,6 +241,9 @@ typedef PurpleSavedStatusSub *		Purple__
 typedef PurpleSavedStatus *		Purple__SavedStatus;
 typedef PurpleSavedStatusSub *		Purple__SavedStatus__Sub;
 
+/* smiley.h */
+typedef PurpleSmiley *		Purple__Smiley;
+
 /* sound.h */
 typedef PurpleSoundEventID		Purple__SoundEventID;
 typedef PurpleSoundUiOps *		Purple__Sound__UiOps;
============================================================
--- libpurple/plugins/perl/common/typemap	f86086abba79a48ffea4fe3f67b2fb13fd7d284b
+++ libpurple/plugins/perl/common/typemap	5fafbbff0b0df40c136049272d784b9e7e8d8056
@@ -151,6 +151,7 @@ Purple::PresenceContext			T_IV
 
 Purple::Presence				T_PurpleObj
 Purple::PresenceContext			T_IV
+Purple::Smiley				T_PurpleObj
 Purple::Status				T_PurpleObj
 Purple::StatusAttr			T_PurpleObj
 Purple::StatusPrimitive			T_IV


More information about the Commits mailing list