From a36a55c3605bb89125d9d1819a9c32590008ea8f Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 12 Oct 2019 10:34:54 -0500 Subject: hscript: Implement 'repository' key and add tests for it --- hscript/meta.hh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'hscript/meta.hh') diff --git a/hscript/meta.hh b/hscript/meta.hh index 3574a6f..846158d 100644 --- a/hscript/meta.hh +++ b/hscript/meta.hh @@ -57,7 +57,15 @@ class Firmware : public BooleanKey { class Timezone : public StringKey { }; -class Repository : public Key { +class Repository : public StringKey { +private: + Repository(int _line, const std::string my_url) : + StringKey(_line, my_url) {} +public: + static Key *parseFromData(const std::string data, int lineno, int *errors, + int *warnings); + bool validate(ScriptOptions) const override; + bool execute(ScriptOptions) const override; }; class SigningKey : public Key { -- cgit v1.2.3-60-g2f50