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

Classes

class  pstsdk::database_impl< T >
 PST implementation. More...
 
class  pstsdk::db_context
 Database external interface. More...
 

Functions

shared_db_ptr pstsdk::open_database (const std::wstring &filename)
 Open a db_context for the given file.
 
shared_db_ptr pstsdk::open_database (std::shared_ptr< file > file)
 Open a db_context for the given file instance.
 
shared_db_ptr pstsdk::open_database (const shared_db_ptr &other_database)
 Open a db_context by copying the in-memory header and file handle from another db_context.
 
std::shared_ptr< small_pstpstsdk::open_small_pst (const std::wstring &filename)
 Try to open the given file as an ANSI store.
 
std::shared_ptr< small_pstpstsdk::open_small_pst (std::shared_ptr< file > file)
 Try to open the given file as an ANSI store with custom file instance.
 
std::shared_ptr< large_pstpstsdk::open_large_pst (const std::wstring &filename)
 Try to open the given file as a Unicode store.
 
std::shared_ptr< large_pstpstsdk::open_large_pst (std::shared_ptr< file > file)
 Try to open the given file as a Unicode store with custom file instance.
 

Detailed Description

Function Documentation

◆ open_database() [1/3]

pstsdk::shared_db_ptr pstsdk::open_database ( const shared_db_ptr other_database)
inline

Open a db_context by copying the in-memory header and file handle from another db_context.

Parameters
[in]other_databaseA reference to an existing shared_db_ptr to copy from
Returns
A shared_ptr to the new database context, or nullptr if the input type is unknown

Definition at line 319 of file database.h.

◆ open_database() [2/3]

pstsdk::shared_db_ptr pstsdk::open_database ( const std::wstring &  filename)
inline

Open a db_context for the given file.

Exceptions
invalid_formatif the file format is not understood
runtime_errorif an error occurs opening the file
crc_fail(PSTSDK_VALIDATION_LEVEL_WEAK) if the CRC of this header doesn't match
Parameters
[in]filenameThe filename to open
Returns
A shared_ptr to the opened context

Definition at line 260 of file database.h.

◆ open_database() [3/3]

pstsdk::shared_db_ptr pstsdk::open_database ( std::shared_ptr< file file)
inline

Open a db_context for the given file instance.

Exceptions
invalid_formatif the file format is not understood
runtime_errorif an error occurs opening the file
crc_fail(PSTSDK_VALIDATION_LEVEL_WEAK) if the CRC of this header doesn't match
Parameters
[in]fileA shared_ptr to a file instance (e.g., backed by custom filesystem)
Returns
A shared_ptr to the opened context

Definition at line 300 of file database.h.

◆ open_large_pst() [1/2]

std::shared_ptr< pstsdk::large_pst > pstsdk::open_large_pst ( const std::wstring &  filename)
inline

Try to open the given file as a Unicode store.

Exceptions
invalid_formatif the file format is not Unicode
runtime_errorif an error occurs opening the file
crc_fail(PSTSDK_VALIDATION_LEVEL_WEAK) if the CRC of this header doesn't match
Parameters
[in]filenameThe filename to open
Returns
A shared_ptr to the opened context

Definition at line 288 of file database.h.

◆ open_large_pst() [2/2]

std::shared_ptr< pstsdk::large_pst > pstsdk::open_large_pst ( std::shared_ptr< file file)
inline

Try to open the given file as a Unicode store with custom file instance.

Exceptions
invalid_formatif the file format is not Unicode
runtime_errorif an error occurs opening the file
crc_fail(PSTSDK_VALIDATION_LEVEL_WEAK) if the CRC of this header doesn't match
Parameters
[in]fileA shared_ptr to a file instance
Returns
A shared_ptr to the opened context

Definition at line 294 of file database.h.

◆ open_small_pst() [1/2]

std::shared_ptr< pstsdk::small_pst > pstsdk::open_small_pst ( const std::wstring &  filename)
inline

Try to open the given file as an ANSI store.

Exceptions
invalid_formatif the file format is not ANSI
runtime_errorif an error occurs opening the file
crc_fail(PSTSDK_VALIDATION_LEVEL_WEAK) if the CRC of this header doesn't match
Parameters
[in]filenameThe filename to open
Returns
A shared_ptr to the opened context

Definition at line 276 of file database.h.

◆ open_small_pst() [2/2]

std::shared_ptr< pstsdk::small_pst > pstsdk::open_small_pst ( std::shared_ptr< file file)
inline

Try to open the given file as an ANSI store with custom file instance.

Exceptions
invalid_formatif the file format is not ANSI
runtime_errorif an error occurs opening the file
crc_fail(PSTSDK_VALIDATION_LEVEL_WEAK) if the CRC of this header doesn't match
Parameters
[in]fileA shared_ptr to a file instance
Returns
A shared_ptr to the opened context

Definition at line 282 of file database.h.