2012-06-03 22:34:33 +05:30
|
|
|
#ifndef OAUTH_FLOW
|
|
|
|
#define OAUTH_FLOW
|
|
|
|
|
2015-11-18 14:05:57 +01:00
|
|
|
#include "transport/ThreadPool.h"
|
2012-06-03 22:34:33 +05:30
|
|
|
#include "../libtwitcurl/twitcurl.h"
|
|
|
|
#include "../TwitterPlugin.h"
|
2015-11-18 14:05:57 +01:00
|
|
|
#include "transport/Logging.h"
|
2012-06-03 22:34:33 +05:30
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
//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) {
|
2012-06-04 00:08:16 +05:30
|
|
|
twitObj = obj->clone();
|
2012-06-03 22:34:33 +05:30
|
|
|
username = _username;
|
|
|
|
user = _user;
|
|
|
|
np = _np;
|
|
|
|
}
|
|
|
|
|
|
|
|
~OAuthFlow() {
|
2012-06-04 00:08:16 +05:30
|
|
|
delete twitObj;
|
2012-06-03 22:34:33 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
void run();
|
|
|
|
void finalize();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|