changeset 0:22b44846b04b

Initial commit
author Goffi <goffi@goffi.org>
date Sat, 06 Aug 2011 15:37:02 +0200
parents
children 2e015f69f756
files .hgignore bellaciao.cpp bellaciao.h bellaciao.pro bridge.cpp bridge.h contact_list.cpp contact_list.h dbus_types.cpp dbus_types.h main.cpp main_win.ui org.goffi.sat.xml parameters.cpp parameters.h parameters_win.ui
diffstat 16 files changed, 1076 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Sat Aug 06 15:37:02 2011 +0200
@@ -0,0 +1,15 @@
+syntax: glob
+bellaciao
+moc_*
+ui_*
+dbus_bridge*
+*.o
+*.cpps
+*.hs
+*.os
+Makefile*
+.*.un~*
+.*.swp
+*.xmls
+Session.vim
+output/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bellaciao.cpp	Sat Aug 06 15:37:02 2011 +0200
@@ -0,0 +1,82 @@
+/*
+Bellaciao: a Salut à Toi frontend
+Copyright (C) 2011  Jérôme Poisson (goffi@goffi.org)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "bellaciao.h"
+#include "parameters.h"
+
+Bellaciao::Bellaciao()
+    :QMainWindow(0)
+{
+    m_bridge = Bridge::getBridge();
+
+    //Ui
+    setupUi(this);
+    m_contactList = new ContactList(this);
+
+    //Signals & Slots
+    connect(actionParameters, SIGNAL(triggered()), this, SLOT(showParameters()));
+
+
+    addDockWidget(Qt::LeftDockWidgetArea, m_contactList);
+    
+    
+    setWindowTitle("Bellaciao");
+    QList<MenuT> menus = m_bridge->getMenus();
+    foreach(const MenuT &menu, menus)
+        qDebug() << menu.name;
+    StringDict waiting=m_bridge->getWaitingSub("jabberfr");
+
+    QList<ContactT> contacts = m_bridge->getContacts("jabberfr");
+
+    foreach(const ContactT &contact, contacts)
+        m_contactList->addContact(contact.jid);
+        //qDebug() << contact.jid << contact.attributes << contact.groups;
+        
+
+}
+
+void Bellaciao::disconnect()
+{
+    if ( QMessageBox::question (
+            this,
+            tr("Disconnect?"),
+            tr("Do you really want to disconnect ?"),
+            QMessageBox::Yes | QMessageBox::No,
+            QMessageBox::No
+            ) == QMessageBox::Yes
+       )
+    {
+        m_bridge->disconnect("jabberfr");
+    }
+}
+
+void Bellaciao::showParameters()
+{
+    qDebug("Show parameters");
+    ParametersWin *params = new ParametersWin();
+    params->show();
+}
+
+void Bellaciao::on_actionToggle_fullscreen_triggered()
+{
+    if (isFullScreen())
+        showNormal();
+    else
+        showFullScreen();
+    qDebug("on_actionToggle_fullscreen_triggered");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bellaciao.h	Sat Aug 06 15:37:02 2011 +0200
@@ -0,0 +1,46 @@
+/*
+Bellaciao: a Salut à Toi frontend
+Copyright (C) 2011  Jérôme Poisson (goffi@goffi.org)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef BELLACIAO_H
+#define BELLACIAO_H
+
+
+#include <QtGui>
+#include "ui_main_win.h"
+#include "contact_list.h"
+#include "bridge.h"
+
+class Bellaciao : public QMainWindow, private Ui::MainWindow
+{
+    Q_OBJECT
+
+    public:
+        Bellaciao();
+        
+
+    private slots:
+        void disconnect();
+        void showParameters();
+        void on_actionToggle_fullscreen_triggered();
+
+    private:
+        ContactList* m_contactList;
+        Bridge* m_bridge;
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bellaciao.pro	Sat Aug 06 15:37:02 2011 +0200
@@ -0,0 +1,14 @@
+######################################################################
+# Automatically generated by qmake (2.01a) mer. juil. 27 00:28:52 2011
+######################################################################
+
+TEMPLATE = app
+TARGET = 
+DEPENDPATH += .
+INCLUDEPATH += .
+QT += dbus
+
+# Input
+HEADERS += bellaciao.h contact_list.h dbus_bridge.h dbus_types.h bridge.h parameters.h
+SOURCES += main.cpp bellaciao.cpp contact_list.cpp dbus_bridge.cpp dbus_types.cpp bridge.cpp parameters.cpp
+FORMS += main_win.ui parameters_win.ui
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bridge.cpp	Sat Aug 06 15:37:02 2011 +0200
@@ -0,0 +1,42 @@
+/*
+Bellaciao: a Salut à Toi frontend
+Copyright (C) 2011  Jérôme Poisson (goffi@goffi.org)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "bridge.h"
+
+Bridge::Bridge(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
+    : DBusBridgeFrontend(service, path, connection, parent)
+{
+    qDebug() << "Bridge initialisation";
+}
+
+Bridge* Bridge::_bridge_instance = 0;
+
+Bridge* Bridge::getBridge()
+{
+    if (_bridge_instance == 0) {
+        qDBusRegisterMetaType<StringDict>();
+        qDBusRegisterMetaType<MenuT>();
+        qDBusRegisterMetaType< QList<MenuT> >();
+        qDBusRegisterMetaType<ContactT>();
+        qDBusRegisterMetaType< QList<ContactT> >();
+
+        _bridge_instance = new Bridge("org.goffi.SAT", "/org/goffi/SAT/bridge", QDBusConnection::sessionBus()); 
+    }
+
+    return _bridge_instance;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bridge.h	Sat Aug 06 15:37:02 2011 +0200
@@ -0,0 +1,37 @@
+/*
+Bellaciao: a Salut à Toi frontend
+Copyright (C) 2011  Jérôme Poisson (goffi@goffi.org)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef BRIDGE_H
+#define BRIDGE_H
+
+#include "dbus_types.h"
+#include "dbus_bridge.h"
+
+
+class Bridge: public DBusBridgeFrontend
+{
+public:
+    static Bridge* getBridge();
+
+protected:
+    Bridge(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
+
+private:
+    static Bridge* _bridge_instance;
+};
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contact_list.cpp	Sat Aug 06 15:37:02 2011 +0200
@@ -0,0 +1,38 @@
+/*
+Mignonne: a Salut à Toi frontend
+Copyright (C) 2011  Jérôme Poisson (goffi@goffi.org)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "contact_list.h"
+
+
+ContactList::ContactList(QWidget * parent):
+    QDockWidget(tr("Contacts"), parent)
+
+ {
+     mainWidget = new QWidget();
+     QVBoxLayout *layout = new QVBoxLayout;
+     listWidget = new QListWidget();
+     layout->addWidget(listWidget);
+     mainWidget->setLayout(layout);
+     setWidget(mainWidget);
+     
+ }
+
+void ContactList::addContact(const QString& jid)
+{
+    new QListWidgetItem(jid, listWidget);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contact_list.h	Sat Aug 06 15:37:02 2011 +0200
@@ -0,0 +1,35 @@
+/*
+Mignonne: a Salut à Toi frontend
+Copyright (C) 2011  Jérôme Poisson (goffi@goffi.org)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONTACTLIST_H
+#define CONTACTLIST_H
+
+#include <QtGui>
+
+class ContactList : public QDockWidget {
+    Q_OBJECT
+    
+    public:
+        ContactList(QWidget* parent = 0);
+        void addContact(const QString& jid);
+    private:
+        QWidget* mainWidget;
+        QListWidget* listWidget;
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dbus_types.cpp	Sat Aug 06 15:37:02 2011 +0200
@@ -0,0 +1,83 @@
+/*
+Mignonne: a Salut à Toi frontend
+Copyright (C) 2011  Jérôme Poisson (goffi@goffi.org)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "dbus_types.h"
+
+QDBusArgument &operator<<(QDBusArgument &argument, const ContactT &contact)
+{
+    argument.beginStructure();
+    argument << contact.jid << contact.attributes << contact.groups;
+    argument.endStructure();
+    return argument;
+}
+const QDBusArgument &operator>>(const QDBusArgument &argument, ContactT &contact)
+{
+    argument.beginStructure();
+    argument >> contact.jid >> contact.attributes >> contact.groups;
+    argument.endStructure();
+    return argument;
+}
+
+QDBusArgument &operator<<(QDBusArgument &argument, const MessageT &message)
+{
+    argument.beginStructure();
+    argument << message.from_jid << message.text;
+    argument.endStructure();
+    return argument;
+}
+
+const QDBusArgument &operator>>(const QDBusArgument &argument, MessageT &message)
+{
+    argument.beginStructure();
+    argument >> message.from_jid >> message.text;
+    argument.endStructure();
+    return argument;
+}
+
+QDBusArgument &operator<<(QDBusArgument &argument, const MenuT &menu)
+{
+    argument.beginStructure();
+    argument << menu.category << menu.name << menu.type;
+    argument.endStructure();
+    return argument;
+}
+
+const QDBusArgument &operator>>(const QDBusArgument &argument, MenuT &menu)
+{
+    argument.beginStructure();
+    argument >> menu.category >> menu.name >> menu.type;
+    argument.endStructure();
+    return argument;
+}
+
+QDBusArgument &operator<<(QDBusArgument &argument, const PresenceInfoT &presence_info)
+{
+    argument.beginStructure();
+    argument << presence_info.show << presence_info.priority << presence_info.statuses;
+    argument.endStructure();
+    return argument;
+}
+
+const QDBusArgument &operator>>(const QDBusArgument &argument, PresenceInfoT &presence_info)
+{
+    argument.beginStructure();
+    argument >> presence_info.show >> presence_info.priority >> presence_info.statuses;
+    argument.endStructure();
+    return argument;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dbus_types.h	Sat Aug 06 15:37:02 2011 +0200
@@ -0,0 +1,80 @@
+/*
+Mignonne: a Salut à Toi frontend
+Copyright (C) 2011  Jérôme Poisson (goffi@goffi.org)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef DBUS_TYPES_H
+#define DBUS_TYPES_H
+
+#include <QtDBus>
+#include <QHash>
+#include <QMap>
+#include <QString>
+#include <QList>
+
+typedef QHash<QString, QString> StringDict;
+
+struct ContactT {
+    QString jid;
+    StringDict attributes;
+    QList<QString> groups;
+};
+
+struct MessageT {
+    QString from_jid;
+    QString text;
+};
+
+typedef QMap<int,MessageT> HistoryT;
+
+struct MenuT {
+    QString category;
+    QString name;
+    QString type;
+};
+
+struct PresenceInfoT {
+    QString show;
+    int priority;
+    QHash<QString, QString> statuses;
+};
+
+typedef QMap<QString,PresenceInfoT> ResourcePresenceT;
+
+typedef QHash<QString,ResourcePresenceT> PresenceStatusT;
+
+typedef QHash<QString, StringDict> ActionResultExtDataT;
+
+Q_DECLARE_METATYPE(StringDict);
+Q_DECLARE_METATYPE(ContactT);
+Q_DECLARE_METATYPE(QList<ContactT>);
+Q_DECLARE_METATYPE(HistoryT);
+Q_DECLARE_METATYPE(PresenceStatusT);
+Q_DECLARE_METATYPE(MenuT);
+Q_DECLARE_METATYPE(QList<MenuT>);
+Q_DECLARE_METATYPE(ActionResultExtDataT);
+
+QDBusArgument &operator<<(QDBusArgument &argument, const ContactT &contact);
+const QDBusArgument &operator>>(const QDBusArgument &argument, ContactT &contact);
+QDBusArgument &operator<<(QDBusArgument &argument, const MenuT &menu);
+const QDBusArgument &operator>>(const QDBusArgument &argument, MenuT &menu);
+QDBusArgument &operator<<(QDBusArgument &argument, const MessageT &message);
+const QDBusArgument &operator>>(const QDBusArgument &argument, MessageT &message);
+QDBusArgument &operator<<(QDBusArgument &argument, const PresenceInfoT &presence_info);
+const QDBusArgument &operator>>(const QDBusArgument &argument, PresenceInfoT &presence_info);
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Aug 06 15:37:02 2011 +0200
@@ -0,0 +1,31 @@
+/*
+Bellaciao: a Salut à Toi frontend
+Copyright (C) 2011  Jérôme Poisson (goffi@goffi.org)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <QApplication>
+#include "bellaciao.h"
+
+
+int main(int argv, char **args)
+{
+    QApplication app(argv, args);
+ 
+    Bellaciao window;
+    window.show();
+ 
+    return app.exec();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main_win.ui	Sat Aug 06 15:37:02 2011 +0200
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>755</width>
+    <height>483</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Bellaciao</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QHBoxLayout" name="horizontalLayout">
+    <item>
+     <widget class="QTabWidget" name="tabWidget">
+      <property name="currentIndex">
+       <number>0</number>
+      </property>
+      <widget class="QWidget" name="tab">
+       <attribute name="title">
+        <string>Tab 1</string>
+       </attribute>
+      </widget>
+      <widget class="QWidget" name="tab_2">
+       <attribute name="title">
+        <string>Tab 2</string>
+       </attribute>
+      </widget>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>755</width>
+     <height>21</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuGeneral">
+    <property name="title">
+     <string>General</string>
+    </property>
+    <addaction name="actionParameters"/>
+    <addaction name="actionToggle_fullscreen"/>
+    <addaction name="separator"/>
+    <addaction name="actionQuit"/>
+   </widget>
+   <addaction name="menuGeneral"/>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+  <action name="actionParameters">
+   <property name="text">
+    <string>Parameters</string>
+   </property>
+  </action>
+  <action name="actionOpen">
+   <property name="text">
+    <string>open</string>
+   </property>
+  </action>
+  <action name="actionQuit">
+   <property name="text">
+    <string>Quit</string>
+   </property>
+  </action>
+  <action name="actionToggle_fullscreen">
+   <property name="text">
+    <string>Toggle &amp;fullscreen</string>
+   </property>
+  </action>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.goffi.sat.xml	Sat Aug 06 15:37:02 2011 +0200
@@ -0,0 +1,252 @@
+<?xml version="1.0" ?>
+<node>
+	
+  
+	<interface name="org.goffi.SAT.core">
+		
+  
+		<signal name="actionResult">
+			<arg direction="out" name="answer_type" type="s"/>
+			<arg direction="out" name="id" type="s"/>
+			<arg direction="out" name="data" type="a{ss}"/>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.In2" value="StringDict"/>
+		</signal>
+		<signal name="actionResultExt">
+			<arg direction="out" name="answer_type" type="s"/>
+			<arg direction="out" name="id" type="s"/>
+			<arg direction="out" name="data" type="a{sa{ss}}"/>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.In2" value="ActionResultExtDataT"/>
+		</signal>
+		<method name="addContact">
+			<arg direction="in" name="entity" type="s"/>
+			<arg direction="in" name="profile_key" type="s"/>
+		</method>
+		<signal name="askConfirmation">
+			<arg direction="out" name="conf_type" type="s"/>
+			<arg direction="out" name="id" type="s"/>
+			<arg direction="out" name="data" type="a{ss}"/>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.In2" value="StringDict"/>
+		</signal>
+		<method name="asyncConnect">
+			<arg direction="in" name="profile_key" type="s"/>
+		</method>
+		<method name="callMenu">
+			<arg direction="in" name="category" type="s"/>
+			<arg direction="in" name="name" type="s"/>
+			<arg direction="in" name="menu_type" type="s"/>
+			<arg direction="in" name="profile_key" type="s"/>
+			<arg direction="out" type="s"/>
+		</method>
+		<method name="confirmationAnswer">
+			<arg direction="in" name="id" type="s"/>
+			<arg direction="in" name="accepted" type="b"/>
+			<arg direction="in" name="data" type="a{ss}"/>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.In2" value="StringDict"/>
+		</method>
+		<method name="connect">
+			<arg direction="in" name="profile_key" type="s"/>
+		</method>
+		<signal name="connected">
+			<arg direction="out" name="profile" type="s"/>
+		</signal>
+		<signal name="connectionError">
+			<arg direction="out" name="error_type" type="s"/>
+			<arg direction="out" name="profile" type="s"/>
+		</signal>
+		<signal name="contactDeleted">
+			<arg direction="out" name="entity" type="s"/>
+			<arg direction="out" name="profile" type="s"/>
+		</signal>
+		<method name="createProfile">
+			<arg direction="in" name="profile" type="s"/>
+			<arg direction="out" type="i"/>
+		</method>
+		<method name="delContact">
+			<arg direction="in" name="entity" type="s"/>
+			<arg direction="in" name="profile_key" type="s"/>
+		</method>
+		<method name="deleteProfile">
+			<arg direction="in" name="profile" type="s"/>
+			<arg direction="out" type="i"/>
+		</method>
+		<method name="disconnect">
+			<arg direction="in" name="profile_key" type="s"/>
+		</method>
+		<signal name="disconnected">
+			<arg direction="out" name="profile" type="s"/>
+		</signal>
+		<method name="getConfig">
+			<arg direction="in" name="section" type="s"/>
+			<arg direction="in" name="name" type="s"/>
+			<arg direction="out" type="s"/>
+		</method>
+		<method name="getContacts">
+			<arg direction="in" name="profile_key" type="s"/>
+			<arg direction="out" type="a(sa{ss}as)"/>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QList&lt;ContactT&gt;"/>
+		</method>
+		<method name="getHistory">
+			<arg direction="in" name="from_jid" type="s"/>
+			<arg direction="in" name="to_jid" type="s"/>
+			<arg direction="in" name="size" type="i"/>
+			<arg direction="out" type="a{i(ss)}"/>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="HistoryT"/>
+		</method>
+		<method name="getMenuHelp">
+			<arg direction="in" name="category" type="s"/>
+			<arg direction="in" name="name" type="s"/>
+			<arg direction="in" name="menu_type" type="s"/>
+			<arg direction="out" type="s"/>
+		</method>
+		<method name="getMenus">
+			<arg direction="out" type="a(sss)"/>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QList&lt;MenuT&gt;"/>
+		</method>
+		<method name="getParamA">
+			<arg direction="in" name="name" type="s"/>
+			<arg direction="in" name="category" type="s"/>
+			<arg direction="in" name="attribute" type="s"/>
+			<arg direction="in" name="profile_key" type="s"/>
+			<arg direction="out" type="s"/>
+		</method>
+		<method name="getParams">
+			<arg direction="in" name="profile_key" type="s"/>
+			<arg direction="out" type="s"/>
+		</method>
+		<method name="getParamsCategories">
+			<arg direction="out" type="as"/>
+		</method>
+		<method name="getParamsForCategory">
+			<arg direction="in" name="category" type="s"/>
+			<arg direction="in" name="profile_key" type="s"/>
+			<arg direction="out" type="s"/>
+		</method>
+		<method name="getParamsUI">
+			<arg direction="in" name="profile_key" type="s"/>
+			<arg direction="out" type="s"/>
+		</method>
+		<method name="getPresenceStatus">
+			<arg direction="in" name="profile_key" type="s"/>
+			<arg direction="out" type="a{sa{s(sia{ss})}}"/>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="PresenceStatusT"/>
+		</method>
+		<method name="getProfileName">
+			<arg direction="in" name="profile_key" type="s"/>
+			<arg direction="out" type="s"/>
+		</method>
+		<method name="getProfilesList">
+			<arg direction="out" type="as"/>
+		</method>
+		<method name="getProgress">
+			<arg direction="in" name="id" type="s"/>
+			<arg direction="out" type="a{ss}"/>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="StringDict"/>
+		</method>
+		<method name="getVersion">
+			<arg direction="out" type="s"/>
+		</method>
+		<method name="getWaitingSub">
+			<arg direction="in" name="profile_key" type="s"/>
+			<arg direction="out" type="a{ss}"/>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="StringDict"/>
+		</method>
+		<method name="isConnected">
+			<arg direction="in" name="profile_key" type="s"/>
+			<arg direction="out" type="b"/>
+		</method>
+		<method name="launchAction">
+			<arg direction="in" name="action_type" type="s"/>
+			<arg direction="in" name="data" type="a{ss}"/>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="StringDict"/>
+			<arg direction="in" name="profile_key" type="s"/>
+			<arg direction="out" type="s"/>
+		</method>
+		<signal name="newAlert">
+			<arg direction="out" name="message" type="s"/>
+			<arg direction="out" name="title" type="s"/>
+			<arg direction="out" name="alert_type" type="s"/>
+			<arg direction="out" name="profile" type="s"/>
+		</signal>
+		<signal name="newContact">
+			<arg direction="out" name="contact" type="s"/>
+			<arg direction="out" name="attributes" type="a{ss}"/>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="StringDict"/>
+			<arg direction="out" name="groups" type="as"/>
+			<arg direction="out" name="profile" type="s"/>
+		</signal>
+		<signal name="newMessage">
+			<arg direction="out" name="from_jid" type="s"/>
+			<arg direction="out" name="message" type="s"/>
+			<arg direction="out" name="mess_type" type="s"/>
+			<arg direction="out" name="to_jid" type="s"/>
+			<arg direction="out" name="profile" type="s"/>
+		</signal>
+		<signal name="paramUpdate">
+			<arg direction="out" name="name" type="s"/>
+			<arg direction="out" name="value" type="s"/>
+			<arg direction="out" name="category" type="s"/>
+			<arg direction="out" name="profile" type="s"/>
+		</signal>
+		<signal name="presenceUpdate">
+			<arg direction="out" name="entity" type="s"/>
+			<arg direction="out" name="show" type="s"/>
+			<arg direction="out" name="priority" type="i"/>
+			<arg direction="out" name="statuses" type="a{ss}"/>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.In3" value="StringDict"/>
+			<arg direction="out" name="profile" type="s"/>
+		</signal>
+		<method name="registerNewAccount">
+			<arg direction="in" name="login" type="s"/>
+			<arg direction="in" name="password" type="s"/>
+			<arg direction="in" name="email" type="s"/>
+			<arg direction="in" name="host" type="s"/>
+			<arg direction="in" name="port" type="i"/>
+			<arg direction="out" type="s"/>
+		</method>
+		<method name="sendMessage">
+			<arg direction="in" name="to_jid" type="s"/>
+			<arg direction="in" name="message" type="s"/>
+			<arg direction="in" name="subject" type="s"/>
+			<arg direction="in" name="mess_type" type="s"/>
+			<arg direction="in" name="profile_key" type="s"/>
+		</method>
+		<method name="setParam">
+			<arg direction="in" name="name" type="s"/>
+			<arg direction="in" name="value" type="s"/>
+			<arg direction="in" name="category" type="s"/>
+			<arg direction="in" name="profile_key" type="s"/>
+		</method>
+		<method name="setPresence">
+			<arg direction="in" name="to_jid" type="s"/>
+			<arg direction="in" name="show" type="s"/>
+			<arg direction="in" name="priority" type="i"/>
+			<arg direction="in" name="statuses" type="a{ss}"/>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.In3" value="StringDict"/>
+			<arg direction="in" name="profile_key" type="s"/>
+		</method>
+		<signal name="subscribe">
+			<arg direction="out" name="sub_type" type="s"/>
+			<arg direction="out" name="entity" type="s"/>
+			<arg direction="out" name="profile" type="s"/>
+		</signal>
+		<method name="subscription">
+			<arg direction="in" name="sub_type" type="s"/>
+			<arg direction="in" name="entity" type="s"/>
+			<arg direction="in" name="profile_key" type="s"/>
+		</method>
+		<method name="updateContact">
+			<arg direction="in" name="entity" type="s"/>
+			<arg direction="in" name="name" type="s"/>
+			<arg direction="in" name="groups" type="as"/>
+			<arg direction="in" name="profile_key" type="s"/>
+		</method>
+		<signal name="updatedValue">
+			<arg direction="out" name="name" type="s"/>
+			<arg direction="out" name="value" type="a{ss}"/>
+			<annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="StringDict"/>
+			<arg direction="out" name="profile" type="s"/>
+		</signal>
+	</interface>
+	
+
+</node>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/parameters.cpp	Sat Aug 06 15:37:02 2011 +0200
@@ -0,0 +1,33 @@
+/*
+Bellaciao: a Salut à Toi frontend
+Copyright (C) 2011  Jérôme Poisson (goffi@goffi.org)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "parameters.h"
+
+ParametersWin :: ParametersWin(QWidget *parent)
+    : QWidget(parent)
+{
+    setupUi(this);
+
+    //We fill the profiles list
+    m_bridge = Bridge::getBridge();
+    const QList<QString>& profiles = m_bridge->getProfilesList();
+    foreach(const QString& profile, profiles)
+        new QListWidgetItem(profile, profileList);
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/parameters.h	Sat Aug 06 15:37:02 2011 +0200
@@ -0,0 +1,42 @@
+/*
+Bellaciao: a Salut à Toi frontend
+Copyright (C) 2011  Jérôme Poisson (goffi@goffi.org)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef PARAMETERS_H
+#define PARAMETERS_H
+
+
+#include <QtGui>
+#include "ui_parameters_win.h"
+#include "bridge.h"
+
+class ParametersWin : public QWidget, private Ui::ParametersWin
+{
+    Q_OBJECT
+
+    public:
+        ParametersWin(QWidget *parent = 0);
+
+    private:
+        Bridge* m_bridge;
+
+};
+
+
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/parameters_win.ui	Sat Aug 06 15:37:02 2011 +0200
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ParametersWin</class>
+ <widget class="QWidget" name="ParametersWin">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_2">
+   <item>
+    <widget class="QTabWidget" name="tabWidget">
+     <property name="currentIndex">
+      <number>0</number>
+     </property>
+     <widget class="QWidget" name="tab">
+      <attribute name="title">
+       <string>Profiles</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout">
+       <item>
+        <widget class="QWidget" name="widget" native="true">
+         <layout class="QHBoxLayout" name="horizontalLayout">
+          <item>
+           <widget class="QListWidget" name="profileList"/>
+          </item>
+          <item>
+           <widget class="QWidget" name="widget_2" native="true">
+            <layout class="QVBoxLayout" name="verticalLayout_3">
+             <item>
+              <widget class="QWidget" name="widget_3" native="true">
+               <layout class="QFormLayout" name="formLayout">
+                <item row="0" column="0">
+                 <widget class="QLabel" name="label">
+                  <property name="text">
+                   <string>jid</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="0" column="1">
+                 <widget class="QLineEdit" name="lineEdit"/>
+                </item>
+                <item row="1" column="0">
+                 <widget class="QLabel" name="label_2">
+                  <property name="text">
+                   <string>Password</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="1">
+                 <widget class="QLineEdit" name="lineEdit_2"/>
+                </item>
+               </layout>
+              </widget>
+             </item>
+             <item>
+              <widget class="QGroupBox" name="groupBox_2">
+               <property name="title">
+                <string>Custom Server</string>
+               </property>
+               <property name="checkable">
+                <bool>true</bool>
+               </property>
+               <property name="checked">
+                <bool>false</bool>
+               </property>
+               <layout class="QFormLayout" name="formLayout_2">
+                <property name="fieldGrowthPolicy">
+                 <enum>QFormLayout::ExpandingFieldsGrow</enum>
+                </property>
+                <item row="0" column="0">
+                 <widget class="QLabel" name="label_5">
+                  <property name="text">
+                   <string>Server</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="0" column="1">
+                 <widget class="QLineEdit" name="lineEdit_5"/>
+                </item>
+                <item row="1" column="0">
+                 <widget class="QLabel" name="label_6">
+                  <property name="text">
+                   <string>Port</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="1">
+                 <widget class="QLineEdit" name="lineEdit_6"/>
+                </item>
+                <item row="2" column="1">
+                 <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>
+               </layout>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="QWidget" name="widget_4" native="true">
+         <layout class="QHBoxLayout" name="horizontalLayout_2">
+          <item>
+           <widget class="QPushButton" name="pushButton">
+            <property name="text">
+             <string>New</string>
+            </property>
+            <property name="checkable">
+             <bool>false</bool>
+            </property>
+            <property name="checked">
+             <bool>false</bool>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QPushButton" name="pushButton_2">
+            <property name="text">
+             <string>Delete</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QPushButton" name="pushButton_3">
+            <property name="text">
+             <string>Set as default</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab_2">
+      <attribute name="title">
+       <string>Contact list layout</string>
+      </attribute>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>