# HG changeset patch # User Mark Doliner # Date 1094855975 0 # Node ID 56e34a659db21b849c679ff85a3281a35e62ae98 # Parent c124bef68132f037392bd475f8d70d83db574dbc [gaim-migrate @ 10927] Further deprecation of serv_got_update committer: Tailor Script diff -r c124bef68132 -r 56e34a659db2 src/protocols/irc/irc.c --- a/src/protocols/irc/irc.c Fri Sep 10 19:51:52 2004 +0000 +++ b/src/protocols/irc/irc.c Fri Sep 10 22:39:35 2004 +0000 @@ -181,16 +181,6 @@ return list; } -#if 0 -static GList *irc_blist_node_menu(GaimBlistNode *node) -{ - GList *m = NULL; - GaimBlistNodeAction *act; - - return m; -} -#endif - static GList *irc_chat_join_info(GaimConnection *gc) { GList *m = NULL; diff -r c124bef68132 -r 56e34a659db2 src/protocols/msn/notification.c --- a/src/protocols/msn/notification.c Fri Sep 10 19:51:52 2004 +0000 +++ b/src/protocols/msn/notification.c Fri Sep 10 22:39:35 2004 +0000 @@ -449,24 +449,30 @@ static void fln_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) { - GaimConnection *gc; + GaimAccount *account; - gc = cmdproc->session->account->gc; + account = cmdproc->session->account; - serv_got_update(gc, cmd->params[0], FALSE, 0); + gaim_prpl_got_user_status(account, cmd->params[0], "offline", NULL); } +/* + * XXX - There is a bit of code duplication between this function + * and nln_cmd. Someone should do something about that. + */ static void iln_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) { MsnSession *session; + GaimAccount *account; GaimConnection *gc; MsnUser *user; MsnObject *msnobj; const char *status, *state, *passport, *friendly; session = cmdproc->session; - gc = session->account->gc; + account = session->account; + gc = gaim_account_get_connection(account); state = cmd->params[1]; passport = cmd->params[2]; @@ -485,15 +491,16 @@ msn_user_set_object(user, msnobj); } -/* what does this do????? - if ((b = gaim_find_buddy(gc->account, passport)) != NULL) - status |= ((((b->uc) >> 1) & 0xF0) << 1); */ + /* XXX - What does this do????? + if ((b = gaim_find_buddy(account, passport)) != NULL) + status |= ((((b->uc) >> 1) & 0xF0) << 1); + */ if (!g_ascii_strcasecmp(state, "BSY")) status = "busy"; else if (!g_ascii_strcasecmp(state, "IDL")) { - /* do something about idle time? */ + /* XXX - Do something about idle time? */ status = "idle"; } else if (!g_ascii_strcasecmp(state, "BRB")) @@ -507,8 +514,7 @@ else status = "available"; - /* serv_got_update(gc, passport, TRUE, 0, 0, idle, status); */ - gaim_prpl_got_user_status(gc->account, passport, status, NULL); + gaim_prpl_got_user_status(account, passport, status, NULL); } static void @@ -530,6 +536,7 @@ nln_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) { MsnSession *session; + GaimAccount *account; GaimConnection *gc; MsnUser *user; MsnObject *msnobj; @@ -539,7 +546,8 @@ const char *status; session = cmdproc->session; - gc = session->account->gc; + account = session->account; + gc = gaim_account_get_connection(account); state = cmd->params[0]; passport = cmd->params[1]; @@ -570,7 +578,7 @@ status = "busy"; else if (!g_ascii_strcasecmp(state, "IDL")) { - /* do something about idle time? */ + /* XXX - Do something about idle time? */ status = "idle"; } else if (!g_ascii_strcasecmp(state, "BRB")) @@ -584,8 +592,7 @@ else status = "available"; - /* serv_got_update(gc, passport, TRUE, 0, 0, idle, status); */ - gaim_prpl_got_user_status(gc->account, passport, status, NULL); + gaim_prpl_got_user_status(account, passport, status, NULL); } static void diff -r c124bef68132 -r 56e34a659db2 src/protocols/napster/napster.c --- a/src/protocols/napster/napster.c Fri Sep 10 19:51:52 2004 +0000 +++ b/src/protocols/napster/napster.c Fri Sep 10 22:39:35 2004 +0000 @@ -230,6 +230,7 @@ { GaimConnection *gc = data; struct nap_data *ndata = gc->proto_data; + GaimAccount *account = gaim_connection_get_account(gc); GaimConversation *c; gchar *buf, *buf2, *buf3, **res; unsigned short header[2]; @@ -283,12 +284,12 @@ case 201: /* MSG_SERVER_SEARCH_RESULT */ res = g_strsplit(buf, " ", 0); - serv_got_update(gc, res[0], TRUE, 0); + gaim_prpl_got_user_status(account, res[0], "online", NULL); g_strfreev(res); break; case 202: /* MSG_SERVER_SEARCH_END */ - serv_got_update(gc, buf, FALSE, 0); + gaim_prpl_got_user_status(account, res[0], "offline", NULL); break; case 205: /* MSG_CLIENT_PRIVMSG */ @@ -302,14 +303,14 @@ case 209: /* MSG_SERVER_USER_SIGNON */ /* USERNAME SPEED */ res = g_strsplit(buf, " ", 2); - serv_got_update(gc, res[0], TRUE, 0); + gaim_prpl_got_user_status(account, res[0], "online", NULL); g_strfreev(res); break; case 210: /* MSG_SERVER_USER_SIGNOFF */ /* USERNAME SPEED */ res = g_strsplit(buf, " ", 2); - serv_got_update(gc, res[0], FALSE, 0); + gaim_prpl_got_user_status(account, res[0], "offline", NULL); g_strfreev(res); break; diff -r c124bef68132 -r 56e34a659db2 src/status.c --- a/src/status.c Fri Sep 10 19:51:52 2004 +0000 +++ b/src/status.c Fri Sep 10 22:39:35 2004 +0000 @@ -225,6 +225,7 @@ status_type = gaim_status_type_new_full(primitive, id, name, saveable, user_settable, independent); + /* Add the first attribute */ gaim_status_type_add_attr(status_type, attr_id, attr_name, attr_value); va_start(args, attr_value); @@ -286,25 +287,6 @@ } void -gaim_status_type_add_attrs(GaimStatusType *status_type, const char *id, - const char *name, GaimValue *value, ...) -{ - va_list args; - - g_return_if_fail(status_type != NULL); - g_return_if_fail(id != NULL); - g_return_if_fail(name != NULL); - g_return_if_fail(value != NULL); - - /* Add the first. */ - gaim_status_type_add_attr(status_type, id, name, value); - - va_start(args, value); - gaim_status_type_add_attrs_vargs(status_type, args); - va_end(args); -} - -void gaim_status_type_add_attrs_vargs(GaimStatusType *status_type, va_list args) { const char *id, *name; @@ -324,6 +306,25 @@ } } +void +gaim_status_type_add_attrs(GaimStatusType *status_type, const char *id, + const char *name, GaimValue *value, ...) +{ + va_list args; + + g_return_if_fail(status_type != NULL); + g_return_if_fail(id != NULL); + g_return_if_fail(name != NULL); + g_return_if_fail(value != NULL); + + /* Add the first attribute */ + gaim_status_type_add_attr(status_type, id, name, value); + + va_start(args, value); + gaim_status_type_add_attrs_vargs(status_type, args); + va_end(args); +} + GaimStatusPrimitive gaim_status_type_get_primitive(const GaimStatusType *status_type) {