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

Modules

 BTree
 
 Exceptions
 
 Primitive Types
 

Files

file  btree.h
 Generic BTree implementation.
 
file  errors.h
 The exceptions used by pstsdk.
 
file  primitives.h
 Primitive structures defined by MS-PST and MAPI.
 
file  util.h
 General utility functions and classes.
 

Classes

class  pstsdk::file
 A generic class to read and write to a file. More...
 

Functions

time_t pstsdk::filetime_to_time_t (ulonglong filetime)
 Convert from a filetime to time_t.
 
ulonglong pstsdk::time_t_to_filetime (time_t time)
 Convert from a time_t to filetime.
 
time_t pstsdk::vt_date_to_time_t (double vt_time)
 Convert from a VT_DATE to a time_t.
 
double pstsdk::time_t_to_vt_date (time_t time)
 Convert from a time_t to a VT_DATE.
 
bool pstsdk::test_bit (const byte *pbytes, ulong bit)
 Test to see if the specified bit in the buffer is set.
 
std::string pstsdk::bytes_to_string (const std::vector< byte > &bytes)
 Convert an array of bytes to a std::wstring.
 
std::wstring pstsdk::bytes_to_wstring (const std::vector< byte > &bytes)
 Convert an array of bytes to a std::wstring.
 
std::vector< bytepstsdk::wstring_to_bytes (const std::wstring &wstr)
 Convert a std::wstring to an array of bytes.
 

Detailed Description

Function Documentation

◆ bytes_to_string()

std::string pstsdk::bytes_to_string ( const std::vector< byte > &  bytes)
inline

Convert an array of bytes to a std::wstring.

Parameters
[in]bytesThe bytes to convert
Returns
A std::string

Definition at line 310 of file util.h.

◆ bytes_to_wstring()

std::wstring pstsdk::bytes_to_wstring ( const std::vector< byte > &  bytes)
inline

Convert an array of bytes to a std::wstring.

Parameters
[in]bytesThe bytes to convert
Returns
A std::wstring

Definition at line 280 of file util.h.

◆ filetime_to_time_t()

time_t pstsdk::filetime_to_time_t ( ulonglong  filetime)
inline

Convert from a filetime to time_t.

FILETIME is a Win32 date/time type representing the number of 100 ns intervals since Jan 1st, 1601. This function converts it to a standard time_t.

Parameters
[in]filetimeThe time to convert from
Returns
filetime, as a time_t.

Definition at line 208 of file util.h.

◆ test_bit()

bool pstsdk::test_bit ( const byte pbytes,
ulong  bit 
)
inline

Test to see if the specified bit in the buffer is set.

Parameters
[in]pbytesThe buffer to check
[in]bitWhich bit to test
Returns
true if the specified bit is set, false if not

Definition at line 232 of file util.h.

◆ time_t_to_filetime()

pstsdk::ulonglong pstsdk::time_t_to_filetime ( time_t  time)
inline

Convert from a time_t to filetime.

FILETIME is a Win32 date/time type representing the number of 100 ns intervals since Jan 1st, 1601. This function converts to it from a standard time_t.

Parameters
[in]timeThe time to convert from
Returns
time, as a filetime.

Definition at line 215 of file util.h.

◆ time_t_to_vt_date()

double pstsdk::time_t_to_vt_date ( time_t  time)
inline

Convert from a time_t to a VT_DATE.

VT_DATE is an OLE date/time type where the integer part is the date and the fraction part is the time. This function converts to it from a standard time_t.

Parameters
[in]timeThe time to convert from
Returns
time, as a VT_DATE

Definition at line 227 of file util.h.

◆ vt_date_to_time_t()

time_t pstsdk::vt_date_to_time_t ( double  vt_time)
inline

Convert from a VT_DATE to a time_t.

VT_DATE is an OLE date/time type where the integer part is the date and the fraction part is the time. This function converts it to a standard time_t

Parameters
[in]vt_timeThe time to convert from
Returns
vt_time, as a time_t

Definition at line 222 of file util.h.

◆ wstring_to_bytes()

std::vector< pstsdk::byte > pstsdk::wstring_to_bytes ( const std::wstring &  wstr)
inline

Convert a std::wstring to an array of bytes.

Parameters
[in]wstrThe std::wstring to convert
Returns
An array of bytes

Definition at line 343 of file util.h.