Mercurial > audlegacy-plugins
comparison src/neon/neon.h @ 2663:45aea2e3592a
General code cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 28 May 2008 21:19:42 +0300 |
parents | 503ea4219e17 |
children | f1b6f1b2cdb3 |
comparison
equal
deleted
inserted
replaced
2662:8e4abb83e560 | 2663:45aea2e3592a |
---|---|
27 #include <ne_session.h> | 27 #include <ne_session.h> |
28 #include <ne_request.h> | 28 #include <ne_request.h> |
29 #include <ne_uri.h> | 29 #include <ne_uri.h> |
30 #include "rb.h" | 30 #include "rb.h" |
31 | 31 |
32 | |
33 static void init(void); | |
34 static void fini(void); | |
35 | |
36 VFSFile *neon_aud_vfs_fopen_impl(const gchar* path, const gchar* mode); | |
37 gint neon_aud_vfs_fclose_impl(VFSFile* file); | |
38 size_t neon_aud_vfs_fread_impl(gpointer ptr_, size_t size, size_t nmemb, VFSFile* file); | |
39 size_t neon_aud_vfs_fwrite_impl(gconstpointer ptr, size_t size, size_t nmemb, VFSFile* file); | |
40 gint neon_aud_vfs_getc_impl(VFSFile* file); | |
41 gint neon_aud_vfs_ungetc_impl(gint c, VFSFile* file); | |
42 void neon_aud_vfs_rewind_impl(VFSFile* file); | |
43 glong neon_aud_vfs_ftell_impl(VFSFile* file); | |
44 gboolean neon_aud_vfs_feof_impl(VFSFile* file); | |
45 gint neon_aud_vfs_truncate_impl(VFSFile* file, glong size); | |
46 gint neon_aud_vfs_fseek_impl(VFSFile* file, glong offset, gint whence); | |
47 gchar *neon_aud_vfs_metadata_impl(VFSFile* file, const gchar * field); | |
48 off_t neon_aud_vfs_fsize_impl(VFSFile* file); | |
49 | |
50 typedef enum { | 32 typedef enum { |
51 NEON_READER_INIT=0, | 33 NEON_READER_INIT=0, |
52 NEON_READER_RUN=1, | 34 NEON_READER_RUN=1, |
53 NEON_READER_ERROR, | 35 NEON_READER_ERROR, |
54 NEON_READER_EOF, | 36 NEON_READER_EOF, |
71 | 53 |
72 struct neon_handle { | 54 struct neon_handle { |
73 gchar* url; /* The URL, as passed to us */ | 55 gchar* url; /* The URL, as passed to us */ |
74 ne_uri* purl; /* The URL, parsed into a structure */ | 56 ne_uri* purl; /* The URL, parsed into a structure */ |
75 struct ringbuf rb; /* Ringbuffer for our data */ | 57 struct ringbuf rb; /* Ringbuffer for our data */ |
76 unsigned char redircount; /* Redirect count for the opened URL */ | 58 guchar redircount; /* Redirect count for the opened URL */ |
77 long pos; /* Current position in the stream (number of last byte delivered to the player) */ | 59 long pos; /* Current position in the stream (number of last byte delivered to the player) */ |
78 unsigned long content_start; /* Start position in the stream */ | 60 gulong content_start; /* Start position in the stream */ |
79 long content_length; /* Total content length, counting from content_start, if known. -1 if unknown */ | 61 long content_length; /* Total content length, counting from content_start, if known. -1 if unknown */ |
80 gboolean can_ranges; /* TRUE if the webserver advertised accept-range: bytes */ | 62 gboolean can_ranges; /* TRUE if the webserver advertised accept-range: bytes */ |
81 unsigned long icy_metaint; /* Interval in which the server will send metadata announcements. 0 if no announcments */ | 63 gulong icy_metaint; /* Interval in which the server will send metadata announcements. 0 if no announcments */ |
82 unsigned long icy_metaleft; /* Bytes left until the next metadata block */ | 64 gulong icy_metaleft; /* Bytes left until the next metadata block */ |
83 struct icy_metadata icy_metadata; /* Current ICY metadata */ | 65 struct icy_metadata icy_metadata; /* Current ICY metadata */ |
84 ne_session* session; | 66 ne_session* session; |
85 ne_request* request; | 67 ne_request* request; |
86 GThread* reader; | 68 GThread* reader; |
87 struct reader_status reader_status; | 69 struct reader_status reader_status; |