Fixes vim mode line.
[banana.git] / banana / protocoleinterface.inc.php
index 0029c9a..799f683 100644 (file)
@@ -18,11 +18,11 @@ interface BananaProtocoleInterface
     /** Indicate if the Protocole handler has been succesfully built
      */
     public function isValid();
-    
-    /** Indicate last error n°
+
+    /** Indicate last error n°
      */
     public function lastErrNo();
-    
+
     /** Indicate last error text
      */
     public function lastError();
@@ -41,11 +41,15 @@ interface BananaProtocoleInterface
 
     /** Return a message
      * @param id Id of the emssage (can be either an Message-id or a message index)
-     * @param msg_headers Headers to process
-     * @param is_msgid If is set, $id is en Message-Id
      * @return A BananaMessage or null if the given id can't be retreived
      */
-    public function getMessage($id, array $msg_headers = array(), $is_msgid = false);
+    public function &getMessage($id);
+
+    /** Return the sources of a message
+     * @param id Id of the emssage (can be either an Message-id or a message index)
+     * @return The sources of the message (or null)
+     */
+    public function getMessageSource($id);
 
     /** Return the indexes of the messages presents in the Box
      * @return Array(number of messages, MSGNUM of the first message, MSGNUM of the last message)
@@ -86,12 +90,12 @@ interface BananaProtocoleInterface
     /** Send a message
      * @return true if it was successfull
      */
-    public function send(BananaMessage &$message);
+    public function send(BananaMessage $message);
 
     /** Cancel a message
      * @return true if it was successfull
      */
-    public function cancel(BananaMessage &$message);
+    public function cancel(BananaMessage $message);
 
     /** Return the protocole name
      */
@@ -101,7 +105,15 @@ interface BananaProtocoleInterface
      * @param box STRING boxname
      */
     public function filename();
+
+    /** Return the execution backtrace of the protocole
+     * @return array(trace1, trace2, ...)
+     * a trace has the following structure:
+     *  array('action' => action, 'time' => microtime, 'code' => return code, 'response' => size of the response)
+     * if no backtrace is available, return null
+     */
+    public function backtrace();
 }
 
-// vim:set et sw=4 sts=4 ts=4:
+// vim:set et sw=4 sts=4 ts=4 fenc=utf-8:
 ?>