ayttm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ayttm-commits] CVS: ayttm/modules/yahoo2 Makefile.am,1.4,1.5 yahoo.c,1


From: Philip S Tellis <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/modules/yahoo2 Makefile.am,1.4,1.5 yahoo.c,1.18,1.19
Date: Thu, 23 Jan 2003 00:24:29 -0500

Update of /cvsroot/ayttm/ayttm/modules/yahoo2
In directory subversions:/tmp/cvs-serv15596/modules/yahoo2

Modified Files:
        Makefile.am yahoo.c 
Log Message:
yahoo functions static

Index: Makefile.am
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/yahoo2/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Makefile.am 19 Jan 2003 14:00:19 -0000      1.4
+++ Makefile.am 23 Jan 2003 05:24:26 -0000      1.5
@@ -2,6 +2,7 @@
 libdir = $(pkgdatadir)/modules
 
 AM_CFLAGS = $(GTK_CFLAGS) -Ilibyahoo2 -I$(top_srcdir)/src
+AM_CPPFLAGS = -DUSE_STRUCT_CALLBACKS=1
 
 lib_LTLIBRARIES = yahoo2.la
 yahoo2_la_SOURCES = yahoo.c

Index: yahoo.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/yahoo2/yahoo.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- yahoo.c     21 Jan 2003 14:59:46 -0000      1.18
+++ yahoo.c     23 Jan 2003 05:24:26 -0000      1.19
@@ -84,13 +84,13 @@
 /*  Module defines */
 #define plugin_info yahoo2_LTX_plugin_info
 #define SERVICE_INFO yahoo2_LTX_SERVICE_INFO
-#define plugin_init yahoo2_LTX_plugin_init
-#define plugin_finish yahoo2_LTX_plugin_finish
 
 /* Function Prototypes */
-int plugin_init();
-int plugin_finish();
+static int plugin_init();
+static int plugin_finish();
 static void register_callbacks();
+
+/* called from plugin.c */
 struct service_callbacks * query_callbacks();
 
 static int ref_count = 0;
@@ -124,7 +124,7 @@
 struct service SERVICE_INFO = {"Yahoo", -1, TRUE, TRUE, TRUE, TRUE, NULL};
 /* End Module Exports */
 
-int plugin_init()
+static int plugin_init()
 {
        input_list *il = g_new0(input_list, 1);
 
@@ -205,7 +205,7 @@
        return (0);
 }
 
-int plugin_finish()
+static int plugin_finish()
 {
        eb_debug(DBG_MOD, "Returning the ref_count: %i\n", ref_count);
        return (ref_count);
@@ -293,7 +293,7 @@
     EB_DISPLAY_YAHOO_CUSTOM=13
 };
 
-yahoo_idlabel eb_yahoo_status_codes[] = {
+static yahoo_idlabel eb_yahoo_status_codes[] = {
        {YAHOO_STATUS_AVAILABLE, ""},
        {YAHOO_STATUS_BRB, "(BRB)"},
        {YAHOO_STATUS_BUSY, "(Busy)"},
@@ -312,7 +312,7 @@
        {0, NULL}
 };
 
-int eb_to_yahoo_state_translation[] = {
+static int eb_to_yahoo_state_translation[] = {
        YAHOO_STATUS_AVAILABLE,
        YAHOO_STATUS_BRB,
        YAHOO_STATUS_BUSY,
@@ -330,7 +330,7 @@
        YAHOO_STATUS_TYPING
 };
 
-int yahoo_to_eb_state_translation(int state)
+static int yahoo_to_eb_state_translation(int state)
 {
        int i;
        for (i = 0; i <= EB_DISPLAY_YAHOO_CUSTOM; i++)
@@ -341,7 +341,7 @@
 
 #define YAHOO_DEBUGLOG ext_yahoo_log
 
-int ext_yahoo_log(char *fmt,...)
+static int ext_yahoo_log(char *fmt,...)
 {
        if(do_yahoo_debug) {
                va_list ap;
@@ -367,20 +367,20 @@
 
 /* Forward Declarations */
 
-void eb_yahoo_add_user(eb_account * ea);
-void eb_yahoo_login_with_state(eb_local_account * ela, int login_mode);
-void eb_yahoo_logout(eb_local_account * ela);
-eb_account *eb_yahoo_new_account(gchar * account);
+static void eb_yahoo_add_user(eb_account * ea);
+static void eb_yahoo_login_with_state(eb_local_account * ela, int login_mode);
+static void eb_yahoo_logout(eb_local_account * ela);
+static eb_account *eb_yahoo_new_account(gchar * account);
 
 
-gint eb_yahoo_ping_timeout_callback(gpointer data)
+static gint eb_yahoo_ping_timeout_callback(gpointer data)
 {
        eb_yahoo_local_account_data *ylad = data;
        yahoo_keepalive(ylad->id);
        return 1;
 }
 
-eb_local_account * eb_yahoo_find_active_local_account()
+static eb_local_account * eb_yahoo_find_active_local_account()
 {
        GList * node;
        for (node = accounts; node; node = node->next) {
@@ -393,7 +393,7 @@
        return NULL;
 }
 
-eb_local_account *yahoo_find_local_account_by_id(int id)
+static eb_local_account *yahoo_find_local_account_by_id(int id)
 {
        GList * node;
        for (node = accounts; node; node = node->next) {
@@ -409,7 +409,7 @@
        return NULL;
 }
 
-void eb_yahoo_decode_yahoo_colors(char *buffer, char *msg)
+static void eb_yahoo_decode_yahoo_colors(char *buffer, char *msg)
 {
        char *yahoo_colors[] =
        {
@@ -546,7 +546,7 @@
        LOG(("post-color buffer: %s", buffer));
 }
 
-void ext_yahoo_status_changed(int id, char *who, int stat, char *msg, int away)
+static void ext_yahoo_status_changed(int id, char *who, int stat, char *msg, 
int away)
 {
        eb_account *ea;
        eb_yahoo_account_data *yad;
@@ -581,7 +581,7 @@
        char * identity;
        void * tag;
 };
-YList * identities = NULL;
+static YList * identities = NULL;
 static void eb_yahoo_set_profile(ebmCallbackData * data)
 {
        struct act_identity * i = (void *)data;
@@ -591,7 +591,7 @@
        ylad->act_id = i->identity;
 }
 
-void ext_yahoo_got_identities(int id, YList * ids)
+static void ext_yahoo_got_identities(int id, YList * ids)
 {
        eb_local_account * ela = yahoo_find_local_account_by_id(id);
        eb_yahoo_local_account_data * ylad = ela->protocol_local_account_data;
@@ -611,7 +611,7 @@
        }
 }
 
-void ext_yahoo_got_buddies(int id, YList * buds)
+static void ext_yahoo_got_buddies(int id, YList * buds)
 {
        YList * buddy;
        eb_account *ea = NULL;
@@ -664,7 +664,7 @@
        }
 }
 
-void ext_yahoo_got_ignore(int id, YList * ign)
+static void ext_yahoo_got_ignore(int id, YList * ign)
 {
        eb_account *ea = NULL;
        int changed = 0;
@@ -713,7 +713,7 @@
        }
 }
 
-void ext_yahoo_got_im(int id, char *who, char *msg, long tm, int stat, int 
utf8)
+static void ext_yahoo_got_im(int id, char *who, char *msg, long tm, int stat, 
int utf8)
 {
        if(stat == 2) {
                LOG(("Error sending message to %s", who));
@@ -874,7 +874,7 @@
        }
 }
 
-void ext_yahoo_got_file(int id, char *from, char *url, long expires, char 
*msg, char *fname, unsigned long fsize)
+static void ext_yahoo_got_file(int id, char *from, char *url, long expires, 
char *msg, char *fname, unsigned long fsize)
 {
        char buff[1024];
        eb_yahoo_file_transfer_data *yftd = g_new0(eb_yahoo_file_transfer_data, 
1);
@@ -931,7 +931,7 @@
        }
 }
 
-void eb_yahoo_send_file(eb_local_account *from, eb_account *to, char *file)
+static void eb_yahoo_send_file(eb_local_account *from, eb_account *to, char 
*file)
 {
        struct stat stats;
        int in, out;
@@ -972,7 +972,7 @@
 /********************************
  * Conference code starts here
  */
-void ext_yahoo_conf_userjoin(int id, char *who, char *room)
+static void ext_yahoo_conf_userjoin(int id, char *who, char *room)
 {
        eb_chat_room *chat_room = NULL;
        eb_local_account *ela = yahoo_find_local_account_by_id(id);
@@ -1006,7 +1006,7 @@
        ycrd->members = y_list_append(ycrd->members, strdup(who));
 }
 
-void ext_yahoo_conf_userleave(int id, char *who, char *room)
+static void ext_yahoo_conf_userleave(int id, char *who, char *room)
 {
        eb_chat_room *chat_room = find_chat_room_by_id(room);
        eb_yahoo_chat_room_data *ycrd;
@@ -1035,7 +1035,7 @@
        /* if no more users, then destroy? */
 }
 
-void ext_yahoo_conf_userdecline(int id, char *who, char *room, char *msg)
+static void ext_yahoo_conf_userdecline(int id, char *who, char *room, char 
*msg)
 {
        eb_local_account *ela = yahoo_find_local_account_by_id(id);
        eb_yahoo_local_account_data * ylad = ela->protocol_local_account_data;
@@ -1082,7 +1082,7 @@
        }
 }
 
-void ext_yahoo_got_conf_invite(int id, char *who, char *room, char *msg, YList 
*members)
+static void ext_yahoo_got_conf_invite(int id, char *who, char *room, char 
*msg, YList *members)
 {
        char buff[1024];
        eb_yahoo_chat_room_data *ycrd = g_new0(eb_yahoo_chat_room_data, 1);
@@ -1100,16 +1100,16 @@
        eb_do_dialog(buff, _("Yahoo Join Conference"), 
eb_yahoo_accept_conference, ycrd);
 }
 
-void eb_yahoo_accept_invite(eb_local_account *ela, void * data)
+static void eb_yahoo_accept_invite(eb_local_account *ela, void * data)
 {
 }
 
-void eb_yahoo_decline_invite(eb_local_account *ela, void * data)
+static void eb_yahoo_decline_invite(eb_local_account *ela, void * data)
 {
 }
 
 #else
-void eb_yahoo_accept_invite(eb_local_account *ela, void * data)
+static void eb_yahoo_accept_invite(eb_local_account *ela, void * data)
 {
        eb_yahoo_chat_room_data *ycrd = data;
        
@@ -1152,14 +1152,14 @@
                eb_chat_room_buddy_arrive(chat_room, ela->alias, ylad->act_id);
 }
 
-void eb_yahoo_decline_invite(eb_local_account *ela, void * data)
+static void eb_yahoo_decline_invite(eb_local_account *ela, void * data)
 {
        eb_yahoo_chat_room_data *ycrd = data;
        eb_yahoo_local_account_data *ylad = ela->protocol_local_account_data;
        yahoo_conference_decline(ycrd->id, ylad->act_id, ycrd->members, 
ycrd->room, _("Thanks, but no thanks"));
 }
 
-void ext_yahoo_got_conf_invite(int id, char *who, char *room, char *msg, YList 
*members)
+static void ext_yahoo_got_conf_invite(int id, char *who, char *room, char 
*msg, YList *members)
 {
        eb_chat_room * chat_room = NULL;
        eb_yahoo_chat_room_data *ycrd = NULL;
@@ -1187,7 +1187,7 @@
 }
 #endif
 
-void ext_yahoo_conf_message(int id, char *who, char *room, char *msg, int utf8)
+static void ext_yahoo_conf_message(int id, char *who, char *room, char *msg, 
int utf8)
 {
        int i=0, j=0;
        unsigned char * umsg = (unsigned char *)msg;
@@ -1217,7 +1217,7 @@
        eb_chat_room_show_message(chat_room, who, umsg);
 }
 
-void eb_yahoo_send_chat_room_message(eb_chat_room * room, gchar * message)
+static void eb_yahoo_send_chat_room_message(eb_chat_room * room, gchar * 
message)
 {
        eb_yahoo_chat_room_data *ycrd;
        eb_yahoo_local_account_data *ylad;
@@ -1238,7 +1238,7 @@
        FREE(encoded);
 }
 
-void eb_yahoo_join_chat_room(eb_chat_room * room)
+static void eb_yahoo_join_chat_room(eb_chat_room * room)
 {
        eb_yahoo_chat_room_data *ycrd;
        eb_local_account *ela;
@@ -1267,7 +1267,7 @@
        ycrd->members = y_list_append(ycrd->members, strdup(ylad->act_id));
 }
 
-void eb_yahoo_leave_chat_room(eb_chat_room * room)
+static void eb_yahoo_leave_chat_room(eb_chat_room * room)
 {
        eb_yahoo_chat_room_data *ycrd;
        eb_yahoo_local_account_data *ylad;
@@ -1282,7 +1282,7 @@
        yahoo_conference_logoff(ycrd->id, ylad->act_id, ycrd->members, 
ycrd->room);
 }
 
-void eb_yahoo_send_invite(eb_local_account * ela, eb_chat_room * ecr, char 
*who, char *message)
+static void eb_yahoo_send_invite(eb_local_account * ela, eb_chat_room * ecr, 
char *who, char *message)
 {
        eb_yahoo_chat_room_data *ycrd;
        eb_yahoo_local_account_data *ylad;
@@ -1307,7 +1307,7 @@
        }
 }
 
-eb_chat_room *eb_yahoo_make_chat_room(char *name, eb_local_account * ela)
+static eb_chat_room *eb_yahoo_make_chat_room(char *name, eb_local_account * 
ela)
 {
        eb_chat_room *ecr = g_new0(eb_chat_room, 1);
        eb_yahoo_chat_room_data *ycrd = g_new0(eb_yahoo_chat_room_data, 1);
@@ -1366,7 +1366,7 @@
                FREE(ay->who);
        FREE(ay);
 }
-void ext_yahoo_rejected(int id, char *who, char *msg)
+static void ext_yahoo_rejected(int id, char *who, char *msg)
 {
        char buff[1024];
        snprintf(buff, sizeof(buff), _("%s has rejected your request to be 
added as a buddy%s%s"),
@@ -1374,7 +1374,7 @@
        do_error_dialog(buff, _("Yahoo Buddy"));
 }
 
-void ext_yahoo_contact_added(int id, char *myid, char *who, char *msg)
+static void ext_yahoo_contact_added(int id, char *myid, char *who, char *msg)
 {
        char buff[1024];
        struct yahoo_authorize_data *ay = g_new0(struct yahoo_authorize_data, 
1);
@@ -1414,7 +1414,7 @@
        /* maybe I should also set yad->typing_timeout_tag to 0 here */
 }
 
-int eb_yahoo_send_typing(eb_local_account *from, eb_account *to)
+static int eb_yahoo_send_typing(eb_local_account *from, eb_account *to)
 {
        eb_yahoo_local_account_data *ylad = from->protocol_local_account_data;
        eb_yahoo_account_data *yad = to->protocol_account_data;
@@ -1441,7 +1441,7 @@
        return 20;
 }
 
-int eb_yahoo_send_cr_typing(eb_chat_room *chatroom)
+static int eb_yahoo_send_cr_typing(eb_chat_room *chatroom)
 {
        eb_yahoo_chat_room_data *ycrd = chatroom->protocol_local_chat_room_data;
        eb_local_account *ela = yahoo_find_local_account_by_id(ycrd->id);
@@ -1456,7 +1456,7 @@
        return 20;
 }
 
-void ext_yahoo_typing_notify(int id, char *who, int stat)
+static void ext_yahoo_typing_notify(int id, char *who, int stat)
 {
        eb_account *ea = find_account_by_handle(who, SERVICE_INFO.protocol_id);
 
@@ -1468,11 +1468,11 @@
        }
 }
 
-void ext_yahoo_game_notify(int id, char *who, int stat)
+static void ext_yahoo_game_notify(int id, char *who, int stat)
 {
 }
 
-void ext_yahoo_mail_notify(int id, char *from, char *subj, int cnt)
+static void ext_yahoo_mail_notify(int id, char *from, char *subj, int cnt)
 {
        char buff[1024] = {0};
        
@@ -1495,7 +1495,7 @@
                do_error_dialog(buff, _("Yahoo Mail"));
 }
 
-void ext_yahoo_system_message(int id, char *msg)
+static void ext_yahoo_system_message(int id, char *msg)
 {
        if(ignore_system)
                return;
@@ -1503,7 +1503,7 @@
        do_error_dialog(msg, _("Yahoo System Message"));
 }
 
-void ext_yahoo_error(int id, char *err, int fatal)
+static void ext_yahoo_error(int id, char *err, int fatal)
 {
        eb_local_account *ela = yahoo_find_local_account_by_id(id);
 
@@ -1513,7 +1513,7 @@
        }
 }
 
-gboolean eb_yahoo_query_connected(eb_account * ea)
+static gboolean eb_yahoo_query_connected(eb_account * ea)
 {
        eb_yahoo_account_data *yad = ea->protocol_account_data;
 
@@ -1524,7 +1524,7 @@
        return yad->status != YAHOO_STATUS_OFFLINE;
 }
 
-void eb_yahoo_login(eb_local_account * ela)
+static void eb_yahoo_login(eb_local_account * ela)
 {
        LOG(("eb_yahoo_login"));
        if (login_invisible)
@@ -1533,7 +1533,7 @@
                eb_yahoo_login_with_state(ela, YAHOO_STATUS_AVAILABLE);
 }
 
-void eb_yahoo_login_with_state(eb_local_account * ela, int login_mode)
+static void eb_yahoo_login_with_state(eb_local_account * ela, int login_mode)
 {
        eb_yahoo_local_account_data *ylad = ela->protocol_local_account_data;
        
@@ -1557,7 +1557,7 @@
        ref_count++;
 }
 
-void ext_yahoo_login_response(int id, int succ, char *url)
+static void ext_yahoo_login_response(int id, int succ, char *url)
 {
        eb_local_account *ela = yahoo_find_local_account_by_id(id);
        eb_yahoo_local_account_data *ylad = ela->protocol_local_account_data;
@@ -1594,7 +1594,7 @@
        eb_yahoo_logout(ela);
 }
 
-void eb_yahoo_logout(eb_local_account * ela)
+static void eb_yahoo_logout(eb_local_account * ela)
 {
        eb_yahoo_local_account_data *ylad;
        const YList * l = NULL;
@@ -1659,7 +1659,7 @@
        is_setting_state = 0;
 }
 
-void eb_yahoo_send_im(eb_local_account * account_from,
+static void eb_yahoo_send_im(eb_local_account * account_from,
                      eb_account * account_to,
                      gchar * message)
 {
@@ -1673,7 +1673,7 @@
        FREE(encoded);
 }
 
-eb_local_account *eb_yahoo_read_local_account_config(GList * pairs)
+static eb_local_account *eb_yahoo_read_local_account_config(GList * pairs)
 {
        eb_local_account *ela;
        eb_yahoo_local_account_data *ylad;
@@ -1697,7 +1697,7 @@
        return ela;
 }
 
-GList *eb_yahoo_write_local_config(eb_local_account * ela)
+static GList *eb_yahoo_write_local_config(eb_local_account * ela)
 {
        eb_yahoo_local_account_data *yla = ela->protocol_local_account_data;
        GList *list = NULL;
@@ -1718,7 +1718,7 @@
        return list;
 }
 
-eb_account *eb_yahoo_read_account_config(GList * config, struct contact * 
contact)
+static eb_account *eb_yahoo_read_account_config(GList * config, struct contact 
* contact)
 {
        eb_account *ea = g_new0(eb_account, 1);
        eb_yahoo_account_data *yad = g_new0(eb_yahoo_account_data, 1);
@@ -1745,7 +1745,7 @@
        return ea;
 }
 
-GList *eb_yahoo_get_states()
+static GList *eb_yahoo_get_states()
 {
        GList *states = NULL;
 
@@ -1767,12 +1767,12 @@
        return states;
 }
 
-char * eb_yahoo_check_login(char * user, char * pass)
+static char * eb_yahoo_check_login(char * user, char * pass)
 {
        return NULL;
 }
 
-gint eb_yahoo_get_current_state(eb_local_account * ela)
+static gint eb_yahoo_get_current_state(eb_local_account * ela)
 {
        eb_yahoo_local_account_data *ylad;
 
@@ -1783,7 +1783,7 @@
        return yahoo_to_eb_state_translation(ylad->status);
 }
 
-void eb_yahoo_set_current_state(eb_local_account * ela, gint state)
+static void eb_yahoo_set_current_state(eb_local_account * ela, gint state)
 {
        eb_yahoo_local_account_data *ylad;
        int yahoo_state = eb_to_yahoo_state_translation[state];
@@ -1836,7 +1836,7 @@
                yahoo_set_away(ylad->id, yahoo_state, NULL, 1);
 }
 
-void eb_yahoo_add_user(eb_account * ea)
+static void eb_yahoo_add_user(eb_account * ea)
 {
        eb_local_account * ela;
        eb_yahoo_local_account_data *ylad;
@@ -1887,7 +1887,7 @@
        yahoo_refresh(ylad->id);
 }
 
-void eb_yahoo_del_user(eb_account * ea)
+static void eb_yahoo_del_user(eb_account * ea)
 {
        eb_local_account *ela;
        eb_yahoo_local_account_data *ylad;
@@ -1928,7 +1928,7 @@
        }
 }
 
-void eb_yahoo_ignore_user(eb_account * ea)
+static void eb_yahoo_ignore_user(eb_account * ea)
 {
        eb_local_account *ela;
        eb_yahoo_local_account_data *ylad;
@@ -1949,7 +1949,7 @@
                        return;
        }
 
-       /* if a buddy, remove and ignore */
+       /* if a buddy, remove.  buddy can be in more than one group */
        for (buddy = yahoo_get_buddylist(ylad->id); buddy; buddy=buddy->next) {
                struct yahoo_buddy *bud = buddy->data;
 
@@ -1957,14 +1957,15 @@
                        yahoo_remove_buddy(ylad->id, ea->handle, 
                                (ea->account_contact == NULL ? "Default" :
                                 ea->account_contact->group->name)); 
-                       yahoo_ignore_buddy(ylad->id, ea->handle, FALSE);
-                       yahoo_get_list(ylad->id);
-                       return;
                }
        }
+
+       /* now ignore him */
+       yahoo_ignore_buddy(ylad->id, ea->handle, FALSE);
+       yahoo_get_list(ylad->id);
 }
 
-void eb_yahoo_unignore_user(eb_account * ea, gchar *new_group)
+static void eb_yahoo_unignore_user(eb_account * ea, gchar *new_group)
 {
        eb_local_account *ela;
        eb_yahoo_local_account_data *ylad;
@@ -1984,6 +1985,7 @@
                if(!strcmp(bud->id, ea->handle)) {
                        yahoo_ignore_buddy(ylad->id, ea->handle, TRUE);
 
+                       /* add him only if he was moved to another group */
                        if(new_group)
                                yahoo_add_buddy(ylad->id, ea->handle, 
new_group);
 
@@ -1993,7 +1995,7 @@
        }
 }
 
-void eb_yahoo_change_group(eb_account * ea, gchar *new_group)
+static void eb_yahoo_change_group(eb_account * ea, gchar *new_group)
 {
        GList *node;
 
@@ -2015,7 +2017,7 @@
        }
 }
 
-void eb_yahoo_rename_group(gchar *old_group, gchar *new_group)
+static void eb_yahoo_rename_group(gchar *old_group, gchar *new_group)
 {
        GList *node;
 
@@ -2036,7 +2038,7 @@
        }
 }
 
-eb_account *eb_yahoo_new_account(gchar * account)
+static eb_account *eb_yahoo_new_account(gchar * account)
 {
        eb_account *acct = g_new0(eb_account, 1);
        eb_yahoo_account_data *yad = g_new0(eb_yahoo_account_data, 1);
@@ -2057,7 +2059,7 @@
 static GdkPixmap *eb_yahoo_pixmap[2];
 static GdkBitmap *eb_yahoo_bitmap[2];
 
-void eb_yahoo_init_pixmaps()
+static void eb_yahoo_init_pixmaps()
 {
        eb_yahoo_pixmap[0] = gdk_pixmap_create_from_xpm_d(statuswindow->window,
                        &eb_yahoo_bitmap[0], NULL, yahoo_online_xpm);
@@ -2068,7 +2070,7 @@
        pixmaps = 1;
 }
 
-void eb_yahoo_get_status_pixmap(eb_account * ea, GdkPixmap ** pm, GdkBitmap ** 
bm)
+static void eb_yahoo_get_status_pixmap(eb_account * ea, GdkPixmap ** pm, 
GdkBitmap ** bm)
 {
        eb_yahoo_account_data *yad;
 
@@ -2085,7 +2087,7 @@
 
 }
 
-gchar *eb_yahoo_get_status_string(eb_account * ea)
+static gchar *eb_yahoo_get_status_string(eb_account * ea)
 {
        eb_yahoo_account_data *yad = ea->protocol_account_data;
        int i;
@@ -2104,7 +2106,7 @@
        return "Unk";
 }
 
-void eb_yahoo_set_idle(eb_local_account * ela, gint idle)
+static void eb_yahoo_set_idle(eb_local_account * ela, gint idle)
 {
        eb_yahoo_local_account_data *ylad;
 
@@ -2122,7 +2124,7 @@
        }
 }
 
-void eb_yahoo_set_away(eb_local_account * ela, gchar * message)
+static void eb_yahoo_set_away(eb_local_account * ela, gchar * message)
 {
        eb_yahoo_local_account_data *ylad;
 
@@ -2184,7 +2186,7 @@
        }
 }
 
-void eb_yahoo_get_info(eb_local_account * reciever, eb_account * sender)
+static void eb_yahoo_get_info(eb_local_account * reciever, eb_account * sender)
 {
        char buff[1024];
 
@@ -2194,22 +2196,26 @@
 }
 
 
-void eb_yahoo_read_prefs_config(GList * values)
+static void eb_yahoo_read_prefs_config(GList * values)
 {
 }
 
-GList *eb_yahoo_write_prefs_config()
+static GList *eb_yahoo_write_prefs_config()
 {
        return NULL;
 }
 
-input_list * eb_yahoo_get_prefs()
+static input_list * eb_yahoo_get_prefs()
 {
        return NULL;
 }
 
-gboolean eb_yahoo_is_suitable(eb_local_account *ela, eb_account *ea)
+static gboolean eb_yahoo_is_suitable(eb_local_account *ela, eb_account *ea)
 {
+       /* in yahoo you can message anyone */
+       return TRUE;
+
+       /*
        eb_yahoo_local_account_data *ylad;
        const YList * buddy;
 
@@ -2222,9 +2228,10 @@
        }
        
        return FALSE;
+       */
 }
 
-int ext_yahoo_connect(char *host, int port)
+static int ext_yahoo_connect(char *host, int port)
 {
        struct sockaddr_in serv_addr;
        static struct hostent *server;
@@ -2291,7 +2298,7 @@
        int tag;
 } eb_yahoo_callback_data;
 
-void eb_yahoo_callback(gpointer data, gint source, eb_input_condition 
condition)
+static void eb_yahoo_callback(gpointer data, gint source, eb_input_condition 
condition)
 {
        eb_yahoo_callback_data *d = data;
        int ret=1;
@@ -2332,9 +2339,9 @@
                do_error_dialog(buff, _("Yahoo Error"));
 }
 
-YList * handlers = NULL;
+static YList * handlers = NULL;
 
-void ext_yahoo_add_handler(int id, int fd, yahoo_input_condition cond)
+static void ext_yahoo_add_handler(int id, int fd, yahoo_input_condition cond)
 {
        eb_yahoo_callback_data *d = g_new0(eb_yahoo_callback_data, 1);
        d->id = id;
@@ -2344,7 +2351,7 @@
        handlers = y_list_append(handlers, d);
 }
 
-void ext_yahoo_remove_handler(int id, int fd)
+static void ext_yahoo_remove_handler(int id, int fd)
 {
        YList * l;
        for(l = handlers; l; l = l->next)
@@ -2521,72 +2528,72 @@
 
 struct service_callbacks *query_callbacks()
 {
-       struct service_callbacks *sc;
+       static struct service_callbacks sc;
 
        LOG(("yahoo_query_callbacks"));
-       sc = g_new0(struct service_callbacks, 1);
 
-       sc->query_connected             = eb_yahoo_query_connected;
-       sc->login                       = eb_yahoo_login;
-       sc->logout                      = eb_yahoo_logout;
-
-       sc->send_im                     = eb_yahoo_send_im;
-       sc->send_typing                 = eb_yahoo_send_typing;
-       sc->send_cr_typing              = eb_yahoo_send_cr_typing;
-
-       sc->read_local_account_config   = eb_yahoo_read_local_account_config;
-       sc->write_local_config          = eb_yahoo_write_local_config;
-       sc->read_account_config         = eb_yahoo_read_account_config;
-
-       sc->get_states                  = eb_yahoo_get_states;
-       sc->get_current_state           = eb_yahoo_get_current_state;
-       sc->set_current_state           = eb_yahoo_set_current_state;
-       sc->check_login                 = eb_yahoo_check_login;
+       sc.query_connected              = eb_yahoo_query_connected;
+       sc.login                        = eb_yahoo_login;
+       sc.logout                       = eb_yahoo_logout;
+
+       sc.send_im                      = eb_yahoo_send_im;
+       sc.send_typing                  = eb_yahoo_send_typing;
+       sc.send_cr_typing               = eb_yahoo_send_cr_typing;
+
+       sc.read_local_account_config    = eb_yahoo_read_local_account_config;
+       sc.write_local_config           = eb_yahoo_write_local_config;
+       sc.read_account_config          = eb_yahoo_read_account_config;
+
+       sc.get_states                   = eb_yahoo_get_states;
+       sc.get_current_state            = eb_yahoo_get_current_state;
+       sc.set_current_state            = eb_yahoo_set_current_state;
+       sc.check_login                  = eb_yahoo_check_login;
        
-       sc->add_user                    = eb_yahoo_add_user;
-       sc->del_user                    = eb_yahoo_del_user;
-       sc->ignore_user                 = NULL;
-       sc->unignore_user               = NULL;
-       sc->change_group                = eb_yahoo_change_group;
-       sc->rename_group                = eb_yahoo_rename_group;
-       sc->del_group                   = NULL;
+       sc.add_user                     = eb_yahoo_add_user;
+       sc.del_user                     = eb_yahoo_del_user;
+       sc.ignore_user                  = eb_yahoo_ignore_user;
+       sc.unignore_user                = eb_yahoo_unignore_user;
+       sc.change_group                 = eb_yahoo_change_group;
+       sc.rename_group                 = eb_yahoo_rename_group;
+       sc.del_group                    = NULL;
 
-       sc->is_suitable                 = NULL;
-       sc->new_account                 = eb_yahoo_new_account;
+       sc.is_suitable                  = eb_yahoo_is_suitable;
+       sc.new_account                  = eb_yahoo_new_account;
 
-       sc->get_status_string           = eb_yahoo_get_status_string;
-       sc->get_status_pixmap           = eb_yahoo_get_status_pixmap;
+       sc.get_status_string            = eb_yahoo_get_status_string;
+       sc.get_status_pixmap            = eb_yahoo_get_status_pixmap;
 
-       sc->set_idle                    = eb_yahoo_set_idle;
-       sc->set_away                    = eb_yahoo_set_away;
+       sc.set_idle                     = eb_yahoo_set_idle;
+       sc.set_away                     = eb_yahoo_set_away;
 
-       sc->send_chat_room_message      = eb_yahoo_send_chat_room_message;
+       sc.send_chat_room_message       = eb_yahoo_send_chat_room_message;
 
-       sc->join_chat_room              = eb_yahoo_join_chat_room;
-       sc->leave_chat_room             = eb_yahoo_leave_chat_room;
+       sc.join_chat_room               = eb_yahoo_join_chat_room;
+       sc.leave_chat_room              = eb_yahoo_leave_chat_room;
 
-       sc->make_chat_room              = eb_yahoo_make_chat_room;
+       sc.make_chat_room               = eb_yahoo_make_chat_room;
 
-       sc->send_invite                 = eb_yahoo_send_invite;
-       sc->accept_invite               = eb_yahoo_accept_invite;
-       sc->decline_invite              = eb_yahoo_decline_invite;
+       sc.send_invite                  = eb_yahoo_send_invite;
+       sc.accept_invite                = eb_yahoo_accept_invite;
+       sc.decline_invite               = eb_yahoo_decline_invite;
 
-       sc->send_file                   = eb_yahoo_send_file;
+       sc.send_file                    = eb_yahoo_send_file;
 
-       sc->terminate_chat              = NULL;
+       sc.terminate_chat               = NULL;
 
-       sc->get_info                    = eb_yahoo_get_info;
-       sc->get_prefs                   = eb_yahoo_get_prefs;
-       sc->read_prefs_config           = eb_yahoo_read_prefs_config;
-       sc->write_prefs_config          = eb_yahoo_write_prefs_config;
+       sc.get_info                     = eb_yahoo_get_info;
+       sc.get_prefs                    = eb_yahoo_get_prefs;
+       sc.read_prefs_config            = eb_yahoo_read_prefs_config;
+       sc.write_prefs_config           = eb_yahoo_write_prefs_config;
 
-       sc->add_importers               = NULL;
+       sc.add_importers                = NULL;
 
-       sc->get_color                   = eb_yahoo_get_color;
-       sc->get_smileys                 = eb_yahoo_get_smileys;
+       sc.get_color                    = eb_yahoo_get_color;
+       sc.get_smileys                  = eb_yahoo_get_smileys;
 
-       return sc;
+       return &sc;
 }
+
 static void register_callbacks()
 {
 #ifdef USE_STRUCT_CALLBACKS
@@ -2595,6 +2602,7 @@
        yc.ext_yahoo_login_response = ext_yahoo_login_response;
        yc.ext_yahoo_got_buddies = ext_yahoo_got_buddies;
        yc.ext_yahoo_got_ignore = ext_yahoo_got_ignore;
+       yc.ext_yahoo_got_identities = ext_yahoo_got_identities;
        yc.ext_yahoo_status_changed = ext_yahoo_status_changed;
        yc.ext_yahoo_got_im = ext_yahoo_got_im;
        yc.ext_yahoo_got_conf_invite = ext_yahoo_got_conf_invite;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]