SuperTweet interface driver classes.

Dependents:   SuperTweet_TestProgram StarBoardOrangeExpansion1 GSL_04-Network_Twitter

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SuperTweetV1XML.h Source File

SuperTweetV1XML.h

00001 /**
00002  * SuperTweet API interface driver. (Version 0.0.1)
00003  *
00004  * Copyright (C) 2010 Shinichiro Nakamura (CuBeatSystems)
00005  * http://shinta.main.jp/
00006  */
00007 
00008 #include "SuperTweet.h"
00009 
00010 /**
00011  * SuperTweet driver class.
00012  */
00013 class SuperTweetV1XML : public SuperTweet {
00014 public:
00015 
00016     /**
00017      * Create.
00018      *
00019      * @param account Account name.
00020      * @param password Password.
00021      */
00022     SuperTweetV1XML(const std::string account, const std::string password);
00023 
00024     /**
00025      * Dispose.
00026      */
00027     virtual ~SuperTweetV1XML();
00028 
00029     /**
00030      * Returns the 20 most recent statuses posted by the authenticating user.
00031      *
00032      * @param func A pointer to a callback function.
00033      * @return Result code.
00034      */
00035     virtual HTTPResult getStatusesUserTimeline(void (*func)(char *buf, size_t siz) = NULL);
00036 
00037     /**
00038      * Returns the 20 most recent statuses, including retweets if they exist, posted by the authenticating user and the user's they follow.
00039      *
00040      * @param func A pointer to a callback function.
00041      * @return Result code.
00042      */
00043     virtual HTTPResult getStatusesHomeTimeline(void (*func)(char *buf, size_t siz) = NULL);
00044 
00045     /**
00046      * Updates the authenticating user's status.
00047      * A status update with text identical to the authenticating user's text identical
00048      * to the authenticating user's current status will be ignored to prevent duplicates.
00049      *
00050      * @param func A pointer to a callback function.
00051      * @return Result code.
00052      */
00053     virtual HTTPResult postStatusesUpdate(const std::string datatext, void (*func)(char *buf, size_t siz) = NULL);
00054 private:
00055     HTTPResult result;
00056     bool completed;
00057     void callback(HTTPResult r);
00058 };