]> code.citadel.org Git - citadel.git/blobdiff - citadel/include/ctdl_module.h
A few more API clean ups. Mainly revolving around user_ops.c
[citadel.git] / citadel / include / ctdl_module.h
index 9019a5d1c22c5422e44f883956dba2d21f21b9fc..c0e24b637370d4ae666d379ad5edc485c96f79a7 100644 (file)
@@ -3,11 +3,45 @@
 #ifndef CTDL_MODULE_H
 #define CTDL_MODULE_H
 
+#include "sysdep.h"
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <signal.h>
+#include <pwd.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
+
+#include <sys/wait.h>
+#include <string.h>
+#include <limits.h>
+
+
+#ifndef HAVE_SNPRINTF
+#include "snprintf.h"
+#endif
+
+
 #include <libcitadel.h>
+
 #include "server.h"
 #include "sysdep_decls.h"
 #include "msgbase.h"
 #include "threads.h"
+#include "citadel_dirs.h"
 /*
  * define macros for module init stuff
  */
@@ -203,4 +237,49 @@ enum {
        crr_access_denied               /* not allowed to edit this room */
 };
 
+
+
+/*
+ * API declarations from citserver.h
+ */
+int CtdlAccessCheck(int);
+/* 'required access level' values which may be passed to CtdlAccessCheck()
+ */
+enum {
+       ac_none,
+       ac_logged_in,
+       ac_room_aide,
+       ac_aide,
+       ac_internal
+};
+
+
+
+/*
+ * API declarations from serv_extensions.h
+ */
+void CtdlModuleDoSearch(int *num_msgs, long **search_msgs, char *search_string, char *func_name);
+/* 
+ * Global system configuration.  Don't change anything here.  It's all in dtds/config-defs.h now.
+ */
+struct config {
+#include "datadefinitions.h"
+#include "dtds/config-defs.h"
+#include "undef_data.h"
+};
+
+extern struct config config;
+
+
+
+/*
+ * Expose API calls from user_ops.c
+ */
+int CtdlGetUser(struct ctdluser *usbuf, char name[]);
+int CtdlGetUserLock(struct ctdluser *usbuf, char *name);
+void CtdlPutUser(struct ctdluser *usbuf);
+void CtdlPutUserLock(struct ctdluser *usbuf);
+int CtdlGetUserByNumber(struct ctdluser *usbuf, long number);
+
+
 #endif /* CTDL_MODULE_H */