diff --git a/backends/twitter/TwitterPlugin.h b/backends/twitter/TwitterPlugin.h index 7a9979845696cda7fe268232eaeabe50442cb952..822dbf7ba8fadb6873de5cdd2da1e4282774a304 100644 --- a/backends/twitter/TwitterPlugin.h +++ b/backends/twitter/TwitterPlugin.h @@ -38,13 +38,12 @@ using namespace boost::filesystem; using namespace boost::program_options; using namespace Transport; - #define STR(x) (std::string("(") + x.from + ", " + x.to + ", " + x.message + ")") + class TwitterPlugin; extern TwitterPlugin *np; extern Swift::SimpleEventLoop *loop_; // Event Loop - class TwitterPlugin : public NetworkPlugin { public: Swift::BoostNetworkFactories *m_factories; @@ -109,16 +108,25 @@ class TwitterPlugin : public NetworkPlugin { bool setTwitterMode(const std::string user, int m); - /****************** Twitter Response handlers **************************************/ + /****************** Twitter response handlers **************************************/ void statusUpdateResponse(std::string &user, std::string &errMsg); + void helpMessageResponse(std::string &user, std::string &msg); + void populateRoster(std::string &user, std::vector &friends, std::vector &friendAvatars, std::string &errMsg); + void displayFriendlist(std::string &user, std::vector &friends, std::vector &friendAvatars, std::string &errMsg); + void displayTweets(std::string &user, std::string &userRequested, std::vector &tweets , std::string &errMsg); + void directMessageResponse(std::string &user, std::string &username, std::vector &messages, std::string &errMsg); + void createFriendResponse(std::string &user, User &frnd, std::string &img, std::string &errMsg); + void deleteFriendResponse(std::string &user, User &frnd, std::string &errMsg); + void RetweetResponse(std::string &user, std::string &errMsg); + void profileImageResponse(std::string &user, std::string &buddy, std::string &img, unsigned int reqID, std::string &errMsg); /***********************************************************************************/ @@ -141,16 +149,7 @@ class TwitterPlugin : public NetworkPlugin { boost::mutex dblock, userlock; ThreadPool *tp; - //std::map sessions; - //std::map connectionState; - //std::map mostRecentTweetID; - //std::map mostRecentDirectMessageID; std::set onlineUsers; - //std::map nickName; - //std::map > buddies; - //std::map imgURL; - //std::map twitterMode; - struct UserData { User userTwitterObj; @@ -167,8 +166,6 @@ class TwitterPlugin : public NetworkPlugin { UserData() { sessions = NULL; } }; - std::map userdb; }; - #endif