Mercurial > pidgin-twitter
comparison pidgin-twitter.h @ 286:6d0bb66fedc7
added group support for identi.ca.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Wed, 28 Jan 2009 23:17:40 +0900 |
parents | 2d559555875f |
children | 32ce4374dc8c |
comparison
equal
deleted
inserted
replaced
285:15b8e403c7e1 | 286:6d0bb66fedc7 |
---|---|
37 COMMAND, | 37 COMMAND, |
38 PSEUDO, | 38 PSEUDO, |
39 USER, | 39 USER, |
40 CHANNEL_WASSR, | 40 CHANNEL_WASSR, |
41 TAG_IDENTICA, | 41 TAG_IDENTICA, |
42 GROUP_IDENTICA, | |
42 IMAGE_TWITTER, | 43 IMAGE_TWITTER, |
43 IMAGE_WASSR, | 44 IMAGE_WASSR, |
44 IMAGE_IDENTICA, | 45 IMAGE_IDENTICA, |
45 IMAGE_JISKO, | 46 IMAGE_JISKO, |
46 SIZE_128_WASSR, | 47 SIZE_128_WASSR, |
157 #define RECIPIENT_FORMAT_JISKO "%s@<a href='http://jisko.net/%s'>%s</a>" | 158 #define RECIPIENT_FORMAT_JISKO "%s@<a href='http://jisko.net/%s'>%s</a>" |
158 #define SENDER_FORMAT_JISKO "%s<a href='http://jisko.net/%s'>%s</a>: " | 159 #define SENDER_FORMAT_JISKO "%s<a href='http://jisko.net/%s'>%s</a>: " |
159 #define CHANNEL_FORMAT_WASSR "%s<a href='http://wassr.jp/channel/%s'>%s</a> " | 160 #define CHANNEL_FORMAT_WASSR "%s<a href='http://wassr.jp/channel/%s'>%s</a> " |
160 #define CHANNEL_FORMAT_IDENTICA "%s<a href='http://identi.ca/tag/%s'>%s</a> " | 161 #define CHANNEL_FORMAT_IDENTICA "%s<a href='http://identi.ca/tag/%s'>%s</a> " |
161 #define TAG_FORMAT_IDENTICA "#<a href='http://identi.ca/tag/%s'>%s</a>" | 162 #define TAG_FORMAT_IDENTICA "#<a href='http://identi.ca/tag/%s'>%s</a>" |
163 #define GROUP_FORMAT_IDENTICA "!<a href='http://identi.ca/group/%s'>%s</a>" | |
162 | 164 |
163 #define DEFAULT_LIST "(list of users: separated with ' ,:;')" | 165 #define DEFAULT_LIST "(list of users: separated with ' ,:;')" |
164 #define OOPS_MESSAGE "<body>Oops! Your update was over 140 characters. We sent the short version to your friends (they can view the entire update on the web).<BR></body>" | 166 #define OOPS_MESSAGE "<body>Oops! Your update was over 140 characters. We sent the short version to your friends (they can view the entire update on the web).<BR></body>" |
165 #define EMPTY "" | 167 #define EMPTY "" |
166 | 168 |
170 #define P_COMMAND "^(?:\\s*)([dDfFgGlLmMnNtTwW]{1}\\s+[A-Za-z0-9_]+)(?:\\s*\\Z)" | 172 #define P_COMMAND "^(?:\\s*)([dDfFgGlLmMnNtTwW]{1}\\s+[A-Za-z0-9_]+)(?:\\s*\\Z)" |
171 #define P_PSEUDO "^\\s*(?:[\"#$%&'()*+,\\-./:;<=>?\\[\\\\\\]_`{|}~]|[^\\s\\x21-\\x7E])*([dDfFgGlLmMnNtTwW]{1})(?:\\Z|\\s+|[^\\x21-\\x7E]+\\Z)" | 173 #define P_PSEUDO "^\\s*(?:[\"#$%&'()*+,\\-./:;<=>?\\[\\\\\\]_`{|}~]|[^\\s\\x21-\\x7E])*([dDfFgGlLmMnNtTwW]{1})(?:\\Z|\\s+|[^\\x21-\\x7E]+\\Z)" |
172 #define P_USER "^.*?(?:<a .+?>)?([-A-Za-z0-9_]+)(?:</a>)?:" | 174 #define P_USER "^.*?(?:<a .+?>)?([-A-Za-z0-9_]+)(?:</a>)?:" |
173 #define P_CHANNEL "^(.*?(?:<a .+?>)?[-A-Za-z0-9_]+(?:</a>)?: \\r?\\n?#)([A-Za-z0-9_]+) " | 175 #define P_CHANNEL "^(.*?(?:<a .+?>)?[-A-Za-z0-9_]+(?:</a>)?: \\r?\\n?#)([A-Za-z0-9_]+) " |
174 #define P_TAG_IDENTICA "#([-A-Za-z0-9_]+)" | 176 #define P_TAG_IDENTICA "#([-A-Za-z0-9_]+)" |
177 #define P_GROUP_IDENTICA "!([-A-Za-z0-9_]+)" | |
175 #define P_IMAGE_TWITTER "<img .*=\"profile-(?:image|img)\".*src=\"(http://.+?)\".*/>" | 178 #define P_IMAGE_TWITTER "<img .*=\"profile-(?:image|img)\".*src=\"(http://.+?)\".*/>" |
176 #define P_IMAGE_WASSR "<div class=\"image\"><a href=\".+\"><img src=\"(.+)\" width=\".+?\" /></a></div>" | 179 #define P_IMAGE_WASSR "<div class=\"image\"><a href=\".+\"><img src=\"(.+)\" width=\".+?\" /></a></div>" |
177 #define P_IMAGE_IDENTICA "<img src=\"(http://.+.identi.ca/.+)\" class=\"avatar profile photo\" width=\"96\" height=\"96\" alt=\"[A-Za-z0-9_]+\"/>" | 180 #define P_IMAGE_IDENTICA "<img src=\"(http://.+.identi.ca/.+)\" class=\"avatar profile photo\" width=\"96\" height=\"96\" alt=\"[A-Za-z0-9_]+\"/>" |
178 #define P_IMAGE_JISKO "<img src=\"(http://jisko.net/users/.+/img/avatar/thumb_side\\..+)\" alt=\"Avatar\" />" | 181 #define P_IMAGE_JISKO "<img src=\"(http://jisko.net/users/.+/img/avatar/thumb_side\\..+)\" alt=\"Avatar\" />" |
179 #define P_SIZE_128_WASSR "\\.128\\." | 182 #define P_SIZE_128_WASSR "\\.128\\." |
211 /* misc macros */ | 214 /* misc macros */ |
212 #define DEFAULT_ICON_SIZE (48) | 215 #define DEFAULT_ICON_SIZE (48) |
213 #define DEFAULT_ICON_MAX_COUNT (50) | 216 #define DEFAULT_ICON_MAX_COUNT (50) |
214 #define DEFAULT_ICON_MAX_DAYS (7) | 217 #define DEFAULT_ICON_MAX_DAYS (7) |
215 #define DAYS_TO_SECONDS(d) ((d) * 86400) | 218 #define DAYS_TO_SECONDS(d) ((d) * 86400) |
216 #define NUM_REGPS (13) | 219 #define NUM_REGPS (14) |
217 #define NUM_SERVICES (4) /* twitter, wassr, identica, jisko. */ | 220 #define NUM_SERVICES (4) /* twitter, wassr, identica, jisko. */ |
218 | 221 |
219 /* debug macros */ | 222 /* debug macros */ |
220 #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); | 223 #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); |
221 #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); | 224 #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); |