From 9f85fbdfbaf45e87958a81610a78369c2bf13279 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 24 Jan 2008 13:38:27 +0000 Subject: [PATCH] Updated queue handle git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8588 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_gosaSupportDaemon.inc | 41 ++++++++++++++++--- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc index 2e04ab039..f11f31735 100644 --- a/gosa-core/include/class_gosaSupportDaemon.inc +++ b/gosa-core/include/class_gosaSupportDaemon.inc @@ -15,7 +15,7 @@ get_entry_by_id - Returns a single entry. remove_entries - Remove a set of entries. remove_entry - Removes a single entry. - update_entry - Updates a single entry. + update_entries - Updates a set of entries. xml_to_array - XML to Array. */ @@ -119,11 +119,17 @@ class gosaSupportDaemon
gosa_query_jobdb
- and - - gt - -1 - + or + + + eq + ping + + + + eq + sayHello + @@ -508,6 +514,29 @@ class gosaSupportDaemon $this->set_error("Could not establish socket connection."); return(FALSE); } + + + /*! \brief Updates an entry with a set of new values, + @param Integer The ID of the entry, we want to update. + @param Array The variables to update. + @return Boolean Returns TRUE on success. + */ + public function number_of_queued_entries() + { + $xml_msg ="
gosa_count_jobdb
"; + $this->connect(); + if($this->is_connected){ + $this->o_sock->write($xml_msg); + $str = trim($this->o_sock->read()); + $entries = $this->xml_to_array($str); + if(isset($entries['XML']['COUNT'])){ + return($entries['XML']['COUNT']); + } + return; + } + $this->set_error("Could not establish socket connection."); + return; + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: -- 2.30.2