Mercurial > pidgin
comparison libpurple/protocols/jabber/usertune.c @ 32819:2c6510167895 default tip
propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24)
to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 02 Jun 2012 02:30:49 +0000 |
parents | 2ec94166be43 |
children |
comparison
equal
deleted
inserted
replaced
32818:01ff09d4a463 | 32819:2c6510167895 |
---|---|
90 } | 90 } |
91 } | 91 } |
92 } | 92 } |
93 | 93 |
94 if (valid) { | 94 if (valid) { |
95 purple_prpl_got_user_status(js->gc->account, from, "tune", | 95 purple_prpl_got_user_status(purple_connection_get_account(js->gc), from, "tune", |
96 PURPLE_TUNE_ARTIST, tuneinfodata.artist, | 96 PURPLE_TUNE_ARTIST, tuneinfodata.artist, |
97 PURPLE_TUNE_TITLE, tuneinfodata.title, | 97 PURPLE_TUNE_TITLE, tuneinfodata.title, |
98 PURPLE_TUNE_ALBUM, tuneinfodata.album, | 98 PURPLE_TUNE_ALBUM, tuneinfodata.album, |
99 PURPLE_TUNE_TRACK, tuneinfodata.track, | 99 PURPLE_TUNE_TRACK, tuneinfodata.track, |
100 PURPLE_TUNE_TIME, tuneinfodata.time, | 100 PURPLE_TUNE_TIME, tuneinfodata.time, |
101 PURPLE_TUNE_URL, tuneinfodata.url, NULL); | 101 PURPLE_TUNE_URL, tuneinfodata.url, NULL); |
102 } else { | 102 } else { |
103 purple_prpl_got_user_status_deactive(js->gc->account, from, "tune"); | 103 purple_prpl_got_user_status_deactive(purple_connection_get_account(js->gc), from, "tune"); |
104 } | 104 } |
105 | 105 |
106 g_free(tuneinfodata.artist); | 106 g_free(tuneinfodata.artist); |
107 g_free(tuneinfodata.title); | 107 g_free(tuneinfodata.title); |
108 g_free(tuneinfodata.album); | 108 g_free(tuneinfodata.album); |
115 jabber_pep_register_handler("http://jabber.org/protocol/tune", jabber_tune_cb); | 115 jabber_pep_register_handler("http://jabber.org/protocol/tune", jabber_tune_cb); |
116 } | 116 } |
117 | 117 |
118 void jabber_tune_set(PurpleConnection *gc, const PurpleJabberTuneInfo *tuneinfo) { | 118 void jabber_tune_set(PurpleConnection *gc, const PurpleJabberTuneInfo *tuneinfo) { |
119 xmlnode *publish, *tunenode; | 119 xmlnode *publish, *tunenode; |
120 JabberStream *js = gc->proto_data; | 120 JabberStream *js = purple_connection_get_protocol_data(gc); |
121 | 121 |
122 publish = xmlnode_new("publish"); | 122 publish = xmlnode_new("publish"); |
123 xmlnode_set_attrib(publish,"node","http://jabber.org/protocol/tune"); | 123 xmlnode_set_attrib(publish,"node","http://jabber.org/protocol/tune"); |
124 tunenode = xmlnode_new_child(xmlnode_new_child(publish, "item"), "tune"); | 124 tunenode = xmlnode_new_child(xmlnode_new_child(publish, "item"), "tune"); |
125 xmlnode_set_namespace(tunenode, "http://jabber.org/protocol/tune"); | 125 xmlnode_set_namespace(tunenode, "http://jabber.org/protocol/tune"); |