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

A folder in a PST file. More...

#include <folder.h>

+ Collaboration diagram for pstsdk::folder:

Public Types

typedef boost::transform_iterator< message_transform_row, const_table_row_itermessage_iterator
 Message iterator type; a transform iterator over a table row iterator.
 
typedef boost::transform_iterator< folder_transform_row, folder_filter_iterator > folder_iterator
 Folder iterator type; a transform iterator over a filter iterator over table row iterator.
 
typedef boost::transform_iterator< search_folder_transform_row, search_folder_filter_iterator > search_folder_iterator
 Search folder iterator type; a transform iterator over a filter iterator over table row iterator.
 

Public Member Functions

 folder (const shared_db_ptr &db, const node &n)
 Construct a folder object.
 
 folder (const folder &other)
 Copy construct a folder object.
 
 folder (folder &&other)
 Move construct a folder object.
 
folder_iterator sub_folder_begin () const
 Get an iterator to the first folder in this folder.
 
folder_iterator sub_folder_end () const
 Get the end folder iterator.
 
search_folder_iterator sub_search_folder_begin () const
 Get an iterator to the first search folder in this folder.
 
search_folder_iterator sub_search_folder_end () const
 Get the end search folder iterator.
 
folder open_sub_folder (const std::wstring &name)
 Open a specific subfolder in this folder, not recursive.
 
message_iterator message_begin () const
 Get an iterator to the first message in this folder.
 
message_iterator message_end () const
 Get the end message iterator.
 
message_iterator associated_message_begin () const
 Get an iterator to the first associated message in this folder.
 
message_iterator associated_message_end () const
 Get the end associated message iterator.
 
std::wstring get_name () const
 Get the display name of this folder.
 
size_t get_subfolder_count () const
 Get the number of sub folders in this folder.
 
size_t get_unread_message_count () const
 Get the number of unread messages in this folder.
 
size_t get_message_count () const
 Get the number of messages in this folder.
 
size_t get_associated_message_count () const
 Get the number of associated messages in this folder.
 
property_bagget_property_bag ()
 Get the property bag backing this folder.
 
const property_bagget_property_bag () const
 Get the property bag backing this folder.
 
shared_db_ptr get_db () const
 Get the database pointer used by this folder.
 
tableget_hierarchy_table ()
 Get the hierarchy table of this folder.
 
tableget_contents_table ()
 Get the contents table of this folder.
 
tableget_associated_contents_table ()
 Get the associated contents table of this folder.
 
const tableget_hierarchy_table () const
 Get the hierarchy table of this folder.
 
const tableget_contents_table () const
 Get the contents table of this folder.
 
const tableget_associated_contents_table () const
 Get the associated contents table of this folder.
 
node_id get_id () const
 Get the node_id of this folder.
 

Detailed Description

A folder in a PST file.

The folder object allows access to subfolders, messages, and associated messagse which are contained in the folder. Similar to the PST Layer object, the folder also offers a way to lookup subfolders by name.

A folder currently doesn't have a concept of sorting. This was deemed unnecessary because of the iterator based approach used for exposing sub messages and folders - one can use these iterators to build up a container of messages or folders to be sorted, and calling std::sort directly with an arbitrary sorting functor.

Definition at line 190 of file folder.h.

Member Typedef Documentation

◆ folder_iterator

typedef boost::transform_iterator<folder_transform_row, folder_filter_iterator> pstsdk::folder::folder_iterator

Folder iterator type; a transform iterator over a filter iterator over table row iterator.

Definition at line 199 of file folder.h.

◆ message_iterator

Message iterator type; a transform iterator over a table row iterator.

Definition at line 197 of file folder.h.

◆ search_folder_iterator

typedef boost::transform_iterator<search_folder_transform_row, search_folder_filter_iterator> pstsdk::folder::search_folder_iterator

Search folder iterator type; a transform iterator over a filter iterator over table row iterator.

Definition at line 201 of file folder.h.

Constructor & Destructor Documentation

◆ folder() [1/3]

pstsdk::folder::folder ( const shared_db_ptr db,
const node n 
)
inline

Construct a folder object.

Parameters
[in]dbThe database pointer
[in]nA folder node

Definition at line 206 of file folder.h.

◆ folder() [2/3]

pstsdk::folder::folder ( const folder other)
inline

Copy construct a folder object.

Parameters
[in]otherfolder to copy

Definition at line 347 of file folder.h.

◆ folder() [3/3]

pstsdk::folder::folder ( folder &&  other)
inline

Move construct a folder object.

Parameters
[in]otherfolder to move from

Definition at line 215 of file folder.h.

Member Function Documentation

◆ associated_message_begin()

message_iterator pstsdk::folder::associated_message_begin ( ) const
inline

Get an iterator to the first associated message in this folder.

Returns
an iterator positioned on the first associated message in this folder

Definition at line 253 of file folder.h.

◆ associated_message_end()

message_iterator pstsdk::folder::associated_message_end ( ) const
inline

Get the end associated message iterator.

Returns
an iterator at the end position

Definition at line 257 of file folder.h.

◆ get_associated_contents_table() [1/2]

pstsdk::table & pstsdk::folder::get_associated_contents_table ( )
inline

Get the associated contents table of this folder.

Returns
The associated contents table

Definition at line 433 of file folder.h.

◆ get_associated_contents_table() [2/2]

const pstsdk::table & pstsdk::folder::get_associated_contents_table ( ) const
inline

Get the associated contents table of this folder.

Returns
The associated contents table

Definition at line 425 of file folder.h.

◆ get_associated_message_count()

size_t pstsdk::folder::get_associated_message_count ( ) const
inline

Get the number of associated messages in this folder.

Returns
The number of associated messages

Definition at line 276 of file folder.h.

◆ get_contents_table() [1/2]

pstsdk::table & pstsdk::folder::get_contents_table ( )
inline

Get the contents table of this folder.

Returns
The contents table

Definition at line 407 of file folder.h.

◆ get_contents_table() [2/2]

const pstsdk::table & pstsdk::folder::get_contents_table ( ) const
inline

Get the contents table of this folder.

Returns
The contents table

Definition at line 399 of file folder.h.

◆ get_db()

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

Get the database pointer used by this folder.

Returns
The database pointer

Definition at line 287 of file folder.h.

◆ get_hierarchy_table() [1/2]

pstsdk::table & pstsdk::folder::get_hierarchy_table ( )
inline

Get the hierarchy table of this folder.

Returns
The hierarchy table

Definition at line 420 of file folder.h.

◆ get_hierarchy_table() [2/2]

const pstsdk::table & pstsdk::folder::get_hierarchy_table ( ) const
inline

Get the hierarchy table of this folder.

Returns
The hierarchy table

Definition at line 412 of file folder.h.

◆ get_id()

node_id pstsdk::folder::get_id ( ) const
inline

Get the node_id of this folder.

Returns
The node_id of the folder

Definition at line 306 of file folder.h.

◆ get_message_count()

size_t pstsdk::folder::get_message_count ( ) const
inline

Get the number of messages in this folder.

Returns
The number of messages

Definition at line 272 of file folder.h.

◆ get_name()

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

Get the display name of this folder.

Returns
The name of this folder

Definition at line 262 of file folder.h.

◆ get_property_bag() [1/2]

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

Get the property bag backing this folder.

Returns
The property bag

Definition at line 281 of file folder.h.

◆ get_property_bag() [2/2]

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

Get the property bag backing this folder.

Returns
The property bag

Definition at line 284 of file folder.h.

◆ get_subfolder_count()

size_t pstsdk::folder::get_subfolder_count ( ) const
inline

Get the number of sub folders in this folder.

Returns
The number of subfolders

Definition at line 266 of file folder.h.

◆ get_unread_message_count()

size_t pstsdk::folder::get_unread_message_count ( ) const
inline

Get the number of unread messages in this folder.

Returns
The number of unread messages

Definition at line 269 of file folder.h.

◆ message_begin()

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

Get an iterator to the first message in this folder.

Returns
an iterator positioned on the first message in this folder

Definition at line 245 of file folder.h.

◆ message_end()

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

Get the end message iterator.

Returns
an iterator at the end position

Definition at line 248 of file folder.h.

◆ open_sub_folder()

pstsdk::folder pstsdk::folder::open_sub_folder ( const std::wstring &  name)
inline

Open a specific subfolder in this folder, not recursive.

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 folder
Returns
The first folder by that name found in this folder

Definition at line 389 of file folder.h.

◆ sub_folder_begin()

folder_iterator pstsdk::folder::sub_folder_begin ( ) const
inline

Get an iterator to the first folder in this folder.

Returns
an iterator positioned on the first folder in this folder

Definition at line 222 of file folder.h.

◆ sub_folder_end()

folder_iterator pstsdk::folder::sub_folder_end ( ) const
inline

Get the end folder iterator.

Returns
an iterator at the end position

Definition at line 226 of file folder.h.

◆ sub_search_folder_begin()

search_folder_iterator pstsdk::folder::sub_search_folder_begin ( ) const
inline

Get an iterator to the first search folder in this folder.

Returns
an iterator positioned on the first search folder in this folder

Definition at line 231 of file folder.h.

◆ sub_search_folder_end()

search_folder_iterator pstsdk::folder::sub_search_folder_end ( ) const
inline

Get the end search folder iterator.

Returns
an iterator at the end position

Definition at line 235 of file folder.h.


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