[Test] Added tests for CUtil::SplitParams
[xbmc.git] / xbmc / filesystem / UDFBlockInput.h
blobe7cfc88308772c3dc8ae20efefe54bdeab9fc963
1 /*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "threads/CriticalSection.h"
13 #include <memory>
15 #include <udfread/blockinput.h>
17 namespace XFILE
19 class CFile;
22 class CUDFBlockInput
24 public:
25 CUDFBlockInput() = default;
26 ~CUDFBlockInput() = default;
28 udfread_block_input* GetBlockInput(const std::string& file);
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);
35 struct UDF_BI
37 struct udfread_block_input bi;
38 std::shared_ptr<XFILE::CFile> fp{nullptr};
39 CCriticalSection lock;
42 std::unique_ptr<UDF_BI> m_bi{nullptr};