2 * @brief Singly and doubly linked list manipulation interface.
5 #ifndef INCLUDED_list_h
6 #define INCLUDED_list_h
7 #ifndef INCLUDED_sys_types_h
8 #include <sys/types.h> /* time_t, size_t */
9 #define INCLUDED_sys_types_h
21 /** Node in a singly linked list. */
23 struct SLink *next; /**< Next element in list. */
25 struct Client *cptr; /**< List element as a client. */
26 struct Channel *chptr; /**< List element as a channel. */
27 struct ConfItem *aconf; /**< List element as a configuration item. */
28 char *cp; /**< List element as a string. */
29 } value; /**< Value of list element. */
30 unsigned int flags; /**< Modifier flags for list element. */
33 /** Node in a doubly linked list. */
35 struct DLink* next; /**< Next element in list. */
36 struct DLink* prev; /**< Previous element in list. */
38 struct Client* cptr; /**< List element as a client. */
39 struct Channel* chptr; /**< List element as a channel. */
40 char* ch; /**< List element as a string. */
41 } value; /**< Value of list element. */
48 extern void free_link(struct SLink *lp);
49 extern struct SLink *make_link(void);
50 extern struct SLink *find_user_link(struct SLink *lp, struct Client *ptr);
51 extern void init_list(void);
52 extern struct Client *make_client(struct Client *from, int status);
53 extern void free_connection(struct Connection *con);
54 extern void free_client(struct Client *cptr);
55 extern struct Server *make_server(struct Client *cptr);
56 extern void remove_client_from_list(struct Client *cptr);
57 extern void add_client_to_list(struct Client *cptr);
58 extern struct DLink *add_dlink(struct DLink **lpp, struct Client *cp);
59 extern void remove_dlink(struct DLink **lpp, struct DLink *lp);
60 extern struct ConfItem *make_conf(int type);
61 extern void free_conf(struct ConfItem *aconf);
62 extern void send_listinfo(struct Client *cptr, char *name);
64 #endif /* INCLUDED_list_h */