AdapterIO: Increase consistency

* Moved data locking in the internal buffer class, includes handling
of backend writes.
* Takes advantage of inheritance for getting the size. The choice is
made depending on the flags. This allow the implementer to easily
return a custom size by reimplementing GetSize. At the same time
a plain BAdapterIO can still have it's total size set, but the behavior
will change depending it's mutable or not.
* Some decisions are now made by considering everything in absolute
values.
* Other minor fixes.
This commit is contained in:
Dario Casalinuovo
2016-06-23 00:38:33 +02:00
parent ad89985e7e
commit 6903cf9bda
2 changed files with 96 additions and 67 deletions
+1 -3
View File
@@ -72,10 +72,8 @@ private:
int32 fFlags;
bigtime_t fTimeout;
off_t fBackPosition;
mutable RWLocker fLock;
RelativePositionIO* fBuffer;
off_t fTotalSize;
BInputAdapter* fInputAdapter;