ayttm-commits
[Top][All Lists]
Advanced

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

[Ayttm-commits] CVS: ayttm/modules/irc irc.c,1.2,1.3


From: Philip S Tellis <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/modules/irc irc.c,1.2,1.3
Date: Thu, 16 Jan 2003 04:51:05 -0500

Update of /cvsroot/ayttm/ayttm/modules/irc
In directory subversions:/tmp/cvs-serv15316/modules/irc

Modified Files:
        irc.c 
Log Message:
changed code almost everywhere.  removed gtk dependencies in some places, 
changed gdk_input_* to eb_input_*, etc... see the ChangeLog.

Index: irc.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/irc/irc.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- irc.c       14 Jan 2003 22:17:25 -0000      1.2
+++ irc.c       16 Jan 2003 09:51:03 -0000      1.3
@@ -46,7 +46,7 @@
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
-#include "globals.h"
+#include "gtk_globals.h"
 #include "service.h"
 #include "util.h"
 #include "value_pair.h"
@@ -66,9 +66,9 @@
 #define usleep(a) Sleep(a)
 #endif
 
-/*************************************************************************************
+/*******************************************************************************
  *                             Begin Module Code
- 
************************************************************************************/
+ 
******************************************************************************/
 /*  Module defines */
 #define plugin_info irc_LTX_plugin_info
 #define SERVICE_INFO irc_LTX_SERVICE_INFO
@@ -110,9 +110,9 @@
        return(ref_count);
 }
 
-/*************************************************************************************
+/*******************************************************************************
  *                             End Module Code
- 
************************************************************************************/
+ 
******************************************************************************/
 
 
 /* RFC1459 and RFC2812 defines max message size
@@ -188,7 +188,7 @@
              gboolean irc_query_connected (eb_account * account);
           static void irc_parse_incoming_message (eb_local_account * ela, 
gchar *buff);
           static void irc_parse (eb_local_account * ela, gchar *buff);
-                 void irc_callback (gpointer data, gint source, 
GdkInputCondition condition);
+                 void irc_callback (void *data, int source, eb_input_condition 
condition);
           static void irc_ask_after_users ( eb_local_account * account );
           static gint irc_keep_alive( gpointer data );
                  void irc_login( eb_local_account * account);
@@ -958,7 +958,7 @@
        return;
 }
 
-void irc_callback (gpointer data, gint source, GdkInputCondition condition)
+void irc_callback (void *data, int source, eb_input_condition condition)
 {
        eb_local_account * ela = (eb_local_account *) data;
        irc_local_account * ila = (irc_local_account *) 
ela->protocol_local_account_data;
@@ -991,8 +991,8 @@
                                fprintf(stderr, "IRC: Connection closed by 
%s\n", ila->server);
                                
                                ela->connected = 0;
-                               if (ila->fd_tag)        
gdk_input_remove(ila->fd_tag);
-                               if (ila->keepalive_tag) 
gtk_timeout_remove(ila->keepalive_tag);
+                               if (ila->fd_tag)        
eb_input_remove(ila->fd_tag);
+                               if (ila->keepalive_tag) 
eb_timeout_remove(ila->keepalive_tag);
                                ila->fd = 0;
                                ila->fd_tag = 0;
                                ila->keepalive_tag = 0;
@@ -1152,7 +1152,7 @@
 
        /* Set up callbacks and timeouts */
 
-       ila->fd_tag = gdk_input_add(ila->fd, GDK_INPUT_READ, irc_callback, 
account);
+       ila->fd_tag = eb_input_add(ila->fd, EB_INPUT_READ, irc_callback, 
account);
 
        /* Log in */
        g_snprintf(buff, BUF_LEN, "NICK %s\nUSER %s 0 * :Everybuddy user\n", 
nick, nick);
@@ -1164,7 +1164,7 @@
        if (ret == -1) { irc_logout(account); return; }
        
        /* No use adding this one before we're in anyway */
-       ila->keepalive_tag = gtk_timeout_add((guint32)60000, irc_keep_alive, 
(gpointer)account );
+       ila->keepalive_tag = eb_timeout_add((guint32)60000, irc_keep_alive, 
(gpointer)account );
 
        /* Claim us to be online */
        account->connected = TRUE;
@@ -1197,8 +1197,8 @@
        irc_account *ia = NULL;
 
        ela->connected = 0;
-       gdk_input_remove(ila->fd_tag);
-       gtk_timeout_remove(ila->keepalive_tag);
+       eb_input_remove(ila->fd_tag);
+       eb_timeout_remove(ila->keepalive_tag);
 
        /* Log off in a nice way */
        g_snprintf(buff, BUF_LEN, "QUIT :Everybuddy logging off\n");





reply via email to

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