* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id$
*/
+#ifndef INCLUDED_class_h
+#define INCLUDED_class_h
+#ifndef INCLUDED_sys_types_h
+#include <sys/types.h>
+#define INCLUDED_sys_types_h
+#endif
-#ifndef CLASS_H
-#define CLASS_H
+struct Client;
+struct ConfItem;
-/*=========================================================================
+/*
* Structures
*/
-
struct ConfClass {
unsigned int conClass;
unsigned int conFreq;
struct ConfClass *next;
};
-/*=============================================================================
+/*
* Macro's
*/
-#define ConClass(x) ((x)->conClass)
-#define ConFreq(x) ((x)->conFreq)
-#define PingFreq(x) ((x)->pingFreq)
-#define MaxLinks(x) ((x)->maxLinks)
-#define MaxSendq(x) ((x)->maxSendq)
-#define Links(x) ((x)->links)
+#define ConClass(x) ((x)->conClass)
+#define ConFreq(x) ((x)->conFreq)
+#define PingFreq(x) ((x)->pingFreq)
+#define MaxLinks(x) ((x)->maxLinks)
+#define MaxSendq(x) ((x)->maxSendq)
+#define Links(x) ((x)->links)
-#define ConfLinks(x) ((x)->confClass->links)
+#define ConfLinks(x) ((x)->confClass->links)
#define ConfMaxLinks(x) ((x)->confClass->maxLinks)
-#define ConfClass(x) ((x)->confClass->conClass)
-#define ConfConFreq(x) ((x)->confClass->conFreq)
+#define ConfClass(x) ((x)->confClass->conClass)
+#define ConfConFreq(x) ((x)->confClass->conFreq)
#define ConfPingFreq(x) ((x)->confClass->pingFreq)
-#define ConfSendq(x) ((x)->confClass->maxSendq)
+#define ConfSendq(x) ((x)->confClass->maxSendq)
-#define FirstClass() classes
-#define NextClass(x) ((x)->next)
+#define FirstClass() classes
+#define NextClass(x) ((x)->next)
-#define MarkDelete(x) do { MaxLinks(x) = (unsigned int)-1; } while(0)
+#define MarkDelete(x) do { MaxLinks(x) = (unsigned int)-1; } while(0)
#define IsMarkedDelete(x) (MaxLinks(x) == (unsigned int)-1)
-/*=============================================================================
+/*
* Proto types
*/
-extern aConfClass *find_class(unsigned int cclass);
-extern aConfClass *make_class(void);
-extern void free_class(aConfClass * tmp);
-extern unsigned int get_con_freq(aConfClass * clptr);
-extern unsigned int get_client_ping(aClient *acptr);
-extern unsigned int get_conf_class(aConfItem *aconf);
-extern unsigned int get_client_class(aClient *acptr);
+extern struct ConfClass *find_class(unsigned int cclass);
+extern struct ConfClass *make_class(void);
+extern void free_class(struct ConfClass * tmp);
+extern unsigned int get_con_freq(struct ConfClass * clptr);
+extern unsigned int get_client_ping(struct Client *acptr);
+extern unsigned int get_conf_class(struct ConfItem *aconf);
+extern unsigned int get_client_class(struct Client *acptr);
extern void add_class(unsigned int conclass, unsigned int ping,
unsigned int confreq, unsigned int maxli, size_t sendq);
extern void check_class(void);
extern void initclass(void);
-extern void report_classes(aClient *sptr);
-extern size_t get_sendq(aClient *cptr);
+extern void report_classes(struct Client *sptr);
+extern size_t get_sendq(struct Client* cptr);
-extern aConfClass *classes;
+extern struct ConfClass *classes;
-#endif /* CLASS_H */
+#endif /* INCLUDED_class_h */