X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Finclude%2Fctdl_module.h;h=a91308639cbfb4737662a3456d80e26e6cf13c8f;hb=dbaf416c5e665af584ad1db3109cc5486fdfa96f;hp=3eda4a8337de2f498eba7e00c28e335b53f85f61;hpb=e8123a34d5c13c89443de540f8d3ef10f53225a6;p=citadel.git diff --git a/citadel/include/ctdl_module.h b/citadel/include/ctdl_module.h index 3eda4a833..a91308639 100644 --- a/citadel/include/ctdl_module.h +++ b/citadel/include/ctdl_module.h @@ -168,6 +168,12 @@ void CtdlRegisterMaintenanceThread(char *name, void *(*thread_proc) (void *arg)) void CtdlRegisterSearchFuncHook(void (*fcn_ptr)(int *, long **, const char *), char *name); +/* + * if you say a) (which may take a while) + * don't forget to say b) + */ +void CtdlDisableHouseKeeping(void); +void CtdlEnableHouseKeeping(void); /* * Directory services hooks for LDAP etc @@ -234,7 +240,7 @@ unsigned CtdlCreateRoom(char *new_room_name, int avoid_access, int new_room_view); int CtdlGetRoom(struct ctdlroom *qrbuf, const char *room_name); -int CtdlGetRoomLock(struct ctdlroom *qrbuf, char *room_name); +int CtdlGetRoomLock(struct ctdlroom *qrbuf, const char *room_name); int CtdlDoIHavePermissionToDeleteThisRoom(struct ctdlroom *qr); void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf, int *result, int *view); void CtdlPutRoomLock(struct ctdlroom *qrbuf); @@ -376,23 +382,51 @@ struct config { int c_nntp_port; int c_nntps_port; }; +struct configlen { + long c_nodename; + long c_fqdn; + long c_humannode; + long c_phonenum; + long c_twitroom; + long c_moreprompt; + long c_site_location; + long c_sysadm; + long c_niu_2; + long c_ip_addr; + long c_logpages; + long c_baseroom; + long c_aideroom; + long c_ldap_host; + long c_ldap_base_dn; + long c_ldap_bind_dn; + long c_ldap_bind_pw; + long c_journal_dest; + long c_default_cal_zone; + long c_funambol_host; + long c_funambol_source; + long c_funambol_auth; + long c_master_user; + long c_master_pass; + long c_pager_program; +}; -#define SET_CFGSTRBUF(which, buffer) safestrncpy(config.which, ChrPtr(buffer), sizeof(config.which)) -#define SET_CFGSTR(which, buffer) safestrncpy(config.which, buffer, sizeof(config.which)) +#define SET_CFGSTRBUF(which, buffer) configlen.which = safestrncpy(config.which, ChrPtr(buffer), sizeof(config.which)) +#define SET_CFGSTR(which, buffer) configlen.which = safestrncpy(config.which, buffer, sizeof(config.which)) extern struct config config; +extern struct configlen configlen; #define NODENAME config.c_nodename #define FQDN config.c_fqdn -#define CTDLUID ctdluid +#define CTDLUID config.c_ctdluid #define CREATAIDE config.c_creataide #define REGISCALL config.c_regiscall #define TWITDETECT config.c_twitdetect #define TWITROOM config.c_twitroom #define RESTRICT_INTERNET config.c_restrict -#define CFG_KEY(which) config.which, strlen(config.which) +#define CFG_KEY(which) config.which, configlen.which typedef void (*CfgLineParser)(const CfgLineType *ThisOne, StrBuf *Line, const char *LinePos, OneRoomNetCfg *rncfg); typedef void (*CfgLineSerializer)(const CfgLineType *ThisOne, StrBuf *OuptputBuffer, OneRoomNetCfg *rncfg, RoomNetCfgLine *data);