FreeCalypso > hg > themwi-system-sw
view include/number_db_v2.h @ 238:697fe2c87fec
themwi-check-own: convert to libnumdb2
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 14 Aug 2023 14:42:59 -0800 |
parents | 28441920fb35 |
children |
line wrap: on
line source
/* * 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