successful build with log_enabled

master
Gernot Kranz 4 weeks ago
parent 7addc37da4
commit c135956ab8

@ -1,2 +1,15 @@
# pEpTransportMail
## Build
### Mailio
Install mailio using [this repo](https://github.com/karastojko/mailio) and follow the instructions there.
Adjust options with `ccmake`.
### libpEpAdapter
Use latest Release (if available) or RC on 3.x.
### libpEpCxx11
I'll need a RC there, can only build with master atm.
### pEpTransportMail
copy `local.conf.example` to `local.conf` and adjust values. Then `make install`.

@ -13,7 +13,7 @@ namespace pEp {
pEpTransportMail::ConfigMail::ConfigMail(const std::string &userfile) : userfile{ userfile } {}
// ----------------------------------------------------------------------------------------
//bool pEpTransportMail::log_enabled{ false };
bool pEpTransportMail::log_enabled{ false };
// Constructor
pEpTransportMail::pEpTransportMail(PEP_transport_id id) :
@ -28,12 +28,12 @@ namespace pEp {
login_smtp{ Login::smtps },
login_imap{ Login::imaps }
{
//pEpLogClass("called");
pEpLogClass("called");
}
void pEpTransportMail::configure(const Config &config)
{
//pEpLogClass("called");
pEpLogClass("called");
if (allCallbacksRegistered()) {
if (ConfigMail *cfg = dynamic_cast<ConfigMail *>(const_cast<Config *>(&config))) {
//login_imap = Login(Login::imaps, server, port, username, passphrase, auth_method);
@ -48,21 +48,21 @@ namespace pEp {
void pEpTransportMail::startup()
{
//pEpLogClass("called");
pEpLogClass("called");
throwInvalidState();
//peptox->startup();
}
void pEpTransportMail::shutdown()
{
//pEpLogClass("called");
pEpLogClass("called");
throwInvalidState();
//peptox->shutdown();
}
void pEpTransportMail::sendto(::message *msg)
{
//pEpLogClass("called");
pEpLogClass("called");
throwInvalidState();
if (msg == nullptr) {
throw std::runtime_error("sendto(): invalid message - null");
@ -143,7 +143,7 @@ namespace pEp {
::message *pEpTransportMail::recvnext()
{
//pEpLogClass("called");
pEpLogClass("called");
throwInvalidState();
::message *msg_pep = nullptr;
@ -228,7 +228,7 @@ namespace pEp {
//Register callbacks
void pEpTransportMail::signal_statuschange(CBStatusChange handler)
{
//pEpLogClass("called");
pEpLogClass("called");
if (!handler) {
throw std::runtime_error("invalid handler");
}
@ -239,7 +239,7 @@ namespace pEp {
void pEpTransportMail::signal_sendto_result(CBSendToResult handler)
{
//pEpLogClass("called");
pEpLogClass("called");
if (!handler) {
throw std::runtime_error("invalid handler");
}
@ -250,7 +250,7 @@ namespace pEp {
void pEpTransportMail::signal_incoming_message(CBIncomminMessage handler)
{
//pEpLogClass("called");
pEpLogClass("called");
if (!handler) {
throw std::runtime_error("invalid handler");
}

@ -109,8 +109,8 @@ namespace pEp {
// pEpTransportMail specific functions
std::string own_address();
// logger
//static bool log_enabled;
//Adapter::pEpLog::pEpLogger logger{ "pEpTransportMail", log_enabled };
static bool log_enabled;
Adapter::pEpLog::pEpLogger logger{ "pEpTransportMail", log_enabled };
virtual ~pEpTransportMail() = default;
@ -132,7 +132,7 @@ namespace pEp {
bool allCallbacksRegistered();
void throwInvalidState();
//Adapter::pEpLog::pEpLogger& m4gic_logger_n4me = logger;
Adapter::pEpLog::pEpLogger& m4gic_logger_n4me = logger;
Login login_smtp;
Login login_imap;

Loading…
Cancel
Save