Commit Graph

80 Commits

Author SHA1 Message Date
Max Kellermann
ae88ba986e archive/iso9660: eliminate useless assignments 2013-11-23 18:30:12 +01:00
Max Kellermann
93deb84499 input_stream: rename struct to InputStream 2013-10-23 23:12:02 +02:00
Max Kellermann
c4d4011c63 InputInternal: remove obsolete library 2013-10-23 23:10:27 +02:00
Max Kellermann
83c726a34f GetBaseUTF8 2013-10-21 10:50:22 +02:00
Max Kellermann
a0415f73d4 archive/bz2: remove unused function bz2_quark() 2013-10-21 10:50:22 +02:00
Max Kellermann
59f8144c50 *: use nullptr instead of NULL 2013-10-19 18:19:03 +02:00
Max Kellermann
05de2e998c InputStream: use int64_t instead of goffset
Decouple some more from GLib.
2013-10-17 10:45:10 +02:00
Max Kellermann
24780d99e6 input_plugin: rename struct to "InputPlugin" 2013-10-17 10:20:57 +02:00
Max Kellermann
dbd88e6aef Client, ...: remove unnecessary glib.h include 2013-10-15 22:51:09 +02:00
Max Kellermann
7d0269d2ce InputLegacy: move functions to the input_stream class 2013-09-05 00:23:14 +02:00
Max Kellermann
29030b54c9 util/Error: new error passing library
Replaces GLib's GError.
2013-09-04 18:14:22 +02:00
Max Kellermann
16afdfd874 ArchivePlugin: move instance methods to class ArchiveFile 2013-01-30 15:30:19 +01:00
Max Kellermann
701fff03d2 archive/bzip2: create file only after stream has been opened
Simplify error handling.
2013-01-30 15:27:23 +01:00
Max Kellermann
8e0575ca9b archive/zzip: fix memory leak 2013-01-30 15:25:29 +01:00
Max Kellermann
f5c0b0d316 ArchiveFile: convert to a class 2013-01-29 23:26:51 +01:00
Max Kellermann
ba51045d9e refcount: convert to C++ 2013-01-29 23:20:19 +01:00
Max Kellermann
9f0fb8f6a8 ArchivePlugin: replace scan_reset(), scan_next() with visit()
Add the interface ArchiveVisitor.
2013-01-29 21:21:07 +01:00
Max Kellermann
a42f9fd4e2 ArchivePlugin: scan_next() returns const string 2013-01-29 21:11:04 +01:00
Max Kellermann
dcf55c7e32 InputStream: add constructor/destructor
Eliminate input_stream_init() and input_stream_deinit().
2013-01-28 23:29:43 +01:00
Max Kellermann
e39969a0d0 input/iso9660: add constructor/destructor 2013-01-28 22:54:07 +01:00
Max Kellermann
d68185aa28 input/iso9660: rename the classes 2013-01-28 22:52:40 +01:00
Max Kellermann
4cab151ed2 input/zzip: add constructor/destructor 2013-01-28 22:48:04 +01:00
Max Kellermann
8ac9b77e5c input/zzip: rename the classes 2013-01-28 22:43:59 +01:00
Max Kellermann
1b9da5d978 input/bzip2: add constructor/destructor 2013-01-28 22:39:09 +01:00
Max Kellermann
ab2b7358cb archive/bzip2: rename the classes 2013-01-28 22:17:40 +01:00
Max Kellermann
8ceea85813 DatabaseLock, input/bzip2: remove obsolete Glib/gcc workaround 2013-01-28 22:17:40 +01:00
Max Kellermann
6f3d70b5e2 DecoderControl, InputStream: use Mutex/Cond instead of GMutex/GCond 2013-01-27 18:39:32 +01:00
Max Kellermann
0273cd44b0 input_stream: forward-declare the struct
Hide the definition from C code, to prepare the transition to C++.
2013-01-26 01:24:01 +01:00
Max Kellermann
49567f1f3e input_{internal,plugin}: convert to C++ 2013-01-25 22:43:01 +01:00
Max Kellermann
94fffb332b archive/*: convert to C++ 2013-01-24 19:18:58 +01:00
Max Kellermann
4feb57e895 db_lock, archive/bz2, ...: workaround for G_STATIC_MUTEX_INIT warning 2012-04-04 20:13:15 +02:00
Max Kellermann
754f26a97c input_stream: non-blocking I/O
Add GMutex, GCond attributes which will be used by callers to
conditionally wait on the stream.

Remove the (now-useless) plugin method buffer(), wait on GCond
instead.  Lock the input_stream before each method call.  Do the same
with the playlist plugins.
2011-09-16 21:22:13 +02:00
Max Kellermann
dd33317f45 input_stream: move input_stream_init(), _deinit() to _internal.c 2011-09-14 22:01:55 +02:00
Max Kellermann
c6cbcc2c25 copyright year 2011 2011-01-29 10:13:54 +01:00
Max Kellermann
9cb7760c5e input_stream: added attribute "uri" 2010-01-18 10:18:41 +01:00
Max Kellermann
fb9bd53328 input_stream: added function input_stream_deinit()
All close() implementations must call this method.
2010-01-18 09:57:53 +01:00
Max Kellermann
d3b763a48c input_stream: return allocated input_stream objects
Major API redesign: don't let the caller allocate the input_stream
object.  Let each input plugin allocate its own (derived/extended)
input_stream pointer.  The "data" attribute can now be removed, and
all input plugins simply cast the input_stream pointer to their own
structure (with an "struct input_stream base" as the first attribute).
2010-01-01 17:25:07 +01:00
Avuton Olrich
9d3865cb95 Update copyright notices. 2009-12-31 20:58:43 -08:00
Max Kellermann
aad05fd138 archive: use reference counting for archive+input
Make the input_stream implementation hold a reference on the
archive_file object.  Allow the caller to "close" the archive_file
object immediately, no matter if the open_stream() method has
succeeded or not.
2009-12-31 18:27:35 +01:00
Max Kellermann
0cc3b98bd9 input/archive: don't initialize input_stream.ready
The archive plugin should decide this.
2009-12-31 16:26:34 +01:00
Max Kellermann
c157711eaf archive/bz2: allocate buffer statically
Reduce the number of malloc()/free() calls.
2009-12-31 16:26:14 +01:00
Max Kellermann
2632794578 archive/bz2: added struct bz2_input_stream
Don't use the bz2_archive_file object for the input_stream.
2009-12-31 16:25:21 +01:00
Max Kellermann
3ddf7b620c archive/iso9660: added struct iso9660_input_stream
Don't use the iso9660_archive_file object for the input_stream.
2009-12-31 16:13:09 +01:00
Max Kellermann
131cb0598a archive/iso9660: set input_stream.{size,offset} 2009-12-31 16:13:09 +01:00
Max Kellermann
9862521aec archive/zzip: added struct zzip_input_stream
Don't use the zzip_archive object for the input_stream.
2009-12-31 16:00:12 +01:00
Max Kellermann
55fbb67cfb archive/zzip: set input_stream.{size,offset} 2009-12-31 15:59:43 +01:00
Max Kellermann
71fee09744 archive_plugin: use GError in the open() method 2009-12-16 17:10:19 +01:00
Max Kellermann
0bc8c0c1da archive_plugin: wrap method calls
Make archive_file a "real" struct, extended by all plugins.  Add the
plugin pointer to it.  Wrap all method calls in functions.
2009-12-16 17:09:58 +01:00
Max Kellermann
74156d5bed archive_plugin: pass const string to method open() 2009-12-16 17:09:29 +01:00
Max Kellermann
b04adde7ab archive: added a C header for each plugin
Moved the archive plugin "extern" declarations into each plugin
header.
2009-12-16 15:57:16 +01:00