aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/InputStream.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/InputStream.hxx')
-rw-r--r--src/input/InputStream.hxx29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/input/InputStream.hxx b/src/input/InputStream.hxx
index 81b903ba2..bf628ea64 100644
--- a/src/input/InputStream.hxx
+++ b/src/input/InputStream.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2014 The Music Player Daemon Project
+ * Copyright (C) 2003-2015 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -217,13 +217,6 @@ public:
mime = std::move(_mime);
}
- gcc_nonnull_all
- void OverrideMimeType(const char *_mime) {
- assert(ready);
-
- mime = _mime;
- }
-
gcc_pure
bool KnownSize() const {
assert(ready);
@@ -350,7 +343,6 @@ public:
*
* The caller must lock the mutex.
*
- * @param is the InputStream object
* @param ptr the buffer to read into
* @param size the maximum number of bytes to read
* @return the number of bytes read
@@ -364,6 +356,25 @@ public:
*/
gcc_nonnull_all
size_t LockRead(void *ptr, size_t size, Error &error);
+
+ /**
+ * Reads the whole data from the stream into the caller-supplied buffer.
+ *
+ * The caller must lock the mutex.
+ *
+ * @param ptr the buffer to read into
+ * @param size the number of bytes to read
+ * @return true if the whole data was read, false otherwise.
+ */
+ gcc_nonnull_all
+ bool ReadFull(void *ptr, size_t size, Error &error);
+
+ /**
+ * Wrapper for ReadFull() which locks and unlocks the mutex;
+ * the caller must not be holding it already.
+ */
+ gcc_nonnull_all
+ bool LockReadFull(void *ptr, size_t size, Error &error);
};
#endif