kodi
UDFBlockInput.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 "threads/CriticalSection.h"
12 
13 #include <memory>
14 
15 #include <udfread/blockinput.h>
16 
17 namespace XFILE
18 {
19 class CFile;
20 }
21 
23 {
24 public:
25  CUDFBlockInput() = default;
26  ~CUDFBlockInput() = default;
27 
28  udfread_block_input* GetBlockInput(const std::string& file);
29 
30 private:
31  static int Close(udfread_block_input* bi);
32  static uint32_t Size(udfread_block_input* bi);
33  static int Read(udfread_block_input* bi, uint32_t lba, void* buf, uint32_t nblocks, int flags);
34 
35  struct UDF_BI
36  {
37  struct udfread_block_input bi;
38  std::shared_ptr<XFILE::CFile> fp{nullptr};
39  CCriticalSection lock;
40  };
41 
42  std::unique_ptr<UDF_BI> m_bi{nullptr};
43 };
Definition: Scraper.h:41
Definition: SimpleFS.h:27
Definition: UDFBlockInput.h:22