Yattm - unified GTK instant-messaging client logo
   [Generated for version 0.2-17 - Mon Jan 6 19:01:23 GMT+1 2003]

Home - Main Page - Data Structures - File List - Data Fields - Globals

util.h

Go to the documentation of this file.
00001 /*
00002  * Yattm 
00003  *
00004  * Copyright (C) 1999, Torrey Searle <tsearle@uci.edu>
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 
00022 /*
00023  *  util.h
00024  *  generic useful stuff
00025  *
00026  */
00027 
00028 #ifndef __UTIL_H__
00029 #define __UTIL_H__
00030 
00031 #include <glib.h>
00032 #ifndef __MINGW32__
00033 #include <sys/types.h>
00034 #include <unistd.h>
00035 #else
00036 #include <io.h>
00037 #include <process.h>
00038 #endif
00039 #include "contact.h"
00040 #include "service.h"
00041 
00042 #ifdef __cplusplus
00043 extern "C" {
00044 #endif
00045 
00046 #if defined(__MINGW32__) && defined(__IN_PLUGIN__)
00047 __declspec(dllimport) GtkWidget *statuswindow;
00048 #else
00049 extern GtkWidget *statuswindow;
00050 #endif
00051 gint clean_pid(void * dummy);
00052 char * get_local_addresses();
00053 
00054 
00055 #ifdef __cplusplus
00056 }
00057 #endif
00058 
00059 enum
00060 {
00061   TOKEN_NORMAL,
00062   TOKEN_HTTP,
00063   TOKEN_FTP,
00064   TOKEN_EMAIL,
00065   TOKEN_CUSTOM
00066 
00067 };
00068 
00069 #ifdef __cplusplus
00070 extern "C" {
00071 #endif
00072 
00073 gchar * convert_eol (gchar * input);
00074 gchar * linkify( gchar * input );
00075 
00076 char * escape_string(char * input);
00077 char * unescape_string(char * input);
00078 
00079 eb_local_account * find_suitable_local_account( eb_local_account * first,
00080                         gint second );
00081 eb_local_account * find_local_account_for_remote( eb_account *remote, gboolean online );
00082 eb_account * can_offline_message( struct contact * con );
00083 
00084 eb_account * find_suitable_remote_account( eb_account * first,
00085                        struct contact * rest );
00086 eb_account * find_suitable_file_transfer_account( eb_account * first,
00087                           struct contact * rest );
00088 eb_chat_room * find_chat_room_by_id( gchar * id );
00089 eb_chat_room * find_chat_room_by_name( gchar * name, gint service_id );
00090 grouplist * find_grouplist_by_nick(gchar * nick);
00091 grouplist * find_grouplist_by_name(gchar * name);
00092 struct contact * find_contact_by_handle( gchar * handle );
00093 struct contact * find_contact_by_nick( gchar * nick);
00094 struct contact * find_contact_in_group_by_nick( gchar * nick, grouplist *gl );
00095 void refresh_service_contacts(gint type);
00096 eb_account * find_account_by_handle( gchar * handle, gint type );
00097 eb_account * find_account_by_handle_normalized( gchar * handle, gint type );
00098 eb_local_account * find_local_account_by_handle( gchar * handle, gint type );
00099 void strip_html(gchar * text);
00100 void remove_account( eb_account * a );
00101 void remove_contact( struct contact * c );
00102 void remove_group( grouplist * g );
00103 void add_group( gchar * name );
00104 struct contact * add_new_contact( gchar * group, gchar * con, gint type );
00105 void add_unknown( eb_account * ea );
00106 void add_unknown_with_name( eb_account * ea, gchar * name );
00107 void add_account( gchar * contact, eb_account * account );
00108 void add_account_silent( gchar * contact, eb_account * account );
00109 void move_account( struct contact * c, eb_account *account );
00110 void move_contact( gchar * group, struct contact * c);
00111 void invite_dialog( eb_local_account * ela, char * user, char * chat_room,
00112             void * id );
00113 void make_safe_filename(gchar *buff, gchar *name);
00114 
00115 gint gtk_notebook_get_number_pages(GtkNotebook *notebook);
00116 
00117 pid_t create_lock_file(gchar* fname);
00118 void delete_lock_file(gchar* fname);
00119 void eb_generic_menu_function(GtkWidget *add_button, gpointer userdata);
00120 
00121 #ifdef __cplusplus
00122 } /* extern "C" */
00123 #endif
00124 
00125 #ifndef NAME_MAX
00126 #define NAME_MAX 4096
00127 #endif
00128 
00129 #endif /* __UTIL_H__ */

Contact: Andy Maloney     [Documentation generated by doxygen]