comparison libpurple/protocols/jabber/usertune.c @ 20570:5913725cbcd6

Use an independant status type for 'current media' stuff, instead of using status attributes. This includes changes in both xmpp and msn. Also, in MSN, CurrentMedia is sent with PSM if you turn on the status and set the attributes on the account.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 20 Sep 2007 16:30:17 +0000
parents 5103485b4b26
children cacc01b50a23
comparison
equal deleted inserted replaced
20569:7393ee28c819 20570:5913725cbcd6
33 xmlnode *item = xmlnode_get_child(items, "item"); 33 xmlnode *item = xmlnode_get_child(items, "item");
34 JabberBuddy *buddy = jabber_buddy_find(js, from, FALSE); 34 JabberBuddy *buddy = jabber_buddy_find(js, from, FALSE);
35 xmlnode *tuneinfo, *tune; 35 xmlnode *tuneinfo, *tune;
36 PurpleJabberTuneInfo tuneinfodata; 36 PurpleJabberTuneInfo tuneinfodata;
37 JabberBuddyResource *resource; 37 JabberBuddyResource *resource;
38 const char *status_id;
39 38
40 /* ignore the tune of people not on our buddy list */ 39 /* ignore the tune of people not on our buddy list */
41 if (!buddy || !item) 40 if (!buddy || !item)
42 return; 41 return;
43 42
79 if (tuneinfodata.url == NULL) /* only pick the first one */ 78 if (tuneinfodata.url == NULL) /* only pick the first one */
80 tuneinfodata.url = xmlnode_get_data(tuneinfo); 79 tuneinfodata.url = xmlnode_get_data(tuneinfo);
81 } 80 }
82 } 81 }
83 } 82 }
84 status_id = jabber_buddy_state_get_status_id(resource->state);
85 83
86 purple_prpl_got_user_status(js->gc->account, from, status_id, 84 purple_prpl_got_user_status(js->gc->account, from, "tune",
87 PURPLE_TUNE_ARTIST, tuneinfodata.artist, 85 PURPLE_TUNE_ARTIST, tuneinfodata.artist,
88 PURPLE_TUNE_TITLE, tuneinfodata.title, 86 PURPLE_TUNE_TITLE, tuneinfodata.title,
89 PURPLE_TUNE_ALBUM, tuneinfodata.album, 87 PURPLE_TUNE_ALBUM, tuneinfodata.album,
90 PURPLE_TUNE_TRACK, tuneinfodata.track, 88 PURPLE_TUNE_TRACK, tuneinfodata.track,
91 PURPLE_TUNE_TIME, tuneinfodata.time, 89 PURPLE_TUNE_TIME, tuneinfodata.time,