]> code.citadel.org Git - citadel.git/blobdiff - citadel/include/ctdl_module.h
Big change to the ldap code to break its dependancy on serv_vcard.c and
[citadel.git] / citadel / include / ctdl_module.h
index ed8e7c9c75499af297fb106c3e653ac68780c97a..5d8764db436878461b570a806d6f343bd41570a1 100644 (file)
@@ -1,16 +1,15 @@
-/* $Id:$ */
+/* $Id$ */
 
 #ifndef CTDL_MODULE_H
 #define CTDL_MODULE_H
 
-
 #include "server.h"
 #include "sysdep_decls.h"
+
 /*
  * define macros for module init stuff
  */
  
 #define CTDL_MODULE_INIT(module_name) char *ctdl_module_##module_name##_init (void)
 
 #define CTDL_INIT_CALL(module_name) ctdl_module_##module_name##_init ()
@@ -45,10 +44,11 @@ void CtdlRegisterProtoHook(void (*handler)(char *), char *cmd, char *desc);
 void CtdlUnregisterProtoHook(void (*handler)(char *), char *cmd);
 
 void CtdlRegisterServiceHook(int tcp_port,
-                       char *sockpath,
-                        void (*h_greeting_function) (void),
-                        void (*h_command_function) (void),
-                        void (*h_async_function) (void)
+                            char *sockpath,
+                            void (*h_greeting_function) (void),
+                            void (*h_command_function) (void),
+                            void (*h_async_function) (void),
+                            const char *ServiceName
 );
 void CtdlUnregisterServiceHook(int tcp_port,
                        char *sockpath,
@@ -62,4 +62,28 @@ void CtdlRegisterFixedOutputHook(char *content_type,
 );
 void CtdlUnRegisterFixedOutputHook(char *content_type);
 
+void CtdlRegisterMaintenanceThread(char *name, void *(*thread_proc) (void *arg));
+
+void CtdlRegisterSearchFuncHook(void (*fcn_ptr)(int *, long **, char *), char *name);
+
+
+/*
+ * Directory services hooks for LDAP etc
+ */
+
+#define DIRECTORY_USER_DEL 1   // Delete a user entry
+#define DIRECTORY_CREATE_HOST 2        // Create a host entry if not already there.
+#define DIRECTORY_CREATE_OBJECT 3      // Create a new object for directory entry
+#define DIRECTORY_ATTRIB_ADD 4 // Add an attribute to the directory entry object
+#define DIRECTORY_SAVE_OBJECT 5        // Save the object to the directory service
+#define DIRECTORY_FREE_OBJECT 6        // Free the object and its attributes
+
+int CtdlRegisterDirectoryServiceFunc(int (*func)(char *cn, char *ou, void **object), int cmd, char *module);
+int CtdlDoDirectoryServiceFunc(char *cn, char *ou, void **object, char *module, int cmd);
+
+/* TODODRW: This needs to be changed into a hook type interface
+ * for now we have this horrible hack
+ */
+void CtdlModuleStartCryptoMsgs(char *ok_response, char *nosup_response, char *error_response);
+
 #endif /* CTDL_MODULE_H */