1 /* 2 ** TleenX2 (Tlen.pl Client) 3 ** Copyright (c) 2002-2003 Hubert Soko�owski <who_ami@tlen.pl> 4 ** Pawe� Bili�ski <rael@fr.pl> 5 ** 6 ** This code is free software; you can redistribute it and/or 7 ** modify it under the terms of the GNU General Public License. 8 ** 9 */ 10 11 12 13 14 #ifndef __USERS_H__ 15 #define __USERS_H__ 16 #include <gtk/gtk.h> 17 18 19 enum user_type{ 20 USER_TLEN, 21 USER_JABBER, 22 USER_WP, 23 USER_GG, 24 USER_AGENT 25 }; 26 27 struct user 28 { 29 gchar *name, *jid, *group, *subscription, *description, *ask; 30 int status; 31 enum user_type type; 32 }; 33 34 struct talk 35 { 36 GtkWidget *window; 37 gchar *jid; 38 }; 39 40 41 void add_user(gchar *name, gchar *jid, gchar *group, gchar *subscription, 42 gchar *description, gchar *ask, int status, enum user_type type); 43 void del_user(gchar *jid); 44 struct user *get_user(const gchar *jid); 45 gchar *user_subscription(const gchar *jid); 46 void users_list_clear(); 47 void talks_list_clear(); 48 gint users_list_count(GList *l); 49 gint users_list_count_online(GList *l); 50 gchar *get_user_name(const gchar *jid); 51 gint get_status(struct user *u); 52 gint get_type(gchar *id); 53 gchar* user_del_res(gchar *jid); 54 gboolean subscription_to(struct user *u); 55 gboolean subscription_from(struct user *u); 56 gchar *user_description(struct user *user); 57 58 #endif 59