Support retrieving a connection ID.
authorGunnar Wrobel <p@rdus.de>
Mon, 3 Jan 2011 06:54:35 +0000 (07:54 +0100)
committerGunnar Wrobel <p@rdus.de>
Tue, 4 Jan 2011 07:54:20 +0000 (08:54 +0100)
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Driver.php
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Driver/Cclient.php
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Driver/Imap.php
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Driver/Mock.php
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Driver/Pear.php
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Driver/Rcube.php

index b57f2f5..fd36e67 100644 (file)
@@ -35,6 +35,13 @@ interface Horde_Kolab_Storage_Driver
     public function getAuth();
 
     /**
+     * Return the unique connection id.
+     *
+     * @return string The connection id.
+     */
+    public function getId();
+
+    /**
      * Retrieves a list of mailboxes from the server.
      *
      * @return array The list of mailboxes.
index 6a795d7..9c7369b 100644 (file)
@@ -105,6 +105,16 @@ extends Horde_Kolab_Storage_Driver_Base
     }
 
     /**
+     * Return the unique connection id.
+     *
+     * @return string The connection id.
+     */
+    public function getId()
+    {
+        return $this->getAuth() . '@' . $this->getParam('host');
+    }
+
+    /**
      * Return the root mailbox of the current user.
      *
      * @return string The id of the user that opened the IMAP connection.
index 4bf2769..9305716 100644 (file)
@@ -62,6 +62,18 @@ extends Horde_Kolab_Storage_Driver_Base
     }
 
     /**
+     * Return the unique connection id.
+     *
+     * @return string The connection id.
+     */
+    public function getId()
+    {
+        return $this->getAuth() . '@'
+            . $this->_imap->getParam('hostspec') . ':'
+            . $this->_imap->getParam('port');
+    }
+
+    /**
      * Retrieves a list of mailboxes from the server.
      *
      * @return array The list of mailboxes.
index 3269104..f5cdc70 100644 (file)
@@ -118,6 +118,16 @@ extends Horde_Kolab_Storage_Driver_Base
     }
 
     /**
+     * Return the unique connection id.
+     *
+     * @return string The connection id.
+     */
+    public function getId()
+    {
+        return $this->getAuth() . '@mock:0';
+    }
+
+    /**
      * Retrieves a list of mailboxes on the server.
      *
      * @return array The list of mailboxes.
index 9caaa67..b08e70f 100644 (file)
@@ -62,6 +62,18 @@ extends Horde_Kolab_Storage_Driver_Base
     }
 
     /**
+     * Return the unique connection id.
+     *
+     * @return string The connection id.
+     */
+    public function getId()
+    {
+        return $this->getAuth() . '@'
+            . $this->getParam('host') . ':'
+            . $this->getParam('port');
+    }
+
+    /**
      * Retrieves a list of mailboxes on the server.
      *
      * @return array The list of mailboxes.
index b97eb68..68ac512 100644 (file)
@@ -62,6 +62,18 @@ extends Horde_Kolab_Storage_Driver_Base
     }
 
     /**
+     * Return the unique connection id.
+     *
+     * @return string The connection id.
+     */
+    public function getId()
+    {
+        return $this->getAuth() . '@'
+            . $this->getParam('host') . ':'
+            . $this->getParam('port');
+    }
+
+    /**
      * Retrieves a list of mailboxes on the server.
      *
      * @return array The list of mailboxes.