diff --git a/backends/twitter/Requests/OAuthFlow.h b/backends/twitter/Requests/OAuthFlow.h new file mode 100644 index 0000000000000000000000000000000000000000..bbc730c697689c12d7940b256c9a7a7585e4882a --- /dev/null +++ b/backends/twitter/Requests/OAuthFlow.h @@ -0,0 +1,39 @@ +#ifndef OAUTH_FLOW +#define OAUTH_FLOW + +#include "../ThreadPool.h" +#include "../libtwitcurl/twitcurl.h" +#include "../TwitterPlugin.h" +#include "transport/logging.h" + +#include +#include + +//class TwitterPlugin; +using namespace Transport; +class OAuthFlow : public Thread +{ + twitCurl *twitObj; + std::string username; + std::string user; + std::string authUrl; + TwitterPlugin *np; + bool success; + + public: + OAuthFlow(TwitterPlugin *_np, twitCurl *obj, const std::string &_user, const std::string &_username) { + twitObj = obj->clone(); + username = _username; + user = _user; + np = _np; + } + + ~OAuthFlow() { + delete twitObj; + } + + void run(); + void finalize(); +}; + +#endif