📄 yahoo_profile.c
字号:
/* * gaim * * Gaim is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */#define PHOTO_SUPPORT 1#include "internal.h"#include "debug.h"#include "notify.h"#include "util.h"#if PHOTO_SUPPORT#include "imgstore.h"#endif#include "yahoo.h"#include "yahoo_friend.h"typedef struct { GaimConnection *gc; char *name;} YahooGetInfoData;typedef enum profile_lang_id { XX, DA, DE, EL, EN, EN_GB, ES_AR, ES_ES, ES_MX, ES_US, FR_CA, FR_FR, IT, JA, KO, NO, PT, SV, ZH_CN, ZH_HK, ZH_TW, ZH_US} profile_lang_id_t;typedef struct profile_lang_node { profile_lang_id_t lang; char *last_updated_string; char *det;} profile_lang_node_t;typedef struct profile_strings_node { profile_lang_id_t lang; char *lang_string; /* Only to make debugging output saner */ char *charset; char *yahoo_id_string; char *private_string; char *no_answer_string; char *my_email_string; char *realname_string; char *location_string; char *age_string; char *maritalstatus_string; char *gender_string; char *occupation_string; char *hobbies_string; char *latest_news_string; char *favorite_quote_string; char *links_string; char *no_home_page_specified_string; char *home_page_string; char *no_cool_link_specified_string; char *cool_link_1_string; char *cool_link_2_string; char *cool_link_3_string; char *dummy;} profile_strings_node_t;typedef enum profile_state { PROFILE_STATE_DEFAULT, PROFILE_STATE_NOT_FOUND, PROFILE_STATE_UNKNOWN_LANGUAGE} profile_state_t;typedef struct { YahooGetInfoData *info_data; char *url_buffer; GString *s; char *photo_url_text; char *profile_url_text; char *tooltip_text; const profile_strings_node_t *strings; const char *last_updated_string; const char *title; profile_state_t profile_state;} YahooGetInfoStepTwoData;/* Strings to determine the profile "language" (more accurately "locale"). * Strings in this list must be in the original charset in the profile. * The "Last Updated" string is used, but sometimes is not sufficient to * distinguish 2 locales with this (e.g., ES_ES from ES_US, or FR_CA from * FR_FR, or EL from EN_GB), in which case a second string is added and * such special cases must be placed before the more general case. */static const profile_lang_node_t profile_langs[] = { { DA, "Opdateret sidste gang ", NULL }, { DE, "Letzter Update ", NULL }, { EL, "Last Updated:", "http://gr.profiles.yahoo.com" }, { EN_GB, "Last Updated ", "Favourite Quote" }, { EN, "Last Updated:", NULL }, { EN, "Last Updated ", NULL }, { ES_AR, "\332ltima actualizaci\363n ", NULL }, { ES_ES, "Actualizada el ", "http://es.profiles.yahoo.com" }, { ES_MX, "Actualizada el ", "http://mx.profiles.yahoo.com" }, { ES_US, "Actualizada el ", NULL }, { FR_CA, "Derni\xe8re mise \xe0 jour", "http://cf.profiles.yahoo.com" }, { FR_FR, "Derni\xe8re mise \xe0 jour", NULL }, { IT, "Ultimo aggiornamento ", NULL }, { JA, "\xba\xc7\xbd\xaa\xb9\xb9\xbf\xb7\xc6\xfc\xa1\xa7", NULL }, { KO, "\xb0\xbb\xbd\xc5\x20\xb3\xaf\xc2\xa5 ", NULL }, { NO, "Sist oppdatert ", NULL }, { PT, "\332ltima atualiza\347\343o ", NULL }, { SV, "Senast uppdaterad ", NULL }, { ZH_CN, "\xd7\xee\xba\xf3\xd0\xde\xb8\xc4\xc8\xd5\xc6\xda", NULL }, { ZH_HK, "\xb3\xcc\xaa\xf1\xa7\xf3\xb7\x73\xae\xc9\xb6\xa1", NULL }, { ZH_US, "\xb3\xcc\xab\xe1\xad\xd7\xa7\xef\xa4\xe9\xb4\xc1", "http://chinese.profiles.yahoo.com" }, { ZH_TW, "\xb3\xcc\xab\xe1\xad\xd7\xa7\xef\xa4\xe9\xb4\xc1", NULL }, { XX, NULL, NULL }};/* Strings in this list must be in UTF-8; 's should be specified as spaces. */static const profile_strings_node_t profile_strings[] = { { DA, "da", "ISO-8859-1", "Yahoo! ID:", "Privat", "Intet svar", "Min Email", "Rigtige navn:", "Opholdssted:", "Alder:", "Ægteskabelig status:", "Køn:", "Erhverv:", "Hobbyer:", "Sidste nyt:", "Favoritcitat", "Links", "Ingen hjemmeside specificeret", "Forside:", "Intet cool link specificeret", "Cool link 1:", "Cool link 2:", "Cool link 3:", NULL }, { DE, "de", "ISO-8859-1", "Yahoo!-ID:", "Privat", "Keine Antwort", "Meine E-Mail", "Realer Name:", "Ort:", "Alter:", "Familienstand:", "Geschlecht:", "Beruf:", "Hobbys:", "Neuste Nachrichten:", "Mein Lieblingsspruch", "Links", "Keine Homepage angegeben", "Homepage:", "Keinen coolen Link angegeben", "Cooler Link 1:", "Cooler Link 2:", "Cooler Link 3:", NULL }, { EL, "el", "ISO-8859-7", /* EL is identical to EN, except no_answer_string */ "Yahoo! ID:", "Private", "Καμία απάντηση", "My Email", "Real Name:", "Location:", "Age:", "Marital Status:", "Gender:", "Occupation:", "Hobbies:", "Latest News", "Favorite Quote", "Links", "No home page specified", "Home Page:", "No cool link specified", "Cool Link 1:", "Cool Link 2:", "Cool Link 3:", NULL }, { EN, "en", "ISO-8859-1", "Yahoo! ID:", "Private", "No Answer", "My Email", "Real Name:", "Location:", "Age:", "Marital Status:", "Gender:", "Occupation:", "Hobbies:", "Latest News", "Favorite Quote", "Links", "No home page specified", "Home Page:", "No cool link specified", "Cool Link 1:", "Cool Link 2:", "Cool Link 3:", NULL }, { EN_GB, "en_GB", "ISO-8859-1", /* Same as EN except spelling of "Favourite" */ "Yahoo! ID:", "Private", "No Answer", "My Email", "Real Name:", "Location:", "Age:", "Marital Status:", "Gender:", "Occupation:", "Hobbies:", "Latest News", "Favourite Quote", "Links", "No home page specified", "Home Page:", "No cool link specified", "Cool Link 1:", "Cool Link 2:", "Cool Link 3:", NULL }, { ES_AR, "es_AR", "ISO-8859-1", "Usuario de Yahoo!:", "Privado", "No introdujiste una respuesta", "Mi dirección de correo electrónico", "Nombre real:", "Ubicación:", "Edad:", "Estado civil:", "Sexo:", "Ocupación:", "Pasatiempos:", "Últimas noticias:", "Tu cita favorita", "Enlaces", "Ninguna página de inicio especificada", "Página de inicio:", "Ningún enlace preferido", "Enlace genial 1:", "Enlace genial 2:", "Enlace genial 3:", NULL }, { ES_ES, "es_ES", "ISO-8859-1", "ID de Yahoo!:", "Privado", "Sin respuesta", "Mi correo-e", "Nombre verdadero:", "Lugar:", "Edad:", "Estado civil:", "Sexo:", "Ocupación:", "Aficiones:", "Ultimas Noticias:", "Tu cita Favorita", "Enlace", "Ninguna página personal especificada", "Página de Inicio:", "Ningún enlace preferido", "Enlaces Preferidos 1:", "Enlaces Preferidos 2:", "Enlaces Preferidos 3:", NULL }, { ES_MX, "es_MX", "ISO-8859-1", "ID de Yahoo!:", "Privado", "Sin responder", "Mi Dirección de correo-e", "Nombre real:", "Ubicación:", "Edad:", "Estado civil:", "Sexo:", "Ocupación:", "Pasatiempos:", "Ultimas Noticias:", "Su cita favorita", "Enlaces", "Ninguna Página predefinida", "Página web:", "Ningún Enlace preferido", "Enlaces Preferidos 1:", "Enlaces Preferidos 2:", "Enlaces Preferidos 3:", NULL }, { ES_US, "es_US", "ISO-8859-1", "ID de Yahoo!:", "Privado", "No introdujo una respuesta", "Mi Dirección de correo-e", "Nombre real:", "Localidad:", "Edad:", "Estado civil:", "Sexo:", "Ocupación:", "Pasatiempos:", "Ultimas Noticias:", "Su cita Favorita", "Enlaces", "Ninguna Página de inicio predefinida", "Página de inicio:", "Ningún Enlace preferido", "Enlaces Preferidos 1:", "Enlaces Preferidos 2:", "Enlaces Preferidos 3:", NULL }, { FR_CA, "fr_CA", "ISO-8859-1", "Compte Yahoo!:", "Privé", "Sans réponse", "Mon courriel", "Nom réel:", "Lieu:", "Âge:", "État civil:", "Sexe:", "Profession:", "Passe-temps:", "Actualités:", "Citation préférée", "Liens", "Pas de mention d'une page personnelle", "Page personnelle:", "Pas de mention d'un lien favori", "Lien préféré 1:", "Lien préféré 2:", "Lien préféré 3:", NULL }, { FR_FR, "fr_FR", "ISO-8859-1", "Compte Yahoo!:", "Privé", "Sans réponse", "Mon E-mail", "Nom réel:", "Lieu:", "Âge:", "Situation de famille:", "Sexe:", "Profession:", "Centres d'intérêts:", "Actualités:", "Citation préférée", "Liens", "Pas de mention d'une page perso", "Page perso:", "Pas de mention d'un lien favori", "Lien préféré 1:", "Lien préféré 2:", "Lien préféré 3:", NULL }, { IT, "it", "ISO-8859-1", "ID Yahoo!:", "Non pubblica", "Nessuna risposta", "La mia e-mail", "Nome vero:", "Località:", "Eta':", "Stato civile:", "Sesso:", "Occupazione:", "Hobby:",
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -