| Index: ui/file_manager/zip_archiver/cpp/volume_reader.h
|
| diff --git a/ui/file_manager/zip_archiver/cpp/volume_reader.h b/ui/file_manager/zip_archiver/cpp/volume_reader.h
|
| index 269caf1b0112fb18e62e1eb29ae3b69e7b520fa3..2c6cd15b080e41dc34f5a65d696fbfe1693b533c 100644
|
| --- a/ui/file_manager/zip_archiver/cpp/volume_reader.h
|
| +++ b/ui/file_manager/zip_archiver/cpp/volume_reader.h
|
| @@ -7,8 +7,6 @@
|
|
|
| #include <string>
|
|
|
| -#include "archive.h"
|
| -
|
| // Defines a reader for archive volumes. This class is used by libarchive
|
| // for custom reads: https://github.com/libarchive/libarchive/wiki/Examples
|
| class VolumeReader {
|
| @@ -23,25 +21,22 @@ class VolumeReader {
|
| // The operation must be synchronous (libarchive requirement), so it
|
| // should NOT be done on the main thread. bytes_to_read should be > 0.
|
| //
|
| - // Returns the actual number of read bytes or ARCHIVE_FATAL in case of
|
| - // failure.
|
| + // Returns the actual number of read bytes or -1 in case of failure.
|
| virtual int64_t Read(int64_t bytes_to_read,
|
| const void** destination_buffer) = 0;
|
|
|
| - // Tries to skip bytes_to_skip number of bytes. Returns the actual number of
|
| - // skipped bytes or 0 if none were skipped. In case of failure
|
| - // VolumeReader::Skip returns 0 bytes and VolumeReader::Read can be used
|
| - // to skip those bytes by discarding them.
|
| - virtual int64_t Skip(int64_t bytes_to_skip) = 0;
|
| -
|
| // Tries to seek to offset from whence. Returns the resulting offset location
|
| - // or ARCHIVE_FATAL in case of errors. Similar to
|
| + // or -1 in case of errors. Similar to
|
| // http://www.cplusplus.com/reference/cstdio/fseek/
|
| virtual int64_t Seek(int64_t offset, int whence) = 0;
|
|
|
| // Fetches a passphrase for reading. If the passphrase is not available it
|
| // returns NULL.
|
| virtual const char* Passphrase() = 0;
|
| +
|
| + virtual int64_t offset() = 0;
|
| +
|
| + virtual int64_t archive_size() = 0;
|
| };
|
|
|
| #endif // VOLUME_READER_H_
|
|
|