13#ifndef PSTSDK_PST_PST_H
14#define PSTSDK_PST_PST_H
16#include <boost/noncopyable.hpp>
17#include <boost/iterator/filter_iterator.hpp>
18#include <boost/iterator/transform_iterator.hpp>
48class pst :
private boost::noncopyable
54 typedef boost::transform_iterator<message_transform_info, message_filter_iterator>
message_iterator;
56 typedef boost::transform_iterator<folder_transform_info, folder_filter_iterator>
folder_iterator;
75#ifndef BOOST_NO_RVALUE_REFERENCES
95 {
return boost::make_filter_iterator<is_nid_type<nid_type_folder> >(m_db->read_nbt_root()->begin(), m_db->read_nbt_root()->end()); }
99 {
return boost::make_filter_iterator<is_nid_type<nid_type_folder> >(m_db->read_nbt_root()->end(), m_db->read_nbt_root()->end()); }
104 {
return boost::make_filter_iterator<is_nid_type<nid_type_message> >(m_db->read_nbt_root()->begin(), m_db->read_nbt_root()->end()); }
108 {
return boost::make_filter_iterator<is_nid_type<nid_type_message> >(m_db->read_nbt_root()->end(), m_db->read_nbt_root()->end()); }
135 {
return folder(m_db, m_db->lookup_node(
id)); }
149 {
return message(m_db->lookup_node(
id)); }
199 mutable std::shared_ptr<property_bag> m_bag;
200 mutable std::shared_ptr<name_id_map> m_map;
215 return const_cast<property_bag&
>(
const_cast<const pst*
>(
this)->get_property_bag());
228 return const_cast<name_id_map&
>(
const_cast<const pst*
>(
this)->get_name_id_map());
233 folder_iterator iter = std::find_if(folder_begin(), folder_end(), compiler_workarounds::folder_name_equal(
name));
235 if(
iter != folder_end())
Contains references to other bth_node allocations.
T read_prop(prop_id id) const
Read a property as a given type.
Represents a message in a PST file.
A named property map abstraction.
prop_id lookup(const guid &g, const std::wstring &name) const
Get the associated prop_id of the named property.
Property Context (PC) Implementation.
search_folder open_search_folder(node_id id) const
Open a specific message in this file.
prop_id lookup_prop_id(const guid &g, const std::wstring &name) const
Lookup a prop_id of a named prop.
shared_db_ptr get_db() const
Get the shared database pointer used by this object.
folder_iterator folder_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.
folder open_folder(const std::wstring &name) const
Open a specific folder in this file.
property_bag & get_property_bag()
Get the property bag of the store object.
named_prop lookup_name_prop(prop_id id) const
Lookup a named prop of a prop_id.
message_filter_iterator message_node_end() const
Get the end message iterator.
prop_id lookup_prop_id(const guid &g, long id) const
Lookup a prop_id of a named prop.
boost::filter_iterator< is_nid_type< nid_type_message >, const_nodeinfo_iterator > message_filter_iterator
pst(const pstsdk::pst &other_pst)
Construct a pst object from another pst instance, copying its header and skipping validation.
pst(const std::wstring &filename)
Construct a pst object from the specified file.
pst(pst &&other)
Move constructor.
prop_id lookup_prop_id(const named_prop &n)
Lookup a prop_id of a named prop.
folder_iterator folder_end() const
Get the end folder iterator.
name_id_map & get_name_id_map()
Get the named prop map for this store.
folder_filter_iterator folder_node_begin() const
Get an iterator to the first folder in the PST file.
boost::transform_iterator< message_transform_info, message_filter_iterator > message_iterator
Message iterator type; a transform iterator over a filter iterator over a nodeinfo iterator.
message open_message(node_id id) const
Open a specific message in this file.
boost::transform_iterator< folder_transform_info, folder_filter_iterator > folder_iterator
Folder iterator type; a transform iterator over a filter iterator over a nodeinfo iterator.
folder open_root_folder() const
Opens the root folder of this file.
folder open_folder(node_id id) const
Open a specific message in this file.
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.
message_filter_iterator message_node_begin() const
Get an iterator to the first message in the PST file.
pst(std::shared_ptr< file > custom_file)
Construct a pst object from a custom file instance.
boost::filter_iterator< is_nid_type< nid_type_folder >, const_nodeinfo_iterator > folder_filter_iterator
std::wstring get_name() const
Get the display name of the PST.
@ nid_message_store
The property bag for this file.
@ nid_root_folder
Root folder of the store.
Named Property Lookup Map implementation.
Contains the definition of all in memory representations of disk structures.
std::shared_ptr< db_context > shared_db_ptr
Node and Block definitions.
Primitive structures defined by MS-PST and MAPI.
Property Bag (or Property Context, or PC) implementation.