home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / ircd4652.zip / ircd-df-4.6.5-os2 / include / class.h < prev    next >
C/C++ Source or Header  |  1997-12-28  |  2KB  |  70 lines

  1. /************************************************************************
  2.  *   IRC - Internet Relay Chat, include/class.h
  3.  *   Copyright (C) 1990 Darren Reed
  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 1, or (at your option)
  8.  *   any later version.
  9.  *
  10.  *   This program is distributed in the hope that it will be useful,
  11.  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  *   GNU General Public License for more details.
  14.  *
  15.  *   You should have received a copy of the GNU General Public License
  16.  *   along with this program; if not, write to the Free Software
  17.  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  */
  19.  
  20. #ifndef    __class_include__
  21. #define __class_include__
  22.  
  23. #ifndef PROTO
  24. #if __STDC__
  25. #       define PROTO(x) x
  26. #else
  27. #       define PROTO(x) ()
  28. #endif
  29. #endif
  30.  
  31. typedef struct Class {
  32.     int    class;
  33.     int    conFreq;
  34.     int    pingFreq;
  35.     int    maxLinks;
  36.     long    maxSendq;
  37.     int    links;
  38.     struct Class *next;
  39. } aClass;
  40.  
  41. #define    Class(x)    ((x)->class)
  42. #define    ConFreq(x)    ((x)->conFreq)
  43. #define    PingFreq(x)    ((x)->pingFreq)
  44. #define    MaxLinks(x)    ((x)->maxLinks)
  45. #define    MaxSendq(x)    ((x)->maxSendq)
  46. #define    Links(x)    ((x)->links)
  47.  
  48. #define    ConfLinks(x)    (Class(x)->links)
  49. #define    ConfMaxLinks(x)    (Class(x)->maxLinks)
  50. #define    ConfClass(x)    (Class(x)->class)
  51. #define    ConfConFreq(x)    (Class(x)->conFreq)
  52. #define    ConfPingFreq(x)    (Class(x)->pingFreq)
  53. #define    ConfSendq(x)    (Class(x)->maxSendq)
  54.  
  55. #define    FirstClass()     classes
  56. #define    NextClass(x)    ((x)->next)
  57.  
  58. extern    aClass    *classes;
  59.  
  60. extern    aClass    *find_class PROTO((int));
  61. extern    int    get_conf_class PROTO((aConfItem *));
  62. extern    int    get_client_class PROTO((aClient *));
  63. extern    int    get_client_ping PROTO((aClient *));
  64. extern    int    get_con_freq PROTO((aClass *));
  65. extern    void    add_class PROTO((int, int, int, int, long));
  66. extern    void    check_class PROTO((void));
  67. extern    void    initclass PROTO((void));
  68.  
  69. #endif /* __class_include__ */
  70.