comparison src/protocols/toc/toc.c @ 10401:3e4ecbdf8d0a

[gaim-migrate @ 11638] Stuff compiles again, if that's what you wanted stuff to do. It works a bit too. I fixed one crash in oscar, only to reveal another that I didnn't fix (tooltips). Most protocols still need updating to actually log in in the specified state, TCL needs some love for gaim_account_connect, perl probably does too but that needs more love anyway. The reconnect plugin could be more intelligent too, as could gaim-remote. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Tue, 21 Dec 2004 01:48:30 +0000
parents 32467b63f55a
children 0f7452b1f777
comparison
equal deleted inserted replaced
10400:6a043ae92db6 10401:3e4ecbdf8d0a
122 static void toc_callback(gpointer, gint, GaimInputCondition); 122 static void toc_callback(gpointer, gint, GaimInputCondition);
123 123
124 /* ok. this function used to take username/password, and return 0 on success. 124 /* ok. this function used to take username/password, and return 0 on success.
125 * now, it takes username/password, and returns NULL on error or a new gaim_connection 125 * now, it takes username/password, and returns NULL on error or a new gaim_connection
126 * on success. */ 126 * on success. */
127 static void toc_login(GaimAccount *account) 127 static void toc_login(GaimAccount *account, GaimStatus *status)
128 { 128 {
129 GaimConnection *gc; 129 GaimConnection *gc;
130 struct toc_data *tdt; 130 struct toc_data *tdt;
131 char buf[80]; 131 char buf[80];
132 132
1160 city, state, country); 1160 city, state, country);
1161 sflap_send(g, buf, -1, TYPE_DATA); 1161 sflap_send(g, buf, -1, TYPE_DATA);
1162 } 1162 }
1163 #endif 1163 #endif
1164 1164
1165 static void toc_set_away(GaimConnection *gc, const char *state, const char *message) 1165 static void toc_set_status(GaimAccount *account, GaimStatus *status)
1166 { 1166 {
1167 #if 0 /* do we care about TOC any more? */
1167 char buf[BUF_LEN * 2]; 1168 char buf[BUF_LEN * 2];
1168 if (gc->away) { 1169 if (gc->away) {
1169 g_free(gc->away); 1170 g_free(gc->away);
1170 gc->away = NULL; 1171 gc->away = NULL;
1171 } 1172 }
1176 g_snprintf(buf, MSG_LEN, "toc_set_away \"%s\"", tmp); 1177 g_snprintf(buf, MSG_LEN, "toc_set_away \"%s\"", tmp);
1177 g_free(tmp); 1178 g_free(tmp);
1178 } else 1179 } else
1179 g_snprintf(buf, MSG_LEN, "toc_set_away \"\""); 1180 g_snprintf(buf, MSG_LEN, "toc_set_away \"\"");
1180 sflap_send(g, buf, -1, TYPE_DATA); 1181 sflap_send(g, buf, -1, TYPE_DATA);
1182 #endif
1181 } 1183 }
1182 1184
1183 static void toc_set_info(GaimConnection *g, const char *info) 1185 static void toc_set_info(GaimConnection *g, const char *info)
1184 { 1186 {
1185 char buf[BUF_LEN * 2], *buf2; 1187 char buf[BUF_LEN * 2], *buf2;
1532 if (gc->account->perm_deny != 4) 1534 if (gc->account->perm_deny != 4)
1533 return; 1535 return;
1534 toc_set_permit_deny(gc); 1536 toc_set_permit_deny(gc);
1535 } 1537 }
1536 1538
1537 static GList *toc_away_states(GaimConnection *gc) 1539 static GList *toc_away_states(GaimAccount *account)
1538 { 1540 {
1541 #if 0 /* do we care about TOC any more? */
1539 return g_list_append(NULL, GAIM_AWAY_CUSTOM); 1542 return g_list_append(NULL, GAIM_AWAY_CUSTOM);
1543 #else
1544 return NULL;
1545 #endif
1540 } 1546 }
1541 1547
1542 static void 1548 static void
1543 show_set_info(GaimPluginAction *action) 1549 show_set_info(GaimPluginAction *action)
1544 { 1550 {
2132 toc_close, /* close */ 2138 toc_close, /* close */
2133 toc_send_im, /* send_im */ 2139 toc_send_im, /* send_im */
2134 toc_set_info, /* set_info */ 2140 toc_set_info, /* set_info */
2135 NULL, /* send_typing */ 2141 NULL, /* send_typing */
2136 toc_get_info, /* get_info */ 2142 toc_get_info, /* get_info */
2137 toc_set_away, /* set_away */ 2143 toc_set_status, /* set_away */
2138 toc_set_idle, /* set_idle */ 2144 toc_set_idle, /* set_idle */
2139 toc_change_passwd, /* change_passwd */ 2145 toc_change_passwd, /* change_passwd */
2140 toc_add_buddy, /* add_buddy */ 2146 toc_add_buddy, /* add_buddy */
2141 toc_add_buddies, /* add_buddies */ 2147 toc_add_buddies, /* add_buddies */
2142 toc_remove_buddy, /* remove_buddy */ 2148 toc_remove_buddy, /* remove_buddy */