ayttm-commits
[Top][All Lists]
Advanced

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

[Ayttm-commits] CVS: ayttm/modules/aim-toc aim-toc.c,1.9,1.10


From: Andy Maloney <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/modules/aim-toc aim-toc.c,1.9,1.10
Date: Fri, 24 Jan 2003 06:44:09 -0500

Update of /cvsroot/ayttm/ayttm/modules/aim-toc
In directory subversions:/tmp/cvs-serv28701/modules/aim-toc

Modified Files:
        aim-toc.c 
Log Message:
Yet more include cleanups and addition of statics
Changed name of clear_info_window() to eb_info_window_clear() for consistency


Index: aim-toc.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/aim-toc/aim-toc.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- aim-toc.c   23 Jan 2003 06:34:25 -0000      1.9
+++ aim-toc.c   24 Jan 2003 11:44:04 -0000      1.10
@@ -26,13 +26,15 @@
 #ifdef __MINGW32__
 #define __IN_PLUGIN__ 1
 #endif
+
 #include "intl.h"
-#include <gtk/gtk.h>
+
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
 #include <time.h>
+
 #if defined( _WIN32 ) && !defined(__MINGW32__)
 #include "../libtoc/libtoc.h"
 typedef unsigned long u_long;
@@ -41,8 +43,6 @@
 #include "libtoc/libtoc.h"
 #endif
 #include "aim.h"
-#include "service.h"
-#include "chat_window.h"
 #include "away_window.h"
 #include "util.h"
 #include "status.h"
@@ -50,14 +50,11 @@
 #include "dialog.h"
 #include "progress_window.h"
 #include "message_parse.h"
-#include "chat_room.h"
 #include "value_pair.h"
 #include "info_window.h"
 #include "gtk_eb_html.h"
-#include "input_list.h"
 #include "plugin_api.h"
 #include "smileys.h"
-#include "account.h"
 
 #include "pixmaps/aim_online.xpm"
 #include "pixmaps/aim_away.xpm"
@@ -75,8 +72,8 @@
 #define plugin_finish aim_toc_LTX_plugin_finish
 
 /* Function Prototypes */
-int plugin_init();
-int plugin_finish();
+static int plugin_init();
+static int plugin_finish();
 
 static int ref_count = 0;
 static char aim_server[MAX_PREF_LEN] = "toc.oscar.aol.com";
@@ -98,7 +95,7 @@
 
 static char *eb_toc_get_color(void) { static char color[]="#000088"; return 
color; }
 
-int plugin_init()
+static int plugin_init()
 {
        input_list * il = g_new0(input_list, 1);
        eb_debug(DBG_MOD, "aim-toc\n");
@@ -134,7 +131,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);
@@ -183,14 +180,16 @@
 
 static GList * aim_buddies;
 
+/*     There are no prefs for AIM-TOC at the moment.
 static input_list * aim_prefs = NULL;
+*/
 
-eb_account * eb_aim_new_account( gchar * account );
-void eb_aim_add_user( eb_account * account );
-void eb_aim_login( eb_local_account * account );
-void eb_aim_logout( eb_local_account * account );
-void aim_info_data_cleanup(info_window * iw);
-void aim_info_update(info_window * iw);
+static eb_account * eb_aim_new_account( gchar * account );
+static void eb_aim_add_user( eb_account * account );
+static void eb_aim_login( eb_local_account * account );
+static void eb_aim_logout( eb_local_account * account );
+static void aim_info_data_cleanup(info_window * iw);
+static void aim_info_update(info_window * iw);
 
 
 /*********
@@ -198,7 +197,7 @@
  * don't let the corresponding set_current_state get called again
  */
 
-char * eb_aim_check_login(char * user, char * pass)
+static char * eb_aim_check_login(char * user, char * pass)
 {
        return NULL;
 }
@@ -206,7 +205,7 @@
 
 static int is_setting_state = 0;
 
-eb_local_account * aim_find_local_account_by_conn(toc_conn * conn)
+static eb_local_account * aim_find_local_account_by_conn(toc_conn * conn)
 {
        GList * node;
        for( node = accounts; node; node = node->next )
@@ -234,7 +233,7 @@
        write_account_list();
 }
 
-void aim_set_profile_window(ebmCallbackData *data)
+static void aim_set_profile_window(ebmCallbackData *data)
 {
        eb_local_account * account = NULL;
        struct eb_aim_local_account_data * alad;
@@ -254,7 +253,7 @@
        do_text_input_window(buff, alad->aim_info, aim_set_profile_callback, 
account); 
 }
 
-void eb_aim_disconnect( toc_conn * conn )
+static void eb_aim_disconnect( toc_conn * conn )
 {
        eb_local_account * ela = conn->account;
        eb_debug(DBG_TOC, "eb_aim_disconnect %d %d\n", conn->fd, conn->seq_num);
@@ -266,7 +265,7 @@
                g_warning("NULL account associated with AIM connection");
 }
 
-void eb_aim_join_ack(toc_conn * conn, gchar * id, gchar * name)
+static void eb_aim_join_ack(toc_conn * conn, gchar * id, gchar * name)
 {
        eb_chat_room * ecr = find_chat_room_by_name(name, 
SERVICE_INFO.protocol_id);
 
@@ -282,7 +281,7 @@
        eb_join_chat_room(ecr);
 }
 
-void eb_aim_chat_update_buddy(toc_conn * conn, gchar * id, 
+static void eb_aim_chat_update_buddy(toc_conn * conn, gchar * id, 
                                      gchar * user, gboolean online )
 {
        eb_chat_room * ecr = find_chat_room_by_id(id);
@@ -311,7 +310,7 @@
 
 /*the callback to call all callbacks :P */
 
-void eb_aim_callback(void *data, int source, eb_input_condition condition )
+static void eb_aim_callback(void *data, int source, eb_input_condition 
condition )
 {
        struct eb_aim_local_account_data * alad = data;
        toc_conn * conn = alad->conn;
@@ -372,7 +371,7 @@
 }
 
 
-void eb_aim_chat_invite(toc_conn * conn, gchar * id, gchar * name,
+static void eb_aim_chat_invite(toc_conn * conn, gchar * id, gchar * name,
                                gchar * sender, gchar * message )
 {
        eb_chat_room * chat_room = g_new0(eb_chat_room, 1);
@@ -391,12 +390,12 @@
 }
 
 
-void eb_aim_error_message( char * message )
+static void eb_aim_error_message( char * message )
 {
        do_message_dialog(message, _("AIM Error"), 0);
 }
        
-void eb_aim_oncoming_buddy(gchar * user, gboolean online, time_t idle, gint 
evil, gboolean unavailable )
+static void eb_aim_oncoming_buddy(gchar * user, gboolean online, time_t idle, 
gint evil, gboolean unavailable )
 {
        eb_account * ea = find_account_by_handle( user, 
SERVICE_INFO.protocol_id);
        struct eb_aim_account_data * aad ;
@@ -434,7 +433,7 @@
 
 /* This is how we deal with incomming chat room messages */
 
-void eb_aim_toc_chat_im_in( toc_conn * conn, gchar * id, gchar * user, gchar * 
message )
+static void eb_aim_toc_chat_im_in( toc_conn * conn, gchar * id, gchar * user, 
gchar * message )
 {
        eb_chat_room * ecr = find_chat_room_by_id( id );
        eb_account * ea = find_account_by_handle(user, 
SERVICE_INFO.protocol_id);
@@ -458,7 +457,7 @@
        g_free(message2);
 }
 
-void eb_aim_user_info(toc_conn * conn, gchar * user, gchar * message )
+static void eb_aim_user_info(toc_conn * conn, gchar * user, gchar * message )
 {
        eb_local_account * ela =  aim_find_local_account_by_conn(conn);
        eb_account * sender = NULL;
@@ -492,7 +491,7 @@
        aim_info_update(sender->infowindow);
 }
 
-void eb_aim_new_user(char * group, char * handle)
+static void eb_aim_new_user(char * group, char * handle)
 {
        eb_account * ea = find_account_by_handle( handle, 
SERVICE_INFO.protocol_id );
 
@@ -535,7 +534,7 @@
 
        
 
-void eb_aim_parse_incoming_im(toc_conn * conn, gchar * user, gchar * message )
+static void eb_aim_parse_incoming_im(toc_conn * conn, gchar * user, gchar * 
message )
 {
            //time_t  t = 0;
                eb_local_account * ela = aim_find_local_account_by_conn(conn);
@@ -578,7 +577,7 @@
 
 
 /*   callbacks used by EveryBuddy    */
-gboolean eb_aim_query_connected(eb_account * account)
+static gboolean eb_aim_query_connected(eb_account * account)
 {              
        struct eb_aim_account_data * aad = account->protocol_account_data;
 
@@ -587,7 +586,7 @@
        return aad->status != AIM_OFFLINE;
 }
 
-void eb_aim_accept_invite( eb_local_account * account, void * invitation )
+static void eb_aim_accept_invite( eb_local_account * account, void * 
invitation )
 {
        gchar * id = invitation;
        eb_chat_room * chat_room = find_chat_room_by_id( id );
@@ -602,14 +601,14 @@
        free(id);
 }
 
-void eb_aim_decline_invite( eb_local_account * account, void * invitation )
+static void eb_aim_decline_invite( eb_local_account * account, void * 
invitation )
 {
        char * id = invitation;
        free( id );
 }
 
 
-void eb_aim_send_chat_room_message( eb_chat_room * room, gchar * message )
+static void eb_aim_send_chat_room_message( eb_chat_room * room, gchar * 
message )
 {
        struct eb_aim_local_account_data * alad = 
room->chat_room_account->protocol_local_account_data;
        toc_conn * conn = alad->conn;
@@ -619,21 +618,21 @@
        g_free(message2);
 }
 
-void eb_aim_join_chat_room( eb_chat_room * room )
+static void eb_aim_join_chat_room( eb_chat_room * room )
 {
        struct eb_aim_local_account_data * alad = 
room->chat_room_account->protocol_local_account_data;
        toc_conn * conn = alad->conn;
        toc_chat_join(conn, room->room_name);
 }
 
-void eb_aim_leave_chat_room( eb_chat_room * room )
+static void eb_aim_leave_chat_room( eb_chat_room * room )
 {
        struct eb_aim_local_account_data * alad = 
room->chat_room_account->protocol_local_account_data;
        toc_conn * conn = alad->conn;
        toc_chat_leave(conn, room->id);
 }
 
-eb_chat_room * eb_aim_make_chat_room(gchar * name, eb_local_account * account )
+static eb_chat_room * eb_aim_make_chat_room(gchar * name, eb_local_account * 
account )
 {
        eb_chat_room * ecr = g_new0(eb_chat_room, 1);
 
@@ -647,7 +646,7 @@
        return ecr;
 }
 
-eb_account * eb_aim_new_account( gchar * account )
+static eb_account * eb_aim_new_account( gchar * account )
 {
        eb_account * a = g_new0(eb_account, 1);
        struct eb_aim_account_data * aad = g_new0(struct eb_aim_account_data, 
1);
@@ -660,7 +659,7 @@
        return a;
 }
 
-void eb_aim_del_user( eb_account * account )
+static void eb_aim_del_user( eb_account * account )
 {
        GList * node;
        assert( eb_services[account->service_id].protocol_id == 
SERVICE_INFO.protocol_id );
@@ -676,7 +675,7 @@
        }
 }
 
-void eb_aim_add_user( eb_account * account )
+static void eb_aim_add_user( eb_account * account )
 {
        GList * node;
 
@@ -697,7 +696,7 @@
 }
 
 
-void eb_aim_login( eb_local_account * account )
+static void eb_aim_login( eb_local_account * account )
 {
        struct eb_aim_local_account_data * alad;
 
@@ -750,7 +749,7 @@
                                                                  
 }
 
-void eb_aim_send_invite( eb_local_account * account, eb_chat_room * room,
+static void eb_aim_send_invite( eb_local_account * account, eb_chat_room * 
room,
                                                 char * user, char * message)
 {
        struct eb_aim_local_account_data * alad;
@@ -759,7 +758,7 @@
 }
        
 
-void eb_aim_logout( eb_local_account * account )
+static void eb_aim_logout( eb_local_account * account )
 {
        GList *l;
        struct eb_aim_local_account_data * alad;
@@ -819,7 +818,7 @@
 
 }
 
-void eb_aim_send_im( eb_local_account * account_from,
+static void eb_aim_send_im( eb_local_account * account_from,
                                  eb_account * account_to,
                                  gchar * message )
 {
@@ -837,7 +836,7 @@
        g_free(message2);
 }
                
-eb_local_account * eb_aim_read_local_config(GList * pairs)
+static eb_local_account * eb_aim_read_local_config(GList * pairs)
 {
 
        eb_local_account * ela = g_new0(eb_local_account, 1);
@@ -870,7 +869,7 @@
     return ela;
 }
 
-GList * eb_aim_write_local_config( eb_local_account * account )
+static GList * eb_aim_write_local_config( eb_local_account * account )
 {
        GList * list = NULL;
        struct eb_aim_local_account_data * alad = 
account->protocol_local_account_data; 
@@ -885,7 +884,7 @@
 
        
 
-eb_account * eb_aim_read_config( GList * config, struct contact *contact )
+static eb_account * eb_aim_read_config( GList * config, struct contact 
*contact )
 {
     eb_account * ea = g_new0(eb_account, 1 );
     struct eb_aim_account_data * aad =  g_new0(struct eb_aim_account_data,1);
@@ -910,7 +909,7 @@
     return ea;
 }
 
-GList * eb_aim_get_states()
+static GList * eb_aim_get_states()
 {
        GList * states = NULL;
        states = g_list_append(states, "Online");
@@ -920,7 +919,7 @@
        return states;
 }
 
-gint eb_aim_get_current_state(eb_local_account * account )
+static gint eb_aim_get_current_state(eb_local_account * account )
 {
        struct eb_aim_local_account_data * alad;
        alad = (struct eb_aim_local_account_data 
*)account->protocol_local_account_data;
@@ -930,7 +929,7 @@
        return alad->status;
 }
 
-void eb_aim_set_current_state( eb_local_account * account, gint state )
+static void eb_aim_set_current_state( eb_local_account * account, gint state )
 {
        struct eb_aim_local_account_data * alad;
        alad = (struct eb_aim_local_account_data 
*)account->protocol_local_account_data;
@@ -975,7 +974,7 @@
 
 }
 
-void eb_aim_set_away(eb_local_account * account, gchar * message)
+static void eb_aim_set_away(eb_local_account * account, gchar * message)
 {
        struct eb_aim_local_account_data * alad;
        alad = (struct eb_aim_local_account_data 
*)account->protocol_local_account_data;
@@ -1012,7 +1011,7 @@
 static GdkPixmap * eb_aim_pixmap[AIM_OFFLINE+1];
 static GdkBitmap * eb_aim_bitmap[AIM_OFFLINE+1];
 
-void eb_aim_init_pixmaps()
+static void eb_aim_init_pixmaps()
 {
        gint i;
        gchar ** xpm;
@@ -1035,7 +1034,7 @@
        pixmaps = 1;
 }
 
-void eb_aim_get_status_pixmap( eb_account * account, GdkPixmap ** pm, 
GdkBitmap ** bm )
+static void eb_aim_get_status_pixmap( eb_account * account, GdkPixmap ** pm, 
GdkBitmap ** bm )
 {
        struct eb_aim_account_data * aad;
        
@@ -1048,7 +1047,7 @@
        *bm = eb_aim_bitmap[aad->status];
 }
 
-gchar * eb_aim_get_status_string( eb_account * account )
+static gchar * eb_aim_get_status_string( eb_account * account )
 {
        static gchar string[255], buf[255];
        struct eb_aim_account_data * aad = account->protocol_account_data;
@@ -1087,7 +1086,7 @@
        return string;
 }
 
-void eb_aim_set_idle( eb_local_account * ela, gint idle )
+static void eb_aim_set_idle( eb_local_account * ela, gint idle )
 {
        struct eb_aim_local_account_data * alad;
        alad = (struct eb_aim_local_account_data 
*)ela->protocol_local_account_data;
@@ -1095,7 +1094,7 @@
        toc_set_idle( alad->conn, idle );
 }
 
-void eb_aim_get_info( eb_local_account * from, eb_account * account_to )
+static void eb_aim_get_info( eb_local_account * from, eb_account * account_to )
 {
        struct eb_aim_local_account_data * alad;
        alad = (struct eb_aim_local_account_data 
*)from->protocol_local_account_data;
@@ -1103,24 +1102,27 @@
        toc_get_info( alad->conn, account_to->handle );
 }
 
-void aim_info_update(info_window * iw)
+static void aim_info_update(info_window * iw)
 {
        char * data = (char *)iw->info_data;
-       clear_info_window(iw);
+       eb_info_window_clear(iw);
        gtk_eb_html_add(EXT_GTK_TEXT(iw->info), data,1,1,0);
        
gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(iw->scrollwindow)),0);
 }
 
-void aim_info_data_cleanup(info_window * iw)
+static void aim_info_data_cleanup(info_window * iw)
 {
 }
 
-input_list * eb_aim_get_prefs()
+/*     There are no prefs for AIM-TOC at the moment.
+
+static input_list * eb_aim_get_prefs()
 {
        return aim_prefs;
 }
+*/
 
-void eb_aim_read_prefs_config(GList * values)
+static void eb_aim_read_prefs_config(GList * values)
 {
        char * c;
        c = value_pair_get_value(values, "server");
@@ -1140,7 +1142,7 @@
        }
 }
 
-GList * eb_aim_write_prefs_config()
+static GList * eb_aim_write_prefs_config()
 {
        GList * config = NULL;
        char buffer[5];
@@ -1205,10 +1207,8 @@
        sc->read_prefs_config = eb_aim_read_prefs_config;
        sc->write_prefs_config = eb_aim_write_prefs_config;
 
-        sc->get_color = eb_toc_get_color;
-        sc->get_smileys = eb_default_smileys;
-
+       sc->get_color = eb_toc_get_color;
+       sc->get_smileys = eb_default_smileys;
        
        return sc;
 }
-               





reply via email to

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