Hi. This is the feed program for Cosm. (The previous name of the services is Pachube.)

Dependencies:   mbed ThermistorPack Pachube ConfigFile EthernetNetIf TextLCD HTTPClient_ToBeRemoved FatFileSystem SDFileSystem

Committer:
shintamainjp
Date:
Mon Aug 06 12:37:59 2012 +0000
Revision:
0:521ba375aa0f
Pachube renamed to Cosm.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shintamainjp 0:521ba375aa0f 1 /*
shintamainjp 0:521ba375aa0f 2 * Redistribution and use in source and binary forms, with or without modification,
shintamainjp 0:521ba375aa0f 3 * are permitted provided that the following conditions are met:
shintamainjp 0:521ba375aa0f 4 *
shintamainjp 0:521ba375aa0f 5 * 1. Redistributions of source code must retain the above copyright notice,
shintamainjp 0:521ba375aa0f 6 * this list of conditions and the following disclaimer.
shintamainjp 0:521ba375aa0f 7 * 2. Redistributions in binary form must reproduce the above copyright notice,
shintamainjp 0:521ba375aa0f 8 * this list of conditions and the following disclaimer in the documentation
shintamainjp 0:521ba375aa0f 9 * and/or other materials provided with the distribution.
shintamainjp 0:521ba375aa0f 10 * 3. The name of the author may not be used to endorse or promote products
shintamainjp 0:521ba375aa0f 11 * derived from this software without specific prior written permission.
shintamainjp 0:521ba375aa0f 12 *
shintamainjp 0:521ba375aa0f 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
shintamainjp 0:521ba375aa0f 14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
shintamainjp 0:521ba375aa0f 15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
shintamainjp 0:521ba375aa0f 16 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
shintamainjp 0:521ba375aa0f 17 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
shintamainjp 0:521ba375aa0f 18 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
shintamainjp 0:521ba375aa0f 19 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
shintamainjp 0:521ba375aa0f 20 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
shintamainjp 0:521ba375aa0f 21 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
shintamainjp 0:521ba375aa0f 22 * OF SUCH DAMAGE.
shintamainjp 0:521ba375aa0f 23 *
shintamainjp 0:521ba375aa0f 24 * This file is part of the lwIP TCP/IP stack.
shintamainjp 0:521ba375aa0f 25 *
shintamainjp 0:521ba375aa0f 26 * Author: Simon Goldschmidt
shintamainjp 0:521ba375aa0f 27 *
shintamainjp 0:521ba375aa0f 28 */
shintamainjp 0:521ba375aa0f 29 #ifndef __LWIP_NETDB_H__
shintamainjp 0:521ba375aa0f 30 #define __LWIP_NETDB_H__
shintamainjp 0:521ba375aa0f 31
shintamainjp 0:521ba375aa0f 32 #include "lwip/opt.h"
shintamainjp 0:521ba375aa0f 33
shintamainjp 0:521ba375aa0f 34 #if LWIP_DNS && LWIP_SOCKET
shintamainjp 0:521ba375aa0f 35
shintamainjp 0:521ba375aa0f 36 #include <stddef.h> /* for size_t */
shintamainjp 0:521ba375aa0f 37
shintamainjp 0:521ba375aa0f 38 #include "lwip/inet.h"
shintamainjp 0:521ba375aa0f 39 #include "lwip/sockets.h"
shintamainjp 0:521ba375aa0f 40
shintamainjp 0:521ba375aa0f 41 /* some rarely used options */
shintamainjp 0:521ba375aa0f 42 #ifndef LWIP_DNS_API_DECLARE_H_ERRNO
shintamainjp 0:521ba375aa0f 43 #define LWIP_DNS_API_DECLARE_H_ERRNO 1
shintamainjp 0:521ba375aa0f 44 #endif
shintamainjp 0:521ba375aa0f 45
shintamainjp 0:521ba375aa0f 46 #ifndef LWIP_DNS_API_DEFINE_ERRORS
shintamainjp 0:521ba375aa0f 47 #define LWIP_DNS_API_DEFINE_ERRORS 1
shintamainjp 0:521ba375aa0f 48 #endif
shintamainjp 0:521ba375aa0f 49
shintamainjp 0:521ba375aa0f 50 #ifndef LWIP_DNS_API_DECLARE_STRUCTS
shintamainjp 0:521ba375aa0f 51 #define LWIP_DNS_API_DECLARE_STRUCTS 1
shintamainjp 0:521ba375aa0f 52 #endif
shintamainjp 0:521ba375aa0f 53
shintamainjp 0:521ba375aa0f 54 #if LWIP_DNS_API_DEFINE_ERRORS
shintamainjp 0:521ba375aa0f 55 /** Errors used by the DNS API functions, h_errno can be one of them */
shintamainjp 0:521ba375aa0f 56 #define EAI_NONAME 200
shintamainjp 0:521ba375aa0f 57 #define EAI_SERVICE 201
shintamainjp 0:521ba375aa0f 58 #define EAI_FAIL 202
shintamainjp 0:521ba375aa0f 59 #define EAI_MEMORY 203
shintamainjp 0:521ba375aa0f 60
shintamainjp 0:521ba375aa0f 61 #define HOST_NOT_FOUND 210
shintamainjp 0:521ba375aa0f 62 #define NO_DATA 211
shintamainjp 0:521ba375aa0f 63 #define NO_RECOVERY 212
shintamainjp 0:521ba375aa0f 64 #define TRY_AGAIN 213
shintamainjp 0:521ba375aa0f 65 #endif /* LWIP_DNS_API_DEFINE_ERRORS */
shintamainjp 0:521ba375aa0f 66
shintamainjp 0:521ba375aa0f 67 #if LWIP_DNS_API_DECLARE_STRUCTS
shintamainjp 0:521ba375aa0f 68 struct hostent {
shintamainjp 0:521ba375aa0f 69 char *h_name; /* Official name of the host. */
shintamainjp 0:521ba375aa0f 70 char **h_aliases; /* A pointer to an array of pointers to alternative host names,
shintamainjp 0:521ba375aa0f 71 terminated by a null pointer. */
shintamainjp 0:521ba375aa0f 72 int h_addrtype; /* Address type. */
shintamainjp 0:521ba375aa0f 73 int h_length; /* The length, in bytes, of the address. */
shintamainjp 0:521ba375aa0f 74 char **h_addr_list; /* A pointer to an array of pointers to network addresses (in
shintamainjp 0:521ba375aa0f 75 network byte order) for the host, terminated by a null pointer. */
shintamainjp 0:521ba375aa0f 76 #define h_addr h_addr_list[0] /* for backward compatibility */
shintamainjp 0:521ba375aa0f 77 };
shintamainjp 0:521ba375aa0f 78
shintamainjp 0:521ba375aa0f 79 struct addrinfo {
shintamainjp 0:521ba375aa0f 80 int ai_flags; /* Input flags. */
shintamainjp 0:521ba375aa0f 81 int ai_family; /* Address family of socket. */
shintamainjp 0:521ba375aa0f 82 int ai_socktype; /* Socket type. */
shintamainjp 0:521ba375aa0f 83 int ai_protocol; /* Protocol of socket. */
shintamainjp 0:521ba375aa0f 84 socklen_t ai_addrlen; /* Length of socket address. */
shintamainjp 0:521ba375aa0f 85 struct sockaddr *ai_addr; /* Socket address of socket. */
shintamainjp 0:521ba375aa0f 86 char *ai_canonname; /* Canonical name of service location. */
shintamainjp 0:521ba375aa0f 87 struct addrinfo *ai_next; /* Pointer to next in list. */
shintamainjp 0:521ba375aa0f 88 };
shintamainjp 0:521ba375aa0f 89 #endif /* LWIP_DNS_API_DECLARE_STRUCTS */
shintamainjp 0:521ba375aa0f 90
shintamainjp 0:521ba375aa0f 91 #if LWIP_DNS_API_DECLARE_H_ERRNO
shintamainjp 0:521ba375aa0f 92 /* application accessable error code set by the DNS API functions */
shintamainjp 0:521ba375aa0f 93 extern int h_errno;
shintamainjp 0:521ba375aa0f 94 #endif /* LWIP_DNS_API_DECLARE_H_ERRNO*/
shintamainjp 0:521ba375aa0f 95
shintamainjp 0:521ba375aa0f 96 struct hostent *lwip_gethostbyname(const char *name);
shintamainjp 0:521ba375aa0f 97 int lwip_gethostbyname_r(const char *name, struct hostent *ret, char *buf,
shintamainjp 0:521ba375aa0f 98 size_t buflen, struct hostent **result, int *h_errnop);
shintamainjp 0:521ba375aa0f 99 void lwip_freeaddrinfo(struct addrinfo *ai);
shintamainjp 0:521ba375aa0f 100 int lwip_getaddrinfo(const char *nodename,
shintamainjp 0:521ba375aa0f 101 const char *servname,
shintamainjp 0:521ba375aa0f 102 const struct addrinfo *hints,
shintamainjp 0:521ba375aa0f 103 struct addrinfo **res);
shintamainjp 0:521ba375aa0f 104
shintamainjp 0:521ba375aa0f 105 #if LWIP_COMPAT_SOCKETS
shintamainjp 0:521ba375aa0f 106 #define gethostbyname(name) lwip_gethostbyname(name)
shintamainjp 0:521ba375aa0f 107 #define gethostbyname_r(name, ret, buf, buflen, result, h_errnop) \
shintamainjp 0:521ba375aa0f 108 lwip_gethostbyname_r(name, ret, buf, buflen, result, h_errnop)
shintamainjp 0:521ba375aa0f 109 #define freeaddrinfo(addrinfo) lwip_freeaddrinfo(addrinfo)
shintamainjp 0:521ba375aa0f 110 #define getaddrinfo(nodname, servname, hints, res) \
shintamainjp 0:521ba375aa0f 111 lwip_getaddrinfo(nodname, servname, hints, res)
shintamainjp 0:521ba375aa0f 112 #endif /* LWIP_COMPAT_SOCKETS */
shintamainjp 0:521ba375aa0f 113
shintamainjp 0:521ba375aa0f 114 #endif /* LWIP_DNS && LWIP_SOCKET */
shintamainjp 0:521ba375aa0f 115
shintamainjp 0:521ba375aa0f 116 #endif /* __LWIP_NETDB_H__ */