X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_gosaSupportDaemon.inc;h=6cf2291880998373a64ddc88dfae8ad46231b79a;hb=db53eacaba45abb923f6de1510178eef91ac1b8e;hp=93381e07b72d94dd8b853d069fde43d9bb38396e;hpb=d6e24e36fed1099487ea8435cb78a05e7b0aa997;p=gosa.git
diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc
index 93381e07b..6cf229188 100755
--- a/gosa-core/include/class_gosaSupportDaemon.inc
+++ b/gosa-core/include/class_gosaSupportDaemon.inc
@@ -5,7 +5,7 @@ class gosaSupportDaemon
private $o_sock = NULL;
private $s_host = "";
private $i_port = 0;
- private $i_timeout = 1;
+ private $f_timeout = 0.2;
private $is_connected = FALSE;
private $s_encryption_key = "";
@@ -16,17 +16,17 @@ class gosaSupportDaemon
private $s_error = "";
private $b_error = FALSE;
- public function __construct($host,$port,$key="secret-gosa-password",$connect=TRUE,$timeout=1)
- {
+ public function __construct($host,$port,$key="secret-gosa-password",$connect=TRUE,$timeout=0.2)
+ {
$this->s_host = $host;
$this->i_port = $port;
- $this->i_timeout = $timeout;
+ $this->f_timeout = $timeout;
$this->s_encryption_key = $key;
}
-
+
public function connect()
{
- $this->o_sock = new Socket_Client($this->s_host,$this->i_port,TRUE,$this->i_timeout);
+ $this->o_sock = new Socket_Client($this->s_host,$this->i_port,TRUE,$this->f_timeout);
$this->o_sock->setEncryptionKey($this->s_encryption_key);
if($this->o_sock->connected()){
$this->is_connected = TRUE;
@@ -46,6 +46,7 @@ class gosaSupportDaemon
{
echo "Reload";
$this->entries = array();
+ $this->pointer = 0;
$xml_msg = "*";
$this->connect();
if($this->is_connected){
@@ -136,6 +137,63 @@ class gosaSupportDaemon
{
return($this->s_error);
}
+
+ public function decrease_entry_priority($id)
+ {
+ echo $id;
+ }
+
+ public function increase_entry_priority($id)
+ {
+ echo $id;
+ }
+
+ public function max_entry_priority($id)
+ {
+ echo $id;
+ }
+
+ public function min_entry_priority($id)
+ {
+ echo $id;
+ }
+
+ public function id_exists($id)
+ {
+ return(TRUE);
+ }
+
+ public function get_entry($id)
+ {
+ foreach($this->entries as $entry){
+ if($entry['ID'] == $id){
+ return($entry);
+ }
+ }
+ }
+
+ public function update_entry($id,$entry)
+ {
+ $xml_msg = "";
+
+ if($this->is_connected){
+ $this->o_sock->write($xml_msg);
+ $str = trim($this->o_sock->read());
+ $entries = $this->xml_to_array($str);
+ $this->disconnect();
+ return(TRUE);
+ }
+ $this->set_error("Could not establish socket connection.");
+ return(FALSE);
+ }
+
+ public function add_multiple($multiple)
+ {
+ }
+
+ public function remove_entry($id)
+ {
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: