Mercurial > pidgin
comparison src/protocols/msn/notification.c @ 19818:2e078c892e0b
[gaim-migrate @ 17003]
add the PSM processing
need to store the PSM info to XML.
Thanks for Chris <ukdrizzle@yahoo.co.uk> 's code!
committed by MaYuan<mayuan2006@gmail.com>
committer: Ethan Blanton <elb@pidgin.im>
author | Ma Yuan <mayuan2006@gmail.com> |
---|---|
date | Wed, 23 Aug 2006 15:07:17 +0000 |
parents | cf0611260c6b |
children | bf8fb36097ee |
comparison
equal
deleted
inserted
replaced
19817:cf0611260c6b | 19818:2e078c892e0b |
---|---|
1391 return; | 1391 return; |
1392 } | 1392 } |
1393 /*get the payload content*/ | 1393 /*get the payload content*/ |
1394 } | 1394 } |
1395 | 1395 |
1396 /* | |
1397 * Get the UBX's PSM info | |
1398 * Post it to the User status | |
1399 * Thanks for Chris <ukdrizzle@yahoo.co.uk>'s code | |
1400 */ | |
1396 static void | 1401 static void |
1397 ubx_cmd_post(MsnCmdProc *cmdproc, MsnCommand *cmd, char *payload, | 1402 ubx_cmd_post(MsnCmdProc *cmdproc, MsnCommand *cmd, char *payload, |
1398 size_t len) | 1403 size_t len) |
1399 { | 1404 { |
1405 MsnSession *session; | |
1406 GaimAccount *account; | |
1407 GaimConnection *gc; | |
1408 MsnUser *user; | |
1409 MsnObject *msnobj; | |
1410 int clientid; | |
1411 int wlmclient; | |
1412 const char *passport, *psm_str; | |
1413 | |
1400 /*get the payload content*/ | 1414 /*get the payload content*/ |
1401 gaim_debug_info("MaYuan","ubx{%s}\n",cmd->payload); | 1415 gaim_debug_info("MaYuan","UBX {%s} payload{%s}\n",cmd->params[0], cmd->payload); |
1416 | |
1417 session = cmdproc->session; | |
1418 account = session->account; | |
1419 gc = gaim_account_get_connection(account); | |
1420 | |
1421 passport = cmd->params[0]; | |
1422 user = msn_userlist_find_user(session->userlist, passport); | |
1423 | |
1424 psm_str = msn_get_psm(cmd->payload,len); | |
1425 gaim_debug_info("Ma Yuan","got psm {%s}\n", psm_str); | |
1426 msn_user_set_statusline(user, psm_str); | |
1427 msn_user_update(user); | |
1428 | |
1429 g_free(psm_str); | |
1402 } | 1430 } |
1403 | 1431 |
1404 static void | 1432 static void |
1405 ubx_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) | 1433 ubx_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) |
1406 { | 1434 { |