summaryrefslogtreecommitdiffstats
path: root/media/img_utils/include/img_utils/Input.h
diff options
context:
space:
mode:
Diffstat (limited to 'media/img_utils/include/img_utils/Input.h')
-rw-r--r--media/img_utils/include/img_utils/Input.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/media/img_utils/include/img_utils/Input.h b/media/img_utils/include/img_utils/Input.h
index 2166601..6a03647 100644
--- a/media/img_utils/include/img_utils/Input.h
+++ b/media/img_utils/include/img_utils/Input.h
@@ -43,10 +43,18 @@ class ANDROID_API Input {
* count argument will be read. Bytes will be written into the given buffer starting
* at the index given in the offset argument.
*
- * Returns the number of bytes read. If an error has occurred, the value pointed
- * to by the given status_t pointer will be set to a negative error code.
+ * Returns the number of bytes read, or NOT_ENOUGH_DATA if at the end of the file. If an
+ * error has occurred, this will return a negative error code other than NOT_ENOUGH_DATA.
*/
- virtual size_t read(uint8_t* buf, size_t offset, size_t count, status_t* err) = 0;
+ virtual ssize_t read(uint8_t* buf, size_t offset, size_t count) = 0;
+
+ /**
+ * Skips bytes in the input.
+ *
+ * Returns the number of bytes skipped, or NOT_ENOUGH_DATA if at the end of the file. If an
+ * error has occurred, this will return a negative error code other than NOT_ENOUGH_DATA.
+ */
+ virtual ssize_t skip(size_t count);
/**
* Close the Input. It is not valid to call open on a previously closed Input.