SuperTweet interface driver classes.

Dependents:   SuperTweet_TestProgram StarBoardOrangeExpansion1 GSL_04-Network_Twitter

Committer:
shintamainjp
Date:
Fri Oct 29 23:04:12 2010 +0000
Revision:
2:d463d3fc4f81
Parent:
1:2d211e591fc8
Modified default value of a callback function to NULL.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shintamainjp 0:d48d92e6c145 1 /**
shintamainjp 0:d48d92e6c145 2 * SuperTweet API interface driver. (Version 0.0.1)
shintamainjp 0:d48d92e6c145 3 *
shintamainjp 0:d48d92e6c145 4 * Copyright (C) 2010 Shinichiro Nakamura (CuBeatSystems)
shintamainjp 0:d48d92e6c145 5 * http://shinta.main.jp/
shintamainjp 0:d48d92e6c145 6 */
shintamainjp 0:d48d92e6c145 7
shintamainjp 0:d48d92e6c145 8 #include "SuperTweet.h"
shintamainjp 0:d48d92e6c145 9
shintamainjp 1:2d211e591fc8 10 /**
shintamainjp 1:2d211e591fc8 11 * SuperTweet driver class.
shintamainjp 1:2d211e591fc8 12 */
shintamainjp 0:d48d92e6c145 13 class SuperTweetV1XML : public SuperTweet {
shintamainjp 0:d48d92e6c145 14 public:
shintamainjp 1:2d211e591fc8 15
shintamainjp 1:2d211e591fc8 16 /**
shintamainjp 1:2d211e591fc8 17 * Create.
shintamainjp 1:2d211e591fc8 18 *
shintamainjp 1:2d211e591fc8 19 * @param account Account name.
shintamainjp 1:2d211e591fc8 20 * @param password Password.
shintamainjp 1:2d211e591fc8 21 */
shintamainjp 0:d48d92e6c145 22 SuperTweetV1XML(const std::string account, const std::string password);
shintamainjp 1:2d211e591fc8 23
shintamainjp 1:2d211e591fc8 24 /**
shintamainjp 1:2d211e591fc8 25 * Dispose.
shintamainjp 1:2d211e591fc8 26 */
shintamainjp 0:d48d92e6c145 27 virtual ~SuperTweetV1XML();
shintamainjp 1:2d211e591fc8 28
shintamainjp 1:2d211e591fc8 29 /**
shintamainjp 1:2d211e591fc8 30 * Returns the 20 most recent statuses posted by the authenticating user.
shintamainjp 1:2d211e591fc8 31 *
shintamainjp 1:2d211e591fc8 32 * @param func A pointer to a callback function.
shintamainjp 1:2d211e591fc8 33 * @return Result code.
shintamainjp 1:2d211e591fc8 34 */
shintamainjp 2:d463d3fc4f81 35 virtual HTTPResult getStatusesUserTimeline(void (*func)(char *buf, size_t siz) = NULL);
shintamainjp 1:2d211e591fc8 36
shintamainjp 1:2d211e591fc8 37 /**
shintamainjp 1:2d211e591fc8 38 * Returns the 20 most recent statuses, including retweets if they exist, posted by the authenticating user and the user's they follow.
shintamainjp 1:2d211e591fc8 39 *
shintamainjp 1:2d211e591fc8 40 * @param func A pointer to a callback function.
shintamainjp 1:2d211e591fc8 41 * @return Result code.
shintamainjp 1:2d211e591fc8 42 */
shintamainjp 2:d463d3fc4f81 43 virtual HTTPResult getStatusesHomeTimeline(void (*func)(char *buf, size_t siz) = NULL);
shintamainjp 1:2d211e591fc8 44
shintamainjp 1:2d211e591fc8 45 /**
shintamainjp 1:2d211e591fc8 46 * Updates the authenticating user's status.
shintamainjp 1:2d211e591fc8 47 * A status update with text identical to the authenticating user's text identical
shintamainjp 1:2d211e591fc8 48 * to the authenticating user's current status will be ignored to prevent duplicates.
shintamainjp 1:2d211e591fc8 49 *
shintamainjp 1:2d211e591fc8 50 * @param func A pointer to a callback function.
shintamainjp 1:2d211e591fc8 51 * @return Result code.
shintamainjp 1:2d211e591fc8 52 */
shintamainjp 2:d463d3fc4f81 53 virtual HTTPResult postStatusesUpdate(const std::string datatext, void (*func)(char *buf, size_t siz) = NULL);
shintamainjp 0:d48d92e6c145 54 private:
shintamainjp 0:d48d92e6c145 55 HTTPResult result;
shintamainjp 0:d48d92e6c145 56 bool completed;
shintamainjp 0:d48d92e6c145 57 void callback(HTTPResult r);
shintamainjp 0:d48d92e6c145 58 };