Idź do dokumentacji tego pliku.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __EKG_USERLIST_H
00022 #define __EKG_USERLIST_H
00023
00024 #include <time.h>
00025
00026 #include "dynstuff.h"
00027 #include "plugins.h"
00028 #include "sessions.h"
00029 #include "windows.h"
00030
00031 typedef struct userlist {
00032 struct userlist *next;
00033
00034 char *uid;
00035 char *nickname;
00036 struct ekg_group *groups;
00040 status_t status;
00041 char *descr;
00042 char *descr1line;
00043
00044 void *__resources;
00045 time_t __last_seen;
00046 char *__foreign;
00047
00048 void *priv;
00050 unsigned int blink : 1;
00051 unsigned int typing : 1;
00053 status_t last_status;
00054 char *last_descr;
00055 time_t status_time;
00056 void *private;
00057 private_data_t *priv_list;
00058 } userlist_t;
00059
00060 typedef enum {
00061 EKG_XSTATE_BLINK = 1,
00062 EKG_XSTATE_TYPING = 2
00063 } xstate_t;
00064
00065 struct ekg_group {
00066 struct ekg_group *next;
00067 char *name;
00068 };
00069
00070 typedef enum {
00071 IGNORE_STATUS = 0x01,
00072 IGNORE_STATUS_DESCR = 0x02,
00073 IGNORE_MSG = 0x04,
00074 IGNORE_DCC = 0x08,
00075 IGNORE_EVENTS = 0x10,
00076 IGNORE_NOTIFY = 0x20,
00077 IGNORE_XOSD = 0x40,
00078 IGNORE_LOG = 0x80,
00079
00080 IGNORE_ALL = 0xFF
00081 } ignore_t;
00082
00083 struct ignore_label {
00084 ignore_t level;
00085 char *name;
00086 };
00087
00088 extern struct ignore_label ignore_labels[];
00089
00090 userlist_t *remote_userlist_add_entry(userlist_t **userlist, char **__entry, int count);
00091 int userlist_remove(session_t *session, userlist_t *u);
00092 userlist_t *userlist_find(session_t *session, const char *uid);
00093 #define userlist_find_n(a, b) userlist_find(session_find(a), b)
00094 void userlist_free(session_t *session);
00095 void userlists_destroy(userlist_t **userlist);
00096
00097 int ignored_check(session_t *session, const char *uid);
00098
00099 int ekg_group_member(userlist_t *u, const char *group);
00100
00101 char *get_uid(session_t *session, const char *text);
00102
00103 #define user_private_item_get_int(user, name) \
00104 private_item_get_int(&(user)->priv_list, name)
00105 #define user_private_item_set(user, name, value) \
00106 private_item_set(&(user)->priv_list, name, value)
00107
00108 #endif
00109
00110
00111
00112
00113
00114
00115
00116
00117