Move the definition of the NotifyItem and NotifyList types from struct.h to notify.h

This change means that struct.h no longer needs to include alist.h, so it will be indirectly included in a lot
fewer other files.

As a consequence, server.h needs to include notify.h to get the definitions of those data types.
This commit is contained in:
Kevin Easton
2017-05-04 23:50:47 +10:00
parent 65646f6b71
commit 52b57d1576
3 changed files with 35 additions and 37 deletions

View File

@@ -9,9 +9,34 @@
*
* @(#)$Id$
*/
#ifndef NOTIFY_H_
#define NOTIFY_H_
#ifndef __notify_h_
#define __notify_h_
#include "alist.h"
/* These types pun the Array_item and Array types from alist.h respectively */
typedef struct notify_stru
{
char *nick; /* Who are we watching? */
u_32int_t hash;
char *host;
char *looking;
int times;
time_t lastseen;
time_t period;
time_t added;
int flag; /* Is the person on irc? */
} NotifyItem;
typedef struct notify_alist
{
struct notify_stru **list;
int max;
int max_alloc;
alist_func func;
hash_type hash;
char *ison;
} NotifyList;
void show_notify_list (int);
BUILT_IN_COMMAND(notify);
@@ -34,4 +59,4 @@ extern char *get_notify_nicks (int, int, char *, int);
void send_watch (int);
char *get_watch_nicks (int, int, char *, int);
#endif /* __notify_h_ */
#endif /* NOTIFY_H_ */