Mercurial > pidgin.yaz
comparison libpurple/protocols/oscar/family_icbm.c @ 32707:f75041cb3fec
Convert libpurple and protocol prpl's to use the purple_account_* accessor functions.
author | andrew.victor@mxit.com |
---|---|
date | Sat, 01 Oct 2011 18:21:43 +0000 |
parents | 0c0b94fb9ac7 |
children | 4a34689eeb33 |
comparison
equal
deleted
inserted
replaced
32706:6e27091869eb | 32707:f75041cb3fec |
---|---|
1939 | 1939 |
1940 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"; | 1940 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"; |
1941 | 1941 |
1942 account = purple_connection_get_account(od->gc); | 1942 account = purple_connection_get_account(od->gc); |
1943 | 1943 |
1944 statxml = g_strdup_printf(fmt, account->username); | 1944 statxml = g_strdup_printf(fmt, purple_account_get_username(account)); |
1945 xmllen = strlen(statxml); | 1945 xmllen = strlen(statxml); |
1946 | 1946 |
1947 aim_icbm_makecookie(cookie); | 1947 aim_icbm_makecookie(cookie); |
1948 | 1948 |
1949 byte_stream_new(&bs, 10 + 8 + 2 + 1 + strlen(sn) + 2 | 1949 byte_stream_new(&bs, 10 + 8 + 2 + 1 + strlen(sn) + 2 |
2033 return -EINVAL; | 2033 return -EINVAL; |
2034 | 2034 |
2035 /* if (!strcmp(account->username, sn)) | 2035 /* if (!strcmp(account->username, sn)) |
2036 icq_im_xstatus_request(od, sn); */ | 2036 icq_im_xstatus_request(od, sn); */ |
2037 | 2037 |
2038 status = purple_presence_get_active_status(account->presence); | 2038 status = purple_presence_get_active_status(purple_account_get_presence(account)); |
2039 if (!status) | 2039 if (!status) |
2040 return -EINVAL; | 2040 return -EINVAL; |
2041 | 2041 |
2042 title = purple_status_get_name(status); | 2042 title = purple_status_get_name(status); |
2043 if (!title) | 2043 if (!title) |
2049 | 2049 |
2050 msg = purple_markup_strip_html(formatted_msg); | 2050 msg = purple_markup_strip_html(formatted_msg); |
2051 if (!msg) | 2051 if (!msg) |
2052 return -EINVAL; | 2052 return -EINVAL; |
2053 | 2053 |
2054 statxml = g_strdup_printf(fmt, account->username, title, msg); | 2054 statxml = g_strdup_printf(fmt, purple_account_get_username(account), title, msg); |
2055 len = strlen(statxml); | 2055 len = strlen(statxml); |
2056 | 2056 |
2057 purple_debug_misc("oscar", "X-Status AutoReply: %s, %s\n", formatted_msg, msg); | 2057 purple_debug_misc("oscar", "X-Status AutoReply: %s, %s\n", formatted_msg, msg); |
2058 | 2058 |
2059 byte_stream_new(&bs, 10 + 8 + 2 + 1 + strlen(sn) + 2 + sizeof(plugindata) + len); /* 16 extra */ | 2059 byte_stream_new(&bs, 10 + 8 + 2 + 1 + strlen(sn) + 2 + sizeof(plugindata) + len); /* 16 extra */ |