Class PollingManager
Defined in File polling_manager.hpp
Class Documentation
-
class PollingManager
Manager for polling for new emails.
Does the polling for new emails and distributes them to handlers.
Public Types
Public Functions
Constructor.
- Parameters:
receiver – the email receiver to use for getting emails
polling_period – the polling period, or
std::optional
to use the default value
-
~PollingManager()
-
void register_handler(const HandlerFunction &handler)
Register a handler with the manager.
The handler function will be called when there is a new email.
- Parameters:
handler – the handler to call with new emails
-
bool has_started() const
Get status.
- Returns:
true if it has been started, false otherwise
-
void start()
Start manager.
-
void shutdown()
Shut down manager and internal thread.