diff --git a/backends/twitter/TwitterPlugin.h b/backends/twitter/TwitterPlugin.h index 068079d7410dc1558db26df3d6e9d4145ce770f9..d300e73584d81be28cd336c3b7376b46b3e2bc36 100644 --- a/backends/twitter/TwitterPlugin.h +++ b/backends/twitter/TwitterPlugin.h @@ -73,6 +73,8 @@ class TwitterPlugin : public NetworkPlugin { void handleBuddyRemovedRequest(const std::string &user, const std::string &buddyName, const std::vector &groups); void pollForTweets(); + + void pollForDirectMessages(); bool getUserOAuthKeyAndSecret(const std::string user, std::string &key, std::string &secret); @@ -84,14 +86,19 @@ class TwitterPlugin : public NetworkPlugin { void pinExchangeComplete(const std::string user, const std::string OAuthAccessTokenKey, const std::string OAuthAccessTokenSecret); - void updateUsersLastTweetID(const std::string user, const std::string ID); + void updateLastTweetID(const std::string user, const std::string ID); std::string getMostRecentTweetID(const std::string user); + void updateLastDMID(const std::string user, const std::string ID); + + std::string getMostRecentDMID(const std::string user); + /****************** Twitter Response handlers **************************************/ void populateRoster(std::string &user, std::vector &friends, std::string &errMsg); void displayFriendlist(std::string &user, std::vector &friends, std::string &errMsg); void displayTweets(std::string &user, std::string &userRequested, std::vector &tweets , std::string &errMsg); + void directMessageResponse(std::string &user, std::string &errMsg); /***********************************************************************************/ private: @@ -111,6 +118,7 @@ class TwitterPlugin : public NetworkPlugin { std::map sessions; std::map connectionState; std::map mostRecentTweetID; + std::map mostRecentDirectMessageID; std::set onlineUsers; mode twitterMode; };