PST File Format SDK v0.4
Loading...
Searching...
No Matches
Primitive Types
+ Collaboration diagram for Primitive Types:

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...
 

Macros

#define PSTSDK_VALIDATION_LEVEL_WEAK
 Global Validation Settings.
 
#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)
 

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.
 

Detailed Description

Macro Definition Documentation

◆ make_nid

#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.

See also
[MS-PST] 2.2.2.1

Definition at line 160 of file primitives.h.

◆ make_prv_pub_nid

#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.

Definition at line 164 of file primitives.h.

◆ PSTSDK_VALIDATION_LEVEL_WEAK

#define PSTSDK_VALIDATION_LEVEL_WEAK

Global Validation Settings.

You may optionally define one of the following values before including any pstsdk header:

  • PSTSDK_VALIDATION_LEVEL_NONE, no validation - except some type checks
  • PSTSDK_VALIDATION_LEVEL_WEAK, involves fast checks such as signature matching, param validation, etc
  • PSTSDK_VALIDATION_LEVEL_FULL, includes all weak checks plus crc validation and any other "expensive" checks

Weak validation is the default.

Definition at line 41 of file primitives.h.

Typedef Documentation

◆ block_id

Definition at line 87 of file primitives.h.

◆ byte

typedef boost::uint8_t pstsdk::byte

Definition at line 72 of file primitives.h.

◆ heap_id

Definition at line 90 of file primitives.h.

◆ heapnode_id

Definition at line 91 of file primitives.h.

◆ node_id

Definition at line 86 of file primitives.h.

◆ page_id

Definition at line 88 of file primitives.h.

◆ prop_id

Definition at line 93 of file primitives.h.

◆ row_id

Definition at line 95 of file primitives.h.

◆ slong

typedef boost::int32_t pstsdk::slong

Definition at line 69 of file primitives.h.

◆ slonglong

typedef boost::int64_t pstsdk::slonglong

Definition at line 71 of file primitives.h.

◆ uint

typedef boost::uint32_t pstsdk::uint

Definition at line 67 of file primitives.h.

◆ ulong

typedef boost::uint32_t pstsdk::ulong

Definition at line 68 of file primitives.h.

◆ ulonglong

typedef boost::uint64_t pstsdk::ulonglong

Definition at line 70 of file primitives.h.

◆ ushort

typedef boost::uint16_t pstsdk::ushort

Definition at line 73 of file primitives.h.

Enumeration Type Documentation

◆ nid_type

Different node types found in a PST file.

See also
[MS-PST] 2.2.2.1/nidType
Enumerator
nid_type_none 
nid_type_internal 
nid_type_folder 
nid_type_search_folder 
nid_type_message 
nid_type_attachment 
nid_type_search_update_queue 
nid_type_search_criteria_object 
nid_type_associated_message 
nid_type_storage 
nid_type_contents_table_index 
nid_type_receive_folder_table 
nid_type_outgoing_queue_table 
nid_type_hierarchy_table 
nid_type_contents_table 
nid_type_associated_contents_table 
nid_type_search_contents_table 
nid_type_attachment_table 
nid_type_recipient_table 
nid_type_search_table_index 
nid_type_contents_smp 
nid_type_associated_contents_smp 
nid_type_change_history_table 
nid_type_tombstone_table 
nid_type_tombstone_date_table 
nid_type_lrep_dups_table 
nid_type_folder_path_tombstone_table 
nid_type_ltp 
nid_type_max 

Definition at line 119 of file primitives.h.

◆ predefined_nid

The predefined nodes in a PST/OST file.

See also
[MS-PST] 2.4.1
Enumerator
nid_message_store 

The property bag for this file.

nid_name_id_map 

Contains the named prop mappings.

nid_normal_folder_template 
nid_search_folder_template 
nid_root_folder 

Root folder of the store.

nid_search_management_queue 
nid_search_activity_list 
nid_search_domain_alternative 
nid_search_domain_object 
nid_search_gatherer_queue 
nid_search_gatherer_descriptor 
nid_table_rebuild_queue 
nid_junk_mail_pihsl 
nid_search_gatherer_folder_queue 
nid_tc_sub_props 
nid_index_template 
nid_hierarchy_table_template 
nid_contents_table_template 
nid_associated_contents_table_template 
nid_search_contents_table_template 
nid_smp_template 
nid_tombstone_table_template 
nid_lrep_dups_table_template 
nid_receive_folders 
nid_outgoing_queue 
nid_attachment_table 
nid_recipient_table 
nid_change_history_table 
nid_tombstone_table 
nid_tombstone_date_table 
nid_all_message_search_folder 
Deprecated:
The GUST
nid_all_message_search_contents 
nid_lrep_gmp 
nid_lrep_folders_smp 
nid_lrep_folders_table 
nid_folder_path_tombstone_table 
nid_hst_hmp 
nid_index_prv_pub_base 
nid_pub_root_folder 
nid_prv_root_folder 
nid_criterr_notification 
nid_object_notification 
nid_newemail_notification 
nid_extended_notification 
nid_indexing_notification 

Definition at line 169 of file primitives.h.

◆ prop_type

The different property types as defined by MAPI.

See also
[MS-OXCDATA] 2.12.1
Enumerator
prop_type_unspecified 
prop_type_null 
prop_type_short 
prop_type_mv_short 
prop_type_long 
prop_type_mv_long 
prop_type_float 
prop_type_mv_float 
prop_type_double 
prop_type_mv_double 
prop_type_currency 
prop_type_mv_currency 
prop_type_apptime 

VT_DATE.

prop_type_mv_apptime 
prop_type_error 
prop_type_boolean 
prop_type_object 
prop_type_longlong 
prop_type_mv_longlong 
prop_type_string 
prop_type_mv_string 
prop_type_wstring 
prop_type_mv_wstring 
prop_type_systime 

Win32 FILETIME.

prop_type_mv_systime 
prop_type_guid 
prop_type_mv_guid 
prop_type_binary 
prop_type_mv_binary 

Definition at line 291 of file primitives.h.

◆ recipient_type

The different recipient types as defined by MAPI.

Enumerator
mapi_to 
mapi_cc 
mapi_bcc 

Definition at line 330 of file primitives.h.

Function Documentation

◆ get_heap_index()

ulong pstsdk::get_heap_index ( heap_id  id)
inline

Get the index from the heap id.

Parameters
[in]idThe heap id
Returns
The index
See also
[MS-PST] 2.3.1.1/hidIndex

Definition at line 251 of file primitives.h.

◆ get_heap_page()

ulong pstsdk::get_heap_page ( heap_id  id)
inline

Get the heap page from the heap id.

Parameters
[in]idThe heap id
Returns
The heap page
See also
[MS-PST] 2.3.1.1/hidBlockIndex

Definition at line 243 of file primitives.h.

◆ get_nid_index()

ulong pstsdk::get_nid_index ( node_id  id)
inline

Get a node index from a node id.

Parameters
[in]idThe node id
Returns
The node index
See also
[MS-PST] 2.2.2.1/nidIndex

Definition at line 231 of file primitives.h.

◆ get_nid_type()

nid_type pstsdk::get_nid_type ( node_id  id)
inline

Get a node type from a node id.

Parameters
[in]idThe node id
Returns
The node type
See also
[MS-PST] 2.2.2.1/nidType

Definition at line 223 of file primitives.h.

◆ is_heap_id()

bool pstsdk::is_heap_id ( heapnode_id  id)
inline

Inspects a heapnode_id (also known as a HNID) to determine if it is a heap_id (HID)

Parameters
[in]idThe heapnode_id
Returns
true if this is a heap_id
See also
[MS-PST] 2.3.3.2

Definition at line 272 of file primitives.h.

◆ is_subnode_id()

bool pstsdk::is_subnode_id ( heapnode_id  id)
inline

Inspects a heapnode_id (also known as a HNID) to determine if it is a node_id (NID)

Parameters
[in]idThe heapnode_id
Returns
true if this is a node_id of a subnode
See also
[MS-PST] 2.3.3.2

Definition at line 281 of file primitives.h.

◆ make_heap_id()

heap_id pstsdk::make_heap_id ( ulong  page,
ulong  index 
)
inline

Create a heap_id from a page and an index.

Parameters
[in]pageThe page
[in]indexThe index
See also
[MS-PST 2.3.1.1

Definition at line 259 of file primitives.h.

Variable Documentation

◆ message_subject_prefix_lead_byte

const byte pstsdk::message_subject_prefix_lead_byte = 0x01

A sentinel byte which indicates the message subject contains a prefix.

See also
[MS-PST] 2.5.3.1.1.1

Definition at line 344 of file primitives.h.

◆ nid_type_mask

const ulong pstsdk::nid_type_mask = 0x1FL

The portion of a node_id reserved for the type.

See also
[MS-PST] 2.2.2.1/nidType

Definition at line 155 of file primitives.h.

◆ ps_mapi

const guid pstsdk::ps_mapi = { 0x20328, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } }

The PS_MAPI guid.

See also
[MS-OXPROPS] 1.3.2

Definition at line 377 of file primitives.h.

◆ ps_none

const guid pstsdk::ps_none = { 0, 0, 0, { 0, 0, 0, 0, 0, 0, 0, 0 } }

The NULL guid.

Definition at line 372 of file primitives.h.

◆ ps_public_strings

const guid pstsdk::ps_public_strings = { 0x20329, 0, 0, { 0xc0, 0, 0, 0, 0, 0, 0, 0x46 } }

The PS_PUBLIC_STRINGS guid.

See also
[MS-OXPROPS] 1.3.2

Definition at line 382 of file primitives.h.