]> code.citadel.org Git - citadel.git/blobdiff - citadel/include/ctdl_module.h
Moved the prototypes of CtdlLoginExistingUser and CtdlTryPassword into
[citadel.git] / citadel / include / ctdl_module.h
index 345a786f642086eef8e456c3022b0f3ae51d8345..1d1ac91a0f591525bf4837d50768585819ff9cc8 100644 (file)
@@ -27,6 +27,9 @@
 
 #include <sys/wait.h>
 #include <string.h>
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
 #include <limits.h>
 
 
@@ -41,6 +44,9 @@
 #include "sysdep_decls.h"
 #include "msgbase.h"
 #include "threads.h"
+#include "citadel_dirs.h"
+#include "context.h"
+
 /*
  * define macros for module init stuff
  */
@@ -221,6 +227,10 @@ struct floor *CtdlGetCachedFloor(int floor_num);
 void CtdlScheduleRoomForDeletion(struct ctdlroom *qrbuf);
 void CtdlGetFloor (struct floor *flbuf, int floor_num);
 void CtdlPutFloor (struct floor *flbuf, int floor_num);
+void CtdlPutFloorLock(struct floor *flbuf, int floor_num);
+int CtdlGetFloorByName(const char *floor_name);
+int CtdlGetFloorByNameLock(const char *floor_name);
+int CtdlGetAvailableFloor(void);
 int CtdlIsNonEditable(struct ctdlroom *qrbuf);
 void CtdlPutRoom(struct ctdlroom *);
 
@@ -269,4 +279,55 @@ struct config {
 
 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);
+void CtdlGetRelationship(struct visit *vbuf,
+                        struct ctdluser *rel_user,
+                        struct ctdlroom *rel_room);
+void CtdlSetRelationship(struct visit *newvisit,
+                        struct ctdluser *rel_user,
+                        struct ctdlroom *rel_room);
+void CtdlMailboxName(char *buf, size_t n, const struct ctdluser *who, const char *prefix);
+
+int CtdlLoginExistingUser(char *authname, char *username);
+
+/*
+ * Values which may be returned by CtdlLoginExistingUser()
+ */
+enum {
+       pass_ok,
+       pass_already_logged_in,
+       pass_no_user,
+       pass_internal_error,
+       pass_wrong_password
+};
+
+int CtdlTryPassword(char *password);
+/*
+ * Values which may be returned by CtdlTryPassword()
+ */
+enum {
+       login_ok,
+       login_already_logged_in,
+       login_too_many_users,
+       login_not_found
+};
+
+
+
+
+/*
+ * Expose API calls from msgbase.c
+ */
+char *CtdlGetSysConfig(char *sysconfname);
+void CtdlPutSysConfig(char *sysconfname, char *sysconfdata);
+
 #endif /* CTDL_MODULE_H */