9#ifndef PSTSDK_UTIL_PRIMITIVES_H
10#define PSTSDK_UTIL_PRIMITIVES_H
12#include <boost/config.hpp>
13#include <boost/cstdint.hpp>
20#ifdef BOOST_NO_RVALUE_REFERENCES
21#ifndef SUPPRESS_CPLUSPLUS0X_MESSAGES
22#pragma message("C++0x rvalue references not supported; consider updating your compiler")
26#ifdef BOOST_NO_STATIC_ASSERT
27#include <boost/static_assert.hpp>
28#define static_assert(x,y) BOOST_STATIC_ASSERT(x)
40#ifndef PSTSDK_VALIDATION_LEVEL_NONE
41#define PSTSDK_VALIDATION_LEVEL_WEAK
44#ifdef PSTSDK_VALIDATION_LEVEL_FULL
46#define PSTSDK_VALIDATION_LEVEL_WEAK
56#define PSTSDK_MS_STRUCT __attribute__((ms_struct))
58#define PSTSDK_MS_STRUCT
67typedef boost::uint32_t
uint;
72typedef boost::uint8_t
byte;
77static_assert(
sizeof(
byte) == 1,
"pstsdk::byte unexpected size");
78static_assert(
sizeof(
ushort) == 2,
"pstsdk::ushort unexpected size");
79static_assert(
sizeof(
uint) == 4,
"pstsdk::uint unexpected size");
80static_assert(
sizeof(
ulonglong) == 8,
"pstsdk::ulonglong unexpected size");
160#define make_nid(nid_type,nid_index) (((nid_type)&nid_type_mask)|((nid_index) << 5))
164#define make_prv_pub_nid(nid_index) (make_nid(nid_type_folder, nid_index_prv_pub_base + (nid_index)))
244 {
return (
id >> 16); }
252 {
return (((
id >> 5) - 1) & 0x7FF); }
260 {
return (
heap_id)((
page << 16) | ((index + 1) << 5)); }
361 auto small_parts =
l.data1 ==
r.data1 &&
l.data2 ==
r.data2 &&
l.data3 ==
r.data3;
367static_assert(
sizeof(guid) == 16,
"guid incorrect size");
372const guid ps_none = { 0, 0, 0, { 0, 0, 0, 0, 0, 0, 0, 0 } };
377const guid ps_mapi = { 0x20328, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } };
382const guid ps_public_strings = { 0x20329, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } };
385const guid ps_appointment = {0x62002, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } };
388const guid ps_task = {0x62003, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } };
391const guid ps_common = {0x62008, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } };
394const guid ps_address = {0x62004, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } };
397const guid ps_meeting = {0x6ED8DA90, 0x450B, 0x101B, { 0x98, 0xDA, 0x00, 0xAA, 0x00, 0x3F, 0x13, 0x05 } };
400const guid ps_internet_headers = {0x20386, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } };
403const guid ps_sharing = {0x62040, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } };
406const guid ps_log = {0x6200A, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } };
409const guid ps_postrss = {0x62041, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } };
412const guid ps_note = {0x6200E, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } };
415const guid ps_calendarassistant = {0x11000E07, 0xB51B, 0x40D6, { 0xAF, 0x21, 0xCA, 0xA8, 0x5E, 0xDA, 0xB1, 0xD0 } };
418const guid ps_remote = {0x62014, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } };
422const guid provider_uid_wrapped_entry_id = {0xD3AD91C0, 0x9D51, 0x11CF, { 0xA4, 0xA9, 0x00, 0xAA, 0x00, 0x47, 0xFA, 0xA4 } };
427const guid provider_uid_recipient_oneoff = {0xA41F2B81, 0xA3BE, 0x1910, { 0x9D, 0x6E, 0x00, 0xDD, 0x01, 0x0F, 0x54, 0x02 } };
Contains references to other bth_node allocations.
Generic base class for all page typesA page which forms a node in the NBT or BBT.
ulong get_heap_page(heap_id id)
Get the heap page from the heap id.
const byte message_subject_prefix_lead_byte
A sentinel byte which indicates the message subject contains a prefix.
boost::uint64_t ulonglong
ulong get_nid_index(node_id id)
Get a node index from a node id.
recipient_type
The different recipient types as defined by MAPI.
nid_type
Different node types found in a PST file.
nid_type get_nid_type(node_id id)
Get a node type from a node id.
#define make_prv_pub_nid(nid_index)
Construct a folders node_id for an OST file.
#define make_nid(nid_type, nid_index)
Construct a node_id (NID) from a node type and index.
heap_id make_heap_id(ulong page, ulong index)
Create a heap_id from a page and an index.
predefined_nid
The predefined nodes in a PST/OST file.
const guid ps_public_strings
The PS_PUBLIC_STRINGS guid.
ulong get_heap_index(heap_id id)
Get the index from the heap id.
const guid ps_none
The NULL guid.
const ulong nid_type_mask
The portion of a node_id reserved for the type.
bool is_heap_id(heapnode_id id)
Inspects a heapnode_id (also known as a HNID) to determine if it is a heap_id (HID)
const guid ps_mapi
The PS_MAPI guid.
bool is_subnode_id(heapnode_id id)
Inspects a heapnode_id (also known as a HNID) to determine if it is a node_id (NID)
prop_type
The different property types as defined by MAPI.
@ nid_type_hierarchy_table
@ nid_type_contents_table
@ nid_type_folder_path_tombstone_table
@ nid_type_contents_table_index
@ nid_type_search_contents_table
@ nid_type_tombstone_table
@ nid_type_change_history_table
@ nid_type_associated_contents_table
@ nid_type_lrep_dups_table
@ nid_type_recipient_table
@ nid_type_attachment_table
@ nid_type_receive_folder_table
@ nid_type_search_table_index
@ nid_type_associated_contents_smp
@ nid_type_search_update_queue
@ nid_type_tombstone_date_table
@ nid_type_outgoing_queue_table
@ nid_type_search_criteria_object
@ nid_type_associated_message
@ nid_search_management_queue
@ nid_search_gatherer_descriptor
@ nid_tombstone_date_table
@ nid_search_folder_template
@ nid_all_message_search_folder
@ nid_search_domain_object
@ nid_folder_path_tombstone_table
@ nid_extended_notification
@ nid_normal_folder_template
@ nid_lrep_dups_table_template
@ nid_search_domain_alternative
@ nid_newemail_notification
@ nid_indexing_notification
@ nid_search_contents_table_template
@ nid_object_notification
@ nid_message_store
The property bag for this file.
@ nid_search_gatherer_folder_queue
@ nid_search_activity_list
@ nid_name_id_map
Contains the named prop mappings.
@ nid_table_rebuild_queue
@ nid_associated_contents_table_template
@ nid_criterr_notification
@ nid_root_folder
Root folder of the store.
@ nid_search_gatherer_queue
@ nid_change_history_table
@ nid_all_message_search_contents
@ nid_hierarchy_table_template
@ nid_contents_table_template
@ nid_tombstone_table_template
@ prop_type_apptime
VT_DATE.
@ prop_type_systime
Win32 FILETIME.
Contains the definition of all in memory representations of disk structures.
const guid ps_appointment
The PS_APPOINTMENT guid.
const guid ps_calendarassistant
The PSETID_CalendarAssistant guid.
const guid ps_common
The PS_COMMON guid.
const guid ps_internet_headers
The PS_INTERNET_HEADERS guid.
const guid ps_note
The PSETID_Note guid.
const guid ps_address
The PSETID_Address guid.
const guid ps_meeting
The PSETID_Meeting guid.
const guid provider_uid_recipient_oneoff
The ProviderUID for Recipient One-Off EntryID.
const guid ps_task
The PS_TASK guid.
const guid ps_log
The PSETID_Log guid.
const guid provider_uid_wrapped_entry_id
The ProviderUID for WrappedEntryId.
const guid ps_remote
The PSETID_Remote guid.
bool guid_eq(const guid &l, const guid &r)
const guid ps_postrss
The PSETID_PostRss guid.
const guid ps_sharing
The PSETID_Sharing guid.
Tag structure used to indicate a copy constructed class should be an alias (shallow copy) rather than...