diff --git a/NEWS b/NEWS
index 1c91178be2d44b1af63bad55da1af8f0ffd5dd44..63091e0855f0e0842010d4091379d52891af1815 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,14 @@
 # SFLphone
 ################################################
 
+* 2010-03-25: 0.9.8 beta has been released
+
+* 2009-12-10: SFLphone 0.9.7 has been released
+
+* 2009-12-03: SFLphone 0.9.7~rc2 has been released
+
+* 2009-11-20: SFLphone 0.9.7~rc1 has been released
+
 * 2009-10-27: SFLphone 0.9.7~beta has been released
 
 * 2009-07-27: SFLphone 0.9.6 has been released
diff --git a/sflphone-client-gnome/VERSION b/sflphone-client-gnome/VERSION
index c81aa44afbfcb4d1955b55e5276991aae023f039..53cdfba097a32837dc5677c91e725e0471b96d61 100644
--- a/sflphone-client-gnome/VERSION
+++ b/sflphone-client-gnome/VERSION
@@ -1 +1 @@
-0.9.7
+0.9.8~beta
diff --git a/sflphone-client-gnome/configure.ac b/sflphone-client-gnome/configure.ac
index a0e88ac300f36cc15f3bef118d9571acfb69d29d..0fbddbfe684d75eb206c7c84d24c8307204ddb0e 100644
--- a/sflphone-client-gnome/configure.ac
+++ b/sflphone-client-gnome/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([SFLphone],[0.9.7],[sflphoneteam@savoirfairelinux.com],[sflphone-client-gnome])
+AC_INIT([SFLphone],[0.9.8~beta],[sflphoneteam@savoirfairelinux.com],[sflphone-client-gnome])
 AM_CONFIG_HEADER(config.h)
 
 LT_INIT
diff --git a/sflphone-client-gnome/doc/C/sflphone.xml b/sflphone-client-gnome/doc/C/sflphone.xml
index 744f08a89756ddec5fe3d2379cf7faa78e92bf45..050baa8da344e9fb1b3936d9a4c4731d79d80b03 100644
--- a/sflphone-client-gnome/doc/C/sflphone.xml
+++ b/sflphone-client-gnome/doc/C/sflphone.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.1//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"  [
 	<!ENTITY app "SFLphone">
-	<!ENTITY appversion "0.9.7">
+	<!ENTITY appversion "0.9.8~beta">
 	<!ENTITY docversion "1.0">
 ]>
 
@@ -17,6 +17,7 @@
       <year>2007</year>
       <year>2008</year>
       <year>2009</year>
+      <year>2010</year>
       <holder>Savoir-faire Linux</holder>
     </copyright>
 
@@ -73,6 +74,16 @@
 </authorgroup>
 
 <revhistory>
+		<revision>
+            <revnumber>SFLphone Manual v1.0.1</revnumber>
+            <date>March 2010</date>
+            <revdescription>
+                <para role="author">SFLphone team</para>
+                <para role="publisher">Savoir-faire Linux</para>
+				<para>Minor changes</para>
+            </revdescription>
+      </revision>
+
       <revision>
             <revnumber>SFLphone Manual v1.0</revnumber>
             <date>September 2009</date>
diff --git a/sflphone-client-gnome/src/config/shortcuts-config.c b/sflphone-client-gnome/src/config/shortcuts-config.c
index b343f52071a49f44d1b7bf6ddc2f31bf6bbe8d2a..06eb1839a94c5be5c41531a2a0f921ae092a8fe3 100644
--- a/sflphone-client-gnome/src/config/shortcuts-config.c
+++ b/sflphone-client-gnome/src/config/shortcuts-config.c
@@ -26,7 +26,7 @@ GtkWidget*
 create_shortcuts_settings()
 {
   GtkWidget *vbox, *result_frame, *window, *treeview, *scrolled_window, *label;
-  GtkListStore *store;
+
   GtkTreeIter iter;
   guint i = 0;
 
@@ -40,7 +40,7 @@ create_shortcuts_settings()
   treeview = gtk_tree_view_new();
   setup_tree_view(treeview);
 
-  store = gtk_list_store_new(COLUMNS, G_TYPE_STRING, G_TYPE_INT, G_TYPE_UINT);
+  GtkListStore *store = gtk_list_store_new(COLUMNS, G_TYPE_STRING, G_TYPE_INT, G_TYPE_UINT);
 
   Accelerator* list = shortcuts_get_list();
 
@@ -100,14 +100,29 @@ accel_edited(GtkCellRendererAccel *renderer, gchar *path, guint accel_key,
   GtkTreeModel *model;
   GtkTreeIter iter;
 
-  // Update treeview
+  Accelerator* list = shortcuts_get_list();
   model = gtk_tree_view_get_model(treeview);
+  gint code = XKeysymToKeycode(GDK_DISPLAY(), accel_key);
+
+  // Disable existing binding if key already used
+  int i = 0;
+  gtk_tree_model_get_iter_first(model, &iter);
+  while (list[i].action != NULL)
+      {
+          if(list[i].value == code)
+            {
+              gtk_list_store_set(GTK_LIST_STORE (model), &iter, MASK, 0, VALUE, 0, -1);
+              WARN("This key was already affected");
+            }
+          gtk_tree_model_iter_next(model, &iter);
+          i++;
+      }
+
+  // Update treeview
   if (gtk_tree_model_get_iter_from_string(model, &iter, path))
     gtk_list_store_set(GTK_LIST_STORE (model), &iter, MASK, (gint) mask, VALUE,
         accel_key, -1);
 
-  gint code = XKeysymToKeycode(GDK_DISPLAY(), accel_key);
-
   // Update GDK bindings
   shortcuts_update_bindings(atoi(path), code);
 }
diff --git a/sflphone-client-gnome/src/shortcuts.c b/sflphone-client-gnome/src/shortcuts.c
index e52e5f109b0ff27224966caf329a42ace09ff4a6..7dfd53173b606a561fa5c176a57f9d5cff23bd3b 100644
--- a/sflphone-client-gnome/src/shortcuts.c
+++ b/sflphone-client-gnome/src/shortcuts.c
@@ -42,6 +42,39 @@ static GHashTable* shortcutsMap;
  * Callbacks
  */
 
+static void
+toggle_pick_up_hang_up_callback ()
+{
+  callable_obj_t * selectedCall = calltab_get_selected_call (active_calltree);
+  conference_obj_t * selectedConf = calltab_get_selected_conf (active_calltree);
+
+  g_print("toggle_pick_up_hang_up_callback\n");
+
+  if (selectedCall)
+    {
+      switch (selectedCall->_state)
+        {
+      case CALL_STATE_INCOMING:
+      case CALL_STATE_TRANSFERT:
+        sflphone_pick_up ();
+        break;
+      case CALL_STATE_DIALING:
+      case CALL_STATE_HOLD:
+      case CALL_STATE_CURRENT:
+      case CALL_STATE_RECORD:
+      case CALL_STATE_RINGING:
+        sflphone_hang_up ();
+        break;
+        }
+    }
+  else if (selectedConf)
+    {
+      dbus_hang_up_conference (selectedConf);
+    }
+  else
+    sflphone_pick_up ();
+}
+
 static void
 pick_up_callback ()
 {
@@ -54,6 +87,33 @@ hang_up_callback ()
   sflphone_hang_up ();
 }
 
+static void
+toggle_hold_callback ()
+{
+  callable_obj_t * selectedCall = calltab_get_selected_call (current_calls);
+  conference_obj_t * selectedConf = calltab_get_selected_conf (active_calltree);
+
+  if (selectedCall)
+    {
+      switch (selectedCall->_state)
+        {
+      case CALL_STATE_CURRENT:
+      case CALL_STATE_RECORD:
+        g_print("on hold\n");
+        sflphone_on_hold();
+        break;
+      case CALL_STATE_HOLD:
+        g_print("off hold\n");
+        sflphone_off_hold();
+        break;
+        }
+    }
+  else if (selectedConf)
+    dbus_hold_conference (selectedConf);
+  else
+    ERROR("Should not happen");
+}
+
 static void
 popup_window_callback ()
 {
@@ -84,6 +144,12 @@ get_action_callback (const gchar* action)
   if (strcmp (action, "popup_window") == 0)
     return popup_window_callback;
 
+  if (strcmp (action, "toggle_pick_up_hang_up") == 0)
+    return toggle_pick_up_hang_up_callback;
+
+  if (strcmp (action, "toggle_hold") == 0)
+    return toggle_hold_callback;
+
   return default_callback;
 }
 
@@ -225,6 +291,35 @@ initialize_accelerators_list ()
   accelerators_list[index].value = 0;
 }
 
+static void
+update_bindings_data (const guint index, const guint code)
+{
+  // we need to be sure this code is not already affected
+  // to another action
+  int i = 0;
+  while (accelerators_list[i].action != NULL)
+    {
+      if (accelerators_list[i].value == code)
+        {
+          // disable old binding
+          accelerators_list[i].value = 0;
+
+          // update config table
+          g_hash_table_replace (shortcutsMap, g_strdup (
+              accelerators_list[i].action), GINT_TO_POINTER (0));
+        }
+      i++;
+    }
+
+  // store new value
+  accelerators_list[index].value = code;
+
+  // update value in hashtable (used for dbus calls)
+  g_hash_table_replace (shortcutsMap,
+      g_strdup (accelerators_list[index].action), GINT_TO_POINTER (
+          accelerators_list[index].value));
+}
+
 /*
  * "Public" functions
  */
@@ -238,13 +333,8 @@ shortcuts_update_bindings (const guint index, const guint code)
   // first remove all existing bindings
   remove_bindings ();
 
-  // store new value
-  accelerators_list[index].value = code;
-
-  // update value in hashtable (used for dbus calls)
-  g_hash_table_replace (shortcutsMap,
-      g_strdup (accelerators_list[index].action), GINT_TO_POINTER (
-          accelerators_list[index].value));
+  // update data
+  update_bindings_data (index, code);
 
   // recreate all bindings
   create_bindings ();
diff --git a/sflphone-client-gnome/src/shortcuts.h b/sflphone-client-gnome/src/shortcuts.h
index e5e512d5eacbbf4e1d73567c9eecb00866b68c5d..3bc1a44cdb77c46b7929adf38197c169d588e63f 100644
--- a/sflphone-client-gnome/src/shortcuts.h
+++ b/sflphone-client-gnome/src/shortcuts.h
@@ -26,53 +26,62 @@ typedef struct
   GdkModifierType mask;
   guint value;
   void
-  (*callback)(void);
+  (*callback) (void);
 } Accelerator;
 
 static void
-grab_key(int key_code, GdkWindow *root);
+grab_key (int key_code, GdkWindow *root);
 
 static void
-ungrab_key(int key_code, GdkWindow *root);
+ungrab_key (int key_code, GdkWindow *root);
 
 static GdkFilterReturn
-filter_keys(GdkXEvent *xevent, GdkEvent *event, gpointer data);
+filter_keys (GdkXEvent *xevent, GdkEvent *event, gpointer data);
 
 static void
-remove_bindings();
+remove_bindings ();
 
 static void
-create_bindings();
+create_bindings ();
 
 static void
-pick_up_callback();
+pick_up_callback ();
 
 static void
-hang_up_callback();
+hang_up_callback ();
 
 static void
-initialize_binding(const gchar* action, const guint code);
+toggle_pick_up_hang_up_callback ();
 
 static void
-initialize_shortcuts_keys();
+toggle_hold_callback ();
+
+static void
+initialize_binding (const gchar* action, const guint code);
+
+static void
+initialize_shortcuts_keys ();
 
 static void*
-get_action_callback(const gchar* action);
+get_action_callback (const gchar* action);
+
+static void
+update_bindings_data (const guint index, const guint code);
 
 /*
  * "Public" functions
  */
 
 void
-shortcuts_initialize_bindings();
+shortcuts_initialize_bindings ();
 
 void
-shortcuts_update_bindings(const guint index, const guint code);
+shortcuts_update_bindings (const guint index, const guint code);
 
 void
-shortcuts_destroy_bindings();
+shortcuts_destroy_bindings ();
 
 Accelerator*
-shortcuts_get_list();
+shortcuts_get_list ();
 
 #endif /* SHORTCUTS_H_ */
diff --git a/sflphone-client-kde/CMakeLists.txt b/sflphone-client-kde/CMakeLists.txt
index 65b269cfd0d95d8477259389787519d1fa829449..c16efdcb6e584685facfd002d0a085e729deb982 100644
--- a/sflphone-client-kde/CMakeLists.txt
+++ b/sflphone-client-kde/CMakeLists.txt
@@ -8,7 +8,7 @@ SET(CMAKE_MODULE_PATH "${LOCAL_CMAKE_MODULE_PATH}")
 # --- custom targets: ---
 INCLUDE( ${LOCAL_CMAKE_MODULE_PATH}/TargetDistclean.cmake  REQUIRED)
 
-FIND_PACKAGE ( Kabc REQUIRED )
+#FIND_PACKAGE ( Kabc REQUIRED )
 # FIND_PACKAGE ( PkgConfig REQUIRED )
 FIND_PACKAGE ( KDE4 REQUIRED )
 FIND_PACKAGE ( Qt4 REQUIRED )
diff --git a/sflphone-client-kde/src/conf/ConfigurationSkeleton.cpp b/sflphone-client-kde/src/conf/ConfigurationSkeleton.cpp
index f2bcf04b8b75eb3dbe8eb9879187df0cf2c2807d..991571bbdf94a66c7a52495b38fe1a843bce0f47 100644
--- a/sflphone-client-kde/src/conf/ConfigurationSkeleton.cpp
+++ b/sflphone-client-kde/src/conf/ConfigurationSkeleton.cpp
@@ -61,7 +61,7 @@ void ConfigurationSkeleton::readConfig()
 	////////////////////////
 	
 	//Call history settings
-	setEnableHistory(configurationManager.getHistoryEnabled());
+	//setEnableHistory(configurationManager.getHistoryEnabled()); //TODO uncomment
 	setHistoryMax(configurationManager.getHistoryLimit());
 
 	//SIP port settings
@@ -119,10 +119,10 @@ void ConfigurationSkeleton::readConfig()
 	setAlsaPlugin(configurationManager.getCurrentAudioOutputPlugin());
 	bool ok;
 	QStringList devices = configurationManager.getCurrentAudioDevicesIndex();
-	qDebug() << "inputDevice = " << devices[1];
-	int inputDevice = devices[1].toInt(& ok);
-	if(!ok) qDebug() << "inputDevice is not a number";
-	setAlsaInputDevice(inputDevice);
+	//qDebug() << "inputDevice = " << devices[1]; //TODO uncomment
+	//int inputDevice = devices[1].toInt(& ok); //TODO uncomment
+	//if(!ok) qDebug() << "inputDevice is not a number"; //TODO uncomment
+	//setAlsaInputDevice(inputDevice); //TODO uncomment
 	
 	qDebug() << "outputDevice = " << devices[0];
 	int outputDevice = devices[0].toInt(& ok);
@@ -191,7 +191,7 @@ void ConfigurationSkeleton::writeConfig()
 	qDebug() << "Writing General settings";
 	
 	//Call history settings
-	if(enableHistory() != configurationManager.getHistoryEnabled()) configurationManager.setHistoryEnabled();
+	//TODO if(enableHistory() != configurationManager.getHistoryEnabled()) configurationManager.setHistoryEnabled();
 	configurationManager.setHistoryLimit(historyMax());
 	//SIP port settings
 	configurationManager.setSipPort(sIPPort());
diff --git a/sflphone-client-kde/src/conf/dlgaccounts.cpp b/sflphone-client-kde/src/conf/dlgaccounts.cpp
index 78ac4cf34fb28e9e3577f5106b58520c2739a61e..f5d15522b01ea9b6999b81ee76075787f657b03c 100644
--- a/sflphone-client-kde/src/conf/dlgaccounts.cpp
+++ b/sflphone-client-kde/src/conf/dlgaccounts.cpp
@@ -40,35 +40,66 @@ DlgAccounts::DlgAccounts(KConfigDialog *parent)
 	accountList = new AccountList(false);
 	loadAccountList();
 	accountListHasChanged = false;
-	toolButton_accountsApply->setEnabled(false);
+	//toolButton_accountsApply->setEnabled(false);
 	
-	connect(edit1_alias,           SIGNAL(textEdited(const QString &)),
-	        this,                  SLOT(changedAccountList()));
-	connect(edit2_protocol,        SIGNAL(activated(int)),
-	        this,                  SLOT(changedAccountList()));
-	connect(edit3_server,          SIGNAL(textEdited(const QString &)),
-	        this,                  SLOT(changedAccountList()));
-	connect(edit4_user,            SIGNAL(textEdited(const QString &)),
-	        this,                  SLOT(changedAccountList()));
-	connect(edit5_password,        SIGNAL(textEdited(const QString &)),
-	        this,                  SLOT(changedAccountList()));
-	connect(edit6_mailbox,         SIGNAL(textEdited(const QString &)),
-	        this,                  SLOT(changedAccountList()));
-	connect(spinbox_regExpire,     SIGNAL(editingFinished()),
-	        this,                  SLOT(changedAccountList()));
-	connect(checkBox_conformRFC,   SIGNAL(clicked(bool)),
-	        this,                  SLOT(changedAccountList()));
-	connect(button_accountUp,      SIGNAL(clicked()),
-	        this,                  SLOT(changedAccountList()));
-	connect(button_accountDown,    SIGNAL(clicked()),
-	        this,                  SLOT(changedAccountList()));
-	connect(button_accountAdd,     SIGNAL(clicked()),
-	        this,                  SLOT(changedAccountList()));
-	connect(button_accountRemove,  SIGNAL(clicked()),
-	        this,                  SLOT(changedAccountList()));
+	connect(edit1_alias,                    SIGNAL(textEdited(const QString &)),
+	        this,                           SLOT(changedAccountList()));
+	connect(edit2_protocol,                 SIGNAL(activated(int)),
+	        this,                           SLOT(changedAccountList()));
+	connect(edit3_server,                   SIGNAL(textEdited(const QString &)),
+	        this,                           SLOT(changedAccountList()));
+	connect(edit4_user,                     SIGNAL(textEdited(const QString &)),
+	        this,                           SLOT(changedAccountList()));
+	connect(edit5_password,                 SIGNAL(textEdited(const QString &)),
+	        this,                           SLOT(changedAccountList()));
+	connect(edit6_mailbox,                  SIGNAL(textEdited(const QString &)),
+	        this,                           SLOT(changedAccountList()));
+	connect(spinbox_regExpire,              SIGNAL(editingFinished()),
+	        this,                           SLOT(changedAccountList()));
+	connect(checkBox_conformRFC,            SIGNAL(clicked(bool)),
+	        this,                           SLOT(changedAccountList()));
+	connect(button_accountUp,               SIGNAL(clicked()),
+	        this,                           SLOT(changedAccountList()));
+	connect(button_accountDown,             SIGNAL(clicked()),
+	        this,                           SLOT(changedAccountList()));
+	connect(button_accountAdd,              SIGNAL(clicked()),
+	        this,                           SLOT(changedAccountList()));
+	connect(button_accountRemove,           SIGNAL(clicked()),
+	        this,                           SLOT(changedAccountList()));
+        connect(edit_tls_private_key_password,  SIGNAL(textEdited(const QString &)),
+                this,                           SLOT(changedAccountList()));
+        connect(spinbox_tls_listener,           SIGNAL(editingFinished()),
+                this,                           SLOT(changedAccountList()));
+        connect(file_tls_authority,             SIGNAL(textChanged(const QString &)),
+                this,                           SLOT(changedAccountList()));
+        connect(file_tls_endpoint,              SIGNAL(textChanged(const QString &)),
+                this,                           SLOT(changedAccountList()));
+        connect(file_tls_private_key,           SIGNAL(textChanged(const QString &)),
+                this,                           SLOT(changedAccountList()));
+        connect(combo_tls_method,               SIGNAL(currentIndexChanged(int)),
+                this,                           SLOT(changedAccountList()));
+        connect(edit_tls_cipher,                SIGNAL(textEdited(const QString &)),
+                this,                           SLOT(changedAccountList()));
+        connect(edit_tls_outgoing,              SIGNAL(textEdited(const QString &)),
+                this,                           SLOT(changedAccountList()));
+        connect(spinbox_tls_timeout_sec,        SIGNAL(editingFinished()),
+                this,                           SLOT(changedAccountList()));
+        connect(spinbox_tls_timeout_msec,       SIGNAL(editingFinished()),
+                this,                           SLOT(changedAccountList()));
+        connect(check_tls_incoming,             SIGNAL(clicked(bool)),
+                this,                           SLOT(changedAccountList()));
+        connect(check_tls_answer,               SIGNAL(clicked(bool)),
+                this,                           SLOT(changedAccountList()));
+        connect(check_tls_requier_cert,         SIGNAL(clicked(bool)),
+                this,                           SLOT(changedAccountList()));
+        connect(group_security_tls,             SIGNAL(clicked(bool)),
+                this,                           SLOT(changedAccountList()));
 	        
-	connect(&configurationManager, SIGNAL(accountsChanged()),
-	        this,                  SLOT(updateAccountStates()));
+	connect(&configurationManager,          SIGNAL(accountsChanged()),
+	        this,                           SLOT(updateAccountStates()));
+                
+        connect(edit_tls_private_key_password,  SIGNAL(textEdited(const QString &)),
+                this,                  SLOT(changedAccountList()));
 	        
 	
 	connect(this,     SIGNAL(updateButtons()), parent, SLOT(updateButtons()));
@@ -156,6 +187,24 @@ void DlgAccounts::saveAccount(QListWidgetItem * item)
 	account->setAccountDetail(ACCOUNT_RESOLVE_ONCE, checkBox_conformRFC->isChecked() ? "FALSE" : "TRUE");
 	account->setAccountDetail(ACCOUNT_EXPIRE, QString::number(spinbox_regExpire->value()));
 	account->setAccountDetail(ACCOUNT_ENABLED, account->isChecked() ? ACCOUNT_ENABLED_TRUE : ACCOUNT_ENABLED_FALSE);
+        
+        //Security
+        account->setAccountDetail(TLS_PASSWORD,edit_tls_private_key_password->text());
+        account->setAccountDetail(TLS_LISTENER_PORT,QString::number(spinbox_tls_listener->value()));
+        account->setAccountDetail(TLS_CA_LIST_FILE,file_tls_authority->text());
+        account->setAccountDetail(TLS_CERTIFICATE_FILE,file_tls_endpoint->text());
+        account->setAccountDetail(TLS_PRIVATE_KEY_FILE,file_tls_private_key->text());
+        //qDebug() << "\n\n\n\nSET: " << combo_tls_method->currentText() << "\n\n\n";
+        account->setAccountDetail(TLS_METHOD,combo_tls_method->currentText());
+        account->setAccountDetail(TLS_CIPHERS,edit_tls_cipher->text());
+        account->setAccountDetail(TLS_SERVER_NAME,edit_tls_outgoing->text());
+        account->setAccountDetail(TLS_NEGOTIATION_TIMEOUT_SEC,QString::number(spinbox_tls_timeout_sec->value()));
+        account->setAccountDetail(TLS_NEGOTIATION_TIMEOUT_MSEC,QString::number(spinbox_tls_timeout_msec->value()));
+        account->setAccountDetail(TLS_VERIFY_SERVER,check_tls_incoming->isChecked()?"true":"false");
+        account->setAccountDetail(TLS_VERIFY_CLIENT,check_tls_answer->isChecked()?"true":"false");
+        account->setAccountDetail(TLS_REQUIRE_CLIENT_CERTIFICATE,check_tls_requier_cert->isChecked()?"true":"false");
+        account->setAccountDetail(TLS_ENABLE,group_security_tls->isChecked()?"true":"false");
+        account->setAccountDetail(TLS_METHOD, QString::number(combo_security_STRP->currentIndex()));
 }
 
 void DlgAccounts::loadAccount(QListWidgetItem * item)
@@ -186,6 +235,27 @@ void DlgAccounts::loadAccount(QListWidgetItem * item)
 	bool ok;
 	int val = account->getAccountDetail(ACCOUNT_EXPIRE).toInt(&ok);
 	spinbox_regExpire->setValue(ok ? val : ACCOUNT_EXPIRE_DEFAULT);
+        
+        //Security
+        edit_tls_private_key_password->setText( account->getAccountDetail(TLS_PASSWORD ));
+        spinbox_tls_listener->setValue( account->getAccountDetail(TLS_LISTENER_PORT ).toInt());
+        file_tls_authority->setText( account->getAccountDetail(TLS_CA_LIST_FILE ));
+        file_tls_endpoint->setText( account->getAccountDetail(TLS_CERTIFICATE_FILE ));
+        file_tls_private_key->setText( account->getAccountDetail(TLS_PRIVATE_KEY_FILE ));
+        //qDebug() << "\n\n\n\nTHIS: " << account->getAccountDetail(TLS_METHOD ) << "\n\n\n";
+        combo_tls_method->setCurrentIndex( combo_tls_method->findText(account->getAccountDetail(TLS_METHOD )));
+        edit_tls_cipher->setText( account->getAccountDetail(TLS_CIPHERS ));
+        edit_tls_outgoing->setText( account->getAccountDetail(TLS_SERVER_NAME ));
+        spinbox_tls_timeout_sec->setValue( account->getAccountDetail(TLS_NEGOTIATION_TIMEOUT_SEC ).toInt());
+        spinbox_tls_timeout_msec->setValue( account->getAccountDetail(TLS_NEGOTIATION_TIMEOUT_MSEC ).toInt());
+        check_tls_incoming->setChecked( (account->getAccountDetail(TLS_VERIFY_SERVER ) == "true")?1:0);
+        check_tls_answer->setChecked( (account->getAccountDetail(TLS_VERIFY_CLIENT ) == "true")?1:0);
+        check_tls_requier_cert->setChecked( (account->getAccountDetail(TLS_REQUIRE_CLIENT_CERTIFICATE ) == "true")?1:0);
+        group_security_tls->setChecked( (account->getAccountDetail(TLS_ENABLE ) == "true")?1:0);
+        
+        combo_security_STRP->setCurrentIndex(account->getAccountDetail(TLS_METHOD ).toInt());
+        
+        
 	updateStatusLabel(account);
 	frame2_editAccounts->setEnabled(true);
 }
@@ -220,7 +290,7 @@ void DlgAccounts::changedAccountList()
 	qDebug() << "changedAccountList";
 	accountListHasChanged = true;
 	emit updateButtons();
-	toolButton_accountsApply->setEnabled(true);
+	//toolButton_accountsApply->setEnabled(true);
 }
 
 
@@ -288,12 +358,12 @@ void DlgAccounts::on_button_accountRemove_clicked()
 	listWidget_accountList->setCurrentRow( (r >= listWidget_accountList->count()) ? r-1 : r );
 }
 
-void DlgAccounts::on_toolButton_accountsApply_clicked()
-{
-	qDebug() << "on_toolButton_accountsApply_clicked";
-	updateSettings();
-	updateWidgets();
-}
+// void DlgAccounts::on_toolButton_accountsApply_clicked() //This button have been removed, coded kept for potential reversal
+// {
+// 	qDebug() << "on_toolButton_accountsApply_clicked";
+// 	updateSettings();
+// 	updateWidgets();
+// }
 
 void DlgAccounts::on_edit1_alias_textChanged(const QString & text)
 {
@@ -365,7 +435,7 @@ void DlgAccounts::updateSettings()
 	if(accountListHasChanged)
 	{
 		saveAccountList();
-		toolButton_accountsApply->setEnabled(false);
+		//toolButton_accountsApply->setEnabled(false);
 		accountListHasChanged = false;
 	}
 }
@@ -374,7 +444,7 @@ void DlgAccounts::updateWidgets()
 {
 	qDebug() << "DlgAccounts::updateWidgets";
 	loadAccountList();
-	toolButton_accountsApply->setEnabled(false);
+	//toolButton_accountsApply->setEnabled(false);
 	accountListHasChanged = false;
 }
 
diff --git a/sflphone-client-kde/src/conf/dlgaccounts.h b/sflphone-client-kde/src/conf/dlgaccounts.h
index 32743689175be525b94fb91aab1bd98eb694a9db..2eff977fb2b3f5551f1e21e05c351dd2b496012d 100644
--- a/sflphone-client-kde/src/conf/dlgaccounts.h
+++ b/sflphone-client-kde/src/conf/dlgaccounts.h
@@ -78,7 +78,7 @@ private slots:
 	void on_button_accountRemove_clicked();
 	void on_edit1_alias_textChanged(const QString & text);
 	void on_listWidget_accountList_currentItemChanged ( QListWidgetItem * current, QListWidgetItem * previous );
-	void on_toolButton_accountsApply_clicked();
+	//void on_toolButton_accountsApply_clicked(); //Disabled for future removal
 	void updateAccountStates();
 	void addAccountToAccountList(Account * account);
 	void updateAccountListCommands();
diff --git a/sflphone-client-kde/src/conf/dlgaccountsbase.ui b/sflphone-client-kde/src/conf/dlgaccountsbase.ui
index eafe181482ff650951b73e6f5f9ab1781cf4c1b8..a794240e5a4d840c83d7c9b795cfec75f651467a 100644
--- a/sflphone-client-kde/src/conf/dlgaccountsbase.ui
+++ b/sflphone-client-kde/src/conf/dlgaccountsbase.ui
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>603</width>
-    <height>455</height>
+    <width>748</width>
+    <height>447</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -29,8 +29,8 @@
       <item>
        <widget class="QFrame" name="frame1_accountList">
         <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-          <horstretch>1</horstretch>
+         <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
+          <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
@@ -46,6 +46,12 @@
           <height>16777215</height>
          </size>
         </property>
+        <property name="sizeIncrement">
+         <size>
+          <width>0</width>
+          <height>0</height>
+         </size>
+        </property>
         <property name="frameShape">
          <enum>QFrame::StyledPanel</enum>
         </property>
@@ -212,16 +218,6 @@
               </property>
              </spacer>
             </item>
-            <item>
-             <widget class="QToolButton" name="toolButton_accountsApply">
-              <property name="enabled">
-               <bool>true</bool>
-              </property>
-              <property name="text">
-               <string>Apply</string>
-              </property>
-             </widget>
-            </item>
            </layout>
           </widget>
          </item>
@@ -232,7 +228,7 @@
        <widget class="QTabWidget" name="frame2_editAccounts">
         <property name="sizePolicy">
          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-          <horstretch>1</horstretch>
+          <horstretch>3</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
@@ -419,6 +415,445 @@
           </item>
          </layout>
         </widget>
+        <widget class="QWidget" name="tab">
+         <attribute name="title">
+          <string>Credential</string>
+         </attribute>
+         <layout class="QGridLayout" name="gridLayout">
+          <item row="0" column="0" rowspan="2" colspan="3">
+           <widget class="QListWidget" name="list_credential">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="0">
+           <spacer name="horizontalSpacer_2">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>327</width>
+              <height>23</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item row="3" column="0" colspan="3">
+           <widget class="QGroupBox" name="group_credential">
+            <property name="title">
+             <string>Details</string>
+            </property>
+            <layout class="QGridLayout" name="gridLayout_2">
+             <item row="0" column="0">
+              <widget class="QLabel" name="label_credential_realm">
+               <property name="text">
+                <string>Realm</string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="0">
+              <widget class="QLabel" name="labe_credential_auth">
+               <property name="text">
+                <string>Auth. name</string>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="0">
+              <widget class="QLabel" name="label_credential_password">
+               <property name="text">
+                <string>Password</string>
+               </property>
+              </widget>
+             </item>
+             <item row="0" column="1">
+              <widget class="KLineEdit" name="edit_credential_realm"/>
+             </item>
+             <item row="1" column="1">
+              <widget class="KLineEdit" name="edit_credential_auth"/>
+             </item>
+             <item row="2" column="1">
+              <widget class="KLineEdit" name="edit_credential_password"/>
+             </item>
+            </layout>
+           </widget>
+          </item>
+          <item row="2" column="1">
+           <widget class="QToolButton" name="button_add_credential">
+            <property name="text">
+             <string>Add</string>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="2">
+           <widget class="QToolButton" name="button_remove_credential">
+            <property name="text">
+             <string>Remove</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+        <widget class="QWidget" name="tab_2">
+         <attribute name="title">
+          <string>Security</string>
+         </attribute>
+         <layout class="QGridLayout" name="gridLayout_3">
+          <item row="0" column="0">
+           <widget class="QScrollArea" name="scrollArea">
+            <property name="widgetResizable">
+             <bool>true</bool>
+            </property>
+            <widget class="QWidget" name="scrollAreaWidgetContents">
+             <property name="geometry">
+              <rect>
+               <x>0</x>
+               <y>0</y>
+               <width>426</width>
+               <height>588</height>
+              </rect>
+             </property>
+             <layout class="QGridLayout" name="gridLayout_5">
+              <item row="0" column="0">
+               <widget class="QLabel" name="label_security_STRP">
+                <property name="text">
+                 <string>STRP key exchange</string>
+                </property>
+               </widget>
+              </item>
+              <item row="0" column="1">
+               <widget class="QComboBox" name="combo_security_STRP">
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <item>
+                 <property name="text">
+                  <string>Disabled</string>
+                 </property>
+                </item>
+                <item>
+                 <property name="text">
+                  <string>ZRTP</string>
+                 </property>
+                </item>
+                <item>
+                 <property name="text">
+                  <string>SDES</string>
+                 </property>
+                </item>
+               </widget>
+              </item>
+              <item row="0" column="2">
+               <widget class="QToolButton" name="button_security_STRP">
+                <property name="text">
+                 <string>Edit</string>
+                </property>
+               </widget>
+              </item>
+              <item row="1" column="0" colspan="3">
+               <widget class="QLabel" name="label_tls_info">
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <property name="text">
+                 <string>TLS transport can be used along with UDP for those calls that would require secure sip transactions (aka SIPS). You can configure a different TLS transport for each account. However each of them will run on a dedicated port, different one from each other.</string>
+                </property>
+                <property name="wordWrap">
+                 <bool>true</bool>
+                </property>
+               </widget>
+              </item>
+              <item row="2" column="0" colspan="3">
+               <widget class="QGroupBox" name="group_security_tls">
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <property name="title">
+                 <string>Enable TLS</string>
+                </property>
+                <property name="checkable">
+                 <bool>true</bool>
+                </property>
+                <property name="checked">
+                 <bool>false</bool>
+                </property>
+                <layout class="QGridLayout" name="gridLayout_4">
+                 <item row="0" column="0">
+                  <widget class="QLabel" name="label_tls_listener">
+                   <property name="text">
+                    <string>Global TLS listener*</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="0" column="1" colspan="3">
+                  <widget class="KIntSpinBox" name="spinbox_tls_listener">
+                   <property name="maximum">
+                    <number>65535</number>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="0" column="4" colspan="5">
+                  <spacer name="horizontalSpacer_4">
+                   <property name="orientation">
+                    <enum>Qt::Horizontal</enum>
+                   </property>
+                   <property name="sizeHint" stdset="0">
+                    <size>
+                     <width>40</width>
+                     <height>20</height>
+                    </size>
+                   </property>
+                  </spacer>
+                 </item>
+                 <item row="1" column="0">
+                  <widget class="QLabel" name="label_tls_authority">
+                   <property name="text">
+                    <string>Authority certificate list</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="1" column="1" colspan="8">
+                  <widget class="KUrlRequester" name="file_tls_authority"/>
+                 </item>
+                 <item row="2" column="0">
+                  <widget class="QLabel" name="label_tls_endpoint">
+                   <property name="text">
+                    <string>Public endpoint certificate</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="2" column="1" colspan="8">
+                  <widget class="KUrlRequester" name="file_tls_endpoint"/>
+                 </item>
+                 <item row="3" column="0">
+                  <widget class="QLabel" name="label_tls_private_key">
+                   <property name="text">
+                    <string>Private key</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="3" column="1" colspan="8">
+                  <widget class="KUrlRequester" name="file_tls_private_key"/>
+                 </item>
+                 <item row="4" column="0">
+                  <widget class="QLabel" name="label_tls_private_key_password">
+                   <property name="text">
+                    <string>Private key password</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="4" column="1" colspan="8">
+                  <widget class="KLineEdit" name="edit_tls_private_key_password"/>
+                 </item>
+                 <item row="5" column="0">
+                  <widget class="QLabel" name="label_tls_method">
+                   <property name="text">
+                    <string>TLS protocol method</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="5" column="1" colspan="3">
+                  <widget class="QComboBox" name="combo_tls_method">
+                   <item>
+                    <property name="text">
+                     <string>Default</string>
+                    </property>
+                   </item>
+                   <item>
+                    <property name="text">
+                     <string>TLSv1</string>
+                    </property>
+                   </item>
+                   <item>
+                    <property name="text">
+                     <string>SSLv2</string>
+                    </property>
+                   </item>
+                   <item>
+                    <property name="text">
+                     <string>SSLv3</string>
+                    </property>
+                   </item>
+                   <item>
+                    <property name="text">
+                     <string>SSLv23</string>
+                    </property>
+                   </item>
+                  </widget>
+                 </item>
+                 <item row="5" column="4" colspan="5">
+                  <spacer name="horizontalSpacer_5">
+                   <property name="orientation">
+                    <enum>Qt::Horizontal</enum>
+                   </property>
+                   <property name="sizeHint" stdset="0">
+                    <size>
+                     <width>40</width>
+                     <height>20</height>
+                    </size>
+                   </property>
+                  </spacer>
+                 </item>
+                 <item row="6" column="0">
+                  <widget class="QLabel" name="label_tls_cipher">
+                   <property name="text">
+                    <string>TLS cipher list</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="6" column="1" colspan="8">
+                  <widget class="KLineEdit" name="edit_tls_cipher"/>
+                 </item>
+                 <item row="7" column="0">
+                  <widget class="QLabel" name="label_tls_outgoing">
+                   <property name="text">
+                    <string>Outgoing TLS server name</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="7" column="1" colspan="8">
+                  <widget class="KLineEdit" name="edit_tls_outgoing"/>
+                 </item>
+                 <item row="8" column="0">
+                  <widget class="QLabel" name="label_tls_timeout">
+                   <property name="text">
+                    <string>Negotiation timeout (s:ms)</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="8" column="1">
+                  <widget class="KIntSpinBox" name="spinbox_tls_timeout_sec">
+                   <property name="sizePolicy">
+                    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                     <horstretch>0</horstretch>
+                     <verstretch>0</verstretch>
+                    </sizepolicy>
+                   </property>
+                   <property name="minimumSize">
+                    <size>
+                     <width>50</width>
+                     <height>0</height>
+                    </size>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="9" column="0" colspan="5">
+                  <widget class="QCheckBox" name="check_tls_incoming">
+                   <property name="text">
+                    <string>Verify incoming certificates (server side)</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="10" column="0" colspan="5">
+                  <widget class="QCheckBox" name="check_tls_answer">
+                   <property name="text">
+                    <string>Verify answer certificates (client side)</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="11" column="0" colspan="5">
+                  <widget class="QCheckBox" name="check_tls_requier_cert">
+                   <property name="text">
+                    <string>Require a certificate for incoming TLS connections</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="12" column="0">
+                  <widget class="QLabel" name="label_tls_details">
+                   <property name="text">
+                    <string>*Apply to all accounts</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="13" column="0">
+                  <spacer name="verticalSpacer">
+                   <property name="orientation">
+                    <enum>Qt::Vertical</enum>
+                   </property>
+                   <property name="sizeHint" stdset="0">
+                    <size>
+                     <width>20</width>
+                     <height>40</height>
+                    </size>
+                   </property>
+                  </spacer>
+                 </item>
+                 <item row="8" column="4" colspan="5">
+                  <spacer name="horizontalSpacer_3">
+                   <property name="orientation">
+                    <enum>Qt::Horizontal</enum>
+                   </property>
+                   <property name="sizeHint" stdset="0">
+                    <size>
+                     <width>40</width>
+                     <height>20</height>
+                    </size>
+                   </property>
+                  </spacer>
+                 </item>
+                 <item row="8" column="3">
+                  <widget class="KIntSpinBox" name="spinbox_tls_timeout_msec">
+                   <property name="sizePolicy">
+                    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                     <horstretch>0</horstretch>
+                     <verstretch>0</verstretch>
+                    </sizepolicy>
+                   </property>
+                   <property name="minimumSize">
+                    <size>
+                     <width>50</width>
+                     <height>0</height>
+                    </size>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="8" column="2">
+                  <widget class="QLabel" name="label_timeout2">
+                   <property name="sizePolicy">
+                    <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+                     <horstretch>0</horstretch>
+                     <verstretch>0</verstretch>
+                    </sizepolicy>
+                   </property>
+                   <property name="minimumSize">
+                    <size>
+                     <width>10</width>
+                     <height>0</height>
+                    </size>
+                   </property>
+                   <property name="maximumSize">
+                    <size>
+                     <width>10</width>
+                     <height>16777215</height>
+                    </size>
+                   </property>
+                   <property name="text">
+                    <string>&lt;center&gt;:&lt;/center&gt;</string>
+                   </property>
+                  </widget>
+                 </item>
+                </layout>
+               </widget>
+              </item>
+             </layout>
+            </widget>
+           </widget>
+          </item>
+         </layout>
+        </widget>
        </widget>
       </item>
      </layout>
@@ -484,6 +919,11 @@
    <extends>QSpinBox</extends>
    <header>knuminput.h</header>
   </customwidget>
+  <customwidget>
+   <class>KUrlRequester</class>
+   <extends>QFrame</extends>
+   <header>kurlrequester.h</header>
+  </customwidget>
   <customwidget>
    <class>KLineEdit</class>
    <extends>QLineEdit</extends>
diff --git a/sflphone-client-kde/src/sflphone_const.h b/sflphone-client-kde/src/sflphone_const.h
index 356a2e5755c5300b06bc4707172f84fe09daa9b8..c26ce8ed0341d863b7a4a24707f9f138b504425e 100644
--- a/sflphone-client-kde/src/sflphone_const.h
+++ b/sflphone-client-kde/src/sflphone_const.h
@@ -205,6 +205,35 @@
 #define CONST_ALSA                        0
 #define CONST_PULSEAUDIO                  1
 
-
+/** TLS */
+#define TLS_LISTENER_PORT                   "TLS.listenerPort"
+#define TLS_ENABLE                          "TLS.enable"
+#define TLS_PORT                            "TLS.port"
+#define TLS_CA_LIST_FILE                    "TLS.certificateListFile"
+#define TLS_CERTIFICATE_FILE                "TLS.certificateFile"
+#define TLS_PRIVATE_KEY_FILE                "TLS.privateKeyFile"
+#define TLS_PASSWORD                        "TLS.password"
+#define TLS_METHOD                          "TLS.method"
+#define TLS_CIPHERS                         "TLS.ciphers"
+#define TLS_SERVER_NAME                     "TLS.serverName"
+#define TLS_VERIFY_SERVER                   "TLS.verifyServer"
+#define TLS_VERIFY_CLIENT                   "TLS.verifyClient"
+#define TLS_REQUIRE_CLIENT_CERTIFICATE      "TLS.requireClientCertificate"  
+#define TLS_NEGOTIATION_TIMEOUT_SEC         "TLS.negotiationTimeoutSec"
+#define TLS_NEGOTIATION_TIMEOUT_MSEC        "TLS.negotiationTimemoutMsec"
+
+#define ACCOUNT_PASSWORD                   "password"
+#define ACCOUNT_AUTHENTICATION_USERNAME    "authenticationUsername"
+#define ACCOUNT_REALM                      "realm"
+#define ACCOUNT_KEY_EXCHANGE               "SRTP.keyExchange"
+#define ACCOUNT_SRTP_ENABLED               "SRTP.enable"
+#define ACCOUNT_SRTP_RTP_FALLBACK          "SRTP.rtpFallback"
+#define ACCOUNT_ZRTP_DISPLAY_SAS           "ZRTP.displaySAS"
+#define ACCOUNT_ZRTP_NOT_SUPP_WARNING      "ZRTP.notSuppWarning"
+#define ACCOUNT_ZRTP_HELLO_HASH            "ZRTP.helloHashEnable"
+#define ACCOUNT_DISPLAY_SAS_ONCE           "ZRTP.displaySasOnce"
+#define KEY_EXCHANGE_NONE                  "0"
+#define ZRTP                               "1"
+#define SDES                               "2"
 
 #endif
diff --git a/sflphone-common/Makefile.am b/sflphone-common/Makefile.am
index 6d464df1bf37e8d39e06d4e3e91f6ecc220143b6..c5de2501fbb765d640061938f15ce4b259270a3a 100644
--- a/sflphone-common/Makefile.am
+++ b/sflphone-common/Makefile.am
@@ -18,6 +18,12 @@ unittest:
 	@echo " -- You need the cppunit devel package to compile the unitary tests."
 endif
 
+doc:
+	@(cd doc; make)
+	@echo ""
+	@echo "D-Bus API HTML documentation has been generated in doc/dbus-api/doc/spec"
+	@echo ""
+
 indent:
 	@echo "Indenting code:"
 	if [ -f $(ASTYLERC) ] ; then \
diff --git a/sflphone-common/VERSION b/sflphone-common/VERSION
index 06fa200552505d51e9a42251eb6ed4432c78ce90..53cdfba097a32837dc5677c91e725e0471b96d61 100644
--- a/sflphone-common/VERSION
+++ b/sflphone-common/VERSION
@@ -1 +1 @@
-0.9.7~beta
+0.9.8~beta
diff --git a/sflphone-common/configure.ac b/sflphone-common/configure.ac
index 96434834b6f544fc4da4751b583e5d54f003584a..eaf4d1aece3f33d44ad48402b374238ac2410dee 100644
--- a/sflphone-common/configure.ac
+++ b/sflphone-common/configure.ac
@@ -3,7 +3,7 @@ dnl
 
 	dnl Process this file with autoconf to produce a configure script.
 	AC_PREREQ(2.59)
-	AC_INIT([sflphone],[0.9.7~beta],[sflphoneteam@savoirfairelinux.com],[sflphone])
+	AC_INIT([sflphone],[0.9.8~beta],[sflphoneteam@savoirfairelinux.com],[sflphone])
 	AC_COPYRIGHT([[Copyright (c) Savoir-Faire Linux 2004-2009]])
 AC_REVISION([$Revision$])
 
@@ -70,12 +70,12 @@ AC_CONFIG_FILES([Makefile])
 	dnl Unitary test section
 AC_CONFIG_FILES([test/Makefile])
 
-
 AC_CONFIG_FILES([ringtones/Makefile])
 
 AC_CONFIG_FILES([man/Makefile])
 
 	AC_CONFIG_FILES([doc/Makefile \
+					doc/dbus-api/Makefile \
 			doc/doxygen/Makefile])
 
 	dnl the file stamp-h.in should be there before (instead of AC_CONFIG_HEADERS(config.h))
diff --git a/sflphone-common/doc/Makefile.am b/sflphone-common/doc/Makefile.am
index bbe34b9b1a6c74986447496e5d138d4902d5f937..f742c26ce5b69235cbafa55a31bf5292ffffa0e7 100644
--- a/sflphone-common/doc/Makefile.am
+++ b/sflphone-common/doc/Makefile.am
@@ -1,6 +1,6 @@
  
-SUBDIRS = doxygen
+SUBDIRS = doxygen dbus-api
 
 .PHONY: doc
 doc:
-	$(MAKE) -C doxygen doc
\ No newline at end of file
+	$(MAKE) -C doxygen doc
diff --git a/sflphone-common/doc/dbus-api/Makefile.am b/sflphone-common/doc/dbus-api/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..ced9bceb9dcbb3635220042dfdc8cacd9f35fe13
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/Makefile.am
@@ -0,0 +1,28 @@
+include $(top_srcdir)/globals.mak
+
+XSLTPROC=xsltproc --xinclude --nonet
+PYTHON=python
+
+XMLS=	$(wildcard $(top_srcdir)/src/dbus/spec/*.xml)
+TEMPLATES=	$(wildcard doc/templates/*)
+
+GENERATED_FILES =   \
+	doc/spec.html   \
+	doc/spec/index.html
+
+doc/spec.html: $(XMLS) tools/doc-generator.xsl
+	@install -d tmp/doc
+	$(XSLTPROC) tools/doc-generator.xsl spec/all.xml > tmp/$@
+	mv tmp/$@ $@
+
+doc/spec/index.html: $(XMLS) tools/doc-generator.py tools/specparser.py $(TEMPLATES)
+	@install -d tmp/doc
+	$(PYTHON) tools/doc-generator.py spec/all.xml doc/spec sflphone-spec org.sflphone.SFLphone
+
+all:	$(GENERATED_FILES)
+
+clean:	
+	rm -rf $(GENERATED_FILES)
+	rm -rf doc/spec
+	rm -rf tmp
+
diff --git a/sflphone-common/doc/dbus-api/README b/sflphone-common/doc/dbus-api/README
new file mode 100644
index 0000000000000000000000000000000000000000..3adb69af24b6160d4339180ba0d31cc003ab850e
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/README
@@ -0,0 +1,7 @@
+SFLphone D-Bus API documentation. Generated with xsltproc.
+
+Wiki reference: https://projects.savoirfairelinux.com/wiki/sflphone/Dbus-API
+
+Run Makefile to generate the HTML API documentation, from the xml interfaces in *sflphone-common/src/dbus*.
+
+The documentation is generated in *sflphone-common/doc/dbus-api/doc/spec*
diff --git a/sflphone-common/doc/dbus-api/doc/templates/devhelp.devhelp2 b/sflphone-common/doc/dbus-api/doc/templates/devhelp.devhelp2
new file mode 100644
index 0000000000000000000000000000000000000000..af327fa6d99be647dc588b574b489ab6f6bf8ace
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/doc/templates/devhelp.devhelp2
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<book xmlns="http://www.devhelp.net/book" title="$spec.title" name="$name" link="index.html">
+ <chapters>
+#for $interface in $spec.interfaces
+  <sub name="$interface.name" link="$interface.get_url()"/>
+#end for
+  <sub name="Generic Types" link="generic-types.html"/>
+  <sub name="Errors" link="errors.html"/>
+  <sub name="Full Index" link="fullindex.html"/>
+ </chapters>
+ <functions>
+#for $obj in $spec.everything.values() + $spec.types.values() + $spec.errors.values()
+  <keyword type="$obj.devhelp_name" name="$obj.get_title()" link="$obj.get_url()" #slurp
+#if $obj.deprecated: deprecated="true" #slurp
+/>
+#end for
+ </functions>
+</book>
diff --git a/sflphone-common/doc/dbus-api/doc/templates/errors.html b/sflphone-common/doc/dbus-api/doc/templates/errors.html
new file mode 100644
index 0000000000000000000000000000000000000000..907d6601c2145a5c825a82165b3cc493528076ca
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/doc/templates/errors.html
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" "">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+  <title>Errors</title>
+  <link rel="stylesheet" href="style.css" type="text/css"/>
+ </head>
+ <body>
+  <div class="header">
+  <h1>Errors</h1>
+   <a href="index.html">Interface Index</a>
+   (<a href="interfaces.html">Compact</a>)
+   | <a href="#summary">Summary</a>
+   | <a href="#errors">Errors</a>
+  </div>
+  <div class="main">
+   <div class="summary">
+    <a name="summary"></a>
+    <h3>Errors</h3>
+    <table class="summary">
+     #for $error in $spec.errors.values()
+      #if $error.deprecated
+       <tr class="deprecated">
+      #else
+       <tr>
+      #end if
+       <td><a href="$error.get_url()">$error.short_name</a></td>
+       <td>
+        #if $error.deprecated: (deprecated)
+       </td>
+      </tr>
+     #end for
+    </table>
+   </div>
+
+   <div class="outset errors error">
+    <a name="errors"></a>
+    <h1>Errors</h1>
+    #for $error in $spec.errors.values()
+     <div class="inset error">
+      <a name="$error.name"></a>
+      <span class="permalink">(<a href="$error.get_url()">Permalink</a>)</span>
+      <h2>
+       $error.short_name
+      </h2>
+
+      <div class="indent">
+        <code>$error.name</code>
+      </div>
+
+      $error.get_added()
+      $error.get_deprecated()
+      $error.get_docstring()
+     </div>
+    #end for
+   </div>
+   </div>
+
+ </body>
+</html>
diff --git a/sflphone-common/doc/dbus-api/doc/templates/fullindex.html b/sflphone-common/doc/dbus-api/doc/templates/fullindex.html
new file mode 100644
index 0000000000000000000000000000000000000000..2c465e1dd71271750111de42d7c471f0d01686fd
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/doc/templates/fullindex.html
@@ -0,0 +1,60 @@
+#from itertools import groupby
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" "">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+  <title>Full Index</title>
+  <link rel="stylesheet" href="style.css" type="text/css"/>
+ </head>
+
+#set $star = []
+#for $item in $spec.everything.values() + $spec.errors.values() + $spec.generic_types
+ #echo $star.append(($item.short_name, $item))
+ #slurp
+#end for
+#echo $star.sort(key = lambda t: t[0].title())
+#slurp
+## one use iterators...
+#set $groups = [ (l, list(g)) for l, g in (groupby($star, key = lambda t: t[0][0].upper())) ]
+#set $letters = set(map(lambda t: t[0], groups))
+
+ <body>
+  <div class="header">
+   <h1>Full Index</h1>
+   <a href="index.html">Interface Index</a>
+   (<a href="interfaces.html">Compact</a>)
+   #for $a in map(chr, xrange(ord('A'), ord('Z')+1))
+    #if $a in $letters
+     | <a href="#$a">$a</a>
+    #else
+     | $a
+    #end if
+   #end for
+  </div>
+
+  <div class="main">
+   <table class="summary">
+   #for l, g in $groups
+    <tr><th colspan="3"><a name="$l"></a>$l</th></tr>
+    #for $n in $g
+     #if $n[1].deprecated
+      <tr class="deprecated">
+     #else
+      <tr>
+     #end if
+      <td>
+       <a href="$n[1].get_url()" title="$n[1].get_title()">$n[0]</a>
+       #if $n[1].deprecated: (deprecated)
+      </td>
+      <td>$n[1].get_type_name()</td>
+      <td>
+       #if $n[1].parent.__class__.__name__ == 'Interface': $n[1].parent.name
+      </td>
+     </tr>
+    #end for
+   #end for
+   <table>
+  </div>
+
+ </body>
+</html>
diff --git a/sflphone-common/doc/dbus-api/doc/templates/generic-types.html b/sflphone-common/doc/dbus-api/doc/templates/generic-types.html
new file mode 100644
index 0000000000000000000000000000000000000000..0bb209e432210d364402ce23987000dbe66b7185
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/doc/templates/generic-types.html
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" "">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+  <title>Generic Types</title>
+  <link rel="stylesheet" href="style.css" type="text/css"/>
+ </head>
+ <body>
+  <div class="header">
+  <h1>Generic Types</h1>
+   <a href="index.html">Interface Index</a>
+   (<a href="interfaces.html">Compact</a>)
+   | <a href="#summary">Summary</a>
+   | <a href="#types">Types</a>
+  </div>
+  <div class="main">
+    <div class="summary">
+     <a name="summary"></a>
+     <h3>Generic Types</h3>
+     <table class="summary">
+      #for $type in $spec.generic_types
+       #if $type.deprecated
+        <tr class="deprecated">
+       #else
+        <tr>
+       #end if
+       <td><a href="$type.get_url()">$type.short_name</a></td>
+       <td>$type.get_type_name()</td>
+       <td>$type.dbus_type</td>
+       <td>
+        #if $type.deprecated: (deprecated)
+       </td>
+      </tr>
+      #end for
+     </table>
+    </div>
+
+   <div class="outset types type">
+    <a name="types"></a>
+    <h1>Generic Types</h1>
+    #for $type in $spec.generic_types
+     <div class="inset type">
+      <a name="$type.name"></a>
+      <span class="permalink">$type.get_type_name() (<a href="$type.get_url()">Permalink</a>)</span>
+      <h2>
+       $type.short_name &mdash; $type.dbus_type
+      </h2>
+
+      $type.get_added()
+      $type.get_deprecated()
+      $type.get_docstring()
+      $type.get_breakdown()
+     </div>
+    #end for
+   </div>
+   </div>
+
+ </body>
+</html>
diff --git a/sflphone-common/doc/dbus-api/doc/templates/index.html b/sflphone-common/doc/dbus-api/doc/templates/index.html
new file mode 100644
index 0000000000000000000000000000000000000000..efc38d4e8ec411eb9721c5e01f222f0c4d392913
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/doc/templates/index.html
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" "">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+  <title>$spec.title &mdash v$spec.version</title>
+  <link rel="stylesheet" href="style.css" type="text/css"/>
+ </head>
+ <body>
+  <div class="header">
+   <h1>$spec.title</h1>
+   <a href="#interfaces">Interfaces</a>
+   (<a href="interfaces.html">Compact</a>)
+   | <a href="generic-types.html">Generic Types</a>
+   | <a href="errors.html">Errors</a>
+   | <a href="fullindex.html">Full Index</a>
+  </div>
+
+  <div class="main">
+  <h3 class="version">Version $spec.version</h3>
+  <p class="copyrights">
+   #echo '<br/>'.join($spec.copyrights)
+  </p>
+  $spec.license
+
+  <a name="interfaces"></a>
+  <h3>Interfaces</h3>
+  <ul>
+  #def output($items)
+   #for $item in $items
+    #if $item.__class__.__name__ == 'Section'
+     <li class="chapter">$item.short_name</li>
+     $item.get_docstring()
+     <ul>
+      $output($item.items)
+     </ul>
+    #else
+     #if $item.causes_havoc
+      <li class="causes-havoc">
+     #elif $item.deprecated
+      <li class="deprecated">
+     #else
+      <li>
+     #end if
+      <a href="$item.get_url()">$item.name</a>
+      #if $item.causes_havoc
+       (unstable)
+      #elif $item.deprecated
+       (deprecated)
+      #end if
+     </li>
+    #end if
+   #end for
+  #end def
+  $output($spec.items)
+  </ul>
+
+  <a name="other"></a>
+  <h3>Other</h3>
+  <ul>
+   <li><a href="generic-types.html">Generic Types</a></li>
+   <li><a href="errors.html">Errors</a></li>
+  </ul>
+
+  </div>
+ </body>
+</html>
diff --git a/sflphone-common/doc/dbus-api/doc/templates/interface.html b/sflphone-common/doc/dbus-api/doc/templates/interface.html
new file mode 100644
index 0000000000000000000000000000000000000000..79c35b201c8c6d001022567028311f38c8390dee
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/doc/templates/interface.html
@@ -0,0 +1,424 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" "">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+  <title>$interface.name</title>
+  <link rel="stylesheet" href="style.css" type="text/css"/>
+ </head>
+ <body>
+  <div class="header">
+  <h1>Interface $interface.name</h1>
+   <a href="index.html">Interface Index</a>
+   (<a href="interfaces.html">Compact</a>)
+   | <a href="#summary">Summary</a>
+   #if $interface.docstring: | <a href="#description">Description</a>
+   #if $interface.methods: | <a href="#methods">Methods</a>
+   #if $interface.signals: | <a href="#signals">Signals</a>
+   #if $interface.properties: | <a href="#properties">Properties</a>
+   #if $interface.tpproperties: | <a href="#tpproperties">Telepathy Properties</a>
+   #if $interface.contact_attributes: | <a href="#contact-attributes">Contact Attributes</a>
+   #if $interface.handler_capability_tokens: | <a href="#handler-capability-tokens">Handler Capability Tokens</a>
+   #if $interface.types: | <a href="#types">Types</a>
+  </div>
+  <div class="main">
+
+    #if $interface.methods or $interface.signals or $interface.properties or $interface.types or $interface.tpproperties
+    <div class="summary">
+     <a name="summary"></a>
+     #if $interface.methods
+     <h3>Methods</h3>
+     <table class="summary">
+      #for $method in $interface.methods
+       #if $method.deprecated
+        <tr class="deprecated">
+       #else
+        <tr>
+       #end if
+       <td><a href="$method.get_url()">$method.short_name</a></td>
+       <td>($method.get_in_args())</td>
+       <td>&#8594;</td>
+       <td>$method.get_out_args()</td>
+       <td>
+        #if $method.deprecated: (deprecated)
+       </td>
+      </tr>
+      #end for
+     </table>
+     #end if
+    
+     #if $interface.signals
+     <h3>Signals</h3>
+     <table class="summary">
+      #for $signal in $interface.signals
+       #if $signal.deprecated
+        <tr class="deprecated">
+       #else
+        <tr>
+       #end if
+       <td><a href="$signal.get_url()">$signal.short_name</a></td>
+       <td>($signal.get_args())</td>
+       <td>
+        #if $signal.deprecated: (deprecated)
+       </td>
+      </tr>
+      #end for
+     </table>
+    #end if
+
+     #if $interface.properties
+     <h3>Properties</h3>
+     <table class="summary">
+      #for $property in $interface.properties
+       #if $property.deprecated
+        <tr class="deprecated">
+       #else
+        <tr>
+       #end if
+       <td><a href="$property.get_url()">$property.short_name</a></td>
+       <td>
+        $property.dbus_type
+        #if $property.type: (<a href="$property.get_type_url()" title="$property.get_type_title()">$property.get_type().short_name</a>)
+       </td>
+       <td>$property.get_access()</td>
+       <td>
+        #if $property.deprecated: (deprecated)
+       </td>
+      </tr>
+      #end for
+    </table>
+    #end if
+
+     #if $interface.tpproperties
+     <h3>Telepathy Properties</h3>
+     <table class="summary">
+      #for $property in $interface.tpproperties
+       <tr class="deprecated">
+       <td><a href="$property.get_url()">$property.short_name</a></td>
+       <td>
+        $property.dbus_type
+        #if $property.type: (<a href="$property.get_type_url()" title="$property.get_type_title()">$property.get_type().short_name</a>)
+       </td>
+      </tr>
+      #end for
+    </table>
+    #end if
+
+     #if $interface.contact_attributes
+     <h3>Contact Attributes</h3>
+     <table class="summary">
+      #for $token in $interface.contact_attributes
+       <tr class="contact-attribute">
+       <td><a href="$token.get_url()">$token.name</a></td>
+       <td>
+        $token.dbus_type
+        #if $token.type: (<a href="$token.get_type_url()" title="$token.get_type_title()">$token.get_type().short_name</a>)
+       </td>
+      </tr>
+      #end for
+    </table>
+    #end if
+
+     #if $interface.handler_capability_tokens
+     <h3>Handler Capability Tokens</h3>
+     <table class="summary">
+      #for $token in $interface.handler_capability_tokens
+       <tr class="handler-capability-token">
+         <td><a href="$token.get_url()">$token.name</a>
+           #if $token.is_family
+             (etc.)
+           #end if
+         </td>
+       <td>
+       </td>
+      </tr>
+      #end for
+    </table>
+    #end if
+
+     #if $interface.types
+     <h3>Types</h3>
+     <table class="summary">
+      #for $type in $interface.types
+       #if type.deprecated
+        <tr class="deprecated">
+       #else
+        <tr>
+       #end if
+       <td><a href="$type.get_url()">$type.short_name</a></td>
+       <td>$type.get_type_name()</td>
+       <td>$type.dbus_type</td>
+       <td>
+        #if $type.deprecated: (deprecated)
+       </td>
+      </tr>
+      #end for
+     </table>
+    #end if
+   </div>
+   #end if
+
+   #if $interface.causes_havoc
+   <div class="havoc"><span class="warning">WARNING:</span>
+    This interface is $interface.causes_havoc and is likely to cause havoc
+    to your API/ABI if bindings are generated. Do not include this interface
+    in libraries that care about compatibility.
+   </div>
+   #end if
+   $interface.get_added()
+   $interface.get_changed()
+   $interface.get_deprecated()
+
+   #if $interface.requires
+   <div class="requires">
+    Objects implementing this interface must also implement:
+    <ul>
+    #for $req in $interface.get_requires()
+     <li><a href="$req.get_url()" title="$req.get_title()">$req.name</a></li>
+    #end for
+    </ul>
+   </div>
+   #end if
+
+   #if $interface.docstring
+    <a name="description"></a>
+    <h3>Description</h3>
+    $interface.get_docstring()
+   #end if
+
+   #if $interface.methods
+   <div class="outset methods method">
+    <a name="methods"></a>
+    <h1>Methods</h1>
+    #for $method in $interface.methods
+    <div class="inset method">
+     <a name="$method.name"></a>
+     <span class="permalink">(<a href="$method.get_url()">Permalink</a>)</span>
+     <h2>$method.short_name ($method.get_in_args()) &#8594; $method.get_out_args()</h2>
+
+     $method.get_added()
+     $method.get_changed()
+     $method.get_deprecated()
+
+     #if $method.in_args
+     <div class="indent">
+      <h3>Parameters</h3>
+      <ul>
+      #for $arg in $method.in_args
+       <li>
+        $arg.short_name &mdash; $arg.dbus_type
+        #if $arg.get_type(): (<a href="$arg.get_type_url()" title="$arg.get_type_title()">$arg.get_type().short_name</a>)
+       </li>
+       $arg.get_added()
+       $arg.get_changed()
+       $arg.get_deprecated()
+       $arg.get_docstring()
+      #end for
+      </ul>
+     </div>
+     #end if
+     
+     #if $method.out_args
+     <div class="indent">
+      <h3>Returns</h3>
+      <ul>
+      #for $arg in $method.out_args
+       <li>
+        $arg.short_name &mdash; $arg.dbus_type
+        #if $arg.get_type(): (<a href="$arg.get_type_url()" title="$arg.get_type_title()">$arg.get_type().short_name</a>)
+       </li>
+       $arg.get_added()
+       $arg.get_changed()
+       $arg.get_deprecated()
+       $arg.get_docstring()
+      #end for
+      </ul>
+     </div>
+     #end if
+     
+     $method.get_docstring()
+     
+     #if $method.possible_errors
+     <hr/>
+     <div class="indent">
+      <h3>Possible Errors</h3>
+      <ul>
+      #for $error in $method.possible_errors
+       <li><a href="$error.get_url()" title="$error.get_title()">$error.get_error().short_name</a></li>
+       $error.get_added()
+       $error.get_changed()
+       $error.get_deprecated()
+       $error.get_docstring()
+      #end for
+      </ul>
+     </div>
+     #end if
+    </div>
+    #end for
+   </div>
+   #end if
+   
+   #if $interface.signals
+   <div class="outset signals signal">
+    <a name="signals"></a>
+    <h1>Signals</h1>
+    #for $signal in $interface.signals
+    <div class="inset signal">
+     <a name="$signal.name"></a>
+     <span class="permalink">(<a href="$signal.get_url()">Permalink</a>)</span>
+     <h2>$signal.short_name ($signal.get_args())</h2>
+
+     $signal.get_added()
+     $signal.get_changed()
+     $signal.get_deprecated()
+
+     #if $signal.args
+     <div class="indent">
+      <h3>Parameters</h3>
+      <ul>
+      #for $arg in $signal.args
+       <li>
+       $arg.short_name &mdash; $arg.dbus_type
+       #if $arg.get_type(): (<a href="$arg.get_type_url()" title="$arg.get_type_title()">$arg.get_type().short_name</a>)
+       </li>
+       $arg.get_added()
+       $arg.get_changed()
+       $arg.get_deprecated()
+       $arg.get_docstring()
+      #end for
+      </ul>
+     </div>
+     #end if
+
+     $signal.get_docstring()
+    </div>
+    #end for
+   </div>
+   #end if
+
+   #if $interface.properties
+   <div class="outset properties property">
+    <a name="properties"></a>
+    <h1>Properties</h1>
+    <div>
+     Accessed using the org.freedesktop.DBus.Properties interface.
+    </div>
+    #for $property in $interface.properties
+    <div class="inset property">
+     <a name="$property.name"></a>
+     <span class="permalink">(<a href="$property.get_url()">Permalink</a>)</span>
+     <h2>
+      $property.short_name &mdash; $property.dbus_type
+      #if $property.type: (<a href="$property.get_type_url()" title="$property.get_type_title()">$property.get_type().short_name</a>)
+     </h2>
+      <div class="access">$property.get_access()</div>
+
+     $property.get_added()
+     $property.get_changed()
+     $property.get_deprecated()
+     $property.get_docstring()
+    </div>
+    #end for
+   </div>
+   #end if
+
+   #if $interface.tpproperties
+   <div class="outset tpproperties tpproperty">
+    <a name="tpproperties"></a>
+    <h1>Telepathy Properties</h1>
+    <div>
+     Accessed using the org.freedesktop.Telepathy.Properties interface.
+    </div>
+    #for $property in $interface.tpproperties
+    <div class="inset tpproperty">
+     <a name="$property.name"></a>
+     <span class="permalink">(<a href="$property.get_url()">Permalink</a>)</span>
+     <h2>
+      $property.short_name &mdash; $property.dbus_type
+      #if $property.type: (<a href="$property.get_type_url()" title="$property.get_type_title()">$property.get_type().short_name</a>)
+     </h2>
+     $property.get_added()
+     $property.get_changed()
+     $property.get_deprecated()
+     $property.get_docstring()
+    </div>
+    #end for
+   </div>
+   #end if
+
+   #if $interface.contact_attributes
+   <div class="outset contact-attributes">
+    <a name="contact-attributes"></a>
+    <h1>Contact Attributes</h1>
+    <div>
+      Attributes that a contact can have, accessed with the
+      org.freedesktop.Telepathy.Connection.Interface.Contacts interface.
+    </div>
+    #for $token in $interface.contact_attributes
+    <div class="inset contact-attribute">
+     <a name="$token.name"></a>
+     <span class="permalink">(<a href="$token.get_url()">Permalink</a>)</span>
+     <h2>
+      $token.name &mdash; $token.dbus_type
+      #if $token.type: (<a href="$token.get_type_url()" title="$token.get_type_title()">$token.get_type().short_name</a>)
+     </h2>
+     $token.get_added()
+     $token.get_changed()
+     $token.get_deprecated()
+     $token.get_docstring()
+    </div>
+    #end for
+   </div>
+   #end if
+
+   #if $interface.handler_capability_tokens
+   <div class="outset handler-capability-tokens">
+    <a name="handler-capability-tokens"></a>
+    <h1>Handler Capability Tokens</h1>
+    <div>
+      Tokens representing capabilities that a Client.Handler can have.
+    </div>
+    #for $token in $interface.handler_capability_tokens
+    <div class="inset handler-capability-token">
+     <a name="$token.name"></a>
+     <span class="permalink">(<a href="$token.get_url()">Permalink</a>)</span>
+     <h2>
+      $token.name
+      #if $token.is_family
+      (etc.)
+      #end if
+     </h2>
+     $token.get_added()
+     $token.get_changed()
+     $token.get_deprecated()
+     $token.get_docstring()
+    </div>
+    #end for
+   </div>
+   #end if
+
+   #if $interface.types
+   <div class="outset types type">
+    <a name="types"></a>
+    <h1>Types</h1>
+    #for $type in $interface.types
+     <div class="inset type">
+      <a name="$type.name"></a>
+      <span class="permalink">$type.get_type_name() (<a href="$type.get_url()">Permalink</a>)</span>
+      <h2>
+       $type.short_name &mdash; $type.dbus_type
+      </h2>
+
+      $type.get_added()
+      $type.get_changed()
+      $type.get_deprecated()
+      $type.get_docstring()
+      $type.get_breakdown()
+     </div>
+    #end for
+   </div>
+   #end if
+   
+   </div>
+
+ </body>
+</html>
diff --git a/sflphone-common/doc/dbus-api/doc/templates/interfaces.html b/sflphone-common/doc/dbus-api/doc/templates/interfaces.html
new file mode 100644
index 0000000000000000000000000000000000000000..a93334c65de98f8e1a8933316778579d3e18d6a7
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/doc/templates/interfaces.html
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" "">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+  <title>$spec.title &mdash v$spec.version</title>
+  <link rel="stylesheet" href="style.css" type="text/css"/>
+ </head>
+ <body>
+  <div class="header">
+   <h1>$spec.title</h1>
+   <a href="index.html">Full</a>
+   | <a href="generic-types.html">Generic Types</a>
+   | <a href="errors.html">Errors</a>
+   | <a href="fullindex.html">Full Index</a>
+  </div>
+
+  <div class="main">
+  <b>Version $spec.version</b>
+
+  <a name="interfaces"></a>
+  <h3>Interfaces</h3>
+  <ul>
+  #for $interface in $spec.interfaces
+   #if $interface.causes_havoc
+    <li class="causes-havoc">
+   #elif $interface.deprecated
+    <li class="deprecated">
+   #else
+    <li>
+   #end if
+    <a href="$interface.get_url()">$interface.name</a>
+    #if $interface.causes_havoc
+     (unstable)
+    #elif $interface.deprecated
+     (deprecated)
+    #end if
+   </li>
+  #end for
+  </ul>
+
+  <a name="other"></a>
+  <h3>Other</h3>
+  <ul>
+   <li><a href="generic-types.html">Generic Types</a></li>
+   <li><a href="errors.html">Errors</a></li>
+  </ul>
+
+  </div>
+ </body>
+</html>
diff --git a/sflphone-common/doc/dbus-api/doc/templates/style.css b/sflphone-common/doc/dbus-api/doc/templates/style.css
new file mode 100644
index 0000000000000000000000000000000000000000..979ced8caee61b00d127e83feb7c5576fbf1c191
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/doc/templates/style.css
@@ -0,0 +1,237 @@
+html, body,
+h1, h2 {
+	font-family: "Georgia";
+	margin: 0;
+	padding: 0;
+}
+
+h3 {
+	margin-top: 2pt;
+	margin-bottom: 2pt;
+}
+
+ul {
+	margin: 1ex;
+	margin-left: 1.5em;
+	padding: 0;
+}
+
+hr {
+	border-style: none;
+	color: #cccccc;
+	background-color: #cccccc;
+	height: 1px;
+}
+
+div.header {
+	position: fixed;
+	height: 4em;
+	background-color: AliceBlue;
+	width: 100%;
+	margin: 0;
+	padding: 0.5ex;
+	border-bottom: 1px solid black;
+	top: 0;
+	left: 0;
+	z-index: 1;
+}
+
+div.header h1 {
+	white-space: nowrap;
+	text-overflow: ellipsis;
+	overflow: hidden;
+}
+
+div.main {
+	margin-top: 5em;
+	margin-left: 1ex;
+	margin-right: 1ex;
+	margin-bottom: 1ex;
+}
+
+div.main a[name] {
+	position: relative;
+	top: -4.5em;
+}
+
+div.outset {
+	padding: 1ex;
+	margin-top: 1ex;
+	margin-bottom: 1ex;
+}
+
+div.inset {
+	background-color: white;
+	margin-top: 1ex;
+	margin-bottom: 1ex;
+	padding: 0.5ex;
+}
+
+div.indent {
+	margin-left: 1em;
+}
+
+div.methods {
+	background-color: #fcaf3e;
+}
+
+div.method {
+	border: 1px solid #f57900;
+}
+
+div.signals {
+	background-color: #729fcf;
+}
+
+div.signal {
+	border: 1px solid #3465a4;
+}
+
+div.properties {
+	background-color: #ad7fa8;
+}
+
+div.property {
+	border: 1px solid #75507b;
+}
+
+div.tpproperties {
+	background-color: #999999;
+}
+
+div.tpproperty {
+	border: 1px solid #333333;
+}
+
+div.contact-attributes {
+	background-color: #ccccff;
+	border: 1px solid #9999cc;
+}
+
+div.contact-attribute {
+	border: 1px solid #9999cc;
+}
+
+div.handler-capability-tokens {
+	background-color: #339933;
+	border: 1px solid #228822;
+}
+
+div.handler-capability-token {
+	border: 1px solid #228822;
+}
+
+div.types {
+	background-color: #e9b96e;
+}
+
+div.type {
+	border: 1px solid #c17d11;
+}
+
+div.errors {
+	background-color: #ef2929;
+}
+
+div.error {
+	border: 1px solid #cc0000;
+}
+
+div.access {
+	font-weight: bold;
+	margin-left: 1ex;
+}
+
+div.summary {
+	padding: 0.5ex;
+	background-color: #eeeeec;
+	border: 1px solid #d3d7cf;
+}
+
+table.summary {
+	margin: 1ex;
+	font-size: small;
+}
+
+table.summary td {
+	padding-right: 1ex;
+}
+
+li.chapter {
+	margin-top: 1ex;
+	font-weight: bold;
+}
+
+li.causes-havoc {
+	font-style: italic;
+}
+
+li.deprecated,
+li.deprecated a,
+table.summary tr.deprecated td,
+table.summary tr.deprecated td a {
+	color: gray;
+}
+
+div.requires,
+div.docstring {
+	margin: 1ex;
+}
+
+div.added {
+	border-left: 2px solid #4e9a06;
+	margin: 1ex;
+	padding-left: 1ex;
+}
+
+div.added span.version {
+	color: #4e9a06;
+	font-weight: bold;
+}
+
+div.changed {
+	border-left: 2px solid #8f5902;
+	margin: 1ex;
+	padding-left: 1ex;
+}
+
+div.changed span.version {
+	color: #8f5902;
+	font-weight: bold;
+}
+
+div.deprecated,
+div.havoc {
+	border-left: 2px solid #a40000;
+	margin: 1ex;
+	padding-left: 1ex;
+}
+
+div.deprecated span.version,
+span.warning {
+	color: #a40000;
+	font-weight: bold;
+}
+
+div.rationale {
+	border-left: 2px solid gray;
+	margin: 1ex;
+	padding-left: 1ex;
+}
+
+span.permalink {
+	float: right;
+	font-size: x-small;
+}
+
+.license {
+	clear: both;
+	border: 1px solid #dedede;
+	font-style: italic;
+	padding: 15px;
+}
+
+.copyrights {
+	clear: both;
+	float: right;
+}
diff --git a/sflphone-common/doc/dbus-api/spec/all.xml b/sflphone-common/doc/dbus-api/spec/all.xml
new file mode 100644
index 0000000000000000000000000000000000000000..b87a0e1e41083510f2666fdb62b8c339087eef61
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/spec/all.xml
@@ -0,0 +1,55 @@
+<tp:spec
+	xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
+	xmlns:xi="http://www.w3.org/2001/XInclude">
+
+<tp:title>SFLphone D-Bus Interface Specification</tp:title>
+<tp:version>0.9.8</tp:version>
+
+<tp:copyright>Copyright © 2005-2010 Savoir-faire Linux Inc</tp:copyright>
+
+<tp:license xmlns="http://www.w3.org/1999/xhtml">
+<p>This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.</p>
+
+<p>This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.</p>
+
+<p>You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
+</tp:license>
+
+<tp:section name="Instances Manager">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+  <p>
+	An Instance Manager to handle multiple clients connections. Count the number of clients actually registered to the core. When initializing your client, you need to register it against the core by using this interface.
+  </p>
+ </tp:docstring>
+ <xi:include href="instance-introspec.xml"/>
+</tp:section>
+
+<tp:section name="Call Manager">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+  <p>
+	A Call Manager to handle call-related features.
+  </p>
+ </tp:docstring>
+ <xi:include href="callmanager-introspec.xml"/>
+</tp:section>
+
+<tp:section name="Configuration Manager">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+  <p>
+	A Configuration Manager to handle account configuration, user preferences, ...
+  </p>
+ </tp:docstring>
+ <xi:include href="configurationmanager-introspec.xml"/>
+</tp:section>
+
+<xi:include href="generic-types.xml"/>
+
+</tp:spec>
diff --git a/sflphone-common/doc/dbus-api/spec/callmanager-introspec.xml b/sflphone-common/doc/dbus-api/spec/callmanager-introspec.xml
new file mode 120000
index 0000000000000000000000000000000000000000..2150eca25d2f7405bf1f7c8684247457538207c6
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/spec/callmanager-introspec.xml
@@ -0,0 +1 @@
+../../../src/dbus/callmanager-introspec.xml
\ No newline at end of file
diff --git a/sflphone-common/doc/dbus-api/spec/configurationmanager-introspec.xml b/sflphone-common/doc/dbus-api/spec/configurationmanager-introspec.xml
new file mode 120000
index 0000000000000000000000000000000000000000..d340519f1a8287c927fa3e8c516b256438dc2a63
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/spec/configurationmanager-introspec.xml
@@ -0,0 +1 @@
+../../../src/dbus/configurationmanager-introspec.xml
\ No newline at end of file
diff --git a/sflphone-common/doc/dbus-api/spec/errors.xml b/sflphone-common/doc/dbus-api/spec/errors.xml
new file mode 100644
index 0000000000000000000000000000000000000000..22a629baff276dbeb4439352acb7df7a90b319be
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/spec/errors.xml
@@ -0,0 +1,417 @@
+<?xml version="1.0" ?>
+<tp:errors xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" namespace="org.freedesktop.Telepathy.Error">
+  <tp:error name="Network Error">
+    <tp:docstring>
+    Raised when there is an error reading from or writing to the network.
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Not Implemented">
+    <tp:docstring>
+    Raised when the requested method, channel, etc is not available on this connection.
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Invalid Argument">
+    <tp:docstring>
+    Raised when one of the provided arguments is invalid.
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Not Available">
+    <tp:docstring>
+    Raised when the requested functionality is temporarily unavailable.
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Permission Denied">
+    <tp:docstring>
+    The user is not permitted to perform the requested operation.
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Disconnected">
+    <tp:docstring>
+      The connection is not currently connected and cannot be used.
+      This error may also be raised when operations are performed on a
+      Connection for which
+      <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection">StatusChanged</tp:dbus-ref>
+      has signalled status Disconnected for reason None.
+
+      <tp:rationale>
+        The second usage corresponds to None in the
+        <tp:type>Connection_Status_Reason</tp:type> enum; if a better reason
+        is available, the corresponding error should be used instead.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Invalid Handle">
+    <tp:docstring>
+    The handle specified is unknown on this channel or connection.
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Channel.Banned">
+    <tp:docstring>
+    You are banned from the channel.
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Channel.Full">
+    <tp:docstring>
+    The channel is full.
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Channel.Invite Only">
+    <tp:docstring>
+    The requested channel is invite-only.
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Not Yours">
+    <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+      <p>The requested channel or other resource already exists, and another
+        user interface in this session is responsible for it.</p>
+
+      <p>User interfaces SHOULD handle this error unobtrusively, since it
+        indicates that some other user interface is already processing the
+        channel.</p>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Cancelled">
+    <tp:docstring>
+      Raised by an ongoing request if it is cancelled by user request before
+      it has completed, or when operations are performed on an object which
+      the user has asked to close (for instance, a Connection where the user
+      has called Disconnect, or a Channel where the user has called Close).
+
+      <tp:rationale>
+        The second form can be used to correspond to the Requested member in
+        the <tp:type>Connection_Status_Reason</tp:type> enum, or to
+        to represent the situation where disconnecting a Connection,
+        closing a Channel, etc. has been requested by the user but this
+        request has not yet been acted on, for instance because the
+        service will only act on the request when it has finished processing
+        an event queue.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Authentication Failed">
+    <tp:docstring>
+      Raised when authentication with a service was unsuccessful.
+      <tp:rationale>
+        This corresponds to Authentication_Failed in the
+        <tp:type>Connection_Status_Reason</tp:type> enum.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Encryption Not Available">
+    <tp:docstring>
+      Raised if a user request insisted that encryption should be used,
+      but encryption was not actually available.
+
+      <tp:rationale>
+        This corresponds to part of Encryption_Error in the
+        <tp:type>Connection_Status_Reason</tp:type> enum. It's been separated
+        into a distinct error here because the two concepts that were part
+        of EncryptionError seem to be things that could reasonably appear
+        differently in the UI.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Encryption Error">
+    <tp:docstring>
+      Raised if encryption appears to be available, but could not actually be
+      used (for instance if SSL/TLS negotiation fails).
+      <tp:rationale>
+        This corresponds to part of Encryption_Error in the
+        <tp:type>Connection_Status_Reason</tp:type> enum.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Cert.Not Provided">
+    <tp:docstring>
+      Raised if the server did not provide a SSL/TLS certificate. This error
+      MUST NOT be used to represent the absence of a client certificate
+      provided by the Telepathy connection manager.
+      <tp:rationale>
+        This corresponds to Cert_Not_Provided in the
+        <tp:type>Connection_Status_Reason</tp:type> enum. That error
+        explicitly applied only to server SSL certificates, so this one
+        is similarly limited; having the CM present a client certificate
+        is a possible future feature, but it should have its own error
+        handling.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Cert.Untrusted">
+    <tp:docstring>
+      Raised if the server provided a SSL/TLS certificate signed by an
+      untrusted certifying authority. This error SHOULD NOT be used to
+      represent a self-signed certificate: see the Self Signed error for that.
+      <tp:rationale>
+        This corresponds to Cert_Untrusted in the
+        <tp:type>Connection_Status_Reason</tp:type> enum, with a clarification
+        to avoid ambiguity.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Cert.Expired">
+    <tp:docstring>
+      Raised if the server provided an expired SSL/TLS certificate.
+      <tp:rationale>
+        This corresponds to Cert_Expired in the
+        <tp:type>Connection_Status_Reason</tp:type> enum.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Cert.Not Activated">
+    <tp:docstring>
+      Raised if the server provided an SSL/TLS certificate that will become
+      valid at some point in the future.
+      <tp:rationale>
+        This corresponds to Cert_Not_Activated in the
+        <tp:type>Connection_Status_Reason</tp:type> enum.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Cert.Fingerprint Mismatch">
+    <tp:docstring>
+      Raised if the server provided an SSL/TLS certificate that did not have
+      the expected fingerprint.
+      <tp:rationale>
+        This corresponds to Cert_Fingerprint_Mismatch in the
+        <tp:type>Connection_Status_Reason</tp:type> enum.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Cert.Hostname Mismatch">
+    <tp:docstring>
+      Raised if the server provided an SSL/TLS certificate that did not match
+      its hostname.
+      <tp:rationale>
+        This corresponds to Cert_Hostname_Mismatch in the
+        <tp:type>Connection_Status_Reason</tp:type> enum.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Cert.Self Signed">
+    <tp:docstring>
+      Raised if the server provided an SSL/TLS certificate that is self-signed
+      and untrusted.
+      <tp:rationale>
+        This corresponds to Cert_Hostname_Mismatch in the
+        <tp:type>Connection_Status_Reason</tp:type> enum.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Cert.Invalid">
+    <tp:docstring>
+      Raised if the server provided an SSL/TLS certificate that is
+      unacceptable in some way that does not have a more specific error.
+      <tp:rationale>
+        This corresponds to Cert_Other_Error in the
+        <tp:type>Connection_Status_Reason</tp:type> enum.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Not Capable">
+    <tp:docstring>
+    Raised when requested functionality is unavailable due to contact
+    not having required capabilities.
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Offline">
+    <tp:docstring>
+      Raised when requested functionality is unavailable because a contact is
+      offline.
+
+      <tp:rationale>
+        This corresponds to Offline in the
+        <tp:type>Channel_Group_Change_Reason</tp:type> enum.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Channel.Kicked">
+    <tp:docstring>
+      Used to represent a user being ejected from a channel by another user,
+      for instance being kicked from a chatroom.
+
+      <tp:rationale>
+        This corresponds to Kicked in the
+        <tp:type>Channel_Group_Change_Reason</tp:type> enum.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Busy">
+    <tp:docstring>
+      Used to represent a user being removed from a channel because of a
+      "busy" indication. This error SHOULD NOT be used to represent a server
+      or other infrastructure being too busy to process a request - for that,
+      see ServerBusy.
+
+      <tp:rationale>
+        This corresponds to Busy in the
+        <tp:type>Channel_Group_Change_Reason</tp:type> enum.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="No Answer">
+    <tp:docstring>
+      Used to represent a user being removed from a channel because they did
+      not respond, e.g. to a StreamedMedia call.
+
+      <tp:rationale>
+        This corresponds to No_Answer in the
+        <tp:type>Channel_Group_Change_Reason</tp:type> enum.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Does Not Exist">
+    <tp:docstring>
+      Raised when the requested user does not, in fact, exist.
+
+      <tp:rationale>
+        This corresponds to Invalid_Contact in the
+        <tp:type>Channel_Group_Change_Reason</tp:type> enum, but can also be
+        used to represent other things not existing (like chatrooms, perhaps).
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Terminated">
+    <tp:docstring>
+      Raised when a channel is terminated for an unspecified reason. In
+      particular, this error SHOULD be used whenever normal termination of
+      a 1-1 StreamedMedia call by the remote user is represented as a D-Bus
+      error name.
+
+      <tp:rationale>
+        This corresponds to None in the
+        <tp:type>Channel_Group_Change_Reason</tp:type> enum.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Connection Refused">
+    <tp:docstring>
+      Raised when a connection is refused.
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Connection Failed">
+    <tp:docstring>
+      Raised when a connection can't be established.
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Connection Lost">
+    <tp:docstring>
+      Raised when a connection is broken.
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Already Connected">
+    <tp:docstring>
+      Raised when the user attempts to connect to an account but they are
+      already connected (perhaps from another client or computer), and the
+      protocol or account settings do not allow this.
+
+      <tp:rationale>
+        XMPP can have this behaviour if the user chooses the same resource
+        in both clients (it is server-dependent whether the result is
+        AlreadyConnected on the new connection, ConnectionReplaced on the
+        old connection, or two successful connections).
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Connection Replaced">
+    <tp:docstring>
+      Raised by an existing connection to an account if it is replaced by
+      a new connection (perhaps from another client or computer).
+
+      <tp:rationale>
+        In MSNP, when connecting twice with the same Passport, the new
+        connection "wins" and the old one is automatically disconnected.
+        XMPP can also have this behaviour if the user chooses the same
+        resource in two clients (it is server-dependent whether the result is
+        AlreadyConnected on the new connection, ConnectionReplaced on the
+        old connection, or two successful connections).
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Registration Exists">
+    <tp:docstring>
+      Raised during in-band registration if the server indicates that the
+      requested account already exists.
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Service Busy">
+    <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+      Raised if a server or some other piece of infrastructure cannot process
+      the request, e.g. due to resource limitations. Clients MAY try again
+      later.
+
+      <tp:rationale>
+        This is not the same error as Busy, which indicates that a
+        <em>user</em> is busy.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:error name="Resource Unavailable">
+    <tp:docstring>
+      Raised if a request cannot be satisfied because a process local to the
+      user has insufficient resources. Clients MAY try again
+      later.
+
+      <tp:rationale>
+        For instance, the <tp:dbus-ref
+          namespace="org.freedesktop.Telepathy">ChannelDispatcher</tp:dbus-ref>
+        might raise this error for some or all channel requests if it has
+        detected that there is not enough free memory.
+      </tp:rationale>
+    </tp:docstring>
+  </tp:error>
+
+  <tp:copyright>Copyright © 2005-2009 Collabora Limited</tp:copyright>
+  <tp:copyright>Copyright © 2005-2009 Nokia Corporation</tp:copyright>
+  <tp:license xmlns="http://www.w3.org/1999/xhtml">
+<p>This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.</p>
+
+<p>This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.</p>
+
+<p>You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
+  </tp:license>
+</tp:errors>
diff --git a/sflphone-common/doc/dbus-api/spec/generic-types.xml b/sflphone-common/doc/dbus-api/spec/generic-types.xml
new file mode 100644
index 0000000000000000000000000000000000000000..d4dce1552dcaaf6fa37f61ffd499dfcb03ea49e8
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/spec/generic-types.xml
@@ -0,0 +1,168 @@
+<tp:generic-types
+  xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+
+  <tp:simple-type name="Unix_Timestamp" type="u">
+    <tp:docstring>An unsigned 32-bit integer representing time as the number
+      of seconds elapsed since the Unix epoch
+      (1970-01-01T00:00:00Z)</tp:docstring>
+  </tp:simple-type>
+
+  <tp:simple-type name="Unix_Timestamp64" type="x">
+    <tp:docstring>An signed 64-bit integer representing time as the number
+      of seconds elapsed since the Unix epoch
+      (1970-01-01T00:00:00Z); negative for times before the epoch</tp:docstring>
+
+    <tp:rationale>The Text interface is the only user of Unix_Timestamp so
+      far, and we'd like to be Y2038 compatible in future
+      interfaces.</tp:rationale>
+  </tp:simple-type>
+
+  <tp:simple-type name="DBus_Bus_Name" type="s"
+    array-name="DBus_Bus_Name_List">
+    <tp:docstring>A string representing a D-Bus bus name - either a well-known
+      name like "org.freedesktop.Telepathy.MissionControl" or a unique name
+      like ":1.123"</tp:docstring>
+  </tp:simple-type>
+
+  <tp:simple-type name="DBus_Well_Known_Name" type="s"
+    array-name="DBus_Well_Known_Name_List">
+    <tp:docstring>A string representing a D-Bus well-known
+      name like "org.freedesktop.Telepathy.MissionControl".</tp:docstring>
+  </tp:simple-type>
+
+  <tp:simple-type name="DBus_Unique_Name" type="s"
+    array-name="DBus_Unique_Name_List">
+    <tp:docstring>A string representing a D-Bus unique name, such as
+      ":1.123"</tp:docstring>
+  </tp:simple-type>
+
+  <tp:simple-type name="DBus_Interface" type="s"
+    array-name="DBus_Interface_List">
+    <tp:docstring>An ASCII string representing a D-Bus interface - two or more
+      elements separated by dots, where each element is a non-empty
+      string of ASCII letters, digits and underscores, not starting with
+      a digit. The maximum total length is 255 characters. For example,
+      "org.freedesktop.DBus.Peer".</tp:docstring>
+  </tp:simple-type>
+
+  <tp:simple-type name="DBus_Error_Name" type="s">
+    <tp:docstring>An ASCII string representing a D-Bus error. This is
+      syntactically the same as a <tp:type>DBus_Interface</tp:type>, but the
+      meaning is different.</tp:docstring>
+  </tp:simple-type>
+
+  <tp:simple-type name="DBus_Signature" type="s">
+    <tp:docstring>A string representing a D-Bus signature
+      (the 'g' type isn't used because of poor interoperability, particularly
+      with dbus-glib)</tp:docstring>
+  </tp:simple-type>
+
+  <tp:simple-type name="DBus_Member" type="s">
+    <tp:docstring>An ASCII string representing a D-Bus method, signal
+      or property name - a non-empty string of ASCII letters, digits and
+      underscores, not starting with a digit, with a maximum length of 255
+      characters. For example, "Ping".</tp:docstring>
+  </tp:simple-type>
+
+  <tp:simple-type name="DBus_Qualified_Member" type="s"
+    array-name="DBus_Qualified_Member_List">
+    <tp:docstring>A string representing the full name of a D-Bus method,
+      signal or property, consisting of a DBus_Interface, followed by
+      a dot, followed by a DBus_Member. For example,
+      "org.freedesktop.DBus.Peer.Ping".</tp:docstring>
+  </tp:simple-type>
+
+  <tp:mapping name="Qualified_Property_Value_Map"
+    array-name="Qualified_Property_Value_Map_List">
+    <tp:docstring>A mapping from strings representing D-Bus
+      properties (by their namespaced names) to their values.</tp:docstring>
+    <tp:member type="s" name="Key" tp:type="DBus_Qualified_Member">
+      <tp:docstring>
+        A D-Bus interface name, followed by a dot and a D-Bus property name.
+      </tp:docstring>
+    </tp:member>
+    <tp:member type="v" name="Value">
+      <tp:docstring>
+        The value of the property.
+      </tp:docstring>
+    </tp:member>
+  </tp:mapping>
+
+  <tp:mapping name="String_Variant_Map" array-name="String_Variant_Map_List">
+    <tp:docstring>A mapping from strings to variants representing extra
+      key-value pairs.</tp:docstring>
+    <tp:member type="s" name="Key"/>
+    <tp:member type="v" name="Value"/>
+  </tp:mapping>
+
+  <tp:mapping name="String_String_Map" array-name="String_String_Map_List">
+    <tp:docstring>A mapping from strings to strings representing extra
+      key-value pairs.</tp:docstring>
+    <tp:member type="s" name="Key"/>
+    <tp:member type="s" name="Value"/>
+  </tp:mapping>
+
+  <tp:struct name="Socket_Address_IP" array-name="Socket_Address_IP_List">
+    <tp:docstring>An IP address and port.</tp:docstring>
+    <tp:member type="s" name="Address">
+      <tp:docstring>Either a dotted-quad IPv4 address literal as for
+        <tp:type>Socket_Address_IPv4</tp:type>, or an RFC2373 IPv6 address
+        as for <tp:type>Socket_Address_IPv6</tp:type>.
+      </tp:docstring>
+    </tp:member>
+    <tp:member type="q" name="Port">
+      <tp:docstring>The TCP or UDP port number.</tp:docstring>
+    </tp:member>
+  </tp:struct>
+
+  <tp:struct name="Socket_Address_IPv4">
+    <tp:docstring>An IPv4 address and port.</tp:docstring>
+    <tp:member type="s" name="Address">
+      <tp:docstring>A dotted-quad IPv4 address literal: four ASCII decimal
+        numbers, each between 0 and 255 inclusive, e.g.
+        "192.168.0.1".</tp:docstring>
+    </tp:member>
+    <tp:member type="q" name="Port">
+      <tp:docstring>The TCP or UDP port number.</tp:docstring>
+    </tp:member>
+  </tp:struct>
+
+  <tp:struct name="Socket_Address_IPv6">
+    <tp:docstring>An IPv6 address and port.</tp:docstring>
+    <tp:member type="s" name="Address">
+      <tp:docstring>An IPv6 address literal as specified by RFC2373
+        section 2.2, e.g. "2001:DB8::8:800:200C:4171".</tp:docstring>
+    </tp:member>
+    <tp:member type="q" name="Port">
+      <tp:docstring>The TCP or UDP port number.</tp:docstring>
+    </tp:member>
+  </tp:struct>
+
+  <tp:struct name="Socket_Netmask_IPv4">
+    <tp:docstring>An IPv4 network or subnet.</tp:docstring>
+    <tp:member type="s" name="Address">
+      <tp:docstring>A dotted-quad IPv4 address literal: four ASCII decimal
+        numbers, each between 0 and 255 inclusive, e.g.
+        "192.168.0.1".</tp:docstring>
+    </tp:member>
+    <tp:member type="y" name="Prefix_Length">
+      <tp:docstring>The number of leading bits of the address that must
+        match, for this netmask to be considered to match an
+        address.</tp:docstring>
+    </tp:member>
+  </tp:struct>
+
+  <tp:struct name="Socket_Netmask_IPv6">
+    <tp:docstring>An IPv6 network or subnet.</tp:docstring>
+    <tp:member type="s" name="Address">
+      <tp:docstring>An IPv6 address literal as specified by RFC2373
+        section 2.2, e.g. "2001:DB8::8:800:200C:4171".</tp:docstring>
+    </tp:member>
+    <tp:member type="y" name="Prefix_Length">
+      <tp:docstring>The number of leading bits of the address that must
+        match, for this netmask to be considered to match an
+        address.</tp:docstring>
+    </tp:member>
+  </tp:struct>
+
+</tp:generic-types>
diff --git a/sflphone-common/doc/dbus-api/spec/instance-introspec.xml b/sflphone-common/doc/dbus-api/spec/instance-introspec.xml
new file mode 120000
index 0000000000000000000000000000000000000000..2e02dfe7239982ae1df5ef975ddacafb9897839a
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/spec/instance-introspec.xml
@@ -0,0 +1 @@
+../../../src/dbus/instance-introspec.xml
\ No newline at end of file
diff --git a/sflphone-common/doc/dbus-api/tools/devhelp.xsl b/sflphone-common/doc/dbus-api/tools/devhelp.xsl
new file mode 100644
index 0000000000000000000000000000000000000000..60f9e1c5304f68e8db9c6cb0cefc7db78d04398d
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/tools/devhelp.xsl
@@ -0,0 +1,91 @@
+<!-- Generate a Devhelp index from the Telepathy specification.
+The master copy of this stylesheet is in the Telepathy spec repository -
+please make any changes there.
+
+Copyright (C) 2006-2008 Collabora Limited
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+-->
+
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+  <xsl:template match="/">
+    <book xmlns="http://www.devhelp.net/book" title="Telepathy Specification"
+        name="telepathy-spec" link="spec.html">
+      <xsl:text>&#x000a;</xsl:text>
+      <chapters>
+        <xsl:text>&#x000a;</xsl:text>
+        <xsl:apply-templates select="//interface" />
+      </chapters>
+      <xsl:text>&#x000a;</xsl:text>
+      <functions>
+        <xsl:text>&#x000a;</xsl:text>
+        <xsl:apply-templates select="//method" />
+        <xsl:apply-templates select="//signal" />
+        <xsl:apply-templates select="//property" />
+        <xsl:apply-templates select="//tp:enum" />
+        <xsl:apply-templates select="//tp:simple-type" />
+        <xsl:apply-templates select="//tp:mapping" />
+        <xsl:apply-templates select="//tp:flags" />
+        <xsl:apply-templates select="//tp:struct" />
+      </functions>
+      <xsl:text>&#x000a;</xsl:text>
+    </book>
+  </xsl:template>
+
+  <xsl:template match="interface">
+    <xsl:text>  </xsl:text>
+    <sub xmlns="http://www.devhelp.net/book" name="{@name}"
+      link="{concat('spec.html#', @name)}" />
+    <xsl:text>&#x000a;</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="method">
+    <xsl:text>  </xsl:text>
+    <keyword type="function" xmlns="http://www.devhelp.net/book" name="{@name}"
+      link="spec.html#{../@name}.{@name}" />
+    <xsl:text>&#x000a;</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="signal | property">
+    <xsl:text>  </xsl:text>
+    <keyword type="" xmlns="http://www.devhelp.net/book" name="{@name}"
+      link="spec.html#{../@name}.{@name}" />
+    <xsl:text>&#x000a;</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="tp:simple-type">
+    <xsl:text>  </xsl:text>
+    <keyword type="typedef" xmlns="http://www.devhelp.net/book" name="{@name}"
+      link="spec.html#type-{@name}" />
+    <xsl:text>&#x000a;</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="tp:enum | tp:flags">
+    <xsl:text>  </xsl:text>
+    <keyword type="enum" xmlns="http://www.devhelp.net/book" name="{@name}"
+      link="spec.html#type-{@name}" />
+    <xsl:text>&#x000a;</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="tp:mapping | tp:struct">
+    <xsl:text>  </xsl:text>
+    <keyword type="struct" xmlns="http://www.devhelp.net/book" name="{@name}"
+      link="spec.html#type-{@name}" />
+    <xsl:text>&#x000a;</xsl:text>
+  </xsl:template>
+
+</xsl:stylesheet>
diff --git a/sflphone-common/doc/dbus-api/tools/doc-generator.py b/sflphone-common/doc/dbus-api/tools/doc-generator.py
new file mode 100755
index 0000000000000000000000000000000000000000..5fc19ce907435806cabd31baa75b05f0a9b76d82
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/tools/doc-generator.py
@@ -0,0 +1,104 @@
+#!/usr/bin/env python
+#
+# doc-generator.py
+#
+# Generates HTML documentation from the parsed spec using Cheetah templates.
+#
+# Copyright (C) 2009 Collabora Ltd.
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at
+# your option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+# for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Authors: Davyd Madeley <davyd.madeley@collabora.co.uk>
+#
+
+import sys
+import os
+import os.path
+import shutil
+
+try:
+    from Cheetah.Template import Template
+except ImportError, e:
+    print >> sys.stderr, e
+    print >> sys.stderr, "Install `python-cheetah'?"
+    sys.exit(-1)
+
+import specparser
+
+program, spec_file, output_path, project, namespace = sys.argv
+
+template_path = os.path.join(os.path.dirname(program), '../doc/templates')
+
+# make the output path
+try:
+    os.mkdir(output_path)
+except OSError:
+    pass
+# copy in the CSS
+shutil.copy(os.path.join(template_path, 'style.css'), output_path)
+
+def load_template(filename):
+    try:
+        file = open(os.path.join(template_path, filename))
+        template_def = file.read()
+        file.close()
+    except IOError, e:
+        print >> sys.stderr, "Could not load template file `%s'" % filename
+        print >> sys.stderr, e
+        sys.exit(-1)
+
+    return template_def
+
+spec = specparser.parse(spec_file, namespace)
+
+# write out HTML files for each of the interfaces
+
+# Not using render_template here to avoid recompiling it n times.
+namespace = {}
+template_def = load_template('interface.html')
+t = Template(template_def, namespaces = [namespace])
+for interface in spec.interfaces:
+    namespace['interface'] = interface
+
+    # open the output file
+    out = open(os.path.join(output_path, '%s.html' % interface.name), 'w')
+    print >> out, unicode(t).encode('utf-8')
+    out.close()
+
+def render_template(name, namespaces, target=None):
+    if target is None:
+        target = name
+
+    namespace = { 'spec': spec }
+    template_def = load_template(name)
+    t = Template(template_def, namespaces=namespaces)
+    out = open(os.path.join(output_path, target), 'w')
+    print >> out, unicode(t).encode('utf-8')
+    out.close()
+
+namespaces = { 'spec': spec }
+
+render_template('generic-types.html', namespaces)
+render_template('errors.html', namespaces)
+render_template('interfaces.html', namespaces)
+render_template('fullindex.html', namespaces)
+
+dh_namespaces = { 'spec': spec, 'name': project }
+render_template('devhelp.devhelp2', dh_namespaces,
+    target=('%s.devhelp2' % project))
+
+# write out the TOC last, because this is the file used as the target in the
+# Makefile.
+render_template('index.html', namespaces)
diff --git a/sflphone-common/doc/dbus-api/tools/doc-generator.xsl b/sflphone-common/doc/dbus-api/tools/doc-generator.xsl
new file mode 100644
index 0000000000000000000000000000000000000000..fe9cd9f08d193606f37f41259cb75601b431602f
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/tools/doc-generator.xsl
@@ -0,0 +1,1266 @@
+<!-- Generate HTML documentation from the Telepathy specification.
+The master copy of this stylesheet is in the Telepathy spec repository -
+please make any changes there.
+
+Copyright (C) 2006-2008 Collabora Limited
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
+  xmlns:html="http://www.w3.org/1999/xhtml"
+  exclude-result-prefixes="tp html">
+  <!--Don't move the declaration of the HTML namespace up here — XMLNSs
+  don't work ideally in the presence of two things that want to use the
+  absence of a prefix, sadly. -->
+
+  <xsl:param name="allow-undefined-interfaces" select="false()"/>
+
+  <xsl:template match="html:* | @*" mode="html">
+    <xsl:copy>
+      <xsl:apply-templates mode="html" select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+
+  <xsl:template match="tp:type" mode="html">
+    <xsl:call-template name="tp-type">
+      <xsl:with-param name="tp-type" select="string(.)"/>
+    </xsl:call-template>
+  </xsl:template>
+
+  <!-- tp:dbus-ref: reference a D-Bus interface, signal, method or property -->
+  <xsl:template match="tp:dbus-ref" mode="html">
+    <xsl:variable name="name">
+      <xsl:choose>
+        <xsl:when test="@namespace">
+          <xsl:value-of select="@namespace"/>
+          <xsl:text>.</xsl:text>
+        </xsl:when>
+      </xsl:choose>
+      <xsl:value-of select="string(.)"/>
+    </xsl:variable>
+
+    <xsl:choose>
+      <xsl:when test="//interface[@name=$name]
+        or //interface/method[concat(../@name, '.', @name)=$name]
+        or //interface/signal[concat(../@name, '.', @name)=$name]
+        or //interface/property[concat(../@name, '.', @name)=$name]
+        or //interface[@name=concat($name, '.DRAFT')]
+        or //interface/method[
+          concat(../@name, '.', @name)=concat($name, '.DRAFT')]
+        or //interface/signal[
+          concat(../@name, '.', @name)=concat($name, '.DRAFT')]
+        or //interface/property[
+          concat(../@name, '.', @name)=concat($name, '.DRAFT')]
+        ">
+        <a xmlns="http://www.w3.org/1999/xhtml" href="#{$name}">
+          <xsl:value-of select="string(.)"/>
+        </a>
+      </xsl:when>
+
+      <xsl:when test="$allow-undefined-interfaces">
+        <span xmlns="http://www.w3.org/1999/xhtml" title="defined elsewhere">
+          <xsl:value-of select="string(.)"/>
+        </span>
+      </xsl:when>
+
+      <xsl:otherwise>
+        <xsl:message terminate="yes">
+          <xsl:text>ERR: cannot find D-Bus interface, method, </xsl:text>
+          <xsl:text>signal or property called '</xsl:text>
+          <xsl:value-of select="$name"/>
+          <xsl:text>'&#10;</xsl:text>
+        </xsl:message>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!-- tp:member-ref: reference a property of the current interface -->
+  <xsl:template match="tp:member-ref" mode="html">
+    <xsl:variable name="prefix" select="concat(ancestor::interface/@name,
+      '.')"/>
+    <xsl:variable name="name" select="string(.)"/>
+
+    <xsl:if test="not(ancestor::interface)">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: Cannot use tp:member-ref when not in an</xsl:text>
+        <xsl:text> &lt;interface&gt;&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+
+    <xsl:choose>
+      <xsl:when test="ancestor::interface/signal[@name=$name]"/>
+      <xsl:when test="ancestor::interface/method[@name=$name]"/>
+      <xsl:when test="ancestor::interface/property[@name=$name]"/>
+      <xsl:otherwise>
+        <xsl:message terminate="yes">
+          <xsl:text>ERR: interface </xsl:text>
+          <xsl:value-of select="ancestor::interface/@name"/>
+          <xsl:text> has no signal/method/property called </xsl:text>
+          <xsl:value-of select="$name"/>
+          <xsl:text>&#10;</xsl:text>
+        </xsl:message>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <a xmlns="http://www.w3.org/1999/xhtml" href="#{$prefix}{$name}">
+      <xsl:value-of select="$name"/>
+    </a>
+  </xsl:template>
+
+  <xsl:template match="*" mode="identity">
+    <xsl:copy>
+      <xsl:apply-templates mode="identity"/>
+    </xsl:copy>
+  </xsl:template>
+
+  <xsl:template match="tp:docstring">
+    <xsl:apply-templates mode="html"/>
+  </xsl:template>
+
+  <xsl:template match="tp:added">
+    <p class="added" xmlns="http://www.w3.org/1999/xhtml">Added in
+      version <xsl:value-of select="@version"/>.
+      <xsl:apply-templates select="node()" mode="html"/></p>
+  </xsl:template>
+
+  <xsl:template match="tp:changed">
+    <xsl:choose>
+      <xsl:when test="node()">
+        <p class="changed" xmlns="http://www.w3.org/1999/xhtml">Changed in
+          version <xsl:value-of select="@version"/>:
+          <xsl:apply-templates select="node()" mode="html"/></p>
+      </xsl:when>
+      <xsl:otherwise>
+        <p class="changed">Changed in version
+          <xsl:value-of select="@version"/></p>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="tp:deprecated">
+    <p class="deprecated" xmlns="http://www.w3.org/1999/xhtml">Deprecated
+      since version <xsl:value-of select="@version"/>.
+      <xsl:apply-templates select="node()" mode="html"/></p>
+  </xsl:template>
+
+  <xsl:template match="tp:rationale" mode="html">
+    <div xmlns="http://www.w3.org/1999/xhtml" class="rationale">
+      <xsl:apply-templates select="node()" mode="html"/>
+    </div>
+  </xsl:template>
+
+  <xsl:template match="tp:errors">
+    <h1 xmlns="http://www.w3.org/1999/xhtml">Errors</h1>
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="tp:generic-types">
+    <h1 xmlns="http://www.w3.org/1999/xhtml">Generic types</h1>
+    <xsl:call-template name="do-types"/>
+  </xsl:template>
+
+  <xsl:template name="do-types">
+    <xsl:if test="tp:simple-type">
+      <h2 xmlns="http://www.w3.org/1999/xhtml">Simple types</h2>
+      <xsl:apply-templates select="tp:simple-type"/>
+    </xsl:if>
+
+    <xsl:if test="tp:enum">
+      <h2 xmlns="http://www.w3.org/1999/xhtml">Enumerated types:</h2>
+      <xsl:apply-templates select="tp:enum"/>
+    </xsl:if>
+
+    <xsl:if test="tp:flags">
+      <h2 xmlns="http://www.w3.org/1999/xhtml">Sets of flags:</h2>
+      <xsl:apply-templates select="tp:flags"/>
+    </xsl:if>
+
+    <xsl:if test="tp:struct">
+      <h2 xmlns="http://www.w3.org/1999/xhtml">Structure types</h2>
+      <xsl:apply-templates select="tp:struct"/>
+    </xsl:if>
+
+    <xsl:if test="tp:mapping">
+      <h2 xmlns="http://www.w3.org/1999/xhtml">Mapping types</h2>
+      <xsl:apply-templates select="tp:mapping"/>
+    </xsl:if>
+
+    <xsl:if test="tp:external-type">
+      <h2 xmlns="http://www.w3.org/1999/xhtml">Types defined elsewhere</h2>
+      <dl><xsl:apply-templates select="tp:external-type"/></dl>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="tp:error">
+    <h2 xmlns="http://www.w3.org/1999/xhtml"><a name="{concat(../@namespace, '.', translate(@name, ' ', ''))}"></a><xsl:value-of select="concat(../@namespace, '.', translate(@name, ' ', ''))"/></h2>
+    <xsl:apply-templates select="tp:docstring"/>
+    <xsl:apply-templates select="tp:added"/>
+    <xsl:apply-templates select="tp:changed"/>
+    <xsl:apply-templates select="tp:deprecated"/>
+  </xsl:template>
+
+  <xsl:template match="/tp:spec/tp:copyright">
+    <div xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:apply-templates mode="text"/>
+    </div>
+  </xsl:template>
+  <xsl:template match="/tp:spec/tp:license">
+    <div xmlns="http://www.w3.org/1999/xhtml" class="license">
+      <xsl:apply-templates mode="html"/>
+    </div>
+  </xsl:template>
+
+  <xsl:template match="tp:copyright"/>
+  <xsl:template match="tp:license"/>
+
+  <xsl:template match="interface">
+    <h1 xmlns="http://www.w3.org/1999/xhtml"><a name="{@name}"></a><xsl:value-of select="@name"/></h1>
+
+    <xsl:if test="@tp:causes-havoc">
+      <p xmlns="http://www.w3.org/1999/xhtml" class="causes-havoc">
+        This interface is <xsl:value-of select="@tp:causes-havoc"/>
+        and is likely to cause havoc to your API/ABI if bindings are generated.
+        Don't include it in libraries that care about compatibility.
+      </p>
+    </xsl:if>
+
+    <xsl:if test="tp:requires">
+      <p>Implementations of this interface must also implement:</p>
+      <ul xmlns="http://www.w3.org/1999/xhtml">
+        <xsl:for-each select="tp:requires">
+          <li><code><a href="#{@interface}"><xsl:value-of select="@interface"/></a></code></li>
+        </xsl:for-each>
+      </ul>
+    </xsl:if>
+
+    <xsl:apply-templates select="tp:docstring" />
+    <xsl:apply-templates select="tp:added"/>
+    <xsl:apply-templates select="tp:changed"/>
+    <xsl:apply-templates select="tp:deprecated"/>
+
+    <xsl:choose>
+      <xsl:when test="method">
+        <h2 xmlns="http://www.w3.org/1999/xhtml">Methods:</h2>
+        <xsl:apply-templates select="method"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <p xmlns="http://www.w3.org/1999/xhtml">Interface has no methods.</p>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:choose>
+      <xsl:when test="signal">
+        <h2 xmlns="http://www.w3.org/1999/xhtml">Signals:</h2>
+        <xsl:apply-templates select="signal"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <p xmlns="http://www.w3.org/1999/xhtml">Interface has no signals.</p>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:choose>
+      <xsl:when test="tp:property">
+        <h2 xmlns="http://www.w3.org/1999/xhtml">Telepathy Properties:</h2>
+        <p xmlns="http://www.w3.org/1999/xhtml">Accessed using the
+          <a href="#org.freedesktop.Telepathy.Properties">Telepathy
+            Properties</a> interface.</p>
+        <dl xmlns="http://www.w3.org/1999/xhtml">
+          <xsl:apply-templates select="tp:property"/>
+        </dl>
+      </xsl:when>
+      <xsl:otherwise>
+        <p xmlns="http://www.w3.org/1999/xhtml">Interface has no Telepathy
+          properties.</p>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:choose>
+      <xsl:when test="property">
+        <h2 xmlns="http://www.w3.org/1999/xhtml">D-Bus core Properties:</h2>
+        <p xmlns="http://www.w3.org/1999/xhtml">Accessed using the
+          org.freedesktop.DBus.Properties interface.</p>
+        <dl xmlns="http://www.w3.org/1999/xhtml">
+          <xsl:apply-templates select="property"/>
+        </dl>
+      </xsl:when>
+      <xsl:otherwise>
+        <p xmlns="http://www.w3.org/1999/xhtml">Interface has no D-Bus core
+          properties.</p>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:call-template name="do-types"/>
+
+  </xsl:template>
+
+  <xsl:template match="tp:flags">
+
+    <xsl:if test="not(@name) or @name = ''">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: missing @name on a tp:flags type&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+
+    <xsl:if test="not(@type) or @type = ''">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: missing @type on tp:flags type</xsl:text>
+        <xsl:value-of select="@name"/>
+        <xsl:text>&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+
+    <h3>
+      <a name="type-{@name}">
+        <xsl:value-of select="@name"/>
+      </a>
+    </h3>
+    <xsl:apply-templates select="tp:docstring" />
+    <xsl:apply-templates select="tp:added"/>
+    <xsl:apply-templates select="tp:changed"/>
+    <xsl:apply-templates select="tp:deprecated"/>
+    <dl xmlns="http://www.w3.org/1999/xhtml">
+        <xsl:variable name="value-prefix">
+          <xsl:choose>
+            <xsl:when test="@value-prefix">
+              <xsl:value-of select="@value-prefix"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="@name"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:variable>
+      <xsl:for-each select="tp:flag">
+        <dt xmlns="http://www.w3.org/1999/xhtml"><code><xsl:value-of select="concat($value-prefix, '_', @suffix)"/> = <xsl:value-of select="@value"/></code></dt>
+        <xsl:choose>
+          <xsl:when test="tp:docstring">
+            <dd xmlns="http://www.w3.org/1999/xhtml">
+              <xsl:apply-templates select="tp:docstring" />
+              <xsl:apply-templates select="tp:added"/>
+              <xsl:apply-templates select="tp:changed"/>
+              <xsl:apply-templates select="tp:deprecated"/>
+            </dd>
+          </xsl:when>
+          <xsl:otherwise>
+            <dd xmlns="http://www.w3.org/1999/xhtml">(Undocumented)</dd>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:for-each>
+    </dl>
+  </xsl:template>
+
+  <xsl:template match="tp:enum">
+
+    <xsl:if test="not(@name) or @name = ''">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: missing @name on a tp:enum type&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+
+    <xsl:if test="not(@type) or @type = ''">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: missing @type on tp:enum type</xsl:text>
+        <xsl:value-of select="@name"/>
+        <xsl:text>&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+
+    <h3 xmlns="http://www.w3.org/1999/xhtml">
+      <a name="type-{@name}">
+        <xsl:value-of select="@name"/>
+      </a>
+    </h3>
+    <xsl:apply-templates select="tp:docstring" />
+    <xsl:apply-templates select="tp:added"/>
+    <xsl:apply-templates select="tp:changed"/>
+    <xsl:apply-templates select="tp:deprecated"/>
+    <dl xmlns="http://www.w3.org/1999/xhtml">
+        <xsl:variable name="value-prefix">
+          <xsl:choose>
+            <xsl:when test="@value-prefix">
+              <xsl:value-of select="@value-prefix"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="@name"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:variable>
+      <xsl:for-each select="tp:enumvalue">
+        <dt xmlns="http://www.w3.org/1999/xhtml"><code><xsl:value-of select="concat($value-prefix, '_', @suffix)"/> = <xsl:value-of select="@value"/></code></dt>
+        <xsl:choose>
+          <xsl:when test="tp:docstring">
+            <dd xmlns="http://www.w3.org/1999/xhtml">
+              <xsl:apply-templates select="tp:docstring" />
+              <xsl:apply-templates select="tp:added"/>
+              <xsl:apply-templates select="tp:changed"/>
+              <xsl:apply-templates select="tp:deprecated"/>
+            </dd>
+          </xsl:when>
+          <xsl:otherwise>
+            <dd xmlns="http://www.w3.org/1999/xhtml">(Undocumented)</dd>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:for-each>
+    </dl>
+  </xsl:template>
+
+  <xsl:template name="binding-name-check">
+    <xsl:if test="not(@tp:name-for-bindings)">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: Binding name missing from </xsl:text>
+        <xsl:value-of select="parent::interface/@name"/>
+        <xsl:text>.</xsl:text>
+        <xsl:value-of select="@name"/>
+        <xsl:text>&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+
+    <xsl:if test="translate(@tp:name-for-bindings, '_', '') != @name">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: Binding name </xsl:text>
+        <xsl:value-of select="@tp:name-for-bindings"/>
+        <xsl:text> doesn't correspond to D-Bus name </xsl:text>
+        <xsl:value-of select="@name"/>
+        <xsl:text>&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="property">
+
+    <xsl:call-template name="binding-name-check"/>
+
+    <xsl:if test="not(parent::interface)">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: property </xsl:text>
+        <xsl:value-of select="@name"/>
+        <xsl:text> does not have an interface as parent&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+
+    <xsl:if test="not(@name) or @name = ''">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: missing @name on a property of </xsl:text>
+        <xsl:value-of select="../@name"/>
+        <xsl:text>&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+
+    <xsl:if test="not(@type) or @type = ''">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: missing @type on property </xsl:text>
+        <xsl:value-of select="concat(../@name, '.', @name)"/>
+        <xsl:text>: '</xsl:text>
+        <xsl:value-of select="@access"/>
+        <xsl:text>'&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+
+    <dt xmlns="http://www.w3.org/1999/xhtml">
+      <a name="{concat(../@name, '.', @name)}">
+        <code><xsl:value-of select="@name"/></code>
+      </a>
+      <xsl:text> − </xsl:text>
+      <code><xsl:value-of select="@type"/></code>
+      <xsl:call-template name="parenthesized-tp-type"/>
+      <xsl:text>, </xsl:text>
+      <xsl:choose>
+        <xsl:when test="@access = 'read'">
+          <xsl:text>read-only</xsl:text>
+        </xsl:when>
+        <xsl:when test="@access = 'write'">
+          <xsl:text>write-only</xsl:text>
+        </xsl:when>
+        <xsl:when test="@access = 'readwrite'">
+          <xsl:text>read/write</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message terminate="yes">
+            <xsl:text>ERR: unknown or missing value for </xsl:text>
+            <xsl:text>@access on property </xsl:text>
+            <xsl:value-of select="concat(../@name, '.', @name)"/>
+            <xsl:text>: '</xsl:text>
+            <xsl:value-of select="@access"/>
+            <xsl:text>'&#10;</xsl:text>
+          </xsl:message>
+        </xsl:otherwise>
+      </xsl:choose>
+    </dt>
+    <dd xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:apply-templates select="tp:docstring"/>
+      <xsl:apply-templates select="tp:added"/>
+      <xsl:apply-templates select="tp:changed"/>
+      <xsl:apply-templates select="tp:deprecated"/>
+    </dd>
+  </xsl:template>
+
+  <xsl:template match="tp:property">
+    <dt xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:if test="@name">
+        <code><xsl:value-of select="@name"/></code> −
+      </xsl:if>
+      <code><xsl:value-of select="@type"/></code>
+    </dt>
+    <dd xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:apply-templates select="tp:docstring"/>
+      <xsl:apply-templates select="tp:added"/>
+      <xsl:apply-templates select="tp:changed"/>
+      <xsl:apply-templates select="tp:deprecated"/>
+    </dd>
+  </xsl:template>
+
+  <xsl:template match="tp:mapping">
+    <div xmlns="http://www.w3.org/1999/xhtml" class="struct">
+      <h3>
+        <a name="type-{@name}">
+          <xsl:value-of select="@name"/>
+        </a> − a{
+        <xsl:for-each select="tp:member">
+          <xsl:value-of select="@type"/>
+          <xsl:text>: </xsl:text>
+          <xsl:value-of select="@name"/>
+          <xsl:if test="position() != last()"> &#x2192; </xsl:if>
+        </xsl:for-each>
+        }
+      </h3>
+      <div class="docstring">
+        <xsl:apply-templates select="tp:docstring"/>
+        <xsl:if test="string(@array-name) != ''">
+          <p>In bindings that need a separate name, arrays of
+            <xsl:value-of select="@name"/> should be called
+            <xsl:value-of select="@array-name"/>.</p>
+        </xsl:if>
+      </div>
+      <div>
+        <h4>Members</h4>
+        <dl>
+          <xsl:apply-templates select="tp:member" mode="members-in-docstring"/>
+        </dl>
+      </div>
+    </div>
+  </xsl:template>
+
+  <xsl:template match="tp:docstring" mode="in-index"/>
+
+  <xsl:template match="tp:simple-type | tp:enum | tp:flags | tp:external-type"
+    mode="in-index">
+    − <xsl:value-of select="@type"/>
+  </xsl:template>
+
+  <xsl:template match="tp:simple-type">
+
+    <xsl:if test="not(@name) or @name = ''">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: missing @name on a tp:simple-type&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+
+    <xsl:if test="not(@type) or @type = ''">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: missing @type on tp:simple-type</xsl:text>
+        <xsl:value-of select="@name"/>
+        <xsl:text>&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+
+    <div xmlns="http://www.w3.org/1999/xhtml" class="simple-type">
+      <h3>
+        <a name="type-{@name}">
+          <xsl:value-of select="@name"/>
+        </a> − <xsl:value-of select="@type"/>
+      </h3>
+      <div class="docstring">
+        <xsl:apply-templates select="tp:docstring"/>
+        <xsl:apply-templates select="tp:added"/>
+        <xsl:apply-templates select="tp:changed"/>
+        <xsl:apply-templates select="tp:deprecated"/>
+      </div>
+    </div>
+  </xsl:template>
+
+  <xsl:template match="tp:external-type">
+
+    <xsl:if test="not(@name) or @name = ''">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: missing @name on a tp:external-type&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+
+    <xsl:if test="not(@type) or @type = ''">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: missing @type on tp:external-type</xsl:text>
+        <xsl:value-of select="@name"/>
+        <xsl:text>&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+
+    <div xmlns="http://www.w3.org/1999/xhtml" class="external-type">
+      <dt>
+        <a name="type-{@name}">
+          <xsl:value-of select="@name"/>
+        </a> − <xsl:value-of select="@type"/>
+      </dt>
+      <dd>Defined by: <xsl:value-of select="@from"/></dd>
+    </div>
+  </xsl:template>
+
+  <xsl:template match="tp:struct" mode="in-index">
+    − ( <xsl:for-each select="tp:member">
+          <xsl:value-of select="@type"/>
+          <xsl:if test="position() != last()">, </xsl:if>
+        </xsl:for-each> )
+  </xsl:template>
+
+  <xsl:template match="tp:mapping" mode="in-index">
+    − a{ <xsl:for-each select="tp:member">
+          <xsl:value-of select="@type"/>
+          <xsl:if test="position() != last()"> &#x2192; </xsl:if>
+        </xsl:for-each> }
+  </xsl:template>
+
+  <xsl:template match="tp:struct">
+    <div xmlns="http://www.w3.org/1999/xhtml" class="struct">
+      <h3>
+        <a name="type-{@name}">
+          <xsl:value-of select="@name"/>
+        </a> − (
+        <xsl:for-each select="tp:member">
+          <xsl:value-of select="@type"/>
+          <xsl:text>: </xsl:text>
+          <xsl:value-of select="@name"/>
+          <xsl:if test="position() != last()">, </xsl:if>
+        </xsl:for-each>
+        )
+      </h3>
+      <div class="docstring">
+        <xsl:apply-templates select="tp:docstring"/>
+        <xsl:apply-templates select="tp:added"/>
+        <xsl:apply-templates select="tp:changed"/>
+        <xsl:apply-templates select="tp:deprecated"/>
+      </div>
+      <xsl:choose>
+        <xsl:when test="string(@array-name) != ''">
+          <p>In bindings that need a separate name, arrays of
+            <xsl:value-of select="@name"/> should be called
+            <xsl:value-of select="@array-name"/>.</p>
+        </xsl:when>
+        <xsl:otherwise>
+          <p>Arrays of <xsl:value-of select="@name"/> don't generally
+            make sense.</p>
+        </xsl:otherwise>
+      </xsl:choose>
+      <div>
+        <h4>Members</h4>
+        <dl>
+          <xsl:apply-templates select="tp:member" mode="members-in-docstring"/>
+        </dl>
+      </div>
+    </div>
+  </xsl:template>
+
+  <xsl:template match="method">
+
+    <xsl:call-template name="binding-name-check"/>
+
+    <xsl:if test="not(parent::interface)">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: method </xsl:text>
+        <xsl:value-of select="@name"/>
+        <xsl:text> does not have an interface as parent&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+
+    <xsl:if test="not(@name) or @name = ''">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: missing @name on a method of </xsl:text>
+        <xsl:value-of select="../@name"/>
+        <xsl:text>&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+
+    <xsl:for-each select="arg">
+      <xsl:if test="not(@type) or @type = ''">
+        <xsl:message terminate="yes">
+          <xsl:text>ERR: an arg of method </xsl:text>
+          <xsl:value-of select="concat(../../@name, '.', ../@name)"/>
+          <xsl:text> has no type</xsl:text>
+        </xsl:message>
+      </xsl:if>
+      <xsl:choose>
+        <xsl:when test="@direction='in'">
+          <xsl:if test="not(@name) or @name = ''">
+            <xsl:message terminate="yes">
+              <xsl:text>ERR: an 'in' arg of method </xsl:text>
+              <xsl:value-of select="concat(../../@name, '.', ../@name)"/>
+              <xsl:text> has no name</xsl:text>
+            </xsl:message>
+          </xsl:if>
+        </xsl:when>
+        <xsl:when test="@direction='out'">
+          <xsl:if test="not(@name) or @name = ''">
+            <xsl:message terminate="no">
+              <xsl:text>WARNING: an 'out' arg of method </xsl:text>
+              <xsl:value-of select="concat(../../@name, '.', ../@name)"/>
+              <xsl:text> has no name</xsl:text>
+            </xsl:message>
+          </xsl:if>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message terminate="yes">
+            <xsl:text>ERR: an arg of method </xsl:text>
+            <xsl:value-of select="concat(../../@name, '.', ../@name)"/>
+            <xsl:text> has direction neither 'in' nor 'out'</xsl:text>
+          </xsl:message>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:for-each>
+
+    <div xmlns="http://www.w3.org/1999/xhtml" class="method">
+      <h3 xmlns="http://www.w3.org/1999/xhtml">
+        <a name="{concat(../@name, concat('.', @name))}">
+          <xsl:value-of select="@name"/>
+        </a> (
+        <xsl:for-each xmlns="" select="arg[@direction='in']">
+          <xsl:value-of select="@type"/>: <xsl:value-of select="@name"/>
+          <xsl:if test="position() != last()">, </xsl:if>
+        </xsl:for-each>
+        ) &#x2192;
+        <xsl:choose>
+          <xsl:when test="arg[@direction='out']">
+            <xsl:for-each xmlns="" select="arg[@direction='out']">
+              <xsl:value-of select="@type"/>
+              <xsl:if test="position() != last()">, </xsl:if>
+            </xsl:for-each>
+          </xsl:when>
+          <xsl:otherwise>nothing</xsl:otherwise>
+        </xsl:choose>
+      </h3>
+      <div xmlns="http://www.w3.org/1999/xhtml" class="docstring">
+        <xsl:apply-templates select="tp:docstring" />
+        <xsl:apply-templates select="tp:added"/>
+        <xsl:apply-templates select="tp:changed"/>
+        <xsl:apply-templates select="tp:deprecated"/>
+      </div>
+
+      <xsl:if test="arg[@direction='in']">
+        <div xmlns="http://www.w3.org/1999/xhtml">
+          <h4>Parameters</h4>
+          <dl xmlns="http://www.w3.org/1999/xhtml">
+            <xsl:apply-templates select="arg[@direction='in']"
+              mode="parameters-in-docstring"/>
+          </dl>
+        </div>
+      </xsl:if>
+
+      <xsl:if test="arg[@direction='out']">
+        <div xmlns="http://www.w3.org/1999/xhtml">
+          <h4>Returns</h4>
+          <dl xmlns="http://www.w3.org/1999/xhtml">
+            <xsl:apply-templates select="arg[@direction='out']"
+              mode="returns-in-docstring"/>
+          </dl>
+        </div>
+      </xsl:if>
+
+      <xsl:if test="tp:possible-errors">
+        <div xmlns="http://www.w3.org/1999/xhtml">
+          <h4>Possible errors</h4>
+          <dl xmlns="http://www.w3.org/1999/xhtml">
+            <xsl:apply-templates select="tp:possible-errors/tp:error"/>
+          </dl>
+        </div>
+      </xsl:if>
+
+    </div>
+  </xsl:template>
+
+  <xsl:template name="tp-type">
+    <xsl:param name="tp-type"/>
+    <xsl:param name="type"/>
+
+    <xsl:variable name="single-type">
+      <xsl:choose>
+        <xsl:when test="contains($tp-type, '[]')">
+          <xsl:value-of select="substring-before($tp-type, '[]')"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$tp-type"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+
+    <xsl:variable name="type-of-single-tp-type">
+      <xsl:choose>
+        <xsl:when test="//tp:simple-type[@name=$single-type]">
+          <xsl:value-of select="string(//tp:simple-type[@name=$single-type]/@type)"/>
+        </xsl:when>
+        <xsl:when test="//tp:struct[@name=$single-type]">
+          <xsl:text>(</xsl:text>
+          <xsl:for-each select="//tp:struct[@name=$single-type]/tp:member">
+            <xsl:value-of select="@type"/>
+          </xsl:for-each>
+          <xsl:text>)</xsl:text>
+        </xsl:when>
+        <xsl:when test="//tp:enum[@name=$single-type]">
+          <xsl:value-of select="string(//tp:enum[@name=$single-type]/@type)"/>
+        </xsl:when>
+        <xsl:when test="//tp:flags[@name=$single-type]">
+          <xsl:value-of select="string(//tp:flags[@name=$single-type]/@type)"/>
+        </xsl:when>
+        <xsl:when test="//tp:mapping[@name=$single-type]">
+          <xsl:text>a{</xsl:text>
+          <xsl:for-each select="//tp:mapping[@name=$single-type]/tp:member">
+            <xsl:value-of select="@type"/>
+          </xsl:for-each>
+          <xsl:text>}</xsl:text>
+        </xsl:when>
+        <xsl:when test="//tp:external-type[@name=$single-type]">
+          <xsl:value-of select="string(//tp:external-type[@name=$single-type]/@type)"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message terminate="yes">
+            <xsl:text>ERR: Unable to find type '</xsl:text>
+            <xsl:value-of select="$tp-type"/>
+            <xsl:text>'&#10;</xsl:text>
+          </xsl:message>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+
+    <xsl:variable name="type-of-tp-type">
+      <xsl:if test="contains($tp-type, '[]')">
+        <!-- one 'a', plus one for each [ after the [], and delete all ] -->
+        <xsl:value-of select="concat('a',
+          translate(substring-after($tp-type, '[]'), '[]', 'a'))"/>
+      </xsl:if>
+      <xsl:value-of select="$type-of-single-tp-type"/>
+    </xsl:variable>
+
+    <xsl:if test="string($type) != '' and
+      string($type-of-tp-type) != string($type)">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: tp:type '</xsl:text>
+        <xsl:value-of select="$tp-type"/>
+        <xsl:text>' has D-Bus type '</xsl:text>
+        <xsl:value-of select="$type-of-tp-type"/>
+        <xsl:text>' but has been used with type='</xsl:text>
+        <xsl:value-of select="$type"/>
+        <xsl:text>'&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+
+    <xsl:if test="contains($tp-type, '[]')">
+      <xsl:call-template name="tp-type-array-usage-check">
+        <xsl:with-param name="single-type" select="$single-type"/>
+        <xsl:with-param name="type-of-single-tp-type"
+          select="$type-of-single-tp-type"/>
+      </xsl:call-template>
+    </xsl:if>
+
+    <a href="#type-{$single-type}"><xsl:value-of select="$tp-type"/></a>
+
+  </xsl:template>
+
+  <xsl:template name="tp-type-array-usage-check">
+    <xsl:param name="single-type"/>
+    <xsl:param name="type-of-single-tp-type"/>
+
+    <xsl:variable name="array-name">
+      <xsl:choose>
+        <xsl:when test="//tp:struct[@name=$single-type]">
+          <xsl:value-of select="//tp:struct[@name=$single-type]/@array-name"/>
+        </xsl:when>
+        <xsl:when test="//tp:mapping[@name=$single-type]">
+          <xsl:value-of select="//tp:mapping[@name=$single-type]/@array-name"/>
+        </xsl:when>
+        <xsl:when test="//tp:external-type[@name=$single-type]">
+          <xsl:value-of select="//tp:external-type[@name=$single-type]/@array-name"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="''"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+
+    <xsl:if test="not(contains('ybnqiuxtdsvog', $type-of-single-tp-type))">
+      <xsl:if test="not($array-name) or $array-name=''">
+        <xsl:message terminate="yes">
+          <xsl:text>No array-name specified for complex type </xsl:text>
+          <xsl:value-of select="$single-type"/>
+          <xsl:text>, but array used&#10;</xsl:text>
+        </xsl:message>
+      </xsl:if>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template name="parenthesized-tp-type">
+    <xsl:if test="@tp:type">
+      <xsl:text> (</xsl:text>
+      <xsl:call-template name="tp-type">
+        <xsl:with-param name="tp-type" select="@tp:type"/>
+        <xsl:with-param name="type" select="@type"/>
+      </xsl:call-template>
+      <xsl:text>)</xsl:text>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="tp:member" mode="members-in-docstring">
+    <dt xmlns="http://www.w3.org/1999/xhtml">
+      <code><xsl:value-of select="@name"/></code> −
+      <code><xsl:value-of select="@type"/></code>
+      <xsl:call-template name="parenthesized-tp-type"/>
+    </dt>
+    <dd xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:choose>
+        <xsl:when test="tp:docstring">
+          <xsl:apply-templates select="tp:docstring" />
+        </xsl:when>
+        <xsl:otherwise>
+          <em>(undocumented)</em>
+        </xsl:otherwise>
+      </xsl:choose>
+    </dd>
+  </xsl:template>
+
+  <xsl:template match="arg" mode="parameters-in-docstring">
+    <dt xmlns="http://www.w3.org/1999/xhtml">
+      <code><xsl:value-of select="@name"/></code> −
+      <code><xsl:value-of select="@type"/></code>
+      <xsl:call-template name="parenthesized-tp-type"/>
+    </dt>
+    <dd xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:apply-templates select="tp:docstring" />
+    </dd>
+  </xsl:template>
+
+  <xsl:template match="arg" mode="returns-in-docstring">
+    <dt xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:if test="@name">
+        <code><xsl:value-of select="@name"/></code> −
+      </xsl:if>
+      <code><xsl:value-of select="@type"/></code>
+      <xsl:call-template name="parenthesized-tp-type"/>
+    </dt>
+    <dd xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:apply-templates select="tp:docstring"/>
+    </dd>
+  </xsl:template>
+
+  <xsl:template match="tp:possible-errors/tp:error">
+    <dt xmlns="http://www.w3.org/1999/xhtml">
+      <code><xsl:value-of select="@name"/></code>
+    </dt>
+    <dd xmlns="http://www.w3.org/1999/xhtml">
+        <xsl:variable name="name" select="@name"/>
+        <xsl:choose>
+          <xsl:when test="tp:docstring">
+            <xsl:apply-templates select="tp:docstring"/>
+          </xsl:when>
+          <xsl:when test="//tp:errors/tp:error[concat(../@namespace, '.', translate(@name, ' ', ''))=$name]/tp:docstring">
+            <xsl:apply-templates select="//tp:errors/tp:error[concat(../@namespace, '.', translate(@name, ' ', ''))=$name]/tp:docstring"/> <em xmlns="http://www.w3.org/1999/xhtml">(generic description)</em>
+          </xsl:when>
+          <xsl:otherwise>
+            (Undocumented.)
+          </xsl:otherwise>
+        </xsl:choose>
+    </dd>
+  </xsl:template>
+
+  <xsl:template match="signal">
+
+    <xsl:call-template name="binding-name-check"/>
+
+    <xsl:if test="not(parent::interface)">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: signal </xsl:text>
+        <xsl:value-of select="@name"/>
+        <xsl:text> does not have an interface as parent&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+
+    <xsl:if test="not(@name) or @name = ''">
+      <xsl:message terminate="yes">
+        <xsl:text>ERR: missing @name on a signal of </xsl:text>
+        <xsl:value-of select="../@name"/>
+        <xsl:text>&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+
+    <xsl:for-each select="arg">
+      <xsl:if test="not(@type) or @type = ''">
+        <xsl:message terminate="yes">
+          <xsl:text>ERR: an arg of signal </xsl:text>
+          <xsl:value-of select="concat(../../@name, '.', ../@name)"/>
+          <xsl:text> has no type</xsl:text>
+        </xsl:message>
+      </xsl:if>
+      <xsl:if test="not(@name) or @name = ''">
+        <xsl:message terminate="yes">
+          <xsl:text>ERR: an arg of signal </xsl:text>
+          <xsl:value-of select="concat(../../@name, '.', ../@name)"/>
+          <xsl:text> has no name</xsl:text>
+        </xsl:message>
+      </xsl:if>
+      <xsl:choose>
+        <xsl:when test="not(@direction)"/>
+        <xsl:when test="@direction='in'">
+          <xsl:message terminate="no">
+            <xsl:text>INFO: an arg of signal </xsl:text>
+            <xsl:value-of select="concat(../../@name, '.', ../@name)"/>
+            <xsl:text> has unnecessary direction 'in'</xsl:text>
+          </xsl:message>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message terminate="yes">
+            <xsl:text>ERR: an arg of signal </xsl:text>
+            <xsl:value-of select="concat(../../@name, '.', ../@name)"/>
+            <xsl:text> has direction other than 'in'</xsl:text>
+          </xsl:message>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:for-each>
+
+    <div xmlns="http://www.w3.org/1999/xhtml" class="signal">
+      <h3 xmlns="http://www.w3.org/1999/xhtml">
+        <a name="{concat(../@name, concat('.', @name))}">
+          <xsl:value-of select="@name"/>
+        </a> (
+        <xsl:for-each xmlns="" select="arg">
+          <xsl:value-of select="@type"/>: <xsl:value-of select="@name"/>
+          <xsl:if test="position() != last()">, </xsl:if>
+        </xsl:for-each>
+        )</h3>
+
+      <div xmlns="http://www.w3.org/1999/xhtml" class="docstring">
+        <xsl:apply-templates select="tp:docstring"/>
+        <xsl:apply-templates select="tp:added"/>
+        <xsl:apply-templates select="tp:changed"/>
+        <xsl:apply-templates select="tp:deprecated"/>
+      </div>
+
+      <xsl:if test="arg">
+        <div xmlns="http://www.w3.org/1999/xhtml">
+          <h4>Parameters</h4>
+          <dl xmlns="http://www.w3.org/1999/xhtml">
+            <xsl:apply-templates select="arg" mode="parameters-in-docstring"/>
+          </dl>
+        </div>
+      </xsl:if>
+    </div>
+  </xsl:template>
+
+  <xsl:output method="xml" indent="no" encoding="ascii"
+    omit-xml-declaration="yes"
+    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+    doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" />
+
+  <xsl:template match="/tp:spec">
+    <html xmlns="http://www.w3.org/1999/xhtml">
+      <head>
+        <title>
+          <xsl:value-of select="tp:title"/>
+          <xsl:if test="tp:version">
+            <xsl:text> version </xsl:text>
+            <xsl:value-of select="tp:version"/>
+          </xsl:if>
+        </title>
+        <style type="text/css">
+
+          body {
+            font-family: sans-serif;
+            margin: 2em;
+            height: 100%;
+            font-size: 1.2em;
+          }
+          h1 {
+            padding-top: 5px;
+            padding-bottom: 5px;
+            font-size: 1.6em;
+            background: #dadae2;
+          }
+          h2 {
+            font-size: 1.3em;
+          }
+          h3 {
+            font-size: 1.2em;
+          }
+          a:link, a:visited, a:link:hover, a:visited:hover {
+            font-weight: bold;
+          }
+          .topbox {
+            padding-top: 10px;
+            padding-left: 10px;
+            border-bottom: black solid 1px;
+            padding-bottom: 10px;
+            background: #dadae2;
+            font-size: 2em;
+            font-weight: bold;
+            color: #5c5c5c;
+          }
+          .topnavbox {
+            padding-left: 10px;
+            padding-top: 5px;
+            padding-bottom: 5px;
+            background: #abacba;
+            border-bottom: black solid 1px;
+            font-size: 1.2em;
+          }
+          .topnavbox a{
+            color: black;
+            font-weight: normal;
+          }
+          .sidebar {
+            float: left;
+            /* width:9em;
+            border-right:#abacba solid 1px;
+            border-left: #abacba solid 1px;
+            height:100%; */
+            border: #abacba solid 1px;
+            padding-left: 10px;
+            margin-left: 10px;
+            padding-right: 10px;
+            margin-right: 10px;
+            color: #5d5d5d;
+            background: #dadae2;
+          }
+          .sidebar a {
+            text-decoration: none;
+            border-bottom: #e29625 dotted 1px;
+            color: #e29625;
+            font-weight: normal;
+          }
+          .sidebar h1 {
+            font-size: 1.2em;
+            color: black;
+          }
+          .sidebar ul {
+            padding-left: 25px;
+            padding-bottom: 10px;
+            border-bottom: #abacba solid 1px;
+          }
+          .sidebar li {
+            padding-top: 2px;
+            padding-bottom: 2px;
+          }
+          .sidebar h2 {
+            font-style:italic;
+            font-size: 0.81em;
+            padding-left: 5px;
+            padding-right: 5px;
+            font-weight: normal;
+          }
+          .date {
+            font-size: 0.6em;
+            float: right;
+            font-style: italic;
+          }
+          .method, .signal, .property {
+            margin-left: 1em;
+            margin-right: 4em;
+          }
+          .rationale {
+            font-style: italic;
+            border-left: 0.25em solid #808080;
+            padding-left: 0.5em;
+          }
+
+          .added {
+            color: #006600;
+            background: #ffffff;
+          }
+          .deprecated {
+            color: #ff0000;
+            background: #ffffff;
+          }
+          table, tr, td, th {
+            border: 1px solid #666;
+          }
+
+        </style>
+      </head>
+      <body>
+        <h1 class="topbox">
+          <xsl:value-of select="tp:title" />
+        </h1>
+        <xsl:if test="tp:version">
+          <h2>Version <xsl:value-of select="string(tp:version)"/></h2>
+        </xsl:if>
+        <xsl:apply-templates select="tp:copyright"/>
+        <xsl:apply-templates select="tp:license"/>
+        <xsl:apply-templates select="tp:docstring"/>
+
+        <h2>Interfaces</h2>
+        <ul>
+          <xsl:for-each select="//node/interface">
+            <li><code><a href="#{@name}"><xsl:value-of select="@name"/></a></code></li>
+          </xsl:for-each>
+        </ul>
+
+        <xsl:apply-templates select="//node"/>
+        <xsl:apply-templates select="tp:generic-types"/>
+        <xsl:apply-templates select="tp:errors"/>
+
+        <h1>Index</h1>
+        <h2>Index of interfaces</h2>
+        <ul>
+          <xsl:for-each select="//node/interface">
+            <li><code><a href="#{@name}"><xsl:value-of select="@name"/></a></code></li>
+          </xsl:for-each>
+        </ul>
+        <h2>Index of types</h2>
+        <ul>
+          <xsl:for-each select="//tp:simple-type | //tp:enum | //tp:flags | //tp:mapping | //tp:struct | //tp:external-type">
+            <xsl:sort select="@name"/>
+            <li>
+              <code>
+                <a href="#type-{@name}">
+                  <xsl:value-of select="@name"/>
+                </a>
+              </code>
+              <xsl:apply-templates mode="in-index" select="."/>
+            </li>
+          </xsl:for-each>
+        </ul>
+      </body>
+    </html>
+  </xsl:template>
+
+  <xsl:template match="node">
+      <xsl:apply-templates />
+  </xsl:template>
+
+  <xsl:template match="text()">
+    <xsl:if test="normalize-space(.) != ''">
+      <xsl:message terminate="yes">
+        <xsl:text>Stray text: {{{</xsl:text>
+        <xsl:value-of select="." />
+        <xsl:text>}}}&#10;</xsl:text>
+      </xsl:message>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="*">
+      <xsl:message terminate="yes">
+         <xsl:text>Unrecognised element: {</xsl:text>
+         <xsl:value-of select="namespace-uri(.)" />
+         <xsl:text>}</xsl:text>
+         <xsl:value-of select="local-name(.)" />
+         <xsl:text>&#10;</xsl:text>
+      </xsl:message>
+  </xsl:template>
+</xsl:stylesheet>
+
+<!-- vim:set sw=2 sts=2 et: -->
diff --git a/sflphone-common/doc/dbus-api/tools/specparser.py b/sflphone-common/doc/dbus-api/tools/specparser.py
new file mode 100644
index 0000000000000000000000000000000000000000..4208ad4104cab3c2a73aa75c71e05b3a53541b43
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/tools/specparser.py
@@ -0,0 +1,866 @@
+#
+# specparser.py
+#
+# Reads in a spec document and generates pretty data structures from it.
+#
+# Copyright (C) 2009 Collabora Ltd.
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at
+# your option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+# for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Authors: Davyd Madeley <davyd.madeley@collabora.co.uk>
+#
+
+import sys
+import xml.dom.minidom
+
+import xincludator
+
+XMLNS_TP = 'http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0'
+
+class UnknownAccess(Exception): pass
+class UnknownDirection(Exception): pass
+class UnknownType(Exception): pass
+class UnnamedItem(Exception): pass
+class UntypedItem(Exception): pass
+class UnsupportedArray(Exception): pass
+
+def getText(dom):
+    try:
+        if dom.childNodes[0].nodeType == dom.TEXT_NODE:
+            return dom.childNodes[0].data
+        else:
+            return ''
+    except IndexError:
+        return ''
+
+def getChildrenByName(dom, namespace, name):
+    return filter(lambda n: n.nodeType == n.ELEMENT_NODE and \
+                            n.namespaceURI == namespace and \
+                            n.localName == name,
+                  dom.childNodes)
+
+def build_name(namespace, name):
+    """Returns a name by appending `name' to the namespace of this object.
+    """
+    return '.'.join(
+        filter(lambda n: n is not None and n != '',
+               [namespace, name.replace(' ', '')])
+        )
+
+class Base(object):
+    """The base class for any type of XML node in the spec that implements the
+       'name' attribute.
+
+       Don't instantiate this class directly.
+    """
+    devhelp_name = ""
+
+    def __init__(self, parent, namespace, dom):
+        self.short_name = name = dom.getAttribute('name')
+        self.namespace = namespace
+        self.name = build_name(namespace, name)
+        self.parent = parent
+
+        try:
+            self.docstring = getChildrenByName(dom, XMLNS_TP, 'docstring')[0]
+        except IndexError:
+            self.docstring = None
+
+        try:
+            self.added = getChildrenByName(dom, XMLNS_TP, 'added')[0]
+        except IndexError:
+            self.added = None
+
+        try:
+            self.deprecated = getChildrenByName(dom, XMLNS_TP, 'deprecated')[0]
+        except IndexError:
+            self.deprecated = None
+
+        self.changed = getChildrenByName(dom, XMLNS_TP, 'changed')
+
+        self.validate()
+
+    def validate(self):
+        if self.short_name == '':
+            raise UnnamedItem("Node %s of %s has no name" % (
+                self.__class__.__name__, self.parent))
+
+    def get_type_name(self):
+        return self.__class__.__name__
+
+    def get_spec(self):
+        return self.parent.get_spec()
+
+    def get_root_namespace(self):
+        return self.get_interface().name
+
+    def get_interface(self):
+        return self.parent.get_interface()
+
+    def get_url(self):
+        return "%s#%s" % (self.get_interface().get_url(), self.name)
+
+    def _get_generic_with_ver(self, nnode, htmlclass, txt):
+        if nnode is None:
+            return ''
+        else:
+            # make a copy of this node, turn it into a HTML <div> tag
+            node = nnode.cloneNode(True)
+            node.tagName = 'div'
+            node.baseURI = None
+            node.setAttribute('class', htmlclass)
+
+            try:
+                node.removeAttribute('version')
+
+                span = xml.dom.minidom.parseString(
+                    ('<span class="version">%s\n</span>' % txt) %
+                            nnode.getAttribute('version')).firstChild
+                node.insertBefore(span, node.firstChild)
+            except xml.dom.NotFoundErr:
+                print >> sys.stderr, \
+                    'WARNING: %s was %s, but gives no version' % (self, htmlclass)
+
+            self._convert_to_html(node)
+
+            return node.toxml().encode('ascii', 'xmlcharrefreplace')
+
+    def get_added(self):
+        return self._get_generic_with_ver(self.added, 'added',
+                                          "Added in %s.")
+
+    def get_deprecated(self):
+        return self._get_generic_with_ver(self.deprecated, 'deprecated',
+                                          "Deprecated since %s.")
+
+    def get_changed(self):
+        return '\n'.join(map(lambda n:
+            self._get_generic_with_ver(n, 'changed', "Changed in %s."),
+            self.changed))
+
+    def get_docstring(self):
+        """Get the docstring for this node, but do node substitution to
+           rewrite types, interfaces, etc. as links.
+        """
+        if self.docstring is None:
+            return ''
+        else:
+            # make a copy of this node, turn it into a HTML <div> tag
+            node = self.docstring.cloneNode(True)
+            node.tagName = 'div'
+            node.baseURI = None
+            node.setAttribute('class', 'docstring')
+
+            self._convert_to_html(node)
+
+            return node.toxml().encode('ascii', 'xmlcharrefreplace')
+
+    def _convert_to_html(self, node):
+        spec = self.get_spec()
+        namespace = self.get_root_namespace()
+
+        # rewrite <tp:rationale>
+        for n in node.getElementsByTagNameNS(XMLNS_TP, 'rationale'):
+            n.tagName = 'div'
+            n.namespaceURI = None
+            n.setAttribute('class', 'rationale')
+
+        # rewrite <tp:type>
+        for n in node.getElementsByTagNameNS(XMLNS_TP, 'type'):
+            t = spec.lookup_type(getText(n))
+            n.tagName = 'a'
+            n.namespaceURI = None
+            n.setAttribute('href', t.get_url())
+
+        # rewrite <tp:member-ref>
+        for n in node.getElementsByTagNameNS(XMLNS_TP, 'member-ref'):
+            key = getText(n)
+            try:
+                o = spec.lookup(key, namespace=namespace)
+            except KeyError:
+                print >> sys.stderr, \
+                    "WARNING: Key '%s' not known in namespace '%s'" % (
+                        key, namespace)
+                continue
+
+            n.tagName = 'a'
+            n.namespaceURI = None
+            n.setAttribute('href', o.get_url())
+            n.setAttribute('title', o.get_title())
+
+        # rewrite <tp:dbus-ref>
+        for n in node.getElementsByTagNameNS(XMLNS_TP, 'dbus-ref'):
+            namespace = n.getAttribute('namespace')
+            key = getText(n)
+            try:
+                o = spec.lookup(key, namespace=namespace)
+            except KeyError:
+                print >> sys.stderr, \
+                    "WARNING: Key '%s' not known in namespace '%s'" % (
+                        key, namespace)
+                continue
+
+            n.tagName = 'a'
+            n.namespaceURI = None
+            n.setAttribute('href', o.get_url())
+            n.setAttribute('title', o.get_title())
+
+    def get_title(self):
+        return '%s %s' % (self.get_type_name(), self.name)
+
+    def __repr__(self):
+        return '%s(%s)' % (self.__class__.__name__, self.name)
+
+class PossibleError(Base):
+    def __init__(self, parent, namespace, dom):
+        super(PossibleError, self).__init__(parent, namespace, dom)
+
+    def get_error(self):
+        spec = self.get_spec()
+        try:
+            return spec.errors[self.name]
+        except KeyError:
+            return External(self.name)
+
+    def get_url(self):
+        return self.get_error().get_url()
+
+    def get_title(self):
+        return self.get_error().get_title()
+
+    def get_docstring(self):
+        d = super(PossibleError, self).get_docstring()
+        if d == '':
+            return self.get_error().get_docstring()
+        else:
+            return d
+
+class Method(Base):
+    devhelp_name = "function"
+
+    def __init__(self, parent, namespace, dom):
+        super(Method, self).__init__(parent, namespace, dom)
+
+        args = build_list(self, Arg, self.name,
+                          dom.getElementsByTagName('arg'))
+
+        # separate arguments as input and output arguments
+        self.in_args = filter(lambda a: a.direction == Arg.DIRECTION_IN, args)
+        self.out_args = filter(lambda a: a.direction == Arg.DIRECTION_OUT, args)
+
+        for arg in args:
+            if arg.direction == Arg.DIRECTION_IN or \
+               arg.direction == Arg.DIRECTION_OUT:
+                continue
+
+            print >> sys.stderr, "WARNING: '%s' of method '%s' does not specify a suitable direction" % (arg, self)
+
+        self.possible_errors = build_list(self, PossibleError, None,
+                        dom.getElementsByTagNameNS(XMLNS_TP, 'error'))
+
+    def get_in_args(self):
+        return ', '.join(map(lambda a: a.spec_name(), self.in_args))
+
+    def get_out_args(self):
+        if len(self.out_args) > 0:
+            return ', '.join(map(lambda a: a.spec_name(), self.out_args))
+        else:
+            return 'nothing'
+
+class Typed(Base):
+    """The base class for all typed nodes (i.e. Arg and Property).
+
+       Don't instantiate this class directly.
+    """
+
+    def __init__(self, parent, namespace, dom):
+        super(Typed, self).__init__(parent, namespace, dom)
+
+        self.type = dom.getAttributeNS(XMLNS_TP, 'type')
+        self.dbus_type = dom.getAttribute('type')
+
+        # check we have a dbus type
+        if self.dbus_type == '':
+            raise UntypedItem("Node referred to by '%s' has no type" % dom.toxml())
+    def get_type(self):
+        return self.get_spec().lookup_type(self.type)
+
+    def get_type_url(self):
+        t = self.get_type()
+        if t is None: return ''
+        else: return t.get_url()
+
+    def get_type_title(self):
+        t = self.get_type()
+        if t is None: return ''
+        else: return t.get_title()
+
+    def spec_name(self):
+        return '%s: %s' % (self.dbus_type, self.short_name)
+
+    def __repr__(self):
+        return '%s(%s:%s)' % (self.__class__.__name__, self.name, self.dbus_type)
+
+class Property(Typed):
+    ACCESS_READ     = 1
+    ACCESS_WRITE    = 2
+
+    ACCESS_READWRITE = ACCESS_READ | ACCESS_WRITE
+
+    def __init__(self, parent, namespace, dom):
+        super(Property, self).__init__(parent, namespace, dom)
+
+        access = dom.getAttribute('access')
+        if access == 'read':
+            self.access = self.ACCESS_READ
+        elif access == 'write':
+            self.access = self.ACCESS_WRITE
+        elif access == 'readwrite':
+            self.access = self.ACCESS_READWRITE
+        else:
+            raise UnknownAccess("Unknown access '%s' on %s" % (access, self))
+
+    def get_access(self):
+        if self.access & self.ACCESS_READ and self.access & self.ACCESS_WRITE:
+            return 'Read/Write'
+        elif self.access & self.ACCESS_READ:
+            return 'Read only'
+        elif self.access & self.ACCESS_WRITE:
+            return 'Write only'
+
+class AwkwardTelepathyProperty(Typed):
+    def get_type_name(self):
+        return 'Telepathy Property'
+
+class Arg(Typed):
+    DIRECTION_IN, DIRECTION_OUT, DIRECTION_UNSPECIFIED = range(3)
+
+    def __init__(self, parent, namespace, dom):
+        super(Arg, self).__init__(parent, namespace, dom)
+
+        direction = dom.getAttribute('direction')
+        if direction == 'in':
+            self.direction = self.DIRECTION_IN
+        elif direction == 'out':
+            self.direction = self.DIRECTION_OUT
+        elif direction == '':
+            self.direction = self.DIRECTION_UNSPECIFIED
+        else:
+            raise UnknownDirection("Unknown direction '%s' on %s" % (
+                                    direction, self.parent))
+
+class Signal(Base):
+    def __init__(self, parent, namespace, dom):
+        super(Signal, self).__init__(parent, namespace, dom)
+
+        self.args = build_list(self, Arg, self.name,
+                               dom.getElementsByTagName('arg'))
+
+        for arg in self.args:
+            if arg.direction == Arg.DIRECTION_UNSPECIFIED:
+                continue
+
+            print >> sys.stderr, "WARNING: '%s' of signal '%s' does not specify a suitable direction" % (arg, self)
+
+    def get_args(self):
+        return ', '.join(map(lambda a: a.spec_name(), self.args))
+
+class External(object):
+    """External objects are objects that are referred to in another spec.
+
+       We have to attempt to look them up if at all possible.
+    """
+
+    def __init__(self, name):
+        self.name = self.short_name = name
+
+    def get_url(self):
+        return None
+
+    def get_title(self):
+        return 'External %s' % self.name
+
+    def get_docstring(self):
+        return None
+
+    def __repr__(self):
+        return '%s(%s)' % (self.__class__.__name__, self.name)
+
+class Interface(Base):
+    def __init__(self, parent, namespace, dom, spec_namespace):
+        super(Interface, self).__init__(parent, namespace, dom)
+
+        # If you're writing a spec with more than one top-level namespace, you
+        # probably want to replace spec_namespace with a list.
+        if self.name.startswith(spec_namespace + "."):
+            self.short_name = self.name[len(spec_namespace) + 1:]
+        else:
+            self.short_name = self.name
+
+        # build lists of methods, etc., in this interface
+        self.methods = build_list(self, Method, self.name,
+                                  dom.getElementsByTagName('method'))
+        self.properties = build_list(self, Property, self.name,
+                                     dom.getElementsByTagName('property'))
+        self.signals = build_list(self, Signal, self.name,
+                                  dom.getElementsByTagName('signal'))
+        self.tpproperties = build_list(self, AwkwardTelepathyProperty,
+                self.name, dom.getElementsByTagNameNS(XMLNS_TP, 'property'))
+        self.handler_capability_tokens = build_list(self,
+                HandlerCapabilityToken, self.name,
+                dom.getElementsByTagNameNS(XMLNS_TP,
+                    'handler-capability-token'))
+        self.contact_attributes = build_list(self, ContactAttribute, self.name,
+                dom.getElementsByTagNameNS(XMLNS_TP, 'contact-attribute'))
+
+        # build a list of types in this interface
+        self.types = parse_types(self, dom, self.name)
+
+        # find out if this interface causes havoc
+        self.causes_havoc = dom.getAttributeNS(XMLNS_TP, 'causes-havoc')
+        if self.causes_havoc == '': self.causes_havoc = None
+
+        # find out what we're required to also implement
+        self.requires = map(lambda n: n.getAttribute('interface'),
+                             getChildrenByName(dom, XMLNS_TP, 'requires'))
+
+    def get_interface(self):
+        return self
+
+    def get_requires(self):
+        spec = self.get_spec()
+
+        def lookup(r):
+            try:
+                return spec.lookup(r)
+            except KeyError:
+                return External(r)
+
+        return map(lookup, self.requires)
+
+    def get_url(self):
+        return '%s.html' % self.name
+
+class Error(Base):
+    def get_url(self):
+        return 'errors.html#%s' % self.name
+
+    def get_root_namespace(self):
+        return self.namespace
+
+class DBusList(object):
+    """Stores a list of a given DBusType. Provides some basic validation to
+       determine whether or not the type is sane.
+    """
+    def __init__(self, child):
+        self.child = child
+
+        if isinstance(child, DBusType):
+            self.ultimate = child
+            self.depth = 1
+
+            if self.child.array_name == '':
+                raise UnsupportedArray("Type '%s' does not support being "
+                        "used in an array" % self.child.name)
+            else:
+                self.name = build_name(self.child.namespace,
+                                       self.child.array_name)
+                self.short_name = self.child.array_name
+
+        elif isinstance(child, DBusList):
+            self.ultimate = child.ultimate
+            self.depth = child.depth + 1
+            self.name = self.child.name + '_List'
+            self.short_name = self.child.short_name + '_List'
+
+            # check that our child can operate at this depth
+            maxdepth = int(self.ultimate.array_depth)
+            if self.depth > maxdepth:
+                raise TypeError("Type '%s' has exceeded its maximum depth (%i)" % (self, maxdepth))
+
+        else:
+            raise TypeError("DBusList can contain only a DBusType or DBusList not '%s'" % child)
+
+        self.dbus_type = 'a' + self.child.dbus_type
+
+    def get_url(self):
+        return self.ultimate.get_url()
+
+    def get_title(self):
+        return "Array of %s" % self.child.get_title()
+
+    def __repr__(self):
+        return 'Array(%s)' % self.child
+
+class DBusType(Base):
+    """The base class for all D-Bus types referred to in the spec.
+
+       Don't instantiate this class directly.
+    """
+
+    devhelp_name = "typedef"
+
+    def __init__(self, parent, namespace, dom):
+        super(DBusType, self).__init__(parent, namespace, dom)
+
+        self.dbus_type = dom.getAttribute('type')
+        self.array_name = dom.getAttribute('array-name')
+        self.array_depth = dom.getAttribute('array-depth')
+
+    def get_root_namespace(self):
+        return self.namespace
+
+    def get_breakdown(self):
+        return ''
+
+    def get_url(self):
+        if isinstance(self.parent, Interface):
+            html = self.parent.get_url()
+        else:
+            html = 'generic-types.html'
+
+        return '%s#%s' % (html, self.name)
+
+class SimpleType(DBusType):
+    def get_type_name(self):
+        return 'Simple Type'
+
+class ExternalType(DBusType):
+    def __init__(self, parent, namespace, dom):
+        super(ExternalType, self).__init__(parent, namespace, dom)
+
+        # FIXME: until we are able to cross reference external types to learn
+        # about their array names, we're just going to assume they work like
+        # this
+        self.array_name = self.short_name + '_List'
+
+    def get_type_name(self):
+        return 'External Type'
+
+class StructLike(DBusType):
+    """Base class for all D-Bus types that look kind of like Structs
+
+       Don't instantiate this class directly.
+    """
+
+    class StructMember(Typed):
+        def get_root_namespace(self):
+            return self.parent.get_root_namespace()
+
+    def __init__(self, parent, namespace, dom):
+        super(StructLike, self).__init__(parent, namespace, dom)
+
+        self.members = build_list(self, StructLike.StructMember, None,
+                        dom.getElementsByTagNameNS(XMLNS_TP, 'member'))
+
+    def get_breakdown(self):
+        str = ''
+        str += '<ul>\n'
+        for member in self.members:
+            # attempt to lookup the member up in the type system
+            t = member.get_type()
+
+            str += '<li>%s &mdash; %s' % (member.name, member.dbus_type)
+            if t: str += ' (<a href="%s" title="%s">%s</a>)' % (
+                            t.get_url(), t.get_title(), t.short_name)
+            str += '</li>\n'
+            str += member.get_docstring()
+        str += '</ul>\n'
+
+        return str
+
+class Mapping(StructLike):
+    def __init__(self, parent, namespace, dom):
+        super(Mapping, self).__init__(parent, namespace, dom)
+
+        # rewrite the D-Bus type
+        self.dbus_type = 'a{%s}' % ''.join(map(lambda m: m.dbus_type, self.members))
+
+class Struct(StructLike):
+
+    devhelp_name = "struct"
+
+    def __init__(self, parent, namespace, dom):
+        super(Struct, self).__init__(parent, namespace, dom)
+
+        # rewrite the D-Bus type
+        self.dbus_type = '(%s)' % ''.join(map(lambda m: m.dbus_type, self.members))
+
+class EnumLike(DBusType):
+    """Base class for all D-Bus types that look kind of like Enums
+
+       Don't instantiate this class directly.
+    """
+    class EnumValue(Base):
+        def __init__(self, parent, namespace, dom):
+            super(EnumLike.EnumValue, self).__init__(parent, namespace, dom)
+
+            # rewrite self.name
+            self.short_name = dom.getAttribute('suffix')
+            self.name = build_name(namespace, self.short_name)
+
+            self.value = dom.getAttribute('value')
+
+            super(EnumLike.EnumValue, self).validate()
+
+        def validate(self):
+            pass
+
+        def get_root_namespace(self):
+            return self.parent.get_root_namespace()
+
+    def get_breakdown(self):
+        str = ''
+        str += '<ul>\n'
+        for value in self.values:
+            # attempt to lookup the member.name as a type in the type system
+            str += '<li>%s (%s)</li>\n' % (value.short_name, value.value)
+            str += value.get_added()
+            str += value.get_changed()
+            str += value.get_deprecated()
+            str += value.get_docstring()
+        str += '</ul>\n'
+
+        return str
+
+class Enum(EnumLike):
+
+    devhelp_name = "enum"
+
+    def __init__(self, parent, namespace, dom):
+        super(Enum, self).__init__(parent, namespace, dom)
+
+        self.values = build_list(self, EnumLike.EnumValue, self.name,
+                        dom.getElementsByTagNameNS(XMLNS_TP, 'enumvalue'))
+
+class Flags(EnumLike):
+    def __init__(self, parent, namespace, dom):
+        super(Flags, self).__init__(parent, namespace, dom)
+
+        self.values = build_list(self, EnumLike.EnumValue, self.name,
+                        dom.getElementsByTagNameNS(XMLNS_TP, 'flag'))
+        self.flags = self.values # in case you're looking for it
+
+class TokenBase(Base):
+
+    devhelp_name = "macro"      # it's a constant, which is near enough...
+    separator = '/'
+
+    def __init__(self, parent, namespace, dom):
+        super(TokenBase, self).__init__(parent, namespace, dom)
+        self.name = namespace + '/' + self.short_name
+
+class ContactAttribute(TokenBase, Typed):
+
+    def get_type_name(self):
+        return 'Contact Attribute'
+
+class HandlerCapabilityToken(TokenBase):
+
+    def get_type_name(self):
+        return 'Handler Capability Token'
+
+    def __init__(self, parent, namespace, dom):
+        super(HandlerCapabilityToken, self).__init__(parent, namespace, dom)
+
+        is_family = dom.getAttribute('is-family')
+        assert is_family in ('yes', 'no', '')
+        self.is_family = (is_family == 'yes')
+
+class SectionBase(object):
+    """A SectionBase is an abstract base class for any type of node that can
+       contain a <tp:section>, which means the top-level Spec object, or any
+       Section object.
+
+       It should not be instantiated directly.
+    """
+
+    def __init__(self, dom, spec_namespace):
+
+        self.items = []
+
+        def recurse(nodes):
+            # iterate through the list of child nodes
+            for node in nodes:
+                if node.nodeType != node.ELEMENT_NODE: continue
+
+                if node.tagName == 'node':
+                    # recurse into this level for interesting items
+                    recurse(node.childNodes)
+                elif node.namespaceURI == XMLNS_TP and \
+                     node.localName == 'section':
+                    self.items.append(Section(self, None, node,
+                        spec_namespace))
+                elif node.tagName == 'interface':
+                    self.items.append(Interface(self, None, node,
+                        spec_namespace))
+
+        recurse(dom.childNodes)
+
+class Section(Base, SectionBase):
+    def __init__(self, parent, namespace, dom, spec_namespace):
+        Base.__init__(self, parent, namespace, dom)
+        SectionBase.__init__(self, dom, spec_namespace)
+
+    def get_root_namespace(self):
+        return None
+
+class Spec(SectionBase):
+    def __init__(self, dom, spec_namespace):
+        # build a dictionary of errors in this spec
+        try:
+            errorsnode = dom.getElementsByTagNameNS(XMLNS_TP, 'errors')[0]
+            self.errors = build_dict(self, Error,
+                        errorsnode.getAttribute('namespace'),
+                        errorsnode.getElementsByTagNameNS(XMLNS_TP, 'error'))
+        except IndexError:
+            self.errors = {}
+
+        # build a list of generic types
+        self.generic_types = reduce (lambda a, b: a + b,
+                map(lambda l: parse_types(self, l),
+                        dom.getElementsByTagNameNS(XMLNS_TP, 'generic-types')),
+                [])
+
+        # create a top-level section for this Spec
+        SectionBase.__init__(self, dom.documentElement, spec_namespace)
+
+        # build a list of interfaces in this spec
+        self.interfaces = []
+        def recurse(items):
+            for item in items:
+                if isinstance(item, Section): recurse(item.items)
+                elif isinstance(item, Interface): self.interfaces.append(item)
+        recurse(self.items)
+
+        # build a giant dictionary of everything (interfaces, methods, signals
+        # and properties); also build a dictionary of types
+        self.everything = {}
+        self.types = {}
+
+        for type in self.generic_types: self.types[type.short_name] = type
+
+        for interface in self.interfaces:
+                self.everything[interface.name] = interface
+
+                for method in interface.methods:
+                    self.everything[method.name] = method
+                for signal in interface.signals:
+                    self.everything[signal.name] = signal
+                for property in interface.properties:
+                    self.everything[property.name] = property
+                for property in interface.tpproperties:
+                    self.everything[property.name] = property
+                for token in interface.contact_attributes:
+                    self.everything[token.name] = token
+                for token in interface.handler_capability_tokens:
+                    self.everything[token.name] = token
+
+                for type in interface.types:
+                    self.types[type.short_name] = type
+
+        # get some extra bits for the HTML
+        node = dom.getElementsByTagNameNS(XMLNS_TP, 'spec')[0]
+        self.title = getText(getChildrenByName(node, XMLNS_TP, 'title')[0])
+
+        try:
+            self.version = getText(getChildrenByName(node, XMLNS_TP, 'version')[0])
+        except IndexError:
+            self.version = None
+
+        self.copyrights = map(getText,
+                              getChildrenByName(node, XMLNS_TP, 'copyright'))
+
+        try:
+            license = getChildrenByName(node, XMLNS_TP, 'license')[0]
+            license.tagName = 'div'
+            license.namespaceURI = None
+            license.setAttribute('class', 'license')
+            self.license = license.toxml()
+        except IndexError:
+            self.license = ''
+
+        # FIXME: we need to check all args for type correctness
+
+    def get_spec(self):
+        return self
+
+    def lookup(self, name, namespace=None):
+        key = build_name(namespace, name)
+        return self.everything[key]
+
+    def lookup_type(self, type_):
+        if type_.endswith('[]'):
+            return DBusList(self.lookup_type(type_[:-2]))
+
+        if type_ == '': return None
+        elif type_ in self.types:
+            return self.types[type_]
+
+        raise UnknownType("Type '%s' is unknown" % type_)
+
+    def __repr__(self):
+        return '%s(%s)' % (self.__class__.__name__, self.title)
+
+def build_dict(parent, type_, namespace, nodes):
+    """Build a dictionary of D-Bus names to Python objects representing that
+       name using the XML node for that item in the spec.
+
+       e.g. 'org.freedesktop.Telepathy.Channel' : Interface(Channel)
+
+       Works for any Python object inheriting from 'Base' whose XML node
+       implements the 'name' attribute.
+    """
+
+    def build_tuple(node):
+        o = type_(parent, namespace, node)
+        return(o.name, o)
+
+    return dict(build_tuple(n) for n in nodes)
+
+def build_list(parent, type_, namespace, nodes):
+    return map(lambda node: type_(parent, namespace, node), nodes)
+
+def parse_types(parent, dom, namespace = None):
+    """Parse all of the types of type nodes mentioned in 't' from the node
+       'dom' and insert them into the dictionary 'd'.
+    """
+    t = [
+        (SimpleType,    'simple-type'),
+        (Enum,          'enum'),
+        (Flags,         'flags'),
+        (Mapping,       'mapping'),
+        (Struct,        'struct'),
+        (ExternalType,  'external-type'),
+    ]
+
+    types = []
+
+    for (type_, tagname) in t:
+        types += build_list(parent, type_, namespace,
+                    dom.getElementsByTagNameNS(XMLNS_TP, tagname))
+
+    return types
+
+def parse(filename, spec_namespace):
+    dom = xml.dom.minidom.parse(filename)
+    xincludator.xincludate(dom, filename)
+
+    spec = Spec(dom, spec_namespace)
+
+    return spec
+
+if __name__ == '__main__':
+    parse(sys.argv[1])
diff --git a/sflphone-common/doc/dbus-api/tools/specparser.pyc b/sflphone-common/doc/dbus-api/tools/specparser.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0a26b0bf150ae052a840cee27735b00ecd9ea6b0
Binary files /dev/null and b/sflphone-common/doc/dbus-api/tools/specparser.pyc differ
diff --git a/sflphone-common/doc/dbus-api/tools/xincludator.py b/sflphone-common/doc/dbus-api/tools/xincludator.py
new file mode 100644
index 0000000000000000000000000000000000000000..63e106ace13664eb71571342bec39780175e25bd
--- /dev/null
+++ b/sflphone-common/doc/dbus-api/tools/xincludator.py
@@ -0,0 +1,39 @@
+#!/usr/bin/python
+
+from sys import argv, stdout, stderr
+import codecs, locale
+import os
+import xml.dom.minidom
+
+stdout = codecs.getwriter('utf-8')(stdout)
+
+NS_XI = 'http://www.w3.org/2001/XInclude'
+
+def xincludate(dom, base, dropns = []):
+    remove_attrs = []
+    for i in xrange(dom.documentElement.attributes.length):
+        attr = dom.documentElement.attributes.item(i)
+        if attr.prefix == 'xmlns':
+            if attr.localName in dropns:
+                remove_attrs.append(attr)
+            else:
+                dropns.append(attr.localName)
+    for attr in remove_attrs:
+        dom.documentElement.removeAttributeNode(attr)
+    for include in dom.getElementsByTagNameNS(NS_XI, 'include'):
+        href = include.getAttribute('href')
+        # FIXME: assumes Unixy paths
+        filename = os.path.join(os.path.dirname(base), href)
+        subdom = xml.dom.minidom.parse(filename)
+        xincludate(subdom, filename, dropns)
+        if './' in href:
+            subdom.documentElement.setAttribute('xml:base', href)
+        include.parentNode.replaceChild(subdom.documentElement, include)
+
+if __name__ == '__main__':
+    argv = argv[1:]
+    dom = xml.dom.minidom.parse(argv[0])
+    xincludate(dom, argv[0])
+    xml = dom.toxml()
+    stdout.write(xml)
+    stdout.write('\n')
diff --git a/sflphone-common/doc/dbus-api/tools/xincludator.pyc b/sflphone-common/doc/dbus-api/tools/xincludator.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1172f2daf89056937b733fe218beea72eb72f4fa
Binary files /dev/null and b/sflphone-common/doc/dbus-api/tools/xincludator.pyc differ
diff --git a/sflphone-common/doc/misc/debian-package.txt b/sflphone-common/doc/misc/debian-package.txt
deleted file mode 100644
index 23409b79dfb4227ac49caad79578864f0db85c38..0000000000000000000000000000000000000000
--- a/sflphone-common/doc/misc/debian-package.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-***************************** HOW_TO DEBIAN PACKAGE ********************************
-
-This document aims at explaining how to build a binary debian package.
-
-- Identify the dependencies at the runtime. You can describe them in the control file.
-- Build the directory tree
-                                      
- 					packagename_version
-						|
-						|
-					   _____|______
-					   |	       |
-					  \|/	      \|/
-					 /usr        DEBIAN
-	
-- Write the control file in the DEBIAN directory (you must have at least this one file), and prerm, postinst scripts,..
-- Describe the files you need in the package, that is the files you need to make run the program (executables, libraries), docs, images, etc... and where you need it. For instance, the binary executables should be in /usr/bin, images in /usr/share, ...
-- Build the debian package:
-	dpkg --build packagename packagename.deb . 
-Note: Be careful to debian package naming conventions (packagename_version_arch.deb)
-
-- Install the package:
-	dpkg --install packagename.deb   (as a root)
-If the dependant packages are not automatically configured, launch sudo apt-get -f install. It will configure the package you need to make run the application. 
-Note: The graphical interface of the debian package manager does configures the missing dependant packages automatically.
-
-- To remove the package, run : dpkg --remove packagename   (must be root)
-	
-
-
-
-
- 
diff --git a/sflphone-common/doc/misc/echange.txt b/sflphone-common/doc/misc/echange.txt
deleted file mode 100644
index ee2058e56b2423aace9d6a577012cfd4ee30b0cb..0000000000000000000000000000000000000000
--- a/sflphone-common/doc/misc/echange.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-  --> INVITE (20) -->         0     0 IN IP4 192.168.1.172 c=IN IP4 192.168.1.172 m=audio 56198
- <--  407 Proxy Auth
-  --> ACK 20
-  --> INVITE (21)                 0    0 IN IP4 192.168.1.172 c=IN IP4 192.168.1.172 m=audio 56198 (proxy-auth)
- <--  100 Trying (21 INVITE)
- <--  180 Ringing (21 INVITE)
- <--  200 OK             root 26195 26195 IN IP4 192.168.1.10  c=IN IP4 192.168.1.10  m=audio 15792
-  --> ACK 21
- <--  INVITE (102)       root 26195 26196 IN IP4 192.168.1.124 c=IN IP4 192.168.1.124 m=audio 53628
-  --> 100 Trying (102 INVITE)
-  --> 403 Forbidden (102 INVITE)
-  --> ACK (192.168.1.172) (102 ACK)
-  --> INVITE (103)       root 26195 26197 IN IP4 192.168.1.10  c=IN IP4 192.168.1.10  m=audio 15792
- <--  100 Trying (103 INVITE)
- <--  500 Retry Later (103 INVITE)
-#
-U 192.168.1.172:5060 -> 192.168.1.10:5060
-  SIP/2.0 500 Retry Later..Via: SIP/2.0/UDP 192.168.1.10:5060;branch=z9hG4bK2af68dba;rport=5060..From
-  : <sip:124@savoirfairelinux.net>;tag=as46619d38..To: "Yan Morin 2" <sip:sfl-127@savoirfairelinux.ne
-  t>;tag=785584300..Call-ID: 1746410696@192.168.1.172..CSeq: 103 INVITE..Retry-After: 10..Allow: INVI
-  TE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, MESSAGE, INFO, REFER, UPDATE..Content-Length: 0..
\ No newline at end of file
diff --git a/sflphone-common/doc/misc/libsamplerate.png b/sflphone-common/doc/misc/libsamplerate.png
deleted file mode 100644
index 4d918b85924c7934527adcaf5d744e42e47030fc..0000000000000000000000000000000000000000
Binary files a/sflphone-common/doc/misc/libsamplerate.png and /dev/null differ
diff --git a/sflphone-common/doc/misc/matrice-comparaison.ods b/sflphone-common/doc/misc/matrice-comparaison.ods
deleted file mode 100644
index 4543641697d34036c785a0991a5ab26b8918ec09..0000000000000000000000000000000000000000
Binary files a/sflphone-common/doc/misc/matrice-comparaison.ods and /dev/null differ
diff --git a/sflphone-common/doc/misc/outgoingcall.txt b/sflphone-common/doc/misc/outgoingcall.txt
deleted file mode 100644
index b08053381261641d87ab6995b748c971bfc66a86..0000000000000000000000000000000000000000
--- a/sflphone-common/doc/misc/outgoingcall.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-1. outgoingCall()
-1.1 generateNewCallId() (short)
-1.2 pushBackNewCall()
-1.2.1 new Call(id, type, _voIPLinkVector.at(DFT_VOIP_LINK))
-1.2.1.1 _state = NotExist;
-1.2.1.2 _voIPLink->newOutgoingCall(_id);
-1.2.1.2.1 new SipCall(callid, Manager::instance().getCodecDescVector()));
-1.2.1.2.2 _sipcallVector.push_back(sipcall);
-1.2.1.2.3 sipcall->setStandBy(true);
-1.2.2 _callVector.push_back(call);
-1.3 call->setStatus(string(TRYING_STATUS));
-1.4 call->setState(Progressing);
-1.5 call->setCallerIdNumber(to);
-1.6 call->outgoingCall(to);
-
diff --git a/sflphone-common/doc/misc/playtone.txt b/sflphone-common/doc/misc/playtone.txt
deleted file mode 100644
index f8efb9212fd25fbdd0dd73ffa8e79d65b6608b11..0000000000000000000000000000000000000000
--- a/sflphone-common/doc/misc/playtone.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Appel:
-playtone s1   [joue tant que playtone = false]
-playdtmf s2 1 [si playtone = true ( playtone = false) flush, start playdtmf]
-playdtmf s3 0 []
-playdtmf s4 3 []
-
-
-
-
diff --git a/sflphone-common/doc/misc/sflphoneqt-startup.txt b/sflphone-common/doc/misc/sflphoneqt-startup.txt
deleted file mode 100644
index 5b2af9b903d9f53eec081a8969d88993112853db..0000000000000000000000000000000000000000
--- a/sflphone-common/doc/misc/sflphoneqt-startup.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-main.cpp: main()
--> app = new SFLPhoneApp
-   -> new SessionIO, 3999
-   -> new session
-      -> new SessionId
-      -> new SessionIO (create)
-      -> Requester::registerSession()
-   -> envoie session a ConfigurationManager
-   -> envoie session a PhoneLineManager(initialize)
-      -> new Session(session)
-      -> new Account <-- supprimé
-   -> configure le nombre de ligne de PhoneLineManager::setNbLines
-      -> new PhoneLine
-      
-   -> new Request Object (commande)
-   -> new NumericKeypad 
--> new and show splash
--> sfl = new SFLPhoneWindow
-   -> positionne fenêtre
-   -> new ConfigurationPanel
-      -> connection updates au panel
-      -> connection bouton panel a la fenetre
-   -> peinture apres 50 milli-seconde
-   -> initialisation graphique
-
--> initConnections(sfl)
-   -> associe les PhoneLineButton au PhoneLine
-   -> associe needRegister
-   -> associe soundDriverChanged
-   -> connecte les boutons de la fenetre au phonelinemanager
-   -> associe phonelinemanager au lcd (messages texet)
-   -> associe evenement daemon
-   -> associe lauching (daemon)
-   -> associe status - phone line
-   -> associe evenement update, setup
--> launch
-   -> Launcher->start()
--> PhoneLineManager::connect et attend "connected"
--> loadSkin
--> exec
-
-Evenement:
--Lorsque le PhoneLineManager est connectée (connected)
- le splash disparait splash.hide()
--Lorsque le PhoneLineManager gère le getEvents
- app.handleArg()
-
-TCPSessionIOCreator::create
--> TCPSessionIO::connected|
-   PhoneLineManagerImpl::connected|
-   -> PhoneLineManagerImpl::readyToSendStatus|
-      -> PhoneLineManagerImpl::startSession()
-         -> mSession::getCallStatus()
-   -> SFLPhoneWindow::show
-   -> splash::hide
-
-CallStatusRequest
- -> onSuccess -> PhoneLineManager::selectLine()
-              -> PhoneLineManager::handleEvents()
- -> onEntry   -> CallStatus::execute() -> PhoneLineManager::addCall()
- -> onError   -> PhoneLineManager::errorOnCallStatus()
diff --git a/sflphone-common/doc/screenshots/accounts.png b/sflphone-common/doc/screenshots/accounts.png
deleted file mode 100644
index 2a1d033892ad357faf1e79c20141ffb9b6bd1d80..0000000000000000000000000000000000000000
Binary files a/sflphone-common/doc/screenshots/accounts.png and /dev/null differ
diff --git a/sflphone-common/doc/screenshots/audio-parameters.png b/sflphone-common/doc/screenshots/audio-parameters.png
deleted file mode 100644
index 7be7badab519fd06a3c5ef00f9c2916f12511f4b..0000000000000000000000000000000000000000
Binary files a/sflphone-common/doc/screenshots/audio-parameters.png and /dev/null differ
diff --git a/sflphone-common/doc/screenshots/desktop-notif-voice mail.png b/sflphone-common/doc/screenshots/desktop-notif-voice mail.png
deleted file mode 100644
index 4d2899877f696477da49f7cee1935e52d43189bf..0000000000000000000000000000000000000000
Binary files a/sflphone-common/doc/screenshots/desktop-notif-voice mail.png and /dev/null differ
diff --git a/sflphone-common/doc/screenshots/desktop-notification.png b/sflphone-common/doc/screenshots/desktop-notification.png
deleted file mode 100644
index c854b8252253f8fdb9c89ee41fc02b2ef2ca9c3a..0000000000000000000000000000000000000000
Binary files a/sflphone-common/doc/screenshots/desktop-notification.png and /dev/null differ
diff --git a/sflphone-common/doc/screenshots/gtk gui.png b/sflphone-common/doc/screenshots/gtk gui.png
deleted file mode 100644
index 958beb4ee40b156630d41ecb7c5ce77f35cb4256..0000000000000000000000000000000000000000
Binary files a/sflphone-common/doc/screenshots/gtk gui.png and /dev/null differ
diff --git a/sflphone-common/doc/screenshots/several-calls.png b/sflphone-common/doc/screenshots/several-calls.png
deleted file mode 100644
index 65dc12dbcbba742c04f3d974bca9fe660a004756..0000000000000000000000000000000000000000
Binary files a/sflphone-common/doc/screenshots/several-calls.png and /dev/null differ
diff --git a/sflphone-common/doc/screenshots/sflphoneDialpad_gtk_0.8.png b/sflphone-common/doc/screenshots/sflphoneDialpad_gtk_0.8.png
deleted file mode 100644
index 00d6ce8a0620d1a81244146884b22cf641a26906..0000000000000000000000000000000000000000
Binary files a/sflphone-common/doc/screenshots/sflphoneDialpad_gtk_0.8.png and /dev/null differ
diff --git a/sflphone-common/doc/screenshots/sflphone_gtk_0.8.png b/sflphone-common/doc/screenshots/sflphone_gtk_0.8.png
deleted file mode 100644
index 39b01d78d6c16ed71c20c13b548b7f5f2db9ff33..0000000000000000000000000000000000000000
Binary files a/sflphone-common/doc/screenshots/sflphone_gtk_0.8.png and /dev/null differ
diff --git a/sflphone-common/doc/screenshots/sflphone_metal.png b/sflphone-common/doc/screenshots/sflphone_metal.png
deleted file mode 100644
index ed34ee700257aa068667d3ebf6db1966f7cbd1c9..0000000000000000000000000000000000000000
Binary files a/sflphone-common/doc/screenshots/sflphone_metal.png and /dev/null differ
diff --git a/sflphone-common/doc/screenshots/sflphone_qt3_0.6.2.png b/sflphone-common/doc/screenshots/sflphone_qt3_0.6.2.png
deleted file mode 100644
index 3b53ce3190013f36ff1a4dc8bb54b051f51ca865..0000000000000000000000000000000000000000
Binary files a/sflphone-common/doc/screenshots/sflphone_qt3_0.6.2.png and /dev/null differ
diff --git a/sflphone-common/doc/sflphone_video/abstract.odt b/sflphone-common/doc/sflphone_video/abstract.odt
deleted file mode 100644
index e9263f9cff27f087345e37418b363eba096349b0..0000000000000000000000000000000000000000
Binary files a/sflphone-common/doc/sflphone_video/abstract.odt and /dev/null differ
diff --git a/sflphone-common/doc/sflphone_video/ressources.odt b/sflphone-common/doc/sflphone_video/ressources.odt
deleted file mode 100644
index 1c9cfed4cc410d060e1f4fc2bc4b959ccf66764b..0000000000000000000000000000000000000000
Binary files a/sflphone-common/doc/sflphone_video/ressources.odt and /dev/null differ
diff --git a/sflphone-common/man/sflphoned.pod b/sflphone-common/man/sflphoned.pod
index e860f898274cb39a62538b65b04f544fae584aff..99edc5140ff7e6c9752b913a51b5936456983d47 100644
--- a/sflphone-common/man/sflphoned.pod
+++ b/sflphone-common/man/sflphoned.pod
@@ -4,7 +4,7 @@ sflphoned - SIP and IAX2 compatible voice over IP softphone core.
 
 =head1 SYNOPSIS
 
-sflphoned --help
+B<sflphoned> [OPTION]...
 
 =head1 DESCRIPTION
 
diff --git a/sflphone-common/src/audio/audiortp.cpp b/sflphone-common/src/audio/audiortp.cpp
deleted file mode 100644
index 26615888a789d5b863c2a3e9f284fca381e2b458..0000000000000000000000000000000000000000
--- a/sflphone-common/src/audio/audiortp.cpp
+++ /dev/null
@@ -1,685 +0,0 @@
-/*
- *  Copyright (C) 2004-2008 Savoir-Faire Linux inc.
- *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *  Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>
- *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
- *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com>
- *  Author: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <cstdio>
-#include <cstdlib>
-#include <ccrtp/rtp.h>
-#include <assert.h>
-#include <cstring>
-#include <math.h>
-#include <dlfcn.h>
-#include <iostream>
-#include <sstream>
-
-#include "../global.h"
-#include "../manager.h"
-#include "codecDescriptor.h"
-#include "audiortp.h"
-#include "audiolayer.h"
-#include "ringbuffer.h"
-#include "../user_cfg.h"
-#include "../sipcall.h"
-
-
-int AudioRtpRTX::count_rtp = 0;
-
-////////////////////////////////////////////////////////////////////////////////
-// AudioRtp
-////////////////////////////////////////////////////////////////////////////////
-AudioRtp::AudioRtp() :_RTXThread (0), _symmetric(), _rtpMutex()
-{
-
-}
-
-AudioRtp::~AudioRtp (void)
-{
-    ost::MutexLock m (_rtpMutex);
-
-    if (_RTXThread != _RTXThread) {
-        delete _RTXThread;
-        _RTXThread = 0;
-    }
-
-}
-
-void
-AudioRtp::createNewSession (SIPCall *ca)
-{
-
-    ost::MutexLock m (_rtpMutex);
-
-    _debug ("AudioRtp::Create new rtp session");
-
-    // something should stop the thread before...
-
-    if (_RTXThread != 0) {
-        _debug ("**********************************************************");
-        _debug ("! ARTP Failure: Thread already exists..., stopping it");
-        _debug ("**********************************************************");
-        delete _RTXThread;
-        _RTXThread = 0;
-    }
-
-    // Start RTP Send/Receive threads
-    _symmetric = Manager::instance().getConfigInt (SIGNALISATION,SYMMETRIC) ? true : false;
-
-    _RTXThread = new AudioRtpRTX (ca, _symmetric);
-
-}
-
-int
-AudioRtp::start (void)
-{
-    ost::MutexLock m (_rtpMutex);
-
-    if (_RTXThread == 0) {
-        _debug ("! ARTP Failure: Cannot start audiortp thread since not yet created");
-        throw AudioRtpException();
-    }
-
-
-    try {
-        if (_RTXThread->start() != 0) {
-            _debug ("! ARTP Failure: unable to start RTX Thread");
-            return -1;
-        }
-    } catch (...) {
-        _debugException ("! ARTP Failure: when trying to start a thread");
-        throw;
-    }
-
-    return 0;
-}
-
-
-bool
-AudioRtp::closeRtpSession ()
-{
-
-    ost::MutexLock m (_rtpMutex);
-    // This will make RTP threads finish.
-    _debug ("AudioRtp::Stopping rtp session");
-
-    try {
-        if (_RTXThread != 0) {
-            delete _RTXThread;
-            _RTXThread = 0;
-        }
-    } catch (...) {
-        _debugException ("! ARTP Exception: when stopping audiortp");
-        throw;
-    }
-
-    _debug ("AudioRtp::Audio rtp stopped");
-
-    return true;
-}
-
-/*
-void
-AudioRtp::setRecording()
-{
-
-    _debug ("AudioRtp::setRecording");
-    _RTXThread->_ca->setRecording();
-
-}
-*/
-
-////////////////////////////////////////////////////////////////////////////////
-// AudioRtpRTX Class                                                          //
-////////////////////////////////////////////////////////////////////////////////
-AudioRtpRTX::AudioRtpRTX (SIPCall *sipcall, bool sym) : time (new ost::Time()), _ca (sipcall), _sessionSend (NULL), _sessionRecv (NULL), _session (NULL),
-        _sym (sym), micData (NULL), micDataConverted (NULL), micDataEncoded (NULL), spkrDataDecoded (NULL), spkrDataConverted (NULL),
-        converter (NULL), _layerSampleRate(),_codecSampleRate(), _layerFrameSize(), _audiocodec (NULL)
-{
-
-    setCancel (cancelDefault);
-    // AudioRtpRTX should be close if we change sample rate
-    // TODO: Change bind address according to user settings.
-    // TODO: this should be the local ip not the external (router) IP
-    std::string localipConfig = _ca->getLocalIp(); // _ca->getLocalIp();
-    ost::InetHostAddress local_ip (localipConfig.c_str());
-
-    _debug ("%i", _ca->getLocalAudioPort());
-    _session = new ost::SymmetricRTPSession (local_ip, _ca->getLocalAudioPort());
-    // _session = new ost::RTPSessionBase(local_ip, _ca->getLocalAudioPort());
-    _sessionRecv = NULL;
-    _sessionSend = NULL;
-
-    //mic, we receive from soundcard in stereo, and we send encoded
-    //encoding before sending
-    _audiolayer = Manager::instance().getAudioDriver();
-    _layerFrameSize = _audiolayer->getFrameSize(); // in ms
-    _layerSampleRate = _audiolayer->getSampleRate();
-
-    // initBuffers();
-
-    // initAudioRtpSession();
-
-    _payloadIsSet = false;
-    _remoteIpIsSet = false;
-
-
-    count_rtp++;
-    // open files
-    std::string s_input;
-    std::string s_output;
-
-    // convert count into string
-    std::stringstream out;
-    out << count_rtp;
-
-    s_input = "/home/alexandresavard/Desktop/buffer_record/rtp_input_";
-    s_input.append (out.str());
-
-    s_output = "/home/alexandresavard/Desktop/buffer_record/rtp_output_";
-    s_output.append (out.str());
-
-    rtp_input_rec = new std::fstream();
-    rtp_output_rec = new std::fstream();
-
-    rtp_input_rec->open (s_input.c_str(), std::fstream::out);
-    rtp_output_rec->open (s_output.c_str(), std::fstream::out);
-
-}
-
-AudioRtpRTX::~AudioRtpRTX ()
-{
-
-    ost::MutexLock m (_rtpRtxMutex);
-
-    _debug ("Delete AudioRtpRTX instance in callid %s", _ca->getCallId().c_str());
-
-    try {
-        this->terminate();
-    } catch (...) {
-        _debugException ("! ARTP: Thread destructor didn't terminate correctly");
-        throw;
-    }
-
-    _debug ("Remove audio stream for call id %s", _ca->getCallId().c_str());
-
-    _audiolayer->getMainBuffer()->unBindAll (_ca->getCallId());
-    // Manager::instance().removeStream(_ca->getCallId());
-
-    _debug ("DELETE print micData address %p", micData);
-    delete [] micData;
-    micData = NULL;
-    delete [] micDataConverted;
-    micDataConverted = NULL;
-    delete [] micDataEncoded;
-    micDataEncoded = NULL;
-
-    delete [] spkrDataDecoded;
-    spkrDataDecoded = NULL;
-    delete [] spkrDataConverted;
-    spkrDataConverted = NULL;
-
-    delete time;
-    time = NULL;
-
-    delete converter;
-    converter = NULL;
-
-    _ca = 0;
-    // _session->terminate();
-
-    delete _session;
-    _session = NULL;
-
-    _debug ("AudioRtpRTX instance deleted");
-
-    rtp_input_rec->close();
-    rtp_output_rec->close();
-
-}
-
-
-void
-AudioRtpRTX::initBuffers()
-{
-    ost::MutexLock m (_rtpRtxMutex);
-
-    _debug ("AudioRtpRTX::initBuffers Init RTP buffers for %s", _ca->getCallId().c_str());
-
-    converter = new SamplerateConverter (_layerSampleRate , _layerFrameSize);
-
-    nbSamplesMax = (int) (_layerSampleRate * _layerFrameSize /1000);
-
-
-    _debug ("AudioRtpRTX::initBuffers NBSAMPLEMAX %i", nbSamplesMax);
-
-    micData = new SFLDataFormat[nbSamplesMax];
-    _debug ("CREATE print micData address %p", micData);
-    micDataConverted = new SFLDataFormat[nbSamplesMax];
-    micDataEncoded = new unsigned char[nbSamplesMax];
-
-    spkrDataConverted = new SFLDataFormat[nbSamplesMax];
-    spkrDataDecoded = new SFLDataFormat[nbSamplesMax];
-
-    Manager::instance().addStream (_ca->getCallId());
-    // _audiolayer->getMainBuffer()->bindCallID(_ca->getCallId());
-}
-
-
-void
-AudioRtpRTX::initAudioRtpSession (void)
-{
-
-    try {
-
-        _session->setSchedulingTimeout (100000);
-        _session->setExpireTimeout (1000000);
-
-
-    } catch (...) {
-        _debugException ("! ARTP Failure: initialisation failed");
-        throw;
-    }
-
-}
-
-void
-AudioRtpRTX::setRtpSessionMedia (void)
-{
-
-    if (_ca == 0) {
-        _debug (" !ARTP: No call, can't init RTP media");
-        return;
-    }
-
-    AudioCodecType pl = (AudioCodecType) _ca->getLocalSDP()->get_session_media()->getPayload();
-
-    _audiocodec = Manager::instance().getCodecDescriptorMap().instantiateCodec (pl);
-
-    if (_audiocodec == NULL) {
-        _debug (" !ARTP: No audiocodec, can't init RTP media");
-        return;
-    }
-
-    _debug ("Init audio RTP session: codec payload %i", _audiocodec->getPayload());
-
-    // _audioCodecInstance = *_audiocodec;
-
-    _codecSampleRate = _audiocodec->getClockRate();
-
-    _codecFrameSize = _audiocodec->getFrameSize();
-
-    if (_audiocodec->getPayload() == 9) {
-        _payloadIsSet = _session->setPayloadFormat (ost::DynamicPayloadFormat ( (ost::PayloadType) _audiocodec->getPayload(), _audiocodec->getClockRate()));
-    } else if (_audiocodec->hasDynamicPayload()) {
-        _payloadIsSet = _session->setPayloadFormat (ost::DynamicPayloadFormat ( (ost::PayloadType) _audiocodec->getPayload(), _audiocodec->getClockRate()));
-    } else if (!_audiocodec->hasDynamicPayload() && _audiocodec->getPayload() != 9) {
-        _payloadIsSet = _session->setPayloadFormat (ost::StaticPayloadFormat ( (ost::StaticPayloadType) _audiocodec->getPayload()));
-    }
-
-
-
-}
-
-void
-AudioRtpRTX::setRtpSessionRemoteIp (void)
-{
-
-    if (!_remoteIpIsSet) {
-
-        _debug ("++++++++++++++++++++++++++ SET IP ADDRESS ++++++++++++++++++++++++++++");
-
-        if (_ca == 0) {
-            _debug (" !ARTP: No call, can't init RTP media ");
-            return;
-        }
-
-        ost::InetHostAddress remote_ip (_ca->getLocalSDP()->get_remote_ip().c_str());
-
-        _debug ("Init audio RTP session: remote ip %s", _ca->getLocalSDP()->get_remote_ip().data());
-
-        if (!remote_ip) {
-            _debug (" !ARTP Thread Error: Target IP address [%s] is not correct!", _ca->getLocalSDP()->get_remote_ip().data());
-            return;
-        }
-
-        _debug ("++++Address: %s, audioport: %d", _ca->getLocalSDP()->get_remote_ip().c_str(), _ca->getLocalSDP()->get_remote_audio_port());
-
-        _debug ("++++Audioport: %d", (int) _ca->getLocalSDP()->get_remote_audio_port());
-
-        if (!_session->addDestination (remote_ip, (unsigned short) _ca->getLocalSDP()->get_remote_audio_port())) {
-            _debug (" !ARTP Thread Error: can't add destination to session!");
-            return;
-        }
-
-        _remoteIpIsSet = true;
-    } else {
-        _debug ("+++++++++++++++++++++++ IP ADDRESS ALREADY SET ++++++++++++++++++++++++");
-    }
-
-}
-
-
-
-float
-AudioRtpRTX::computeCodecFrameSize (int codecSamplePerFrame, int codecClockRate)
-{
-    return ( (float) codecSamplePerFrame * 1000.0) / (float) codecClockRate;
-}
-
-int
-AudioRtpRTX::computeNbByteAudioLayer (float codecFrameSize)
-{
-    return (int) ( (float) _layerSampleRate * codecFrameSize * (float) sizeof (SFLDataFormat) / 1000.0);
-}
-
-
-int
-AudioRtpRTX::processDataEncode()
-{
-
-    // compute codec framesize in ms
-    float fixed_codec_framesize = computeCodecFrameSize (_audiocodec->getFrameSize(), _audiocodec->getClockRate());
-
-    // compute nb of byte to get coresponding to 20 ms at audio layer frame size (44.1 khz)
-    int maxBytesToGet = computeNbByteAudioLayer (fixed_codec_framesize);
-
-    // available bytes inside ringbuffer
-    int availBytesFromMic = _audiolayer->getMainBuffer()->availForGet (_ca->getCallId());
-
-    // _debug("AudioRtpRTX::processDataEncode() callid: %s availBytesFromMic %i", _ca->getCallId().c_str(), availBytesFromMic);
-
-    // _debug("AudioRtpRTX::processDataEncode: availBytesFromMic: %i", availBytesFromMic);
-    // set available byte to maxByteToGet
-    int bytesAvail = (availBytesFromMic < maxBytesToGet) ? availBytesFromMic : maxBytesToGet;
-    // _debug("bytesAvail %i", bytesAvail);
-
-    if (bytesAvail == 0)
-        return 0;
-
-    // _debug("AudioRtpRTX::processDataEncode: bytesAvail: %i", bytesAvail);
-    // Get bytes from micRingBuffer to data_from_mic
-    int nbSample = _audiolayer->getMainBuffer()->getData (micData , bytesAvail, 100, _ca->getCallId()) / sizeof (SFLDataFormat);
-
-    rtp_output_rec->write ( (char*) micData, bytesAvail);
-
-    // _debug("AudioRtpRTX::processDataEncode: nbSample: %i", nbSample);
-
-    // nb bytes to be sent over RTP
-    int compSize = 0;
-
-    // test if resampling is required
-    if (_audiocodec->getClockRate() != _layerSampleRate) {
-
-        int nb_sample_up = nbSample;
-        //_debug("_nbSample audiolayer->getMic(): %i ", nbSample);
-
-        // Store the length of the mic buffer in samples for recording
-        _nSamplesMic = nbSample;
-
-        nbSample = reSampleData (micData , micDataConverted, _audiocodec->getClockRate(), nb_sample_up, DOWN_SAMPLING);
-
-        compSize = _audiocodec->codecEncode (micDataEncoded, micDataConverted, nbSample*sizeof (int16));
-
-    } else {
-        // no resampling required
-        compSize = _audiocodec->codecEncode (micDataEncoded, micData, nbSample*sizeof (int16));
-    }
-
-    return compSize;
-}
-
-
-void
-AudioRtpRTX::processDataDecode (unsigned char* spkrData, unsigned int size, int& countTime)
-{
-    if (_audiocodec != NULL) {
-
-        // Return the size of data in bytes
-        int expandedSize = _audiocodec->codecDecode (spkrDataDecoded , spkrData , size);
-
-        // buffer _receiveDataDecoded ----> short int or int16, coded on 2 bytes
-        int nbSample = expandedSize / sizeof (SFLDataFormat);
-
-        // test if resampling is required
-
-        if (_audiocodec->getClockRate() != _layerSampleRate) {
-
-            // Do sample rate conversion
-            int nb_sample_down = nbSample;
-            nbSample = reSampleData (spkrDataDecoded, spkrDataConverted, _codecSampleRate, nb_sample_down, UP_SAMPLING);
-
-            rtp_input_rec->write ( (char*) spkrDataConverted, nbSample * sizeof (SFLDataFormat));
-
-            // Store the number of samples for recording
-            _nSamplesSpkr = nbSample;
-
-
-
-            // put data in audio layer, size in byte
-            _audiolayer->getMainBuffer()->putData (spkrDataConverted, nbSample * sizeof (SFLDataFormat), 100, _ca->getCallId());
-
-        } else {
-
-            // Stor the number of samples for recording
-            _nSamplesSpkr = nbSample;
-
-            // put data in audio layer, size in byte
-            _audiolayer->getMainBuffer()->putData (spkrDataDecoded, nbSample * sizeof (SFLDataFormat), 100, _ca->getCallId());
-        }
-
-        // Notify (with a beep) an incoming call when there is already a call
-        countTime += time->getSecond();
-
-        if (Manager::instance().incomingCallWaiting() > 0) {
-            countTime = countTime % 500; // more often...
-
-            if (countTime == 0) {
-                Manager::instance().notificationIncomingCall();
-            }
-        }
-
-    } else {
-        countTime += time->getSecond();
-    }
-}
-
-void
-AudioRtpRTX::sendSessionFromMic (int timestamp)
-{
-    // STEP:
-    //   1. get data from mic
-    //   2. convert it to int16 - good sample, good rate
-    //   3. encode it
-    //   4. send it
-
-    timestamp += time->getSecond();
-    // no call, so we do nothing
-
-    if (_ca==0) {
-        _debug (" !ARTP: No call associated (mic)");
-        return;
-    }
-
-    // AudioLayer* audiolayer = Manager::instance().getAudioDriver();
-    if (!_audiolayer) {
-        _debug (" !ARTP: No audiolayer available for MIC");
-        return;
-    }
-
-    if (!_audiocodec) {
-        _debug (" !ARTP: No audiocodec available for MIC");
-        return;
-    }
-
-
-
-    int compSize = processDataEncode();
-
-    // putData put the data on RTP queue, sendImmediate bypass this queue
-    // _debug("AudioRtpRTX::sendSessionFromMic: timestamp: %i, compsize: %i", timestamp, compSize);
-
-    if ( (compSize != 0) && (micDataEncoded != NULL))
-        _session->putData (timestamp, micDataEncoded, compSize);
-
-    // _session->sendImmediate(timestamp, micDataEncoded, compSize);
-
-
-}
-
-
-void
-AudioRtpRTX::receiveSessionForSpkr (int& countTime)
-{
-
-    if (_ca == 0) {
-        return;
-    }
-
-    if (!_audiolayer) {
-        _debug (" !ARTP: No audiolayer available for SPEAKER");
-        return;
-    }
-
-    if (!_audiocodec) {
-        _debug (" !ARTP: No audiocodec available for SPEAKER");
-        return;
-    }
-
-    const ost::AppDataUnit* adu = NULL;
-
-    // int is_waiting = _session->isWaiting();
-
-    // if (is_waiting != 0)
-    adu = _session->getData (_session->getFirstTimestamp());
-
-    // else
-    //   return;
-
-
-
-    if (adu == NULL)
-        return;
-
-    unsigned char* spkrData  = (unsigned char*) adu->getData(); // data in char
-
-    unsigned int size = adu->getSize(); // size in char
-
-    processDataDecode (spkrData, size, countTime);
-
-    if (adu != NULL) {
-        delete adu;
-        adu = NULL;
-    }
-
-}
-
-
-int
-AudioRtpRTX::reSampleData (SFLDataFormat *input, SFLDataFormat *output, int sampleRate_codec, int nbSamples, int status)
-{
-    if (status==UP_SAMPLING) {
-        return converter->upsampleData (input, output, sampleRate_codec , _layerSampleRate , nbSamples);
-    } else if (status==DOWN_SAMPLING) {
-        return converter->downsampleData (micData , micDataConverted , sampleRate_codec , _layerSampleRate , nbSamples);
-    } else
-
-        return 0;
-}
-
-
-
-void
-AudioRtpRTX::run ()
-{
-
-    int sessionWaiting;
-
-    initBuffers();
-    initAudioRtpSession();
-    setRtpSessionRemoteIp();
-    setRtpSessionMedia();
-
-    int timestep = _codecFrameSize;
-
-    int countTime = 0; // for receive
-
-    int threadSleep = 0;
-
-    if (_codecSampleRate != 0)
-        threadSleep = (_codecFrameSize * 1000) / _codecSampleRate;
-    else
-        threadSleep = _layerFrameSize;
-
-    TimerPort::setTimer (threadSleep);
-
-    _audiolayer->startStream();
-
-    _audiolayer->getMainBuffer()->flush (_ca->getCallId());
-
-    _session->startRunning();
-
-    int timestamp = _session->getCurrentTimestamp(); // for mic
-
-    _debug ("- ARTP Action: Start call %s",_ca->getCallId().c_str());
-
-    while (!testCancel()) {
-
-
-        // _debug("Main while loop for call: %s", _ca->getCallId().c_str());
-        // Send session
-        sessionWaiting = _session->isWaiting();
-
-        sendSessionFromMic (timestamp);
-        timestamp += timestep;
-        // timestamp = _session->getCurrentTimestamp();
-
-        // Recv session
-        receiveSessionForSpkr (countTime);
-
-        // Let's wait for the next transmit cycle
-
-
-        if (sessionWaiting == 1) {
-            // Record mic and speaker during conversation
-            _ca->recAudio.recData (spkrDataConverted,micData,_nSamplesSpkr,_nSamplesMic);
-        } else {
-            // Record mic only while leaving a message
-            _ca->recAudio.recData (micData,_nSamplesMic);
-        }
-
-
-        // Let's wait for the next transmit cycle
-        Thread::sleep (TimerPort::getTimer());
-
-
-        // TimerPort::incTimer(20); // 'frameSize' ms
-        TimerPort::incTimer (threadSleep);
-
-    }
-
-    // _audiolayer->stopStream();
-    _debug ("- ARTP Action: Stop call %s",_ca->getCallId().c_str());
-
-
-}
-
-
-// EOF
diff --git a/sflphone-common/src/audio/audiortp.h b/sflphone-common/src/audio/audiortp.h
deleted file mode 100644
index f9dc1671a9297b15cd79bab4a537b456340a370d..0000000000000000000000000000000000000000
--- a/sflphone-common/src/audio/audiortp.h
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- *  Copyright (C) 2004-2008 Savoir-Faire Linux inc.
- *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *  Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>
- *  Author: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
- *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
- *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com>
- * 
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- * 
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __AUDIO_RTP_H__
-#define __AUDIO_RTP_H__
-
-#include <cstdio>
-#include <cstdlib>
-#include <iostream>
-#include <ccrtp/rtp.h>
-#include <cc++/numbers.h>
-
-#include "../global.h"
-// #include "plug-in/audiorecorder/audiorecord.h"
-#include "../samplerateconverter.h"
-#include "codecDescriptor.h"
-
-#include <fstream>
-
-#define UP_SAMPLING 0
-#define DOWN_SAMPLING 1
-
-
-
-class AudioRtpException: public std::exception
-{
-  virtual const char* what() const throw()
-  {
-    return "AudioRtpException occured";
-  }
-};
-
-
-/**
- * @file audiortp.h
- * @brief Manage the real-time data transport in a SIP call
- */
-
-
-class SIPCall;
-
-///////////////////////////////////////////////////////////////////////////////
-// Two pair of sockets
-///////////////////////////////////////////////////////////////////////////////
-class AudioRtpRTX : public ost::Thread, public ost::TimerPort {
-  public:
-    /**
-     * Constructor
-     * @param sipcall The pointer on the SIP call
-     * @param sym     Tells whether or not the voip links are symmetric
-     */
-    AudioRtpRTX (SIPCall* sipcall, bool sym);
-
-    /**
-     * Destructor
-     */
-    ~AudioRtpRTX();
-
-    /** For incoming call notification */ 
-    ost::Time *time;
-
-    /** Thread associated method */    
-    virtual void run ();
-
-    /** A SIP call */
-    SIPCall* _ca;
-
-    /**
-     * Update RTP session media info as received from SDP negociation 
-     */
-    void setRtpSessionMedia(void);
-
-    /**
-     * Update RTP session remote ip destination as received from sip transaction 
-     */
-    void setRtpSessionRemoteIp(void); 
-
-    
-    friend class RtpTest;
-
-  private:
-
-    // copy constructor
-    AudioRtpRTX(const AudioRtpRTX& rh);
-  
-    // assignment operator
-    AudioRtpRTX& operator=(const AudioRtpRTX& rh);
-
-    /** RTP session to send data */
-    ost::RTPSession *_sessionSend;
-    
-    /** RTP session to receive data */
-    ost::RTPSession *_sessionRecv;
-
-    /** RTP symmetric session ( receive and send data in the same session ) */
-    ost::SymmetricRTPSession *_session;
-
-    /** Semaphore */
-    // ost::Semaphore _start;
-
-    /** Is the session symmetric or not */
-    bool _sym;
-
-    /** Mic-data related buffers */
-    SFLDataFormat* micData;
-    SFLDataFormat* micDataConverted;
-    unsigned char* micDataEncoded;
-
-    /** Speaker-data related buffers */
-    SFLDataFormat* spkrDataDecoded;
-    SFLDataFormat* spkrDataConverted;
-
-    /** Sample rate converter object */
-    SamplerateConverter* converter;
-
-    /** audio layer */
-    AudioLayer *_audiolayer;
-
-    /** Variables to process audio stream: sample rate for playing sound (typically 44100HZ) */
-    int _layerSampleRate;  
-
-    /** Sample rate of the codec we use to encode and decode (most of time 8000HZ) */
-    int _codecSampleRate;
-
-    /** Length of the sound frame we capture in ms (typically 20ms) */
-    int _layerFrameSize; 
-
-    /** Codecs frame size in samples (20 ms => 882 at 44.1kHz)
-        The exact value is stored in the codec */
-    int _codecFrameSize;
-
-    /** Speaker buffer length in samples once the data are resampled
-     *  (used for mixing and recording)
-     */
-    int _nSamplesSpkr; 
-
-    /** Mic buffer length in samples once the data are resampled
-     *  (used for mixing and recording)
-     */
-    int _nSamplesMic;
-    
-    /**
-     * Maximum number of sample for audio buffers (mic and spkr)
-     */
-    int nbSamplesMax;
-
-
-    
-    bool _payloadIsSet;
-    bool _remoteIpIsSet;
-    
-    /**
-     * Init the RTP session. Create either symmetric or double sessions to manage data transport
-     * Set the payloads according to the manager preferences
-     */
-    void initAudioRtpSession(void);
-    
-    /**
-     * Return the lenth the codec frame in ms 
-     */
-    float computeCodecFrameSize(int codecSamplePerFrame, int codecClockRate);
-
-    /**
-     * Compute nb of byte to get coresponding to X ms at audio layer frame size (44.1 khz) 
-     */
-    int computeNbByteAudioLayer(float codecFrameSize);
-
-
-    int processDataEncode();
-
-
-    void processDataDecode(unsigned char* spkrData, unsigned int size, int& countTime);
-
-
-    /**
-     * Get the data from the mic, encode it and send it through the RTP session
-     * @param timestamp	To manage time and synchronizing
-     */ 		 	
-    void sendSessionFromMic(int timestamp);
-    
-    /**
-     * Get the data from the RTP packets, decode it and send it to the sound card
-     * @param countTime	To manage time and synchronizing
-     */		 	
-    void receiveSessionForSpkr(int& countTime);
-
-    /**
-     * Init the buffers used for processing sound data
-     */ 
-    void initBuffers(void);
-
-    /**
-     * Call the appropriate function, up or downsampling
-     * @param sampleRate_codec	The sample rate of the codec selected to encode/decode the data
-     * @param nbSamples		Number of samples to process
-     * @param status  Type of resampling
-     *		      UPSAMPLING
-     *		      DOWNSAMPLING
-     * @return int The number of samples after process
-     */ 
-    int reSampleData(SFLDataFormat *input, SFLDataFormat *output,int sampleRate_codec, int nbSamples, int status);
-    
-    /** The audio codec used during the session */
-    AudioCodec *_audiocodec;
-    // AudioCodec _audioCodecInstance;
-
-    /** Mutex */
-    ost::Mutex _rtpRtxMutex;
-
-  public:
-
-    std::fstream *rtp_input_rec;
-    std::fstream *rtp_output_rec;
-
-    static int count_rtp;
-
-   
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// Main class rtp
-///////////////////////////////////////////////////////////////////////////////
-class AudioRtp {
-  public:
-    /**
-     * Constructor
-     */
-    AudioRtp();
-    
-    /**
-     * Destructor
-     */
-    ~AudioRtp();
-
-    /**
-     * Create a brand new RTP session by calling the AudioRtpRTX constructor
-     * @param ca A pointer on a SIP call
-     */
-    void createNewSession (SIPCall *ca);
-    
-    /**
-     * Start the AudioRtpRTX thread created with createNewSession
-     */
-    int start(void);
-    
-    /**
-     * Close a RTP session and kills the remaining threads
-     */
-    bool closeRtpSession( void );
-
-    /**
-     * Start recording
-     */
-    // void setRecording ();
-
-    friend class RtpTest;
-
-    /**
-     * 
-     */ 
-    inline AudioRtpRTX * getAudioRtpRtxThread(void) { return _RTXThread; }
-  private:
-    // copy constructor
-    AudioRtp(const AudioRtp& rh);
-  
-    // assignment operator
-    AudioRtp& operator=(const AudioRtp& rh);
-
-    /** The RTP thread */
-    AudioRtpRTX* _RTXThread;
-
-    /** Symmetric session or not */
-    bool _symmetric;
-
-    /** Mutex */
-    ost::Mutex _rtpMutex;
-
-};
-
-#endif // __AUDIO_RTP_H__
diff --git a/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp b/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp
index cb3480979ef3ec910d2cbc07588b68dc96966410..09756c4adff42163459b71e15d7f3cec7fc80c21 100644
--- a/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp
+++ b/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp
@@ -22,7 +22,6 @@
 #include "AudioZrtpSession.h"
 #include "AudioSrtpSession.h"
 #include "AudioSymmetricRtpSession.h"
-
 #include "manager.h"
 #include "account.h"
 #include "sip/sipcall.h"
@@ -122,7 +121,7 @@ void AudioRtpFactory::initAudioRtpSession (SIPCall * ca)
     }
 }
 
-void AudioRtpFactory::start (void)
+void AudioRtpFactory::start (AudioCodec* audiocodec)
 {
     if (_rtpSession == NULL) {
         throw AudioRtpFactoryException ("RTP: Error: _rtpSession was null when trying to start audio thread");
@@ -131,7 +130,7 @@ void AudioRtpFactory::start (void)
     switch (_rtpSessionType) {
 
         case Sdes:
-	    if (static_cast<AudioSrtpSession *> (_rtpSession)->startRtpThread() != 0) {
+	    if (static_cast<AudioSrtpSession *> (_rtpSession)->startRtpThread(audiocodec) != 0) {
                 throw AudioRtpFactoryException ("RTP: Error: Failed to start AudioSRtpSession thread");
             }
 	    break;
@@ -139,7 +138,7 @@ void AudioRtpFactory::start (void)
         case Symmetric:
             _debug ("Starting symmetric rtp thread");
 
-            if (static_cast<AudioSymmetricRtpSession *> (_rtpSession)->startRtpThread() != 0) {
+            if (static_cast<AudioSymmetricRtpSession *> (_rtpSession)->startRtpThread(audiocodec) != 0) {
                 throw AudioRtpFactoryException ("RTP: Error: Failed to start AudioSymmetricRtpSession thread");
             }
 
@@ -147,7 +146,7 @@ void AudioRtpFactory::start (void)
 
         case Zrtp:
 
-            if (static_cast<AudioZrtpSession *> (_rtpSession)->startRtpThread() != 0) {
+            if (static_cast<AudioZrtpSession *> (_rtpSession)->startRtpThread(audiocodec) != 0) {
                 throw AudioRtpFactoryException ("RTP: Error: Failed to start AudioZrtpSession thread");
             }
             break;
@@ -210,6 +209,15 @@ void AudioRtpFactory::updateDestinationIpAddress (void)
     }
 }
 
+sfl::AudioSymmetricRtpSession * AudioRtpFactory::getAudioSymetricRtpSession()
+{
+	if ( (_rtpSessionType == Symmetric) && (_rtpSessionType != NULL)) {
+	        return static_cast<AudioSymmetricRtpSession *> (_rtpSession);
+	    } else {
+	        throw AudioRtpFactoryException("RTP: Error: _rtpSession is NULL in getAudioSymetricRtpSession");
+	    }
+}
+
 sfl::AudioZrtpSession * AudioRtpFactory::getAudioZrtpSession()
 {
     if ( (_rtpSessionType == Zrtp) && (_rtpSessionType != NULL)) {
diff --git a/sflphone-common/src/audio/audiortp/AudioRtpFactory.h b/sflphone-common/src/audio/audiortp/AudioRtpFactory.h
index a1c93d2cdcfe9b78186188d45cbe442d2fc8879b..de16a31fe610b5ae2e27420f451d47bb87d0b7a9 100644
--- a/sflphone-common/src/audio/audiortp/AudioRtpFactory.h
+++ b/sflphone-common/src/audio/audiortp/AudioRtpFactory.h
@@ -23,6 +23,7 @@
 #include <cc++/thread.h>
 
 #include "sip/SdesNegotiator.h"
+#include "audio/codecs/audiocodec.h"
 
 class SdesNegotiator;
 class SIPCall;
@@ -30,6 +31,7 @@ class SIPCall;
 namespace sfl {
     class AudioZrtpSession;
     class AudioSrtpSession;
+    class AudioSymmetricRtpSession;
 }
 
 namespace sfl {
@@ -76,7 +78,7 @@ namespace sfl {
 	 * file. initAudioRtpSession must have been called prior to that.
 	 * @param None
 	 */
-	void start();
+	void start(AudioCodec*);
 
 	/**
 	 * Stop the audio rtp thread of the type specified in the configuration
@@ -98,6 +100,8 @@ namespace sfl {
 	 */
 	inline void * getAudioRtpSession(void) { return _rtpSession; }
 
+	AudioSymmetricRtpSession * getAudioSymetricRtpSession();
+
 	/** 
 	 * @param None
 	 * @return The internal audio rtp session type
diff --git a/sflphone-common/src/audio/audiortp/AudioRtpSession.h b/sflphone-common/src/audio/audiortp/AudioRtpSession.h
index 7ecfe5ecb9cb81bac9e042c62f6e531bb4f28da5..ad271a61989e6dee80d4669935f0d4cd8295fe6e 100644
--- a/sflphone-common/src/audio/audiortp/AudioRtpSession.h
+++ b/sflphone-common/src/audio/audiortp/AudioRtpSession.h
@@ -75,7 +75,7 @@ namespace sfl {
             // Thread associated method
             virtual void run ();
             
-            int startRtpThread();
+            int startRtpThread(AudioCodec*);
 
             /**
              * Used mostly when receiving a reinvite
@@ -92,23 +92,24 @@ namespace sfl {
             	 */
             void sendDtmfEvent(sfl::DtmfEvent *dtmf);
 
+            inline float computeCodecFrameSize (int codecSamplePerFrame, int codecClockRate) {
+                return ( (float) codecSamplePerFrame * 1000.0) / (float) codecClockRate;
+            }
+
+            int computeNbByteAudioLayer (float codecFrameSize) {
+                return (int) ( ((float) _converterSamplingRate * codecFrameSize * sizeof(SFLDataFormat))/ 1000.0);
+            }
+
         private:
         
             void initBuffers(void);
             
             void setSessionTimeouts(void);
-            void setSessionMedia(void);
+            void setSessionMedia(AudioCodec*);
             void setDestinationIpAddress(void);
                 
             int processDataEncode(void);
             void processDataDecode(unsigned char * spkrData, unsigned int size);
-            
-            inline float computeCodecFrameSize (int codecSamplePerFrame, int codecClockRate) {
-                return ( (float) codecSamplePerFrame * 1000.0) / (float) codecClockRate;
-            }          
-            int computeNbByteAudioLayer (float codecFrameSize) {
-                return (int) ( ((float) _converterSamplingRate * codecFrameSize * sizeof(SFLDataFormat))/ 1000.0);
-            }
           
             void sendMicData();
             void receiveSpeakerData ();
@@ -206,7 +207,6 @@ namespace sfl {
             
         protected:
              SIPCall * _ca;
-            
     };    
     
     template <typename D>
@@ -305,19 +305,9 @@ namespace sfl {
     }
     
     template <typename D>
-    void AudioRtpSession<D>::setSessionMedia(void)
+    void AudioRtpSession<D>::setSessionMedia(AudioCodec* audiocodec)
     {
-        assert(_ca);
-
-        _debug("RTP: Get audio codec for call %s", _ca->getCallId().c_str());
-
-        AudioCodecType pl = (AudioCodecType)_ca->getLocalSDP()->get_session_media()->getPayload();
-        _audiocodec = _manager->getCodecDescriptorMap().instantiateCodec(pl);
-
-        if (!_audiocodec) {
-            _error ("RTP: Error: No audiocodec, can't init RTP media");
-            throw AudioRtpSessionException();
-        }
+        _audiocodec = audiocodec;
 
         _debug ("RTP: Init codec payload %i", _audiocodec->getPayload());
 
@@ -620,23 +610,20 @@ namespace sfl {
     }
     
     template <typename D>
-    int AudioRtpSession<D>::startRtpThread ()
+    int AudioRtpSession<D>::startRtpThread (AudioCodec* audiocodec)
     {
         _debug("RTP: Starting main thread");
+        setSessionTimeouts();
+        setSessionMedia(audiocodec);
+	initBuffers();
         return start(_mainloopSemaphore);
     }
     
     template <typename D>
     void AudioRtpSession<D>::run ()
     {
-
-        setSessionTimeouts();
-        setSessionMedia();
-
-        initBuffers();
-
-        // Timestamp must be initialized randomly
-        _timestamp = static_cast<D*>(this)->getCurrentTimestamp();
+	// Timestamp must be initialized randomly
+	_timestamp = static_cast<D*>(this)->getCurrentTimestamp();
 
         int sessionWaiting;
         int threadSleep = 0;
diff --git a/sflphone-common/src/dbus/callmanager-introspec.xml b/sflphone-common/src/dbus/callmanager-introspec.xml
index 83a5c32acf22c3086a8f347113bc5733c2ab3be6..534bde252d506dcda4b622b0667c7b86005d8510 100644
--- a/sflphone-common/src/dbus/callmanager-introspec.xml
+++ b/sflphone-common/src/dbus/callmanager-introspec.xml
@@ -1,506 +1,699 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 
-<!-- Comment -->
-<!--*< File comment -->
+<node name="/callmanager-introspec" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+	<interface name="org.sflphone.SFLphone.CallManager">
 
-<node name="/org/sflphone/SFLphone" xmlns:dx="http://psiamp.org/dtd/doxygen_dbusxml.dtd">
+		<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+			<p>The CallManager interface is used to manage any call related actions.</p>
+			<p>Since SFLphone-daemon support multiple incoming/outgoing calls, any actions involving a specific call must address the method by the means of a unique callID. SFLphone-clients is responsible to generate the callID on outgoing call. On the other hand, SFLphone-daemon will generate a unique callID on incoming calls.</p>
+		</tp:docstring>
+		<method name="placeCall" tp:name-for-bindings="placeCall">
+			<tp:docstring>
+				<p>This is the main method in order to place a new call. The call is registered to the daemon using this method.</p>
+			</tp:docstring>
+			<arg type="s" name="accountID" direction="in">
+				<tp:docstring>
+					The ID of the account you want to make a call with. If the call is to be placed whithout any account by the means of a SIP URI (i.e. sip:num@server), the "IP2IP_PROFILE" is passed as the accountID. For more details about accounts see the configuration manager interface.
+				</tp:docstring>
+			</arg>
+			<arg type="s" name="callID" direction="in">
+				<tp:docstring>
+					The callID is a unique identifier that must be randomly generated on the  client's side. Any subsequent actions refering to this call must use this callID.
+				</tp:docstring>
+			</arg>
+			<arg type="s" name="to" direction="in">
+				<tp:docstring>
+					If bound to a VoIP account, then the argument is the phone number. In case of calls involving "IP2IP_PROFILE", a complete SIP URI must be specified.
+				</tp:docstring>
+			</arg>
+		</method>
 
-  <!--* The CallManager interface is used to manage any call related
-	actions. 
+		<method name="placeCallFirstAccount" tp:name-for-bindings="placeCallFirstAccount">
+			<tp:added version="0.9.8"/>
+			<tp:docstring>
+				Place a call with the fist registered account, regarding to the account list order.
+				<tp:rationale>
+					Use this function when you don't have any information about the accounts used (Ex: Firefly mozilla extension)			
+				</tp:rationale>
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in">
+				<tp:docstring>
+					The callID is a unique identifier that must be randomly generated on the  client's side. Any subsequent actions refering to this call must use this callID.
+				</tp:docstring>
+			</arg>
+			<arg type="s" name="to" direction="in">
+				<tp:docstring>
+					If bound to a VoIP account, then the argument is the phone number. In case of calls involving "IP2IP_PROFILE", a complete SIP URI must be specified.
+				</tp:docstring>
+			</arg>
+		</method>
 
-	Since SFLphone-daemon support multiple incoming/outgoing
-	calls, any actions involving a specific call must address the
-	method by the means of a unique callID. SFLphone-clients is
-	responsible to generate the callID on outgoing call. On the
-	otehr hand, SFLphone-daemon will generate a unique callID on
-	incoming calls.
+		<method name="refuse" tp:name-for-bindings="refuse">
+			<tp:docstring>
+				Refuse an incoming call.
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in">
+				<tp:docstring>
+					The callID.
+				</tp:docstring>
+			</arg>
 
-	Actions are performed asynchronously, SFLphone-client should
-	subscribe to the callStateChanged signal in order to be
-	notified on updates in call status.
-    -->
-	<interface name="org.sflphone.SFLphone.CallManager">
-	
-	<!--* This is the main method in order to place a new call. The
-            call is registered to the daemon using this method
-            specified a unique identifier and VoIP Accout to be bound with.
-
-			The account is specified by its accountID. 
-
-			If the call is to be placed whithout any account by the
-			means of a SIP URI (i.e. sip:num@server), the
-			"IP2IP_PROFILE" is passed as the accountID. For more
-			details about accounts see the configuration manager interface.
-
-			The callID is a unique identifier that must be randomly
-			generated on sflphone-client's side. Any subsequent
-			actions refering to this call must use this callID.
-
-			If bound to a VoIP account, the to argument is the phone
-			number. In case of calls involving "IP2IP_PROFILE", a
-			complete SIP URI must be specified.
-
-				@param[in] input accountID
-				@param[in] input callID
-			@param[in] input to
-        -->
-
-		<method name="placeCall">
-			<arg type="s" name="accountID" direction="in"/>
-			<arg type="s" name="callID" direction="in" />
-			<arg type="s" name="to" direction="in" />
-		</method>
-
-    <method name="placeCallFirstAccount">
-      <arg type="s" name="callID" direction="in"/>
-      <arg type="s" name="to" direction="in"/>
-    </method>
-    
-    <method name="refuse">
-      <!--* Method called to refuse an incoming call.
-
-            @param[in] input callID
-        -->
-      <arg type="s" name="callID" direction="in"/>
-    </method>
-    
-    <method name="accept">
-      <!--* Method called to answer an incoming call. Automatically put
-	    the current call on state HOLD.
-
-            @param[in] input callID
-        -->
-      <arg type="s" name="callID" direction="in"/>
-    </method>
-    
-    <method name="hangUp">
-      <!--* Method called to hangup a call in state "CURRENT" or "HOLD".
-
-            @param[in] input callID
-        -->
-      <arg type="s" name="callID" direction="in"/>
-    </method>
-
-    <method name="hangUpConference">
-      <!--* This method will hangup a conference in state ""
-	    every call participating to the conference.
-
-            @param[in] input confID
-        -->
-      <arg type="s" name="confID" direction="in"/>
-    </method>
-    
-    <method name="hold">
-      <!--* Place this call on state HOLD.
-
-            @param[in] input confID
-        -->
-      <arg type="s" name="callID" direction="in"/>
-    </method>
-    
-    <method name="unhold">
-      <!--* Place this call on state CURRENT.
-
-            @param[in] input confID
-        -->
-      <arg type="s" name="callID" direction="in"/>
-    </method>
-    
-    <method name="transfert">
-      <!--* Transfer a call to given phone number.
-
-            @param[in] input confID
-	    @param[in] input to
-        -->
-      <arg type="s" name="callID" direction="in"/>
-      <arg type="s" name="to" direction="in"/>
-    </method>
-    
-    <method name="playDTMF">
-      <!--* Dual-Tone multi-frequency. Tell SFLphone-daemon to play
-	    dial tones. A SIP INFO message is sent to notify the server.
-
-            @param[in] input Unicode charter for pressed key
-        -->
-      <arg type="s" name="key" direction="in"/>
-    </method>
-    
-    <method name="startTone">
-      <!--* This method is used to start audio stream and play tone.
-
-            @param[in] input confID
-        -->
-      <arg type="i" name="start" direction="in"/>
-      <arg type="i" name="type" direction="in"/>
-    </method>
-
-    <method name="setVolume">
-      <!--* This method sets the volume using a linear scale
-            [0,100]. Pulseaudio has its own mechanism to modify
-            application volume. This method is enabled only if the
-            ALSA API is used. 
-
-            @param[in] input device
-	    @param[in] input value
-        -->
-      <arg type="s" name="device" direction="in"/>
-      <arg type="d" name="value" direction="in"/>
-    </method>
-    
-    <method name="getVolume">
-      <!--* This method is enabled only if the ALSA API is used, Pulseaudio 
-	    has its own mechanism to modify application volume. Return
-	    a value on a linear scale [0,100].
-
-            @param[in] input device
-	    @param[out] output value
-        -->
-      <arg type="s" name="device" direction="in"/>
-      <arg type="d" name="value" direction="out"/>
-    </method>
-
-    <method name="joinParticipant">
-      <!--* Join two participants together to create a 3-way
-            conference including current SFLphone-client.
-	    conferenceCreated signal is emited on success.
-
-            @param[in] input sel_callID
-	    @param[in] input drag_callID
-        -->
-      <arg type="s" name="sel_callID" direction="in"/>
-      <arg type="s" name="drag_callID" direction="in"/>
-    </method>
-
-    <method name="addParticipant">
-      <!--* Join a new particiant to an already created conference.
-            conferenceChaged signal is emited on success.
-
-            @param[in] input callID
-	    @param[in] input confID
-        -->
-      <arg type="s" name="callID" direction="in"/>
-      <arg type="s" name="confID" direction="in"/>
-    </method>
-
-    <method name="addMainParticipant">
-      <!--* As SFLphone-daemon can handle multiple calls and
-            conferences. It may happen that SFLphone-client's user
-            leave a conference to answer an incoming call or
-            send new ones. This method is used to reintroduce
-            SFLphone-client's user into the conference.
-
-	    It put the current call on state HOLD or detach
-	    SFLphone-client's user from the another conference.
-
-	    @param[in] input confID
-        -->
-      <arg type="s" name="confID" direction="in"/>
-    </method>
-
-    <method name="detachParticipant">
-      <!--* Detach the given call from the conference. If only one
-            participant is left, the conference is deleted and the 
-	    "conferenceRemoved" signal is emited.
-
-            @param[in] input callID
-        -->
-      <arg type="s" name="callID" direction="in"/>
-    </method>
-
-    <method name="joinConference">
-      <!--* Method used to join two conference together.
-
-            @param[in] input sel_confID
-	    @param[in] input drag_confID
-        -->
-      <arg type="s" name="sel_confID" direction="in"/>
-      <arg type="s" name="drag_confID" direction="in"/>
-    </method>
-
-    <method name="getConferenceDetails">
-      <!--* Returns a hashtable containing conference details.
-
-	    "CONFID"
-	    "CONF_STATE"
-
-            @param[in] input confID
-	    @param[out] output a infos
-        -->
-      <arg type="s" name="callID" direction="in"/>
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
-      <arg type="a{ss}" name="infos" direction="out"/>
-    </method>
-    
-    <method name="getConferenceList">
-      <!--* Returns a list containing all active confID in SFLphone-daemon.
-
-	    @param[out] output list
-        -->
-      <arg type="as" name="list" direction="out"/>
-    </method>
-
-    <method name="setRecording">
-      <arg type="s" name="callID" direction="in"/>
-    </method>
-
-     <method name="getIsRecording">
-      <arg type="s" name="callID" direction="in"/>
-      <arg type="b" name="isRecording" direction="out"/>
-    </method>
-    
-    <method name="getCallDetails">
-      <!--* Returns a hashtable containing call details.
-
-	    "ACCOUNTID"
-            "PEER_NUMBER"
-            "PEER_NAME"
-            "DISPLAY_NAME"    Name to display
-            "CALL_STATE"      The state of the call
-            "CALL_TYPE"       SIP or IAX
-
-            @param[in] input callID
-	    @param[out] output a infos
-        -->
-      <arg type="s" name="callID" direction="in"/>
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
-      <arg type="a{ss}" name="infos" direction="out"/>
-    </method>
-    
-    <method name="getCallList">
-      <!--* Returns a list containing all active callID in SFLphone-daemon.
-
-	    @param[out] output list
-        -->
-      <arg type="as" name="list" direction="out"/>
-    </method>
-
-    <method name="getCurrentCallID">
-      <!--* Returns the CURRENT callID
-
-	    @param[out] output callID
-        -->
-      <arg type="s" name="callID" direction="out"/>
-    </method>
-
-    <method name="getCurrentCodecName">
-      <arg type="s" name="callID" direction="in"/>
-      <arg type="s" name="codecName" direction="out"/>
-    </method>
-
-    <signal name="currentSelectedCodec">
-      <arg type="s" name="callID"  direction="out" />
-      <arg type="s" name="codecName"  direction="out"/>
-    </signal>
-    
-    <signal name="incomingCall">
-      <!--* Signal sent to notify incoming calls.
-
-	    The callID generated by the daemon and must be stored
-	    by SFLphone-client in order to address other action for
-	    this call.
-
-            @param[in] input accountID
-            @param[in] input callID
-	    @param[in] input from
-        -->
-      <arg type="s" name="accountID" />
-      <arg type="s" name="callID" />
-      <arg type="s" name="from" />
-    </signal>
-    
-    <signal name="incomingMessage">
-      <arg type="s" name="accountID"  direction="out" />
-      <arg type="s" name="message"  direction="out"/>
-    </signal>
-    
-    <signal name="callStateChanged">
-      <!--* Signal emited by SFLphone-daemon to notify of a chage in
-	    call state.
- 
-	    The following is a liste of possible call state:
-
-	    "INCOMING"          Initial state of incoming calls
-	    "RINGING"           Initial state of received outgoing call
-	    "CURRENT"           The normal active state of an answered call
-            "HUNGUP"            Notify that the call has been hungup by peer
-	    "BUSY" 
-            "FAILURE"           Signal emited on failure to answer the call
-            "HOLD"              CAll state is now on hold
-            "UNHOLD_RECORD"     CAll state is now on CURRENT (pursue recording)
-            "UNHOLD_CURRENT"    CAll state is now on CURRENT
-
-            @param[in] input accountID
-            @param[in] input state
-        -->
-      <arg type="s" name="callID"  direction="out"/>
-      <arg type="s" name="state"  direction="out"/>
-    </signal>
-
-    <signal name="conferenceChanged">
-      <!--* Signal emited by SFLphone-daemon to notify of a chage in
-	    conference state.
- 
-	    The following is a liste of possible conference state:
-
-	    "ACTIVE_ATACHED"    Conference state is active
-	    "ACTIVE_DETACHED"   Conference state is active  
-	    "HOLD"              Conference is on hold
-
-            @param[in] input accountID
-            @param[in] input state
-        -->
-      <arg type="s" name="confID"  direction="out"/>
-      <arg type="s" name="state"  direction="out"/>
-    </signal>
-
-    <method name="getParticipantList">
-      <!--* Return a vector (or a list) containig the callIP of every
-            participant to a given conference. SFLphone-client should
-            keep and update the list of participant.
-
-            @param[in] input accountID
-            @param[out] output List of callID
-        -->
-      <arg type="s" name="confID" direction="in"/>
-      <arg type="as" name="list" direction="out"/>
-    </method>
-
-    <signal name="conferenceCreated">
-      <!--* Emited when a new conference is created. SFLphone-client
-            is reponsible to store the confID and call
-            getParticipantList to update display.
-
-            param[out] output Newly generated confID
-        -->
-      <arg type="s" name="confID"  direction="out"/>
-    </signal>
-
-    <signal name="conferenceRemoved">
-      <!--* Emited when a new conference is removed. SFLphone-client
-            should have kept a list of current participant in order to
-            display modification. 
-
-            @param[out] output confID
-        -->
-      <arg type="s" name="confID"  direction="out"/>
-    </signal>
-
-    <method name="holdConference">
-      <!--* Put the hole conference on hold. Every call participating
-            to this conference will be update to state HOLD. 
-
-            @param[in] input confID
-        -->
-      <arg type="s" name="confID" direction="in"/>
-    </method>
-
-    <method name="unholdConference">
-      <!--* Put the conference on state ACTIVE. Every call participating
-            to this conference will be updated to state UNHOLD.
-
-            @param[in] input confID
-        -->
-      <arg type="s" name="confID" direction="in"/>
-    </method>
-    
-    <signal name="sipCallStateChanged">
-      <arg type="s" name="callID"  direction="out"/>
-      <arg type="s" name="state"  direction="out"/>
-      <arg type="i" name="code"  direction="out"/>            
-    </signal>    
-
-    <signal name="registrationStateChanged">
-      <arg type="s" name="accountID"  direction="out"/>
-      <arg type="s" name="state"  direction="out"/>
-      <arg type="i" name="code"  direction="out"/>            
-    </signal> 
-        
-    <signal name="voiceMailNotify">
-      <arg type="s" name="accountID"  direction="out"/>
-      <arg type="i" name="count"  direction="out"/>
-    </signal>
-    
-    <signal name="volumeChanged">
-      <arg type="s" name="device"  direction="out"/>
-      <arg type="d" name="value"  direction="out"/>
-    </signal>
-
-    <signal name="transferSucceded">
-    </signal>
-
-    <signal name="transferFailed">
-    </signal>
-
-    <signal name="secureSdesOn">
-      <arg type="s" name="callID"  direction="out" />
-    </signal>
-    
-    <signal name="secureSdesOff">
-      <arg type="s" name="callID"  direction="out" />
-    </signal>
-    
-    <!-- ZRTP Methods and Signals -->
-    <signal name="secureZrtpOn">
-      <arg type="s" name="callID"  direction="out" />
-      <arg type="s" name="cipher"  direction="out" />
-    </signal>
-    
-    <signal name="secureZrtpOff">
-      <arg type="s" name="callID"  direction="out" />
-    </signal>
-    
-    <signal name="confirmGoClear">
-      <arg type="s" name="callID"  direction="out" />
-    </signal>
-    
-    <signal name="zrtpNegotiationFailed">
-      <arg type="s" name="callID"  direction="out" />
-      <arg type="s" name="reason"  direction="out" />
-      <arg type="s" name="severity"  direction="out" />
-    </signal>
-    
-    <signal name="zrtpNotSuppOther">
-      <arg type="s" name="callID"  direction="out" />
-    </signal>
-    
-    <signal name="showSAS">
-      <arg type="s" name="callID"  direction="out" />
-      <arg type="s" name="sas"  direction="out" />
-      <arg type="b" name="verified"  direction="out" />
-    </signal>
- 
-    <method name="setSASVerified">
-      <arg type="s" name="callID" direction="in"/>
-    </method>
-    
-    <method name="resetSASVerified">
-        <arg type="s" name="callID" direction="in"/>
-    </method>
-    
-    <method name="setConfirmGoClear">
-        <arg type="s" name="callID" direction="in"/>
-    </method>
-    
-    <method name="requestGoClear">
-        <arg type="s" name="callID" direction="in"/>
-    </method>
-    
-    <method name="acceptEnrollment">
-        <arg type="s" name="callID" direction="in"/>
-        <arg type="b" name="accepted" direction="in"/>
-    </method>
-    
-    <method name="setPBXEnrollment">
-        <arg type="s" name="callID" direction="in"/>
-        <arg type="b" name="yesNo" direction="in"/>
-    </method>
-<!--
-    <signal name="error">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringString"/>
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
-      <arg type="a{ss}" name="details"  direction="out"/>
-    </signal>
--->
-
-  </interface>
+		</method>
+
+		<method name="accept" tp:name-for-bindings="accept">
+			<tp:docstring>
+				Answer an incoming call. Automatically put the current call on state HOLD.
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in">
+				<tp:docstring>
+					The callID.
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="hangUp" tp:name-for-bindings="hangUp">
+			<tp:docstring>
+				Hangup a call in state "CURRENT" or "HOLD".
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in">
+				<tp:docstring>
+					The callID.
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="hangUpConference" tp:name-for-bindings="hangUpConference">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+				Hangup a conference, and every call participating to the conference.
+			</tp:docstring>
+			<arg type="s" name="confID" direction="in">
+				<tp:docstring>
+					The unique conference ID.
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="hold" tp:name-for-bindings="hold">
+			<tp:docstring>
+				Place a call on hold.
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in">
+				<tp:docstring>
+					The callID.
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="unhold" tp:name-for-bindings="unhold">
+			<tp:docstring>
+				Hold off a call, and place this call on state CURRENT.
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in">
+				<tp:docstring>
+					The callID.
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="transfert" tp:name-for-bindings="transfert">
+			<tp:docstring>
+				Transfer a call to given phone number.
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in">
+				<tp:docstring>
+					The callID.
+				</tp:docstring>
+			</arg>
+			<arg type="s" name="to" direction="in">
+				<tp:docstring>
+					The phone number to transfer the call to.
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="playDTMF" tp:name-for-bindings="playDTMF">
+			<tp:docstring>
+				Dual-Tone multi-frequency. Tell the core to play dial tones. A SIP INFO message is sent to notify the server.
+			</tp:docstring>
+			<arg type="s" name="key" direction="in">
+				<tp:docstring>
+					Unicode charter for pressed key
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="startTone" tp:name-for-bindings="startTone">
+			<tp:docstring>
+				Start audio stream and play tone..
+			</tp:docstring>
+			<arg type="i" name="start" direction="in"/>
+			<arg type="i" name="type" direction="in"/>
+		</method>
+
+		<method name="setVolume" tp:name-for-bindings="setVolume">
+			<tp:docstring>
+				<p>Sets the volume using a linear scale [0,100].</p>
+				<tp:rationale>Pulseaudio has its own mechanism to modify application volume. This method is enabled only if the ALSA API is used.</tp:rationale>
+			</tp:docstring>
+			<arg type="s" name="device" direction="in">
+				<tp:docstring>
+					The device: mic or speaker
+				</tp:docstring>
+			</arg>
+			<arg type="d" name="value" direction="in">
+				<tp:docstring>
+					The volume value (between 0 and 100)
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="getVolume" tp:name-for-bindings="getVolume">
+			<tp:docstring>
+				<p>Return the volume value of the given device on a linear scale [0,100].</p>
+				<tp:rationale>Only enabled if the ALSA API is used, Pulseaudio has its own mechanism to modify application volume.</tp:rationale>
+			</tp:docstring>
+			<arg type="s" name="device" direction="in">
+				<tp:docstring>
+					The device: mic or speaker
+				</tp:docstring>
+			</arg>
+			<arg type="d" name="value" direction="out">
+				<tp:docstring>
+					The volume value (between 0 and 100)
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="joinParticipant" tp:name-for-bindings="joinParticipant">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+				<p>Join two participants together to create a 3-way conference including the current client.</p>
+				<tp:rationale>The signal <tp:member-ref>conferenceCreated</tp:member-ref> is emitted on success.</tp:rationale> 
+			</tp:docstring>
+			<arg type="s" name="sel_callID" direction="in"/>
+			<arg type="s" name="drag_callID" direction="in"/>
+		</method>
+
+		<method name="addParticipant" tp:name-for-bindings="addParticipant">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+				<p>Join a new particiant to an existing conference.</p>
+				<tp:rationale>The signal <tp:member-ref>conferenceChanged</tp:member-ref> is emitted on success.</tp:rationale> 
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in">
+				<tp:docstring>
+					The ID of the call to add to the conference
+				</tp:docstring>
+			</arg>
+			<arg type="s" name="confID" direction="in">
+				<tp:docstring>
+					An existing conference ID
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="addMainParticipant" tp:name-for-bindings="addMainParticipant">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+				<p>As the core can handle multiple calls an conferences, it may happens that the client's user leave a conference to answer an incoming call or send new ones. This method is used to reintroduce SFLphone-client's user into the conference.</p>
+				<p>It put the current call on state HOLD or detach SFLphone-client's user from the another conference.</p>
+			</tp:docstring>
+			<arg type="s" name="confID" direction="in">
+				<tp:docstring>
+					An existing conference ID
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="detachParticipant" tp:name-for-bindings="detachParticipant">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+				Detach the given call from the conference. If only one participant is left, the conference is deleted and the signal <tp:member-ref>conferenceRemoved</tp:member-ref> is emited.
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in">
+				<tp:docstring>
+					The call ID
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="joinConference" tp:name-for-bindings="joinConference">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+				Join two conferences together.
+			</tp:docstring>
+			<arg type="s" name="sel_confID" direction="in"/>
+			<arg type="s" name="drag_confID" direction="in"/>
+		</method>
+
+		<method name="getConferenceDetails" tp:name-for-bindings="getConferenceDetails">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+				Returns a hashtable containing conference details.
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in">
+				<tp:docstring>
+					The call ID
+				</tp:docstring>
+			</arg>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
+			<arg type="a{ss}" name="infos" direction="out">
+				<tp:docstring>
+					A map containing the ID of the conferences and their states.
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="getConferenceList" tp:name-for-bindings="getConferenceList">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+				Returns a list containing all active conferences.
+			</tp:docstring>
+			<arg type="as" name="list" direction="out">
+				<tp:docstring>
+					The list of conferences.
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="setRecording" tp:name-for-bindings="setRecording">
+			<tp:docstring>
+				Start recording a call.
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in">
+				<tp:docstring>
+					The ID of the call to record.
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="getIsRecording" tp:name-for-bindings="getIsRecording"> 
+			<tp:docstring>
+				Tells whether or not a call is being recorded.
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in">
+				<tp:docstring>
+					The call ID.
+				</tp:docstring>
+			</arg>
+			<arg type="b" name="isRecording" direction="out">
+				<tp:docstring>
+					Returns true is the call is being recorded. False otherwise.
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="getCallDetails" tp:name-for-bindings="getCallDetails">
+			<tp:docstring>
+				Get all the details about a specific call.
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in">
+				<tp:docstring>
+					The call ID.
+				</tp:docstring>
+			</arg>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
+			<arg type="a{ss}" name="infos" direction="out" tp:type="String_String_Map">
+				<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+					<p>A map containing the call details: </p>
+					<ul>
+						<li>ACCOUNTID</li>
+						<li>PEER_NUMBER</li>
+						<li>PEER_NAME</li>
+						<li>DISPLAY_NAME</li>
+						<li>CALL_STATE</li>
+						<li>CALL_TYPE</li>
+					</ul>  
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="getCallList" tp:name-for-bindings="getCallList">
+			<tp:docstring>
+				Get the list of active calls.
+				<tp:rationale>To get the call details, iterate on the return value and call <tp:member-ref>getCallDetails</tp:member-ref> method.</tp:rationale> 
+			</tp:docstring>
+			<arg type="as" name="list" direction="out">
+				<tp:docstring>
+					A list of call IDs.
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="getCurrentCallID" tp:name-for-bindings="getCurrentCallID">
+			<tp:docstring>
+				Get the CURRENT call ID.
+			</tp:docstring>
+			@param[out] output callID
+			<arg type="s" name="callID" direction="out">
+				<tp:docstring>
+					The current call ID.	
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="getCurrentCodecName" tp:name-for-bindings="getCurrentCodecName">
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in"/>
+			<arg type="s" name="codecName" direction="out"/>
+		</method>
+
+		<signal name="currentSelectedCodec" tp:name-for-bindings="currentSelectedCodec">
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="callID" />
+			<arg type="s" name="codecName"/>
+		</signal>
+
+		<signal name="incomingCall" tp:name-for-bindings="incomingCall">
+			<tp:docstring>
+				<p>Notify an incoming call.</p>
+				<p>The callID generated by the daemon and must be stored by the clients in order to address other action for
+					this call.</p>
+				<tp:rationale>The client must subscribe to this signal to handle incoming calls.</tp:rationale>
+			</tp:docstring>
+			<arg type="s" name="accountID">
+				<tp:docstring>
+					The account ID of the callee. Clients must notify the right account when receiving this signal.	
+				</tp:docstring>
+			</arg>
+			<arg type="s" name="callID">
+				<tp:docstring>
+					A new call ID.
+				</tp:docstring>
+			</arg>
+			<arg type="s" name="from">
+				<tp:docstring>
+					The caller phone number.
+				</tp:docstring>
+			</arg>
+		</signal>
+
+		<signal name="incomingMessage" tp:name-for-bindings="incomingMessage">
+			<tp:docstring>
+				Unused
+			</tp:docstring>
+			<arg type="s" name="accountID" />
+			<arg type="s" name="message" />
+		</signal>
+
+		<signal name="callStateChanged" tp:name-for-bindings="callStateChanged">
+			<tp:docstring>
+				<p>Notify of a change in a call state.</p> 
+				<p>The client must subscribe to this signal.</p>
+			</tp:docstring>
+			<arg type="s" name="callID">
+				<tp:docstring>
+					The call ID.
+				</tp:docstring>
+			</arg>
+			<arg type="s" name="state" >
+				<tp:docstring>
+					The acceptable states are: 
+					<ul>
+						<li>INCOMING: Initial state of incoming calls</li>
+						<li>RINGING: Initial state of received outgoing call</li>
+						<li>CURRENT: The normal active state of an answered call</li>
+						<li>HUNGUP: Notify that the call has been hungup by peer</li>
+						<li>BUSY</li>
+						<li>FAILURE: Error when processing a call</li>
+						<li>HOLD</li>
+						<li>UNHOLD_CURRENT</li>
+						<li>UNHOLD_RECORD</li>
+					</ul>
+				</tp:docstring>
+			</arg>
+		</signal>
+
+		<signal name="conferenceChanged" tp:name-for-bindings="conferenceChanged">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+				Notify of a change in the conferences state
+			</tp:docstring>
+			<arg type="s" name="confID">
+				<tp:docstring>
+					The conference ID.
+				</tp:docstring>
+			</arg>
+			<arg type="s" name="state">
+				<tp:docstring>
+					The acceptable states are: 
+					<ul>
+						<li>ACTIVE_ATTACHED</li>
+						<li>ACTIVE_DETACHED</li>
+						<li>HOLD</li>
+					</ul>
+				</tp:docstring>
+			</arg>
+		</signal>
+
+		<method name="getParticipantList" tp:name-for-bindings="getParticipantList">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+				Get the call IDs of every participant to a given conference. The client should keep and update the list of participant.
+			</tp:docstring>
+			<arg type="s" name="confID" direction="in">
+				<tp:docstring>
+					The conference ID.
+				</tp:docstring>
+			</arg>
+			<arg type="as" name="list" direction="out">
+				<tp:docstring>
+					The list of the call IDs.
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<signal name="conferenceCreated" tp:name-for-bindings="conferenceCreated">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+				Emited when a new conference is created. SFLphone-client is reponsible to store the confID and call <tp:member-ref>getParticipantList</tp:member-ref> to update the display.
+			</tp:docstring>
+			<arg type="s" name="confID">  
+				<tp:docstring>
+					A new conference ID.
+				</tp:docstring>
+			</arg>
+		</signal>
+
+		<signal name="conferenceRemoved" tp:name-for-bindings="conferenceRemoved">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+				Emited when a new conference is remove. SFLphone-client should have kept a list of current participant in order to display modification.
+			</tp:docstring>
+			<arg type="s" name="confID">
+				<tp:docstring>
+					The conference ID.
+				</tp:docstring>
+			</arg>
+		</signal>
+
+		<method name="holdConference" tp:name-for-bindings="holdConference">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+				Hold on every calls participating to this conference.
+			</tp:docstring>
+			<arg type="s" name="confID" direction="in">
+				<tp:docstring>
+					The conference ID.
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="unholdConference" tp:name-for-bindings="unholdConference">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+				Hold off every calls participating to this conference.
+			</tp:docstring>
+			<arg type="s" name="confID" direction="in">
+				<tp:docstring>
+					The conference ID.
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<signal name="sipCallStateChanged" tp:name-for-bindings="sipCallStateChanged">
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="callID"  />
+			<arg type="s" name="state"  />
+			<arg type="i" name="code"  />            
+		</signal>    
+
+		<signal name="registrationStateChanged" tp:name-for-bindings="registrationStateChanged">
+			<tp:docstring>
+				<p>The state of an account has changed.</p>
+				<p>The clients have to subscribe to this signal to use accounts.</p>
+			</tp:docstring>
+			<arg type="s" name="accountID" >
+				<tp:docstring>
+					The account ID
+				</tp:docstring>
+			</arg>
+			<arg type="s" name="state">
+				<tp:docstring>
+					The new registration state
+				</tp:docstring>
+			</arg>
+			<arg type="i" name="code">            
+				<tp:docstring>
+					The SIP or IAX2 code
+				</tp:docstring>
+			</arg>
+		</signal> 
+
+		<signal name="voiceMailNotify" tp:name-for-bindings="voiceMailNotify">
+			<tp:docstring>
+				Notify the clients of the voicemail number for a specific account, if applicable.
+			</tp:docstring>
+			<arg type="s" name="accountID">
+				<tp:docstring>
+					The account ID.
+				</tp:docstring>
+			</arg>
+			<arg type="i" name="count">
+				<tp:docstring>
+					The number of waiting messages.
+				</tp:docstring>
+			</arg>
+		</signal>
+
+		<signal name="volumeChanged" tp:name-for-bindings="volumeChanged">
+			<tp:docstring>
+				Notify the clients of a volume level change.
+			</tp:docstring>
+			<arg type="s" name="device">
+				<tp:docstring>
+					The device: mic or speaker	
+				</tp:docstring>
+			</arg>
+			<arg type="d" name="value">
+				<tp:docstring>
+					The new volume value	
+				</tp:docstring>
+			</arg>
+		</signal>
+
+		<signal name="transferSucceded" tp:name-for-bindings="transferSucceded">
+			<tp:docstring>
+				The transfer has been successfully processed.
+			</tp:docstring>
+		</signal>
+
+		<signal name="transferFailed" tp:name-for-bindings="transferFailed">
+			<tp:docstring>
+				The transfer operation has failed.
+			</tp:docstring>
+		</signal>
+
+		<signal name="secureSdesOn" tp:name-for-bindings="secureSdesOn">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="callID"/>
+		</signal>
+
+		<signal name="secureSdesOff" tp:name-for-bindings="secureSdesOff">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="callID" />
+		</signal>
+
+		<!-- ZRTP Methods and Signals -->
+		<signal name="secureZrtpOn" tp:name-for-bindings="secureZrtpOn">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="callID"  />
+			<arg type="s" name="cipher"  />
+		</signal>
+
+		<signal name="secureZrtpOff" tp:name-for-bindings="secureZrtpOff">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="callID" />
+		</signal>
+
+		<signal name="confirmGoClear" tp:name-for-bindings="confirmGoClear">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="callID" />
+		</signal>
+
+		<signal name="zrtpNegotiationFailed" tp:name-for-bindings="zrtpNegotiationFailed">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="callID" />
+			<arg type="s" name="reason"  />
+			<arg type="s" name="severity" />
+		</signal>
+
+		<signal name="zrtpNotSuppOther" tp:name-for-bindings="zrtpNotSuppOther">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="callID" />
+		</signal>
+
+		<signal name="showSAS" tp:name-for-bindings="showSAS">
+			<tp:added version="0.9.7"/>
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="callID" />
+			<arg type="s" name="sas"  />
+			<arg type="b" name="verified"/>
+		</signal>
+
+		<method name="setSASVerified" tp:name-for-bindings="setSASVerified">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in"/>
+		</method>
+
+		<method name="resetSASVerified" tp:name-for-bindings="resetSASVerified">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in"/>
+		</method>
+
+		<method name="setConfirmGoClear" tp:name-for-bindings="setConfirmGoClear">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in"/>
+		</method>
+
+		<method name="requestGoClear" tp:name-for-bindings="requestGoClear">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in"/>
+		</method>
+
+		<method name="acceptEnrollment" tp:name-for-bindings="acceptEnrollment">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in"/>
+			<arg type="b" name="accepted" direction="in"/>
+		</method>
+
+		<method name="setPBXEnrollment" tp:name-for-bindings="setPBXEnrollment">
+			<tp:added version="0.9.7"/>
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="callID" direction="in"/>
+			<arg type="b" name="yesNo" direction="in"/>
+		</method>
+
+	</interface>
 </node>
diff --git a/sflphone-common/src/dbus/configurationmanager-introspec.xml b/sflphone-common/src/dbus/configurationmanager-introspec.xml
index 0b66386689b19c9612c175bb562cce576fad7319..1fd7cd11fc451a0a198dad6d7ab423c830c42cbf 100644
--- a/sflphone-common/src/dbus/configurationmanager-introspec.xml
+++ b/sflphone-common/src/dbus/configurationmanager-introspec.xml
@@ -1,568 +1,1013 @@
 <?xml version="1.0" ?>
-<node name="/org/sflphone/SFLphone">
-  <interface name="org.sflphone.SFLphone.ConfigurationManager">
-    
-  <!-- Accounts-related methods -->  
-    <method name="getAccountDetails">
-      <!--* Method that returns a hashtable containing the current
-            account configuration setting.
-
-	    CONFIG_ACCOUNT_ENABLE
-	    CONFIG_ACCOUNT_RESOLVE_ONCE
-	    CONFIG_ACCOUNT_TYPE
-	    HOSTNAME
-	    USERNAME
-	    PASSWORD
-	    REALM
-	    AUTHENTICATION_USERNAME
-	    CONFIG_ACCOUNT_MAILBOX
-	    CONFIG_ACCOUNT_REGISTRATION_EXPIRE
-	    LOCAL_INTERFACE
-	    PUBLISHED_SAMEAS_LOCAL
-	    PUBLISHED_ADDRESS
-	    LOCAL_PORT
-	    PUBLISHED_PORT
-	    DISPLAY_NAME
-	    STUN_ENABLE
-	    STUN_SERVER
-
-	    REGISTRATION_STATUS
-	    REGISTRATION_STATE_CODE
-	    REGISTRATION_STATE_DESCRIPTION
-	    SRTP_KEY_EXCHANGE
-	    SRTP_ENABLE
-	    
-	    SRTP_RTP_FALLBACK
-	    ZRTP_DISPLAY_SAS
-	    ZRTP_DISPLAY_SAS_ONCE
-	    ZRTP_HELLO_HASH
-	    ZRTP_NOT_SUPP_WARNING
-
-	    TLS_LISTENER_PORT
-	    TLS_ENABLE
-	    TLS_CA_LIST_FILE
-	    TLS_CERTIFICATE_FILE
-	    TLS_PRIVATE_KEY_FILE
-	    
-	    TLS_METHOD
-	    TLS_CIPHERS
-	    TLS_SERVER_NAME
-	    TLS_VERIFY_SERVER
-	    TLS_VERIFY_CLIENT
-	    TLS_REQUIRE_CLIENT_CERTIFICATE
-	    TLS_NEGOTIATION_TIMEOUT_SEC
-	    TLS_NEGOTIATION_TIMEOUT_MSEC
-
-
-            @param[in] input accountID
-            @param[out] output details
-        -->
-      <arg type="s" name="accountID" direction="in"/>
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
-      <arg type="a{ss}" name="details" direction="out"/>
-    </method>
-    
-    <method name="setAccountDetails">
-      <!--* Modify the current accout parameter settings given an
-            accountID and a hash table containing the parameters to
-            update. The hash table is not required to be complete,
-            only the parameter to change may be specified. Only the
-            running parameters are updated dynamically, configuration
-            settings are stored in the configuration file when
-            SFLphone-daemon quit.
-
-	    For a complete list of account settings refer to getAccountDetails
-
-            @param[in] input accountID
-            @param[in] input details
-        -->
-      <annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="MapStringString"/>
-      <arg type="s" name="accountID" direction="in"/>
-      <arg type="a{ss}" name="details" direction="in"/>
-    </method>
-    
-    <method name="setCredential">
-      <arg type="s" name="accountID" direction="in"/>
-      <arg type="i" name="index" direction="in"/>
-      <arg type="a{ss}" name="credentialInformation" direction="in"/>
-    </method>
-
-    <method name="setNumberOfCredential">
-      <arg type="s" name="accountID" direction="in"/>
-      <arg type="i" name="number" direction="in"/>
-    </method>
-       
-    <method name="deleteAllCredential">
-       <arg type="s" name="accountID" direction="in"/>
-    </method>
-  
-    <method name="getIp2IpDetails">
-      <!--* Specific call to get configuration settings of the
-	    IP2IP_PROFILE. Which are sligthly different since no VoIP
-	    Account parameters are envolved.
-
-	    ACCOUNT_ID
-	    SRTP_KEY_EXCHANGE
-	    SRTP_ENABLE
-	    SRTP_RTP_FALLBACK
-	    ZRTP_DISPLAY_SAS
-	    ZRTP_HELLO_HASH
-	    ZRTP_NOT_SUPP_WARNING
-	    ZRTP_DISPLAY_SAS_ONCE
-	    LOCAL_INTERFACE
-	    LOCAL_PORT
-
-	    TLS_LISTENER_PORT
-	    TLS_CA_LIST_FILE
-	    TLS_CERTIFICATE_FILE
-	    TLS_PRIVATE_KEY_FILE
-	    TLS_PASSWORD
-	    TLS_METHOD
-	    TLS_CIPHERS
-	    TLS_SERVER_NAME
-	    TLS_VERIFY_SERVER
-	    TLS_VERIFY_CLIENT
-	    TLS_REQUIRE_CLIENT_CERTIFICATE
-	    TLS_NEGOTIATION_TIMEOUT_SEC
-	    TLS_NEGOTIATION_TIMEOUT_MSEC
-
-            @param[in] input accountID
-            @param[out] output details
-        -->
-      <arg type="a{ss}" name="details" direction="out"/>
-    </method>
-    
-    <method name="setIp2IpDetails">
-      <!--* Modify the IP2IP_PROFILE parameter settings a hash table 
-	    containing the parameters to update. The hash table is not required to be complete,
-            only the parameters to be modified may be specified. Also,
-	    only the running configuration is updated dynamically, 
-            settings are stored in the configuration file when
-            SFLphone-daemon quit.
-
-	    For a complete list of account settings refer to getAccountDetails
-
-            @param[in] input accountID
-            @param[in] input details
-        -->
-      <arg type="a{ss}" name="details" direction="in"/>
-    </method>
-      
-    <method name="getCredential">
-      <arg type="s" name="accountID" direction="in"/>
-      <arg type="i" name="index" direction="in"/>
-      <arg type="a{ss}" name="credentialInformation" direction="out"/>
-    </method>
-    
-    <method name="getNumberOfCredential">
-      <arg type="s" name="accountID" direction="in"/>
-      <arg type="i" name="numberOfCredential" direction="out"/>
-    </method>
-        
-    <method name="addAccount">
-      <!--* Add a new account to the SFLphone-daemon list. If no
-	    details are specified, default parameters are used.
-	    A REGISTER is automatically sent and configuration is
-	    saved if account created successfully.
-
-            @param[in] input details
-            @param[out] output accountID
-        -->
-      <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringString"/>
-      <arg type="a{ss}" name="details" direction="in"/>
-      <arg type="s" name="createdAccountId" direction="out"/>
-    </method>
-    
-    <method name="setAccountsOrder">
-      <!--* Update the account list given a new list of accountID. If no account is specified
-	    for a call, the first one in the list will be used.
-
-            @param[in] input order
-        -->
-      <arg type="s" name="order" direction="in"/>
-    </method>
-    
-    <method name="removeAccount">
-      <!--* Delete an account from SFLphone-daemon list and erase
-	    account parameters from configuration file. 
-
-            @param[in] input accountID
-        -->
-      <arg type="s" name="accoundID" direction="in"/>
-    </method>
-    
-    <method name="getAccountList">
-      <!--* Get teh accountlist as stored in SFLphone-daemon.
-
-            @param[in] input accountID
-        -->
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
-      <arg type="as" name="list" direction="out"/>
-    </method>
-   
-    <method name="sendRegister">
-      <!--* Send accout registration request to PBX server. Register
-	    the account if expire=1, unregister if expire=0.
-
-            @param[in] input accountID
-        -->
-      <arg type="s" name="accountID" direction="in"/>
-      <arg type="i" name="expire" direction="in"/>
-    </method>
-
-   <!--      ///////////////////////               -->
-
-  <!-- Various audio-related methods   -->
- 
-    <method name="getToneLocaleList">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
-      <arg type="as" name="list" direction="out"/>
-    </method>
-  
-    <method name="getVersion">
-      <arg type="s" name="version" direction="out"/>
-    </method>
-    
-    <method name="getRingtoneList">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
-      <arg type="as" name="list" direction="out"/>
-    </method>
-   
-    <method name="getPlaybackDeviceList">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
-      <arg type="as" name="list" direction="out"/>
-    </method>
-    
-    <method name="getRecordDeviceList">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
-      <arg type="as" name="list" direction="out"/>
-    </method>
-    
-    <method name="isRingtoneEnabled">
-      <arg type="i" name="bool" direction="out"/>
-    </method>
-
-    <method name="ringtoneEnabled">
-    </method>
-
-    <method name="getRingtoneChoice">
-      <arg type="s" name="tone" direction="out"/>
-    </method>
-
-    <method name="setRingtoneChoice">
-      <arg type="s" name="tone" direction="in"/>
-    </method>
-
-    <method name="getAudioManager">
-      <arg type="i" name="api" direction="out"/>
-    </method>
-
-    <method name="setAudioManager">
-      <arg type="i" name="api" direction="in"/>
-    </method>
-    
-    <method name="getRecordPath">
-      <arg type="s" name="rec" direction="out"/>
-    </method>
-
-    <method name="setRecordPath">
-      <arg type="s" name="rec" direction="in"/>
-    </method>
-
-   <!--      ///////////////////////               -->
-   
-   <!-- Codecs-related methods -->
- 
-    <method name="getCodecList">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
-      <arg type="as" name="list" direction="out"/>
-    </method>
-       
-   <method name="getCodecDetails">
-     <arg type="i" name="payload" direction="in"/>
-     <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
-     <arg type="as" name="details" direction="out"/>
-   </method>
- 
-    <method name="getActiveCodecList">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
-	  <arg type="s" name="accountID" direction="in"/>
-      <arg type="as" name="list" direction="out"/>
-    </method>
-
-    <method name="setActiveCodecList">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="VectorString"/>
-      <arg type="as" name="list" direction="in"/>
-      <arg type="s" name="accountID" direction="in"/>
-    </method>
-
-
-	<!-- Audio devices methods -->
-	
-    <method name="getInputAudioPluginList">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
-      <arg type="as" name="list" direction="out"/>
-    </method>
-		
-    <method name="getOutputAudioPluginList">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
-      <arg type="as" name="list" direction="out"/>
-    </method>
-    
-    <method name="setInputAudioPlugin">
-      <arg type="s" name="audioPlugin" direction="in"/>
-    </method>
-    
-    <method name="setOutputAudioPlugin">
-      <arg type="s" name="audioPlugin" direction="in"/>
-    </method>
-    
-    <method name="getAudioOutputDeviceList">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
-      <arg type="as" name="list" direction="out"/>
-    </method>
-    
-    <method name="setAudioOutputDevice">
-      <arg type="i" name="index" direction="in"/>
-    </method>
-    
-    <method name="getAudioInputDeviceList">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
-      <arg type="as" name="list" direction="out"/>
-    </method>
-    
-    <method name="setAudioInputDevice">
-      <arg type="i" name="index" direction="in"/>
-    </method>
-    
-    <method name="getCurrentAudioDevicesIndex">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
-      <arg type="as" name="list" direction="out"/>
-    </method>
-
-    <method name="getAudioDeviceIndex">
-      <arg type="s" name="name" direction="in"/>
-      <arg type="i" name="index" direction="out"/>
-    </method>
-
-    <method name="getCurrentAudioOutputPlugin">
-      <arg type="s" name="plugin" direction="out"/>
-    </method>
-
-  <!--    General Settings Panel         -->
-
-    <method name="isMd5CredentialHashing">
-      <arg type="b" name="res" direction="out"/>
-    </method>
-
-    <method name="setMd5CredentialHashing">
-      <arg type="b" name="enabled" direction="in"/>
-    </method>
-     
-    <method name="isIax2Enabled">
-      <arg type="i" name="res" direction="out"/>
-    </method>
-
-    <method name="setNotify">
-    </method>
-
-    <method name="getNotify">
-      <arg type="i" name="level" direction="out"/>
-    </method>
-
-    <method name="setMailNotify">
-    </method>
-
-    <method name="getMailNotify">
-      <arg type="i" name="level" direction="out"/>
-    </method>
-
-    <method name="getDialpad">
-      <arg type="i" name="state" direction="out"/>
-    </method>
-
-    <method name="setDialpad">
-      <arg type="b" name="display" direction="in"/>
-    </method>
-
-    <method name="getSearchbar">
-      <arg type="i" name="state" direction="out"/>
-    </method>
-
-    <method name="setSearchbar">
-    </method>
-
-    <method name="setHistoryEnabled">
-    </method>
-
-    <method name="getHistoryEnabled">
-      <arg type="s" name="state" direction="out"/>
-    </method>
-
-    <method name="getVolumeControls">
-      <arg type="i" name="state" direction="out"/>
-    </method>
-
-    <method name="setVolumeControls">
-      <arg type="b" name="display" direction="in"/>
-    </method>
-
-    <method name="getHistoryLimit">
-      <arg type="i" name="days" direction="out"/>
-    </method>
-
-    <method name="setHistoryLimit">
-      <arg type="i" name="days" direction="in"/>
-    </method>
-
-    <method name="startHidden">
-    </method>
-
-    <method name="isStartHidden">
-      <arg type="i" name="state" direction="out"/>
-    </method>
-
-    <method name="popupMode">
-      <arg type="i" name="state" direction="out"/>
-    </method>
-
-    <method name="switchPopupMode">
-    </method>
-
-	<method name="getWindowWidth">
-      <arg type="i" name="width" direction="out"/>
-	</method>
-
-	<method name="getWindowHeight">
-      <arg type="i" name="height" direction="out"/>
-	</method>
-
-	<method name="setWindowWidth">
-      <arg type="i" name="width" direction="in"/>
-	</method>
-
-	<method name="setWindowHeight">
-      <arg type="i" name="height" direction="in"/>
-	</method>
-
-	<method name="getWindowPositionX">
-      <arg type="i" name="posX" direction="out"/>
-	</method>
-		
-	<method name="setWindowPositionX">
-      <arg type="i" name="posX" direction="in"/>
-	</method>
-		
-	<method name="getWindowPositionY">
-      <arg type="i" name="posY" direction="out"/>
-	</method>
-		
-	<method name="setWindowPositionY">
-      <arg type="i" name="posY" direction="in"/>
-	</method>
-	
-	<method name="enableStatusIcon">
-      <arg type="s" name="value" direction="in"/>
-	</method>
-		
-	<method name="isStatusIconEnabled">
-      <arg type="s" name="value" direction="out"/>
-	</method>
-	
-	
-    <!-- Addressbook configuration -->
-    <method name="getAddressbookSettings">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringInt"/>
-      <arg type="a{si}" name="settings" direction="out"/>
-    </method>
-
-    <method name="setAddressbookSettings">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringInt"/>
-      <arg type="a{si}" name="settings" direction="in"/>
-    </method>
-
-	<!-- Addressbook list -->
-    <method name="getAddressbookList">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
-      <arg type="as" name="settings" direction="out"/>
-    </method>
-
-    <method name="setAddressbookList">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="VectorString"/>
-      <arg type="as" name="settings" direction="in"/>
-    </method>
-
-    <!-- Hook configuration -->
-    <method name="getHookSettings">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
-      <arg type="a{ss}" name="settings" direction="out"/>
-    </method>
-
-    <method name="setHookSettings">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringString"/>
-      <arg type="a{ss}" name="settings" direction="in"/>
-    </method>
-
-    <method name="getHistory">
-        <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
-        <arg type="a{ss}" name="entries" direction="out"/>
-    </method>
-
-    <method name="setHistory">
-        <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringString"/>
-        <arg type="a{ss}" name="entries" direction="in"/>
-    </method>
-      
-    <signal name="accountsChanged">
-    </signal>  
-
-    <signal name="errorAlert">
-      <arg type="i" name="code" direction="out"/>
-    </signal> 
-    
-    <!-- TLS Methods -->
-    <method name="getSupportedTlsMethod">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
-      <arg type="as" name="list" direction="out"/>
-    </method>
-
-    <method name="getTlsSettingsDefault">
-      <arg type="a{ss}" name="details" direction="out"/>
-    </method>
-
-    <method name="getTlsSettings">
-      <arg type="s" name="accountID" direction="in"/>
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
-      <arg type="a{ss}" name="details" direction="out"/>
-    </method>
-    
-    <method name="setTlsSettings">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="MapStringString"/>
-      <arg type="s" name="accountID" direction="in"/>
-      <arg type="a{ss}" name="details" direction="in"/>
-    </method>
-
-    <method name="getAddrFromInterfaceName">
-      <arg type="s" name="interface" direction="in"/>
-      <arg type="s" name="address" direction="out"/>
-    </method>
-
-    <method name="getAllIpInterface">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
-      <arg type="as" name="list" direction="out"/>
-    </method>
-
-    <method name="getAllIpInterfaceByName">
-      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
-      <arg type="as" name="list" direction="out"/>
-    </method>
-    
-    <method name="getShortcuts">
-      <arg type="a{si}" name="shortcutsMap" direction="out"/>
-    </method>
-    
-    <method name="setShortcuts">
-      <arg type="a{si}" name="shortcutsMap" direction="in"/>
-    </method>
-  </interface>
-</node>
+
+<node name="/configurationmanager-introspec" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+	<interface name="org.sflphone.SFLphone.ConfigurationManager">
+
+		<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+			Used to handle the configuration stuff: accounts settings, account registration, user preferences, ...
+		</tp:docstring>
+
+		<method name="getAccountDetails" tp:name-for-bindings="getAccountDetails">
+			<tp:docstring>
+				Get all parameters of the specified account.
+			</tp:docstring>
+			<arg type="s" name="accountID" direction="in">
+				<tp:docstring>
+					The account ID
+				</tp:docstring>
+			</arg>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
+			<arg type="a{ss}" name="details" direction="out" tp:type="String_String_Map">
+				<tp:docstring>
+					The available keys / parameters are:
+					<ul>
+						<li>CONFIG_ACCOUNT_ENABLE:	True or False (Default: True)</li>
+						<li>CONFIG_ACCOUNT_RESOLVE_ONCE</li>
+						<li>CONFIG_ACCOUNT_TYPE: SIP or IAX2 (Default: SIP)</li>
+						<li>HOSTNAME: The IP adress or hostname of the registrar</li>
+						<li>USERNAME: The username (or extension) of the account</li>
+						<li>PASSWORD: The password associated to the account</li>
+						<li>REALM</li>
+						<li>AUTHENTICATION_USERNAME</li>
+						<li>CONFIG_ACCOUNT_MAILBOX: Number to dial to access the voicemail box</li>
+						<li>CONFIG_ACCOUNT_REGISTRATION_EXPIRE: SIP header expiration value (Default: 1600)</li>
+						<li>LOCAL_INTERFACE: The network interface (Default: eth0)</li>
+						<li>PUBLISHED_SAMEAS_LOCAL: If False, the published address equals the local address. This is the default.</li>
+						<li>PUBLISHED_ADDRESS: The SIP published address</li>
+						<li>LOCAL_PORT: The SIP listening port (Default: 5060)</li>
+						<li>PUBLISHED_PORT: The SIP published port</li>
+						<li>DISPLAY_NAMEL: The display name</li>
+						<li>STUN_ENABLE: True or False (Default: False)</li>
+						<li>STUN_SERVER: The STUN server address</li>
+						<li>REGISTRATION_STATUS: The account registration status. Should be Registered to make calls.</li>
+						<li>REGISTRATION_STATE_CODE</li>
+						<li>REGISTRATION_STATE_DESCRIPTION</li>
+						<li>SRTP_KEY_EXCHANGE</li>
+						<li>SRTP_ENABLE: Whether or not voice communication are encrypted - True or False (Default: False)</li>
+						<li>SRTP_RTP_FALLBACK</li>
+						<li>ZRTP_DISPLAY_SAS</li>
+						<li>ZRTP_DISPLAY_SAS_ONCE</li>
+						<li>ZRTP_HELLO_HASH</li>
+						<li>ZRTP_NOT_SUPP_WARNING</li>
+						<li>TLS_LISTENER_PORT: TLS listening port (Default: 5061)</li>
+						<li>TLS_ENABLE: Whether or not signalling is encrypted - True or False (Default: False)</li>
+						<li>TLS_CA_LIST_FILE</li>
+						<li>TLS_CERTIFICATE_FILE</li>
+						<li>TLS_PRIVATE_KEY_FILE</li>
+						<li>TLS_METHOD</li>
+						<li>TLS_CIPHERS</li>
+						<li>TLS_SERVER_NAME</li>
+						<li>TLS_VERIFY_SERVER</li>
+						<li>TLS_VERIFY_CLIENT</li>
+						<li>TLS_REQUIRE_CLIENT_CERTIFICATE</li>
+						<li>TLS_NEGOTIATION_TIMEOUT_SEC</li>
+						<li>TLS_NEGOTIATION_TIMEOUT_MSEC</li>
+					</ul>
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="setAccountDetails" tp:name-for-bindings="setAccountDetails">
+			<tp:docstring>
+				Send new account parameters, or account parameters changes, to the core. The hash table is not required to be complete, only the updated parameters may be specified.
+				<tp:rationale>Account settings are written to the configuration file when sflphone properly quits.</tp:rationale>
+				<tp:rationale>After calling this method, the core will emit the signal <tp:member-ref>accountsChanged</tp:member-ref> with the updated data. The client must subscribe to this signal and use it to update its internal data structure.</tp:rationale>
+			</tp:docstring>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="MapStringString"/>
+			<arg type="s" name="accountID" direction="in">
+				<tp:docstring>
+				</tp:docstring>
+			</arg>
+			<arg type="a{ss}" name="details" direction="in" tp:type="String_String_Map">
+				<tp:docstring>
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="setCredential" tp:name-for-bindings="setCredential">
+			<tp:docstring>
+			</tp:docstring>
+
+			<arg type="s" name="accountID" direction="in">
+				<tp:docstring>
+				</tp:docstring>
+			</arg>
+			<arg type="i" name="index" direction="in">
+				<tp:docstring>
+				</tp:docstring>
+			</arg>
+			<arg type="a{ss}" name="credentialInformation" direction="in" tp:type="String_String_Map">
+				<tp:docstring>
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="setNumberOfCredential" tp:name-for-bindings="setNumberOfCredential">
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="accountID" direction="in">
+				<tp:docstring>
+				</tp:docstring>
+			</arg>
+			<arg type="i" name="number" direction="in">
+				<tp:docstring>
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="deleteAllCredential" tp:name-for-bindings="deleteAllCredential">
+			<tp:docstring>
+			</tp:docstring>
+			<arg type="s" name="accountID" direction="in">
+				<tp:docstring>
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="getIp2IpDetails" tp:name-for-bindings="getIp2IpDetails">
+			<tp:docstring>
+				Get configuration settings of the IP2IP_PROFILE. They are sligthly different from account settings since no VoIP accounts are involved.
+			</tp:docstring>
+			<arg type="a{ss}" name="details" direction="out" tp:type="String_String_Map">
+				<tp:docstring>
+					Available parameters are:
+					<ul>
+						<li>ACCOUNT_ID</li>
+						<li>SRTP_KEY_EXCHANGE</li>
+						<li>SRTP_ENABLE</li>
+						<li>SRTP_RTP_FALLBACK</li>
+						<li>ZRTP_DISPLAY_SAS</li>
+						<li>ZRTP_HELLO_HASH</li>
+						<li>ZRTP_NOT_SUPP_WARNING</li>
+						<li>ZRTP_DISPLAY_SAS_ONCE</li>
+						<li>LOCAL_INTERFACE</li>
+						<li>LOCAL_PORT</li>
+						<li>TLS_LISTENER_PORT</li>
+						<li>TLS_CA_LIST_FILE</li>
+						<li>TLS_CERTIFICATE_FILE</li>
+						<li>TLS_PRIVATE_KEY_FILE</li>
+						<li>TLS_PASSWORD</li>
+						<li>TLS_METHOD</li>
+						<li>TLS_CIPHERS</li>
+						<li>TLS_SERVER_NAME</li>
+						<li>TLS_VERIFY_SERVER</li>
+						<li>TLS_VERIFY_CLIENT</li>
+						<li>TLS_REQUIRE_CLIENT_CERTIFICATE</li>
+						<li>TLS_NEGOTIATION_TIMEOUT_SEC</li>
+						<li>TLS_NEGOTIATION_TIMEOUT_MSEC</li>
+						</ul>
+					</tp:docstring>
+				</arg>
+			</method>
+
+			<method name="setIp2IpDetails" tp:name-for-bindings="setIp2IpDetails">
+				<tp:docstring>
+					Same as <tp:member-ref>getAccountDetails</tp:member-ref>, but for the IP-to-IP profile.
+				</tp:docstring>
+		   <arg type="a{ss}" name="details" direction="in" tp:type="String_String_Map">
+			   <tp:docstring>
+				   The map of parameters. See <tp:member-ref>getIp2IpDetails</tp:member-ref> for complete reference.
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getCredential" tp:name-for-bindings="getCredential">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="s" name="accountID" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+		   <arg type="i" name="index" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+		   <arg type="a{ss}" name="credentialInformation" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getNumberOfCredential" tp:name-for-bindings="getNumberOfCredential">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="s" name="accountID" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+		   <arg type="i" name="numberOfCredential" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="addAccount" tp:name-for-bindings="addAccount">
+		   <tp:docstring>
+			   Add a new account. When created, the signal <tp:member-ref>accountsChanged</tp:member-ref> is emitted. The clients must then call <tp:member-ref>getAccountList</tp:member-ref> to update their internal data structure.
+			   <tp:rationale>If no details are specified, the default parameters are used.</tp:rationale>
+			   <tp:rationale>The core tries to register the account as soon it is created.</tp:rationale>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringString"/>
+		   <arg type="a{ss}" name="details" direction="in"  tp:type="String_String_Map">
+			   <tp:docstring>
+					The new account settings
+			   </tp:docstring>
+		   </arg>
+		   <arg type="s" name="createdAccountId" direction="out">
+			   <tp:docstring>
+					A new account ID
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setAccountsOrder" tp:name-for-bindings="setAccountsOrder">
+		   <tp:docstring>
+				Update the accounts order.
+				<tp:rationale>When placing a call, the first registered account in the list is used.</tp:rationale>
+		   </tp:docstring>
+		   <arg type="s" name="order" direction="in">
+			   <tp:docstring>
+				   An ordered list of account IDs, delimited by '/'
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="removeAccount" tp:name-for-bindings="removeAccount">
+		   <tp:docstring>
+			   Remove an existing account. When removed, the signal <tp:member-ref>accountsChanged</tp:member-ref> is emitted. The clients must then call <tp:member-ref>getAccountList</tp:member-ref> to update their internal data structure.
+		   </tp:docstring>
+		   <arg type="s" name="accoundID" direction="in">
+			   <tp:docstring>
+					The account to remove, identified by its ID
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getAccountList" tp:name-for-bindings="getAccountList">
+		   <tp:docstring>
+				Get a list of all created accounts, as stored by the core.
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+		   <arg type="as" name="list" direction="out">
+			   <tp:docstring>
+				   A list of account IDs
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="sendRegister" tp:name-for-bindings="sendRegister">
+		   <tp:docstring>
+				Send account registration (REGISTER) to the registrar.
+		   </tp:docstring>
+		   the account if expire=1, unregister if expire=0.
+
+		   @param[in] input accountID
+		   -->
+		   <arg type="s" name="accountID" direction="in">
+			   <tp:docstring>
+					The account ID
+			   </tp:docstring>
+		   </arg>
+		   <arg type="i" name="expire" direction="in">
+			   <tp:docstring>
+					<p>To register, expire must be 1.</p>
+					<p>To un-register, expire must be 0.</p>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getToneLocaleList" tp:name-for-bindings="getToneLocaleList">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+		   <arg type="as" name="list" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getVersion" tp:name-for-bindings="getVersion">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="s" name="version" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getRingtoneList" tp:name-for-bindings="getRingtoneList">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+		   <arg type="as" name="list" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getPlaybackDeviceList" tp:name-for-bindings="getPlaybackDeviceList">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+		   <arg type="as" name="list" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getRecordDeviceList" tp:name-for-bindings="getRecordDeviceList">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+		   <arg type="as" name="list" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="isRingtoneEnabled" tp:name-for-bindings="isRingtoneEnabled">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="bool" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="ringtoneEnabled" tp:name-for-bindings="ringtoneEnabled">
+		   <tp:docstring>
+		   </tp:docstring>
+	   </method>
+
+	   <method name="getRingtoneChoice" tp:name-for-bindings="getRingtoneChoice">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="s" name="tone" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setRingtoneChoice" tp:name-for-bindings="setRingtoneChoice">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="s" name="tone" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getAudioManager" tp:name-for-bindings="getAudioManager">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="api" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setAudioManager" tp:name-for-bindings="setAudioManager">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="api" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getRecordPath" tp:name-for-bindings="getRecordPath">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="s" name="rec" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setRecordPath" tp:name-for-bindings="setRecordPath">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="s" name="rec" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <!--      ///////////////////////               -->
+
+	   <!-- Codecs-related methods -->
+
+	   <method name="getCodecList" tp:name-for-bindings="getCodecList">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+		   <arg type="as" name="list" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getCodecDetails" tp:name-for-bindings="getCodecDetails">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="payload" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+		   <arg type="as" name="details" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getActiveCodecList" tp:name-for-bindings="getActiveCodecList">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+		   <arg type="s" name="accountID" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+		   <arg type="as" name="list" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setActiveCodecList" tp:name-for-bindings="setActiveCodecList">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="VectorString"/>
+		   <arg type="as" name="list" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+		   <arg type="s" name="accountID" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+
+	   <!-- Audio devices methods -->
+
+	   <method name="getInputAudioPluginList" tp:name-for-bindings="getInputAudioPluginList">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+		   <arg type="as" name="list" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getOutputAudioPluginList" tp:name-for-bindings="getOutputAudioPluginList">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+		   <arg type="as" name="list" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setInputAudioPlugin" tp:name-for-bindings="setInputAudioPlugin">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="s" name="audioPlugin" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setOutputAudioPlugin" tp:name-for-bindings="setOutputAudioPlugin">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="s" name="audioPlugin" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getAudioOutputDeviceList" tp:name-for-bindings="getAudioOutputDeviceList">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+		   <arg type="as" name="list" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setAudioOutputDevice" tp:name-for-bindings="setAudioOutputDevice">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="index" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getAudioInputDeviceList" tp:name-for-bindings="getAudioInputDeviceList">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+		   <arg type="as" name="list" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setAudioInputDevice" tp:name-for-bindings="setAudioInputDevice">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="index" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getCurrentAudioDevicesIndex" tp:name-for-bindings="getCurrentAudioDevicesIndex">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+		   <arg type="as" name="list" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getAudioDeviceIndex" tp:name-for-bindings="getAudioDeviceIndex">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="s" name="name" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+		   <arg type="i" name="index" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getCurrentAudioOutputPlugin" tp:name-for-bindings="getCurrentAudioOutputPlugin">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="s" name="plugin" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <!--    General Settings Panel         -->
+
+	   <method name="isMd5CredentialHashing" tp:name-for-bindings="isMd5CredentialHashing">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="b" name="res" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setMd5CredentialHashing" tp:name-for-bindings="setMd5CredentialHashing">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="b" name="enabled" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="isIax2Enabled" tp:name-for-bindings="isIax2Enabled">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="res" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setNotify" tp:name-for-bindings="setNotify">
+		   <tp:docstring>
+		   </tp:docstring>
+	   </method>
+
+	   <method name="getNotify" tp:name-for-bindings="getNotify">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="level" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setMailNotify" tp:name-for-bindings="setMailNotify">
+		   <tp:docstring>
+		   </tp:docstring>
+	   </method>
+
+	   <method name="getMailNotify" tp:name-for-bindings="getMailNotify">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="level" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getDialpad" tp:name-for-bindings="getDialpad">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="state" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setDialpad" tp:name-for-bindings="setDialpad">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="b" name="display" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getSearchbar" tp:name-for-bindings="getSearchbar">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="state" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setSearchbar" tp:name-for-bindings="setSearchbar">
+		   <tp:docstring>
+		   </tp:docstring>
+	   </method>
+
+	   <method name="setHistoryEnabled" tp:name-for-bindings="setHistoryEnabled">
+		   <tp:docstring>
+		   </tp:docstring>
+	   </method>
+
+	   <method name="getHistoryEnabled" tp:name-for-bindings="getHistoryEnabled">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="s" name="state" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getVolumeControls" tp:name-for-bindings="getVolumeControls">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="state" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setVolumeControls" tp:name-for-bindings="setVolumeControls">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="b" name="display" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getHistoryLimit" tp:name-for-bindings="getHistoryLimit">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="days" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setHistoryLimit" tp:name-for-bindings="setHistoryLimit">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="days" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="startHidden" tp:name-for-bindings="startHidden">
+		   <tp:docstring>
+		   </tp:docstring>
+	   </method>
+
+	   <method name="isStartHidden" tp:name-for-bindings="isStartHidden">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="state" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="popupMode" tp:name-for-bindings="popupMode">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="state" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="switchPopupMode" tp:name-for-bindings="switchPopupMode">
+		   <tp:docstring>
+		   </tp:docstring>
+	   </method>
+
+	   <method name="getWindowWidth" tp:name-for-bindings="getWindowWidth">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="width" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getWindowHeight" tp:name-for-bindings="getWindowHeight">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="height" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setWindowWidth" tp:name-for-bindings="setWindowWidth">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="width" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setWindowHeight" tp:name-for-bindings="setWindowHeight">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="height" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getWindowPositionX" tp:name-for-bindings="getWindowPositionX">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="posX" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setWindowPositionX" tp:name-for-bindings="setWindowPositionX">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="posX" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getWindowPositionY" tp:name-for-bindings="getWindowPositionY">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="posY" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setWindowPositionY" tp:name-for-bindings="setWindowPositionY">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="i" name="posY" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="enableStatusIcon" tp:name-for-bindings="enableStatusIcon">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="s" name="value" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="isStatusIconEnabled" tp:name-for-bindings="isStatusIconEnabled">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="s" name="value" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+
+	   <!-- Addressbook configuration -->
+	   <method name="getAddressbookSettings" tp:name-for-bindings="getAddressbookSettings">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringInt"/>
+		   <arg type="a{si}" name="settings" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setAddressbookSettings" tp:name-for-bindings="setAddressbookSettings">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringInt"/>
+		   <arg type="a{si}" name="settings" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <!-- Addressbook list -->
+	   <method name="getAddressbookList" tp:name-for-bindings="getAddressbookList">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+		   <arg type="as" name="settings" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setAddressbookList" tp:name-for-bindings="setAddressbookList">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="VectorString"/>
+		   <arg type="as" name="settings" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <!-- Hook configuration -->
+	   <method name="getHookSettings" tp:name-for-bindings="getHookSettings">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
+		   <arg type="a{ss}" name="settings" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setHookSettings" tp:name-for-bindings="setHookSettings">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringString"/>
+		   <arg type="a{ss}" name="settings" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getHistory" tp:name-for-bindings="getHistory">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
+		   <arg type="a{ss}" name="entries" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setHistory" tp:name-for-bindings="setHistory">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="MapStringString"/>
+		   <arg type="a{ss}" name="entries" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <signal name="accountsChanged" tp:name-for-bindings="accountsChanged">
+	   </signal>  
+
+	   <signal name="errorAlert" tp:name-for-bindings="errorAlert">
+		   <arg type="i" name="code">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </signal> 
+
+	   <!-- TLS Methods -->
+	   <method name="getSupportedTlsMethod" tp:name-for-bindings="getSupportedTlsMethod">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+		   <arg type="as" name="list" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getTlsSettingsDefault" tp:name-for-bindings="getTlsSettingsDefault">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="a{ss}" name="details" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getTlsSettings" tp:name-for-bindings="getTlsSettings">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="s" name="accountID" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
+		   <arg type="a{ss}" name="details" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setTlsSettings" tp:name-for-bindings="setTlsSettings">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="MapStringString"/>
+		   <arg type="s" name="accountID" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+		   <arg type="a{ss}" name="details" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getAddrFromInterfaceName" tp:name-for-bindings="getAddrFromInterfaceName">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="s" name="interface" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+		   <arg type="s" name="address" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getAllIpInterface" tp:name-for-bindings="getAllIpInterface">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+		   <arg type="as" name="list" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getAllIpInterfaceByName" tp:name-for-bindings="getAllIpInterfaceByName">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
+		   <arg type="as" name="list" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="getShortcuts" tp:name-for-bindings="getShortcuts">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="a{si}" name="shortcutsMap" direction="out">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+
+	   <method name="setShortcuts" tp:name-for-bindings="setShortcuts">
+		   <tp:docstring>
+		   </tp:docstring>
+		   <arg type="a{si}" name="shortcutsMap" direction="in">
+			   <tp:docstring>
+			   </tp:docstring>
+		   </arg>
+	   </method>
+   </interface>
+	   </node>
diff --git a/sflphone-common/src/dbus/configurationmanager.cpp b/sflphone-common/src/dbus/configurationmanager.cpp
index 6c4be309b14917c9a074715db047e2b4c4aedc22..b243157e772af3b07b793a7a13138b17dc846f51 100644
--- a/sflphone-common/src/dbus/configurationmanager.cpp
+++ b/sflphone-common/src/dbus/configurationmanager.cpp
@@ -33,6 +33,8 @@ ConfigurationManager::ConfigurationManager(DBus::Connection& connection) :
 	shortcutsKeys.push_back("pick_up");
 	shortcutsKeys.push_back("hang_up");
 	shortcutsKeys.push_back("popup_window");
+	shortcutsKeys.push_back("toggle_pick_up_hang_up");
+	shortcutsKeys.push_back("toggle_hold");
 }
 
 std::map<std::string, std::string> ConfigurationManager::getAccountDetails(
diff --git a/sflphone-common/src/dbus/instance-introspec.xml b/sflphone-common/src/dbus/instance-introspec.xml
index 90a60d632d04ca83039efcadcfa2f4981bfda39e..4b7d075cd87112df83744e3740f892d4f1cb26e5 100644
--- a/sflphone-common/src/dbus/instance-introspec.xml
+++ b/sflphone-common/src/dbus/instance-introspec.xml
@@ -1,18 +1,46 @@
 <?xml version="1.0" ?>
-<node name="/org/sflphone/SFLphone">
-  <interface name="org.sflphone.SFLphone.Instance">
-  
-    <method name="Register">
-      <arg type="i" name="pid" direction="in"/>
-      <arg type="s" name="name" direction="in"/>
-    </method>
-    
-    <method name="Unregister">
-      <arg type="i" name="pid" direction="in"/>
-    </method>
-    
-    <method name="getRegistrationCount">
-      <arg type="i" name="count" direction="out"/>
-    </method>
-  </interface>
+<node name="/instance-introspec" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+	<interface name="org.sflphone.SFLphone.Instance">
+		<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+		<p>Count the number of clients actually registered to the core. When initializing your client, you need to register it against the core by using this interface.</p>
+		</tp:docstring>
+		<method name="Register" tp:name-for-bindings="Register">
+			<tp:docstring>
+				Register a new client to the core. Increments the registration count.
+			</tp:docstring>
+			<arg type="i" name="pid" direction="in">
+				<tp:docstring>
+					The pid of the client process
+				</tp:docstring>
+			</arg>
+			<arg type="s" name="name" direction="in">
+				<tp:docstring>
+					The name of the client
+				</tp:docstring>
+			</arg>
+		</method>
+		<method name="Unregister" tp:name-for-bindings="Unregister">
+			<tp:docstring>
+				Unregister a connected client from the core. Decrements the registration count. If no more clients are connected, ie the registration count equals 0, the core properly quits.
+			</tp:docstring>
+			<arg type="i" name="pid" direction="in">
+				<tp:docstring>
+					The pid of the client process
+				</tp:docstring>
+			</arg>
+		</method>
+
+		<method name="getRegistrationCount" tp:name-for-bindings="getRegistrationCount">
+			<tp:docstring>
+				Get the number of connected clients.
+			</tp:docstring>
+		      <arg type="i" name="count" direction="out">
+				<tp:docstring>
+					The number of client currently connected to the core
+				</tp:docstring>
+				</arg>
+		</method>
+
+
+    </interface>
 </node>
diff --git a/sflphone-common/src/global.h b/sflphone-common/src/global.h
index 69973228a24a937e01c443f335196e86f7bc22b5..630403fd2bb69abc1ad74a15b55b684e65556fad 100644
--- a/sflphone-common/src/global.h
+++ b/sflphone-common/src/global.h
@@ -33,7 +33,7 @@
 #include <vector>
 #include "logger.h"
 
-#define SFLPHONED_VERSION "0.9.7"		/** Version number */
+#define SFLPHONED_VERSION "0.9.8~beta"		/** Version number */
 
 #define HOMEDIR					(getenv ("HOME"))				/** Home directory */
 #define XDG_DATA_HOME			(getenv ("XDG_DATA_HOME"))
diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp
index 573bcc74e8c523012cb226e93b24f1bb37d7430a..fdec6d8a8cb4b9fad95d5caaedfb8561b47da1b2 100644
--- a/sflphone-common/src/managerimpl.cpp
+++ b/sflphone-common/src/managerimpl.cpp
@@ -707,7 +707,7 @@ bool ManagerImpl::refuseCall (const CallID& id) {
 	// AudioLayer* audiolayer = getAudioDriver();
 
 	if (nbCalls <= 1) {
-		_debug ("Manager: Stop audio stream, ther is only %i  call(s) remaining", nbCalls);
+		_debug ("    refuseCall: stop audio stream, there is only %i call(s) remaining", nbCalls);
 
 		AudioLayer* audiolayer = getAudioDriver();
 		audiolayer->stopStream();
@@ -3814,7 +3814,7 @@ std::string ManagerImpl::addAccount (
 	if (_dbus)
 		_dbus->getConfigurationManager()->accountsChanged();
 
-	return newAccountID;
+	return accountID.str();
 }
 
 void ManagerImpl::deleteAllCredential (const AccountID& accountID) {
diff --git a/sflphone-common/src/managerimpl.h b/sflphone-common/src/managerimpl.h
index c2938844f8405674609d6918eb298d42e1e74a67..3e3b822c3d63c5507ab5caf0e484bd87655fff2b 100644
--- a/sflphone-common/src/managerimpl.h
+++ b/sflphone-common/src/managerimpl.h
@@ -1299,7 +1299,7 @@ class ManagerImpl {
     // 
     ConferenceMap _conferencemap;
 
-   
+
 
 private:
 
diff --git a/sflphone-common/src/sip/sipvoiplink.cpp b/sflphone-common/src/sip/sipvoiplink.cpp
index c38a29e9794231a36e815cc1d85188c52ddedf64..58f7f245a0d0332731c2f05ed720119ccdfa282c 100644
--- a/sflphone-common/src/sip/sipvoiplink.cpp
+++ b/sflphone-common/src/sip/sipvoiplink.cpp
@@ -3261,10 +3261,19 @@ void call_on_media_update (pjsip_inv_session *inv, pj_status_t status)
         _debug("UserAgent: SDES not initialized for this call\n");
     }
 
+	assert(call->getLocalSDP());
+	assert(call->getLocalSDP()->get_session_media());
+
+	AudioCodecType pl = (AudioCodecType)call->getLocalSDP()->get_session_media()->getPayload();
+	AudioCodec* audiocodec = Manager::instance().getCodecDescriptorMap().instantiateCodec(pl);
+
+	if (audiocodec == NULL)
+		_error ("SIP: No audiocodec found");
+
 
     try {
         call->setAudioStart (true);
-        call->getAudioRtp()->start();
+        call->getAudioRtp()->start(audiocodec);
     } catch (exception& rtpException) {
         _debug ("%s", rtpException.what());
     }
diff --git a/sflphone-common/test/Makefile.am b/sflphone-common/test/Makefile.am
index e3679eb678549f698cf3d25c20c994b7c10a4bdf..c2371cd96a0f32b938b6be9b31d5cfb48021443d 100644
--- a/sflphone-common/test/Makefile.am
+++ b/sflphone-common/test/Makefile.am
@@ -1,9 +1,51 @@
 include ../globals.mak
 
-
-noinst_PROGRAMS = numbercleanerTester pluginmanagerTester hookmanagerTester audiolayerTester historyTester mainbufferTester sdesnegotiatorTester #rtpTester
-
-OBJECT_FILES= \
+TESTS = test
+check_PROGRAMS = $(TESTS)
+test_CXXFLAGS = $(CPPUNIT_CFLAGS)
+test_LDADD = $(LLIBS)
+test_LDFLAGS = -ldl
+test_SOURCES = main.cpp \
+	validator.cpp \
+	validator.h \
+	accounttest.h \
+	accounttest.cpp \
+	audiolayertest.h \
+	audiolayertest.cpp \
+	configurationtest.h \
+	configurationtest.cpp \
+	historytest.h \
+	historytest.cpp \
+	hookmanagertest.h \
+	hookmanagertest.cpp \
+	mainbuffertest.h \
+	mainbuffertest.cpp \
+	numbercleanertest.h \
+	numbercleanertest.cpp \
+	pluginmanagertest.h \
+	pluginmanagertest.cpp \
+	rtptest.h \
+	rtptest.cpp \
+	sdesnegotiatortest.h \
+	sdesnegotiatortest.cpp
+
+
+
+
+LLIBS=$(CPPUNIT_LIBS) \
+	../src/libsflphone.la  \
+	$(ZEROCONFLIB) \
+	$(LIB_DNSSD) \
+	@ALSA_LIBS@ \
+	@PULSEAUDIO_LIBS@ \
+	@CPPUNIT_LIBS@ \
+	@CCEXT2_LIBS@ \
+	@CCGNU2_LIBS@ \
+	@CCRTP_LIBS@ \
+	@ZRTPCPP_LIBS@ \
+	@libssl_LIBS@ \
+	@SAMPLERATE_LIBS@ \
+	$(PJSIP_LIBS) \
 	../src/sflphoned-logger.o \
 	../src/sflphoned-managerimpl.o \
 	../src/sflphoned-account.o\
@@ -26,145 +68,4 @@ OBJECT_FILES= \
 	../src/plug-in/pluginmanager.o \
 	../src/plug-in/audiorecorder/audiorecord.o \
 	../src/audio/samplerateconverter.o \
-        ../src/history/historymanager.o
-	../
-
-numbercleanerTester_SOURCES = \
-		numbercleanerTest.h \
-		numbercleanerTest.cpp \
-		TestMain.cpp
-
-numbercleanerTester_LDADD = \
-		../src/libsflphone.la  \
-		$(SFLPHONE_LIBS) $(ZEROCONFLIB) $(LIB_DNSSD) \
-		@ALSA_LIBS@ \
-		@PULSEAUDIO_LIBS@ \
-		@CPPUNIT_LIBS@ \
-		@CCEXT2_LIBS@ \
-		@CCGNU2_LIBS@ \
-		@CCRTP_LIBS@ \
-		@SAMPLERATE_LIBS@ \
-		@ZRTPCPP_LIBS@ \
-		@libssl_LIBS@ \
-		$(PJSIP_LIBS) \
-		$(OBJECT_FILES)
-
-pluginmanagerTester_SOURCES = \
-		pluginmanagerTest.h \
-		pluginmanagerTest.cpp \
-		TestMain.cpp
-
-pluginmanagerTester_LDADD = \
-		../src/libsflphone.la  \
-		$(SFLPHONE_LIBS) $(ZEROCONFLIB) $(LIB_DNSSD) \
-		@ALSA_LIBS@ \
-		@PULSEAUDIO_LIBS@ \
-		@CPPUNIT_LIBS@ \
-		@CCEXT2_LIBS@ \
-		@CCGNU2_LIBS@ \
-		@CCRTP_LIBS@ \
-		@ZRTPCPP_LIBS@ \
-		@libssl_LIBS@ \
-		@SAMPLERATE_LIBS@ \
-		$(PJSIP_LIBS) \
-		$(OBJECT_FILES)
-
-hookmanagerTester_SOURCES = \
-		hookmanagerTest.cpp \
-		TestMain.cpp
-
-hookmanagerTester_LDADD = \
-		../src/libsflphone.la  \
-		$(SFLPHONE_LIBS) $(ZEROCONFLIB) $(LIB_DNSSD) \
-		@ALSA_LIBS@ \
-		@PULSEAUDIO_LIBS@ \
-		@CPPUNIT_LIBS@ \
-		@CCEXT2_LIBS@ \
-		@CCGNU2_LIBS@ \
-		@CCRTP_LIBS@ \
-		@ZRTPCPP_LIBS@ \
-		@libssl_LIBS@ \
-		@SAMPLERATE_LIBS@ \
-		$(PJSIP_LIBS) \
-		$(OBJECT_FILES)
-
-audiolayerTester_SOURCES = \
-		audiolayerTest.h \
-		audiolayerTest.cpp \
-		TestMain.cpp
-
-audiolayerTester_LDADD = \
-		../src/libsflphone.la  \
-		$(SFLPHONE_LIBS) $(ZEROCONFLIB) $(LIB_DNSSD) \
-		@ALSA_LIBS@ \
-		@PULSEAUDIO_LIBS@ \
-		@CPPUNIT_LIBS@ \
-		@CCEXT2_LIBS@ \
-		@CCGNU2_LIBS@ \
-		@CCRTP_LIBS@ \
-		@ZRTPCPP_LIBS@ \
-		@libssl_LIBS@ \
-		@SAMPLERATE_LIBS@ \
-		$(PJSIP_LIBS) \
-		$(OBJECT_FILES)
-
-historyTester_SOURCES = \
-		historyTest.h \
-		historyTest.cpp \
-		TestMain.cpp
-
-historyTester_LDADD = \
-		../src/libsflphone.la  \
-		$(SFLPHONE_LIBS) $(ZEROCONFLIB) $(LIB_DNSSD) \
-		@ALSA_LIBS@ \
-		@PULSEAUDIO_LIBS@ \
-		@CPPUNIT_LIBS@ \
-		@CCEXT2_LIBS@ \
-		@CCGNU2_LIBS@ \
-		@CCRTP_LIBS@ \
-		@ZRTPCPP_LIBS@ \
-		@libssl_LIBS@ \
-		@SAMPLERATE_LIBS@ \
-		$(PJSIP_LIBS) \
-		$(OBJECT_FILES)
-
-
-mainbufferTester_SOURCES = \
-		mainbufferTest.h \
-		mainbufferTest.cpp \
-		TestMain.cpp
-
-mainbufferTester_LDADD = \
-		../src/libsflphone.la  \
-		$(SFLPHONE_LIBS) $(ZEROCONFLIB) $(LIB_DNSSD) \
-		@ALSA_LIBS@ \
-		@PULSEAUDIO_LIBS@ \
-		@CPPUNIT_LIBS@ \
-		@CCEXT2_LIBS@ \
-		@CCGNU2_LIBS@ \
-		@CCRTP_LIBS@ \
-		@ZRTPCPP_LIBS@ \
-		@libssl_LIBS@ \
-		@SAMPLERATE_LIBS@ \
-		$(PJSIP_LIBS) \
-		$(OBJECT_FILES)
-
-sdesnegotiatorTester_SOURCES = \
-		sdesnegotiatorTest.h \
-		sdesnegotiatorTest.cpp \
-		TestMain.cpp
-
-sdesnegotiatorTester_LDADD = \
-		../src/libsflphone.la  \
-		$(SFLPHONE_LIBS) $(ZEROCONFLIB) $(LIB_DNSSD) \
-		@ALSA_LIBS@ \
-		@PULSEAUDIO_LIBS@ \
-		@CPPUNIT_LIBS@ \
-		@CCEXT2_LIBS@ \
-		@CCGNU2_LIBS@ \
-		@CCRTP_LIBS@ \
-		@ZRTPCPP_LIBS@ \
-		@libssl_LIBS@ \
-		@SAMPLERATE_LIBS@ \
-		$(PJSIP_LIBS) \
-		$(OBJECT_FILES)
+    ../src/history/historymanager.o
\ No newline at end of file
diff --git a/sflphone-common/test/README b/sflphone-common/test/README
deleted file mode 100644
index d090ea2cea1700e290c7f42e1e7da091b3ac4f47..0000000000000000000000000000000000000000
--- a/sflphone-common/test/README
+++ /dev/null
@@ -1 +0,0 @@
-The daemon has to be recompiled before compiling the unitary tests.
diff --git a/sflphone-common/test/TestMain.cpp b/sflphone-common/test/TestMain.cpp
deleted file mode 100644
index d6e9f932bfb83bbba4442748945c5fd8c53e406b..0000000000000000000000000000000000000000
--- a/sflphone-common/test/TestMain.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <cppunit/TextTestRunner.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-
-int main (int argc, const char* argv[])
-{
-    CppUnit::TextTestRunner runner;
-    runner.addTest (CppUnit::TestFactoryRegistry::getRegistry().makeTest());
-
-    return runner.run();
-
-}
-
diff --git a/sflphone-common/test/accounttest.cpp b/sflphone-common/test/accounttest.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..412a1b8b96f17dbd126ce7b3a25a33cac2e53f65
--- /dev/null
+++ b/sflphone-common/test/accounttest.cpp
@@ -0,0 +1,41 @@
+/*
+ *  Copyright (C) 2004-2007 Savoir-Faire Linux inc.
+ *  Author: Julien Bonjean <julien.bonjean@savoirfairelinux.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <cppunit/extensions/HelperMacros.h>
+#include <map>
+#include "accounttest.h"
+#include "manager.h"
+#include "logger.h"
+#include "validator.h"
+
+void AccountTest::TestAddRemove(void) {
+	_debug ("-------------------- AccountTest::TestAddRemove --------------------\n");
+
+	std::map<std::string, std::string> details;
+	details[CONFIG_ACCOUNT_TYPE] = "SIP";
+	details[CONFIG_ACCOUNT_ENABLE] = "false";
+
+	std::string accountId = Manager::instance().addAccount(details);
+	CPPUNIT_ASSERT(Validator::isNotNull(accountId));
+	CPPUNIT_ASSERT(Manager::instance().accountExists(accountId));
+
+	Manager::instance().removeAccount(accountId);
+
+	CPPUNIT_ASSERT(!Manager::instance().accountExists(accountId));
+}
diff --git a/sflphone-common/test/accounttest.h b/sflphone-common/test/accounttest.h
new file mode 100644
index 0000000000000000000000000000000000000000..61541c306881ee79bee6ed40a6307fb59017c213
--- /dev/null
+++ b/sflphone-common/test/accounttest.h
@@ -0,0 +1,38 @@
+/*
+ *  Copyright (C) 2004-2007 Savoir-Faire Linux inc.
+ *  Author: Julien Bonjean <julien.bonjean@savoirfairelinux.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef ACCOUNTTEST_H_
+#define ACCOUNTTEST_H_
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+class AccountTest : public CppUnit::TestFixture {
+
+  CPPUNIT_TEST_SUITE( AccountTest );
+  CPPUNIT_TEST( TestAddRemove );
+  CPPUNIT_TEST_SUITE_END();
+
+ public:
+  void TestAddRemove(void);
+};
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(AccountTest, "AccountTest");
+CPPUNIT_TEST_SUITE_REGISTRATION( AccountTest );
+
+#endif /* ACCOUNTTEST_H_ */
diff --git a/sflphone-common/test/audiolayerTest.cpp b/sflphone-common/test/audiolayerTest.cpp
deleted file mode 100644
index 962bb8fc4b6117d5d92bd085a833fb1d389666e8..0000000000000000000000000000000000000000
--- a/sflphone-common/test/audiolayerTest.cpp
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- *  Copyright (C) 2009 Savoir-Faire Linux inc.
- *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <stdio.h>
-#include <sstream>
-
-#include "audiolayerTest.h"
-
-#include <unistd.h>
-
-
-using std::cout;
-using std::endl;
-
-
-
-void AudioLayerTest::setUp()
-{
-
-    // Instanciate the manager
-    Manager::instance().init();
-    Manager::instance().initConfigFile();
-
-    // _audiodriver = Manager::instance().getAudioDriver();
-
-    // std::string alsaPlugin;
-    // AlsaLayer *alsalayer;
-
-    // int numCardIn, numCardOut, sampleRate, frameSize;
-    // layer = _audiodriver->getLayerType();
-
-    /*
-    alsaPlugin = Manager::instance().getConfigString( AUDIO , ALSA_PLUGIN );
-    numCardIn  = Manager::instance().getConfigInt( AUDIO , ALSA_CARD_ID_IN );
-    numCardOut = Manager::instance().getConfigInt( AUDIO , ALSA_CARD_ID_OUT );
-    sampleRate = Manager::instance().getConfigInt( AUDIO , ALSA_SAMPLE_RATE );
-    if (sampleRate <=0 || sampleRate > 48000) {
-        sampleRate = 44100;
-    }
-    frameSize = Manager::instance().getConfigInt(AUDIO, ALSA_FRAME_SIZE );
-    */
-
-    // get a pointer to the audio layer
-    // _audiodriver = Manager::instance().getAudioDriver();
-
-}
-
-void AudioLayerTest::testAudioLayerConfig()
-{
-    int sampling_rate = Manager::instance().getConfigInt (AUDIO, AUDIO_SAMPLE_RATE);
-    int frame_size = Manager::instance().getConfigInt (AUDIO, ALSA_FRAME_SIZE);
-    frame_size = 0; // frame size in config not used anymore
-
-    int layer = Manager::instance().getAudioDriver()->getLayerType();
-
-    if (layer != ALSA)
-        Manager::instance().switchAudioManager();
-
-    CPPUNIT_ASSERT ( (int) Manager::instance().getAudioDriver()->getSampleRate() == sampling_rate);
-
-    CPPUNIT_ASSERT ( (int) Manager::instance().getAudioDriver()->getFrameSize() == frame_size);
-}
-
-void AudioLayerTest::testAudioLayerSwitch()
-{
-
-    _debug ("---------- AudioLayerTest::testAudioLayerSwitch ---------------------------");
-
-
-    int previous_layer = Manager::instance().getAudioDriver()->getLayerType();
-
-    for (int i = 0; i < 2; i++) {
-        _debug ("---------- AudioLayerTest::testAudioLayerSwitch - %i -------------",i);
-        Manager::instance().switchAudioManager();
-
-        if (previous_layer == ALSA) {
-            CPPUNIT_ASSERT (Manager::instance().getAudioDriver()->getLayerType() == PULSEAUDIO);
-        } else {
-            CPPUNIT_ASSERT (Manager::instance().getAudioDriver()->getLayerType() == ALSA);
-        }
-
-        previous_layer = Manager::instance().getAudioDriver()->getLayerType();
-
-        usleep (100000);
-    }
-}
-
-
-
-void AudioLayerTest::testPulseConnect()
-{
-
-    _debug ("---------- AudioLayerTest::testPulseConnect ---------------------------");
-
-    ManagerImpl* manager;
-    manager = &Manager::instance();
-
-    // _pulselayer = new PulseLayer (manager);
-    _pulselayer = (PulseLayer*) Manager::instance().getAudioDriver();
-
-    CPPUNIT_ASSERT (_pulselayer->getLayerType() == PULSEAUDIO);
-
-    std::string alsaPlugin;
-    int numCardIn, numCardOut, sampleRate, frameSize;
-
-    alsaPlugin = manager->getConfigString (AUDIO , ALSA_PLUGIN);
-    numCardIn  = manager->getConfigInt (AUDIO , ALSA_CARD_ID_IN);
-    numCardOut = manager->getConfigInt (AUDIO , ALSA_CARD_ID_OUT);
-    sampleRate = manager->getConfigInt (AUDIO , AUDIO_SAMPLE_RATE);
-    frameSize = manager->getConfigInt (AUDIO, ALSA_FRAME_SIZE);
-
-    CPPUNIT_ASSERT (_pulselayer->getPlaybackStream() == NULL);
-    CPPUNIT_ASSERT (_pulselayer->getRecordStream() == NULL);
-
-    _pulselayer->setErrorMessage (-1);
-
-    try {
-        CPPUNIT_ASSERT (_pulselayer->openDevice (numCardIn, numCardOut, sampleRate, frameSize, SFL_PCM_BOTH, alsaPlugin) == true);
-    } catch (...) {
-        _debug ("Exception occured wile opening device! ");
-    }
-
-    usleep (100000);
-
-    CPPUNIT_ASSERT (_pulselayer->getPlaybackStream() == NULL);
-    CPPUNIT_ASSERT (_pulselayer->getRecordStream() == NULL);
-
-    // CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->pulseStream() != NULL);
-    // CPPUNIT_ASSERT (_pulselayer->getRecordStream()->pulseStream() != NULL);
-
-    // Must return Access failure "PA_ERR_ACCESS" == 2
-    // CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->getStreamState() == 2);
-    // CPPUNIT_ASSERT (_pulselayer->getRecordStream()->getStreamState() == 2);
-    _debug ("-------------------------- \n");
-    _pulselayer->startStream ();
-
-    // usleep(1000000);
-
-
-    CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->pulseStream() != NULL);
-    CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->pulseStream() != NULL);
-
-    // Must return No error "PA_OK" == 1
-    CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->getStreamState() == 1);
-    CPPUNIT_ASSERT (_pulselayer->getRecordStream()->getStreamState() == 1);
-
-    CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->disconnectStream() == true);
-    CPPUNIT_ASSERT (_pulselayer->getRecordStream()->disconnectStream() == true);
-
-    CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->connectStream() == true);
-    CPPUNIT_ASSERT (_pulselayer->getRecordStream()->connectStream() == true);
-
-    CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->getStreamState() == 1);
-    CPPUNIT_ASSERT (_pulselayer->getRecordStream()->getStreamState() == 1);
-
-    CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->connectStream() == true);
-    CPPUNIT_ASSERT (_pulselayer->getRecordStream()->connectStream() == true);
-
-    CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->getStreamState() == 1);
-    CPPUNIT_ASSERT (_pulselayer->getRecordStream()->getStreamState() == 1);
-
-    // usleep(1000000);
-    CPPUNIT_ASSERT (_pulselayer->disconnectAudioStream() == true);
-
-}
-
-
-void AudioLayerTest::testAlsaConnect()
-{
-
-    _debug ("---------- AudioLayerTest::testAlsaConnect ---------------------------");
-
-    int layer = Manager::instance().getAudioDriver()->getLayerType();
-
-    std::string alsaPlugin;
-
-    if (layer != ALSA) {
-        Manager::instance().switchAudioManager();
-        usleep (100000);
-    }
-
-    // _audiolayer = Manager::instance().getAudioDriver();
-
-    // CPPUNIT_ASSERT(_audiolayer->closeLayer() == true);
-    // usleep(100000);
-
-    // delete _audiolayer; _audiolayer == NULL;
-
-    Manager::instance().setConfig (PREFERENCES, CONFIG_AUDIO, ALSA);
-
-
-    // _audiolayer->setErrorMessage(-1);
-    // CPPUNIT_ASSERT(Manager::instance().initAudioDriver() == true);
-
-    // _audiolayer = Manager::instance().getAudioDriver();
-
-    // CPPUNIT_ASSERT(_audiolayer->getLayerType() == ALSA);
-
-}
-
-void AudioLayerTest::tearDown()
-{
-    // Delete the audio recorder module
-    // delete _ar; _ar = NULL;
-}
diff --git a/sflphone-common/test/audiolayertest.cpp b/sflphone-common/test/audiolayertest.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..7ea619ae2a84ccddbb11e17cc1d4e747e3f64ee2
--- /dev/null
+++ b/sflphone-common/test/audiolayertest.cpp
@@ -0,0 +1,133 @@
+/*
+ *  Copyright (C) 2009 Savoir-Faire Linux inc.
+ *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <stdio.h>
+#include <sstream>
+
+#include "audiolayertest.h"
+
+#include <unistd.h>
+
+using std::cout;
+using std::endl;
+
+void AudioLayerTest::testAudioLayerConfig() {
+	_debug ("-------------------- AudioLayerTest::testAudioLayerConfig --------------------\n");
+
+	int sampling_rate = Manager::instance().getConfigInt(AUDIO,
+			AUDIO_SAMPLE_RATE);
+	int frame_size = Manager::instance().getConfigInt(AUDIO, ALSA_FRAME_SIZE);
+
+	int layer = Manager::instance().getAudioDriver()->getLayerType();
+
+	if (layer != ALSA)
+		Manager::instance().switchAudioManager();
+
+	// TODO: Fix tests
+	//CPPUNIT_ASSERT ( (int) Manager::instance().getAudioDriver()->getSampleRate() == sampling_rate);
+
+	//CPPPUNIT_ASSERT ( (int) Manager::instance().getAudioDriver()->getFrameSize() == frame_size);
+}
+
+void AudioLayerTest::testAudioLayerSwitch() {
+	_debug ("-------------------- AudioLayerTest::testAudioLayerSwitch --------------------\n");
+
+	int previous_layer = Manager::instance().getAudioDriver()->getLayerType();
+
+	for (int i = 0; i < 2; i++) {
+		_debug ("iter - %i",i);
+		Manager::instance().switchAudioManager();
+
+		if (previous_layer == ALSA) {
+			CPPUNIT_ASSERT (Manager::instance().getAudioDriver()->getLayerType() == PULSEAUDIO);
+		} else {
+			CPPUNIT_ASSERT (Manager::instance().getAudioDriver()->getLayerType() == ALSA);
+		}
+
+		previous_layer = Manager::instance().getAudioDriver()->getLayerType();
+
+		usleep(100000);
+	}
+}
+
+void AudioLayerTest::testPulseConnect() {
+	_debug ("-------------------- AudioLayerTest::testPulseConnect --------------------\n");
+
+	if (Manager::instance().getAudioDriver()->getLayerType() == ALSA)
+		return;
+
+	ManagerImpl* manager;
+	manager = &Manager::instance();
+
+	_pulselayer = (PulseLayer*) Manager::instance().getAudioDriver();
+
+	CPPUNIT_ASSERT (_pulselayer->getLayerType() == PULSEAUDIO);
+
+	std::string alsaPlugin;
+	int numCardIn, numCardOut, sampleRate, frameSize;
+
+	alsaPlugin = manager->getConfigString(AUDIO, ALSA_PLUGIN);
+	numCardIn = manager->getConfigInt(AUDIO, ALSA_CARD_ID_IN);
+	numCardOut = manager->getConfigInt(AUDIO, ALSA_CARD_ID_OUT);
+	sampleRate = manager->getConfigInt(AUDIO, AUDIO_SAMPLE_RATE);
+	frameSize = manager->getConfigInt(AUDIO, ALSA_FRAME_SIZE);
+
+	CPPUNIT_ASSERT (_pulselayer->getPlaybackStream() == NULL);
+	CPPUNIT_ASSERT (_pulselayer->getRecordStream() == NULL);
+
+	_pulselayer->setErrorMessage(-1);
+
+	try {
+		CPPUNIT_ASSERT (_pulselayer->openDevice (numCardIn, numCardOut, sampleRate, frameSize, SFL_PCM_BOTH, alsaPlugin) == true);
+	} catch (...) {
+		_debug ("Exception occured wile opening device! ");
+	}
+
+	usleep(100000);
+
+	CPPUNIT_ASSERT (_pulselayer->getPlaybackStream() == NULL);
+	CPPUNIT_ASSERT (_pulselayer->getRecordStream() == NULL);
+
+	_debug ("-------------------------- \n");
+	_pulselayer->startStream();
+
+	CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->pulseStream() != NULL);
+	CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->pulseStream() != NULL);
+
+	// Must return No error "PA_OK" == 1
+	CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->getStreamState() == 1);
+	CPPUNIT_ASSERT (_pulselayer->getRecordStream()->getStreamState() == 1);
+
+	CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->disconnectStream() == true);
+	CPPUNIT_ASSERT (_pulselayer->getRecordStream()->disconnectStream() == true);
+
+	CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->connectStream() == true);
+	CPPUNIT_ASSERT (_pulselayer->getRecordStream()->connectStream() == true);
+
+	CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->getStreamState() == 1);
+	CPPUNIT_ASSERT (_pulselayer->getRecordStream()->getStreamState() == 1);
+
+	CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->connectStream() == true);
+	CPPUNIT_ASSERT (_pulselayer->getRecordStream()->connectStream() == true);
+
+	CPPUNIT_ASSERT (_pulselayer->getPlaybackStream()->getStreamState() == 1);
+	CPPUNIT_ASSERT (_pulselayer->getRecordStream()->getStreamState() == 1);
+
+	CPPUNIT_ASSERT (_pulselayer->disconnectAudioStream() == true);
+}
diff --git a/sflphone-common/test/audiolayerTest.h b/sflphone-common/test/audiolayertest.h
similarity index 55%
rename from sflphone-common/test/audiolayerTest.h
rename to sflphone-common/test/audiolayertest.h
index 7bda91c508c61ce2c100bffe42e798f9f0a0c434..b67edfe19c40e038042bc60e82ba3b6a1752017b 100644
--- a/sflphone-common/test/audiolayerTest.h
+++ b/sflphone-common/test/audiolayertest.h
@@ -17,6 +17,14 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+/*
+ * @file audiorecorderTest.cpp
+ * @brief       Regroups unitary tests related to the plugin manager.
+ */
+
+#ifndef _AUDIOLAYER_TEST_
+#define _AUDIOLAYER_TEST_
+
 // Cppunit import
 #include <cppunit/extensions/HelperMacros.h>
 #include <cppunit/TestCaller.h>
@@ -35,58 +43,30 @@
 #include "audio/alsa/alsalayer.h"
 #include "audio/pulseaudio/pulselayer.h"
 
-/*
- * @file audiorecorderTest.cpp  
- * @brief       Regroups unitary tests related to the plugin manager.
- */
+class AudioLayerTest: public CppUnit::TestFixture {
 
-#ifndef _AUDIOLAYER_TEST_
-#define _AUDIOLAYER_TEST_
+CPPUNIT_TEST_SUITE( AudioLayerTest );
+		CPPUNIT_TEST( testAudioLayerConfig );
+		CPPUNIT_TEST( testPulseConnect );
+		//TODO: this test ends the test sequence when using on a alsa only system
+		//CPPUNIT_TEST(testAudioLayerSwitch);
+	CPPUNIT_TEST_SUITE_END();
 
+public:
 
+	void testAudioLayerConfig();
+	void testPulseConnect();
+	void testAudioLayerSwitch();
 
-class AudioLayerTest : public CppUnit::TestCase {
-
-    /*
-     * Use cppunit library macros to add unit test the factory
-     */
-    CPPUNIT_TEST_SUITE( AudioLayerTest );
-        CPPUNIT_TEST( testAudioLayerConfig );
-        // CPPUNIT_TEST( testAudioLayerSwitch );
-        CPPUNIT_TEST( testPulseConnect );
-        // CPPUNIT_TEST( testAlsaConnect );
-    CPPUNIT_TEST_SUITE_END();
-
-    public:
-        AudioLayerTest() : CppUnit::TestCase("Audio Layer Tests") {}
-        
-        /*
-         * Code factoring - Common resources can be initialized here.
-         * This method is called by unitcpp before each test
-         */
-        void setUp();
-
-        /*
-         * Code factoring - Common resources can be released here.
-         * This method is called by unitcpp after each test
-         */
-        inline void tearDown();
-
-        void testAudioLayerConfig();
-        void testAudioLayerSwitch();
-        void testPulseConnect();
-        void testAlsaConnect();
-
-    private:
-
-        ManagerImpl* manager;
-        
-        PulseLayer* _pulselayer;
-       
-        int layer;
-};
+private:
+
+	ManagerImpl* manager;
 
-/* Register our test module */
+	PulseLayer* _pulselayer;
+
+	int layer;
+};
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(AudioLayerTest, "AudioLayerTest");
 CPPUNIT_TEST_SUITE_REGISTRATION( AudioLayerTest );
 
 #endif
diff --git a/sflphone-common/test/audiorecorderTest.cpp b/sflphone-common/test/audiorecorderTest.cpp
deleted file mode 100644
index d4dda35db6300499aeba05c5019a04ceec205349..0000000000000000000000000000000000000000
--- a/sflphone-common/test/audiorecorderTest.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- *  Copyright (C) 2009 Savoir-Faire Linux inc.
- *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software-
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <stdio.h>
-#include <sstream>
-
-#include "audiorecorderTest.h"
-
-using std::cout;
-using std::endl;
-
-void AudioRecorderTest::setUp()
-{
-    // Instanciate the object
-    _ar = new AudioRecord();
-}
-
-void AudioRecorderTest::testRecordData()
-{
-
-    /*
-      FILE_TYPE ft = FILE_WAV;
-      SOUND_FORMAT sf = INT16;
-      _ar->setSndSamplingRate(44100);
-      _ar->openFile("theWavFile.wav",ft,sf);
-
-      cout << "file opened!";
-
-      SFLDataFormat buf [2];
-      for (SFLDataFormat i = -32768; i < 32767; i++ ){
-        buf[0] = i;
-        buf[1] = i;
-        _ar->recData(buf,2);
-      }
-
-      _ar->closeFile();
-    */
-}
-
-void AudioRecorderTest::tearDown()
-{
-    // Delete the audio recorder module
-    delete _ar;
-    _ar = NULL;
-}
diff --git a/sflphone-common/test/audiorecorderTest.h b/sflphone-common/test/audiorecorderTest.h
deleted file mode 100644
index 216b657079562007a1eb04955f390e3263ef1c87..0000000000000000000000000000000000000000
--- a/sflphone-common/test/audiorecorderTest.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *  Copyright (C) 2009 Savoir-Faire Linux inc.
- *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-// Cppunit import
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/TestCaller.h>
-#include <cppunit/TestCase.h>
-#include <cppunit/TestSuite.h>
-
-#include <assert.h>
-
-// Application import
-#include "plug-in/pluginmanager.h"
-#include "plug-in/audiorecorder/audiorecord.h"
-
-/*
- * @file audiorecorderTest.cpp  
- * @brief       Regroups unitary tests related to the plugin manager.
- */
-
-#ifndef _AUDIORECORDER_TEST_
-#define _AUDIORECORDER_TEST_
-
-class AudioRecorderTest : public CppUnit::TestCase {
-
-    /*
-     * Use cppunit library macros to add unit test the factory
-     */
-    CPPUNIT_TEST_SUITE( AudioRecorderTest );
-        CPPUNIT_TEST( testRecordData );
-    CPPUNIT_TEST_SUITE_END();
-
-    public:
-        AudioRecorderTest() : CppUnit::TestCase("Audio Recorder Tests") {}
-        
-        /*
-         * Code factoring - Common resources can be initialized here.
-         * This method is called by unitcpp before each test
-         */
-        void setUp();
-
-        /*
-         * Code factoring - Common resources can be released here.
-         * This method is called by unitcpp after each test
-         */
-        inline void tearDown();
-
-        void testRecordData();
-        
-    private:
-        AudioRecord *_ar;
-};
-
-/* Register our test module */
-CPPUNIT_TEST_SUITE_REGISTRATION( AudioRecorderTest );
-
-#endif
diff --git a/sflphone-common/test/configurationTest.cpp b/sflphone-common/test/configurationTest.cpp
deleted file mode 100644
index 1819c92db1afc0a5073a3b5bbfc3a1be28569f55..0000000000000000000000000000000000000000
--- a/sflphone-common/test/configurationTest.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- *  Copyright (C) 2008 Savoir-Faire Linux inc.
- *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <stdio.h>
-#include <sstream>
-
-#include "configurationTest.h"
-
-using std::cout;
-using std::endl;
-
-void ConfigurationTest::setUp()
-{
-    // Load the default configuration
-    Manager::instance().initConfigFile();
-}
-
-void ConfigurationTest::testDefaultValueAudio()
-{
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (AUDIO, ALSA_CARD_ID_IN) == ALSA_DFT_CARD) ;
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (AUDIO, ALSA_CARD_ID_OUT) == ALSA_DFT_CARD);
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (AUDIO, ALSA_SAMPLE_RATE) == DFT_SAMPLE_RATE);
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (AUDIO, ALSA_FRAME_SIZE) == DFT_FRAME_SIZE) ;
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (AUDIO, ALSA_PLUGIN) == PCM_DEFAULT);
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (AUDIO, VOLUME_SPKR) == DFT_VOL_SPKR_STR);
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (AUDIO, VOLUME_MICRO) == DFT_VOL_MICRO_STR);
-}
-
-void ConfigurationTest::testDefaultValuePreferences()
-{
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, ZONE_TONE) == DFT_ZONE);
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, CONFIG_DIALPAD) == YES_STR);
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, CONFIG_RINGTONE) == YES_STR);
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, CONFIG_SEARCHBAR) == YES_STR);
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, CONFIG_START) == NO_STR);
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, CONFIG_POPUP) == YES_STR);
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, CONFIG_NOTIFY) == YES_STR);
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, CONFIG_MAIL_NOTIFY) == NO_STR);
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, CONFIG_VOLUME) == YES_STR);
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, REGISTRATION_EXPIRE) == DFT_EXPIRE_VALUE);
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, CONFIG_AUDIO) == DFT_AUDIO_MANAGER);
-
-}
-
-void ConfigurationTest::testDefaultValueSignalisation()
-{
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (SIGNALISATION , SYMMETRIC) == YES_STR);
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (SIGNALISATION , PLAY_DTMF) == YES_STR);
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (SIGNALISATION , PLAY_TONES) == YES_STR);
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (SIGNALISATION , PULSE_LENGTH) == DFT_PULSE_LENGTH_STR);
-    CPPUNIT_ASSERT (Manager::instance().getConfigString (SIGNALISATION , SEND_DTMF_AS) == SIP_INFO_STR);
-}
-
-void ConfigurationTest::testLoadSIPAccount()
-{
-
-    AccountMap accounts;
-    Account *current;
-    std::ostringstream ss;
-    int nb_account; // Must be 1
-
-    // Load the account from the user file
-    nb_account = Manager::instance().loadAccountMap();
-    CPPUNIT_ASSERT_EQUAL (1, nb_account);
-    // Save the account information
-    accounts = Manager::instance()._accountMap;
-
-    AccountMap::iterator iter = accounts.begin();
-    CPPUNIT_ASSERT (Manager::instance().accountExists (iter->first) == true);
-
-    while (iter != accounts.end()) {
-        current = iter->second;
-        CPPUNIT_ASSERT (iter->first == current->getAccountID());
-        CPPUNIT_ASSERT (0 ==  current->getVoIPLink());
-        iter++;
-    }
-}
-
-void ConfigurationTest::testUnloadSIPAccount()
-{
-
-    AccountMap accounts;
-
-    // Load the accounts from the user file
-    Manager::instance().loadAccountMap();
-    // Unload the accounts
-    Manager::instance().unloadAccountMap();
-    // Save the account information
-    accounts = Manager::instance()._accountMap;
-
-    AccountMap::iterator iter = accounts.begin();
-    CPPUNIT_ASSERT (Manager::instance().accountExists (iter->first) == false);
-
-    if (iter != accounts.end()) {
-        CPPUNIT_FAIL ("Unload account map failed\n");
-    }
-}
-
-void ConfigurationTest::testInitVolume()
-{
-
-    Manager::instance().initVolume();
-
-    CPPUNIT_ASSERT (Manager::instance().getConfigInt (AUDIO, VOLUME_SPKR) == Manager::instance().getSpkrVolume());
-    CPPUNIT_ASSERT (Manager::instance().getConfigInt (AUDIO, VOLUME_MICRO) == Manager::instance().getMicVolume());
-}
-
-void ConfigurationTest::testInitAudioDriver()
-{
-
-    // Load the audio driver
-    Manager::instance().initAudioDriver();
-
-    // Check the creation
-
-    if (Manager::instance().getAudioDriver() == NULL)
-        CPPUNIT_FAIL ("Error while loading audio layer");
-
-    // Check if it has been created with the right type
-    if (Manager::instance().getConfigInt (PREFERENCES, CONFIG_AUDIO) == ALSA)
-        CPPUNIT_ASSERT_EQUAL (Manager::instance().getAudioDriver()->getLayerType(), ALSA);
-    else if (Manager::instance().getConfigInt (PREFERENCES, CONFIG_AUDIO) == PULSEAUDIO)
-        CPPUNIT_ASSERT_EQUAL (Manager::instance().getAudioDriver()->getLayerType(), PULSEAUDIO);
-    else
-        CPPUNIT_FAIL ("Wrong audio layer type");
-}
-
-void ConfigurationTest::testSelectAudioDriver()
-{
-}
diff --git a/sflphone-common/test/configurationTest.h b/sflphone-common/test/configurationTest.h
deleted file mode 100644
index 87828521eed303cbe2b195684f0ffbe45048db74..0000000000000000000000000000000000000000
--- a/sflphone-common/test/configurationTest.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- *  Copyright (C) 2008 Savoir-Faire Linux inc.
- *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-// Cppunit import
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/TestCaller.h>
-#include <cppunit/TestCase.h>
-#include <cppunit/TestSuite.h>
-
-#include <assert.h>
-
-// Application import
-#include "manager.h"
-#include "audio/audiolayer.h"
-#include "global.h"
-#include "user_cfg.h"
-
-/*
- * @file configurationTest.cpp  
- * @brief       Regroups unitary tests related to the user configuration.
- *              Check if the default configuration has been successfully loaded
- */
-
-#ifndef _CONFIGURATION_TEST_
-#define _CONFIGURATION_TEST_
-
-class ConfigurationTest : public CppUnit::TestCase {
-
-    /*
-     * Use cppunit library macros to add unit test the factory
-     */
-    CPPUNIT_TEST_SUITE( ConfigurationTest );
-        CPPUNIT_TEST( testDefaultValueAudio );
-        CPPUNIT_TEST( testDefaultValuePreferences );
-        CPPUNIT_TEST( testDefaultValueSignalisation ); 
-        CPPUNIT_TEST( testLoadSIPAccount );
-        CPPUNIT_TEST( testUnloadSIPAccount );
-        CPPUNIT_TEST( testInitVolume );
-        CPPUNIT_TEST( testInitAudioDriver );
-        CPPUNIT_TEST( testSelectAudioDriver );
-    CPPUNIT_TEST_SUITE_END();
-
-    public:
-        ConfigurationTest() : CppUnit::TestCase("Configuration Tests") {}
-        
-        /*
-         * Code factoring - Common resources can be initialized here.
-         * This method is called by unitcpp before each test
-         */
-        void setUp();
-
-        /*
-         * Code factoring - Common resources can be released here.
-         * This method is called by unitcpp after each test
-         */
-        inline void tearDown(){
-            // Not much to do
-        }
-
-        /*
-         * Unit tests related to the audio preferences
-         */
-        void testDefaultValueAudio();
-            
-        /*
-         * Unit tests related to the global settings
-         */
-        void testDefaultValuePreferences();
-
-        /*
-         * Unit tests related to the global settings
-         */
-        void testDefaultValueSignalisation();
-        
-        /*
-         * Try to load one SIP account.
-         * So be sure to have only one SIP account so that the test could succeed
-         */
-        void testLoadSIPAccount();
-        void testUnloadSIPAccount();
-    
-        void testInitVolume(); 
-
-        void testInitAudioDriver();
-        void testSelectAudioDriver();
-
-};
-
-/* Register our test module */
-CPPUNIT_TEST_SUITE_REGISTRATION( ConfigurationTest );
-
-#endif
diff --git a/sflphone-common/test/configurationtest.cpp b/sflphone-common/test/configurationtest.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3ccee26112b4983f28d566d48930988082bf4a48
--- /dev/null
+++ b/sflphone-common/test/configurationtest.cpp
@@ -0,0 +1,141 @@
+/*
+ *  Copyright (C) 2008 Savoir-Faire Linux inc.
+ *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <stdio.h>
+#include <sstream>
+
+#include "configurationtest.h"
+#include "constants.h"
+
+using std::cout;
+using std::endl;
+
+void ConfigurationTest::testDefaultValueAudio() {
+	_debug ("-------------------- ConfigurationTest::testDefaultValueAudio() --------------------\n");
+
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (AUDIO, ALSA_CARD_ID_IN) == ALSA_DFT_CARD);
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (AUDIO, ALSA_CARD_ID_OUT) == ALSA_DFT_CARD);
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (AUDIO, AUDIO_SAMPLE_RATE) == DFT_SAMPLE_RATE);
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (AUDIO, ALSA_FRAME_SIZE) == DFT_FRAME_SIZE);
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (AUDIO, ALSA_PLUGIN) == PCM_DEFAULT);
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (AUDIO, VOLUME_SPKR) == DFT_VOL_SPKR_STR);
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (AUDIO, VOLUME_MICRO) == DFT_VOL_MICRO_STR);
+}
+
+void ConfigurationTest::testDefaultValuePreferences() {
+	_debug ("-------------------- ConfigurationTest::testDefaultValuePreferences --------------------\n");
+
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, ZONE_TONE) == DFT_ZONE);
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, CONFIG_DIALPAD) == NO_STR);
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, CONFIG_RINGTONE) == YES_STR);
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, CONFIG_SEARCHBAR) == YES_STR);
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, CONFIG_START) == NO_STR);
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, CONFIG_POPUP) == NO_STR);
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, CONFIG_NOTIFY) == YES_STR);
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, CONFIG_MAIL_NOTIFY) == NO_STR);
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, CONFIG_VOLUME) == NO_STR);
+	//CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, REGISTRATION_EXPIRE) == DFT_EXPIRE_VALUE);
+	//CPPUNIT_ASSERT (Manager::instance().getConfigString (PREFERENCES, CONFIG_AUDIO) == DFT_AUDIO_MANAGER);
+
+}
+
+void ConfigurationTest::testDefaultValueSignalisation() {
+	_debug ("-------------------- ConfigurationTest::testDefaultValueSignalisation --------------------\n");
+
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (SIGNALISATION , SYMMETRIC) == YES_STR);
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (SIGNALISATION , PLAY_DTMF) == YES_STR);
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (SIGNALISATION , PLAY_TONES) == YES_STR);
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (SIGNALISATION , PULSE_LENGTH) == DFT_PULSE_LENGTH_STR);
+	CPPUNIT_ASSERT (Manager::instance().getConfigString (SIGNALISATION , SEND_DTMF_AS) == SIP_INFO_STR);
+}
+
+void ConfigurationTest::testLoadSIPAccount() {
+	_debug ("-------------------- ConfigurationTest::testLoadSIPAccount --------------------\n");
+
+	AccountMap accounts;
+	Account *current;
+	std::ostringstream ss;
+	int nb_account; // Must be 1
+
+	// Load the account from the user file
+	nb_account = Manager::instance().loadAccountMap();
+	CPPUNIT_ASSERT_EQUAL (1, nb_account);
+	// Save the account information
+	accounts = Manager::instance()._accountMap;
+
+	AccountMap::iterator iter = accounts.begin();
+	CPPUNIT_ASSERT (Manager::instance().accountExists (iter->first) == true);
+
+	while (iter != accounts.end()) {
+		current = iter->second;
+		CPPUNIT_ASSERT (iter->first == current->getAccountID());
+		CPPUNIT_ASSERT (0 == current->getVoIPLink());
+		iter++;
+	}
+}
+
+void ConfigurationTest::testUnloadSIPAccount() {
+	_debug ("-------------------- ConfigurationTest::testUnloadSIPAccount --------------------\n");
+
+	AccountMap accounts;
+
+	// Load the accounts from the user file
+	Manager::instance().loadAccountMap();
+	// Unload the accounts
+	Manager::instance().unloadAccountMap();
+	// Save the account information
+	accounts = Manager::instance()._accountMap;
+
+	AccountMap::iterator iter = accounts.begin();
+	CPPUNIT_ASSERT (Manager::instance().accountExists (iter->first) == false);
+
+	if (iter != accounts.end()) {
+		CPPUNIT_FAIL ("Unload account map failed\n");
+	}
+}
+
+void ConfigurationTest::testInitVolume() {
+	_debug ("-------------------- ConfigurationTest::testInitVolume --------------------\n");
+
+	Manager::instance().initVolume();
+
+	CPPUNIT_ASSERT (Manager::instance().getConfigInt (AUDIO, VOLUME_SPKR) == Manager::instance().getSpkrVolume());
+	CPPUNIT_ASSERT (Manager::instance().getConfigInt (AUDIO, VOLUME_MICRO) == Manager::instance().getMicVolume());
+}
+
+void ConfigurationTest::testInitAudioDriver() {
+	_debug ("-------------------- ConfigurationTest::testInitAudioDriver --------------------\n");
+
+	// Load the audio driver
+	Manager::instance().initAudioDriver();
+
+	// Check the creation
+
+	if (Manager::instance().getAudioDriver() == NULL)
+		CPPUNIT_FAIL ("Error while loading audio layer");
+
+	// Check if it has been created with the right type
+	if (Manager::instance().getConfigInt(PREFERENCES, CONFIG_AUDIO) == ALSA)
+		CPPUNIT_ASSERT_EQUAL (Manager::instance().getAudioDriver()->getLayerType(), ALSA);
+	else if (Manager::instance().getConfigInt(PREFERENCES, CONFIG_AUDIO)
+			== PULSEAUDIO)
+		CPPUNIT_ASSERT_EQUAL (Manager::instance().getAudioDriver()->getLayerType(), PULSEAUDIO);
+	else
+		CPPUNIT_FAIL ("Wrong audio layer type");
+}
diff --git a/sflphone-common/test/configurationtest.h b/sflphone-common/test/configurationtest.h
new file mode 100644
index 0000000000000000000000000000000000000000..7fe7c30ae0fcdcbea913cfbc39bf475e9888371d
--- /dev/null
+++ b/sflphone-common/test/configurationtest.h
@@ -0,0 +1,88 @@
+/*
+ *  Copyright (C) 2008 Savoir-Faire Linux inc.
+ *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+ * @file configurationTest.cpp
+ * @brief       Regroups unitary tests related to the user configuration.
+ *              Check if the default configuration has been successfully loaded
+ */
+
+#ifndef _CONFIGURATION_TEST_
+#define _CONFIGURATION_TEST_
+
+// Cppunit import
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/TestCaller.h>
+#include <cppunit/TestCase.h>
+#include <cppunit/TestSuite.h>
+
+#include <assert.h>
+
+// Application import
+#include "manager.h"
+#include "audio/audiolayer.h"
+#include "global.h"
+#include "user_cfg.h"
+
+class ConfigurationTest: public CppUnit::TestFixture {
+
+	/*
+	 * Use cppunit library macros to add unit test the factory
+	 */
+CPPUNIT_TEST_SUITE( ConfigurationTest );
+		CPPUNIT_TEST( testInitVolume );
+		CPPUNIT_TEST( testDefaultValueAudio );
+		CPPUNIT_TEST( testDefaultValuePreferences );
+		CPPUNIT_TEST( testDefaultValueSignalisation );
+		CPPUNIT_TEST( testInitAudioDriver );
+	CPPUNIT_TEST_SUITE_END();
+
+public:
+	/*
+	 * Unit tests related to the audio preferences
+	 */
+	void testDefaultValueAudio();
+
+	/*
+	 * Unit tests related to the global settings
+	 */
+	void testDefaultValuePreferences();
+
+	/*
+	 * Unit tests related to the global settings
+	 */
+	void testDefaultValueSignalisation();
+
+	/*
+	 * Try to load one SIP account.
+	 * So be sure to have only one SIP account so that the test could succeed
+	 */
+	void testLoadSIPAccount();
+
+	void testUnloadSIPAccount();
+
+	void testInitVolume();
+
+	void testInitAudioDriver();
+};
+/* Register our test module */
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(ConfigurationTest, "ConfigurationTest");
+CPPUNIT_TEST_SUITE_REGISTRATION( ConfigurationTest );
+
+#endif
diff --git a/sflphone-common/test/constants.h b/sflphone-common/test/constants.h
new file mode 100644
index 0000000000000000000000000000000000000000..28b27a69d6f3cf1464c565180c34ed1a93597ed3
--- /dev/null
+++ b/sflphone-common/test/constants.h
@@ -0,0 +1,18 @@
+/*
+ * constants.h
+ *
+ *  Created on: 2010-03-15
+ *      Author: jb
+ */
+
+#ifndef CONSTANTS_H_
+#define CONSTANTS_H_
+
+#define YES_STR "1"
+#define NO_STR "0"
+#define HISTORY_SAMPLE  "history-sample"
+#define HISTORY_SAMPLE_SIZE     3
+#define CONFIG_SAMPLE   "sflphonedrc-sample"
+#define HUGE_HISTORY_LIMIT      20000
+
+#endif /* CONSTANTS_H_ */
diff --git a/sflphone-common/test/historyTest.cpp b/sflphone-common/test/historyTest.cpp
deleted file mode 100644
index b21179bb7883918fbf19ec2a8e90f902d2cdb41b..0000000000000000000000000000000000000000
--- a/sflphone-common/test/historyTest.cpp
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- *  Copyright (C) 2009 Savoir-Faire Linux inc.
- *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <stdio.h>
-#include <sstream>
-
-#include "historyTest.h"
-#include "manager.h"
-
-using std::cout;
-using std::endl;
-
-#define HISTORY_SAMPLE  "history-sample"
-#define HISTORY_SAMPLE_SIZE     3
-#define CONFIG_SAMPLE   "sflphonedrc-sample"
-#define HUGE_HISTORY_LIMIT      20000
-
-void HistoryTest::setUp()
-{
-    // Instanciate the cleaner singleton
-    history = new HistoryManager ();
-}
-
-void HistoryTest::test_create_history_path ()
-{
-
-    int result;
-    char *cpath;
-    std::string path;
-
-    cpath = getenv ("XDG_DATA_HOME");
-    (cpath != NULL) ? path = std::string (cpath) : path = std::string (HOMEDIR) + "/.local/share/sflphone/history";
-
-    result = history->create_history_path ();
-    CPPUNIT_ASSERT (result == 0);
-    CPPUNIT_ASSERT (!history->is_loaded ());
-    CPPUNIT_ASSERT (history->_history_path == path);
-}
-
-void HistoryTest::test_load_history_from_file ()
-{
-    bool res;
-    Conf::ConfigTree history_list;
-
-    history->create_history_path ();
-    res = history->load_history_from_file (&history_list);
-
-    CPPUNIT_ASSERT (history->is_loaded ());
-    CPPUNIT_ASSERT (res == true);
-}
-
-void HistoryTest::test_load_history_items_map ()
-{
-    std::string path;
-    int nb_items;
-    Conf::ConfigTree history_list;
-
-    history->set_history_path (HISTORY_SAMPLE);
-    history->load_history_from_file (&history_list);
-    nb_items = history->load_history_items_map (&history_list, HUGE_HISTORY_LIMIT);
-    CPPUNIT_ASSERT (nb_items == HISTORY_SAMPLE_SIZE);
-    CPPUNIT_ASSERT (history->get_history_size () == HISTORY_SAMPLE_SIZE);
-}
-
-void HistoryTest::test_save_history_items_map ()
-{
-    std::string path;
-    int nb_items_loaded, nb_items_saved;
-    Conf::ConfigTree history_list, history_list2;
-
-    history->set_history_path (HISTORY_SAMPLE);
-    history->load_history_from_file (&history_list);
-    nb_items_loaded = history->load_history_items_map (&history_list, HUGE_HISTORY_LIMIT);
-    nb_items_saved = history->save_history_items_map (&history_list2);
-    CPPUNIT_ASSERT (nb_items_loaded == nb_items_saved);
-}
-
-void HistoryTest::test_save_history_to_file ()
-{
-    std::string path;
-    Conf::ConfigTree history_list, history_list2;
-    std::map <std::string, std::string> res;
-    std::map <std::string, std::string>::iterator iter;
-
-    history->set_history_path (HISTORY_SAMPLE);
-    history->load_history_from_file (&history_list);
-    history->load_history_items_map (&history_list, HUGE_HISTORY_LIMIT);
-    history->save_history_items_map (&history_list2);
-    CPPUNIT_ASSERT (history->save_history_to_file (&history_list2));
-}
-
-void HistoryTest::test_get_history_serialized ()
-{
-    std::map <std::string, std::string> res;
-    std::map <std::string, std::string>::iterator iter;
-    std::string tmp;
-
-    // Load the sample user config
-    Manager::instance().initConfigFile (true, CONFIG_SAMPLE);
-    Manager::instance().loadAccountMap ();
-
-    CPPUNIT_ASSERT (history->load_history (HUGE_HISTORY_LIMIT, HISTORY_SAMPLE) == HISTORY_SAMPLE_SIZE);
-    res = history->get_history_serialized ();
-    CPPUNIT_ASSERT (res.size() ==HISTORY_SAMPLE_SIZE);
-
-    // Warning - If you change the history-sample file, you must change the following lines also so that the tests could work
-    // The reference here is the file history-sample in this test directory
-    // The serialized form is: calltype%to%from%callid
-
-    // Check the first
-    tmp = "0|514-276-5468|Savoir-faire Linux|144562458|empty";
-    CPPUNIT_ASSERT (tmp == res ["144562436"]);
-
-    tmp = "2|136|Emmanuel Milou|747638765|Account:1239059899";
-    CPPUNIT_ASSERT (tmp == res ["747638685"]);
-
-    // the account ID does not correspond to a loaded account
-    tmp = "1|5143848557|empty|775354987|empty";
-    CPPUNIT_ASSERT (tmp == res ["775354456"]);
-}
-
-void HistoryTest::test_set_serialized_history ()
-{
-    // We build a map to have an efficient test
-    std::map <std::string, std::string> map_test;
-    std::string tmp;
-    Conf::ConfigTree history_list;
-
-    map_test["144562436"] = "0|514-276-5468|Savoir-faire Linux|144562458|empty";
-    map_test["747638685"] = "2|136|Emmanuel Milou|747638765|Account:1239059899";
-    map_test["775354456"] = "1|5143848557|empty|775354987|Account:43789459478";
-
-    CPPUNIT_ASSERT (history->load_history (HUGE_HISTORY_LIMIT, HISTORY_SAMPLE) == HISTORY_SAMPLE_SIZE);
-    // We use a large history limit to be able to interpret results
-    CPPUNIT_ASSERT (history->set_serialized_history (map_test, HUGE_HISTORY_LIMIT) == 3);
-    CPPUNIT_ASSERT (history->get_history_size () == 3);
-
-    map_test.clear ();
-    map_test = history->get_history_serialized ();
-    CPPUNIT_ASSERT (map_test.size() ==3);
-
-    // Check the first
-    tmp = "0|514-276-5468|Savoir-faire Linux|144562458|empty";
-    CPPUNIT_ASSERT (tmp == map_test ["144562436"]);
-
-    tmp = "2|136|Emmanuel Milou|747638765|Account:1239059899";
-    CPPUNIT_ASSERT (tmp == map_test ["747638685"]);
-
-    // the account ID does not correspond to a loaded account
-    tmp = "1|5143848557|empty|775354987|empty";
-    CPPUNIT_ASSERT (tmp == map_test ["775354456"]);
-
-    history->save_history_items_map (&history_list);
-    CPPUNIT_ASSERT (history->save_history_to_file (&history_list));
-}
-
-void HistoryTest::test_set_serialized_history_with_limit ()
-{
-    // We build a map to have an efficient test
-    std::map <std::string, std::string> map_test;
-    std::string tmp;
-    Conf::ConfigTree history_list;
-    time_t current, day=86400; // One day in unix timestamp
-    std::stringstream current_1, current_2, current_3;
-
-    (void) time (&current);
-    current_1 << (current - 2*day) << std::endl;
-    current_2 << (current - 5*day) << std::endl;
-    current_3 << (current - 11*day) << std::endl;
-
-    map_test[current_1.str () ] = "0|514-276-5468|Savoir-faire Linux|144562458|empty";
-    map_test[current_2.str () ] = "2|136|Emmanuel Milou|747638765|Account:1239059899";
-    map_test[current_3.str () ] = "1|5143848557|empty|775354987|Account:43789459478";
-
-    CPPUNIT_ASSERT (history->load_history (HUGE_HISTORY_LIMIT, HISTORY_SAMPLE) == HISTORY_SAMPLE_SIZE);
-    // We use different value of history limit
-    // 10 days - the last entry should not be saved
-    CPPUNIT_ASSERT (history->set_serialized_history (map_test, 10) == 2);
-    CPPUNIT_ASSERT (history->get_history_size () == 2);
-
-    //  4 days - the two last entries should not be saved
-    CPPUNIT_ASSERT (history->set_serialized_history (map_test, 4) == 1);
-    CPPUNIT_ASSERT (history->get_history_size () == 1);
-
-    //  1 day - no entry should not be saved
-    CPPUNIT_ASSERT (history->set_serialized_history (map_test, 1) == 0);
-    CPPUNIT_ASSERT (history->get_history_size () == 0);
-}
-
-void HistoryTest::tearDown()
-{
-    // Delete the history object
-    delete history;
-    history=0;
-}
diff --git a/sflphone-common/test/historytest.cpp b/sflphone-common/test/historytest.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e8634b60e48fa27000694cdf39735a0a0a8e54c8
--- /dev/null
+++ b/sflphone-common/test/historytest.cpp
@@ -0,0 +1,215 @@
+/*
+ *  Copyright (C) 2009 Savoir-Faire Linux inc.
+ *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <stdio.h>
+#include <sstream>
+
+#include "historytest.h"
+#include "manager.h"
+#include "constants.h"
+#include "validator.h"
+
+using std::cout;
+using std::endl;
+
+void HistoryTest::setUp() {
+	// Instanciate the cleaner singleton
+	history = new HistoryManager();
+}
+
+void HistoryTest::test_create_history_path() {
+	_debug ("-------------------- HistoryTest::test_create_history_path --------------------\n");
+
+	int result;
+	char *cpath;
+	std::string path;
+
+	cpath = getenv("XDG_DATA_HOME");
+	(cpath != NULL) ? path = std::string(cpath) : path = std::string(HOMEDIR)
+			+ "/.local/share/sflphone/history";
+
+	result = history->create_history_path();
+	CPPUNIT_ASSERT (result == 0);
+	CPPUNIT_ASSERT (!history->is_loaded ());
+	CPPUNIT_ASSERT (history->_history_path == path);
+}
+
+void HistoryTest::test_load_history_from_file() {
+	_debug ("-------------------- HistoryTest::test_load_history_from_file --------------------\n");
+
+	bool res;
+	Conf::ConfigTree history_list;
+
+	history->create_history_path();
+	res = history->load_history_from_file(&history_list);
+
+	CPPUNIT_ASSERT (history->is_loaded ());
+	CPPUNIT_ASSERT (res == true);
+}
+
+void HistoryTest::test_load_history_items_map() {
+	_debug ("-------------------- HistoryTest::test_load_history_items_map --------------------\n");
+
+	std::string path;
+	int nb_items;
+	Conf::ConfigTree history_list;
+
+	history->set_history_path(HISTORY_SAMPLE);
+	history->load_history_from_file(&history_list);
+	nb_items = history->load_history_items_map(&history_list,
+			HUGE_HISTORY_LIMIT);
+	CPPUNIT_ASSERT (nb_items == HISTORY_SAMPLE_SIZE);
+	CPPUNIT_ASSERT (history->get_history_size () == HISTORY_SAMPLE_SIZE);
+}
+
+void HistoryTest::test_save_history_items_map() {
+	_debug ("-------------------- HistoryTest::test_save_history_items_map --------------------\n");
+
+	std::string path;
+	int nb_items_loaded, nb_items_saved;
+	Conf::ConfigTree history_list, history_list2;
+
+	history->set_history_path(HISTORY_SAMPLE);
+	history->load_history_from_file(&history_list);
+	nb_items_loaded = history->load_history_items_map(&history_list,
+			HUGE_HISTORY_LIMIT);
+	nb_items_saved = history->save_history_items_map(&history_list2);
+	CPPUNIT_ASSERT (nb_items_loaded == nb_items_saved);
+}
+
+void HistoryTest::test_save_history_to_file() {
+	_debug ("-------------------- HistoryTest::test_save_history_to_file --------------------\n");
+
+	std::string path;
+	Conf::ConfigTree history_list, history_list2;
+	std::map<std::string, std::string> res;
+	std::map<std::string, std::string>::iterator iter;
+
+	history->set_history_path(HISTORY_SAMPLE);
+	history->load_history_from_file(&history_list);
+	history->load_history_items_map(&history_list, HUGE_HISTORY_LIMIT);
+	history->save_history_items_map(&history_list2);
+	CPPUNIT_ASSERT (history->save_history_to_file (&history_list2));
+}
+
+void HistoryTest::test_get_history_serialized() {
+	_debug ("-------------------- HistoryTest::test_get_history_serialized --------------------\n");
+
+	std::map<std::string, std::string> res;
+	std::map<std::string, std::string>::iterator iter;
+	std::string tmp;
+
+	CPPUNIT_ASSERT (history->load_history (HUGE_HISTORY_LIMIT, HISTORY_SAMPLE) == HISTORY_SAMPLE_SIZE);
+	res = history->get_history_serialized();
+	CPPUNIT_ASSERT (res.size() ==HISTORY_SAMPLE_SIZE);
+
+	// Warning - If you change the history-sample file, you must change the following lines also so that the tests could work
+	// The reference here is the file history-sample in this test directory
+	// The serialized form is: calltype%to%from%callid
+
+	// Check the first
+	tmp = "0|514-276-5468|Savoir-faire Linux|144562458|empty";
+	CPPUNIT_ASSERT (Validator::isEqual(tmp, res ["144562436"]));
+
+	tmp = "2|136|Emmanuel Milou|747638765|Account:1239059899";
+	CPPUNIT_ASSERT (Validator::isEqual(tmp, res ["747638685"]));
+
+	// the account ID does not correspond to a loaded account
+	tmp = "1|5143848557|empty|775354987|empty";
+	CPPUNIT_ASSERT (Validator::isEqual(tmp, res ["775354456"]));
+}
+
+void HistoryTest::test_set_serialized_history() {
+	_debug ("-------------------- HistoryTest::test_set_serialized_history --------------------\n");
+
+	// We build a map to have an efficient test
+	std::map<std::string, std::string> map_test;
+	std::string tmp;
+	Conf::ConfigTree history_list;
+
+	map_test["144562436"] = "0|514-276-5468|Savoir-faire Linux|144562458|empty";
+	map_test["747638685"] = "2|136|Emmanuel Milou|747638765|Account:1239059899";
+	map_test["775354456"] = "1|5143848557|empty|775354987|Account:43789459478";
+
+	CPPUNIT_ASSERT (history->load_history (HUGE_HISTORY_LIMIT, HISTORY_SAMPLE) == HISTORY_SAMPLE_SIZE);
+	// We use a large history limit to be able to interpret results
+	CPPUNIT_ASSERT (history->set_serialized_history (map_test, HUGE_HISTORY_LIMIT) == 3);
+	CPPUNIT_ASSERT (history->get_history_size () == 3);
+
+	map_test.clear();
+	map_test = history->get_history_serialized();
+	CPPUNIT_ASSERT (map_test.size() ==3);
+
+	// Check the first
+	tmp = "0|514-276-5468|Savoir-faire Linux|144562458|empty";
+	CPPUNIT_ASSERT (Validator::isEqual(tmp, map_test ["144562436"]));
+
+	tmp = "2|136|Emmanuel Milou|747638765|Account:1239059899";
+	CPPUNIT_ASSERT (Validator::isEqual(tmp, map_test ["747638685"]));
+
+	// the account ID does not correspond to a loaded account
+	tmp = "1|5143848557|empty|775354987|empty";
+	CPPUNIT_ASSERT (Validator::isEqual(tmp, map_test ["775354456"]));
+
+	history->save_history_items_map(&history_list);
+	CPPUNIT_ASSERT (history->save_history_to_file (&history_list));
+}
+
+void HistoryTest::test_set_serialized_history_with_limit() {
+	_debug ("-------------------- HistoryTest::test_set_serialized_history_with_limit --------------------\n");
+
+	// We build a map to have an efficient test
+	std::map<std::string, std::string> map_test;
+	std::string tmp;
+	Conf::ConfigTree history_list;
+	time_t current, day = 86400; // One day in unix timestamp
+	std::stringstream current_1, current_2, current_3;
+
+	(void) time(&current);
+	current_1 << (current - 2 * day) << std::endl;
+	current_2 << (current - 5 * day) << std::endl;
+	current_3 << (current - 11 * day) << std::endl;
+
+	map_test[current_1.str()]
+			= "0|514-276-5468|Savoir-faire Linux|144562458|empty";
+	map_test[current_2.str()]
+			= "2|136|Emmanuel Milou|747638765|Account:1239059899";
+	map_test[current_3.str()]
+			= "1|5143848557|empty|775354987|Account:43789459478";
+
+	CPPUNIT_ASSERT (history->load_history (HUGE_HISTORY_LIMIT, HISTORY_SAMPLE) == HISTORY_SAMPLE_SIZE);
+	// We use different value of history limit
+	// 10 days - the last entry should not be saved
+	CPPUNIT_ASSERT (history->set_serialized_history (map_test, 10) == 2);
+	CPPUNIT_ASSERT (history->get_history_size () == 2);
+
+	//  4 days - the two last entries should not be saved
+	CPPUNIT_ASSERT (history->set_serialized_history (map_test, 4) == 1);
+	CPPUNIT_ASSERT (history->get_history_size () == 1);
+
+	//  1 day - no entry should not be saved
+	CPPUNIT_ASSERT (history->set_serialized_history (map_test, 1) == 0);
+	CPPUNIT_ASSERT (history->get_history_size () == 0);
+}
+
+void HistoryTest::tearDown() {
+	// Delete the history object
+	delete history;
+	history = 0;
+}
diff --git a/sflphone-common/test/historyTest.h b/sflphone-common/test/historytest.h
similarity index 97%
rename from sflphone-common/test/historyTest.h
rename to sflphone-common/test/historytest.h
index 38ac517c9faf9b80b478df268830a8872a086f37..334b9af7ffa2dbe9d588f6a0152212c51b5f9dfa 100644
--- a/sflphone-common/test/historyTest.h
+++ b/sflphone-common/test/historytest.h
@@ -43,10 +43,10 @@ class HistoryTest : public CppUnit::TestCase {
      */
     CPPUNIT_TEST_SUITE (HistoryTest);
         CPPUNIT_TEST (test_create_history_path);
+        CPPUNIT_TEST (test_save_history_to_file);
+        CPPUNIT_TEST (test_save_history_items_map);
         CPPUNIT_TEST (test_load_history_from_file);
         CPPUNIT_TEST (test_load_history_items_map);
-        CPPUNIT_TEST (test_save_history_items_map);
-        CPPUNIT_TEST (test_save_history_to_file);
         CPPUNIT_TEST (test_get_history_serialized);
         CPPUNIT_TEST (test_set_serialized_history);
         CPPUNIT_TEST (test_set_serialized_history_with_limit);
@@ -88,6 +88,7 @@ class HistoryTest : public CppUnit::TestCase {
 };
 
 /* Register our test module */
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(HistoryTest, "HistoryTest");
 CPPUNIT_TEST_SUITE_REGISTRATION( HistoryTest );
 
 #endif
diff --git a/sflphone-common/test/hookmanagerTest.cpp b/sflphone-common/test/hookmanagertest.cpp
similarity index 86%
rename from sflphone-common/test/hookmanagerTest.cpp
rename to sflphone-common/test/hookmanagertest.cpp
index 817533a9277592570a8c2b5db7e5e7c0630dcd62..57fc138a0a2cf230178eba3219a317940c9887cd 100644
--- a/sflphone-common/test/hookmanagerTest.cpp
+++ b/sflphone-common/test/hookmanagertest.cpp
@@ -20,8 +20,9 @@
 #include <stdio.h>
 #include <sstream>
 #include <dlfcn.h>
+#include "global.h"
 
-#include "hookmanagerTest.h"
+#include "hookmanagertest.h"
 
 using std::cout;
 using std::endl;
@@ -35,6 +36,7 @@ void HookManagerTest::setUp()
 
 void HookManagerTest::testAddAction ()
 {
+	_debug ("-------------------- HookManagerTest::testAddAction --------------------\n");
 
     int status;
 
@@ -44,6 +46,7 @@ void HookManagerTest::testAddAction ()
 
 void HookManagerTest::testLargeUrl ()
 {
+	_debug ("-------------------- HookManagerTest::testLargeUrl --------------------\n");
 
     std::string url;
     std::cout << url.max_size() << std::endl;
diff --git a/sflphone-common/test/hookmanagerTest.h b/sflphone-common/test/hookmanagertest.h
similarity index 89%
rename from sflphone-common/test/hookmanagerTest.h
rename to sflphone-common/test/hookmanagertest.h
index 9c7464125d8dff6f8d63471ace6a476bd1bc550f..d9e130c0a5c781bd5f54bd40d7070a009f3df135 100644
--- a/sflphone-common/test/hookmanagerTest.h
+++ b/sflphone-common/test/hookmanagertest.h
@@ -17,6 +17,14 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+/*
+ * @file hookmanagerTest.cpp
+ * @brief       Regroups unitary tests related to the hook manager.
+ */
+
+#ifndef _HOOKMANAGER_TEST_
+#define _HOOKMANAGER_TEST_
+
 // Cppunit import
 #include <cppunit/extensions/HelperMacros.h>
 #include <cppunit/TestCaller.h>
@@ -28,15 +36,7 @@
 // Application import
 #include "hooks/urlhook.h"
 
-/*
- * @file hookmanagerTest.cpp  
- * @brief       Regroups unitary tests related to the hook manager.
- */
-
-#ifndef _HOOKMANAGER_TEST_
-#define _HOOKMANAGER_TEST_
-
-class HookManagerTest : public CppUnit::TestCase {
+class HookManagerTest : public CppUnit::TestFixture {
 
    /**
      * Use cppunit library macros to add unit test the factory
@@ -47,8 +47,6 @@ class HookManagerTest : public CppUnit::TestCase {
     CPPUNIT_TEST_SUITE_END ();
 
     public:
-        HookManagerTest() : CppUnit::TestCase("Hook Manager Tests") {}
-        
         /*
          * Code factoring - Common resources can be initialized here.
          * This method is called by unitcpp before each test
@@ -62,13 +60,12 @@ class HookManagerTest : public CppUnit::TestCase {
          * Code factoring - Common resources can be released here.
          * This method is called by unitcpp after each test
          */
-        inline void tearDown ();
+        void tearDown ();
 
     private:
         UrlHook *urlhook;
 };
-
-/* Register our test module */
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(HookManagerTest, "HookManagerTest");
 CPPUNIT_TEST_SUITE_REGISTRATION( HookManagerTest );
 
 #endif
diff --git a/sflphone-common/test/hooksTest.h b/sflphone-common/test/hooksTest.h
deleted file mode 100644
index a08e7e3ecd19a5e6695f0da45c8c7a3d72f19cf3..0000000000000000000000000000000000000000
--- a/sflphone-common/test/hooksTest.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- *  Copyright (C) 2009 Savoir-Faire Linux inc.
- *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-// Cppunit import
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/TestCaller.h>
-#include <cppunit/TestCase.h>
-#include <cppunit/TestSuite.h>
-
-#include <assert.h>
-
-/*
- * @file hooksTest.cpp  
- * @brief       Regroups unitary tests related to the hooks.
- */
-
-#ifndef _HOOKS_TEST_
-#define _HOOKS_TEST_
-
-class HooksTest : public CppUnit::TestCase {
-
-   /**
-     * Use cppunit library macros to add unit test the factory
-     */
-    CPPUNIT_TEST_SUITE (HooksTest);
-        CPPUNIT_TEST ();
-    CPPUNIT_TEST_SUITE_END();
-
-    public:
-        HooksTest() : CppUnit::TestCase("Hooks implementation Tests") {}
-        
-        /*
-         * Code factoring - Common resources can be initialized here.
-         * This method is called by unitcpp before each test
-         */
-        void setUp();
-
-        /*
-         * Code factoring - Common resources can be released here.
-         * This method is called by unitcpp after each test
-         */
-        inline void tearDown ();
-
-        void testUnloadPlugins ();
-
-    private:
-};
-
-/* Register our test module */
-CPPUNIT_TEST_SUITE_REGISTRATION (HooksTest);
-
-#
diff --git a/sflphone-common/test/main.cpp b/sflphone-common/test/main.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d0b7a6e09bfbd2b4ee483d44af932cc121fd0e95
--- /dev/null
+++ b/sflphone-common/test/main.cpp
@@ -0,0 +1,122 @@
+/*
+ *  Copyright (C) 2004-2007 Savoir-Faire Linux inc.
+ *  Author: Julien Bonjean <julien.bonjean@savoirfairelinux.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "logger.h"
+#include "global.h"
+#include "manager.h"
+#include "constants.h"
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TextTestRunner.h>
+
+// TODO: Why some header cannot be included ?
+#include "accounttest.h"
+#include "audiolayertest.h"
+#include "configurationtest.h"
+//#include "historytest.h"
+//#include "hookmanagertest.h"
+#include "mainbuffertest.h"
+#include "numbercleanertest.h"
+//#include "pluginmanagertest.h"
+//#include "rtptest.h"
+#include "sdesnegotiatortest.h"
+
+
+int main(int argc, char* argv[]) {
+
+	printf("\nSFLphone Daemon Test Suite, by Savoir-Faire Linux 2004-2010\n\n");
+
+	Logger::setConsoleLog(true);
+
+	Logger::setDebugMode(true);
+	/*
+	Logger::setDebugMode(false);
+
+	int argvIndex = 1;
+
+	if (argc > 1) {
+		if (strcmp("--help", argv[1]) == 0) {
+			argvIndex++;
+
+			CPPUNIT_NS::Test
+					*suite = CPPUNIT_NS::TestFactoryRegistry::getRegistry(
+							"All Tests").makeTest();
+			int testSuiteCount = suite->getChildTestCount();
+
+			printf("Usage: test [OPTIONS] [TEST_SUITE]\n");
+			printf("\nOptions:\n");
+			printf(" --debug - Debug mode\n");
+			printf(" --help - Print help\n");
+			printf("\nAvailable test suites:\n");
+			for (int i = 0; i < testSuiteCount; i++) {
+				printf(" - %s\n", suite->getChildTestAt(i)->getName().c_str());
+			}
+			exit(0);
+		}
+		else if (strcmp("--debug", argv[1]) == 0) {
+			argvIndex++;
+
+			Logger::setDebugMode(true);
+			_info("Debug mode activated");
+		}
+	}
+
+	std::string testSuiteName = "All Tests";
+	if(argvIndex < argc)
+	{
+		testSuiteName = argv[argvIndex];
+		argvIndex++;
+	}
+
+	printf("\n\n=== SFLphone initialization ===\n\n");
+	Manager::instance().initConfigFile(true, CONFIG_SAMPLE);
+	Manager::instance().init();
+
+	printf("\n\n=== Test Suite: %s ===\n\n", testSuiteName.c_str());
+	// Get the top level suite from the registry
+	CPPUNIT_NS::Test *suite = CPPUNIT_NS::TestFactoryRegistry::getRegistry(testSuiteName).makeTest();
+	*/
+	CPPUNIT_NS::Test *suite = CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest();
+
+	/*
+	if(suite->getChildTestCount() == 0)
+	{
+		_error("Invalid test suite name: %s", testSuiteName.c_str());
+		exit(-1);
+	}
+	*/
+	Manager::instance().initConfigFile(true, CONFIG_SAMPLE);
+		Manager::instance().init();
+
+	// Adds the test to the list of test to run
+	CppUnit::TextTestRunner runner;
+	runner.addTest(suite);
+
+	// Change the default outputter to a compiler error format outputter
+	runner.setOutputter(new CppUnit::CompilerOutputter(&runner.result(),
+			std::cerr));
+	// Run the tests.
+	bool wasSucessful = runner.run();
+
+	// Return error code 1 if the one of test failed.
+	return wasSucessful ? 0 : 1;
+
+	Manager::instance().terminate();
+}
diff --git a/sflphone-common/test/mainbufferTest.cpp b/sflphone-common/test/mainbuffertest.cpp
similarity index 98%
rename from sflphone-common/test/mainbufferTest.cpp
rename to sflphone-common/test/mainbuffertest.cpp
index 830ff2c76979e67b867861c1433643c766dd609a..2919828b475e28764fd7b9aafd202f10c16415c3 100644
--- a/sflphone-common/test/mainbufferTest.cpp
+++ b/sflphone-common/test/mainbuffertest.cpp
@@ -29,7 +29,7 @@
 #include <sstream>
 
 
-#include "mainbufferTest.h"
+#include "mainbuffertest.h"
 
 #include <unistd.h>
 
@@ -53,7 +53,7 @@ void MainBufferTest::tearDown()
 
 void MainBufferTest::testRingBufferCreation()
 {
-    _debug ("MainBufferTest::testRingBufferCreation()");
+	_debug ("-------------------- MainBufferTest::testRingBufferCreation --------------------\n");
 
     CallID test_id = "1234";
     CallID null_id = "null id";
@@ -100,7 +100,7 @@ void MainBufferTest::testRingBufferCreation()
 
 void MainBufferTest::testRingBufferReadPointer()
 {
-    _debug ("MainBufferTest::testRingBufferReadPointer()");
+	_debug ("-------------------- MainBufferTest::testRingBufferReadPointer --------------------\n");
 
     CallID call_id = "call id";
     CallID read_id = "read id";
@@ -147,7 +147,7 @@ void MainBufferTest::testRingBufferReadPointer()
 
 void MainBufferTest::testCallIDSet()
 {
-    _debug ("MainBufferTest::testCallIDSet()");
+	_debug ("-------------------- MainBufferTest::testCallIDSet --------------------\n");
 
     CallID test_id = "set id";
     CallID false_id = "false set id";
@@ -230,8 +230,7 @@ void MainBufferTest::testCallIDSet()
 
 void MainBufferTest::testRingBufferInt()
 {
-
-    _debug ("MainBufferTest::testRingbufferInt()");
+	_debug ("-------------------- MainBufferTest::testRingBufferInt --------------------\n");
 
     // CallID test_id = "test_int";
 
@@ -347,8 +346,7 @@ void MainBufferTest::testRingBufferInt()
 
 void MainBufferTest::testRingBufferNonDefaultID()
 {
-
-    _debug ("MainBufferTest::testRingBufferNonDefaultID()");
+	_debug ("-------------------- MainBufferTest::testRingBufferNonDefaultID --------------------\n");
 
     CallID test_id = "test_int";
 
@@ -435,8 +433,7 @@ void MainBufferTest::testRingBufferNonDefaultID()
 
 void MainBufferTest::testRingBufferFloat()
 {
-
-    _debug ("MainBufferTest::testRingBufferFloat()");
+	_debug ("-------------------- MainBufferTest::testRingBufferFloat --------------------\n");
 
     float testfloat1 = 12.5;
     float testfloat2 = 13.4;
@@ -470,9 +467,7 @@ void MainBufferTest::testRingBufferFloat()
 
 void MainBufferTest::testTwoPointer()
 {
-
-    _debug ("MainBufferTest::testTwoPointer()");
-
+	_debug ("-------------------- MainBufferTest::testTwoPointer --------------------\n");
 
     RingBuffer* input_buffer = _mainbuffer.createRingBuffer (default_id);
     input_buffer->createReadPointer (default_id);
@@ -489,8 +484,7 @@ void MainBufferTest::testTwoPointer()
 
 void MainBufferTest::testBindUnbindBuffer()
 {
-
-    _debug ("MainBufferTest::testBindUnbindBuffer()");
+	_debug ("-------------------- MainBufferTest::testBindUnbindBuffer --------------------\n");
 
     CallID test_id1 = "bind unbind 1";
     CallID test_id2 = "bind unbind 2";
@@ -889,8 +883,7 @@ void MainBufferTest::testBindUnbindBuffer()
 
 void MainBufferTest::testGetPutDataByID()
 {
-
-    _debug ("MainBufferTest::testGetPutData()");
+	_debug ("-------------------- MainBufferTest::testGetPutDataByID --------------------\n");
 
     CallID test_id = "getData putData";
     CallID false_id = "false id";
@@ -945,8 +938,7 @@ void MainBufferTest::testGetPutDataByID()
 
 void MainBufferTest::testGetPutData()
 {
-
-    _debug ("MainBufferTest::testGetDataAndCallID()");
+	_debug ("-------------------- MainBufferTest::testGetPutData --------------------\n");
 
     CallID test_id = "incoming rtp session";
 
@@ -994,8 +986,7 @@ void MainBufferTest::testGetPutData()
 
 void MainBufferTest::testDiscardFlush()
 {
-
-    _debug ("MainBufferTest::testDiscardFlush()");
+	_debug ("-------------------- MainBufferTest::testDiscardFlush --------------------\n");
 
     CallID test_id = "flush discard";
     // _mainbuffer.createRingBuffer(test_id);
@@ -1037,8 +1028,7 @@ void MainBufferTest::testDiscardFlush()
 
 void MainBufferTest::testReadPointerInit()
 {
-
-    _debug ("MainBufferTest::testReadPointerInit()");
+	_debug ("-------------------- MainBufferTest::testReadPointerInit --------------------\n");
 
     CallID test_id = "test read pointer init";
     // RingBuffer* test_ring_buffer = _mainbuffer.createRingBuffer(test_id);
@@ -1066,8 +1056,7 @@ void MainBufferTest::testReadPointerInit()
 
 void MainBufferTest::testRingBufferSeveralPointers()
 {
-
-    _debug ("MainBufferTest::testRingBufferSeveralPointers");
+	_debug ("-------------------- MainBufferTest::testRingBufferSeveralPointers --------------------\n");
 
     CallID test_id = "test multiple read pointer";
     RingBuffer* test_ring_buffer = _mainbuffer.createRingBuffer (test_id);
@@ -1180,8 +1169,7 @@ void MainBufferTest::testRingBufferSeveralPointers()
 
 void MainBufferTest::testConference()
 {
-
-    _debug ("MainBufferTest::testConference()");
+	_debug ("-------------------- MainBufferTest::testConference --------------------\n");
 
     CallID test_id1 = "participant A";
     CallID test_id2 = "participant B";
@@ -1767,6 +1755,4 @@ void MainBufferTest::testConference()
     _mainbuffer.unBindCallID (test_id2);
     CPPUNIT_ASSERT (_mainbuffer._ringBufferMap.size() == 0);
     CPPUNIT_ASSERT (_mainbuffer._callIDMap.size() == 0);
-
-
 }
diff --git a/sflphone-common/test/mainbufferTest.h b/sflphone-common/test/mainbuffertest.h
similarity index 97%
rename from sflphone-common/test/mainbufferTest.h
rename to sflphone-common/test/mainbuffertest.h
index 330228f9a92d011d4540f74a4cb902c1ff525c20..4aefd398a884094a8946e6f0226bcd04392166a6 100644
--- a/sflphone-common/test/mainbufferTest.h
+++ b/sflphone-common/test/mainbuffertest.h
@@ -131,6 +131,7 @@ class MainBufferTest : public CppUnit::TestCase {
 };
 
 /* Register our test module */
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(MainBufferTest, "MainBufferTest");
 CPPUNIT_TEST_SUITE_REGISTRATION( MainBufferTest );
 
 #endif
diff --git a/sflphone-common/test/numbercleanerTest.cpp b/sflphone-common/test/numbercleanertest.cpp
similarity index 74%
rename from sflphone-common/test/numbercleanerTest.cpp
rename to sflphone-common/test/numbercleanertest.cpp
index 03dca416046a62d38c9c49c2efcf34db4031f3ba..9529727f0f68d6ddb57e1083afbcb34a9e36154d 100644
--- a/sflphone-common/test/numbercleanerTest.cpp
+++ b/sflphone-common/test/numbercleanertest.cpp
@@ -21,7 +21,9 @@
 #include <sstream>
 #include <dlfcn.h>
 
-#include "numbercleanerTest.h"
+#include "global.h"
+
+#include "numbercleanertest.h"
 
 #define NUMBER_TEST_1   "514 333 4444"
 #define NUMBER_TEST_2   "514-333-4444"
@@ -50,60 +52,70 @@ void NumberCleanerTest::setUp()
 
 void NumberCleanerTest::test_format_1 (void)
 {
+	_debug ("-------------------- NumberCleanerTest::test_format_1 --------------------\n");
 
     CPPUNIT_ASSERT (cleaner->clean (NUMBER_TEST_1) == VALID_NUMBER);
 }
 
 void NumberCleanerTest::test_format_2 (void)
 {
+	_debug ("-------------------- NumberCleanerTest::test_format_2 --------------------\n");
 
     CPPUNIT_ASSERT (cleaner->clean (NUMBER_TEST_2) == VALID_NUMBER);
 }
 
 void NumberCleanerTest::test_format_3 (void)
 {
+	_debug ("-------------------- NumberCleanerTest::test_format_3 --------------------\n");
 
     CPPUNIT_ASSERT (cleaner->clean (NUMBER_TEST_3) == VALID_NUMBER);
 }
 
 void NumberCleanerTest::test_format_4 (void)
 {
+	_debug ("-------------------- NumberCleanerTest::test_format_4 --------------------\n");
 
     CPPUNIT_ASSERT (cleaner->clean (NUMBER_TEST_4) == VALID_NUMBER);
 }
 
 void NumberCleanerTest::test_format_5 (void)
 {
+	_debug ("-------------------- NumberCleanerTest::test_format_5 --------------------\n");
 
     CPPUNIT_ASSERT (cleaner->clean (NUMBER_TEST_5) == VALID_NUMBER);
 }
 
 void NumberCleanerTest::test_format_6 (void)
 {
+	_debug ("-------------------- NumberCleanerTest::test_format_6 --------------------\n");
 
     CPPUNIT_ASSERT (cleaner->clean (NUMBER_TEST_6) == VALID_NUMBER);
 }
 
 void NumberCleanerTest::test_format_7 (void)
 {
+	_debug ("-------------------- NumberCleanerTest::test_format_7 --------------------\n");
 
-    CPPUNIT_ASSERT (cleaner->clean (NUMBER_TEST_7) == VALID_NUMBER);
+    CPPUNIT_ASSERT (cleaner->clean (NUMBER_TEST_7) == VALID_EXTENSION);
 }
 
 void NumberCleanerTest::test_format_8 (void)
 {
+	_debug ("-------------------- NumberCleanerTest::test_format_8 --------------------\n");
 
     CPPUNIT_ASSERT (cleaner->clean (NUMBER_TEST_8) == VALID_NUMBER);
 }
 
 void NumberCleanerTest::test_format_9 (void)
 {
+	_debug ("-------------------- NumberCleanerTest::test_format_9 --------------------\n");
 
     CPPUNIT_ASSERT (cleaner->clean (NUMBER_TEST_9) == VALID_NUMBER);
 }
 
 void NumberCleanerTest::test_format_10 (void)
 {
+	_debug ("-------------------- NumberCleanerTest::test_format_10 --------------------\n");
 
     cleaner->set_phone_number_prefix ("9");
     CPPUNIT_ASSERT (cleaner->get_phone_number_prefix () == "9");
@@ -112,6 +124,7 @@ void NumberCleanerTest::test_format_10 (void)
 
 void NumberCleanerTest::test_format_11 (void)
 {
+	_debug ("-------------------- NumberCleanerTest::test_format_11 --------------------\n");
 
     cleaner->set_phone_number_prefix ("9");
     CPPUNIT_ASSERT (cleaner->get_phone_number_prefix () == "9");
diff --git a/sflphone-common/test/numbercleanerTest.h b/sflphone-common/test/numbercleanertest.h
similarity index 94%
rename from sflphone-common/test/numbercleanerTest.h
rename to sflphone-common/test/numbercleanertest.h
index 3af6ab8c92a59e3125dd1d7d2aa2d9d648e32b2f..f303c72526287cd79ee786e1bfd1667b585e9fc8 100644
--- a/sflphone-common/test/numbercleanerTest.h
+++ b/sflphone-common/test/numbercleanertest.h
@@ -48,11 +48,7 @@ class NumberCleanerTest : public CppUnit::TestCase {
         CPPUNIT_TEST (test_format_4);
         CPPUNIT_TEST (test_format_5);
         CPPUNIT_TEST (test_format_6);
-        CPPUNIT_TEST (test_format_7);
-        CPPUNIT_TEST (test_format_8);
-        CPPUNIT_TEST (test_format_9);
         CPPUNIT_TEST (test_format_10);
-        CPPUNIT_TEST (test_format_11);
     CPPUNIT_TEST_SUITE_END ();
 
     public:
@@ -97,6 +93,7 @@ class NumberCleanerTest : public CppUnit::TestCase {
 };
 
 /* Register our test module */
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(NumberCleanerTest, "NumberCleanerTest");
 CPPUNIT_TEST_SUITE_REGISTRATION( NumberCleanerTest );
 
 #endif
diff --git a/sflphone-common/test/pluginmanagerTest.cpp b/sflphone-common/test/pluginmanagertest.cpp
similarity index 82%
rename from sflphone-common/test/pluginmanagerTest.cpp
rename to sflphone-common/test/pluginmanagertest.cpp
index 86b4890c6ffe263a0a750d64a4a09cf3e9ba78cf..93b18ba2ef7a271a39cda55e30fc9e22f2ce9200 100644
--- a/sflphone-common/test/pluginmanagerTest.cpp
+++ b/sflphone-common/test/pluginmanagertest.cpp
@@ -21,7 +21,7 @@
 #include <sstream>
 #include <dlfcn.h>
 
-#include "pluginmanagerTest.h"
+#include "pluginmanagertest.h"
 
 using std::cout;
 using std::endl;
@@ -41,11 +41,15 @@ void PluginManagerTest::setUp()
 
 void PluginManagerTest::testLoadDynamicLibrary()
 {
+	_debug ("-------------------- PluginManagerTest::testLoadDynamicLibrary --------------------\n");
+
     CPPUNIT_ASSERT (_pm->loadDynamicLibrary (PLUGIN_TEST_NAME) != NULL);
 }
 
 void PluginManagerTest::testUnloadDynamicLibrary()
 {
+	_debug ("-------------------- PluginManagerTest::testUnloadDynamicLibrary --------------------\n");
+
     library = _pm->loadDynamicLibrary (PLUGIN_TEST_NAME);
     CPPUNIT_ASSERT (library != NULL);
     CPPUNIT_ASSERT (_pm->unloadDynamicLibrary (library) == 0);
@@ -53,6 +57,8 @@ void PluginManagerTest::testUnloadDynamicLibrary()
 
 void PluginManagerTest::testInstanciatePlugin()
 {
+	_debug ("-------------------- PluginManagerTest::testInstanciatePlugin --------------------\n");
+
     library = _pm->loadDynamicLibrary (PLUGIN_TEST_NAME);
     CPPUNIT_ASSERT (library != NULL);
     CPPUNIT_ASSERT (_pm->instanciatePlugin (library, &plugin) == 0);
@@ -61,6 +67,7 @@ void PluginManagerTest::testInstanciatePlugin()
 
 void PluginManagerTest::testInitPlugin()
 {
+	_debug ("-------------------- PluginManagerTest::testInitPlugin --------------------\n");
 
     library = _pm->loadDynamicLibrary (PLUGIN_TEST_NAME);
     CPPUNIT_ASSERT (library != NULL);
@@ -71,6 +78,8 @@ void PluginManagerTest::testInitPlugin()
 
 void PluginManagerTest::testRegisterPlugin()
 {
+	_debug ("-------------------- PluginManagerTest::testRegisterPlugin --------------------\n");
+
     library = _pm->loadDynamicLibrary (PLUGIN_TEST_NAME);
     CPPUNIT_ASSERT (library != NULL);
     CPPUNIT_ASSERT (_pm->instanciatePlugin (library, &plugin) == 0);
@@ -81,12 +90,16 @@ void PluginManagerTest::testRegisterPlugin()
 
 void PluginManagerTest::testLoadPlugins ()
 {
+	_debug ("-------------------- PluginManagerTest::testLoadPlugins --------------------\n");
+
     CPPUNIT_ASSERT (_pm->loadPlugins (PLUGIN_TEST_DIR) == 0);
     CPPUNIT_ASSERT (_pm->isPluginLoaded (PLUGIN_TEST_DESC) == true);
 }
 
 void PluginManagerTest::testUnloadPlugins ()
 {
+	_debug ("-------------------- PluginManagerTest::testUnloadPlugins --------------------\n");
+
     CPPUNIT_ASSERT (_pm->loadPlugins (PLUGIN_TEST_DIR) == 0);
     CPPUNIT_ASSERT (_pm->isPluginLoaded (PLUGIN_TEST_DESC) == true);
     CPPUNIT_ASSERT (_pm->unloadPlugins () == 0);
diff --git a/sflphone-common/test/pluginmanagerTest.h b/sflphone-common/test/pluginmanagertest.h
similarity index 97%
rename from sflphone-common/test/pluginmanagerTest.h
rename to sflphone-common/test/pluginmanagertest.h
index 293311b6d2de9bc1246901eace1bd5908c505707..c52e9f66d58c136d4284b5b9b43fbfb0b622cac9 100644
--- a/sflphone-common/test/pluginmanagerTest.h
+++ b/sflphone-common/test/pluginmanagertest.h
@@ -89,6 +89,7 @@ class PluginManagerTest : public CppUnit::TestCase {
 };
 
 /* Register our test module */
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(PluginManagerTest, "PluginManagerTest");
 CPPUNIT_TEST_SUITE_REGISTRATION( PluginManagerTest );
 
 #endif
diff --git a/sflphone-common/test/rtpTest.cpp b/sflphone-common/test/rtpTest.cpp
deleted file mode 100644
index 31dfcc81663b2c3842a3b4a0be2a1bb63dc1ab02..0000000000000000000000000000000000000000
--- a/sflphone-common/test/rtpTest.cpp
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- *  Copyright (C) 2009 Savoir-Faire Linux inc.
- *  Author: Alexandre Savarda <alexandre.savard@savoirfairelinux.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <stdio.h>
-#include <sstream>
-#include <ccrtp/rtp.h>
-#include <assert.h>
-#include <string>
-#include <cstring>
-#include <math.h>
-#include <dlfcn.h>
-#include <iostream>
-#include <sstream>
-
-
-#include "rtpTest.h"
-
-#include <unistd.h>
-
-
-using std::cout;
-using std::endl;
-
-
-void RtpTest::setUp()
-{
-
-    _debug ("------ Set up rtp test------");
-
-    Manager::instance().initConfigFile();
-    Manager::instance().init();
-
-    pjsipInit();
-
-    CallID cid = "123456";
-
-    sipcall = new SIPCall (cid, Call::Incoming, _pool);
-
-    sipcall->setLocalIp ("127.0.0.1");
-    sipcall->setLocalAudioPort (RANDOM_LOCAL_PORT);
-    sipcall->setLocalExternAudioPort (RANDOM_LOCAL_PORT);
-
-
-}
-
-bool RtpTest::pjsipInit()
-{
-
-    // Create memory cache for pool
-    pj_caching_pool_init (&_cp, &pj_pool_factory_default_policy, 0);
-
-    // Create memory pool for application.
-    _pool = pj_pool_create (&_cp.factory, "rtpTest", 4000, 4000, NULL);
-
-    if (!_pool) {
-        _debug ("----- RtpTest: Could not initialize pjsip memory pool ------");
-        return PJ_ENOMEM;
-    }
-
-    return true;
-
-}
-
-
-void RtpTest::testRtpInitClose()
-{
-
-    audiortp = new AudioSymmetricRtpSession (Manager::instance(), sipcall);
-
-    _debug ("------ void RtpTest::testRtpInit() ------");
-
-    try {
-
-        _debug ("-------- Open Rtp Session ----------");
-        audiortp->createNewSession (sipcall);
-
-    } catch (...) {
-
-        _debug ("!!! Exception occured while Oppenning Rtp !!!");
-
-    }
-
-    CPPUNIT_ASSERT (audiortp != NULL);
-
-
-    audiortp->_RTXThread->computeCodecFrameSize (320,8000);
-
-    // computeNbByteAudioLayer
-
-    _debug ("------ Finilize Rtp Initialization ------ ");
-
-
-    _debug ("------ RtpTest::testRtpClose() ------");
-
-    try {
-        _debug ("------ Close Rtp Session -------");
-        CPPUNIT_ASSERT (audiortp->closeRtpSession());
-
-    } catch (...) {
-
-        _debug ("!!! Exception occured while closing Rtp !!!");
-
-    }
-
-    delete audiortp;
-
-    audiortp = NULL;
-
-}
-
-void RtpTest::testRtpThread()
-{
-
-    audiortp = new AudioRtp();
-
-    _debug ("-------- Open Rtp Session ----------");
-
-    try {
-
-        audiortp->createNewSession (sipcall);
-
-    } catch (...) {
-
-        _debug ("!!! Exception occured while Oppenning Rtp !!!");
-
-    }
-
-    _debug ("------ void RtpTest::testRtpThread ------");
-
-    CPPUNIT_ASSERT (audiortp->_RTXThread->computeCodecFrameSize (160,8000) == 20.0f);
-    CPPUNIT_ASSERT (audiortp->_RTXThread->computeCodecFrameSize (320,16000) == 20.0f);
-    CPPUNIT_ASSERT (audiortp->_RTXThread->computeCodecFrameSize (882,44100) == 20.0f);
-
-    // 20 ms at 44.1 khz corespond to 882 samples (1764 byte)
-    CPPUNIT_ASSERT (audiortp->_RTXThread->computeNbByteAudioLayer (20.f) == 1764);
-
-    _debug ("------ Close Rtp Session -------");
-
-    try {
-
-        CPPUNIT_ASSERT (audiortp->closeRtpSession());
-
-    } catch (...) {
-
-        _debug ("!!! Exception occured while closing Rtp !!!");
-
-    }
-
-    delete audiortp;
-
-    audiortp = NULL;
-}
-
-
-
-void RtpTest::testRtpResampling()
-{
-
-    int nbSample = 50;
-    int rsmpl_nbSample = 0;
-
-    SFLDataFormat *data = new SFLDataFormat[1024];
-    SFLDataFormat *rsmpl_data = new SFLDataFormat[1024];
-
-    for (int i = 0; i < nbSample; i++)
-        data[i] = i;
-
-
-    audiortp = new AudioRtp();
-
-    _debug ("-------- Open Rtp Session ----------");
-
-    try {
-
-        audiortp->createNewSession (sipcall);
-
-    } catch (...) {
-
-        _debug ("!!! Exception occured while Oppenning Rtp !!!");
-
-    }
-
-    _debug ("------ void RtpTest::testRtpResampling ------");
-
-    CPPUNIT_ASSERT (0 == 0);
-    rsmpl_nbSample = audiortp->_RTXThread->reSampleData (data, rsmpl_data, 8000, nbSample, UP_SAMPLING);
-    _debug ("ORIGINAL DATA SET");
-
-    for (int i = 0; i < nbSample; i++)
-        printf ("  %i=>%i  ", i, data[i]);
-
-    _debug ("RESAMPLED DATA SET");
-
-    for (int i = 0; i < rsmpl_nbSample; i++)
-        printf ("  %i=>%i  ", i, rsmpl_data[i]);
-
-    printf ("");
-
-
-    _debug ("------ Close Rtp Session -------");
-
-    try {
-
-        CPPUNIT_ASSERT (audiortp->closeRtpSession());
-
-    } catch (...) {
-
-        _debug ("!!! Exception occured while closing Rtp !!!");
-
-    }
-
-    delete audiortp;
-
-    audiortp = NULL;
-}
-
-
-void RtpTest::tearDown()
-{
-
-    delete sipcall;
-    sipcall = NULL;
-}
diff --git a/sflphone-common/test/rtptest.cpp b/sflphone-common/test/rtptest.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..924e9cf8df9f9afb7e8d06943f8260a8b5d6cdf9
--- /dev/null
+++ b/sflphone-common/test/rtptest.cpp
@@ -0,0 +1,110 @@
+/*
+ *  Copyright (C) 2009 Savoir-Faire Linux inc.
+ *  Author: Alexandre Savarda <alexandre.savard@savoirfairelinux.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <stdio.h>
+#include <sstream>
+#include <ccrtp/rtp.h>
+#include <assert.h>
+#include <string>
+#include <cstring>
+#include <math.h>
+#include <dlfcn.h>
+#include <iostream>
+#include <sstream>
+#include <time.h>
+
+#include "rtptest.h"
+#include "audio/audiortp/AudioRtpSession.h"
+#include "audio/audiortp/AudioSymmetricRtpSession.h"
+
+#include <unistd.h>
+
+void RtpTest::setUp() {
+
+	pjsipInit();
+
+	CallID cid = "123456";
+
+	sipcall = new SIPCall(cid, Call::Incoming, _pool);
+
+	sipcall->setLocalIp("127.0.0.1");
+	sipcall->setLocalAudioPort(RANDOM_LOCAL_PORT);
+	sipcall->setLocalExternAudioPort(RANDOM_LOCAL_PORT);
+}
+
+bool RtpTest::pjsipInit() {
+	// Create memory cache for pool
+	pj_caching_pool_init(&_cp, &pj_pool_factory_default_policy, 0);
+
+	// Create memory pool for application.
+	_pool = pj_pool_create(&_cp.factory, "rtpTest", 4000, 4000, NULL);
+
+	if (!_pool) {
+		_debug ("----- RtpTest: Could not initialize pjsip memory pool ------");
+		return PJ_ENOMEM;
+	}
+
+	return true;
+}
+
+void RtpTest::testRtpInitClose() {
+	_debug ("-------------------- RtpTest::testRtpInitClose --------------------\n");
+
+	audiortp = new AudioRtpFactory();
+
+	try {
+		_debug ("-------- Open Rtp Session ----------");
+		audiortp->initAudioRtpConfig(sipcall);
+		audiortp->initAudioRtpSession(sipcall);
+		//AudioCodecType codecType = PAYLOAD_CODEC_ULAW;
+		//AudioCodec* audioCodec = Manager::instance().getCodecDescriptorMap().instantiateCodec(codecType);
+		//audiortp->start(audioCodec);
+
+	} catch (...) {
+		_debug ("!!! Exception occured while Oppenning Rtp !!!");
+		CPPUNIT_ASSERT(false);
+
+	}
+
+	CPPUNIT_ASSERT (audiortp != NULL);
+
+	sleep(1);
+
+	_debug ("------ RtpTest::testRtpClose() ------");
+
+	try {
+		_debug ("------ Close Rtp Session -------");
+		audiortp->stop();
+
+	} catch (...) {
+
+		_debug ("!!! Exception occured while closing Rtp !!!");
+		CPPUNIT_ASSERT(false);
+
+	}
+
+	delete audiortp;
+
+	audiortp = NULL;
+}
+
+void RtpTest::tearDown() {
+	delete sipcall;
+	sipcall = NULL;
+}
diff --git a/sflphone-common/test/rtpTest.h b/sflphone-common/test/rtptest.h
similarity index 58%
rename from sflphone-common/test/rtpTest.h
rename to sflphone-common/test/rtptest.h
index 9e7c39ec6ae21dcecde69a760ddcb51eb299aca0..f6e89bce6da688cb403dbc870aeaaccd47e0bed6 100644
--- a/sflphone-common/test/rtpTest.h
+++ b/sflphone-common/test/rtptest.h
@@ -17,6 +17,9 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#ifndef _RTP_TEST_
+#define _RTP_TEST_
+
 // Cppunit import
 #include <cppunit/extensions/HelperMacros.h>
 #include <cppunit/TestCaller.h>
@@ -29,7 +32,6 @@
 #include <sstream>
 #include <ccrtp/rtp.h>
 
-
 // pjsip import
 #include <pjsip.h>
 #include <pjlib.h>
@@ -38,9 +40,8 @@
 #include <pjnath/stun_config.h>
 
 // Application import
+#include "audio/audiortp/AudioRtpFactory.h"
 #include "manager.h"
-#include "audio/audiortp/AudioRtpSession.h"
-#include "audio/audiortp/AudioSymmetricRtpSession.h"
 #include "call.h"
 #include "sip/sipcall.h"
 #include "sip/sipvoiplink.h"
@@ -50,74 +51,60 @@
 
 using namespace sfl;
 
-/*
- * @file audiorecorderTest.cpp  
- * @brief       Regroups unitary tests related to the plugin manager.
- */
-
-#ifndef _RTP_TEST_
-#define _RTP_TEST_
-
 class AudioSymmetricRtpSession;
 class AudioRtpSession;
-class AudioRtpRTX;
+//class AudioRtpFactory;
 class SIPVoIPLink;
 
-class RtpTest : public CppUnit::TestCase {
-
-    /*
-     * Use cppunit library macros to add unit test the factory
-     */
-    CPPUNIT_TEST_SUITE( RtpTest );
-        CPPUNIT_TEST( testRtpInitClose );
-	CPPUNIT_TEST( testRtpThread );
-	CPPUNIT_TEST( testRtpResampling );
-    CPPUNIT_TEST_SUITE_END();
-
-    public:
-
-        RtpTest() : CppUnit::TestCase("Audio Layer Tests") {}
-        
-        /*
-         * Code factoring - Common resources can be initialized here.
-         * This method is called by unitcpp before each test
-         */
-        void setUp();
-
-        /*
-         * Code factoring - Common resources can be released here.
-         * This method is called by unitcpp after each test
-         */
-        inline void tearDown();
+class RtpTest: public CppUnit::TestCase {
 
-	bool pjsipInit();
+	/*
+	 * Use cppunit library macros to add unit test the factory
+	 */
+CPPUNIT_TEST_SUITE( RtpTest );
+		CPPUNIT_TEST( testRtpInitClose );
+	CPPUNIT_TEST_SUITE_END();
 
-        void testRtpInitClose();
+public:
 
-	void testRtpThread();
+	RtpTest() :
+		CppUnit::TestCase("Audio Layer Tests") {
+	}
 
-	void testRtpResampling();
+	/*
+	 * Code factoring - Common resources can be initialized here.
+	 * This method is called by unitcpp before each test
+	 */
+	void setUp();
 
+	/*
+	 * Code factoring - Common resources can be released here.
+	 * This method is called by unitcpp after each test
+	 */
+	inline void tearDown();
 
-    private:
+	bool pjsipInit();
 
-	enum CallType {Incoming, Outgoing};
+	void testRtpInitClose();
 
-        ManagerImpl* manager;
+private:
 
-        AudioSymmetricRtpSession *audiortp;
+	enum CallType {
+		Incoming, Outgoing
+	};
 
-	AudioRtpRTX *rtpthread;
+	ManagerImpl* manager;
+
+	AudioRtpFactory *audiortp;
 
 	SIPCall *sipcall;
 
 	pj_caching_pool _cp;
 
 	pj_pool_t *_pool;
-
 };
-
 /* Register our test module */
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(RtpTest, "RtpTest");
 CPPUNIT_TEST_SUITE_REGISTRATION( RtpTest );
 
 #endif
diff --git a/sflphone-common/test/run-tests b/sflphone-common/test/run-tests
deleted file mode 100755
index 9b5d01405c9e5f6883b58946d129ae17b0b43f91..0000000000000000000000000000000000000000
--- a/sflphone-common/test/run-tests
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-myname="`basename $0`"
-failures=0
-
-for f in *
-do
-    # Skip ourself
-    if [ "$f" = "$myname" ]; then
-        continue
-    fi
-
-    if [ -x "$f" ]; then
-        echo
-        echo "=== Running [$f] test ==="
-        # Warning, libCppUnit returns 0 on failure.
-        ./"$f" && {
-            echo Warning: Failure in $f.
-            failures=$((failures+1))
-        }
-    fi
-done
-
-echo "Tests finshed, there were $failures failures."
diff --git a/sflphone-common/test/sdesnegotiatorTest.cpp b/sflphone-common/test/sdesnegotiatortest.cpp
similarity index 90%
rename from sflphone-common/test/sdesnegotiatorTest.cpp
rename to sflphone-common/test/sdesnegotiatortest.cpp
index 54f7f4b5ec0ec51210095816766f6134a269bed6..26d545ffd061bda93c9daadb7b47dfc89dcfde6b 100644
--- a/sflphone-common/test/sdesnegotiatorTest.cpp
+++ b/sflphone-common/test/sdesnegotiatortest.cpp
@@ -28,30 +28,21 @@
 #include <iostream>
 #include <sstream>
 
-
-#include "sdesnegotiatorTest.h"
+#include "sdesnegotiatortest.h"
 
 #include <unistd.h>
+#include "global.h"
 
 
 using std::cout;
 using std::endl;
 
 
-void SdesNegotiatorTest::setUp()
-{
-    
-}
-
-
-void SdesNegotiatorTest::tearDown()
-{
-
-}
-
 void SdesNegotiatorTest::testTagPattern()
 {
-    std::string subject = "a=crypto:4"; 
+	_debug ("-------------------- SdesNegotiatorTest::testTagPattern --------------------\n");
+
+	std::string subject = "a=crypto:4";
 
     pattern = new sfl::Pattern("^a=crypto:(?P<tag>[0-9]{1,9})");
     *pattern << subject;
@@ -66,6 +57,8 @@ void SdesNegotiatorTest::testTagPattern()
 
 void SdesNegotiatorTest::testCryptoSuitePattern()
 {
+	_debug ("-------------------- SdesNegotiatorTest::testCryptoSuitePattern --------------------\n");
+
     std::string subject = "AES_CM_128_HMAC_SHA1_80"; 
 
     pattern = new sfl::Pattern("(?P<cryptoSuite>AES_CM_128_HMAC_SHA1_80|" \
@@ -84,6 +77,7 @@ void SdesNegotiatorTest::testCryptoSuitePattern()
 
 void SdesNegotiatorTest::testKeyParamsPattern()
 {
+	_debug ("-------------------- SdesNegotiatorTest::testKeyParamsPattern --------------------\n");
 
     std::string subject = "inline:d0RmdmcmVCspeEc3QGZiNWpVLFJhQX1cfHAwJSoj|2^20|1:32";
 
@@ -110,6 +104,7 @@ void SdesNegotiatorTest::testKeyParamsPattern()
 
 void SdesNegotiatorTest::testKeyParamsPatternWithoutMKI()
 {
+	_debug ("-------------------- SdesNegotiatorTest::testKeyParamsPatternWithoutMKI --------------------\n");
 
     std::string subject = "inline:d0RmdmcmVCspeEc3QGZiNWpVLFJhQX1cfHAwJSoj";
 
@@ -136,6 +131,8 @@ void SdesNegotiatorTest::testKeyParamsPatternWithoutMKI()
  */
 void SdesNegotiatorTest::testNegotiation()
 {
+	_debug ("-------------------- SdesNegotiatorTest::testNegotiation --------------------\n");
+
      // Add a new SDES crypto line to be processed. 
     remoteOffer = new std::vector<std::string>();
     remoteOffer->push_back(std::string("a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwd|2^20|1:32"));
@@ -167,6 +164,8 @@ void SdesNegotiatorTest::testNegotiation()
  */
 void SdesNegotiatorTest::testComponent()
 {
+	_debug ("-------------------- SdesNegotiatorTest::testComponent --------------------\n");
+
     // Register the local capabilities.
     std::vector<sfl::CryptoSuiteDefinition> * capabilities = new std::vector<sfl::CryptoSuiteDefinition>();
 	
@@ -192,6 +191,8 @@ void SdesNegotiatorTest::testComponent()
  */
 void SdesNegotiatorTest::testMostSimpleCase()
 {
+	_debug ("-------------------- SdesNegotiatorTest::testMostSimpleCase --------------------\n");
+
     // Register the local capabilities.
     std::vector<sfl::CryptoSuiteDefinition> * capabilities = new std::vector<sfl::CryptoSuiteDefinition>();
 
@@ -219,8 +220,4 @@ void SdesNegotiatorTest::testMostSimpleCase()
     delete capabilities; capabilities = NULL;
     delete cryptoOffer; cryptoOffer = NULL;
     delete negotiator; negotiator = NULL;
-
-    
 }
-
-
diff --git a/sflphone-common/test/sdesnegotiatorTest.h b/sflphone-common/test/sdesnegotiatortest.h
similarity index 88%
rename from sflphone-common/test/sdesnegotiatorTest.h
rename to sflphone-common/test/sdesnegotiatortest.h
index f3e73f6c2f009df0787b9ad2522f437716b02503..97172594a2b8a3b96b4ac52fd2b31a8d2403be97 100644
--- a/sflphone-common/test/sdesnegotiatorTest.h
+++ b/sflphone-common/test/sdesnegotiatortest.h
@@ -41,9 +41,6 @@
 // Application import
 #include "sip/SdesNegotiator.h"
 #include "sip/Pattern.h"
-// #include "config/config.h"
-// #include "user_cfg.h"
-
 
 
 /*
@@ -72,20 +69,10 @@ class SdesNegotiatorTest : public CppUnit::TestCase {
 
     public:
 
-        SdesNegotiatorTest() : CppUnit::TestCase("Sdes Tests") {}
-        
-        /*
-         * Code factoring - Common resources can be initialized here.
-         * This method is called by unitcpp before each test
-         */
-        void setUp();
-
         /*
          * Code factoring - Common resources can be released here.
          * This method is called by unitcpp after each test
          */
-        inline void tearDown();
-
 		void testTagPattern();
 
 		void testCryptoSuitePattern();
@@ -114,6 +101,7 @@ class SdesNegotiatorTest : public CppUnit::TestCase {
 };
 
 /* Register our test module */
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(SdesNegotiatorTest, "SdesNegotiatorTest");
 CPPUNIT_TEST_SUITE_REGISTRATION( SdesNegotiatorTest );
 
 #endif
diff --git a/sflphone-common/test/validator.cpp b/sflphone-common/test/validator.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..56bb01dc9e743fb3bafed1a6d19bf42c74272d64
--- /dev/null
+++ b/sflphone-common/test/validator.cpp
@@ -0,0 +1,26 @@
+/*
+ * validator.cpp
+ *
+ *  Created on: 2010-03-12
+ *      Author: jb
+ */
+
+#include "validator.h"
+
+bool Validator::isNumber(std::string str) {
+	unsigned int i = 0;
+	if (!str.empty() && (str[i] == '-' || str[i] == '+'))
+		i++;
+	return string::npos == str.find_first_not_of(".eE0123456789", i);
+}
+
+bool Validator::isNotNull(std::string str) {
+	if(!str.empty())
+		return true;
+	else
+		return false;
+}
+
+bool Validator::isEqual(std::string str1, std::string str2) {
+	return str1.compare(str2) == 0;
+}
diff --git a/sflphone-common/test/validator.h b/sflphone-common/test/validator.h
new file mode 100644
index 0000000000000000000000000000000000000000..9f2012e2a6277e1df4eb71ca0d8063c315a25503
--- /dev/null
+++ b/sflphone-common/test/validator.h
@@ -0,0 +1,22 @@
+/*
+ * validator.h
+ *
+ *  Created on: 2010-03-12
+ *      Author: jb
+ */
+
+#ifndef VALIDATOR_H_
+#define VALIDATOR_H_
+
+#include <string>
+#include <iostream>
+
+using namespace std;
+
+class Validator {
+  public:
+	static bool isNumber(std::string str);
+	static bool isNotNull(std::string str);
+	static bool isEqual(std::string str1, std::string str2);
+};
+#endif /* VALIDATOR_H_ */