7 #define KURL_INV_WHENCE 2
8 #define KURL_SEEK_OUT 3
12 typedef struct kurl_t kurl_t
;
16 const char *s3secretkey
;
25 void kurl_destroy(void);
27 kurl_t
*kurl_open(const char *url
, kurl_opt_t
*opt
);
28 kurl_t
*kurl_dopen(int fd
);
29 int kurl_close(kurl_t
*ku
);
30 ssize_t
kurl_read(kurl_t
*ku
, void *buf
, size_t nbytes
);
31 off_t
kurl_seek(kurl_t
*ku
, off_t offset
, int whence
);
32 int kurl_buflen(kurl_t
*ku
, int len
);
34 off_t
kurl_tell(const kurl_t
*ku
);
35 int kurl_eof(const kurl_t
*ku
);
36 int kurl_fileno(const kurl_t
*ku
);
37 int kurl_error(const kurl_t
*ku
);
45 typedef kurl_t knetFile
;
46 #define knet_open(fn, mode) kurl_open(fn, 0)
47 #define knet_dopen(fd, mode) kurl_dopen(fd)
48 #define knet_close(fp) kurl_close(fp)
49 #define knet_read(fp, buf, len) kurl_read(fp, buf, len)
50 #define knet_seek(fp, off, whence) kurl_seek(fp, off, whence)
51 #define knet_tell(fp) kurl_tell(fp)
52 #define knet_fileno(fp) kurl_fileno(fp)
53 #define knet_win32_init() kurl_init()
54 #define knet_win32_destroy() kurl_destroy()