[PVR][Estuary] Timer settings dialog: Show client name in timer type selection dialog...
[xbmc.git] / xbmc / DbUrl.h
blobd307d7f4270850628c8312142f86d4551a973af7
1 /*
2 * Copyright (C) 2012-2018 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.
7 */
9 #pragma once
11 #include "URL.h"
12 #include "utils/UrlOptions.h"
14 #include <string>
16 class CVariant;
18 class CDbUrl : CUrlOptions
20 public:
21 CDbUrl();
22 ~CDbUrl() override;
24 bool IsValid() const { return m_valid; }
25 void Reset();
27 std::string ToString() const;
28 bool FromString(const std::string &dbUrl);
30 const std::string& GetType() const { return m_type; }
31 void AppendPath(const std::string &subPath);
33 using CUrlOptions::HasOption;
34 using CUrlOptions::GetOptions;
35 using CUrlOptions::GetOptionsString;
37 void AddOption(const std::string &key, const char *value) override;
38 void AddOption(const std::string &key, const std::string &value) override;
39 void AddOption(const std::string &key, int value) override;
40 void AddOption(const std::string &key, float value) override;
41 void AddOption(const std::string &key, double value) override;
42 void AddOption(const std::string &key, bool value) override;
43 void AddOptions(const std::string &options) override;
44 void RemoveOption(const std::string &key) override;
46 protected:
47 virtual bool parse() = 0;
48 virtual bool validateOption(const std::string &key, const CVariant &value);
50 CURL m_url;
51 std::string m_type;
53 private:
54 void updateOptions();
56 bool m_valid;