Twitter library use the Stewgate U for PHS Shield. see: https://developer.mbed.org/users/phsfan/notebook/phsshield/

Dependents:   PHSShield_Twitter

Committer:
phsfan
Date:
Mon Jun 22 14:50:41 2015 +0000
Revision:
1:6ffd13808295
Parent:
0:4fc466e9fb48
fix buffer over run

Who changed what in which revision?

UserRevisionLine numberNew contents of line
phsfan 0:4fc466e9fb48 1 /*
phsfan 0:4fc466e9fb48 2 Stewitter.h - Arduino library to Post messages to Twitter with OAuth.
phsfan 0:4fc466e9fb48 3 Copyright (c) arms22 2010 - 2012. All right reserved.
phsfan 0:4fc466e9fb48 4 */
phsfan 0:4fc466e9fb48 5 /*
phsfan 0:4fc466e9fb48 6 Twitter.h - Arduino library to Post messages to Twitter.
phsfan 0:4fc466e9fb48 7 Copyright (c) NeoCat 2009. All right reserved.
phsfan 0:4fc466e9fb48 8
phsfan 0:4fc466e9fb48 9 This library is distributed in the hope that it will be useful,
phsfan 0:4fc466e9fb48 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
phsfan 0:4fc466e9fb48 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
phsfan 0:4fc466e9fb48 12 */
phsfan 0:4fc466e9fb48 13 /* Modified by 2015 phsfan
phsfan 0:4fc466e9fb48 14 * for ABIT PHS Shield on mbed
phsfan 0:4fc466e9fb48 15 */
phsfan 0:4fc466e9fb48 16
phsfan 0:4fc466e9fb48 17 #ifndef Stewitter_H
phsfan 0:4fc466e9fb48 18 #define Stewitter_H
phsfan 0:4fc466e9fb48 19
phsfan 0:4fc466e9fb48 20 #include "mbed.h"
phsfan 0:4fc466e9fb48 21 #include "a3gs.h"
phsfan 0:4fc466e9fb48 22
phsfan 0:4fc466e9fb48 23 class Stewitter_a3gs
phsfan 0:4fc466e9fb48 24 {
phsfan 0:4fc466e9fb48 25 private:
phsfan 0:4fc466e9fb48 26 A3GS _a3gs;
phsfan 0:4fc466e9fb48 27 char httpBody[a3gsMAX_RESULT_LENGTH + 1];
phsfan 0:4fc466e9fb48 28 const char *token;
phsfan 0:4fc466e9fb48 29 int statusCode;
phsfan 0:4fc466e9fb48 30 uint8_t parseStatus;
phsfan 0:4fc466e9fb48 31 void parse (char *buf);
phsfan 0:4fc466e9fb48 32 public:
phsfan 0:4fc466e9fb48 33 Stewitter_a3gs(const char *token, A3GS &a3gs);
phsfan 0:4fc466e9fb48 34 bool post(const char *msg);
phsfan 0:4fc466e9fb48 35 bool lastMention(void);
phsfan 0:4fc466e9fb48 36 bool checkStatus();
phsfan 0:4fc466e9fb48 37 int wait();
phsfan 0:4fc466e9fb48 38 int status(void) { return statusCode; }
phsfan 0:4fc466e9fb48 39 char *response(void) { return httpBody; }
phsfan 0:4fc466e9fb48 40 };
phsfan 0:4fc466e9fb48 41
phsfan 0:4fc466e9fb48 42 #endif //Stewitter_H