GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: a tiny graphical app kit for ruby
Homepage: http://code.whytheluckystiff.net/shoes
Clone URL: git://github.com/why/shoes.git
shoes / shoes / http.h
100644 41 lines (33 sloc) 0.843 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// shoes/http.h
// the shoes downloader, which uses platform code and threads
// to achieve much faster and brain-dead http access.
//
#ifndef SHOES_HTTP_H
#define SHOES_HTTP_H
 
#include "shoes/http/common.h"
 
typedef struct {
  char *host;
  int port;
  char *path;
 
  char *method, *body;
  unsigned long bodylen;
  SHOES_DOWNLOAD_HEADERS headers;
 
  char *mem;
  unsigned long memlen;
  char *filepath;
  unsigned LONG_LONG size;
  shoes_download_handler handler;
  void *data;
  unsigned char flags;
} shoes_download_request;
 
void shoes_download(shoes_download_request *req);
void shoes_queue_download(shoes_download_request *req);
VALUE shoes_http_error(SHOES_DOWNLOAD_ERROR error);
SHOES_DOWNLOAD_HEADERS shoes_http_headers(VALUE hsh);
 
#ifdef SHOES_WIN32
#include "shoes/http/winhttp.h"
#else
#define HTTP_HANDLER(x)
#endif
 
#endif