Files
@ 180397daaba0
Branch filter:
Location: libtransport.git/backends/twitter/Requests/DirectMessageRequest.h - annotation
180397daaba0
1020 B
text/plain
IRC backend: Qt should be included first to prevent conflict with Boost's foreach
2b47d32a916c 2b47d32a916c 2b47d32a916c 78e71f9345c7 11937227ff60 2b47d32a916c 78e71f9345c7 2b47d32a916c c2fefc36c734 2b47d32a916c 2b47d32a916c 2b47d32a916c 2b47d32a916c 2b47d32a916c 2b47d32a916c a2b385e88f06 2b47d32a916c 2b47d32a916c 2b47d32a916c 2b47d32a916c c236c464ffac 11937227ff60 c2fefc36c734 2b47d32a916c 2b47d32a916c c2fefc36c734 c236c464ffac a2b385e88f06 2b47d32a916c 2b47d32a916c 2b47d32a916c c2fefc36c734 2b47d32a916c 2b47d32a916c a2b385e88f06 a2b385e88f06 a2b385e88f06 a2b385e88f06 2b47d32a916c 2b47d32a916c 2b47d32a916c 2b47d32a916c 2b47d32a916c | #ifndef DIRECT_MESSAGE
#define DIRECT_MESSAGE
#include "transport/ThreadPool.h"
#include "../TwitterResponseParser.h"
#include "../libtwitcurl/twitcurl.h"
#include "transport/Logging.h"
#include <string>
#include <boost/function.hpp>
#include <iostream>
using namespace Transport;
class DirectMessageRequest : public Thread
{
twitCurl *twitObj;
std::string data;
std::string user;
std::string username;
std::string replyMsg;
boost::function< void (std::string&, std::string &, std::vector<DirectMessage>&, Error&) > callBack;
std::vector<DirectMessage> messages;
bool success;
public:
DirectMessageRequest(twitCurl *obj, const std::string &_user, const std::string & _username, const std::string &_data,
boost::function< void (std::string&, std::string &, std::vector<DirectMessage>&, Error&) > cb) {
twitObj = obj->clone();
data = _data;
user = _user;
username = _username;
callBack = cb;
}
~DirectMessageRequest() {
delete twitObj;
}
void run();
void finalize();
};
#endif
|