[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/modules/jabber jabber.c,1.3,1.4
From: |
Andy Maloney <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/modules/jabber jabber.c,1.3,1.4 |
Date: |
Fri, 24 Jan 2003 06:44:09 -0500 |
Update of /cvsroot/ayttm/ayttm/modules/jabber
In directory subversions:/tmp/cvs-serv28701/modules/jabber
Modified Files:
jabber.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: jabber.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/jabber/jabber.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- jabber.c 16 Jan 2003 09:51:03 -0000 1.3
+++ jabber.c 24 Jan 2003 11:44:05 -0000 1.4
@@ -1,5 +1,5 @@
/*
- * Jabber Extension for everybuddy
+ * Jabber Extension for yattm
*
* Copyright (C) 2000, Alex Wheeler <address@hidden>
*
@@ -24,13 +24,13 @@
*/
#define DEBUG
+
#ifdef __MINGW32__
#define __IN_PLUGIN__
#endif
+
#include "intl.h"
-#include<stdio.h>
-#include<stdlib.h>
-#include<string.h>
+
#undef MIN
#undef MAX
#if defined( _WIN32 ) && !defined(__MINGW32__)
@@ -40,19 +40,14 @@
#else
#include "libEBjabber.h"
#endif
-#include "jabber/jabber.h"
-#include "contact.h"
-#include "account.h"
+
#include "service.h"
-#include "chat_window.h"
#include "info_window.h"
#include "util.h"
#include "status.h"
#include "dialog.h"
#include "message_parse.h"
-#include "chat_room.h"
#include "value_pair.h"
-#include "input_list.h"
#include "plugin_api.h"
#include "smileys.h"
#include "gtk_globals.h"
@@ -70,13 +65,13 @@
#define plugin_finish jabber_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 jabber_server[MAX_PREF_LEN] = "jabber.com";
static char jabber_port[MAX_PREF_LEN] = "5222";
-int do_jabber_debug=0;
+static int do_jabber_debug=0;
/* Module Exports */
PLUGIN_INFO plugin_info = {
@@ -95,7 +90,7 @@
static char *eb_jabber_get_color(void) { static char color[]="#88aa00"; return
color; }
-int plugin_init()
+static int plugin_init()
{
input_list * il = g_new0(input_list, 1);
eb_debug(DBG_MOD, "Jabber\n");
@@ -122,7 +117,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);
@@ -132,14 +127,15 @@
* End Module Code
************************************************************************************/
-GList *jabber_contacts = NULL;
+static GList *jabber_contacts = NULL;
static char * jabber_status_strings[] =
{ "", "(Away)", "(Do Not Disturb)", "(Extended Away)", "(Chat)", "(Offline)"};
+/* There are no prefs for Jabber at the moment.
static input_list * jabber_prefs = NULL;
-
+*/
/* Use this struct to hold any service specific information you need
* about people on your contact list
@@ -171,23 +167,24 @@
} eb_jabber_local_account_data;
static eb_local_account *jabber_local_account;
-void eb_jabber_terminate_chat( eb_account * account );
-void eb_jabber_add_user( eb_account * account );
-void eb_jabber_del_user( eb_account * account );
-void eb_jabber_login( eb_local_account * account );
-void eb_jabber_logout( eb_local_account * account );
-void jabber_info_update(eb_account *account);
-void jabber_info_data_cleanup(info_window *iw);
-static void jabber_dialog_callback( gpointer data, int result );
-static void jabber_list_dialog_callback( char * text, gpointer data );
-void JABBERInstantMessage(void *data);
-void JABBERStatusChange(void *data);
-void JABBERDialog(void *data);
-void JABBERListDialog(char **list, void *data);
-void JABBERLogout(void *data);
-void JABBERError(char* title, char *message);
+static void eb_jabber_terminate_chat( eb_account * account );
+static void eb_jabber_add_user( eb_account * account );
+static void eb_jabber_del_user( eb_account * account );
+static void eb_jabber_login( eb_local_account * account );
+static void eb_jabber_logout( eb_local_account * account );
+static void jabber_info_update(eb_account *account);
+static void jabber_info_data_cleanup(info_window *iw);
static int is_setting_state = 0;
+#if 0
+static void jabber_dialog_callback( gpointer data, int result );
+static void jabber_list_dialog_callback( char * text, gpointer data );
+static void JABBERInstantMessage(void *data);
+static void JABBERStatusChange(void *data);
+static void JABBERDialog(void *data);
+static void JABBERListDialog(char **list, void *data);
+static void JABBERLogout(void *data);
+static void JABBERError(char* title, char *message);
static void jabber_dialog_callback( gpointer data, int response )
{
@@ -220,9 +217,9 @@
free(jd);
eb_debug(DBG_JBR, "<");
}
+#endif
-
-gboolean eb_jabber_query_connected( eb_account * account )
+static gboolean eb_jabber_query_connected( eb_account * account )
{
eb_jabber_account_data * jad = account->protocol_account_data;
@@ -234,7 +231,7 @@
}
-void eb_jabber_login( eb_local_account * account )
+static void eb_jabber_login( eb_local_account * account )
{
eb_jabber_local_account_data * jlad;
@@ -267,7 +264,7 @@
eb_debug(DBG_JBR, "<\n");
}
-void eb_jabber_logout( eb_local_account * account )
+static void eb_jabber_logout( eb_local_account * account )
{
eb_jabber_local_account_data * jlad;
eb_jabber_account_data *jad;
@@ -298,7 +295,7 @@
eb_debug(DBG_JBR, "<\n");
}
-void eb_jabber_send_im( eb_local_account * from, eb_account * account_to,
+static void eb_jabber_send_im( eb_local_account * from, eb_account *
account_to,
gchar * message)
{
eb_jabber_account_data * jad = account_to->protocol_account_data;
@@ -306,7 +303,7 @@
JABBER_SendMessage(jad->JConn, account_to->handle, message);
}
-eb_local_account * eb_jabber_read_local_account_config( GList * values )
+static eb_local_account * eb_jabber_read_local_account_config( GList * values )
{
char buff[255];
char * name, *pass;
@@ -342,7 +339,7 @@
return ela;
}
-GList * eb_jabber_write_local_config( eb_local_account * account )
+static GList * eb_jabber_write_local_config( eb_local_account * account )
{
value_pair * val;
GList * vals = NULL;
@@ -361,7 +358,7 @@
return vals;
}
-eb_account * eb_jabber_read_account_config( GList * config, struct contact *
contact)
+static eb_account * eb_jabber_read_account_config( GList * config, struct
contact * contact)
{
eb_account * ea = g_new0(eb_account, 1);
eb_jabber_account_data * jad = g_new0( eb_jabber_account_data, 1 );
@@ -385,7 +382,7 @@
return ea;
}
-GList * eb_jabber_get_states()
+static GList * eb_jabber_get_states()
{
GList * list = NULL;
@@ -401,19 +398,19 @@
return list;
}
-char * eb_jabber_check_login(char * user, char * pass)
+static char * eb_jabber_check_login(char * user, char * pass)
{
return NULL;
}
-gint eb_jabber_get_current_state( eb_local_account * account )
+static gint eb_jabber_get_current_state( eb_local_account * account )
{
eb_jabber_local_account_data * jlad =
account->protocol_local_account_data;
eb_debug(DBG_JBR, "returning: %i\n", jlad->status);
return jlad->status;
}
-void eb_jabber_set_current_state( eb_local_account * account, gint state )
+static void eb_jabber_set_current_state( eb_local_account * account, gint
state )
{
eb_jabber_local_account_data * jlad =
account->protocol_local_account_data;
@@ -440,14 +437,14 @@
eb_debug(DBG_JBR, "<, new state is: %d\n", jlad->status);
}
-void eb_jabber_terminate_chat(eb_account * account )
+static void eb_jabber_terminate_chat(eb_account * account )
{
eb_jabber_account_data *jad=account->protocol_account_data;
JABBER_EndChat(jad->JConn, account->handle);
}
-void eb_jabber_add_user(eb_account * account )
+static void eb_jabber_add_user(eb_account * account )
{
eb_jabber_account_data *jad=account->protocol_account_data;
@@ -455,7 +452,7 @@
JABBER_AddContact(jad->JConn, account->handle);
}
-void eb_jabber_del_user(eb_account * account )
+static void eb_jabber_del_user(eb_account * account )
{
eb_jabber_account_data *jad=account->protocol_account_data;
@@ -465,7 +462,7 @@
account->protocol_account_data=NULL;
}
-eb_account * eb_jabber_new_account( gchar * account )
+static eb_account * eb_jabber_new_account( gchar * account )
{
eb_account * ea = g_new0(eb_account, 1);
eb_jabber_account_data * jad = g_new0( eb_jabber_account_data, 1 );
@@ -482,7 +479,7 @@
static GdkPixmap * eb_jabber_pixmap[JABBER_OFFLINE+1];
static GdkBitmap * eb_jabber_bitmap[JABBER_OFFLINE+1];
-void eb_jabber_init_pixmaps()
+static void eb_jabber_init_pixmaps()
{
gint i;
gchar ** xpm;
@@ -506,7 +503,7 @@
pixmaps = 1;
}
-void eb_jabber_get_status_pixmap( eb_account * account, GdkPixmap ** pm,
GdkBitmap ** bm )
+static void eb_jabber_get_status_pixmap( eb_account * account, GdkPixmap **
pm, GdkBitmap ** bm )
{
eb_jabber_account_data * jad;
@@ -520,13 +517,13 @@
}
-gchar * eb_jabber_get_status_string( eb_account * account )
+static gchar * eb_jabber_get_status_string( eb_account * account )
{
eb_jabber_account_data * jad = account->protocol_account_data;
return jabber_status_strings[jad->status];
}
-void eb_jabber_set_idle( eb_local_account * account, gint idle )
+static void eb_jabber_set_idle( eb_local_account * account, gint idle )
{
if ((idle == 0) && eb_jabber_get_current_state(account) == JABBER_AWAY)
{
@@ -548,7 +545,7 @@
}
-void eb_jabber_set_away( eb_local_account * account, char * message )
+static void eb_jabber_set_away( eb_local_account * account, char * message )
{
if(message)
{
@@ -570,13 +567,13 @@
}
-void eb_jabber_send_chat_room_message( eb_chat_room * room, gchar * message )
+static void eb_jabber_send_chat_room_message( eb_chat_room * room, gchar *
message )
{
eb_jabber_local_account_data *jlad =
room->chat_room_account->protocol_local_account_data;
JABBER_SendChatRoomMessage(jlad->JConn, room->room_name, message,
room->chat_room_account->alias);
}
-void eb_jabber_join_chat_room( eb_chat_room * room )
+static void eb_jabber_join_chat_room( eb_chat_room * room )
{
eb_jabber_local_account_data *jlad =
room->chat_room_account->protocol_local_account_data;
@@ -585,13 +582,13 @@
eb_debug(DBG_JBR, "<\n");
}
-void eb_jabber_leave_chat_room( eb_chat_room * room )
+static void eb_jabber_leave_chat_room( eb_chat_room * room )
{
eb_jabber_local_account_data *jlad =
room->chat_room_account->protocol_local_account_data;
JABBER_LeaveChatRoom(jlad->JConn, room->room_name,
room->chat_room_account->alias);
}
-eb_chat_room * eb_jabber_make_chat_room( gchar * name, eb_local_account *
account )
+static eb_chat_room * eb_jabber_make_chat_room( gchar * name, eb_local_account
* account )
{
eb_chat_room *ecr = g_new0(eb_chat_room, 1);
char *ptr=NULL;
@@ -614,13 +611,13 @@
return ecr;
}
-void eb_jabber_send_invite( eb_local_account * account, eb_chat_room * room,
+static void eb_jabber_send_invite( eb_local_account * account, eb_chat_room *
room,
char * user, char * message )
{
eb_debug(DBG_JBR, "Empty function\n");
}
-void eb_jabber_get_info( eb_local_account * reciever, eb_account * sender)
+static void eb_jabber_get_info( eb_local_account * reciever, eb_account *
sender)
{
gchar buff[1024];
@@ -651,31 +648,34 @@
}
-void jabber_info_update(eb_account *account) {
+static void jabber_info_update(eb_account *account) {
gchar buff[1024];
info_window *iw=account->infowindow;
jabber_info_data * mid = (jabber_info_data *)iw->info_data;
eb_debug(DBG_JBR, "Not implemented yet\n");
- clear_info_window(iw);
+ eb_info_window_clear(iw);
sprintf(buff,"Profile for <B>%s</B><BR><HR>",iw->remote_account->handle);
eb_info_window_add_info(account, buff, 0, 0, 0);
sprintf(buff,"<a href=\"%s\">%s</a>",mid->profile,mid->profile);
eb_info_window_add_info(account, buff, 0, 0, 0);
}
-void jabber_info_data_cleanup(info_window *iw){
+static void jabber_info_data_cleanup(info_window *iw){
jabber_info_data * mid = (jabber_info_data *)iw->info_data;
eb_debug(DBG_JBR, "Entering and leaving\n");
if(mid->profile != NULL) free(mid->profile);
}
-input_list * eb_jabber_get_prefs()
+/* There are no prefs for Jabber at the moment.
+
+static input_list * eb_jabber_get_prefs()
{
return jabber_prefs;
}
+*/
-void eb_jabber_read_prefs_config(GList * values)
+static void eb_jabber_read_prefs_config(GList * values)
{
char * c;
c = value_pair_get_value(values, "server");
@@ -696,7 +696,7 @@
}
}
-GList * eb_jabber_write_prefs_config()
+static GList * eb_jabber_write_prefs_config()
{
GList * config = NULL;
char buffer[5];
@@ -739,19 +739,20 @@
sc->make_chat_room = eb_jabber_make_chat_room;
sc->send_invite = eb_jabber_send_invite;
sc->terminate_chat = eb_jabber_terminate_chat;
- sc->get_info = eb_jabber_get_info;
+ sc->get_info = eb_jabber_get_info;
sc->get_prefs = NULL;
sc->read_prefs_config = eb_jabber_read_prefs_config;
sc->write_prefs_config = eb_jabber_write_prefs_config;
sc->add_importers = NULL;
sc->get_color = eb_jabber_get_color;
- sc->get_smileys = eb_default_smileys;
+ sc->get_smileys = eb_default_smileys;
return sc;
}
-void JABBERChatRoomBuddyStatus(char *id, char *user, int offline)
+#if 0
+static void JABBERChatRoomBuddyStatus(char *id, char *user, int offline)
{
eb_chat_room *ecr=find_chat_room_by_id(id);
@@ -777,7 +778,7 @@
eb_chat_room_buddy_leave(ecr, user);
}
-void JABBERChatRoomMessage(char *id, char *user, char *message)
+static void JABBERChatRoomMessage(char *id, char *user, char *message)
{
eb_chat_room *ecr=find_chat_room_by_id(id);
eb_account *ea=find_account_by_handle(user, SERVICE_INFO.protocol_id);
@@ -801,7 +802,7 @@
}
-void JABBERDelBuddy(void *data)
+static void JABBERDelBuddy(void *data)
{
eb_account *ea;
char *jid=data;
@@ -827,7 +828,7 @@
** Output: none
*/
-void JABBERAddBuddy(void *data)
+static void JABBERAddBuddy(void *data)
{
struct jabber_buddy *jb;
eb_account *ea;
@@ -860,7 +861,7 @@
** Output: none
*/
-void JABBERInstantMessage(void *data)
+static void JABBERInstantMessage(void *data)
{
JABBER_InstantMessage_PTR im;
eb_account *sender = NULL;
@@ -888,7 +889,7 @@
** Output: none
*/
-void JABBERStatusChange(void *data)
+static void JABBERStatusChange(void *data)
{
struct jabber_buddy *jb;
eb_account *ea;
@@ -923,7 +924,7 @@
eb_debug(DBG_JBR, "<\n");
}
-void JABBERListDialog(char **list, void *data)
+static void JABBERListDialog(char **list, void *data)
{
JABBER_Dialog_PTR jd;
@@ -943,7 +944,7 @@
** Output: none
*/
-void JABBERDialog(void *data)
+static void JABBERDialog(void *data)
{
JABBER_Dialog_PTR jd;
@@ -965,7 +966,7 @@
** Output: none
*/
-void JABBERLogout(void *data)
+static void JABBERLogout(void *data)
{
ref_count--;
is_setting_state = 1;
@@ -980,7 +981,8 @@
eb_debug(DBG_JBR, "<\n");
}
-void JABBERError(char* title, char *message)
+static void JABBERError(char* title, char *message)
{
do_error_dialog(title, message);
}
+#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/modules/jabber jabber.c,1.3,1.4,
Andy Maloney <address@hidden> <=