diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc new file mode 100644 index 00000000..c3aa6b92 --- /dev/null +++ b/lam/lib/modules.inc @@ -0,0 +1,120 @@ + options) describing the options for an user profile +// the options follow the format specified in modules.spec (TODO filename) +function getUserProfileOptions() { + return array(); +} + +// returns an hash array (module => options) describing the options for an group profile +// the options follow the format specified in modules.spec (TODO filename) +function getGroupProfileOptions() { + return array(); +} + +// returns an hash array (module => options) describing the options for an host profile +// the options follow the format specified in modules.spec (TODO filename) +function getHostProfileOptions() { + return array(); +} + +// checks if the user profile values are correct +// $options is a hash array (attribute => value) with the entered values +// the values are all arrays with one or more elements +// returns an hash array containing the error messages, if any +// format of hash: attribute => array(message type, message header, message body, replacement array) +function checkUserProfileOptions($options) { +} + +// checks if the group profile values are correct +// $options is a hash array (attribute => value) with the entered values +// the values are all arrays with one or more elements +// returns an hash array containing the error messages, if any +// format of hash: attribute => array(message type, message header, message body, replacement array) +function checkGroupProfileOptions($options) { +} + +// checks if the host profile values are correct +// $options is a hash array (attribute => value) with the entered values +// the values are all arrays with one or more elements +// returns an hash array containing the error messages, if any +// format of hash: attribute => array(message type, message header, message body, replacement array) +function checkHostProfileOptions($options) { +} + +// returns the alias name of a module +function getModuleAlias($name) { + return $name; +} + +// returns a hash array (module name => dependencies) of all user module dependencies +// dependencies contains an array with two sub arrays: depends, conflicts +// the elements of depends/conflicts are either module names or an array of module names (OR-case) +function getUserModuleDependencies() { + return array("um1" => array("depends" => "um4"), + "um2" => array("depends" => "um4", "conflicts" => "um1"), + "um3" => array("conflicts" => "um1"), + "um4" => array()); +} + +// returns a hash array (module name => dependencies) of all group module dependencies +// dependencies contains an array with two sub arrays: depends, conflicts +// the elements of depends/conflicts are either module names or an array of module names (OR-case) +function getGroupModuleDependencies() { + return array("gm1" => array("depends" => "gm4"), + "gm2" => array("depends" => "gm4", "conflicts" => "gm1"), + "gm3" => array("conflicts" => "gm1"), + "gm4" => array()); +} + +// returns a hash array (module name => dependencies) of all host module dependencies +// dependencies contains an array with two sub arrays: depends, conflicts +// the elements of depends/conflicts are either module names or an array of module names (OR-case) +function getHostModuleDependencies() { + return array("hm1" => array("depends" => "hm4"), + "hm2" => array("depends" => "hm4", "conflicts" => "hm1"), + "hm3" => array("conflicts" => "hm1"), + "hm4" => array()); +} + +// returns an array with all available user module names +function getAvailableUserModules() { + return array("um1", "um2", "um3", "um4"); +} + +// returns an array with all available group module names +function getAvailableGroupModules() { + return array("gm1", "gm2", "gm3", "gm4"); +} + +// returns an array with all available host module names +function getAvailableHostModules() { + return array("hm1", "hm2", "hm3", "hm4"); +} + + +?>