2012-06-14 16:12:00 +05:30
|
|
|
#ifndef CREATE_FRIEND
|
|
|
|
#define CREATE_FRIEND
|
|
|
|
|
2012-08-07 09:31:15 +02:00
|
|
|
#include "transport/threadpool.h"
|
2012-06-14 16:12:00 +05:30
|
|
|
#include "../TwitterResponseParser.h"
|
|
|
|
#include "../libtwitcurl/twitcurl.h"
|
|
|
|
#include "transport/logging.h"
|
|
|
|
#include <string>
|
|
|
|
#include <boost/function.hpp>
|
|
|
|
#include <iostream>
|
2012-07-19 19:11:48 +05:30
|
|
|
#include <vector>
|
2012-06-14 16:12:00 +05:30
|
|
|
|
|
|
|
using namespace Transport;
|
|
|
|
|
|
|
|
class CreateFriendRequest : public Thread
|
|
|
|
{
|
|
|
|
twitCurl *twitObj;
|
|
|
|
std::string user;
|
|
|
|
std::string frnd;
|
|
|
|
std::string replyMsg;
|
2012-08-12 20:11:06 +05:30
|
|
|
boost::function< void (std::string&, User&, std::string &, Error&) > callBack;
|
2012-07-23 17:13:59 +05:30
|
|
|
User friendInfo;
|
|
|
|
std::string profileImg;
|
2012-06-14 16:12:00 +05:30
|
|
|
bool success;
|
|
|
|
|
|
|
|
public:
|
|
|
|
CreateFriendRequest(twitCurl *obj, const std::string &_user, const std::string & _frnd,
|
2012-08-12 20:11:06 +05:30
|
|
|
boost::function< void (std::string&, User&, std::string &, Error&) > cb) {
|
2012-06-14 16:12:00 +05:30
|
|
|
twitObj = obj->clone();
|
|
|
|
user = _user;
|
|
|
|
frnd = _frnd;
|
|
|
|
callBack = cb;
|
|
|
|
}
|
|
|
|
|
|
|
|
~CreateFriendRequest() {
|
|
|
|
delete twitObj;
|
|
|
|
}
|
|
|
|
|
|
|
|
void run();
|
|
|
|
void finalize();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|