comparison libpurple/protocols/msn/user.h @ 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 723b5a2f91ce
children 5cdd93dac7a2
comparison
equal deleted inserted replaced
20569:7393ee28c819 20570:5913725cbcd6
41 MSN_USER_TYPE_UNKNOWN3 = 0x10, 41 MSN_USER_TYPE_UNKNOWN3 = 0x10,
42 MSN_USER_TYPE_YAHOO = 0x20 42 MSN_USER_TYPE_YAHOO = 0x20
43 } MsnUserType; 43 } MsnUserType;
44 44
45 /** 45 /**
46 * Current media.
47 */
48 typedef struct _CurrentMedia
49 {
50 char *artist; /**< Artist. */
51 char *album; /**< Album. */
52 char *title; /**< Title. */
53 } CurrentMedia;
54
55 /**
46 * A user. 56 * A user.
47 */ 57 */
48 struct _MsnUser 58 struct _MsnUser
49 { 59 {
50 #if 0 60 #if 0
58 68
59 char * uid; /*< User Id */ 69 char * uid; /*< User Id */
60 70
61 const char *status; /**< The state of the user. */ 71 const char *status; /**< The state of the user. */
62 char *statusline; /**< The state of the user. */ 72 char *statusline; /**< The state of the user. */
63 char *currentmedia; /**< The current media of the user. */ 73 CurrentMedia media; /**< Current media of the user. */
64 74
65 gboolean idle; /**< The idle state of the user. */ 75 gboolean idle; /**< The idle state of the user. */
66 76
67 struct 77 struct
68 { 78 {
132 void msn_user_set_statusline(MsnUser *user, const char *statusline); 142 void msn_user_set_statusline(MsnUser *user, const char *statusline);
133 143
134 /** 144 /**
135 * Sets the current media of user. 145 * Sets the current media of user.
136 * 146 *
137 * @param user The user. 147 * @param user The user.
138 * @param state The statusline string. 148 * @param cmedia Current media.
139 */ 149 */
140 void msn_user_set_currentmedia(MsnUser *user, const char *currentmedia); 150 void msn_user_set_currentmedia(MsnUser *user, const CurrentMedia *cmedia);
141 151
142 /** 152 /**
143 * Sets the new state of user. 153 * Sets the new state of user.
144 * 154 *
145 * @param user The user. 155 * @param user The user.