PST File Format SDK v0.4
Loading...
Searching...
No Matches
primitives.h File Reference

Primitive structures defined by MS-PST and MAPI. More...

#include <boost/config.hpp>
#include <boost/cstdint.hpp>
#include <cstring>
+ Include dependency graph for primitives.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pstsdk::alias_tag
 Tag structure used to indicate a copy constructed class should be an alias (shallow copy) rather than a deep copy. More...
 
struct  pstsdk::guid
 A Win32 GUID structure. More...
 

Namespaces

namespace  pstsdk
 Contains the definition of all in memory representations of disk structures.
 

Macros

#define PSTSDK_VALIDATION_LEVEL_WEAK
 Global Validation Settings.
 
#define PSTSDK_MS_STRUCT
 
#define make_nid(nid_type, nid_index)   (((nid_type)&nid_type_mask)|((nid_index) << 5))
 Construct a node_id (NID) from a node type and index.
 
#define make_prv_pub_nid(nid_index)   (make_nid(nid_type_folder, nid_index_prv_pub_base + (nid_index)))
 Construct a folders node_id for an OST file.
 

Typedefs

typedef boost::uint32_t pstsdk::uint
 
typedef boost::uint32_t pstsdk::ulong
 
typedef boost::int32_t pstsdk::slong
 
typedef boost::uint64_t pstsdk::ulonglong
 
typedef boost::int64_t pstsdk::slonglong
 
typedef boost::uint8_t pstsdk::byte
 
typedef boost::uint16_t pstsdk::ushort
 
typedef ulong pstsdk::node_id
 
typedef ulonglong pstsdk::block_id
 
typedef block_id pstsdk::page_id
 
typedef ulong pstsdk::heap_id
 
typedef ulong pstsdk::heapnode_id
 
typedef ushort pstsdk::prop_id
 
typedef ulong pstsdk::row_id
 

Enumerations

enum  pstsdk::nid_type {
  pstsdk::nid_type_none = 0x00 , pstsdk::nid_type_internal = 0x01 , pstsdk::nid_type_folder = 0x02 , pstsdk::nid_type_search_folder = 0x03 ,
  pstsdk::nid_type_message = 0x04 , pstsdk::nid_type_attachment = 0x05 , pstsdk::nid_type_search_update_queue = 0x06 , pstsdk::nid_type_search_criteria_object = 0x07 ,
  pstsdk::nid_type_associated_message = 0x08 , pstsdk::nid_type_storage = 0x09 , pstsdk::nid_type_contents_table_index = 0x0A , pstsdk::nid_type_receive_folder_table = 0x0B ,
  pstsdk::nid_type_outgoing_queue_table = 0x0C , pstsdk::nid_type_hierarchy_table = 0x0D , pstsdk::nid_type_contents_table = 0x0E , pstsdk::nid_type_associated_contents_table = 0x0F ,
  pstsdk::nid_type_search_contents_table = 0x10 , pstsdk::nid_type_attachment_table = 0x11 , pstsdk::nid_type_recipient_table = 0x12 , pstsdk::nid_type_search_table_index = 0x13 ,
  pstsdk::nid_type_contents_smp = 0x14 , pstsdk::nid_type_associated_contents_smp = 0x15 , pstsdk::nid_type_change_history_table = 0x16 , pstsdk::nid_type_tombstone_table = 0x17 ,
  pstsdk::nid_type_tombstone_date_table = 0x18 , pstsdk::nid_type_lrep_dups_table = 0x19 , pstsdk::nid_type_folder_path_tombstone_table = 0x1A , pstsdk::nid_type_ltp = 0x1F ,
  pstsdk::nid_type_max = 0x20
}
 Different node types found in a PST file. More...
 
enum  pstsdk::predefined_nid {
  pstsdk::nid_message_store = make_nid(nid_type_internal, 0x1) , pstsdk::nid_name_id_map = make_nid(nid_type_internal, 0x3) , pstsdk::nid_normal_folder_template = make_nid(nid_type_folder, 0x6) , pstsdk::nid_search_folder_template = make_nid(nid_type_search_folder, 0x7) ,
  pstsdk::nid_root_folder = make_nid(nid_type_folder, 0x9) , pstsdk::nid_search_management_queue = make_nid(nid_type_internal, 0xF) , pstsdk::nid_search_activity_list = make_nid(nid_type_internal, 0x10) , pstsdk::nid_search_domain_alternative = make_nid(nid_type_internal, 0x12) ,
  pstsdk::nid_search_domain_object = make_nid(nid_type_internal, 0x13) , pstsdk::nid_search_gatherer_queue = make_nid(nid_type_internal, 0x14) , pstsdk::nid_search_gatherer_descriptor = make_nid(nid_type_internal, 0x15) , pstsdk::nid_table_rebuild_queue = make_nid(nid_type_internal, 0x17) ,
  pstsdk::nid_junk_mail_pihsl = make_nid(nid_type_internal, 0x18) , pstsdk::nid_search_gatherer_folder_queue = make_nid(nid_type_internal, 0x19) , pstsdk::nid_tc_sub_props = make_nid(nid_type_internal, 0x27) , pstsdk::nid_index_template = 0x30 ,
  pstsdk::nid_hierarchy_table_template = make_nid(nid_type_hierarchy_table, nid_index_template) , pstsdk::nid_contents_table_template = make_nid(nid_type_contents_table, nid_index_template) , pstsdk::nid_associated_contents_table_template = make_nid(nid_type_associated_contents_table, nid_index_template) , pstsdk::nid_search_contents_table_template = make_nid(nid_type_search_contents_table, nid_index_template) ,
  pstsdk::nid_smp_template = make_nid(nid_type_contents_smp, nid_index_template) , pstsdk::nid_tombstone_table_template = make_nid(nid_type_tombstone_table, nid_index_template) , pstsdk::nid_lrep_dups_table_template = make_nid(nid_type_lrep_dups_table, nid_index_template) , pstsdk::nid_receive_folders = make_nid(nid_type_receive_folder_table, 0x31) ,
  pstsdk::nid_outgoing_queue = make_nid(nid_type_outgoing_queue_table, 0x32) , pstsdk::nid_attachment_table = make_nid(nid_type_attachment_table, 0x33) , pstsdk::nid_recipient_table = make_nid(nid_type_recipient_table, 0x34) , pstsdk::nid_change_history_table = make_nid(nid_type_change_history_table, 0x35) ,
  pstsdk::nid_tombstone_table = make_nid(nid_type_tombstone_table, 0x36) , pstsdk::nid_tombstone_date_table = make_nid(nid_type_tombstone_date_table, 0x37) , pstsdk::nid_all_message_search_folder = make_nid(nid_type_search_folder, 0x39) , pstsdk::nid_all_message_search_contents = make_nid(nid_type_search_contents_table, 0x39) ,
  pstsdk::nid_lrep_gmp = make_nid(nid_type_internal, 0x40) , pstsdk::nid_lrep_folders_smp = make_nid(nid_type_internal, 0x41) , pstsdk::nid_lrep_folders_table = make_nid(nid_type_internal, 0x42) , pstsdk::nid_folder_path_tombstone_table = make_nid(nid_type_internal, 0x43) ,
  pstsdk::nid_hst_hmp = make_nid(nid_type_internal, 0x60) , pstsdk::nid_index_prv_pub_base = 0x100 , pstsdk::nid_pub_root_folder = make_prv_pub_nid(0) , pstsdk::nid_prv_root_folder = make_prv_pub_nid(5) ,
  pstsdk::nid_criterr_notification = make_nid(nid_type_internal, 0x3FD) , pstsdk::nid_object_notification = make_nid(nid_type_internal, 0x3FE) , pstsdk::nid_newemail_notification = make_nid(nid_type_internal, 0x3FF) , pstsdk::nid_extended_notification = make_nid(nid_type_internal, 0x400) ,
  pstsdk::nid_indexing_notification = make_nid(nid_type_internal, 0x401)
}
 The predefined nodes in a PST/OST file. More...
 
enum  pstsdk::prop_type {
  pstsdk::prop_type_unspecified = 0 , pstsdk::prop_type_null = 1 , pstsdk::prop_type_short = 2 , pstsdk::prop_type_mv_short = 4098 ,
  pstsdk::prop_type_long = 3 , pstsdk::prop_type_mv_long = 4099 , pstsdk::prop_type_float = 4 , pstsdk::prop_type_mv_float = 4100 ,
  pstsdk::prop_type_double = 5 , pstsdk::prop_type_mv_double = 4101 , pstsdk::prop_type_currency = 6 , pstsdk::prop_type_mv_currency = 4102 ,
  pstsdk::prop_type_apptime = 7 , pstsdk::prop_type_mv_apptime = 4103 , pstsdk::prop_type_error = 10 , pstsdk::prop_type_boolean = 11 ,
  pstsdk::prop_type_object = 13 , pstsdk::prop_type_longlong = 20 , pstsdk::prop_type_mv_longlong = 4116 , pstsdk::prop_type_string = 30 ,
  pstsdk::prop_type_mv_string = 4126 , pstsdk::prop_type_wstring = 31 , pstsdk::prop_type_mv_wstring = 4127 , pstsdk::prop_type_systime = 64 ,
  pstsdk::prop_type_mv_systime = 4160 , pstsdk::prop_type_guid = 72 , pstsdk::prop_type_mv_guid = 4168 , pstsdk::prop_type_binary = 258 ,
  pstsdk::prop_type_mv_binary = 4354
}
 The different property types as defined by MAPI. More...
 
enum  pstsdk::recipient_type { pstsdk::mapi_to = 1 , pstsdk::mapi_cc = 2 , pstsdk::mapi_bcc = 3 }
 The different recipient types as defined by MAPI. More...
 

Functions

nid_type pstsdk::get_nid_type (node_id id)
 Get a node type from a node id.
 
ulong pstsdk::get_nid_index (node_id id)
 Get a node index from a node id.
 
ulong pstsdk::get_heap_page (heap_id id)
 Get the heap page from the heap id.
 
ulong pstsdk::get_heap_index (heap_id id)
 Get the index from the heap id.
 
heap_id pstsdk::make_heap_id (ulong page, ulong index)
 Create a heap_id from a page and an index.
 
bool pstsdk::is_heap_id (heapnode_id id)
 Inspects a heapnode_id (also known as a HNID) to determine if it is a heap_id (HID)
 
bool pstsdk::is_subnode_id (heapnode_id id)
 Inspects a heapnode_id (also known as a HNID) to determine if it is a node_id (NID)
 
bool pstsdk::guid_eq (const guid &l, const guid &r)
 

Variables

const ulong pstsdk::nid_type_mask = 0x1FL
 The portion of a node_id reserved for the type.
 
const byte pstsdk::message_subject_prefix_lead_byte = 0x01
 A sentinel byte which indicates the message subject contains a prefix.
 
const guid pstsdk::ps_none = { 0, 0, 0, { 0, 0, 0, 0, 0, 0, 0, 0 } }
 The NULL guid.
 
const guid pstsdk::ps_mapi = { 0x20328, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } }
 The PS_MAPI guid.
 
const guid pstsdk::ps_public_strings = { 0x20329, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } }
 The PS_PUBLIC_STRINGS guid.
 
const guid pstsdk::ps_appointment = {0x62002, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } }
 The PS_APPOINTMENT guid.
 
const guid pstsdk::ps_task = {0x62003, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } }
 The PS_TASK guid.
 
const guid pstsdk::ps_common = {0x62008, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } }
 The PS_COMMON guid.
 
const guid pstsdk::ps_address = {0x62004, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } }
 The PSETID_Address guid.
 
const guid pstsdk::ps_meeting = {0x6ED8DA90, 0x450B, 0x101B, { 0x98, 0xDA, 0x00, 0xAA, 0x00, 0x3F, 0x13, 0x05 } }
 The PSETID_Meeting guid.
 
const guid pstsdk::ps_internet_headers = {0x20386, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } }
 The PS_INTERNET_HEADERS guid.
 
const guid pstsdk::ps_sharing = {0x62040, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } }
 The PSETID_Sharing guid.
 
const guid pstsdk::ps_log = {0x6200A, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } }
 The PSETID_Log guid.
 
const guid pstsdk::ps_postrss = {0x62041, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } }
 The PSETID_PostRss guid.
 
const guid pstsdk::ps_note = {0x6200E, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } }
 The PSETID_Note guid.
 
const guid pstsdk::ps_calendarassistant = {0x11000E07, 0xB51B, 0x40D6, { 0xAF, 0x21, 0xCA, 0xA8, 0x5E, 0xDA, 0xB1, 0xD0 } }
 The PSETID_CalendarAssistant guid.
 
const guid pstsdk::ps_remote = {0x62014, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } }
 The PSETID_Remote guid.
 
const guid pstsdk::provider_uid_wrapped_entry_id = {0xD3AD91C0, 0x9D51, 0x11CF, { 0xA4, 0xA9, 0x00, 0xAA, 0x00, 0x47, 0xFA, 0xA4 } }
 The ProviderUID for WrappedEntryId.
 
const guid pstsdk::provider_uid_recipient_oneoff = {0xA41F2B81, 0xA3BE, 0x1910, { 0x9D, 0x6E, 0x00, 0xDD, 0x01, 0x0F, 0x54, 0x02 } }
 The ProviderUID for Recipient One-Off EntryID.
 

Detailed Description

Primitive structures defined by MS-PST and MAPI.

Author
Terry Mahaffey

Definition in file primitives.h.

Macro Definition Documentation

◆ PSTSDK_MS_STRUCT

#define PSTSDK_MS_STRUCT

Definition at line 58 of file primitives.h.