country.h
Go to the documentation of this file.
1 // vim:set ft=c sw=2 sts=2 fenc=utf8:
2 
3 /*
4  * libasterix
5  * Copyright [2013-2020] SinoATC <http://www.sinoatc.com>.
6  * All Rights Reserved.
7  *
8  * NOTICE: All information contained herein is, and remains
9  * the property of SinoATC and its suppliers, if any.
10  * The intellectual and technical concepts contained herein
11  * are proprietary to Aerosys Corporation and its suppliers and may be
12  * covered by U.S. and Foreign Patents, patents in process,
13  * and are protected by trade secret or copyright law.
14  * Dissemination of this information or reproduction of this material
15  * is strictly forbidden unless prior written permission is obtained
16  * from SinoATC.
17  */
18 
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
32 extern "C" {
33 #endif
34 
37 typedef 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 
48 typedef ast_country_t (*ast_icao_addr_get_country_func_t)(const unsigned int icao_addr);
49 
52 
55 typedef 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 
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
#define AST_API
Definition: platform.h:63
This file includes platform specific definitions.
const char * country_name
Common English name.
Definition: country.h:42
bool valid
If country info is valid.
Definition: country.h:39
Country info definition.
Definition: country.h:37
void ast_reg_callback_get_national_flag(ast_get_national_flag_func_t callback)
Registry callback function of ast_get_national_flag_func_t.
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
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
const char * country_code3
ISO 3166-1 3-letter country code.
Definition: country.h:41