FreeCalypso > hg > themwi-system-sw
diff include/number_db_v2.h @ 226:28441920fb35
beginning of number database version 2
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 13 Aug 2023 22:01:25 -0800 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/number_db_v2.h Sun Aug 13 22:01:25 2023 -0800 @@ -0,0 +1,36 @@ +/* + * This header file defines version 2 of ThemWi number database + * binary file format. + */ + +struct numdb_file_hdr { + uint32_t owned_number_count; + uint32_t short_number_count; +}; + +struct owned_number_rec { + uint16_t number[3]; /* NPA-exchange-suffix breakdown */ + uint8_t number_flags; /* properties of outside number */ + uint8_t usage; /* usage inside ThemWi */ + uint16_t remap[3]; /* secondary remap number */ +}; + +#define NUMBER_FLAG_SMSPROV 0x01 /* provisioned for outside SMS */ +#define NUMBER_FLAG_E911PROV 0x02 /* provisioned for E911 */ + +#define NUMBER_USAGE_MASK 0x0F +#define NUMBER_USAGE_TYPE_RSVD 0x00 +#define NUMBER_USAGE_TYPE_GSM_SUB 0x01 +#define NUMBER_USAGE_TYPE_ALIAS 0x02 +#define NUMBER_USAGE_FLAG_E911_VIA 0x10 + +struct short_number_rec { + uint16_t short_num; + uint8_t short_num_type; + uint8_t fullnum_flags; + uint16_t fullnum_prefix[2]; +}; + +#define SHORT_NUM_TYPE_ABBREV 0x01 +#define SHORT_NUM_TYPE_ITN 0x02 +#define SHORT_NUM_TYPE_TEST_SINK 0x03