X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Finclude%2Fctdl_module.h;h=6d16624b584d93dcd9d45e6f8d2ce6f32a8b76cc;hb=373b01806f2c2949b86b0ef83b28e15d38af5ee6;hp=17f88fc654177a9e0a12c72f7e7525439f7dc7fa;hpb=7c94d5bb68f1c448770d31205ec5ae12bd8a02ed;p=citadel.git diff --git a/citadel/include/ctdl_module.h b/citadel/include/ctdl_module.h index 17f88fc65..6d16624b5 100644 --- a/citadel/include/ctdl_module.h +++ b/citadel/include/ctdl_module.h @@ -65,22 +65,6 @@ FMT_CITADEL, \ SUBJECT) - -#define CtdlAideFPMessage(TEXT, SUBJECT, N, STR, STRLEN, ccid, ioid, TIME) \ - flood_protect_quickie_message( \ - "Citadel", \ - NULL, \ - NULL, \ - AIDEROOM, \ - TEXT, \ - FMT_CITADEL, \ - SUBJECT, \ - N, \ - STR, \ - STRLEN, \ - ccid, \ - ioid, \ - TIME) /* * Hook functions available to modules. */ @@ -109,8 +93,6 @@ #define PRIO_UNSTEALTH 45000 /* Priorities for EVT_STEALTH */ #define PRIO_STEALTH 50000 -void CtdlRegisterTDAPVetoHook(int (*fcn_ptr)(StrBuf*), int EventType, int Priority); -void CtdlUnregisterTDAPVetoHook(int (*fcn_ptr) (StrBuf*), int EventType); void CtdlRegisterSessionHook(void (*fcn_ptr)(void), int EventType, int Priority); @@ -128,9 +110,6 @@ void CtdlRegisterMessageHook(int (*handler)(struct CtdlMessage *, recptypes*), void CtdlUnregisterMessageHook(int (*handler)(struct CtdlMessage *, recptypes *), int EventType); -void CtdlRegisterNetprocHook(int (*handler)(struct CtdlMessage *, char *) ); -void CtdlUnregisterNetprocHook(int (*handler)(struct CtdlMessage *, char *) ); - void CtdlRegisterRoomHook(int (*fcn_ptr)(struct ctdlroom *) ); void CtdlUnregisterRoomHook(int (*fnc_ptr)(struct ctdlroom *) ); @@ -217,7 +196,7 @@ void CtdlBumpNewMailCounter(long which_user); /* * CtdlGetCurrentMessageNumber() - Obtain the current highest message number in the system * This provides a quick way to initialise a variable that might be used to indicate - * messages that should not be processed. EG. a new Sieve script will use this + * messages that should not be processed. For example, a new inbox script will use this * to record determine that messages older than this should not be processed. * This function is defined in control.c */ @@ -247,7 +226,8 @@ void CtdlPutRoomLock(struct ctdlroom *qrbuf); typedef void (*ForEachRoomCallBack)(struct ctdlroom *EachRoom, void *out_data); void CtdlForEachRoom(ForEachRoomCallBack CB, void *in_data); typedef void (*ForEachRoomNetCfgCallBack)(struct ctdlroom *EachRoom, void *out_data, OneRoomNetCfg *OneRNCFG); -void CtdlForEachNetCfgRoom(ForEachRoomNetCfgCallBack CB, void *in_data, RoomNetCfg filter); +char *LoadRoomNetConfigFile(long roomnum); +void CtdlForEachNetCfgRoom(ForEachRoomNetCfgCallBack CB, void *in_data); void SaveChangedConfigs(void); void CtdlDeleteRoom(struct ctdlroom *qrbuf); int CtdlRenameRoom(char *old_name, char *new_name, int new_floor); @@ -330,7 +310,7 @@ struct RoomNetCfgLine { struct OneRoomNetCfg { long lastsent; - long changed; + // long changed; StrBuf *Sender; StrBuf *RoomInfo; RoomNetCfgLine *NetConfigs[maxRoomNetCfg]; @@ -346,7 +326,9 @@ void DeleteGenericCfgLine(const CfgLineType *ThisOne, RoomNetCfgLine **data); RoomNetCfgLine *DuplicateOneGenericCfgLine(const RoomNetCfgLine *data); void AddRoomCfgLine(OneRoomNetCfg *OneRNCfg, struct ctdlroom *qrbuf, RoomNetCfg LineType, RoomNetCfgLine *Line); -OneRoomNetCfg* CtdlGetNetCfgForRoom(long QRNumber); +OneRoomNetCfg *CtdlGetNetCfgForRoom(long QRNumber); +void SaveRoomNetConfigFile(OneRoomNetCfg *, long); +void FreeRoomNetworkStruct(OneRoomNetCfg **); typedef struct _nodeconf { int DeleteMe; @@ -372,26 +354,9 @@ typedef struct __NetMap { HashList* CtdlReadNetworkMap(void); StrBuf *CtdlSerializeNetworkMap(HashList *Map); -void NetworkLearnTopology(char *node, char *path, HashList *the_netmap, int *netmap_changed); -int CtdlIsValidNode(const StrBuf **nexthop, - const StrBuf **secret, - StrBuf *node, - HashList *IgnetCfg, - HashList *the_netmap); - -int CtdlNetworkTalkingTo(const char *nodename, long len, int operation); - -/* - * Operations that can be performed by network_talking_to() - */ -enum { - NTT_ADD, - NTT_REMOVE, - NTT_CHECK -}; /* * Expose API calls from user_ops.c @@ -401,20 +366,13 @@ int CtdlGetUserLen(struct ctdluser *usbuf, const char *name, long len); int CtdlGetUserLock(struct ctdluser *usbuf, char *name); void CtdlPutUser(struct ctdluser *usbuf); void CtdlPutUserLock(struct ctdluser *usbuf); - int CtdlLockGetCurrentUser(void); void CtdlPutCurrentUserLock(void); - int CtdlGetUserByNumber(struct ctdluser *usbuf, long number); -void CtdlGetRelationship(visit *vbuf, - struct ctdluser *rel_user, - struct ctdlroom *rel_room); -void CtdlSetRelationship(visit *newvisit, - struct ctdluser *rel_user, - struct ctdlroom *rel_room); +void CtdlGetRelationship(visit *vbuf, struct ctdluser *rel_user, struct ctdlroom *rel_room); +void CtdlSetRelationship(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, const char *username); +int CtdlLoginExistingUser(const char *username); /* * Values which may be returned by CtdlLoginExistingUser() @@ -440,20 +398,20 @@ enum { void CtdlUserLogout(void); - - - /* * Expose API calls from msgbase.c */ - /* * Expose API calls from euidindex.c */ long CtdlLocateMessageByEuid(char *euid, struct ctdlroom *qrbuf); +/* + * Expose API calls from modules/openid/serv_openid_rp.c in order to turn it into a generic external authentication driver + */ +int attach_extauth(struct ctdluser *who, StrBuf *claimed_id); #endif /* CTDL_MODULE_H */