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.
*/
#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);
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
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);
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);
*/
void CtdlModuleDoSearch(int *num_msgs, long **search_msgs, const char *search_string, const char *func_name);
-
-#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))
-
-extern struct config config;
-
-
-#define NODENAME config.c_nodename
-#define FQDN config.c_fqdn
+#define NODENAME CtdlGetConfigStr("c_nodename")
+#define FQDN CtdlGetConfigStr("c_fqdn")
#define CTDLUID 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 CREATAIDE CtdlGetConfigInt("c_creataide")
+#define REGISCALL CtdlGetConfigInt("c_regiscall")
+#define TWITDETECT CtdlGetConfigInt("c_twitdetect")
+#define TWITROOM CtdlGetConfigStr("c_twitroom")
+#define RESTRICT_INTERNET CtdlGetConfigInt("c_restrict")
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);
struct OneRoomNetCfg {
long lastsent;
- long changed;
+ // long changed;
StrBuf *Sender;
StrBuf *RoomInfo;
RoomNetCfgLine *NetConfigs[maxRoomNetCfg];
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;
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
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()
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 */