]> jfr.im git - solanum.git/blobdiff - authd/authd.h
Merge pull request #260 from FauxFaux/yesno-1
[solanum.git] / authd / authd.h
index 08cd6c1730303b59548ab35c854b881156f5b335..f9e7e2f28e7064261c2143814efc2744fd274929 100644 (file)
 #ifndef _AUTHD_H
 #define _AUTHD_H
 
-#include <rb_lib.h>
-#include <stdio.h>
+#include "stdinc.h"
+#include "rb_lib.h"
+#include "rb_dictionary.h"
 
 #include "setup.h"
-#include "common.h"
+#include "ircd_defs.h"
+
+typedef enum exit_reasons
+{
+       EX_ERROR = 1,
+       EX_DNS_ERROR = 2,
+       EX_PROVIDER_ERROR = 3,
+} exit_reasons;
+
+typedef void (*provider_opts_handler_t)(const char *, int, const char **);
+
+struct auth_opts_handler
+{
+       const char *option;
+       int min_parc;
+       provider_opts_handler_t handler;
+};
 
 extern rb_helper *authd_helper;
 
 typedef void (*authd_cmd_handler)(int parc, char *parv[]);
-extern authd_cmd_handler authd_cmd_handlers[255];
+typedef void (*authd_stat_handler)(uint32_t rid, const char letter);
+typedef void (*authd_reload_handler)(const char letter);
+
+extern authd_cmd_handler authd_cmd_handlers[256];
+extern authd_stat_handler authd_stat_handlers[256];
+extern authd_reload_handler authd_reload_handlers[256];
+
+extern rb_dictionary *authd_option_handlers;
 
 #endif