SEEN-Database: refactor database interface for remembering whether we already aggrega...
[citadel.git] / citadel / include / ctdl_module.h
index 14671171d1c4d01026d37a15e848ca4f44aa7731..a96cdffe5bea402ac2693267a4e800350d2e1b3a 100644 (file)
@@ -77,7 +77,7 @@
                SUBJECT) 
 
 
-#define CtdlAideFPMessage(TEXT, SUBJECT, N, STR, STRLEN) \
+#define CtdlAideFPMessage(TEXT, SUBJECT, N, STR, STRLEN, ccid, ioid, TIME) \
        flood_protect_quickie_message(                   \
                "Citadel",                               \
                NULL,                                    \
                SUBJECT,                                 \
                N,                                       \
                STR,                                     \
-               STRLEN)
+               STRLEN,                                  \
+               ccid,                                    \
+               ioid,                                    \
+               TIME)
 /*
  * Hook functions available to modules.
  */
@@ -226,6 +229,9 @@ long CtdlGetCurrentMessageNumber(void);
 /*
  * Expose various room operation functions from room_ops.c to the modules API
  */
+typedef struct CfgLineType CfgLineType;
+typedef struct RoomNetCfgLine RoomNetCfgLine;
+typedef struct OneRoomNetCfg OneRoomNetCfg;
 
 unsigned CtdlCreateRoom(char *new_room_name,
                        int new_room_type,
@@ -234,7 +240,7 @@ unsigned CtdlCreateRoom(char *new_room_name,
                        int really_create,
                        int avoid_access,
                        int new_room_view);
-int CtdlGetRoom(struct ctdlroom *qrbuf, char *room_name);
+int CtdlGetRoom(struct ctdlroom *qrbuf, const char *room_name);
 int CtdlGetRoomLock(struct ctdlroom *qrbuf, char *room_name);
 int CtdlDoIHavePermissionToDeleteThisRoom(struct ctdlroom *qr);
 void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf,
@@ -242,6 +248,12 @@ void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf,
 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);
+void SaveChangedConfigs(void);
+
 void CtdlDeleteRoom(struct ctdlroom *qrbuf);
 int CtdlRenameRoom(char *old_name, char *new_name, int new_floor);
 void CtdlUserGoto (char *where, int display_result, int transiently,
@@ -378,10 +390,6 @@ struct config {
 extern struct config config;
 
 
-typedef struct CfgLineType CfgLineType;
-typedef struct RoomNetCfgLine RoomNetCfgLine;
-typedef struct OneRoomNetCfg OneRoomNetCfg;
-
 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);
 typedef void (*CfgLineDeAllocator)(const CfgLineType *ThisOne, RoomNetCfgLine **data);
@@ -404,6 +412,7 @@ struct RoomNetCfgLine {
 
 struct OneRoomNetCfg {
        long lastsent;
+       long changed;
        StrBuf *Sender;
        StrBuf *RoomInfo;
        RoomNetCfgLine *NetConfigs[maxRoomNetCfg];
@@ -416,7 +425,10 @@ void RegisterRoomCfgType(const char* Name, long len, RoomNetCfg eCfg, CfgLinePar
 void ParseGeneric(const CfgLineType *ThisOne, StrBuf *Line, const char *LinePos, OneRoomNetCfg *sc);
 void SerializeGeneric(const CfgLineType *ThisOne, StrBuf *OutputBuffer, OneRoomNetCfg *sc, RoomNetCfgLine *data);
 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);
 
 typedef struct _nodeconf {
        int DeleteMe;