Fairport
v1.0.38
|
Contains the definition of all structures as persisted to disk. More...
Classes | |
struct | block_reference |
The combination of the id and physical location of a block or page. More... | |
struct | root |
The root of the database. More... | |
struct | header< ulonglong > |
The Unicode header structure. More... | |
struct | header< ulong > |
The ANSI header structure. More... | |
struct | header_crc_locations< ulong > |
The byte offsets used to calculate the CRCs in an ANSI PST. More... | |
struct | header_crc_locations< ulonglong > |
The byte offsets used to calculate the CRCs in a Unicode PST file. More... | |
struct | page_trailer< ulonglong > |
The Unicode store version of the page trailer. More... | |
struct | page_trailer< ulong > |
The ANSI store version of the page trailer. More... | |
struct | page |
Generic page structure. More... | |
struct | amap_page |
The authoritative source of free space in the file. More... | |
struct | pmap_page |
An old allocation system optimized for pages. More... | |
struct | fmap_page |
A deprecated allocation system optimized for AMap page searching. More... | |
struct | fpmap_page |
A deprecated allocation system optimized for PMap page searching. More... | |
struct | dlist_page |
A metapage holding information about AMap pages. More... | |
struct | bt_entry |
BTree Entry. More... | |
struct | nbt_leaf_entry |
NBT Leaf Entry. More... | |
struct | bbt_leaf_entry |
BBT Leaf Entry. More... | |
struct | bt_page |
The fundamental page structure which forms the basis of the two BTrees. More... | |
struct | nbt_nonleaf_page |
NBT non-leaf page. More... | |
struct | bbt_nonleaf_page |
BBT non-leaf page. More... | |
struct | nbt_leaf_page |
NBT leaf page. More... | |
struct | bbt_leaf_page |
BBT leaf page. More... | |
struct | block_trailer< ulonglong > |
Unicode store version of the block trailer. More... | |
struct | block_trailer< ulong > |
ANSI store version of the block trailer. More... | |
struct | external_block |
External block definition. More... | |
struct | extended_block< ulonglong > |
Unicode store version of the extended block. More... | |
struct | extended_block< ulong > |
ANSI store version of the extended block. More... | |
struct | sub_leaf_entry |
Entries on a leaf sub_block. More... | |
struct | sub_nonleaf_entry |
Entries on a nonleaf sub_block. More... | |
struct | sub_block |
Subnode Blocks. More... | |
struct | sub_nonleaf_block |
Subnode non-leaf block. More... | |
struct | sub_leaf_block |
Subnode leaf block. More... | |
struct | heap_first_header |
Header structure on the first heap block. More... | |
struct | heap_page_header |
Header structure on non-first/non-fill blocks. More... | |
struct | heap_page_fill_header |
Header structure on non-first/fill blocks. More... | |
struct | heap_page_map |
Provides a map of the allocations on a heap block. More... | |
struct | bth_header |
Describes the BTH, including the size of the keys/values and the heap_id of the root allocation. More... | |
struct | bth_nonleaf_entry |
Entries which make up a "non-leaf" BTH allocation. More... | |
struct | bth_leaf_entry |
Entries which make up a "leaf" BTH allocation. More... | |
struct | bth_node |
BTH node. More... | |
struct | bth_leaf_node |
BTH Leaf node. More... | |
struct | bth_nonleaf_node |
BTH Nonleaf node. More... | |
struct | prop_entry |
The value type of the BTH backing a pc. More... | |
struct | sub_object |
Sub object. More... | |
struct | mv_toc |
Multi-valued, variable length property TOC. More... | |
struct | column_description |
Describes a column. More... | |
struct | gust_column_description |
GUST Column description structure. More... | |
struct | tc_header |
The root_id allocation out of the Heap of a TC node. More... | |
struct | gust_header |
GUST TC Header. More... | |
struct | nameid |
Defines a id to name mapping. More... | |
struct | nameid_hash_entry |
A modified nameid structure used in the hash buckets. More... | |
Enumerations | |
enum | database_format { database_format_ansi_min = 14, database_format_ansi = 15, database_format_unicode_min = 20, database_format_unicode = 23 } |
Valid database format values (ANSI vs. Unicode) More... | |
enum | database_type { database_ost = 12, database_pst = 19 } |
Vaild database types (OST vs. PST) More... | |
enum | crypt_method { crypt_method_none = 0, crypt_method_permute = 1, crypt_method_cyclic = 2 } |
Valid "encryption" methods. More... | |
enum | page_type { page_type_bbt = 0x80, page_type_nbt = 0x81, page_type_fmap = 0x82, page_type_pmap = 0x83, page_type_amap = 0x84, page_type_fpmap = 0x85, page_type_dlist = 0x86 } |
Valid page types. More... | |
enum | block_types { block_type_external = 0x00, block_type_extended = 0x01, block_type_sub = 0x02 } |
The different block types. More... | |
enum | heap_client_signature { heap_sig_gmp = 0x6C, heap_sig_tc = 0x7C, heap_sig_smp = 0x8C, heap_sig_hmp = 0x9C, heap_sig_ch = 0xA5, heap_sig_chtc = 0xAC, heap_sig_bth = 0xB5, heap_sig_pc = 0xBC } |
Different heap client signature types. More... | |
enum | heap_fill_level { heap_fill_empty, heap_fill_1, heap_fill_2, heap_fill_3, heap_fill_4, heap_fill_5, heap_fill_6, heap_fill_7, heap_fill_8, heap_fill_9, heap_fill_10, heap_fill_11, heap_fill_12, heap_fill_13, heap_fill_14, heap_fill_full } |
enum | tc_offsets { tc_offsets_four, tc_offsets_two, tc_offsets_one, tc_offsets_bitmap, tc_offsets_max } |
Indices into the size offsets array. More... | |
Functions | |
template<typename T > | |
ushort | compute_signature (T id, T address) |
Calculate the signature of an item. | |
template<typename T > | |
ushort | compute_signature (const block_reference< T > &reference) |
Calculate the signature of an item. | |
ulong | compute_crc (const void *pdata, ulong cb) |
Compute the CRC of a block of data. | |
void | permute (void *pdata, ulong cb, bool encrypt) |
Modifies the data block in place, according to the permute method. | |
void | cyclic (void *pdata, ulong cb, ulong key) |
Modifies the data block in place, according to the cyclic method. | |
ulong | dlist_get_page_num (ulong entry) |
Get a amap page number (ordinal) from a DLIST entry. | |
ulong | dlist_get_slots (ulong entry) |
Get the number of free slots from a DLIST entry. | |
template<typename T > | |
size_t | align_disk (size_t size) |
Aligns a block size to the size on disk. | |
size_t | align_slot (size_t size) |
Aligns a block size to the slot size. | |
template<typename T > | |
bool | bid_is_external (T bid) |
Determines if a block is external or not. | |
template<typename T > | |
bool | bid_is_internal (T bid) |
Determines if a block is internal or not. | |
ushort | nameid_get_prop_index (const nameid &n) |
Returns the index of a given nameid structure. | |
ushort | nameid_get_guid_index (const nameid &n) |
Returns the index into the guid stream of the guid of a given nameid structure. | |
bool | nameid_is_string (const nameid &n) |
Returns true if the nameid structure is named by a string. | |
ushort | nameid_get_prop_index (const nameid_hash_entry &n) |
Returns the index of a given nameid_hash_entry structure. | |
ushort | nameid_get_guid_index (const nameid_hash_entry &n) |
Returns the index into the guid stream of the guid of a given nameid_hash_entry structure. | |
bool | nameid_is_string (const nameid_hash_entry &n) |
Returns true if the nameid_hash_entry structure is named by a string. | |
Variables | |
const size_t | header_fmap_entries = 128 |
The number of entries in the header's fmap structure. | |
const size_t | header_fpmap_size = 128 |
The number of entries in the header's fpmap structure. | |
const size_t | header_lock_entries = 32 |
The number of entries in the header's lock structure. | |
const ushort | pst_magic = 0x4D53 |
PST Magic number. | |
const ushort | ost_magic = 0x4F53 |
OST Magic number. | |
const uint | hlmagic = 0x4e444221 |
High/Low magic number. | |
const ulong | crc_table [] |
Precalulated CRC table, used by compute_crc. | |
const byte | table1 [] |
Data table1 used by permute and cyclic. | |
const byte | table2 [] |
Data table2 used by permute and cyclic. | |
const byte | table3 [] |
Data table3 used by permute and cyclic. | |
const size_t | page_size = 512 |
Size of all pages in the file in bytes, including the page trailer. | |
const size_t | bytes_per_slot = 64 |
Number of bytes each slot (bit) in an AMap page refers to. | |
const size_t | first_amap_page_location = 0x4400 |
The location of the first AMap page in the file. | |
const size_t | dlist_page_location = 0x4200 |
The location of the only DList page in the file. | |
const ulong | dlist_page_num_mask = 0x0000FFFF |
The portion of the dlist entry which refers to the amap page number. | |
const ulong | dlist_slots_shift = 20 |
The bits to shift a dlist entry to get the slots on that amap page. | |
const size_t | max_block_disk_size = 8 * 1024 |
The maximum individual block size. | |
const uint | block_id_attached_bit = 0x1 |
The attached bit indicates a block is referenced in memory This is an implementation detail, and this bit should be ignored. | |
const uint | block_id_internal_bit = 0x2 |
The internal bit indicates a block is an extended_block or a subnode_block. | |
const uint | block_id_increment = 0x4 |
The block id counter in the header is incremented by this amount for each block. | |
const byte | heap_signature = 0xEC |
Signature of a heap. | |
const uint | heap_max_alloc_size = 3580 |
Maximum allocation size in a heap. | |
const uint | heap_max_alloc_size_wver_14 = 3068 |
Maximum allocation size in a heap in a version 14 ANSI file. |
Contains the definition of all structures as persisted to disk.
const uint fairport::disk::block_id_attached_bit = 0x1 |