country.h
Go to the documentation of this file.
1/*
2 * $COPYRIGHT-BEGIN$
3 * libasterix
4 * Copyright [2013-2026] SinoATC <http://www.sinoatc.com>.
5 * All Rights Reserved.
6 *
7 * NOTICE: All information contained herein is, and remains
8 * the property of SinoATC and its suppliers, if any.
9 * The intellectual and technical concepts contained herein
10 * are proprietary to SinoATC and its suppliers and may be
11 * covered by U.S. and Foreign Patents, patents in process,
12 * and are protected by trade secret or copyright law.
13 * Dissemination of this information or reproduction of this material
14 * is strictly forbidden unless prior written permission is obtained
15 * from SinoATC.
16 * $COPYRIGHT-END$
17 */
18
23
24#ifndef LIBASTERIX_COUNTRY_H
25#define LIBASTERIX_COUNTRY_H
26
27#include <stddef.h>
28#include <stdbool.h>
29#include "platform.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
37typedef struct _ast_country_t
38{
39 bool valid;
40 const char* country_code2;
41 const char* country_code3;
42 const char* country_name;
43 const char* country_fullname;
45
48typedef ast_country_t (*ast_icao_addr_get_country_func_t)(const unsigned int icao_addr);
49
52
55typedef const char* (*ast_get_national_flag_func_t)(const char* country_code2);
56
59
60#ifdef __cplusplus
61 }
62#endif // extern "C"
63
64#endif //LIBASTERIX_COUNTRY_H
65
66// vim:set ft=c.doxygen sw=2 sts=2 fenc=utf8:
void ast_reg_callback_icao_addr_get_country(ast_icao_addr_get_country_func_t callback)
Registry callback function of ast_icao_addr_get_country_func_t.
ast_country_t(* ast_icao_addr_get_country_func_t)(const unsigned int icao_addr)
Function prototype of getting country info from ICAO 24-bit address.
Definition country.h:48
void ast_reg_callback_get_national_flag(ast_get_national_flag_func_t callback)
Registry callback function of ast_get_national_flag_func_t.
const char *(* ast_get_national_flag_func_t)(const char *country_code2)
Function prototype of getting national flag image link from ISO 2-letter country code.
Definition country.h:55
This file includes platform specific definitions.
#define AST_API
Definition platform.h:63
Country info definition.
Definition country.h:38
const char * country_fullname
Full English name.
Definition country.h:43
const char * country_code2
ISO 3166-1 2-letter country code.
Definition country.h:40
bool valid
If country info is valid.
Definition country.h:39
const char * country_name
Common English name.
Definition country.h:42
const char * country_code3
ISO 3166-1 3-letter country code.
Definition country.h:41