/soc/2012/michael/android: 5500a3870c74: Implelemted addBuddy an...

Michael Zangl michael at soc.pidgin.im
Tue Aug 7 07:58:35 EDT 2012


Changeset: 5500a3870c74648fafc8f92b8101fce627ad9436
Author:	 Michael Zangl <michael at soc.pidgin.im>
Date:	 2012-08-07 13:57 +0200
Branch:	 soc.2012.android
URL: http://hg.pidgin.im/soc/2012/michael/android/rev/5500a3870c74

Description:

Implelemted addBuddy and getPriorityBuddy for purpleContact (native)

diffstat:

 android/workspace/im.pidgin.libpurple/native/PurpleContact.c |  24 ++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diffs (36 lines):

diff --git a/android/workspace/im.pidgin.libpurple/native/PurpleContact.c b/android/workspace/im.pidgin.libpurple/native/PurpleContact.c
--- a/android/workspace/im.pidgin.libpurple/native/PurpleContact.c
+++ b/android/workspace/im.pidgin.libpurple/native/PurpleContact.c
@@ -1,4 +1,5 @@
 #include "PurpleContact.h"
+#include "PurpleBuddy.h"
 #include "helpers.h"
 #include <libpurple/blist.h>
 
@@ -45,3 +46,26 @@ Java_im_pidgin_libpurple_blist_PurpleCon
 {
 	return pToLong(purple_contact_get_group(getNativeContact(env, obj)));
 }
+
+/*
+ * Class:     im_pidgin_libpurple_blist_PurpleContact
+ * Method:    addBuddy_native
+ * Signature: (Lim/pidgin/libpurple/buddy/PurpleBuddy;)V
+ */JNIEXPORT void JNICALL
+Java_im_pidgin_libpurple_blist_PurpleContact_addBuddy_1native(JNIEnv *env,
+		jobject obj, jobject buddy)
+{
+	purple_blist_add_buddy(getNativeBuddy(env, buddy),
+			getNativeContact(env, obj), NULL, NULL);
+}
+
+/*
+ * Class:     im_pidgin_libpurple_blist_PurpleContact
+ * Method:    getPriorityBuddy_native
+ * Signature: ()J
+ */JNIEXPORT jlong JNICALL
+Java_im_pidgin_libpurple_blist_PurpleContact_getPriorityBuddy_1native(
+		JNIEnv *env, jobject obj)
+{
+	return pToLong(purple_contact_get_priority_buddy(getNativeContact(env, obj)));
+}



More information about the Commits mailing list