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)
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
***********************************************************************/
19
#include "support.h" /* fc__attribute */
24
#include "featured_text.h" /* ftc_*: color pre-definitions. */
28
#include "srv_main.h" /* enum server_states */
30
void package_chat_msg(struct packet_chat_msg *packet,
31
const struct connection *sender,
32
const struct ft_color color,
33
const char *format, ...)
34
fc__attribute((__format__ (__printf__, 4, 5)));
35
void vpackage_chat_msg(struct packet_chat_msg *packet,
36
const struct connection *sender,
37
const struct ft_color color,
40
void vpackage_event(struct packet_chat_msg *packet,
41
const struct tile *ptile,
42
enum event_type event,
43
const struct ft_color color,
47
void notify_conn(struct conn_list *dest,
48
const struct tile *ptile,
49
enum event_type event,
50
const struct ft_color color,
51
const char *format, ...)
52
fc__attribute((__format__ (__printf__, 5, 6)));
53
void notify_player(const struct player *pplayer,
54
const struct tile *ptile,
55
enum event_type event,
56
const struct ft_color color,
57
const char *format, ...)
58
fc__attribute((__format__ (__printf__, 5, 6)));
59
void notify_embassies(const struct player *pplayer,
60
const struct player *exclude,
61
const struct tile *ptile,
62
enum event_type event,
63
const struct ft_color color,
64
const char *format, ...)
65
fc__attribute((__format__ (__printf__, 6, 7)));
66
void notify_team(const struct player *pplayer,
67
const struct tile *ptile,
68
enum event_type event,
69
const struct ft_color color,
70
const char *format, ...)
71
fc__attribute((__format__ (__printf__, 5, 6)));
72
void notify_research(const struct player *pplayer,
73
enum event_type event,
74
const struct ft_color color,
75
const char *format, ...)
76
fc__attribute((__format__ (__printf__, 4, 5)));
80
/* The type of event target. */
81
struct event_cache_players;
83
void event_cache_init(void);
84
void event_cache_free(void);
85
void event_cache_remove_old(void);
87
void event_cache_add_for_all(const struct packet_chat_msg *packet);
88
void event_cache_add_for_global_observers(const struct packet_chat_msg *packet);
89
void event_cache_add_for_player(const struct packet_chat_msg *packet,
90
const struct player *pplayer);
91
struct event_cache_players *
92
event_cache_player_add(struct event_cache_players *players,
93
const struct player *pplayer)
94
fc__attribute((warn_unused_result));
95
void event_cache_add_for_players(const struct packet_chat_msg *packet,
96
struct event_cache_players *players);
98
void send_pending_events(struct connection *pconn, bool include_public);
101
void event_cache_load(struct section_file *file, const char *section);
102
void event_cache_save(struct section_file *file, const char *section);
104
#endif /* FC__NOTIFY_H */