qulogic/pidgin

Parents 3573c82d32d8
Children 2be373489ef1
Update the PurpleProtocolXferInterface to pass around the interfance instance as well
--- a/libpurple/protocols/bonjour/bonjour.c Thu Aug 31 22:40:50 2017 -0500
+++ b/libpurple/protocols/bonjour/bonjour.c Thu Sep 07 22:55:03 2017 -0500
@@ -466,7 +466,7 @@
}
static gboolean
-bonjour_can_receive_file(PurpleConnection *connection, const char *who)
+bonjour_can_receive_file(PurpleProtocolXferInterface *iface, PurpleConnection *connection, const char *who)
{
PurpleBuddy *buddy = purple_blist_find_buddy(purple_connection_get_account(connection), who);
--- a/libpurple/protocols/bonjour/bonjour_ft.c Thu Aug 31 22:40:50 2017 -0500
+++ b/libpurple/protocols/bonjour/bonjour_ft.c Thu Sep 07 22:55:03 2017 -0500
@@ -339,7 +339,7 @@
}
PurpleXfer *
-bonjour_new_xfer(PurpleConnection *gc, const char *who)
+bonjour_new_xfer(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who)
{
PurpleXfer *xfer;
XepXfer *xep_xfer;
@@ -376,7 +376,7 @@
}
void
-bonjour_send_file(PurpleConnection *gc, const char *who, const char *file)
+bonjour_send_file(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who, const char *file)
{
PurpleXfer *xfer;
@@ -385,7 +385,7 @@
purple_debug_info("bonjour", "Bonjour-send-file to=%s.\n", who);
- xfer = bonjour_new_xfer(gc, who);
+ xfer = bonjour_new_xfer(iface, gc, who);
if (file)
purple_xfer_request_accepted(xfer, file);
--- a/libpurple/protocols/bonjour/bonjour_ft.h Thu Aug 31 22:40:50 2017 -0500
+++ b/libpurple/protocols/bonjour/bonjour_ft.h Thu Sep 07 22:55:03 2017 -0500
@@ -60,7 +60,7 @@
* @param gc The PurpleConnection handle.
* @param who Who will we be sending it to?
*/
-PurpleXfer *bonjour_new_xfer(PurpleConnection *gc, const char *who);
+PurpleXfer *bonjour_new_xfer(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who);
/**
* Send a file.
@@ -69,7 +69,7 @@
* @param who Who are we sending it to?
* @param file What file? If NULL, user will choose after this call.
*/
-void bonjour_send_file(PurpleConnection *gc, const char *who, const char *file);
+void bonjour_send_file(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who, const char *file);
void xep_si_parse(PurpleConnection *pc, PurpleXmlNode *packet, PurpleBuddy *pb);
void
--- a/libpurple/protocols/irc/dcc_send.c Thu Aug 31 22:40:50 2017 -0500
+++ b/libpurple/protocols/irc/dcc_send.c Thu Sep 07 22:55:03 2017 -0500
@@ -359,7 +359,7 @@
}
-PurpleXfer *irc_dccsend_new_xfer(PurpleConnection *gc, const char *who) {
+PurpleXfer *irc_dccsend_new_xfer(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who) {
PurpleXfer *xfer;
struct irc_xfer_send_data *xd;
@@ -387,8 +387,8 @@
* buddy menu
* It sets up the PurpleXfer struct and tells Purple to go ahead
*/
-void irc_dccsend_send_file(PurpleConnection *gc, const char *who, const char *file) {
- PurpleXfer *xfer = irc_dccsend_new_xfer(gc, who);
+void irc_dccsend_send_file(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who, const char *file) {
+ PurpleXfer *xfer = irc_dccsend_new_xfer(iface, gc, who);
/* Perform the request */
if (file)
--- a/libpurple/protocols/irc/irc.h Thu Aug 31 22:40:50 2017 -0500
+++ b/libpurple/protocols/irc/irc.h Thu Sep 07 22:55:03 2017 -0500
@@ -237,7 +237,7 @@
int irc_cmd_whois(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
int irc_cmd_whowas(struct irc_conn *irc, const char *cmd, const char *target, const char **args);
-PurpleXfer *irc_dccsend_new_xfer(PurpleConnection *gc, const char *who);
-void irc_dccsend_send_file(PurpleConnection *gc, const char *who, const char *file);
+PurpleXfer *irc_dccsend_new_xfer(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who);
+void irc_dccsend_send_file(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who, const char *file);
void irc_dccsend_recv(struct irc_conn *irc, const char *from, const char *msg);
#endif /* _PURPLE_IRC_H */
--- a/libpurple/protocols/jabber/jabber.c Thu Aug 31 22:40:50 2017 -0500
+++ b/libpurple/protocols/jabber/jabber.c Thu Sep 07 22:55:03 2017 -0500
@@ -3540,7 +3540,7 @@
#endif
}
-gboolean jabber_can_receive_file(PurpleConnection *gc, const char *who)
+gboolean jabber_can_receive_file(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who)
{
JabberStream *js = purple_connection_get_protocol_data(gc);
--- a/libpurple/protocols/jabber/jabber.h Thu Aug 31 22:40:50 2017 -0500
+++ b/libpurple/protocols/jabber/jabber.h Thu Sep 07 22:55:03 2017 -0500
@@ -431,6 +431,6 @@
gboolean jabber_initiate_media(PurpleAccount *account, const char *who,
PurpleMediaSessionType type);
PurpleMediaCaps jabber_get_media_caps(PurpleAccount *account, const char *who);
-gboolean jabber_can_receive_file(PurpleConnection *gc, const gchar *who);
+gboolean jabber_can_receive_file(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const gchar *who);
#endif /* PURPLE_JABBER_H_ */
--- a/libpurple/protocols/jabber/si.c Thu Aug 31 22:40:50 2017 -0500
+++ b/libpurple/protocols/jabber/si.c Thu Sep 07 22:55:03 2017 -0500
@@ -1618,7 +1618,7 @@
}
}
-PurpleXfer *jabber_si_new_xfer(PurpleConnection *gc, const char *who)
+PurpleXfer *jabber_si_new_xfer(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who)
{
JabberStream *js;
@@ -1647,11 +1647,11 @@
return xfer;
}
-void jabber_si_xfer_send(PurpleConnection *gc, const char *who, const char *file)
+void jabber_si_xfer_send(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who, const char *file)
{
PurpleXfer *xfer;
- xfer = jabber_si_new_xfer(gc, who);
+ xfer = jabber_si_new_xfer(iface, gc, who);
if (file)
purple_xfer_request_accepted(xfer, file);
--- a/libpurple/protocols/jabber/si.h Thu Aug 31 22:40:50 2017 -0500
+++ b/libpurple/protocols/jabber/si.h Thu Sep 07 22:55:03 2017 -0500
@@ -32,8 +32,8 @@
JabberIqType type, const char *id, PurpleXmlNode *query);
void jabber_si_parse(JabberStream *js, const char *from, JabberIqType type,
const char *id, PurpleXmlNode *si);
-PurpleXfer *jabber_si_new_xfer(PurpleConnection *gc, const char *who);
-void jabber_si_xfer_send(PurpleConnection *gc, const char *who, const char *file);
+PurpleXfer *jabber_si_new_xfer(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who);
+void jabber_si_xfer_send(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who, const char *file);
void jabber_si_init(void);
void jabber_si_uninit(void);
--- a/libpurple/protocols/oscar/oscar.c Thu Aug 31 22:40:50 2017 -0500
+++ b/libpurple/protocols/oscar/oscar.c Thu Sep 07 22:55:03 2017 -0500
@@ -5257,7 +5257,7 @@
* allowed to send a file to this user.
*/
gboolean
-oscar_can_receive_file(PurpleConnection *gc, const char *who)
+oscar_can_receive_file(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who)
{
OscarData *od;
PurpleAccount *account;
@@ -5286,7 +5286,7 @@
}
PurpleXfer *
-oscar_new_xfer(PurpleConnection *gc, const char *who)
+oscar_new_xfer(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who)
{
PurpleXfer *xfer;
OscarData *od;
@@ -5320,11 +5320,11 @@
* file is to be sent to a special someone.
*/
void
-oscar_send_file(PurpleConnection *gc, const char *who, const char *file)
+oscar_send_file(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who, const char *file)
{
PurpleXfer *xfer;
- xfer = oscar_new_xfer(gc, who);
+ xfer = oscar_new_xfer(iface, gc, who);
if (file != NULL)
purple_xfer_request_accepted(xfer, file);
--- a/libpurple/protocols/oscar/oscarcommon.h Thu Aug 31 22:40:50 2017 -0500
+++ b/libpurple/protocols/oscar/oscarcommon.h Thu Sep 07 22:55:03 2017 -0500
@@ -116,9 +116,9 @@
const char *oscar_normalize(const PurpleAccount *account, const char *str);
void oscar_set_icon(PurpleConnection *gc, PurpleImage *img);
void oscar_remove_group(PurpleConnection *gc, PurpleGroup *group);
-gboolean oscar_can_receive_file(PurpleConnection *gc, const char *who);
-void oscar_send_file(PurpleConnection *gc, const char *who, const char *file);
-PurpleXfer *oscar_new_xfer(PurpleConnection *gc, const char *who);
+gboolean oscar_can_receive_file(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who);
+void oscar_send_file(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who, const char *file);
+PurpleXfer *oscar_new_xfer(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who);
gboolean oscar_offline_message(const PurpleBuddy *buddy);
gssize oscar_get_max_message_size(PurpleConversation *conv);
GList *oscar_get_actions(PurpleConnection *gc);
--- a/libpurple/protocols/sametime/sametime.c Thu Aug 31 22:40:50 2017 -0500
+++ b/libpurple/protocols/sametime/sametime.c Thu Sep 07 22:55:03 2017 -0500
@@ -4941,7 +4941,8 @@
}
-static gboolean mw_protocol_can_receive_file(PurpleConnection *gc,
+static gboolean mw_protocol_can_receive_file(PurpleProtocolXferInterface *iface,
+ PurpleConnection *gc,
const char *who) {
struct mwPurpleProtocolData *pd;
struct mwServiceAware *srvc;
@@ -5030,7 +5031,7 @@
}
-static PurpleXfer *mw_protocol_new_xfer(PurpleConnection *gc, const char *who) {
+static PurpleXfer *mw_protocol_new_xfer(PurpleProtocolXferInterface *iface, PurpleConnection *gc, const char *who) {
PurpleAccount *acct;
PurpleXfer *xfer;
@@ -5046,10 +5047,11 @@
return xfer;
}
-static void mw_protocol_send_file(PurpleConnection *gc,
+static void mw_protocol_send_file(PurpleProtocolXferInterface *iface,
+ PurpleConnection *gc,
const char *who, const char *file) {
- PurpleXfer *xfer = mw_protocol_new_xfer(gc, who);
+ PurpleXfer *xfer = mw_protocol_new_xfer(iface, gc, who);
if(file) {
DEBUG_INFO("file != NULL\n");
--- a/libpurple/xfer.c Thu Aug 31 22:40:50 2017 -0500
+++ b/libpurple/xfer.c Thu Sep 07 22:55:03 2017 -0500
@@ -2496,7 +2496,7 @@
g_return_val_if_fail(PURPLE_IS_CONNECTION(connection), FALSE);
g_return_val_if_fail(who, FALSE);
- return iface->can_receive(connection, who);
+ return iface->can_receive(iface, connection, who);
}
void
@@ -2510,7 +2510,7 @@
g_return_if_fail(who);
g_return_if_fail(filename);
- iface->send(connection, who, filename);
+ iface->send(iface, connection, who, filename);
}
PurpleXfer *
@@ -2522,5 +2522,5 @@
g_return_val_if_fail(PURPLE_IS_CONNECTION(connection), FALSE);
g_return_val_if_fail(who, FALSE);
- return iface->new_xfer(connection, who);
+ return iface->new_xfer(iface, connection, who);
}
--- a/libpurple/xfer.h Thu Aug 31 22:40:50 2017 -0500
+++ b/libpurple/xfer.h Thu Sep 07 22:55:03 2017 -0500
@@ -203,12 +203,11 @@
GTypeInterface parent_iface;
/*< public >*/
- gboolean (*can_receive)(PurpleConnection *, const char *who);
+ gboolean (*can_receive)(PurpleProtocolXferInterface *iface, PurpleConnection *c, const gchar *who);
- void (*send)(PurpleConnection *, const char *who,
- const char *filename);
+ void (*send)(PurpleProtocolXferInterface *iface, PurpleConnection *c, const gchar *who, const gchar *filename);
- PurpleXfer *(*new_xfer)(PurpleConnection *, const char *who);
+ PurpleXfer *(*new_xfer)(PurpleProtocolXferInterface *iface, PurpleConnection *c, const gchar *who);
};
G_BEGIN_DECLS