/soc/2013/ankitkv/gobjectification: cef809309dbf: Fixed libpurpl...

Ankit Vani a at nevitus.org
Fri Sep 6 07:56:05 EDT 2013


Changeset: cef809309dbf2e3dd7d6e6489b72b8d86c5e2902
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-09-06 17:25 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/cef809309dbf

Description:

Fixed libpurple build errors, and added purple_xfer_get_message()

diffstat:

 libpurple/plugins/perl/common/Xfer.xs |   2 +-
 libpurple/purple.h.in                 |   2 +-
 libpurple/xfer.c                      |  11 +++++++++++
 libpurple/xfer.h                      |   9 +++++++++
 4 files changed, 22 insertions(+), 2 deletions(-)

diffs (78 lines):

diff --git a/libpurple/plugins/perl/common/Xfer.xs b/libpurple/plugins/perl/common/Xfer.xs
--- a/libpurple/plugins/perl/common/Xfer.xs
+++ b/libpurple/plugins/perl/common/Xfer.xs
@@ -9,7 +9,7 @@ BOOT:
 	HV *status_stash = gv_stashpv("Purple::Xfer::Status", 1);
 
 	static const constiv *civ, type_const_iv[] = {
-#define const_iv(name) {#name, (IV)PURPLE_XFER_##name}
+#define const_iv(name) {#name, (IV)PURPLE_XFER_TYPE_##name}
 		const_iv(UNKNOWN),
 		const_iv(SEND),
 		const_iv(RECEIVE),
diff --git a/libpurple/purple.h.in b/libpurple/purple.h.in
--- a/libpurple/purple.h.in
+++ b/libpurple/purple.h.in
@@ -60,7 +60,6 @@
 #include <dnsquery.h>
 #include <dnssrv.h>
 #include <eventloop.h>
-#include <ft.h>
 #include <idle.h>
 #include <imgstore.h>
 #include <log.h>
@@ -98,6 +97,7 @@
 #include <util.h>
 #include <version.h>
 #include <whiteboard.h>
+#include <xfer.h>
 #include <xmlnode.h>
 
 #endif
diff --git a/libpurple/xfer.c b/libpurple/xfer.c
--- a/libpurple/xfer.c
+++ b/libpurple/xfer.c
@@ -24,6 +24,7 @@
  */
 #include "internal.h"
 #include "dbus-maybe.h"
+#include "enums.h"
 #include "xfer.h"
 #include "network.h"
 #include "notify.h"
@@ -964,6 +965,16 @@ purple_xfer_set_message(PurpleXfer *xfer
 	priv->message = g_strdup(message);
 }
 
+const char *
+purple_xfer_get_message(const PurpleXfer *xfer)
+{
+	PurpleXferPrivate *priv = PURPLE_XFER_GET_PRIVATE(xfer);
+
+	g_return_val_if_fail(priv != NULL, NULL);
+
+	return priv->message;
+}
+
 void
 purple_xfer_set_filename(PurpleXfer *xfer, const char *filename)
 {
diff --git a/libpurple/xfer.h b/libpurple/xfer.h
--- a/libpurple/xfer.h
+++ b/libpurple/xfer.h
@@ -436,6 +436,15 @@ void purple_xfer_set_status(PurpleXfer *
 void purple_xfer_set_message(PurpleXfer *xfer, const char *message);
 
 /**
+ * Returns the message for the file transfer.
+ *
+ * @param xfer     The file transfer.
+ *
+ * @return The message.
+ */
+const char *purple_xfer_get_message(const PurpleXfer *xfer);
+
+/**
  * Sets the filename for the file transfer.
  *
  * @param xfer     The file transfer.



More information about the Commits mailing list