summaryrefslogtreecommitdiffstats
path: root/xbmc/settings/SettingDateTime.h
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/settings/SettingDateTime.h')
-rw-r--r--xbmc/settings/SettingDateTime.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/xbmc/settings/SettingDateTime.h b/xbmc/settings/SettingDateTime.h
new file mode 100644
index 0000000..5ee481f
--- /dev/null
+++ b/xbmc/settings/SettingDateTime.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2017-2018 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 "settings/lib/Setting.h"
+
+class CDateTime;
+
+class CSettingDate : public CSettingString
+{
+public:
+ CSettingDate(const std::string &id, CSettingsManager *settingsManager = NULL);
+ CSettingDate(const std::string &id, int label, const std::string &value, CSettingsManager *settingsManager = NULL);
+ CSettingDate(const std::string &id, const CSettingDate &setting);
+ ~CSettingDate() override = default;
+
+ SettingPtr Clone(const std::string &id) const override;
+
+ bool CheckValidity(const std::string &value) const override;
+
+ CDateTime GetDate() const;
+ bool SetDate(const CDateTime& date);
+};
+
+class CSettingTime : public CSettingString
+{
+public:
+ CSettingTime(const std::string &id, CSettingsManager *settingsManager = NULL);
+ CSettingTime(const std::string &id, int label, const std::string &value, CSettingsManager *settingsManager = NULL);
+ CSettingTime(const std::string &id, const CSettingTime &setting);
+ ~CSettingTime() override = default;
+
+ SettingPtr Clone(const std::string &id) const override;
+
+ bool CheckValidity(const std::string &value) const override;
+
+ CDateTime GetTime() const;
+ bool SetTime(const CDateTime& time);
+};