Mercurial > pidgin
comparison libpurple/protocols/myspace/myspace.h @ 19244:b29788c6d269
Make msimprpl work without a libpurple attention API.
Change PurpleAttentionType to MsimAttentionType and define it in
myspace.h, so that msimprpl can use it while libpurple doesn't have it.
author | Jeffrey Connelly <jaconnel@calpoly.edu> |
---|---|
date | Tue, 14 Aug 2007 03:03:52 +0000 |
parents | a242e014ab8c |
children | d7eea5c20cf9 |
comparison
equal
deleted
inserted
replaced
19243:a242e014ab8c | 19244:b29788c6d269 |
---|---|
66 * run with 'pidgin -d' to see the output. Don't define if | 66 * run with 'pidgin -d' to see the output. Don't define if |
67 * you want to actually use the plugin! */ | 67 * you want to actually use the plugin! */ |
68 /*#define MSIM_SELF_TEST */ | 68 /*#define MSIM_SELF_TEST */ |
69 | 69 |
70 /* Use the attention API for zaps? */ | 70 /* Use the attention API for zaps? */ |
71 #define MSIM_USE_ATTENTION_API | 71 /* Can't have until >=2.2.0, since is a new API. */ |
72 /*#define MSIM_USE_ATTENTION_API */ | |
72 | 73 |
73 /* Constants */ | 74 /* Constants */ |
74 | 75 |
75 /* Maximum length of a password that is acceptable. This is the limit | 76 /* Maximum length of a password that is acceptable. This is the limit |
76 * on the official client (build 679) and on the 'new password' field at | 77 * on the official client (build 679) and on the 'new password' field at |
199 guint rxoff; /**< Receive buffer offset */ | 200 guint rxoff; /**< Receive buffer offset */ |
200 guint next_rid; /**< Next request/response ID */ | 201 guint next_rid; /**< Next request/response ID */ |
201 time_t last_comm; /**< Time received last communication */ | 202 time_t last_comm; /**< Time received last communication */ |
202 guint inbox_status; /**< Bit field of inbox notifications */ | 203 guint inbox_status; /**< Bit field of inbox notifications */ |
203 } MsimSession; | 204 } MsimSession; |
205 | |
206 /* Check if an MsimSession is valid */ | |
207 #define MSIM_SESSION_VALID(s) (session != NULL && session->magic == MSIM_SESSION_STRUCT_MAGIC) | |
204 | 208 |
205 /* Hold ephemeral information about buddies, for proto_data of PurpleBuddy. */ | 209 /* Hold ephemeral information about buddies, for proto_data of PurpleBuddy. */ |
206 /* GHashTable? */ | 210 /* GHashTable? */ |
207 typedef struct _MsimUser | 211 typedef struct _MsimUser |
208 { | 212 { |
219 gchar *username; | 223 gchar *username; |
220 gchar *band_name, *song_name; | 224 gchar *band_name, *song_name; |
221 gchar *image_url; | 225 gchar *image_url; |
222 } MsimUser; | 226 } MsimUser; |
223 | 227 |
224 /* Check if an MsimSession is valid */ | 228 |
225 #define MSIM_SESSION_VALID(s) (session != NULL && session->magic == MSIM_SESSION_STRUCT_MAGIC) | 229 /* Different kinds of attention alerts. Not yet in libpurple, so define |
230 * our own structure here. */ | |
231 typedef struct _MsimAttentionType MsimAttentionType; | |
232 | |
233 /** A type of "attention" message (zap, nudge, buzz, etc. depending on the | |
234 * protocol) that can be sent and received. */ | |
235 struct _MsimAttentionType { | |
236 PurpleStoredImage *icon; | |
237 const gchar *description; /**< Shown before sending. */ | |
238 const gchar *incoming_description; /**< Shown when sent. */ | |
239 const gchar *outgoing_description; /**< Shown when received. */ | |
240 }; | |
226 | 241 |
227 gchar *str_replace(const gchar *str, const gchar *old, const gchar *new); | 242 gchar *str_replace(const gchar *str, const gchar *old, const gchar *new); |
228 | 243 |
229 /* Callback function pointer type for when a user's information is received, | 244 /* Callback function pointer type for when a user's information is received, |
230 * initiated from a user lookup. */ | 245 * initiated from a user lookup. */ |