// SPDX-FileCopyrightText: 2026 yyc12345 // // SPDX-License-Identifier: MIT #pragma once #include #include #include #include namespace PlaylistScout { /// The result of scout struct ScoutResult { /// The final fetched playlist (it can be empty). /// Each item must be a QUrl pointing to a local file. QList playlist; /// The index of given file located in playlist. /// Nullopt if it is not presented in playlist. std::optional indexHint; }; /// @brief Scout available image files in given file's parent dir with given allowed suffixes. /// @param[in] url The path to file whose parent dir is our target dir for finding image files. /// @param[in] allowedSuffixes /// Each items in this list is a wildcard pattern for matching allowed file name, like \c *.png . /// The fetched item will be preserved if its name matching any of them. /// If this list is empty, there is no restrictions for finding files. /// @return Scout result if success, otherwise nullopt. std::optional scout(const QUrl &url, const QStringList &allowedSuffixes); }