source: rtos_arduino/trunk/arduino_lib/libraries/Ethernet2/src/Twitter.h@ 136

Last change on this file since 136 was 136, checked in by ertl-honda, 8 years ago

ライブラリとOS及びベーシックなサンプルの追加.

File size: 1.1 KB
Line 
1/*
2 Twitter.cpp - Arduino library to Post messages to Twitter using OAuth.
3 Copyright (c) NeoCat 2010-2011. All right reserved.
4
5 This library is distributed in the hope that it will be useful,
6 but WITHOUT ANY WARRANTY; without even the implied warranty of
7 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8 */
9
10// ver1.2 - Use <Udp.h> to support IDE 0019 or later
11// ver1.3 - Support IDE 1.0
12
13#ifndef TWITTER_H
14#define TWITTER_H
15
16#include <inttypes.h>
17#include <avr/pgmspace.h>
18#if defined(ARDUINO) && ARDUINO > 18 // Arduino 0019 or later
19#include <SPI.h>
20#endif
21#include <Ethernet2.h>
22#if defined(ARDUINO) && ARDUINO < 100 // earlier than Arduino 1.0
23#include <EthernetDNS.h>
24#endif
25
26class Twitter
27{
28private:
29 uint8_t parseStatus;
30 int statusCode;
31 const char *token;
32#if defined(ARDUINO) && ARDUINO < 100
33 Client client;
34#else
35 EthernetClient client;
36#endif
37public:
38 Twitter(const char *user_and_passwd);
39
40 bool post(const char *msg);
41 bool checkStatus(Print *debug = NULL);
42 int wait(Print *debug = NULL);
43 int status(void) { return statusCode; }
44};
45
46#endif //TWITTER_H
Note: See TracBrowser for help on using the repository browser.