Mercurial > pidgin-twitter
comparison pidgin-twitter.h @ 258:2145f975ef69
- fixed a glitch in identi.ca icon pattern
- added support for identi.ca default icon
- enabled api based twitter access by default
- added file name field to the debug messages
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Wed, 26 Nov 2008 14:32:09 +0900 |
parents | c2620a99622b |
children | b7ac562d758c |
comparison
equal
deleted
inserted
replaced
257:954753a52ed8 | 258:2145f975ef69 |
---|---|
171 #define P_USER "^.*?(?:<a .+?>)?([-A-Za-z0-9_]+)(?:</a>)?:" | 171 #define P_USER "^.*?(?:<a .+?>)?([-A-Za-z0-9_]+)(?:</a>)?:" |
172 #define P_CHANNEL "^(.*?(?:<a .+?>)?[-A-Za-z0-9_]+(?:</a>)?: \\r?\\n?#)([A-Za-z0-9_]+) " | 172 #define P_CHANNEL "^(.*?(?:<a .+?>)?[-A-Za-z0-9_]+(?:</a>)?: \\r?\\n?#)([A-Za-z0-9_]+) " |
173 #define P_TAG_IDENTICA "#([-A-Za-z0-9_]+)" | 173 #define P_TAG_IDENTICA "#([-A-Za-z0-9_]+)" |
174 #define P_IMAGE_TWITTER "<a href=\"/account/profile_image/.+?\"><img .+? id=\"profile-image\".*src=\"(http://.+)\" .+?/>" | 174 #define P_IMAGE_TWITTER "<a href=\"/account/profile_image/.+?\"><img .+? id=\"profile-image\".*src=\"(http://.+)\" .+?/>" |
175 #define P_IMAGE_WASSR "<div class=\"image\"><a href=\".+\"><img src=\"(.+)\" width=\".+?\" /></a></div>" | 175 #define P_IMAGE_WASSR "<div class=\"image\"><a href=\".+\"><img src=\"(.+)\" width=\".+?\" /></a></div>" |
176 #define P_IMAGE_IDENTICA "<img src=\"(http://.+.identi.ca/.+)\" class=\"avatar profile\" width=\"96\" height=\"96\" alt=\"[A-Za-z0-0_]+\"/>" | 176 #define P_IMAGE_IDENTICA "<img src=\"(http://.+.identi.ca/.+)\" class=\"avatar profile\" width=\"96\" height=\"96\" alt=\"[A-Za-z0-9_]+\"/>" |
177 #define P_IMAGE_JISKO "<img src=\"(http://jisko.net/users/.+/img/avatar/thumb_side\\..+)\" alt=\"Avatar\" />" | 177 #define P_IMAGE_JISKO "<img src=\"(http://jisko.net/users/.+/img/avatar/thumb_side\\..+)\" alt=\"Avatar\" />" |
178 #define P_SIZE_128_WASSR "\\.128\\." | 178 #define P_SIZE_128_WASSR "\\.128\\." |
179 #define P_EXCESS_LF "([\\r|\\n]{2,})" | 179 #define P_EXCESS_LF "([\\r|\\n]{2,})" |
180 | 180 |
181 /* twitter API specific macros */ | 181 /* twitter API specific macros */ |
193 #define TWITTER_DEFAULT_INTERVAL (60) | 193 #define TWITTER_DEFAULT_INTERVAL (60) |
194 #define TWITTER_DEFAULT_ICON_URL "http://static.twitter.com/images/default_profile_bigger.png" | 194 #define TWITTER_DEFAULT_ICON_URL "http://static.twitter.com/images/default_profile_bigger.png" |
195 | 195 |
196 /* wassr specific macros */ | 196 /* wassr specific macros */ |
197 #define WASSR_POST_LEN (255) | 197 #define WASSR_POST_LEN (255) |
198 | |
199 /* identica specific macros */ | |
198 #define IDENTICA_POST_LEN (140) | 200 #define IDENTICA_POST_LEN (140) |
201 #define IDENTICA_DEFAULT_ICON_URL "http://theme.identi.ca/identica/default-avatar-profile.png" | |
199 | 202 |
200 /* jisko specific macro */ | 203 /* jisko specific macro */ |
201 #define JISKO_DEFAULT_ICON_URL "http://jisko.net/static/img/avatar/default_note.png" | 204 #define JISKO_DEFAULT_ICON_URL "http://jisko.net/static/img/avatar/default_note.png" |
202 | 205 |
203 /* size of substitution buffer */ | 206 /* size of substitution buffer */ |
210 #define DAYS_TO_SECONDS(d) ((d) * 86400) | 213 #define DAYS_TO_SECONDS(d) ((d) * 86400) |
211 #define NUM_REGPS (13) | 214 #define NUM_REGPS (13) |
212 #define NUM_SERVICES (4) /* twitter, wassr, identica, jisko. */ | 215 #define NUM_SERVICES (4) /* twitter, wassr, identica, jisko. */ |
213 | 216 |
214 /* debug macros */ | 217 /* debug macros */ |
215 #define twitter_debug(fmt, ...) do { if(purple_prefs_get_bool(OPT_LOG_OUTPUT)) purple_debug(PURPLE_DEBUG_INFO, PLUGIN_NAME, "%s():%4d: " fmt, __FUNCTION__, (int)__LINE__, ## __VA_ARGS__); } while(0); | 218 #define twitter_debug(fmt, ...) do { if(purple_prefs_get_bool(OPT_LOG_OUTPUT)) purple_debug(PURPLE_DEBUG_INFO, PLUGIN_NAME, "%s: %s():%4d: " fmt, __FILE__, __FUNCTION__, (int)__LINE__, ## __VA_ARGS__); } while(0); |
216 #define twitter_error(fmt, ...) do { if(purple_prefs_get_bool(OPT_LOG_OUTPUT)) purple_debug(PURPLE_DEBUG_ERROR, PLUGIN_NAME, "%s():%4d: " fmt, __FUNCTION__, (int)__LINE__, ## __VA_ARGS__); } while(0); | 219 #define twitter_error(fmt, ...) do { if(purple_prefs_get_bool(OPT_LOG_OUTPUT)) purple_debug(PURPLE_DEBUG_ERROR, PLUGIN_NAME, "%s: %s():%4d: " fmt, __FILE__, __FUNCTION__, (int)__LINE__, ## __VA_ARGS__); } while(0); |
217 | 220 |
218 #endif | 221 #endif |