From 04a2aef5ae506cf51fb9b69bf7c97b28c4ebe5fe Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Thu, 19 Jan 2017 17:53:29 +0100 Subject: [PATCH] basic_source: add is_scm_source_class() and is_selected_source_class() These will be used to remove hardcoded source types in fetch-sources and put the functionality into source plugins. Signed-off-by: Tobias Ulmer --- local/source.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/local/source.lua b/local/source.lua index 42d5d20..39cf7ac 100644 --- a/local/source.lua +++ b/local/source.lua @@ -37,6 +37,22 @@ local source_types = {} -- @type basic_source source.basic_source = class("basic_source") +--- Whether the class is of a Source Code Management type. +-- @return True or false +function source.basic_source.static:is_scm_source_class() + assertIsTable(self) + return false +end + +--- Whether this class of sources was selected on the command line. +-- @param opts e2option table. +-- @return True or false +function source.basic_source.static:is_selected_source_class(opts) + assertIsTable(self) + assertIsTable(opts) + return false +end + --- Source base constructor. Assert error on invalid input. -- @param rawsrc Source config dict containing at least "name" and "type" -- attributes. -- 2.39.5