IBR-DTNSuite  0.12
dtn::daemon::Configuration::EMail Class Reference

#include <Configuration.h>

Inheritance diagram for dtn::daemon::Configuration::EMail:
Inheritance graph
Collaboration diagram for dtn::daemon::Configuration::EMail:
Collaboration graph

Public Member Functions

std::string getOwnAddress () const
 
std::string getSmtpServer () const
 
int getSmtpPort () const
 
std::string getSmtpUsername () const
 
std::string getSmtpPassword () const
 
size_t getSmtpSubmitInterval () const
 
size_t getSmtpConnectionTimeout () const
 
size_t getSmtpKeepAliveTimeout () const
 
bool smtpAuthenticationNeeded () const
 
bool smtpUseTLS () const
 
bool smtpUseSSL () const
 
std::string getImapServer () const
 
int getImapPort () const
 
std::string getImapUsername () const
 
std::string getImapPassword () const
 
std::vector< std::string > getImapFolder () const
 
size_t getImapLookupInterval () const
 
size_t getImapConnectionTimeout () const
 
bool imapUseTLS () const
 
bool imapUseSSL () const
 
bool imapPurgeMail () const
 
std::vector< std::string > getTlsCACerts () const
 
std::vector< std::string > getTlsUserCerts () const
 
size_t getNodeAvailableTime () const
 
size_t getReturningMailChecks () const
 

Protected Member Functions

 EMail ()
 
virtual ~EMail ()
 
void load (const ibrcommon::ConfigFile &conf)
 

Friends

class Configuration
 

Detailed Description

Definition at line 708 of file Configuration.h.

Constructor & Destructor Documentation

dtn::daemon::Configuration::EMail::EMail ( )
protected

Definition at line 120 of file Configuration.cpp.

dtn::daemon::Configuration::EMail::~EMail ( )
protectedvirtual

Definition at line 134 of file Configuration.cpp.

Member Function Documentation

size_t dtn::daemon::Configuration::EMail::getImapConnectionTimeout ( ) const
Returns
The timeout for the IMAP connection in seconds

Definition at line 1511 of file Configuration.cpp.

std::vector< std::string > dtn::daemon::Configuration::EMail::getImapFolder ( ) const

Will return the folder on the IMAP server which will be used for the lookup for new mails. If no folder was specified the default folder defined by the IMAP server will be used

Returns
The lookup folder on the IMAP server

Definition at line 1501 of file Configuration.cpp.

size_t dtn::daemon::Configuration::EMail::getImapLookupInterval ( ) const

Will return the IMAP lookup interval. This interval defines how many seconds will be between two consecutive IMAP lookup intervals. If nothing was specified in the configuration file "60" will be returned

Returns
The SMTP submit interval in seconds

Definition at line 1506 of file Configuration.cpp.

std::string dtn::daemon::Configuration::EMail::getImapPassword ( ) const

Will return the password for the IMAP server. If no password was specified the SMTP user name will be reused

Returns
The password for the IMAP server

Definition at line 1496 of file Configuration.cpp.

int dtn::daemon::Configuration::EMail::getImapPort ( ) const

Will return the port for the IMAP server. If this option was not defined the standard IMAP port (143) will be returned

Returns
The port of the IMAP server

Definition at line 1486 of file Configuration.cpp.

std::string dtn::daemon::Configuration::EMail::getImapServer ( ) const

Will return the IMAP server for this node. If no IMAP server was defined it will return "localhost"

Returns
The IMAP server for this node

Definition at line 1481 of file Configuration.cpp.

std::string dtn::daemon::Configuration::EMail::getImapUsername ( ) const

Will return the user name for the IMAP server. If no name was specified the SMTP user name will be reused

Returns
The user name for the IMAP server

Definition at line 1491 of file Configuration.cpp.

size_t dtn::daemon::Configuration::EMail::getNodeAvailableTime ( ) const
Returns
The time in seconds for how long a discovered node with MCL will be available

Definition at line 1541 of file Configuration.cpp.

Referenced by dtn::net::DiscoveryAgent::onBeaconReceived().

std::string dtn::daemon::Configuration::EMail::getOwnAddress ( ) const

Will return the nodes email address. If no address was set in the configuration file it will return "root@localhost"

Returns
The nodes email address

Definition at line 1427 of file Configuration.cpp.

Referenced by dtn::dht::DHTNameService::componentRun().

size_t dtn::daemon::Configuration::EMail::getReturningMailChecks ( ) const
Returns
Number of checks for returning mails for a bundle

Definition at line 1546 of file Configuration.cpp.

size_t dtn::daemon::Configuration::EMail::getSmtpConnectionTimeout ( ) const
Returns
The timeout for the SMTP connection in seconds

Definition at line 1457 of file Configuration.cpp.

size_t dtn::daemon::Configuration::EMail::getSmtpKeepAliveTimeout ( ) const

After a successful SMTP submit the connection will be kept alive the specified time to allow an immediate transmission of following bundles

Returns
The keep alive interval of an SMTP connection in seconds

Definition at line 1461 of file Configuration.cpp.

Referenced by dtn::net::EMailSmtpService::run().

std::string dtn::daemon::Configuration::EMail::getSmtpPassword ( ) const

Will return the password for the SMTP server. If no password was specified an empty string will be returned

Returns
The password for the SMTP server

Definition at line 1447 of file Configuration.cpp.

int dtn::daemon::Configuration::EMail::getSmtpPort ( ) const

Will return the port for the SMTP server. If this option was not defined the standard SMTP port (25) will be returned

Returns
The port of the SMTP server

Definition at line 1437 of file Configuration.cpp.

std::string dtn::daemon::Configuration::EMail::getSmtpServer ( ) const

Will return the SMTP server for this node. If no SMTP server was defined it will return "localhost"

Returns
The SMTP server for this node

Definition at line 1432 of file Configuration.cpp.

size_t dtn::daemon::Configuration::EMail::getSmtpSubmitInterval ( ) const

Will return the SMTP submit interval. This interval defines how many seconds will be between two consecutive SMTP submit intervals. If nothing was specified in the configuration file "60" will be returned

Returns
The SMTP submit interval in seconds

Definition at line 1452 of file Configuration.cpp.

Referenced by dtn::net::EMailConvergenceLayer::queue().

std::string dtn::daemon::Configuration::EMail::getSmtpUsername ( ) const

Will return the user name for the SMTP server. If no name was specified "root" will be returned

Returns
The user name for the SMTP server

Definition at line 1442 of file Configuration.cpp.

std::vector< std::string > dtn::daemon::Configuration::EMail::getTlsCACerts ( ) const
Returns
Returns a vector containing paths to defined certificate authorities

Definition at line 1531 of file Configuration.cpp.

std::vector< std::string > dtn::daemon::Configuration::EMail::getTlsUserCerts ( ) const
Returns
Returns a vector containing paths to defined user certificates

Definition at line 1536 of file Configuration.cpp.

bool dtn::daemon::Configuration::EMail::imapPurgeMail ( ) const
Returns
True, if a parsed email should be deleted

Definition at line 1526 of file Configuration.cpp.

bool dtn::daemon::Configuration::EMail::imapUseSSL ( ) const
Returns
True, if the IMAP server uses an SSL secured connection

Definition at line 1521 of file Configuration.cpp.

bool dtn::daemon::Configuration::EMail::imapUseTLS ( ) const
Returns
True, if the IMAP server uses an TLS secured connection

Definition at line 1516 of file Configuration.cpp.

void dtn::daemon::Configuration::EMail::load ( const ibrcommon::ConfigFile conf)
protectedvirtual

Implements dtn::daemon::Configuration::Extension.

Definition at line 484 of file Configuration.cpp.

References ibrcommon::ConfigFile::read(), and dtn::utils::Utils::tokenize().

Referenced by dtn::daemon::Configuration::load().

Here is the call graph for this function:

bool dtn::daemon::Configuration::EMail::smtpAuthenticationNeeded ( ) const
Returns
True, if the SMTP server needs authentication before submit

Definition at line 1466 of file Configuration.cpp.

bool dtn::daemon::Configuration::EMail::smtpUseSSL ( ) const
Returns
True, if the SMTP server uses an SSL secured connection

Definition at line 1476 of file Configuration.cpp.

bool dtn::daemon::Configuration::EMail::smtpUseTLS ( ) const
Returns
True, if the SMTP server uses an TLS secured connection

Definition at line 1471 of file Configuration.cpp.

Friends And Related Function Documentation

friend class Configuration
friend

Definition at line 710 of file Configuration.h.


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