lists.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * ngIRCd -- The Next Generation IRC Daemon
  3. * Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors.
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. * Please read the file COPYING, README and AUTHORS for more information.
  10. */
  11. #ifndef __lists_h__
  12. #define __lists_h__
  13. /**
  14. * @file
  15. * Management of IRC lists (header)
  16. */
  17. #include "portab.h"
  18. #include "client.h"
  19. struct list_elem;
  20. struct list_head {
  21. struct list_elem *first;
  22. };
  23. GLOBAL struct list_elem *Lists_GetFirst PARAMS((const struct list_head *));
  24. GLOBAL struct list_elem *Lists_GetNext PARAMS((const struct list_elem *));
  25. GLOBAL bool Lists_Check PARAMS((struct list_head *head, CLIENT *client));
  26. GLOBAL char *Lists_CheckReason PARAMS((struct list_head *head, CLIENT *client));
  27. GLOBAL struct list_elem *Lists_CheckDupeMask PARAMS((const struct list_head *head,
  28. const char *mask));
  29. GLOBAL bool Lists_Add PARAMS((struct list_head *h, const char *Mask,
  30. time_t ValidUntil, const char *Reason));
  31. GLOBAL void Lists_Del PARAMS((struct list_head *head, const char *Mask));
  32. GLOBAL unsigned long Lists_Count PARAMS((struct list_head *h));
  33. GLOBAL void Lists_Free PARAMS((struct list_head *head));
  34. GLOBAL const char *Lists_MakeMask PARAMS((const char *Pattern));
  35. GLOBAL const char *Lists_GetMask PARAMS((const struct list_elem *e));
  36. GLOBAL const char *Lists_GetReason PARAMS((const struct list_elem *e));
  37. GLOBAL time_t Lists_GetValidity PARAMS((const struct list_elem *e));
  38. GLOBAL void Lists_Expire PARAMS((struct list_head *h, const char *ListName));
  39. #endif
  40. /* -eof- */