PST File Format SDK v0.4
Loading...
Searching...
No Matches
pstsdk::pst Class Reference

A PST file. More...

#include <pst.h>

+ Inheritance diagram for pstsdk::pst:
+ Collaboration diagram for pstsdk::pst:

Public Types

typedef boost::filter_iterator< is_nid_type< nid_type_folder >, const_nodeinfo_iteratorfolder_filter_iterator
 
typedef boost::filter_iterator< is_nid_type< nid_type_message >, const_nodeinfo_iteratormessage_filter_iterator
 
typedef boost::transform_iterator< message_transform_info, message_filter_iteratormessage_iterator
 Message iterator type; a transform iterator over a filter iterator over a nodeinfo iterator.
 
typedef boost::transform_iterator< folder_transform_info, folder_filter_iteratorfolder_iterator
 Folder iterator type; a transform iterator over a filter iterator over a nodeinfo iterator.
 

Public Member Functions

 pst (const std::wstring &filename)
 Construct a pst object from the specified file.
 
 pst (std::shared_ptr< file > custom_file)
 Construct a pst object from a custom file instance.
 
 pst (const pstsdk::pst &other_pst)
 Construct a pst object from another pst instance, copying its header and skipping validation.
 
 pst (pst &&other)
 Move constructor.
 
folder_iterator folder_begin () const
 Get an iterator to the first folder in the PST file.
 
folder_iterator folder_end () const
 Get the end folder iterator.
 
folder_filter_iterator folder_node_begin () const
 Get an iterator to the first folder in the PST file.
 
folder_filter_iterator folder_node_end () const
 Get the end folder iterator.
 
message_filter_iterator message_node_begin () const
 Get an iterator to the first message in the PST file.
 
message_filter_iterator message_node_end () const
 Get the end message iterator.
 
message_iterator message_begin () const
 Get an iterator to the first message in the PST file.
 
message_iterator message_end () const
 Get the end message iterator.
 
folder open_root_folder () const
 Opens the root folder of this file.
 
folder open_folder (const std::wstring &name) const
 Open a specific folder in this file.
 
folder open_folder (node_id id) const
 Open a specific message in this file.
 
search_folder open_search_folder (node_id id) const
 Open a specific message in this file.
 
message open_message (node_id id) const
 Open a specific message in this file.
 
std::wstring get_name () const
 Get the display name of the PST.
 
prop_id lookup_prop_id (const guid &g, const std::wstring &name) const
 Lookup a prop_id of a named prop.
 
prop_id lookup_prop_id (const guid &g, long id) const
 Lookup a prop_id of a named prop.
 
prop_id lookup_prop_id (const named_prop &n)
 Lookup a prop_id of a named prop.
 
named_prop lookup_name_prop (prop_id id) const
 Lookup a named prop of a prop_id.
 
property_bagget_property_bag ()
 Get the property bag of the store object.
 
name_id_mapget_name_id_map ()
 Get the named prop map for this store.
 
const property_bagget_property_bag () const
 Get the property bag of the store object.
 
const name_id_mapget_name_id_map () const
 Get the named prop map for this store.
 
shared_db_ptr get_db () const
 Get the shared database pointer used by this object.
 

Detailed Description

A PST file.

pst represents a pst file on disk. Both OST and PST files are supported, both ANSI and Unicode. Once a client creates a PST file, this object supports:

  • iterating over all messages in the store
  • iterating over all folders in the store
  • opening the root folder
  • opening a specific folder by name
  • performing named property lookups

Definition at line 48 of file pst.h.

Member Typedef Documentation

◆ folder_filter_iterator

◆ folder_iterator

Folder iterator type; a transform iterator over a filter iterator over a nodeinfo iterator.

Definition at line 56 of file pst.h.

◆ message_filter_iterator

◆ message_iterator

Message iterator type; a transform iterator over a filter iterator over a nodeinfo iterator.

Definition at line 54 of file pst.h.

Constructor & Destructor Documentation

◆ pst() [1/4]

pstsdk::pst::pst ( const std::wstring &  filename)
inline

Construct a pst object from the specified file.

Parameters
[in]filenameThe pst file to open on disk

Definition at line 60 of file pst.h.

◆ pst() [2/4]

pstsdk::pst::pst ( std::shared_ptr< file custom_file)
inline

Construct a pst object from a custom file instance.

Parameters
[in]custom_fileA shared_ptr to a file instance (e.g., backed by custom filesystem)

Definition at line 65 of file pst.h.

◆ pst() [3/4]

pstsdk::pst::pst ( const pstsdk::pst other_pst)
inline

Construct a pst object from another pst instance, copying its header and skipping validation.

NOTE: Assumes validation is performed during initial open from file

Parameters
[in]other_pstA reference to another PST object to copy from

Definition at line 72 of file pst.h.

◆ pst() [4/4]

pstsdk::pst::pst ( pst &&  other)
inline

Move constructor.

Parameters
[in]otherThe other pst file

Definition at line 78 of file pst.h.

Member Function Documentation

◆ folder_begin()

folder_iterator pstsdk::pst::folder_begin ( ) const
inline

Get an iterator to the first folder in the PST file.

Returns
an iterator positioned on the first folder in this PST file

Definition at line 85 of file pst.h.

◆ folder_end()

folder_iterator pstsdk::pst::folder_end ( ) const
inline

Get the end folder iterator.

Returns
an iterator at the end position

Definition at line 89 of file pst.h.

◆ folder_node_begin()

folder_filter_iterator pstsdk::pst::folder_node_begin ( ) const
inline

Get an iterator to the first folder in the PST file.

Returns
an iterator positioned on the first folder in this PST file

Definition at line 94 of file pst.h.

◆ folder_node_end()

folder_filter_iterator pstsdk::pst::folder_node_end ( ) const
inline

Get the end folder iterator.

Returns
an iterator at the end position

Definition at line 98 of file pst.h.

◆ get_db()

shared_db_ptr pstsdk::pst::get_db ( ) const
inline

Get the shared database pointer used by this object.

Returns
the shared_db_ptr

Definition at line 194 of file pst.h.

◆ get_name()

std::wstring pstsdk::pst::get_name ( ) const
inline

Get the display name of the PST.

Returns
The display name

Definition at line 154 of file pst.h.

◆ get_name_id_map() [1/2]

pstsdk::name_id_map & pstsdk::pst::get_name_id_map ( )
inline

Get the named prop map for this store.

Returns
The named property map

Definition at line 226 of file pst.h.

◆ get_name_id_map() [2/2]

const pstsdk::name_id_map & pstsdk::pst::get_name_id_map ( ) const
inline

Get the named prop map for this store.

Returns
The named property map

Definition at line 218 of file pst.h.

◆ get_property_bag() [1/2]

pstsdk::property_bag & pstsdk::pst::get_property_bag ( )
inline

Get the property bag of the store object.

Returns
The property bag

Definition at line 213 of file pst.h.

◆ get_property_bag() [2/2]

const pstsdk::property_bag & pstsdk::pst::get_property_bag ( ) const
inline

Get the property bag of the store object.

Returns
The property bag

Definition at line 205 of file pst.h.

◆ lookup_name_prop()

named_prop pstsdk::pst::lookup_name_prop ( prop_id  id) const
inline

Lookup a named prop of a prop_id.

Parameters
[in]idThe prop_id to lookup
Returns
The mapped named property

Definition at line 176 of file pst.h.

◆ lookup_prop_id() [1/3]

prop_id pstsdk::pst::lookup_prop_id ( const guid g,
const std::wstring &  name 
) const
inline

Lookup a prop_id of a named prop.

Parameters
[in]gThe namespace guid of the named prop to lookup
[in]nameThe name of the property to lookup
Returns
The prop_id of the property looked up

Definition at line 160 of file pst.h.

◆ lookup_prop_id() [2/3]

prop_id pstsdk::pst::lookup_prop_id ( const guid g,
long  id 
) const
inline

Lookup a prop_id of a named prop.

Parameters
[in]gThe namespace guid of the named prop to lookup
[in]idThe id of the property to lookup
Returns
The prop_id of the property looked up

Definition at line 166 of file pst.h.

◆ lookup_prop_id() [3/3]

prop_id pstsdk::pst::lookup_prop_id ( const named_prop n)
inline

Lookup a prop_id of a named prop.

Parameters
[in]nThe named prop to lookup
Returns
The prop_id of the property looked up

Definition at line 171 of file pst.h.

◆ message_begin()

message_iterator pstsdk::pst::message_begin ( ) const
inline

Get an iterator to the first message in the PST file.

Returns
an iterator positioned on the first message in this PST file

Definition at line 112 of file pst.h.

◆ message_end()

message_iterator pstsdk::pst::message_end ( ) const
inline

Get the end message iterator.

Returns
an iterator at the end position

Definition at line 116 of file pst.h.

◆ message_node_begin()

message_filter_iterator pstsdk::pst::message_node_begin ( ) const
inline

Get an iterator to the first message in the PST file.

Returns
an iterator positioned on the first message in this PST file

Definition at line 103 of file pst.h.

◆ message_node_end()

message_filter_iterator pstsdk::pst::message_node_end ( ) const
inline

Get the end message iterator.

Returns
an iterator at the end position

Definition at line 107 of file pst.h.

◆ open_folder() [1/2]

pstsdk::folder pstsdk::pst::open_folder ( const std::wstring &  name) const
inline

Open a specific folder in this file.

Parameters
[in]nameThe name of the folder to open
Exceptions
key_not_found<std::wstring>If a folder of the specified name was not found in this file
Returns
The first folder by that name found in the file

Definition at line 231 of file pst.h.

◆ open_folder() [2/2]

folder pstsdk::pst::open_folder ( node_id  id) const
inline

Open a specific message in this file.

Parameters
[in]nameThe node_id of the message to open
Exceptions
key_not_found<node_id>If a folder of the specified id was not found in this file
Returns
The folder with that id found in the file

Definition at line 134 of file pst.h.

◆ open_message()

message pstsdk::pst::open_message ( node_id  id) const
inline

Open a specific message in this file.

Parameters
[in]nameThe node_id of the message to open
Exceptions
key_not_found<node_id>If a message of the specified id was not found in this file
Returns
The message with that id found in the file

Definition at line 148 of file pst.h.

◆ open_root_folder()

folder pstsdk::pst::open_root_folder ( ) const
inline

Opens the root folder of this file.

Note
This is specific to PST files, as an OST file has a different root folder
Returns
The root of the folder hierarchy in this file

Definition at line 122 of file pst.h.

◆ open_search_folder()

search_folder pstsdk::pst::open_search_folder ( node_id  id) const
inline

Open a specific message in this file.

Parameters
[in]nameThe node_id of the message to open
Exceptions
key_not_found<node_id>If a search_folder of the specified id was not found in this file
Returns
The search_folder with that id found in the file

Definition at line 141 of file pst.h.


The documentation for this class was generated from the following file: