2 * Copyright (C) 2016-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.
15 class CGUIDialogProgressBarHandle
;
21 \brief Return values from the information lookup functions.
34 \brief Type of information returned from tag readers.
39 NO_NFO
= 0, //!< No info found
40 FULL_NFO
= 1, //!< Full info specified
41 URL_NFO
= 2, //!< A URL to grab info from was found
42 OVERRIDE_NFO
= 3, //!< Override info was found
43 COMBINED_NFO
= 4, //!< A URL to grab info from + override info was found
44 ERROR_NFO
= 5, //!< Error processing info
45 TITLE_NFO
= 6 //!< At least Title was read (and optionally the Year)
48 //! \brief Empty destructor.
49 virtual ~CInfoScanner() = default;
51 virtual bool DoScan(const std::string
& strDirectory
) = 0;
53 /*! \brief Check if the folder is excluded from scanning process
54 \param strDirectory Directory to scan
55 \return true if there is a .nomedia file
57 bool HasNoMedia(const std::string
& strDirectory
) const;
59 //! \brief Set whether or not to show a progress dialog.
60 void ShowDialog(bool show
) { m_showDialog
= show
; }
62 //! \brief Returns whether or not a scan is in progress.
63 bool IsScanning() const { return m_bRunning
; }
66 //! \brief Protected constructor to only allow subclass instances.
67 CInfoScanner() = default;
69 std::set
<std::string
> m_pathsToScan
; //!< Set of paths to scan
70 bool m_showDialog
= false; //!< Whether or not to show progress bar dialog
71 CGUIDialogProgressBarHandle
* m_handle
= nullptr; //!< Progress bar handle
72 bool m_bRunning
= false; //!< Whether or not scanner is running
73 bool m_bCanInterrupt
= false; //!< Whether or not scanner is currently interruptible
74 bool m_bClean
= false; //!< Whether or not to perform cleaning during scanning