2 * Copyright (C) 2015-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.
11 #include "guilib/XBTFReader.h"
12 #include "threads/CriticalSection.h"
29 static CXbtManager
& GetInstance();
31 bool HasFiles(const CURL
& path
) const;
32 bool GetFiles(const CURL
& path
, std::vector
<CXBTFFile
>& files
) const;
34 bool GetReader(const CURL
& path
, CXBTFReaderPtr
& reader
) const;
36 void Release(const CURL
& path
);
40 CXbtManager(const CXbtManager
&) = delete;
41 CXbtManager
& operator=(const CXbtManager
&) = delete;
45 CXBTFReaderPtr reader
;
46 time_t lastModification
;
48 using XBTFReaders
= std::map
<std::string
, XBTFReader
>;
50 XBTFReaders::iterator
GetReader(const CURL
& path
) const;
51 XBTFReaders::iterator
GetReader(const std::string
& path
) const;
52 void RemoveReader(XBTFReaders::iterator readerIterator
) const;
53 XBTFReaders::const_iterator
ProcessFile(const CURL
& path
) const;
55 static std::string
NormalizePath(const CURL
& path
);
57 mutable XBTFReaders m_readers
;
58 mutable CCriticalSection m_lock
;