1 /**********************************************************************
2  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3    This program is free software; you can redistribute it and/or modify
4    it under the terms of the GNU General Public License as published by
5    the Free Software Foundation; either version 2, or (at your option)
6    any later version.
7 
8    This program is distributed in the hope that it will be useful,
9    but WITHOUT ANY WARRANTY; without even the implied warranty of
10    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11    GNU General Public License for more details.
12 ***********************************************************************/
13 #ifndef FC__DIPLHAND_H
14 #define FC__DIPLHAND_H
15 
16 #include "fc_types.h"
17 
18 #include "hand_gen.h"
19 
20 struct Treaty;
21 struct packet_diplomacy_info;
22 struct connection;
23 
24 #define SPECLIST_TAG treaty
25 #define SPECLIST_TYPE struct Treaty
26 #include "speclist.h"
27 
28 #define treaty_list_iterate(list, p) \
29     TYPED_LIST_ITERATE(struct Treaty, list, p)
30 #define treaty_list_iterate_end  LIST_ITERATE_END
31 
32 void establish_embassy(struct player *pplayer, struct player *aplayer);
33 
34 void diplhand_init(void);
35 void diplhand_free(void);
36 void free_treaties(void);
37 
38 struct Treaty *find_treaty(struct player *plr0, struct player *plr1);
39 
40 void send_diplomatic_meetings(struct connection *dest);
41 void cancel_all_meetings(struct player *pplayer);
42 void reject_all_treaties(struct player *pplayer);
43 
44 struct treaty_list *get_all_treaties(void);
45 
46 #endif  /* FC__DIPLHAND_H */
47