Back to index

citadel  8.12
netspool.h
Go to the documentation of this file.
00001 /*
00002  * This module handles shared rooms, inter-Citadel mail, and outbound
00003  * mailing list processing.
00004  *
00005  * Copyright (c) 2000-2012 by the citadel.org team
00006  *
00007  *  This program is open source software; you can redistribute it and/or modify
00008  *  it under the terms of the GNU General Public License as published by
00009  *  the Free Software Foundation; either version 3 of the License, or
00010  *  (at your option) any later version.
00011  *
00012  *  This program is distributed in the hope that it will be useful,
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *  GNU General Public License for more details.
00016  *
00017  *  You should have received a copy of the GNU General Public License
00018  *  along with this program; if not, write to the Free Software
00019  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  *
00021  * ** NOTE **   A word on the S_NETCONFIGS semaphore:
00022  * This is a fairly high-level type of critical section.  It ensures that no
00023  * two threads work on the netconfigs files at the same time.  Since we do
00024  * so many things inside these, here are the rules:
00025  *  1. begin_critical_section(S_NETCONFIGS) *before* begin_ any others.
00026  *  2. Do *not* perform any I/O with the client during these sections.
00027  *
00028  */
00029 
00030 typedef struct maplist maplist;
00031 
00032 struct maplist {
00033        struct maplist *next;
00034        char remote_nodename[SIZ];
00035        char remote_roomname[SIZ];
00036 };
00037 
00038 
00039 typedef struct SpoolControl SpoolControl;
00040 
00041 struct SpoolControl {
00042        long lastsent;
00043        namelist *listrecps;
00044        namelist *digestrecps;
00045        namelist *participates;
00046        maplist *ignet_push_shares;
00047        char *misc;
00048        FILE *digestfp;
00049        int num_msgs_spooled;
00050 
00051        HashList *working_ignetcfg;
00052        HashList *the_netmap;
00053 };
00054 
00055 
00056 void network_spoolout_room(RoomProcList *room_to_spool,                      
00057                         HashList *working_ignetcfg,
00058                         HashList *the_netmap);
00059 void network_do_spoolin(HashList *working_ignetcfg, HashList *the_netmap, int *netmap_changed);
00060 void network_consolidate_spoolout(HashList *working_ignetcfg, HashList *the_netmap);
00061 void free_spoolcontrol_struct(SpoolControl **scc);
00062 int writenfree_spoolcontrol_file(SpoolControl **scc, char *filename);
00063 int read_spoolcontrol_file(SpoolControl **scc, char *filename);
00064 int is_recipient(SpoolControl *sc, const char *Name);