Freeciv-3.1: /fast/freeciv/nightly/S3_1/server/diplhand.h File Reference

Freeciv-3.1

Loading...
Searching...
No Matches
Macros | Functions
diplhand.h File Reference
`#include "fc_types.h"`
`#include <hand_gen.h>`
`#include "speclist.h"`

Go to the source code of this file.

## Macros

#define | SPECLIST_TAG treaty
#define | SPECLIST_TYPE struct Treaty
#define | treaty_list_iterate(list, p) TYPED_LIST_ITERATE(struct Treaty, list, p)
#define | treaty_list_iterate_end LIST_ITERATE_END

## Functions

void | establish_embassy (struct player *pplayer, struct player *aplayer)
void | diplhand_init (void)
void | diplhand_free (void)
void | free_treaties (void)
struct Treaty * | find_treaty (struct player *plr0, struct player *plr1)
void | send_diplomatic_meetings (struct connection *dest)
void | cancel_all_meetings (struct player *pplayer)
void | reject_all_treaties (struct player *pplayer)
struct treaty_list * | get_all_treaties (void)
void | set_diplstate_type (struct player_diplstate *state1, struct player_diplstate *state2, enum diplstate_type type)

## Macro Definition Documentation

## ◆ SPECLIST_TAG

#define SPECLIST_TAG treaty

Definition at line 26 of file diplhand.h.

## ◆ SPECLIST_TYPE

#define SPECLIST_TYPE struct Treaty

Definition at line 27 of file diplhand.h.

## ◆ treaty_list_iterate

#define treaty_list_iterate | ( |  | list,
|  |  | p
| ) |  | TYPED_LIST_ITERATE(struct Treaty, list, p)

Definition at line 30 of file diplhand.h.

## ◆ treaty_list_iterate_end

#define treaty_list_iterate_end LIST_ITERATE_END

Definition at line 32 of file diplhand.h.

## Function Documentation

## ◆ cancel_all_meetings()

void cancel_all_meetings | ( | struct player * | pplayer | ) |

Cancels all meetings of player.

Definition at line 950 of file diplhand.c.

Referenced by kill_player(), player_set_to_ai_mode(), and player_set_under_human_control().

## ◆ diplhand_free()

void diplhand_free | ( | void |  | ) |

Free all the resources allocated by diplhand.

Definition at line 96 of file diplhand.c.

Referenced by server_quit().

## ◆ diplhand_init()

void diplhand_init | ( | void |  | ) |

Initialize diplhand module

Definition at line 88 of file diplhand.c.

Referenced by srv_prepare().

## ◆ establish_embassy()

void establish_embassy | ( | struct player * | pplayer,
|  | struct player * | aplayer
| ) |  |

Create an embassy. pplayer gets an embassy with aplayer.

Definition at line 724 of file diplhand.c.

Referenced by diplomat_embassy(), handle_diplomacy_accept_treaty_req(), and split_player().

## ◆ find_treaty()

struct Treaty * find_treaty | ( | struct player * | plr0,
|  | struct player * | plr1
| ) |  |

Find currently active treaty between two players.

Definition at line 121 of file diplhand.c.

Referenced by cancel_all_meetings(), clear_old_treaty(), handle_diplomacy_accept_treaty_req(), handle_diplomacy_create_clause_req(), handle_diplomacy_init_meeting_req(), handle_diplomacy_remove_clause_req(), really_diplomacy_cancel_meeting(), reject_all_treaties(), and send_diplomatic_meetings().

## ◆ free_treaties()

void free_treaties | ( | void |  | ) |

Free all the treaties currently in treaty list.

Definition at line 107 of file diplhand.c.

Referenced by diplhand_free(), and server_game_free().

## ◆ get_all_treaties()

struct treaty_list * get_all_treaties | ( | void |  | ) |

Get treaty list

Definition at line 986 of file diplhand.c.

Referenced by sg_load_treaties(), sg_load_treaties(), and sg_save_treaties().

## ◆ reject_all_treaties()

void reject_all_treaties | ( | struct player * | pplayer | ) |

Reject all treaties currently being negotiated

Definition at line 962 of file diplhand.c.

Referenced by handle_diplomacy_cancel_pact().

## ◆ send_diplomatic_meetings()

void send_diplomatic_meetings | ( | struct connection * | dest | ) |

Send information on any on-going diplomatic meetings for connection's player. For re-connections.

Definition at line 912 of file diplhand.c.

Referenced by begin_phase(), and connection_attach_real().

## ◆ set_diplstate_type()

void set_diplstate_type | ( | struct player_diplstate * | state1,
|  | struct player_diplstate * | state2,
|  | enum diplstate_type | type
| ) |  |

Set diplstate between two players.

Definition at line 159 of file diplhand.c.

Referenced by barbarian_initial_wars(), handle_diplomacy_accept_treaty_req(), make_contact(), split_player(), and srv_ready().