2 * Copyright (C) 2022 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.
18 /*! \brief Abstracts a disc type
22 UNKNOWN
, ///< the default value, the application doesn't know what the device is
24 BLURAY
///< blu-ray disc
27 /*! \brief Abstracts the info the app knows about a disc (type, name, serial)
31 /*! \brief The disc type, \sa DiscType */
32 DiscType type
{DiscType::UNKNOWN
};
33 /*! \brief The disc serial number */
35 /*! \brief The disc label (equivalent to the mount point label) */
38 /*! \brief Check if the info is empty (e.g. after probing)
39 \return true if the info is empty, false otherwise
41 bool empty() { return (type
== DiscType::UNKNOWN
&& name
.empty() && serial
.empty()); }
43 /*! \brief Clears all the DiscInfo members
47 type
= DiscType::UNKNOWN
;
53 /*! \brief Try to obtain the disc info (type, name, serial) of a given media path
54 \param[in, out] info The disc info struct
55 \param mediaPath The disc mediapath (e.g. /dev/cdrom, D\://, etc)
56 \return true if getting the disc info was successfull
58 bool GetDiscInfo(DiscInfo
& info
, const std::string
& mediaPath
);
60 /*! \brief Try to probe the provided media path as a DVD
61 \param mediaPath The disc mediapath (e.g. /dev/cdrom, D\://, etc)
62 \return the DiscInfo for the given media path (might be an empty struct)
64 DiscInfo
ProbeDVDDiscInfo(const std::string
& mediaPath
);
66 /*! \brief Try to probe the provided media path as a Bluray
67 \param mediaPath The disc mediapath (e.g. /dev/cdrom, D\://, etc)
68 \return the DiscInfo for the given media path (might be an empty struct)
70 DiscInfo
ProbeBlurayDiscInfo(const std::string
& mediaPath
);