ekg2
 All Struktury Danych Pliki Funkcje Zmienne Definicje typów Wyliczenia Wartości wyliczeń Definicje Grupay Strony
userlist.h
Idź do dokumentacji tego pliku.
1 /* $Id: userlist.h 4412 2008-08-17 12:28:15Z peres $ */
2 
3 /*
4  * (C) Copyright 2001-2003 Wojtek Kaniewski <wojtekka@irc.pl>
5  * Robert J. Woźny <speedy@ziew.org>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License Version 2 as
9  * published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  */
20 
21 #ifndef __EKG_USERLIST_H
22 #define __EKG_USERLIST_H
23 
24 #include <time.h>
25 
26 #include "dynstuff.h"
27 #include "plugins.h"
28 #include "sessions.h"
29 #include "windows.h"
30 
31 typedef struct userlist {
32  struct userlist *next;
33 
34  char *uid;
35  char *nickname;
36  struct ekg_group *groups;
41  char *descr; /* */
42  char *descr1line;
43 
44  void *__resources; /* ekg2-remote: OK, NULL */ /* XXX, to w ogole by sie przydalo dorobic w ui-pluginach */
45  time_t __last_seen; /* ekg2-remote: OK, 0 */
46  char *__foreign; /* ekg2-remote: OK, NULL */
47 
48  void *priv;
50  unsigned int blink : 1;
51  unsigned int typing : 1;
54  char *last_descr;
55  time_t status_time;
56  void *private;
57  private_data_t *priv_list; /* New user private data */
58 } userlist_t;
59 
60 typedef enum {
63 } xstate_t;
64 
65 struct ekg_group {
66  struct ekg_group *next;
67  char *name;
68 };
69 
70 typedef enum {
71  IGNORE_STATUS = 0x01,
73  IGNORE_MSG = 0x04,
74  IGNORE_DCC = 0x08,
75  IGNORE_EVENTS = 0x10,
76  IGNORE_NOTIFY = 0x20,
77  IGNORE_XOSD = 0x40,
78  IGNORE_LOG = 0x80,
79 
80  IGNORE_ALL = 0xFF
81 } ignore_t;
82 
83 struct ignore_label {
85  char *name;
86 };
87 
88 extern struct ignore_label ignore_labels[];
89 
93 #define userlist_find_n(a, b) userlist_find(session_find(a), b)
96 
97 int ignored_check(session_t *session, const char *uid);
98 
99 int ekg_group_member(userlist_t *u, const char *group);
100 
101 char *get_uid(session_t *session, const char *text);
102 
103 #define user_private_item_get_int(user, name) \
104  private_item_get_int(&(user)->priv_list, name)
105 #define user_private_item_set(user, name, value) \
106  private_item_set(&(user)->priv_list, name, value)
107 
108 #endif /* __EKG_USERLIST_H */
109 
110 /*
111  * Local Variables:
112  * mode: c
113  * c-file-style: "k&r"
114  * c-basic-offset: 8
115  * indent-tabs-mode: t
116  * End:
117  */