source: subversion/applications/utils/export/osmgarminmap/curlstuff.h @ 12483

Last change on this file since 12483 was 1800, checked in by nick, 13 years ago

Started osm2garmin -- automated utility to transfer live OSM data to Garmin GPS

File size: 1.7 KB
Line 
1/*
2            Copyright (C) 2005 Nick Whitelegg, Hogweed Software, nick@hogweed.org
3       
4            This program is free software; you can redistribute it and/or modify
5            it under the terms of the GNU Lesser General Public License as published by
6            the Free Software Foundation; either version 2 of the License, or
7            (at your option) any later version.
8       
9            This program is distributed in the hope that it will be useful,
10            but WITHOUT ANY WARRANTY; without even the implied warranty of
11            MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12            GNU Lesser General Public License for more details.
13       
14            You should have received a copy of the GNU Lesser General Public License
15            along with this program; if not, write to the Free Software
16            Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
17       
18         */
19        #ifndef CURLSTUFF_H
20        #define CURLSTUFF_H     
21        /*
22        #ifdef __cplusplus
23        extern "C"
24        {
25        #endif
26        */
27       
28        #include <stdio.h>
29        #include <curl/curl.h>
30       
31        typedef struct
32        {
33                        char *data;
34                int nbytes;
35        } CURL_LOAD_DATA;
36       
37
38        CURL_LOAD_DATA  *grab_osm(const char *urlbase,
39                                        double west,double south,double east,double north,
40                                        const char* username,const char* password);
41        CURL_LOAD_DATA *grab_http_response(const char *url,const char* = NULL, 
42                                                const char* = NULL);
43        size_t response_callback(void *ptr,size_t size,size_t nmemb, void *data);
44        CURL_LOAD_DATA *Do(CURL *curl,const char *url,const char* = NULL, 
45                                const char* = NULL);
46        char* put_data(char* idata,char* url,char* username,char* password);
47        size_t infunc (void *bufptr,size_t size, size_t nitems, void *userp);
48       
49        /*
50        #ifdef __cplusplus
51        }
52        #endif
53        */
54               
55        #endif
Note: See TracBrowser for help on using the repository browser.