commit a469d71894e2478351e6ec4a5cc7f327a404244e
Author: Eric Seigne <eric.seigne@ryxeo.com>
Date:   Mon Jun 24 21:43:26 2013 +0200

    premier proto: connexion sur le serveur clamd et scan de fichiers ok

diff --git a/.bzrignore b/.bzrignore
new file mode 100644
index 0000000..c626bfc
--- /dev/null
+++ b/.bzrignore
@@ -0,0 +1,10 @@
+./lib/abuleduapplicationv1
+./lib/abuleduconstantesv1
+./lib/abuledunetworkaccessmanagerv1
+./lib/abuledumessageboxv1
+./lib/abuleduidentitesv1
+./lib/abuleduflatboutonv1
+./lib/maia
+./lib/abuledufilev1
+./lib/abuleduvirtualkeyboardv1
+./lib/abuledusplashscreenv1
diff --git a/.bzrmeta/externals b/.bzrmeta/externals
new file mode 100644
index 0000000..36981f6
--- /dev/null
+++ b/.bzrmeta/externals
@@ -0,0 +1,10 @@
+http://redmine.ryxeo.com/code/leterrier-developpeu/abuleduapplicationv1 lib/abuleduapplicationv1
+http://redmine.ryxeo.com/code/leterrier-developpeu/abuleduconstantesv1/ lib/abuleduconstantesv1
+http://redmine.ryxeo.com/code/leterrier-developpeu/abuledunetworkaccessmanagerv1/ lib/abuledunetworkaccessmanagerv1
+http://redmine.ryxeo.com/code/leterrier-developpeu/abuledumessageboxv1/ lib/abuledumessageboxv1
+http://redmine.ryxeo.com/code/leterrier-developpeu/abuleduidentitesv1/ lib/abuleduidentitesv1
+http://redmine.ryxeo.com/code/leterrier-developpeu/abuleduflatboutonv1/ lib/abuleduflatboutonv1
+http://redmine.ryxeo.com/code/leterrier-developpeu/maia/ lib/maia
+http://redmine.ryxeo.com/code/leterrier-developpeu/abuledufilev1/ lib/abuledufilev1
+http://redmine.ryxeo.com/code/leterrier-developpeu/abuleduvirtualkeyboardv1 lib/abuleduvirtualkeyboardv1
+http://redmine.ryxeo.com/code/leterrier-developpeu/abuledusplashscreenv1 lib/abuledusplashscreenv1
diff --git a/.bzrmeta/externals-snapshot b/.bzrmeta/externals-snapshot
new file mode 100644
index 0000000..38ed045
--- /dev/null
+++ b/.bzrmeta/externals-snapshot
@@ -0,0 +1,10 @@
+http://redmine.ryxeo.com/code/leterrier-developpeu/abuleduapplicationv1 lib/abuleduapplicationv1 revid:philippe.cadaugade@ryxeo.com-20130624142256-6lprlvfcn72pwi8s
+http://redmine.ryxeo.com/code/leterrier-developpeu/abuleduconstantesv1/ lib/abuleduconstantesv1 revid:eric.seigne@ryxeo.com-20130321094714-9zwblepyl2ietis1
+http://redmine.ryxeo.com/code/leterrier-developpeu/abuledunetworkaccessmanagerv1/ lib/abuledunetworkaccessmanagerv1 revid:eric.seigne@ryxeo.com-20130319110634-vgopg53n3qf7sj06
+http://redmine.ryxeo.com/code/leterrier-developpeu/abuledumessageboxv1/ lib/abuledumessageboxv1 revid:philippe.cadaugade@ryxeo.com-20130614154345-7y8ky71k7h9ahe4b
+http://redmine.ryxeo.com/code/leterrier-developpeu/abuleduidentitesv1/ lib/abuleduidentitesv1 revid:eric.seigne@ryxeo.com-20130322103554-l8fc3fp1wqfhrhh7
+http://redmine.ryxeo.com/code/leterrier-developpeu/abuleduflatboutonv1/ lib/abuleduflatboutonv1 revid:philippe.cadaugade@ryxeo.com-20130506133852-x8yq8e04le150pt8
+http://redmine.ryxeo.com/code/leterrier-developpeu/maia/ lib/maia revid:icham.sirat@ryxeo.com-20130313214413-0n1fpronm8lnatul
+http://redmine.ryxeo.com/code/leterrier-developpeu/abuledufilev1/ lib/abuledufilev1 revid:philippe.cadaugade@ryxeo.com-20130624142451-lqk44f6dqi2uv7qn
+http://redmine.ryxeo.com/code/leterrier-developpeu/abuleduvirtualkeyboardv1 lib/abuleduvirtualkeyboardv1 revid:icham.sirat@ryxeo.com-20130506093314-en1m115ntenz1kg6
+http://redmine.ryxeo.com/code/leterrier-developpeu/abuledusplashscreenv1 lib/abuledusplashscreenv1 revid:philippe.cadaugade@ryxeo.com-20130417095431-ec6asrvaxso8zns7
\ No newline at end of file
diff --git a/main.cpp b/main.cpp
new file mode 100644
index 0000000..551b6ea
--- /dev/null
+++ b/main.cpp
@@ -0,0 +1,49 @@
+/** Projet ryxeo-antivirus
+  *
+  * @see https://redmine.ryxeo.com/projects/ryxeo-antivirus
+  * @author 2013 Eric Seigne <eric.seigne@ryxeo.com
+  * @see The GNU Public License (GPL)
+  *
+  * 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, see <http://www.gnu.org/licenses/>.
+  */
+
+
+#include <QtGui/QApplication>
+#include <QTranslator>
+#include <QLocale>
+#include <QDebug>
+
+#include "version.h"
+#include "utilitairemainwindow.h"
+#include "abuleduapplicationv1.h"
+#include "abuledusplashscreenv1.h"
+
+int main(int argc, char *argv[])
+{
+    AbulEduApplicationV1 a(argc, argv,VER_INTERNALNAME_STR, VER_PRODUCTVERSION_STR, VER_COMPANYDOMAIN_STR, "abuledu");
+    a.setAbeApplicationLongName(QObject::trUtf8(VER_FILEDESCRIPTION_STR));
+    UtilitaireMainWindow *w;
+    
+    // ================== splashscreen
+    AbulEduSplashScreenV1 *splash = new AbulEduSplashScreenV1(0,true);
+    splash->show();
+    w = new UtilitaireMainWindow();
+    splash->setMainWindow(w);
+    //pour les developpeurs presses, remplacer le 1000 par 100
+    splash->launch(1000);
+    // ================== splashscreen end
+
+    return a.exec();
+}
+
diff --git a/ryxeo-antivirus.pro b/ryxeo-antivirus.pro
new file mode 100644
index 0000000..0e3871d
--- /dev/null
+++ b/ryxeo-antivirus.pro
@@ -0,0 +1,34 @@
+QT       += core gui script xml network svg phonon
+system(ccache -V):QMAKE_CXX = ccache g++
+
+
+TEMPLATE = app
+
+SOURCES += main.cpp \
+           utilitairemainwindow.cpp
+
+HEADERS  += version.h \
+            utilitairemainwindow.h
+
+FORMS += utilitairemainwindow.ui
+
+
+win32{
+  OTHER_FILES += windows/windows.rc
+  RC_FILE = windows/windows.rc
+}
+
+macx {
+ ICON = macos/icones/macos.icns
+}
+
+include(lib/abuleduapplicationv1/abuleduapplicationv1.pri)
+include(lib/abuleduconstantesv1/abuleduconstantesv1.pri)
+include(lib/abuledunetworkaccessmanagerv1/abuledunetworkaccessmanagerv1.pri)
+include(lib/abuledumessageboxv1/abuledumessageboxv1.pri)
+include(lib/abuleduidentitesv1/abuleduidentitesv1.pri)
+include(lib/abuleduflatboutonv1/abuleduflatboutonv1.pri)
+include(lib/maia/maia.pri)
+include(lib/abuledufilev1/abuledufilev1.pri)
+#include(lib/abuleduvirtualkeyboardv1/abuleduvirtualkeyboardv1.pri)
+include(lib/abuledusplashscreenv1/abuledusplashscreenv1.pri)
diff --git a/utilitairemainwindow.cpp b/utilitairemainwindow.cpp
new file mode 100644
index 0000000..2f1dcdc
--- /dev/null
+++ b/utilitairemainwindow.cpp
@@ -0,0 +1,388 @@
+/** Classe de base pour les mainwindows des logiciels AbulEdu (ryxeo-antivirus)
+  *
+  * @see https://redmine.ryxeo.com/projects/ryxeo-antivirus
+  * @author 2013 Eric Seigne <eric.seigne@ryxeo.com
+  * 
+  * @see https://redmine.ryxeo.com/projects/ryxeo/wiki/UtilitaireMainWindow
+  * @author 2012 Philippe <philippe.cadaugade@ryxeo.com>
+  *
+  * @see The GNU Public License (GPL)
+  *
+  * 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 2 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.,
+  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+  */
+
+#include "utilitairemainwindow.h"
+#include "ui_utilitairemainwindow.h"
+
+UtilitaireMainWindow::UtilitaireMainWindow(QWidget *parent) :
+    QMainWindow(parent),
+    ui(new Ui::UtilitaireMainWindow)
+{
+    ui->setupUi(this);
+    /* Initialisation des variables */
+    m_localDebug = 0;
+    
+    /* Chargement langue */
+    createLangMenu();
+    QString locale = QLocale::system().name();
+    m_qtTranslator.load("qt_" + locale,
+                        QLibraryInfo::location(QLibraryInfo::TranslationsPath));
+    abeApp->installTranslator(&m_qtTranslator);
+    m_myAppTranslator.load(abeApp->applicationName() +"_"+ locale, "lang");
+    abeApp->installTranslator(&m_myAppTranslator);
+    
+    m_nam = abeApp->getAbeNetworkAccessManager();
+    connect(m_nam,SIGNAL(ssoAuthStatus(int)),this,SLOT(slotSSOStatusChanged(int)),Qt::UniqueConnection);
+    
+    
+    /* La boite à propos, même en version V1, n'est pas une lib externe, je ne l'inclus donc pas pour l'instant */
+    
+    /* Gestion du mode tablette automatique */
+#ifdef __ABULEDUTABLETTEV1__MODE__
+    ui->menuBar->hide();
+    ui->mainToolBar->hide();
+    ui->statusBar->hide();
+#else
+    /*On centre la fenetre sur l'ecran de l'utilisateur et on lui met un titre */
+    QDesktopWidget *widget = QApplication::desktop();
+    int desktop_width = widget->width();
+    int desktop_height = widget->height();
+    this->move((desktop_width-this->width())/2, (desktop_height-this->height())/2);
+    setTitle(abeApp->getAbeNetworkAccessManager()->abeSSOAuthenticationStatus());
+#endif
+
+
+    // create the socket and connect various of its signals
+    socket = new QLocalSocket( this );
+    connect( socket, SIGNAL(connected()), SLOT(socketConnected()) );
+    connect( socket, SIGNAL(disconnected()), SLOT(socketConnectionClosed()) );
+    connect( socket, SIGNAL(readyRead()), SLOT(socketReadyRead()) );
+    connect( socket, SIGNAL(error(QLocalSocket::SocketError)), SLOT(socketError(QAbstractSocket::SocketError)) );
+
+    // create the STREAM socket and connect various of its signals
+    stream_socket = new QTcpSocket( this );
+    connect( stream_socket , SIGNAL(connected()), SLOT(Stream_socketConnected()) );
+    connect( stream_socket , SIGNAL(disconnected()), SLOT(Stream_socketConnectionClosed()) );
+    connect( stream_socket , SIGNAL(readyRead()), SLOT(socketReadyRead()) );
+    connect( stream_socket , SIGNAL(error(QAbstractSocket::SocketError)), SLOT(socketError(QAbstractSocket::SocketError)) );
+
+    // connect to the server
+    strcpy (&Output_String[0], "Trying to connect to the server ");
+    ui->textBrowser->append(Output_String);
+    socket->connectToServer("/var/run/clamav/clamd.ctl");
+    //Get ClamAv Version
+    sendStringToServer("VERSION");
+
+    files_to_scan << "/tmp/devis_cde_facture_20130311.pdf" << "/tmp/Virus.Win32.Highway.a.zip";
+
+    it = files_to_scan.begin();
+    scanninginprogress = 1;
+    totalvirusfound = 0;
+    totalfilesscanned = 0;
+    totalwarnings = 0;
+    ui->textBrowser->append( "Start scanning..." );
+    sendStringToServer("STREAM");
+}
+
+UtilitaireMainWindow::~UtilitaireMainWindow()
+{
+    delete ui;
+}
+
+void UtilitaireMainWindow::createLangMenu()
+{
+    QAction* actionLangueEn = new QAction(trUtf8("English"),this);
+    actionLangueEn->setObjectName("en");
+    connect(actionLangueEn, SIGNAL(triggered()), this, SLOT(slotChangeLang()),Qt::UniqueConnection);
+    ui->menuLangues->addAction(actionLangueEn);
+    
+    QAction* actionLangueFr = new QAction(trUtf8("Français"),this);
+    actionLangueFr->setObjectName("fr");
+    connect(actionLangueFr, SIGNAL(triggered()), this, SLOT(slotChangeLang()),Qt::UniqueConnection);
+    ui->menuLangues->addAction(actionLangueFr);
+    
+    /* Décommenter pour ajouter une ligne au menu Langues
+    QAction* actionLangueEs = new QAction(trUtf8("Español"),this);
+    actionLangueEs->setObjectName("es");
+    connect(actionLangueEs, SIGNAL(triggered()), this, SLOT(slotChangeLangue()),Qt::UniqueConnection);
+    ui->menuLangues->addAction(actionLangueEs); */
+    
+    /* Décommenter pour ajouter une ligne au menu Langues
+    QAction* actionLangueDe = new QAction(trUtf8("Deutsche"),this);
+    actionLangueDe->setObjectName("de");
+    connect(actionLangueDe, SIGNAL(triggered()), this, SLOT(slotChangeLangue()),Qt::UniqueConnection);
+    ui->menuLangues->addAction(actionLangueDe); */
+    
+    /* Décommenter pour ajouter une ligne au menu Langues
+    QAction* actionLangueIt = new QAction(trUtf8("Italiano"),this);
+    actionLangueIt->setObjectName("it");
+    connect(actionLangueIt, SIGNAL(triggered()), this, SLOT(slotChangeLangue()),Qt::UniqueConnection);
+    ui->menuLangues->addAction(actionLangueIt); */
+    
+    /* Décommenter pour ajouter une ligne au menu Langues
+    QAction* actionLangueAr = new QAction(trUtf8("عربي"),this);
+    actionLangueAr->setObjectName("ar");
+    connect(actionLangueAr, SIGNAL(triggered()), this, SLOT(slotChangeLangue()),Qt::UniqueConnection);
+    ui->menuLangues->addAction(actionLangueAr); */
+}
+
+void UtilitaireMainWindow::slotSessionAuthenticated(bool enable)
+{
+    if(enable)
+    {
+        m_nam->abeSSOLogin();
+    }
+    show();
+    connect(m_nam, SIGNAL(ssoAuthStatus(int)), this,SLOT(setTitle(int)),Qt::UniqueConnection);
+}
+
+void UtilitaireMainWindow::slotChangeLang()
+{
+    QString lang = sender()->objectName();
+    abeApp->removeTranslator(&m_qtTranslator);
+    abeApp->removeTranslator(&m_myAppTranslator);
+    
+    m_qtTranslator.load("qt_" + lang, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
+    abeApp->installTranslator(&m_qtTranslator);
+    
+    m_myAppTranslator.load(abeApp->applicationName() + "_" + lang, "lang");
+    abeApp->installTranslator(&m_myAppTranslator);
+    ui->retranslateUi(this);
+}
+
+void UtilitaireMainWindow::setTitle(int authStatus)
+{
+    QString title = abeApp->getAbeApplicationLongName();
+    if (authStatus == 1)
+    {
+        title.append(" -- "+abeApp->getAbeNetworkAccessManager()->abeGetSSOLogin());
+    }
+    setWindowTitle(title);
+}
+
+void UtilitaireMainWindow::slotSSOStatusChanged(int code)
+{
+    /* Insérez ici le code que vous voulez concernant la modification d'état de l'authentification
+       code = -1 (erreur d'authentification), 0 (on ne sait pas, jamais tenté), ou 1 (authentifié) */
+    setTitle(code);
+}
+
+void UtilitaireMainWindow::on_action_Ouvrir_triggered()
+{
+    /* Écrivez ici le code à exécuter au clic sur l'entrée de menu "Fichier - Ouvrir" */
+}
+
+void UtilitaireMainWindow::on_action_Sauvegarder_triggered()
+{
+    /* Écrivez ici le code à exécuter au clic sur l'entrée de menu "Fichier - Sauvegarder" */
+}
+
+void UtilitaireMainWindow::on_actionQuitter_triggered()
+{
+    close();
+}
+
+void UtilitaireMainWindow::on_action_Authentification_triggered()
+{
+    m_nam->abeSSOLogout();
+    m_nam->abeSSOLogin();
+}
+
+void UtilitaireMainWindow::showEvent ( QShowEvent * event )
+{
+#ifdef __ABULEDUTABLETTEV1__MODE__
+    showFullScreen();
+#else
+    showNormal();
+#endif
+}
+
+
+void UtilitaireMainWindow::socketConnected()
+{
+    ui->textBrowser->append("Connected to ClamAV local server");
+
+//    sprintf (&Output_String[0], "Opening STREAM port %hu....", clamav_stream_port);
+//    ui->textBrowser->append( Output_String );
+
+//    stream_socket->connectToServer("/var/run/clamav/clamd.ctl");
+}
+
+void UtilitaireMainWindow::socketConnectionClosed()
+{
+    ui->textBrowser->append("Connection closed by the ClamAV server");
+    if (scanninginprogress == 1)
+    {
+        ui->textBrowser->append("Opening new STREM...");
+        socket->connectToServer("/var/run/clamav/clamd.ctl");
+        sendStringToServer("STREAM");
+    }
+}
+
+void UtilitaireMainWindow::socketReadyRead()
+{
+    // read from the server
+    while ( socket->canReadLine() ) {
+        Socket_Read_Line = socket->readLine();
+
+        if (Socket_Read_Line.startsWith("PORT") != 0)
+        {
+            clamav_stream_port = Socket_Read_Line.mid(5).toInt();
+            // connect to the STREAM server
+            sprintf (&Output_String[0], "Opening STREAM port %hu....", clamav_stream_port);
+            ui->textBrowser->append( Output_String );
+            stream_socket->connectToHost("localhost", clamav_stream_port );
+            ui->textBrowser->append( Socket_Read_Line );
+        }
+
+
+        else if (Socket_Read_Line.startsWith("FOUND") != 0)
+        {
+            //Clamd --> A VIRUS FOUND
+            totalvirusfound++;
+            ui->textBrowser->append( Socket_Read_Line );
+            scan_next_file();
+        }
+        else if (Socket_Read_Line.startsWith("OK") != 0)
+        {
+            //Clamd --> NO VIRUS FOUND
+            ui->textBrowser->append(Socket_Read_Line);
+            scan_next_file();
+        }
+        else if (Socket_Read_Line.startsWith("ClamAV") != 0)
+        {
+            ui->textBrowser->append(Socket_Read_Line);
+        }
+        else
+        {
+            ui->textBrowser->append(Socket_Read_Line);
+        }
+    }
+
+}
+
+void UtilitaireMainWindow::socketError(QAbstractSocket::SocketError e)
+{
+    ui->textBrowser->append( trUtf8("Error number %1 occurred\n").arg(e) );
+}
+
+void UtilitaireMainWindow::Stream_socketConnected()
+{
+    if (! files_to_scan.empty())
+    {
+        FileToScan = files_to_scan.takeFirst();
+        if ( !FileToScan.isEmpty() )
+        {
+            sendFileToServer(FileToScan);
+        }
+    }
+    else
+    {
+        scanninginprogress = 0;
+        ui->textBrowser->append( "Scan terminated" );
+    }
+}
+
+void UtilitaireMainWindow::Stream_socketConnectionClosed()
+{
+    //STREAM has been closed on end of file to start scanning it
+}
+
+void UtilitaireMainWindow::sendStringToServer(const QString &stringtosend)
+{
+    // write to the server
+    QTextStream os(socket);
+    os << stringtosend << "\n";
+}
+
+void UtilitaireMainWindow::sendFileToServer(const QString &file_to_scan)
+{
+    char buffer[1500];
+    int nbytes;
+    int file_size;
+    int stream_percent;
+
+    sprintf (&Output_String[0], "Scanning...");
+    ui->textBrowser->append(Output_String);
+
+    ui->textBrowser->append(file_to_scan );
+    totalfilesscanned++;
+    QFile file(file_to_scan);
+    if (file.open (QIODevice::ReadOnly))
+    {
+        file_size = (int)file.size();
+
+        sprintf (&Output_String[0], "File size is %d", file_size);
+        ui->textBrowser->append(Output_String);
+
+        stream_percent = 0;
+//        streamprogress->setTotalSteps (file_size);
+        while (((nbytes = file.read(buffer, sizeof(buffer))) > 0) && (file_size <= max_stream_size))
+        {
+            stream_percent += nbytes;
+            if (stream_socket->isOpen())
+            {
+                if (stream_socket->write(buffer, sizeof(buffer)) == -1)
+                {
+                    ui->textBrowser->append("Unexpected Error: writeBlock error");
+                }
+//                streamprogress->setProgress (stream_percent );
+            }
+            else
+                ui->textBrowser->append("Unexpected Error: stream_socket is closed");
+        }
+        if (file_size > max_stream_size)
+        {
+            totalwarnings++;
+            ui->textBrowser->append("Warning: the above file is too large and could not be scanned (max_stream_size).");
+        }
+        file.close();
+    }
+    if (stream_socket->state() == QLocalSocket::ConnectedState)
+        stream_socket->close(); //close socket to perform scan
+    else
+        ui->textBrowser->append("Unexpected Error: the STREAM socket has been already closed!");
+}
+
+void UtilitaireMainWindow::scan_next_file()
+{
+//    streamprogress->setProgress ( 0 );
+    if (scanninginprogress == 1)
+    {
+        ++it;
+        if (it == files_to_scan.end() )
+        {
+            if (totalvirusfound > 0)
+            {
+                sprintf (&Output_String[0], "*** ClamAV found (%d) virus(es) - %d file(s) scanned ***", totalvirusfound, totalfilesscanned );
+                ui->textBrowser->append( Output_String );
+            }
+            else
+            {
+                sprintf (&Output_String[0], "*** No virus found - %d file(s) scanned ***", totalfilesscanned );
+                ui->textBrowser->append( Output_String );
+            }
+            if (totalwarnings > 0)
+            {
+                sprintf (&Output_String[0], "*** Total warning(s) %d ***", totalwarnings );
+                ui->textBrowser->append( Output_String );
+            }
+            totalwarnings = 0;
+            totalfilesscanned = 0;
+            totalvirusfound = 0;
+            scanninginprogress = 0;
+        }
+    }
+}
diff --git a/utilitairemainwindow.h b/utilitairemainwindow.h
new file mode 100644
index 0000000..8eafa94
--- /dev/null
+++ b/utilitairemainwindow.h
@@ -0,0 +1,150 @@
+/** Classe de base pour les mainwindows des logiciels AbulEdu (ryxeo-antivirus)
+  *
+  * @see https://redmine.ryxeo.com/projects/ryxeo-antivirus
+  * @author 2013 Eric Seigne <eric.seigne@ryxeo.com
+  * 
+  * @see https://redmine.ryxeo.com/projects/ryxeo/wiki/UtilitaireMainWindow
+  * @author 2012 Philippe <philippe.cadaugade@ryxeo.com>
+  *
+  * @see The GNU Public License (GPL)
+  *
+  * 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 2 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.,
+  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+  */
+
+#ifndef UTILITAIREMAINWINDOW_H
+#define UTILITAIREMAINWINDOW_H
+
+/* Inclusion de classes Qt */
+#include <QMainWindow>
+#include <QDebug>
+#include <QLocalSocket>
+#include <QTcpSocket>
+#include <QAbstractSocket>
+
+#include <QFileDialog>
+
+/* Inclusion de classes AbulEdu */
+#include "abuleduapplicationv1.h"
+
+#define max_stream_size 10000000 //this value defines the maximum files size to be scanned and should be equal to the StreamMaxLength parameter in the clamd.conf file.
+
+namespace Ui {
+class UtilitaireMainWindow;
+}
+
+class UtilitaireMainWindow : public QMainWindow
+{
+    Q_OBJECT
+    
+public:
+    /* Méthodes */
+    /** Constructeur */
+    explicit UtilitaireMainWindow(QWidget *parent = 0);
+    
+    /** Destructeur virtuel pour cause d'objectif de polymorphisme */
+    virtual ~UtilitaireMainWindow();
+    
+protected:
+    /* Attributs */
+    /** Variable membre qui permet de contrôler l'affichage des qDebug */
+    bool                     m_localDebug;
+    
+    /* Méthodes */
+    /** Crée dans le menu Langues de l'interface graphique une entrée pour les langues désirées
+      * Seuls l'anglais et le français sont présents au départ
+      * Quelques langues sont prêtes à ajouter, en décommentant le bloc qui leur correspond
+      * Vous pouvez ajouter d'autres langues sur le même modèle */
+    virtual void createLangMenu();
+    
+private:
+    /** Gestion de l'affichage de la fenetre pour les tablettes */
+    void showEvent ( QShowEvent * event );
+    
+    /* Attributs */
+    /** Pointeur vers l'interface graphique */
+    Ui::UtilitaireMainWindow* ui;
+    
+    /** QTranslator destiné aux traductions Qt System */
+    QTranslator              m_qtTranslator;
+    
+    /** QTranslator destiné aux traductions spécifiques du logiciel */
+    QTranslator              m_myAppTranslator;
+    
+    /** Pointeur vers un l'AbulEduNetworkAccessManagerV1 de l'application, assignation dans le constructeur */
+    AbulEduNetworkAccessManagerV1 *m_nam;
+
+
+    int totalfilesscanned;
+    int totalvirusfound;
+    int totalwarnings;
+    int scanninginprogress;
+    QString ClamAV_host;
+    QString FileToScan;
+    QStringList files_to_scan;
+    QStringList::Iterator it;
+    QLocalSocket *socket;
+    QTcpSocket *stream_socket;
+    QLineEdit *inputText;
+    QString Socket_Read_Line;
+    char Output_String[512];
+    const QString host;
+    int clamav_main_port;
+    int clamav_stream_port;
+    
+public slots:
+    /** Affiche l'UtilitaireMainWindow après éventuellement demande d'authentification
+      * Connecté dans la méthode setMainWindow() de l'AbulEduSplashScreenV1 */
+    void slotSessionAuthenticated(bool enable);
+    
+private slots:
+    /** Opère le changement de langue désiré
+      * Connecté aux entrées du menu Langues */
+    void slotChangeLang();
+    
+    /** Actualise le nom de la fenêtre en fonction du nom du logiciel, du nom de l'exercice et du nom de l'utilisateur */
+    void setTitle(int authStatus);
+    
+    /** Permet de gerer les changement d'états d'authentification sso
+      * @param code est l'entier envoyé dans le signal ssoAuthStatus(int) de l'AbulEduNetworkAccessManagerV1
+      * avec lequel ce slot est connecté */
+    void slotSSOStatusChanged(int code);
+    
+    /** Code à exécuter au clic sur l'entrée de menu Fichier - Ouvrir */
+    void on_action_Ouvrir_triggered();
+    
+    /** Code à exécuter au clic sur l'entrée de menu "Fichier - Sauvegarder" */
+    void on_action_Sauvegarder_triggered();
+    
+    /** Code à exécuter au clic sur l'entrée de menu "Fichier - Quitter" */
+    void on_actionQuitter_triggered();
+    
+    /** Code à exécuter au clic sur l'entrée de menu "Utilisateur - Authentification" */
+    void on_action_Authentification_triggered();
+
+    void socketConnected();
+    void socketConnectionClosed();
+    void socketReadyRead();
+    void socketError(QAbstractSocket::SocketError e);
+
+    void Stream_socketConnected();
+    void Stream_socketConnectionClosed();
+
+    void sendStringToServer(const QString &stringtosend);
+    void sendFileToServer(const QString &file_to_scan);
+    void scan_next_file();
+};
+
+#endif // UTILITAIREMAINWINDOW_H
+
diff --git a/utilitairemainwindow.ui b/utilitairemainwindow.ui
new file mode 100644
index 0000000..a72eccb
--- /dev/null
+++ b/utilitairemainwindow.ui
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>UtilitaireMainWindow</class>
+ <widget class="QMainWindow" name="UtilitaireMainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1024</width>
+    <height>550</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>UtilitaireMainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralWidget">
+   <layout class="QGridLayout" name="gridLayout">
+    <item row="0" column="0">
+     <widget class="QTextBrowser" name="textBrowser"/>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menuBar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>1024</width>
+     <height>25</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuFichier">
+    <property name="title">
+     <string>&amp;Fichier</string>
+    </property>
+    <addaction name="action_Ouvrir"/>
+    <addaction name="action_Sauvegarder"/>
+    <addaction name="separator"/>
+    <addaction name="actionQuitter"/>
+   </widget>
+   <widget class="QMenu" name="menuLangues">
+    <property name="title">
+     <string>&amp;Langues</string>
+    </property>
+   </widget>
+   <widget class="QMenu" name="menuUtilisateurs">
+    <property name="title">
+     <string>&amp;Utilisateur</string>
+    </property>
+    <addaction name="action_Authentification"/>
+   </widget>
+   <addaction name="menuFichier"/>
+   <addaction name="menuLangues"/>
+   <addaction name="menuUtilisateurs"/>
+  </widget>
+  <widget class="QToolBar" name="mainToolBar">
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+  </widget>
+  <widget class="QStatusBar" name="statusBar"/>
+  <action name="action_Ouvrir">
+   <property name="text">
+    <string>&amp;Ouvrir</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+O</string>
+   </property>
+  </action>
+  <action name="action_Sauvegarder">
+   <property name="text">
+    <string>&amp;Sauvegarder</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+E</string>
+   </property>
+  </action>
+  <action name="actionQuitter">
+   <property name="text">
+    <string>&amp;Quitter</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+Q</string>
+   </property>
+  </action>
+  <action name="action_Authentification">
+   <property name="text">
+    <string>&amp;Authentification</string>
+   </property>
+  </action>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/version.h b/version.h
new file mode 100644
index 0000000..5909f83
--- /dev/null
+++ b/version.h
@@ -0,0 +1,21 @@
+#ifndef VERSION_H
+#define VERSION_H
+
+#define VER_FILEVERSION             0,1,0,0
+#define VER_FILEVERSION_STR         "0.1.0\0"
+
+#define VER_PRODUCTVERSION          0,1,0,0
+#define VER_PRODUCTVERSION_STR      "0.1.0\0"
+
+#define VER_COMPANYNAME_STR         "entreprise"
+#define VER_FILEDESCRIPTION_STR     "AbulEdu -- ryxeo-antivirus"
+#define VER_INTERNALNAME_STR        "ryxeo-antivirus"
+#define VER_LEGALCOPYRIGHT_STR      "Copyright (c) 2013"
+#define VER_LEGALTRADEMARKS1_STR    "All Rights Reserved"
+#define VER_LEGALTRADEMARKS2_STR    "License GNU/GPL v3"
+#define VER_ORIGINALFILENAME_STR    "ryxeo-antivirus.exe"
+#define VER_PRODUCTNAME_STR         "AbulEdu -- ryxeo-antivirus"
+
+#define VER_COMPANYDOMAIN_STR       "abuledu.org"
+
+#endif // VERSION_H
