Mercurial > pidgin
comparison libpurple/protocols/myspace/myspace.h @ 17953:bde17299004b
Support unofficial bm code 200, also used by Miranda IM plugin, to report
third-party client version. "Get Info" now shows unofficial client information,
if available, and buddies coming online are sent this information so they can
view it too.
Official client version is not currently supported in the same manner.
author | Jeffrey Connelly <jaconnel@calpoly.edu> |
---|---|
date | Wed, 18 Jul 2007 06:09:32 +0000 |
parents | 4001661344e4 |
children | 016f9b2d6ee0 |
comparison
equal
deleted
inserted
replaced
17952:4001661344e4 | 17953:bde17299004b |
---|---|
71 * http://settings.myspace.com/index.cfm?fuseaction=user.changepassword | 71 * http://settings.myspace.com/index.cfm?fuseaction=user.changepassword |
72 * (though curiously, not on the 'current password' field). */ | 72 * (though curiously, not on the 'current password' field). */ |
73 #define MSIM_MAX_PASSWORD_LENGTH 10 | 73 #define MSIM_MAX_PASSWORD_LENGTH 10 |
74 | 74 |
75 /* Build version of MySpaceIM to report to servers (1.0.xxx.0) */ | 75 /* Build version of MySpaceIM to report to servers (1.0.xxx.0) */ |
76 #define MSIM_CLIENT_VERSION 673 | 76 #define MSIM_CLIENT_VERSION 673 |
77 | |
78 /* msimprpl version string of this plugin */ | |
79 #define MSIM_PRPL_VERSION_STRING "0.12" | |
77 | 80 |
78 /* Default server */ | 81 /* Default server */ |
79 #define MSIM_SERVER "im.myspace.akadns.net" | 82 #define MSIM_SERVER "im.myspace.akadns.net" |
80 #define MSIM_PORT 1863 /* TODO: alternate ports and automatic */ | 83 #define MSIM_PORT 1863 /* TODO: alternate ports and automatic */ |
81 | 84 |
94 #define NONCE_SIZE 0x20 /**< Half of decoded 'nc' field */ | 97 #define NONCE_SIZE 0x20 /**< Half of decoded 'nc' field */ |
95 #define MSIM_READ_BUF_SIZE (5 * 1024) /**< Receive buffer size */ | 98 #define MSIM_READ_BUF_SIZE (5 * 1024) /**< Receive buffer size */ |
96 #define MSIM_FINAL_STRING "\\final\\" /**< Message end marker */ | 99 #define MSIM_FINAL_STRING "\\final\\" /**< Message end marker */ |
97 | 100 |
98 /* Messages */ | 101 /* Messages */ |
99 #define MSIM_BM_INSTANT 1 | 102 #define MSIM_BM_INSTANT 1 |
100 #define MSIM_BM_STATUS 100 | 103 #define MSIM_BM_STATUS 100 |
101 #define MSIM_BM_ACTION 121 | 104 #define MSIM_BM_ACTION 121 |
102 /* #define MSIM_BM_UNKNOWN1 122 */ | 105 #define MSIM_BM_MEDIA 122 |
106 #define MSIM_BM_PROFILE 124 | |
107 #define MSIM_BM_UNOFFICIAL_CLIENT 200 | |
103 | 108 |
104 /* Authentication algorithm for login2 */ | 109 /* Authentication algorithm for login2 */ |
105 #define MSIM_AUTH_ALGORITHM 196610 | 110 #define MSIM_AUTH_ALGORITHM 196610 |
106 | 111 |
107 /* Recognized challenge length */ | 112 /* Recognized challenge length */ |
234 | 239 |
235 /* High-level msim markup <=> html conversion functions. */ | 240 /* High-level msim markup <=> html conversion functions. */ |
236 gchar *msim_markup_to_html(MsimSession *, const gchar *raw); | 241 gchar *msim_markup_to_html(MsimSession *, const gchar *raw); |
237 gchar *html_to_msim_markup(MsimSession *, const gchar *raw); | 242 gchar *html_to_msim_markup(MsimSession *, const gchar *raw); |
238 | 243 |
239 int msim_incoming_im(MsimSession *session, MsimMessage *msg); | 244 gboolean msim_incoming_bm(MsimSession *session, MsimMessage *msg); |
240 int msim_incoming_action(MsimSession *session, MsimMessage *msg); | 245 gboolean msim_incoming_status(MsimSession *session, MsimMessage *msg); |
246 gboolean msim_incoming_im(MsimSession *session, MsimMessage *msg); | |
247 gboolean msim_incoming_action(MsimSession *session, MsimMessage *msg); | |
248 gboolean msim_incoming_media(MsimSession *session, MsimMessage *msg); | |
249 gboolean msim_incoming_unofficial_client(MsimSession *session, MsimMessage *msg); | |
250 | |
251 gboolean msim_send_unofficial_client(MsimSession *session, gchar *username); | |
241 | 252 |
242 unsigned int msim_send_typing(PurpleConnection *gc, const gchar *name, PurpleTypingState state); | 253 unsigned int msim_send_typing(PurpleConnection *gc, const gchar *name, PurpleTypingState state); |
243 void msim_get_info_cb(MsimSession *session, MsimMessage *userinfo, gpointer data); | 254 void msim_get_info_cb(MsimSession *session, MsimMessage *userinfo, gpointer data); |
244 void msim_get_info(PurpleConnection *gc, const gchar *name); | 255 void msim_get_info(PurpleConnection *gc, const gchar *name); |
245 | 256 |
263 gboolean msim_postprocess_outgoing(MsimSession *session, MsimMessage *msg, const gchar *username, | 274 gboolean msim_postprocess_outgoing(MsimSession *session, MsimMessage *msg, const gchar *username, |
264 const gchar *uid_field_name, const gchar *uid_before); | 275 const gchar *uid_field_name, const gchar *uid_before); |
265 | 276 |
266 | 277 |
267 gboolean msim_error(MsimSession *session, MsimMessage *msg); | 278 gboolean msim_error(MsimSession *session, MsimMessage *msg); |
268 gboolean msim_status(MsimSession *session, MsimMessage *msg); | |
269 | 279 |
270 void msim_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group); | 280 void msim_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group); |
271 void msim_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group); | 281 void msim_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group); |
272 | 282 |
273 gboolean msim_offline_message(const PurpleBuddy *buddy); | 283 gboolean msim_offline_message(const PurpleBuddy *buddy); |