diff libpurple/ft.c @ 17992:5e34cd288a98

merge of 'bdd3cb040100fe925456b862d03cc6c5a61648ef' and 'd4717c30b427fc205d5e8026f0d4305f7cd53f5c'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 02 Jun 2007 06:43:53 +0000
parents e62095e99db0
children 57d350900136 bb30030a22b6
line wrap: on
line diff
--- a/libpurple/ft.c	Sat Jun 02 06:26:24 2007 +0000
+++ b/libpurple/ft.c	Sat Jun 02 06:43:53 2007 +0000
@@ -23,6 +23,7 @@
  *
  */
 #include "internal.h"
+#include "dbus-maybe.h"
 #include "ft.h"
 #include "network.h"
 #include "notify.h"
@@ -56,6 +57,7 @@
 	g_return_val_if_fail(who     != NULL,              NULL);
 
 	xfer = g_new0(PurpleXfer, 1);
+	PURPLE_DBUS_REGISTER_POINTER(xfer, PurpleXfer);
 
 	xfer->ref = 1;
 	xfer->type    = type;
@@ -97,6 +99,7 @@
 	g_free(xfer->remote_ip);
 	g_free(xfer->local_filename);
 
+	PURPLE_DBUS_UNREGISTER_POINTER(xfer);
 	g_free(xfer);
 	xfers = g_list_remove(xfers, xfer);
 }
@@ -551,6 +554,13 @@
 	return xfer->account;
 }
 
+const char *
+purple_xfer_get_remote_user(const PurpleXfer *xfer)
+{
+	g_return_val_if_fail(xfer != NULL, NULL);
+	return xfer->who;
+}
+
 PurpleXferStatusType
 purple_xfer_get_status(const PurpleXfer *xfer)
 {