diff --git a/backends/libyahoo2/yahoolocalaccount.h b/backends/libyahoo2/yahoolocalaccount.h new file mode 100644 index 0000000000000000000000000000000000000000..ab6c1b17ee8a37f214df136c9136c0ac60e2c75f --- /dev/null +++ b/backends/libyahoo2/yahoolocalaccount.h @@ -0,0 +1,55 @@ +#pragma once + +// Transport includes +#include "transport/config.h" +#include "transport/networkplugin.h" +#include "transport/logging.h" + +// Yahoo2 +#include +#include +#include +#include +#include + +// Swiften +#include "Swiften/Swiften.h" +#include "Swiften/TLS/OpenSSL/OpenSSLContextFactory.h" + +// for signal handler +#include "unistd.h" +#include "signal.h" +#include "sys/wait.h" +#include "sys/signal.h" + +// Boost +#include + +using namespace boost::filesystem; +using namespace boost::program_options; +using namespace Transport; + +class YahooHandler; + +class YahooLocalAccount { + public: + YahooLocalAccount(const std::string &user, const std::string &legacyName, const std::string &password); + virtual ~YahooLocalAccount(); + + void login(); + + void addHandler(YahooHandler *handler); + void removeOldHandlers(); + void removeConn(int conn_tag); + + std::string user; + int id; + std::map > conns; + int conn_tag; + std::map handlers; + std::map > handlers_per_conn; + int handler_tag; + int status; + std::string msg; + std::string buffer; +};