Mercurial > pidgin.yaz
comparison libpurple/protocols/oscar/family_icbm.c @ 32827:4a34689eeb33 default tip
merged from im.pidgin.pidgin
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sat, 19 Nov 2011 14:42:54 +0900 |
parents | fa88dc1dcabb f75041cb3fec |
children |
comparison
equal
deleted
inserted
replaced
32692:0f94ec89f0bc | 32827:4a34689eeb33 |
---|---|
1979 | 1979 |
1980 fmt = "<N><QUERY><Q><PluginID>srvMng</PluginID></Q></QUERY><NOTIFY><srv><id>cAwaySrv</id><req><id>AwayStat</id><trans>2</trans><senderId>%s</senderId></req></srv></NOTIFY></N>\r\n"; | 1980 fmt = "<N><QUERY><Q><PluginID>srvMng</PluginID></Q></QUERY><NOTIFY><srv><id>cAwaySrv</id><req><id>AwayStat</id><trans>2</trans><senderId>%s</senderId></req></srv></NOTIFY></N>\r\n"; |
1981 | 1981 |
1982 account = purple_connection_get_account(od->gc); | 1982 account = purple_connection_get_account(od->gc); |
1983 | 1983 |
1984 statxml = g_strdup_printf(fmt, account->username); | 1984 statxml = g_strdup_printf(fmt, purple_account_get_username(account)); |
1985 xmllen = strlen(statxml); | 1985 xmllen = strlen(statxml); |
1986 | 1986 |
1987 aim_icbm_makecookie(cookie); | 1987 aim_icbm_makecookie(cookie); |
1988 | 1988 |
1989 byte_stream_new(&bs, 10 + 8 + 2 + 1 + strlen(sn) + 2 | 1989 byte_stream_new(&bs, 10 + 8 + 2 + 1 + strlen(sn) + 2 |
2073 return -EINVAL; | 2073 return -EINVAL; |
2074 | 2074 |
2075 /* if (!strcmp(account->username, sn)) | 2075 /* if (!strcmp(account->username, sn)) |
2076 icq_im_xstatus_request(od, sn); */ | 2076 icq_im_xstatus_request(od, sn); */ |
2077 | 2077 |
2078 status = purple_presence_get_active_status(account->presence); | 2078 status = purple_presence_get_active_status(purple_account_get_presence(account)); |
2079 if (!status) | 2079 if (!status) |
2080 return -EINVAL; | 2080 return -EINVAL; |
2081 | 2081 |
2082 title = purple_status_get_name(status); | 2082 title = purple_status_get_name(status); |
2083 if (!title) | 2083 if (!title) |
2089 | 2089 |
2090 msg = purple_markup_strip_html(formatted_msg); | 2090 msg = purple_markup_strip_html(formatted_msg); |
2091 if (!msg) | 2091 if (!msg) |
2092 return -EINVAL; | 2092 return -EINVAL; |
2093 | 2093 |
2094 statxml = g_strdup_printf(fmt, account->username, title, msg); | 2094 statxml = g_strdup_printf(fmt, purple_account_get_username(account), title, msg); |
2095 len = strlen(statxml); | 2095 len = strlen(statxml); |
2096 | 2096 |
2097 purple_debug_misc("oscar", "X-Status AutoReply: %s, %s\n", formatted_msg, msg); | 2097 purple_debug_misc("oscar", "X-Status AutoReply: %s, %s\n", formatted_msg, msg); |
2098 | 2098 |
2099 byte_stream_new(&bs, 10 + 8 + 2 + 1 + strlen(sn) + 2 + sizeof(plugindata) + len); /* 16 extra */ | 2099 byte_stream_new(&bs, 10 + 8 + 2 + 1 + strlen(sn) + 2 + sizeof(plugindata) + len); /* 16 extra */ |