VMime
|
Classes | |
class | registeredService |
Public Member Functions | |
void | registerService (shared_ptr< registeredService > reg) |
shared_ptr< service > | create (shared_ptr< session > sess, const string &protocol, shared_ptr< security::authenticator > auth=null) |
shared_ptr< service > | create (shared_ptr< session > sess, const utility::url &u, shared_ptr< security::authenticator > auth=null) |
shared_ptr< const registeredService > | getServiceByProtocol (const string &protocol) const |
size_t | getServiceCount () const |
shared_ptr< const registeredService > | getServiceAt (const size_t pos) const |
const std::vector< shared_ptr < const registeredService > > | getServiceList () const |
Static Public Member Functions | |
static shared_ptr< serviceFactory > | getInstance () |
A factory to create 'service' objects for a specified protocol.
shared_ptr< service > create | ( | shared_ptr< session > | sess, |
const string & | protocol, | ||
shared_ptr< security::authenticator > | auth = null |
||
) |
Create a new service instance from a protocol name.
sess | session |
protocol | protocol name (eg. "pop3") |
auth | authenticator used to provide credentials (can be NULL if not used) |
shared_ptr< service > create | ( | shared_ptr< session > | sess, |
const utility::url & | u, | ||
shared_ptr< security::authenticator > | auth = null |
||
) |
Create a new service instance from a URL.
sess | session |
u | full URL with at least protocol and server (you can also specify port, username and password) |
auth | authenticator used to provide credentials (can be NULL if not used) |
References url::getHost(), url::getPassword(), url::getPath(), url::getPort(), url::getProtocol(), url::getUsername(), and url::UNSPECIFIED_PORT.
|
static |
Referenced by session::getStore(), and session::getTransport().
shared_ptr< const serviceFactory::registeredService > getServiceAt | ( | const size_t | pos | ) | const |
Return the registered service at the specified position.
pos | position of the registered service to return |
shared_ptr< const serviceFactory::registeredService > getServiceByProtocol | ( | const string & | protocol | ) | const |
Return information about a registered protocol.
protocol | protocol name |
References stringUtils::toLower().
size_t getServiceCount | ( | ) | const |
Return the number of registered services.
const std::vector< shared_ptr< const serviceFactory::registeredService > > getServiceList | ( | ) | const |
Return a list of all registered services.
void registerService | ( | shared_ptr< registeredService > | reg | ) |
Register a new service by its protocol name.
reg | service registration infos |