spectrum2/backends/twitter/Requests/RetweetRequest.h

41 lines
828 B
C
Raw Normal View History

2012-06-15 15:15:41 +05:30
#ifndef RETWEET_H
#define RETWEET_H
2012-08-07 09:31:15 +02:00
#include "transport/threadpool.h"
2012-06-15 15:15:41 +05:30
#include "../TwitterResponseParser.h"
#include "../libtwitcurl/twitcurl.h"
#include "transport/networkplugin.h"
#include "transport/logging.h"
#include <boost/function.hpp>
#include <string>
#include <iostream>
using namespace Transport;
class RetweetRequest : public Thread
{
twitCurl *twitObj;
std::string data;
std::string user;
std::string replyMsg;
bool success;
2012-08-12 20:11:06 +05:30
boost::function < void (std::string&, Error&) > callBack;
2012-06-15 15:15:41 +05:30
public:
RetweetRequest(twitCurl *obj, const std::string &_user, const std::string &_data,
2012-08-12 20:11:06 +05:30
boost::function < void (std::string &, Error&) > _cb) {
2012-06-15 15:15:41 +05:30
twitObj = obj->clone();
data = _data;
user = _user;
callBack = _cb;
}
~RetweetRequest() {
delete twitObj;
}
void run();
void finalize();
};
#endif