VMime
platform::handler Class Referenceabstract
Inheritance diagram for platform::handler:
Collaboration diagram for platform::handler:

Public Member Functions

virtual ~handler ()
 
virtual unsigned long getUnixTime () const =0
 
virtual const datetime getCurrentLocalTime () const =0
 
virtual const string getHostName () const =0
 
virtual unsigned int getProcessId () const =0
 
virtual unsigned int getThreadId () const =0
 
virtual const charset getLocalCharset () const =0
 
virtual shared_ptr
< net::socketFactory
getSocketFactory ()=0
 
virtual shared_ptr
< utility::fileSystemFactory
getFileSystemFactory ()=0
 
virtual shared_ptr
< utility::childProcessFactory
getChildProcessFactory ()=0
 
virtual void generateRandomBytes (unsigned char *buffer, const unsigned int count)=0
 
virtual shared_ptr
< utility::sync::criticalSection
createCriticalSection ()=0
 

Additional Inherited Members

- Protected Member Functions inherited from object
 object ()
 
 object (const object &)
 
objectoperator= (const object &)
 
virtual ~object ()
 

Detailed Description

Takes care of all platform-dependent operations.

It offers an interface to access platform-dependent objects: sockets, date/time, file system, etc.

Constructor & Destructor Documentation

~handler ( )
virtual

Member Function Documentation

virtual shared_ptr<utility::sync::criticalSection> createCriticalSection ( )
pure virtual

Creates and initializes a critical section.

virtual void generateRandomBytes ( unsigned char *  buffer,
const unsigned int  count 
)
pure virtual

Fills a buffer with cryptographically random bytes.

Parameters
bufferbuffer to fill in with random bytes
countnumber of random bytes to write in buffer
virtual shared_ptr<utility::childProcessFactory> getChildProcessFactory ( )
pure virtual

Return a pointer to a factory that creates child process objects, which are used to spawn processes (run executable files).

Returns
child process factory
virtual const datetime getCurrentLocalTime ( ) const
pure virtual

Return the current date and time, in the local time zone.

Returns
current date and time
virtual shared_ptr<utility::fileSystemFactory> getFileSystemFactory ( )
pure virtual

Return a pointer to a factory that creates file-system objects.

Returns
file-system factory
virtual const string getHostName ( ) const
pure virtual

Return the host name of the system.

Used when generating message ids.

Returns
host name
virtual const charset getLocalCharset ( ) const
pure virtual

Return the charset used on the system.

Returns
local charset
virtual unsigned int getProcessId ( ) const
pure virtual

Return the current process identifier.

Used when generating random strings (part boundaries or message ids).

Returns
current process id
virtual shared_ptr<net::socketFactory> getSocketFactory ( )
pure virtual

Return a pointer to the default socket factory for this platform.

Returns
socket factory
virtual unsigned int getThreadId ( ) const
pure virtual

Return an unique identifier for the current thread.

Used for multi-threading synchronization.

Returns
current thread id
virtual unsigned long getUnixTime ( ) const
pure virtual

Return the current UNIX time (Epoch time): the number of seconds elapsed since Jan, 1st 1970 00:00.

Returns
UNIX Epoch time

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