spectrum2/backends/twitter/Requests/OAuthFlow.h

40 lines
692 B
C
Raw Permalink Normal View History

2012-06-03 22:34:33 +05:30
#ifndef OAUTH_FLOW
#define OAUTH_FLOW
#include "transport/ThreadPool.h"
2012-06-03 22:34:33 +05:30
#include "../libtwitcurl/twitcurl.h"
#include "../TwitterPlugin.h"
#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