summaryrefslogtreecommitdiffstats
path: root/xbmc/pvr/filesystem/PVRGUIDirectory.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 18:07:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 18:07:22 +0000
commitc04dcc2e7d834218ef2d4194331e383402495ae1 (patch)
tree7333e38d10d75386e60f336b80c2443c1166031d /xbmc/pvr/filesystem/PVRGUIDirectory.h
parentInitial commit. (diff)
downloadkodi-c04dcc2e7d834218ef2d4194331e383402495ae1.tar.xz
kodi-c04dcc2e7d834218ef2d4194331e383402495ae1.zip
Adding upstream version 2:20.4+dfsg.upstream/2%20.4+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'xbmc/pvr/filesystem/PVRGUIDirectory.h')
-rw-r--r--xbmc/pvr/filesystem/PVRGUIDirectory.h107
1 files changed, 107 insertions, 0 deletions
diff --git a/xbmc/pvr/filesystem/PVRGUIDirectory.h b/xbmc/pvr/filesystem/PVRGUIDirectory.h
new file mode 100644
index 0000000..462c553
--- /dev/null
+++ b/xbmc/pvr/filesystem/PVRGUIDirectory.h
@@ -0,0 +1,107 @@
+/*
+ * Copyright (C) 2012-2019 Team Kodi
+ * This file is part of Kodi - https://kodi.tv
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ * See LICENSES/README.md for more information.
+ */
+
+#pragma once
+
+#include "URL.h"
+
+#include <string>
+
+class CFileItemList;
+
+namespace PVR
+{
+
+class CPVRGUIDirectory
+{
+public:
+ /*!
+ * @brief PVR GUI directory ctor.
+ * @param url The directory's URL.
+ */
+ explicit CPVRGUIDirectory(const CURL& url) : m_url(url) {}
+
+ /*!
+ * @brief PVR GUI directory ctor.
+ * @param path The directory's path.
+ */
+ explicit CPVRGUIDirectory(const std::string& path) : m_url(path) {}
+
+ /*!
+ * @brief PVR GUI directory dtor.
+ */
+ virtual ~CPVRGUIDirectory() = default;
+
+ /*!
+ * @brief Check existence of this directory.
+ * @return True if the directory exists, false otherwise.
+ */
+ bool Exists() const;
+
+ /*!
+ * @brief Obtain the directory listing.
+ * @param results The list to fill with the results.
+ * @return True on success, false otherwise.
+ */
+ bool GetDirectory(CFileItemList& results) const;
+
+ /*!
+ * @brief Check if this directory supports file write operations.
+ * @return True if the directory supports file write operations, false otherwise.
+ */
+ bool SupportsWriteFileOperations() const;
+
+ /*!
+ * @brief Check if any TV recordings are existing.
+ * @return True if TV recordings exists, false otherwise.
+ */
+ static bool HasTVRecordings();
+
+ /*!
+ * @brief Check if any deleted TV recordings are existing.
+ * @return True if deleted TV recordings exists, false otherwise.
+ */
+ static bool HasDeletedTVRecordings();
+
+ /*!
+ * @brief Check if any radio recordings are existing.
+ * @return True if radio recordings exists, false otherwise.
+ */
+ static bool HasRadioRecordings();
+
+ /*!
+ * @brief Check if any deleted radio recordings are existing.
+ * @return True if deleted radio recordings exists, false otherwise.
+ */
+ static bool HasDeletedRadioRecordings();
+
+ /*!
+ * @brief Get the list of channel groups.
+ * @param bRadio If true, obtain radio groups, tv groups otherwise.
+ * @param bExcludeHidden If true exclude hidden groups, include hidden groups otherwise.
+ * @param results The file list to store the results in.
+ * @return True on success, false otherwise..
+ */
+ static bool GetChannelGroupsDirectory(bool bRadio, bool bExcludeHidden, CFileItemList& results);
+
+ /*!
+ * @brief Get the list of channels.
+ * @param results The file list to store the results in.
+ * @return True on success, false otherwise..
+ */
+ bool GetChannelsDirectory(CFileItemList& results) const;
+
+private:
+ bool GetTimersDirectory(CFileItemList& results) const;
+ bool GetRecordingsDirectory(CFileItemList& results) const;
+ bool GetSavedSearchesDirectory(bool bRadio, CFileItemList& results) const;
+
+ const CURL m_url;
+};
+
+} // namespace PVR