changeset 4508:4c40fccbd7c9

[gaim-migrate @ 4784] We don't actually want file transfer anymore. More trouble than it's worth, so we decided to just pull it, rather than deal with the support "requests" (read: complaints). committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 02 Feb 2003 07:43:27 +0000
parents 1761c8cb8a23
children cf2f5a1f1e46
files src/protocols/jabber/jabber.c src/protocols/msn/msn.c src/protocols/oscar/oscar.c
diffstat 3 files changed, 66 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/jabber.c	Sun Feb 02 04:05:27 2003 +0000
+++ b/src/protocols/jabber/jabber.c	Sun Feb 02 07:43:27 2003 +0000
@@ -1932,6 +1932,7 @@
 	xmlnode_free(x);
 }
 
+#if 0
 struct jabber_file_transfer {
 	enum { JFT_SENDFILE_IN, JFT_SENDFILE_OUT } type;
 	struct file_transfer *xfer;
@@ -2094,8 +2095,10 @@
 
 	proxy_connect(jft->url->address, jft->url->port, jabber_http_recv_callback, jft);
 }
+#endif
 
 static void jabber_handleoob(gjconn gjc, xmlnode iqnode) {
+#if 0
 	struct jabber_file_transfer *jft;
 	struct jabber_data *jd = GJ_GC(gjc)->proto_data;
 	char *msg = NULL;
@@ -2125,6 +2128,7 @@
 	jd->file_transfers = g_slist_append(jd->file_transfers, jft);
 
 	jft->xfer = transfer_in_add(GJ_GC(gjc), jft->from, jft->name, jft->len, 1, msg);
+#endif
 }
 
 static void jabber_handlelast(gjconn gjc, xmlnode iqnode) {
@@ -4235,11 +4239,14 @@
 	ret->send_typing = jabber_send_typing;
 	ret->convo_closed = jabber_convo_closed;
 	ret->rename_group = jabber_rename_group;
+
+#if 0
 	ret->file_transfer_out = NULL; /* TODO */
 	ret->file_transfer_in = jabber_file_transfer_in;
 	ret->file_transfer_data_chunk = NULL; /* TODO */
 	ret->file_transfer_done = jabber_file_transfer_done;
 	ret->file_transfer_cancel = jabber_file_transfer_cancel;
+#endif
 
 	puo = g_new0(struct proto_user_opt, 1);
 	puo->label = g_strdup(_("Port:"));
--- a/src/protocols/msn/msn.c	Sun Feb 02 04:05:27 2003 +0000
+++ b/src/protocols/msn/msn.c	Sun Feb 02 07:43:27 2003 +0000
@@ -143,10 +143,13 @@
 
 static void msn_login_callback(gpointer, gint, GaimInputCondition);
 static void msn_login_xfr_connect(gpointer, gint, GaimInputCondition);
+
+#if 0
 static struct msn_file_transfer *find_mft_by_cookie(struct gaim_connection *gc,
 													unsigned long cookie);
 static struct msn_file_transfer *find_mft_by_xfer(struct gaim_connection *gc,
 												  struct file_transfer *xfer);
+#endif
 
 #define GET_NEXT(tmp)	while (*(tmp) && *(tmp) != ' ') \
 				(tmp)++; \
@@ -640,6 +643,7 @@
 	return cur;
 }
 
+#if 0
 static int msn_process_msnftp(struct msn_file_transfer *mft, char *buf)
 {
 	struct gaim_connection *gc = mft->gc;
@@ -872,6 +876,7 @@
 		}
 	}
 }
+#endif
 
 static void msn_process_switch_msg(struct msn_switchboard *ms, char *msg)
 {
@@ -905,6 +910,7 @@
 	} else if (!g_strncasecmp(content, "Content-Type: text/x-msmsgsinvite;",
 							  strlen("Content-Type: text/x-msmsgsinvite;"))) {
 
+#if 0
 		/*
 		 * NOTE: Other things, such as voice communication, would go in
 		 *       here too (since they send the same Content-Type). However,
@@ -914,6 +920,7 @@
 		 *       this should be changed. For now, it stays.
 		 */
 		msn_process_ft_msg(ms, content);
+#endif
 
 	} else if (!g_strncasecmp(content, "Content-Type: text/plain",
 				  strlen("Content-Type: text/plain"))) {
@@ -2056,6 +2063,7 @@
 	return MSN_TYPING_SEND_TIMEOUT;
 }
 
+#if 0
 /* XXX Don't blame me. I stole this from the oscar module! */
 static struct msn_file_transfer *find_mft_by_xfer(struct gaim_connection *gc,
 												  struct file_transfer *xfer)
@@ -2253,6 +2261,7 @@
 
 	return len;
 }
+#endif
 
 static int msn_send_im(struct gaim_connection *gc, char *who, char *message, int len, int flags)
 {
@@ -2457,6 +2466,7 @@
 	}
 }
 
+#if 0
 static void msn_ask_send_file(struct gaim_connection *gc, char *destsn)
 {
 	struct msn_data *md = (struct msn_data *)gc->proto_data;
@@ -2470,6 +2480,7 @@
 
 	mft->xfer = transfer_out_add(gc, mft->sn);
 }
+#endif
 
 static GList *msn_buddy_menu(struct gaim_connection *gc, char *who)
 {
@@ -2478,6 +2489,7 @@
 	struct buddy *b = find_buddy(gc->account, who);
 	static char buf[MSN_BUF_LEN];
 
+#if 0
 	pbm = g_new0(struct proto_buddy_menu, 1);
 	pbm->label = _("Send File");
 	pbm->callback = msn_ask_send_file;
@@ -2486,6 +2498,7 @@
 
 	if (!b || !(b->uc >> 1))
 		return m;
+#endif
 
 	pbm = g_new0(struct proto_buddy_menu, 1);
 	g_snprintf(buf, sizeof(buf), _("Status: %s"), msn_get_away_text(b->uc >> 1));
@@ -2854,11 +2867,14 @@
 	ret->add_deny = msn_add_deny;
 	ret->rem_deny = msn_rem_deny;
 	ret->buddy_free = msn_buddy_free;
+
+#if 0
 	ret->file_transfer_cancel = msn_file_transfer_cancel;
 	ret->file_transfer_in = msn_file_transfer_in;
 	ret->file_transfer_out = msn_file_transfer_out;
 	ret->file_transfer_done = msn_file_transfer_done;
 	ret->file_transfer_read = msn_file_transfer_read;
+#endif
 
 	puo = g_new0(struct proto_user_opt, 1);
 	puo->label = g_strdup(_("Server:"));
--- a/src/protocols/oscar/oscar.c	Sun Feb 02 04:05:27 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Sun Feb 02 07:43:27 2003 +0000
@@ -178,6 +178,7 @@
 	fu8_t cookie[8];
 };
 
+#if 0
 struct oscar_file_transfer {
 	enum { OFT_SENDFILE_IN, OFT_SENDFILE_OUT } type;
 	aim_conn_t *conn;
@@ -191,6 +192,7 @@
 	int totfiles;
 	int watcher;
 };
+#endif
 
 struct icon_req {
 	char *user;
@@ -286,6 +288,7 @@
 	return c;
 }
 
+#if 0
 /* XXX there must be a better way than this.... -- wtm */
 static struct oscar_file_transfer *find_oft_by_conn(struct gaim_connection *gc,
 		aim_conn_t *conn) {
@@ -334,6 +337,7 @@
 
 	return f;
 }
+#endif
 
 static int gaim_parse_auth_resp  (aim_session_t *, aim_frame_t *, ...);
 static int gaim_parse_login      (aim_session_t *, aim_frame_t *, ...);
@@ -393,6 +397,7 @@
 static int gaim_directim_typing  (aim_session_t *, aim_frame_t *, ...);
 static int gaim_update_ui       (aim_session_t *, aim_frame_t *, ...);
 
+#if 0
 static int oscar_file_transfer_do(aim_session_t *, aim_frame_t *, ...);
 static void oscar_file_transfer_disconnect(aim_session_t *,
 		aim_conn_t *);
@@ -401,6 +406,7 @@
 static int oscar_sendfile_request(aim_session_t *sess,
 		struct oscar_file_transfer *oft);
 static int oscar_sendfile_timeout(aim_session_t *sess, aim_frame_t *fr, ...);
+#endif
 
 static fu32_t check_encoding(const char *utf8);
 static fu32_t parse_encoding(const char *enc);
@@ -434,6 +440,7 @@
 };
 static int msgerrreasonlen = 25;
 
+#if 0
 /*
  * This is called to clean up whenever a file transfer is no longer in progress, 
  * whether because it finished sucessfully, it was canceled, or there was an error.
@@ -456,6 +463,7 @@
 	g_free(oft->sn);
 	g_free(oft);
 }
+#endif
 
 static void gaim_directim_disconnect(aim_session_t *sess, aim_conn_t *conn) {
 	struct gaim_connection *gc = sess->aux_data;
@@ -571,11 +579,13 @@
 					if (conn->subtype == AIM_CONN_SUBTYPE_OFT_DIRECTIM)
 						gaim_directim_disconnect(odata->sess, conn);
 					else if (conn->subtype == AIM_CONN_SUBTYPE_OFT_SENDFILE) {
+#if 0
 						struct oscar_file_transfer *oft = find_oft_by_conn(gc, conn);
 						if (oft) {
 							transfer_abort(oft->xfer, _("Buddy canceled transfer"));
 						}
 						oscar_file_transfer_disconnect(odata->sess, conn);
+#endif
 					}
 					else {
 						debug_printf("No handler for rendezvous disconnect (%d).\n",
@@ -710,6 +720,8 @@
 		odata->direct_ims = g_slist_remove(odata->direct_ims, n);
 		g_free(n);
 	}
+
+#if 0
 	while (odata->file_transfers) {
 		struct oscar_file_transfer *n = odata->file_transfers->data;
 		if (n->watcher > 0)
@@ -717,6 +729,8 @@
 		odata->file_transfers = g_slist_remove(odata->file_transfers, n);
 		g_free(n);
 	}
+#endif
+
 	while (odata->hasicons) {
 		struct icon_req *n = odata->hasicons->data;
 		g_free(n->user);
@@ -784,6 +798,7 @@
 	set_login_progress(gc, 4, _("Connection established, cookie sent"));
 }
 
+#if 0
 static void oscar_ask_send_file(struct gaim_connection *gc, char *destsn) {
 	struct oscar_data *od = (struct oscar_data *)gc->proto_data;
 
@@ -797,6 +812,7 @@
 
 	oft->xfer = transfer_out_add(gc, oft->sn);
 }
+#endif
 
 static int gaim_parse_auth_resp(aim_session_t *sess, aim_frame_t *fr, ...) {
 	va_list ap;
@@ -915,7 +931,10 @@
 	aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_RECVAUTHREP, gaim_ssi_authreply, 0);
 	aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_ADDED, gaim_ssi_gotadded, 0);
 #endif
+
+#if 0
 	aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_MSGTIMEOUT, oscar_sendfile_timeout, 0);
+#endif
 
 	((struct oscar_data *)gc->proto_data)->conn = bosconn;
 	for (i = 0; i < (int)strlen(info->bosip); i++) {
@@ -1524,6 +1543,7 @@
 				      oscar_callback, dim->conn);
 }
 
+#if 0
 /*
  * This is called every time we are finished sending a file and the receiving buddy 
  * has sent back an acknowledgement; we start the next file or tear down the 
@@ -1717,6 +1737,7 @@
 	g_free(oft->sn);
 	g_free(oft);
 }
+#endif
 
 static void accept_direct_im(struct ask_direct *d) {
 	struct gaim_connection *gc = d->gc;
@@ -1898,6 +1919,7 @@
 	debug_printf("rendezvous status %hu (%s)\n", args->status, userinfo->sn);
 
 	if (args->status == AIM_RENDEZVOUS_CANCEL) {
+#if 0
 		struct oscar_file_transfer *oft;
 		if (!args->cookie)
 			return 1;
@@ -1907,13 +1929,16 @@
 			oscar_file_transfer_disconnect(sess, oft->conn);
 		}
 		return 0;
+#endif
 	}
 	else if (args->status == AIM_RENDEZVOUS_ACCEPT) {
+#if 0
 		/* The user accepted our transfer request, but we don't
 		 * really need to do anything yet.
 		 * -- wtm
 		 */
 		return 0;
+#endif
 	}
 	else if (args->status != AIM_RENDEZVOUS_PROPOSE) {
 		debug_printf("unknown rendezvous status\n");
@@ -1940,6 +1965,7 @@
 		if (name)
 			g_free(name);
 	} else if (args->reqclass & AIM_CAPS_SENDFILE) {
+#if 0
 		struct oscar_file_transfer *oft;
 		struct oscar_data *od = gc->proto_data;
 		char *tmp;
@@ -2028,6 +2054,7 @@
 				args->info.sendfile.totsize,
 				args->info.sendfile.totfiles,
 				args->msg);
+#endif
 	} else if (args->reqclass & AIM_CAPS_GETFILE) {
 	} else if (args->reqclass & AIM_CAPS_VOICE) {
 	} else if (args->reqclass & AIM_CAPS_BUDDYICON) {
@@ -2454,6 +2481,7 @@
 
 	switch (reason) {
 		case 3: { /* Decline sendfile. */
+#if 0
 			struct oscar_file_transfer *oft = find_oft_by_cookie(gc, cookie);
 
 			if (oft) {
@@ -2463,6 +2491,7 @@
 				g_free(buf);
 				oscar_file_transfer_disconnect(sess, oft->conn);
 			}
+#endif
 		} break;
 
 		default: {
@@ -2574,13 +2603,17 @@
 	fu16_t reason;
 	char buf[1024];
 	struct gaim_connection *gc = sess->aux_data;
+
+#if 0
 	struct oscar_file_transfer *oft;
-	
+#endif
+
 	va_start(ap, fr);
 	reason = (fu16_t) va_arg(ap, unsigned int);
 	data = va_arg(ap, char *);
 	va_end(ap);
 
+#if 0
 	/* If this was a file transfer request, data is a cookie. */
 	if ((oft = find_oft_by_cookie(gc, data))) {
 		transfer_abort(oft->xfer,
@@ -2589,6 +2622,7 @@
 		oscar_file_transfer_disconnect(sess, oft->conn);
 		return 1;
 	}
+#endif
 
 	/* Data is assumed to be the destination sn. */
 	snprintf(buf, sizeof(buf), _("Your message to %s did not get sent:"), data);
@@ -4643,6 +4677,7 @@
 	return NULL;
 }
 
+#if 0
 /*
  * This is called after the raw data for a file has been transferred (whether 
  * we are sending or receiving), but there are other files remaining.
@@ -4733,6 +4768,7 @@
 
 	return 0;
 }
+#endif
 
 static int gaim_directim_initiate(aim_session_t *sess, aim_frame_t *fr, ...) {
 	va_list ap;
@@ -5099,11 +5135,13 @@
 			pbm->gc = gc;
 			m = g_list_append(m, pbm);
 		
+#if 0
 			pbm = g_new0(struct proto_buddy_menu, 1);
 			pbm->label = _("Send File");
 			pbm->callback = oscar_ask_send_file;
 			pbm->gc = gc;
 			m = g_list_append(m, pbm);
+#endif
 		}
 	}
 
@@ -5457,12 +5495,16 @@
 	ret->rem_permit = oscar_rem_permit;
 	ret->rem_deny = oscar_rem_deny;
 	ret->set_permit_deny = oscar_set_permit_deny;
+
+#if 0
 	ret->file_transfer_cancel = oscar_file_transfer_cancel;
 	ret->file_transfer_in = oscar_file_transfer_in;
 	ret->file_transfer_out = oscar_file_transfer_out;
 	ret->file_transfer_data_chunk = oscar_file_transfer_data_chunk;
 	ret->file_transfer_nextfile = oscar_file_transfer_nextfile;
 	ret->file_transfer_done = oscar_file_transfer_done;
+#endif
+
 	ret->warn = oscar_warn;
 	ret->chat_info = oscar_chat_info;
 	ret->join_chat = oscar_join_chat;