diff options
| author | manuel <manuel@mausz.at> | 2020-10-19 00:52:24 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2020-10-19 00:52:24 +0200 |
| commit | be933ef2241d79558f91796cc5b3a161f72ebf9c (patch) | |
| tree | fe3ab2f130e20c99001f2d7a81d610c78c96a3f4 /xbmc/utils/LegacyPathTranslation.h | |
| parent | 5f8335c1e49ce108ef3481863833c98efa00411b (diff) | |
| download | kodi-pvr-build-be933ef2241d79558f91796cc5b3a161f72ebf9c.tar.gz kodi-pvr-build-be933ef2241d79558f91796cc5b3a161f72ebf9c.tar.bz2 kodi-pvr-build-be933ef2241d79558f91796cc5b3a161f72ebf9c.zip | |
sync with upstream
Diffstat (limited to 'xbmc/utils/LegacyPathTranslation.h')
| -rw-r--r-- | xbmc/utils/LegacyPathTranslation.h | 47 |
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 | |||
| 13 | typedef struct Translator Translator; | ||
| 14 | |||
| 15 | class 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 | */ | ||
| 24 | class CLegacyPathTranslation | ||
| 25 | { | ||
| 26 | public: | ||
| 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 | |||
| 45 | private: | ||
| 46 | static std::string TranslatePath(const std::string &legacyPath, Translator *translationMap, size_t translationMapSize); | ||
| 47 | }; | ||
