xbmc
ISO9660File.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "IFile.h"
12 
13 #include <memory>
14 
15 #include <cdio++/iso9660.hpp>
16 
17 namespace XFILE
18 {
19 
20 class CISO9660File : public IFile
21 {
22 public:
23  CISO9660File();
24  ~CISO9660File() override = default;
25 
26  bool Open(const CURL& url) override;
27  void Close() override {}
28 
29  int Stat(const CURL& url, struct __stat64* buffer) override;
30 
31  ssize_t Read(void* buffer, size_t size) override;
32  int64_t Seek(int64_t filePosition, int whence) override;
33 
34  int64_t GetLength() override;
35  int64_t GetPosition() override;
36 
37  bool Exists(const CURL& url) override;
38 
39  int GetChunkSize() override;
40 
41 private:
42  std::unique_ptr<ISO9660::IFS> m_iso;
43  std::unique_ptr<ISO9660::Stat> m_stat;
44 
45  int32_t m_start;
46  int32_t m_current;
47 };
48 
49 } // namespace XFILE
Definition: Scraper.h:41
Definition: ISO9660File.h:20
Definition: URL.h:20
int Stat(const CURL &url, struct __stat64 *buffer) override
Fills struct __stat64 with information about file specified by url.
Definition: ISO9660File.cpp:43
Definition: IFile.h:42
ssize_t Read(void *buffer, size_t size) override
Attempt to read bufSize bytes from currently opened file into buffer bufPtr.
Definition: ISO9660File.cpp:74