changeset 5566:9896e9068bc4

[gaim-migrate @ 5968] MSN compiles. Ship it! committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Fri, 30 May 2003 18:31:15 +0000
parents c3c4aaf69f65
children cc9ddec20010
files src/protocols/msn/notification.c src/protocols/msn/switchboard.c
diffstat 2 files changed, 33 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/msn/notification.c	Fri May 30 18:25:11 2003 +0000
+++ b/src/protocols/msn/notification.c	Fri May 30 18:31:15 2003 +0000
@@ -265,7 +265,7 @@
 	}
 
 	gaim_connection_update_progress(gc, _("Requesting to send password"),
-									4, MSN_CONNECT_STEPS);
+									5, MSN_CONNECT_STEPS);
 
 	return TRUE;
 }
@@ -285,7 +285,7 @@
 
 		/* OK */
 
-		g_snprintf(gc->displayname, sizeof(gc->displayname), "%s", friendly);
+		gaim_connection_set_display_name(gc, friendly);
 
 		session->syncing_lists = TRUE;
 
@@ -296,7 +296,7 @@
 		}
 
 		gaim_connection_update_progress(gc, _("Retrieving buddy list"),
-										5, MSN_CONNECT_STEPS);
+										7, MSN_CONNECT_STEPS);
 	}
 	else {
 		/* Challenge */
@@ -306,7 +306,8 @@
 		md5_byte_t di[16];
 		int i;
 
-		g_snprintf(buf, sizeof(buf), "%s%s", challenge, gc->password);
+		g_snprintf(buf, sizeof(buf), "%s%s", challenge,
+				   gaim_account_get_password(account));
 
 		md5_init(&st);
 		md5_append(&st, (const md5_byte_t *)buf, strlen(buf));
@@ -325,7 +326,8 @@
 			return FALSE;
 		}
 
-		set_login_progress(gc, 4, _("Password sent"));
+		gaim_connection_update_progress(gc, _("Password sent"),
+										6, MSN_CONNECT_STEPS);
 	}
 
 	return TRUE;
@@ -416,7 +418,7 @@
 {
 	MsnSession *session = servconn->session;
 	MsnUser *user;
-	GaimConnection *account = session->account;
+	GaimAccount *account = session->account;
 	GaimConnection *gc = gaim_account_get_connection(account);
 	MsnPermitAdd *pa;
 	GSList *sl;
@@ -496,7 +498,7 @@
 		 *
 		 * In other words, deny some.
 		 */
-		gc->account->permdeny = DENY_SOME;
+		gc->account->perm_deny = DENY_SOME;
 	}
 	else {
 		/* If the current setting is BL, only messages from people
@@ -504,7 +506,7 @@
 		 *
 		 * In other words, permit some.
 		 */
-		gc->account->permdeny = PERMIT_SOME;
+		gc->account->perm_deny = PERMIT_SOME;
 	}
 
 	return TRUE;
@@ -735,7 +737,7 @@
 				return FALSE;
 			}
 
-			account_online(gc);
+			gaim_connection_set_state(gc, GAIM_CONNECTED);
 			serv_finish_login(gc);
 		}
 
@@ -834,7 +836,7 @@
 
 	friend = msn_url_decode(params[3]);
 
-	g_snprintf(gc->displayname, sizeof(gc->displayname), "%s", friend);
+	gaim_connection_set_display_name(gc, friend);
 
 	return TRUE;
 }
@@ -956,7 +958,6 @@
 {
 	MsnSession *session = servconn->session;
 	GaimAccount *account = session->account;
-	GaimConnection *gc = gaim_account_get_connection(gc);
 	const char *rru;
 	const char *url;
 	md5_state_t st;
@@ -972,7 +973,8 @@
 
 	g_snprintf(buf, sizeof(buf), "%s%lu%s",
 			   session->passport_info.mspauth,
-			   time(NULL) - session->passport_info.sl, gc->password);
+			   time(NULL) - session->passport_info.sl,
+			   gaim_account_get_password(account));
 
 	md5_init(&st);
 	md5_append(&st, (const md5_byte_t *)buf, strlen(buf));
@@ -1215,7 +1217,7 @@
 		return TRUE;
 	}
 
-	if (!GAIM_ACCOUNT_CHECK_MAIL(session->account))
+	if (!gaim_account_get_check_mail(session->account))
 		return TRUE;
 
 	if (session->passport_info.file == NULL) {
@@ -1256,7 +1258,7 @@
 		return TRUE;
 	}
 
-	if (!GAIM_ACCOUNT_CHECK_MAIL(session->account))
+	if (!gaim_account_get_check_mail(session->account))
 		return TRUE;
 
 	if (session->passport_info.file == NULL) {
@@ -1343,9 +1345,10 @@
 	}
 
 	session->user = msn_user_new(session,
-								 gaim_connection_get_username(account), NULL);
+								 gaim_account_get_username(account), NULL);
 
-	set_login_progress(session->account->gc, 4, _("Syncing with server"));
+	gaim_connection_update_progress(gc, _("Syncing with server"),
+									4, MSN_CONNECT_STEPS);
 
 	return TRUE;
 }
--- a/src/protocols/msn/switchboard.c	Fri May 30 18:25:11 2003 +0000
+++ b/src/protocols/msn/switchboard.c	Fri May 30 18:31:15 2003 +0000
@@ -83,11 +83,12 @@
 __ans_cmd(MsnServConn *servconn, const char *command, const char **params,
 		  size_t param_count)
 {
-	GaimConnection *gc = servconn->session->account->gc;
+	GaimAccount *account = servconn->session->account;
 	MsnSwitchBoard *swboard = servconn->data;
 
 	if (swboard->chat != NULL)
-		gaim_chat_add_user(GAIM_CHAT(swboard->chat), gc->username, NULL);
+		gaim_chat_add_user(GAIM_CHAT(swboard->chat),
+						   gaim_account_get_username(account), NULL);
 
 	return __send_clientcaps(swboard);
 }
@@ -140,7 +141,8 @@
 __iro_cmd(MsnServConn *servconn, const char *command, const char **params,
 		  size_t param_count)
 {
-	GaimConnection *gc = servconn->session->account->gc;
+	GaimAccount *account = servconn->session->account;
+	GaimConnection *gc = account->gc;
 	MsnSwitchBoard *swboard = servconn->data;
 
 	swboard->total_users = atoi(params[2]);
@@ -154,7 +156,8 @@
 	}
 
 	if (swboard->chat != NULL)
-		gaim_chat_add_user(GAIM_CHAT(swboard->chat), gc->username, NULL);
+		gaim_chat_add_user(GAIM_CHAT(swboard->chat),
+						   gaim_account_get_username(account), NULL);
 
 	return TRUE;
 }
@@ -163,7 +166,8 @@
 __joi_cmd(MsnServConn *servconn, const char *command, const char **params,
 		  size_t param_count)
 {
-	GaimConnection *gc = servconn->session->account->gc;
+	GaimAccount *account = servconn->session->account;
+	GaimConnection *gc = account->gc;
 	MsnSwitchBoard *swboard = servconn->data;
 	const char *passport;
 
@@ -174,7 +178,8 @@
 											 "MSN Chat");
 		gaim_chat_add_user(GAIM_CHAT(swboard->chat),
 						   msn_user_get_passport(swboard->user), NULL);
-		gaim_chat_add_user(GAIM_CHAT(swboard->chat), gc->username, NULL);
+		gaim_chat_add_user(GAIM_CHAT(swboard->chat),
+						   gaim_account_get_username(account), NULL);
 
 		msn_user_unref(swboard->user);
 	}
@@ -343,6 +348,7 @@
 __connect_cb(gpointer data, gint source, GaimInputCondition cond)
 {
 	MsnServConn *servconn = data;
+	GaimAccount *account = servconn->session->account;
 	MsnSwitchBoard *swboard = servconn->data;
 	char outparams[MSN_BUF_LEN];
 
@@ -355,7 +361,7 @@
 
 	if (msn_switchboard_is_invited(swboard)) {
 		g_snprintf(outparams, sizeof(outparams), "%s %s %s",
-				   servconn->session->account->gc->username,
+				   gaim_account_get_username(account),
 				   swboard->auth_key, swboard->session_id);
 
 		if (!msn_switchboard_send_command(swboard, "ANS", outparams)) {
@@ -366,7 +372,7 @@
 	}
 	else {
 		g_snprintf(outparams, sizeof(outparams), "%s %s",
-				   servconn->session->account->gc->username, swboard->auth_key);
+				   gaim_account_get_username(account), swboard->auth_key);
 
 		if (!msn_switchboard_send_command(swboard, "USR", outparams)) {
 			msn_switchboard_destroy(swboard);