Doxyfy list.h, removing the unused delist_conf() function.
[ircu2.10.12-pk.git] / include / list.h
1 /*
2  * list.h
3  *
4  * $Id$
5  */
6 #ifndef INCLUDED_list_h
7 #define INCLUDED_list_h
8 #ifndef INCLUDED_sys_types_h
9 #include <sys/types.h>         /* time_t, size_t */
10 #define INCLUDED_sys_types_h
11 #endif
12
13 struct Client;
14 struct Connection;
15 struct Channel;
16 struct ConfItem;
17
18 /*
19  * Structures
20  */
21
22 /** Node in a singly linked list. */
23 struct SLink {
24   struct SLink *next; /**< Next element in list. */
25   union {
26     struct Client *cptr;
27     struct Channel *chptr;
28     struct ConfItem *aconf;
29     char *cp;
30     struct {
31       char *banstr;
32       char *who;
33       time_t when;
34     } ban;
35   } value; /**< Value of list element. */
36   unsigned int flags; /**< Modifier flags for list element. */
37 };
38
39 /** Node in a doubly linked list. */
40 struct DLink {
41   struct DLink*  next; /**< Next element in list. */
42   struct DLink*  prev; /**< Previous element in list. */
43   union {
44     struct Client*  cptr;
45     struct Channel* chptr;
46     char*           ch;
47   } value; /**< Value of list element. */
48 };
49
50 /*
51  * Proto types
52  */
53
54 extern void free_link(struct SLink *lp);
55 extern struct SLink *make_link(void);
56 extern struct SLink *find_user_link(struct SLink *lp, struct Client *ptr);
57 extern void init_list(void);
58 extern struct Client *make_client(struct Client *from, int status);
59 extern void free_connection(struct Connection *con);
60 extern void free_client(struct Client *cptr);
61 extern struct Server *make_server(struct Client *cptr);
62 extern void remove_client_from_list(struct Client *cptr);
63 extern void add_client_to_list(struct Client *cptr);
64 extern struct DLink *add_dlink(struct DLink **lpp, struct Client *cp);
65 extern void remove_dlink(struct DLink **lpp, struct DLink *lp);
66 extern struct ConfItem *make_conf(void);
67 extern void free_conf(struct ConfItem *aconf);
68 extern void send_listinfo(struct Client *cptr, char *name);
69
70 #endif /* INCLUDED_list_h */