bygfoot/src/league.h

70 lines
1.7 KiB
C
Raw Normal View History

#ifndef LEAGUE_H
#define LEAGUE_H
2004-12-23 13:58:39 +01:00
#include "bygfoot.h"
#include "league_struct.h"
2005-03-19 21:04:08 +01:00
#include "fixture_struct.h"
2004-12-23 13:58:39 +01:00
2005-05-08 19:56:26 +02:00
#define league_cup_get_teams(clid) (clid < ID_CUP_START) ? ((gpointer)(league_from_clid(clid)->teams)) : ((gpointer)(cup_from_clid(clid)->teams))
2005-04-16 09:46:04 +02:00
#define league_cup_get_fixtures(clid) (clid < ID_CUP_START) ? (league_from_clid(clid)->fixtures) : (cup_from_clid(clid)->fixtures)
2005-04-07 23:10:31 +02:00
#define league_cup_get_name_string(clid) (clid < ID_CUP_START) ? league_from_clid(clid)->name->str : cup_from_clid(clid)->name->str
2005-04-16 09:46:04 +02:00
#define league_cup_get_yellow_red(clid) (clid < ID_CUP_START) ? (league_from_clid(clid)->yellow_red) : (cup_from_clid(clid)->yellow_red)
2005-03-27 19:59:57 +02:00
2005-05-28 12:41:53 +02:00
#define query_league_has_prom_games(league) (strlen(league->prom_rel.prom_games_dest_sid->str) > 0)
2005-04-14 21:07:25 +02:00
2004-12-23 13:58:39 +01:00
League
2005-04-14 21:07:25 +02:00
league_new(gboolean new_id);
2004-12-23 13:58:39 +01:00
PromRelElement
prom_rel_element_new(void);
2005-01-09 21:21:22 +01:00
TableElement
league_table_element_new(Team *team);
gint
league_cup_get_index_from_clid(gint clid);
League*
league_from_clid(gint clid);
2005-03-14 18:47:27 +01:00
gint
league_cup_get_next_clid(gint clid);
gint
league_cup_get_previous_clid(gint clid);
Fixture*
league_cup_get_next_fixture(gint clid, gint week_number, gint week_round_number);
Fixture*
league_cup_get_previous_fixture(gint clid, gint week_number, gint week_round_number);
gint
league_get_index(gint clid);
2005-03-16 21:48:25 +01:00
gint
league_cup_average_capacity(gint clid);
2005-04-13 15:01:59 +02:00
void
league_get_team_movements(League *league, GArray *team_movements);
gint
league_index_from_sid(const gchar *sid);
void
league_remove_team_with_id(League *league, gint id);
void
league_season_start(League *league);
gboolean
query_league_rank_in_prom_games(const League *league, gint rank);
gboolean
query_league_prom_games_begin(const League *league);
2005-04-24 16:19:57 +02:00
gboolean
query_league_matches_in_week(const League *league, gint week_number);
2004-12-23 13:58:39 +01:00
#endif