From b86fad05a60db408ea5f9b61184efb1dd3f1e84e Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 19 Jun 2008 08:03:19 +0000 Subject: [PATCH] Added missing comments to DAK classes. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11362 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/dak/addons/dak/class_DAK.inc | 15 ++++++-- .../dak/addons/dak/class_dak_keyring.inc | 35 ++++++++++++++++--- 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/gosa-plugins/dak/addons/dak/class_DAK.inc b/gosa-plugins/dak/addons/dak/class_DAK.inc index fdeff60f6..8c7500391 100644 --- a/gosa-plugins/dak/addons/dak/class_DAK.inc +++ b/gosa-plugins/dak/addons/dak/class_DAK.inc @@ -3,6 +3,8 @@ class DAK { + + /* Unused ... */ public static function get_repositories($config) { if(!$config instanceOf config){ @@ -30,6 +32,11 @@ class DAK } + /*! \brief Returns all configured repository server and some + informations about release/sections/parent. + @param Object The GOsa configuration object. + @return Array Repository infromations. + */ public static function get_repositories_by_server($config) { if(!$config instanceOf config){ @@ -60,11 +67,15 @@ class DAK } - /*! \brief Returns all */ + /*! \brief Returns all keyring entries for the specified server + @param String The servers mac address. + @return Array All keyring entries. + */ public static function list_keys($server) { $o_queue = new gosaSupportDaemon(); - $data = $o_queue->DAK_get_queue_entries($server); + $data = $o_queue->DAK_keyring_entries($server); + print_a($data); if($o_queue->is_error()){ msg_dialog::display(_("Error"), $o_queue->get_error(), ERROR_DIALOG); } diff --git a/gosa-plugins/dak/addons/dak/class_dak_keyring.inc b/gosa-plugins/dak/addons/dak/class_dak_keyring.inc index b400a5f26..c7506c100 100644 --- a/gosa-plugins/dak/addons/dak/class_dak_keyring.inc +++ b/gosa-plugins/dak/addons/dak/class_dak_keyring.inc @@ -20,15 +20,21 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/*! \brief The DAK keyring class used to manage DAK keyrings. + It provides remove/add key mehtods and lists all keys for a selected server. + */ class dak_keyring extends plugin { - private $Servers = array(); private $selected_Server = array(); + private $list = array(); + public $attributes = array("selected_Server"); - private $list = array(); - public $attributes = array("selected_Server"); + /*! \brief Creates a dak_keyring class. + @param The GOsa configuration object. + */ public function __construct($config) { plugin::plugin($config,NULL); @@ -41,6 +47,10 @@ class dak_keyring extends plugin } } + + /*! \brief Create HTML output for this plugin. + @return String HTML output. + */ public function execute() { if(isset($_POST['search'])){ @@ -55,18 +65,25 @@ class dak_keyring extends plugin } + /*! \brief Refresh the list of keys for the currently selected server + This function is automatically called when a key was added and removed. + */ private function refresh_list() { $this->list = DAK::list_keys($this->Servers[$this->selected_Server]['MAC']); } + + /*! \brief Creates the HTML output representing the keylist + for this currently selected server + @return String HTML list containig all keys for the selected server. + */ private function CreateList() { $divlist = new divlist("DAK_keyring"); $divlist->SetWidth("100%"); $divlist->SetHeight("450px"); $divlist->SetEntriesPerPage(0); -# $divlist->SetPluginMode(TRUE) ; /* Set default col styles */ @@ -163,6 +180,8 @@ class dak_keyring extends plugin } + /*! \brief Act on the HTML posts for this plugin + */ public function save_object() { plugin::save_object(); @@ -209,7 +228,10 @@ class dak_keyring extends plugin } } - + + /*! \brief Removes the given key from the keyring server. + @return Boolean TRUE in case of success else FALSE. + */ private function remove_key($key) { if($this->list[$key]){ @@ -219,6 +241,9 @@ class dak_keyring extends plugin } + /*! \brief Imports a new key into the keyring for the currently selected server + @return Boolean TRUE in case of success else FALSE. + */ private function import_key($key) { $mac = $this->Servers[$this->selected_Server]['MAC']; -- 2.30.2