aboutsummaryrefslogtreecommitdiffstats
path: root/src/InputStream.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-29 18:08:49 +0100
committerMax Kellermann <max@duempel.org>2013-12-29 18:08:49 +0100
commitaeb2baa495776d9fc06e63f91167c40c334303c8 (patch)
tree4bbd926c1f19a64a1f3fc5b580d0d68bd3aabca3 /src/InputStream.hxx
parentea9aff1d3f9f68eb5ae9e5f2bd67d283b8c0f47e (diff)
downloadmpd-aeb2baa495776d9fc06e63f91167c40c334303c8.tar.gz
mpd-aeb2baa495776d9fc06e63f91167c40c334303c8.tar.xz
mpd-aeb2baa495776d9fc06e63f91167c40c334303c8.zip
InputStream: add static method OpenReady()
Merge some duplicate code.
Diffstat (limited to 'src/InputStream.hxx')
-rw-r--r--src/InputStream.hxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/InputStream.hxx b/src/InputStream.hxx
index b1bc9c4ab..5ac3bdcae 100644
--- a/src/InputStream.hxx
+++ b/src/InputStream.hxx
@@ -119,6 +119,15 @@ struct InputStream {
Error &error);
/**
+ * Just like Open(), but waits for the stream to become ready.
+ * It is a wrapper for Open(), WaitReady() and Check().
+ */
+ gcc_malloc gcc_nonnull_all
+ static InputStream *OpenReady(const char *uri,
+ Mutex &mutex, Cond &cond,
+ Error &error);
+
+ /**
* Close the input stream and free resources.
*
* The caller must not lock the mutex.