TwitterExample with newer library (2012Aug)

Dependencies:   EthernetNetIf HTTPClient mbed

Committer:
nxpfan
Date:
Wed Aug 29 03:50:19 2012 +0000
Revision:
0:075157567b0c
simple twitter example with newer library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nxpfan 0:075157567b0c 1 /*
nxpfan 0:075157567b0c 2 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
nxpfan 0:075157567b0c 3 * All rights reserved.
nxpfan 0:075157567b0c 4 *
nxpfan 0:075157567b0c 5 * Redistribution and use in source and binary forms, with or without modification,
nxpfan 0:075157567b0c 6 * are permitted provided that the following conditions are met:
nxpfan 0:075157567b0c 7 *
nxpfan 0:075157567b0c 8 * 1. Redistributions of source code must retain the above copyright notice,
nxpfan 0:075157567b0c 9 * this list of conditions and the following disclaimer.
nxpfan 0:075157567b0c 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
nxpfan 0:075157567b0c 11 * this list of conditions and the following disclaimer in the documentation
nxpfan 0:075157567b0c 12 * and/or other materials provided with the distribution.
nxpfan 0:075157567b0c 13 * 3. The name of the author may not be used to endorse or promote products
nxpfan 0:075157567b0c 14 * derived from this software without specific prior written permission.
nxpfan 0:075157567b0c 15 *
nxpfan 0:075157567b0c 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
nxpfan 0:075157567b0c 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
nxpfan 0:075157567b0c 18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
nxpfan 0:075157567b0c 19 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
nxpfan 0:075157567b0c 20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
nxpfan 0:075157567b0c 21 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
nxpfan 0:075157567b0c 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
nxpfan 0:075157567b0c 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
nxpfan 0:075157567b0c 24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
nxpfan 0:075157567b0c 25 * OF SUCH DAMAGE.
nxpfan 0:075157567b0c 26 *
nxpfan 0:075157567b0c 27 * This file is part of the lwIP TCP/IP stack.
nxpfan 0:075157567b0c 28 *
nxpfan 0:075157567b0c 29 * Author: Adam Dunkels <adam@sics.se>
nxpfan 0:075157567b0c 30 *
nxpfan 0:075157567b0c 31 */
nxpfan 0:075157567b0c 32 #ifndef __LWIP_ERR_H__
nxpfan 0:075157567b0c 33 #define __LWIP_ERR_H__
nxpfan 0:075157567b0c 34
nxpfan 0:075157567b0c 35 #include "lwip/opt.h"
nxpfan 0:075157567b0c 36 #include "lwip/arch.h"
nxpfan 0:075157567b0c 37
nxpfan 0:075157567b0c 38 #ifdef __cplusplus
nxpfan 0:075157567b0c 39 extern "C" {
nxpfan 0:075157567b0c 40 #endif
nxpfan 0:075157567b0c 41
nxpfan 0:075157567b0c 42 /** Define LWIP_ERR_T in cc.h if you want to use
nxpfan 0:075157567b0c 43 * a different type for your platform (must be signed). */
nxpfan 0:075157567b0c 44 #ifdef LWIP_ERR_T
nxpfan 0:075157567b0c 45 typedef LWIP_ERR_T err_t;
nxpfan 0:075157567b0c 46 #else /* LWIP_ERR_T */
nxpfan 0:075157567b0c 47 typedef s8_t err_t;
nxpfan 0:075157567b0c 48 #endif /* LWIP_ERR_T*/
nxpfan 0:075157567b0c 49
nxpfan 0:075157567b0c 50 /* Definitions for error constants. */
nxpfan 0:075157567b0c 51
nxpfan 0:075157567b0c 52 #define ERR_OK 0 /* No error, everything OK. */
nxpfan 0:075157567b0c 53 #define ERR_MEM -1 /* Out of memory error. */
nxpfan 0:075157567b0c 54 #define ERR_BUF -2 /* Buffer error. */
nxpfan 0:075157567b0c 55 #define ERR_TIMEOUT -3 /* Timeout. */
nxpfan 0:075157567b0c 56 #define ERR_RTE -4 /* Routing problem. */
nxpfan 0:075157567b0c 57 #define ERR_INPROGRESS -5 /* Operation in progress */
nxpfan 0:075157567b0c 58 #define ERR_VAL -6 /* Illegal value. */
nxpfan 0:075157567b0c 59 #define ERR_WOULDBLOCK -7 /* Operation would block. */
nxpfan 0:075157567b0c 60
nxpfan 0:075157567b0c 61 #define ERR_IS_FATAL(e) ((e) < ERR_VAL)
nxpfan 0:075157567b0c 62
nxpfan 0:075157567b0c 63 #define ERR_ABRT -8 /* Connection aborted. */
nxpfan 0:075157567b0c 64 #define ERR_RST -9 /* Connection reset. */
nxpfan 0:075157567b0c 65 #define ERR_CLSD -10 /* Connection closed. */
nxpfan 0:075157567b0c 66 #define ERR_CONN -11 /* Not connected. */
nxpfan 0:075157567b0c 67
nxpfan 0:075157567b0c 68 #define ERR_ARG -12 /* Illegal argument. */
nxpfan 0:075157567b0c 69
nxpfan 0:075157567b0c 70 #define ERR_USE -13 /* Address in use. */
nxpfan 0:075157567b0c 71
nxpfan 0:075157567b0c 72 #define ERR_IF -14 /* Low-level netif error */
nxpfan 0:075157567b0c 73 #define ERR_ISCONN -15 /* Already connected. */
nxpfan 0:075157567b0c 74
nxpfan 0:075157567b0c 75
nxpfan 0:075157567b0c 76 #ifdef LWIP_DEBUG
nxpfan 0:075157567b0c 77 extern const char *lwip_strerr(err_t err);
nxpfan 0:075157567b0c 78 #else
nxpfan 0:075157567b0c 79 #define lwip_strerr(x) ""
nxpfan 0:075157567b0c 80 #endif /* LWIP_DEBUG */
nxpfan 0:075157567b0c 81
nxpfan 0:075157567b0c 82 #ifdef __cplusplus
nxpfan 0:075157567b0c 83 }
nxpfan 0:075157567b0c 84 #endif
nxpfan 0:075157567b0c 85
nxpfan 0:075157567b0c 86 #endif /* __LWIP_ERR_H__ */