diff pidgin-twitter.h @ 198:85484ddf8823

- changed the way of fetching icons for wassr. now pidgin-twitter downloads html first even for wassr. - implemented new icon update scheme. now pidign-twitter carries the url of each icon and checks update by comparing url.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sun, 10 Aug 2008 23:00:48 +0900
parents b436d72447e8
children 9a2d727f39b4
line wrap: on
line diff
--- a/pidgin-twitter.h	Sat Aug 09 13:42:12 2008 +0900
+++ b/pidgin-twitter.h	Sun Aug 10 23:00:48 2008 +0900
@@ -34,8 +34,9 @@
     USER_FIRST_LINE,
     USER_FORMATTED,
     CHANNEL,
+    IMAGE_TWITTER,
+    IMAGE_WASSR,
     IMAGE_IDENTICA,
-    IMAGE_TWITTER,
     IMAGE_JISKO
 };
 
@@ -55,6 +56,7 @@
     GList *request_list;    /* marker list */
     PurpleUtilFetchUrlData *fetch_data; /* icon fetch data */
     const gchar *img_type;  /* image type */
+    gchar *icon_url;        /* url for the user's icon */
     gint use_count;         /* usage count */
     time_t mtime;           /* mtime of file */
 } icon_data;
@@ -144,8 +146,9 @@
 #define P_USER_FIRST_LINE   "^\\(.+?\\)\\s*.+:\\s*([A-Za-z0-9_]+):"
 #define P_USER_FORMATTED    "^.*?<a .+?>([A-Za-z0-9_]+)</a>:"
 #define P_CHANNEL           "^(.*?<a .+?>[A-Za-z0-9_]+</a>: \\r?\\n?#)([A-Za-z0-9_]+) "
+#define P_IMAGE_TWITTER     "<a href=\"/account/profile_image/.+?\"><img .+? id=\"profile-image\".*src=\"(http://.+)\" .+?/>"
+#define P_IMAGE_WASSR       "<div class=\"image\"><a href=\".+\"><img src=\"(.+)\" width=\".+?\" /></a></div>"
 #define P_IMAGE_IDENTICA    "<img src=\"(http://avatar.identi.ca/[A-Za-z0-9-.]+)\" class=\"avatar profile\" width=\"96\" height=\"96\" alt=\"[A-Za-z0-0_]+\"/>"
-#define P_IMAGE_TWITTER     "<a href=\"/account/profile_image/.+?\"><img .+? id=\"profile-image\".*src=\"(http://.+)\" .+?/>"
 #define P_IMAGE_JISKO       "<img src=\"(http://jisko.net/users/.+/img/avatar/thumb_side\\..+)\" alt=\"Avatar\" />"
 
 /* twitter API specific macros */