diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-12 10:34:54 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-12 10:34:54 -0500 |
commit | a36a55c3605bb89125d9d1819a9c32590008ea8f (patch) | |
tree | 74817edc4b676d13c017bee7c0319aad9932e73a /hscript/meta.hh | |
parent | 92ff05696506d423111fc7c0ff1e571f64af4615 (diff) | |
download | horizon-a36a55c3605bb89125d9d1819a9c32590008ea8f.tar.gz horizon-a36a55c3605bb89125d9d1819a9c32590008ea8f.tar.bz2 horizon-a36a55c3605bb89125d9d1819a9c32590008ea8f.tar.xz horizon-a36a55c3605bb89125d9d1819a9c32590008ea8f.zip |
hscript: Implement 'repository' key and add tests for it
Diffstat (limited to 'hscript/meta.hh')
-rw-r--r-- | hscript/meta.hh | 10 |
1 files changed, 9 insertions, 1 deletions
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 { |