summaryrefslogtreecommitdiffstats
path: root/xbmc/utils/LegacyPathTranslation.h
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/utils/LegacyPathTranslation.h')
-rw-r--r--xbmc/utils/LegacyPathTranslation.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/xbmc/utils/LegacyPathTranslation.h b/xbmc/utils/LegacyPathTranslation.h
new file mode 100644
index 0000000..ba6450b
--- /dev/null
+++ b/xbmc/utils/LegacyPathTranslation.h
@@ -0,0 +1,47 @@
1/*
2 * Copyright (C) 2013-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#pragma once
10
11#include <string>
12
13typedef struct Translator Translator;
14
15class CURL;
16
17/*!
18 \brief Translates old internal paths into new ones
19
20 Translates old videodb:// and musicdb:// paths which used numbers
21 to indicate a specific category to new paths using more descriptive
22 strings to indicate categories.
23 */
24class CLegacyPathTranslation
25{
26public:
27 /*!
28 \brief Translates old videodb:// paths to new ones
29
30 \param legacyPath Path in the old videodb:// format using numbers
31 \return Path in the new videodb:// format using descriptive strings
32 */
33 static std::string TranslateVideoDbPath(const CURL &legacyPath);
34 static std::string TranslateVideoDbPath(const std::string &legacyPath);
35
36 /*!
37 \brief Translates old musicdb:// paths to new ones
38
39 \param legacyPath Path in the old musicdb:// format using numbers
40 \return Path in the new musicdb:// format using descriptive strings
41 */
42 static std::string TranslateMusicDbPath(const CURL &legacyPath);
43 static std::string TranslateMusicDbPath(const std::string &legacyPath);
44
45private:
46 static std::string TranslatePath(const std::string &legacyPath, Translator *translationMap, size_t translationMapSize);
47};