diff -d -urpN abrt.8/configure.ac abrt.9/configure.ac
--- abrt.8/configure.ac	2009-09-14 15:45:54.105470228 +0200
+++ abrt.9/configure.ac	2009-09-14 16:41:57.171720232 +0200
@@ -76,8 +76,6 @@ AC_CONFIG_FILES([
 	Makefile
 	lib/Makefile
 	lib/Utils/Makefile
-	lib/MiddleWare/Makefile
-	lib/CommLayer/Makefile
 	lib/Plugins/Makefile
 	lib/Python/Makefile
 	src/Makefile
diff -d -urpN abrt.8/lib/CommLayer/CommLayerInner.cpp abrt.9/lib/CommLayer/CommLayerInner.cpp
--- abrt.8/lib/CommLayer/CommLayerInner.cpp	2009-09-08 17:13:38.000000000 +0200
+++ abrt.9/lib/CommLayer/CommLayerInner.cpp	1970-01-01 01:00:00.000000000 +0100
@@ -1,69 +0,0 @@
-#include <pthread.h>
-#include <map>
-#include "abrtlib.h"
-#include "CommLayerInner.h"
-
-static CObserver *s_pObs;
-
-typedef std::map<uint64_t, std::string> map_uint_str_t;
-static map_uint_str_t s_mapClientID;
-static pthread_mutex_t s_map_mutex;
-static bool s_map_mutex_inited;
-
-void init_daemon_logging(CObserver *pObs)
-{
-    s_pObs = pObs;
-    if (!s_map_mutex_inited)
-    {
-        pthread_mutex_init(&s_map_mutex, NULL);
-        s_map_mutex_inited = true;
-    }
-}
-
-void set_client_name(const char* name)
-{
-    uint64_t key = uint64_t(pthread_self());
-
-    pthread_mutex_lock(&s_map_mutex);
-    if (!name)
-        s_mapClientID.erase(key);
-    else
-        s_mapClientID[key] = name;
-    pthread_mutex_unlock(&s_map_mutex);
-}
-
-void warn_client(const std::string& pMessage)
-{
-    if (!s_pObs)
-        return;
-
-    uint64_t key = uint64_t(pthread_self());
-
-    pthread_mutex_lock(&s_map_mutex);
-    map_uint_str_t::const_iterator ki = s_mapClientID.find(key);
-    const char* peer = (ki != s_mapClientID.end() ? ki->second.c_str() : NULL);
-    pthread_mutex_unlock(&s_map_mutex);
-
-    if (peer)
-        s_pObs->Warning(pMessage, peer, key);
-    else /* Bug: someone tries to warn_client() without set_client_name()!? */
-        log("Hmm, stray %s: '%s'", __func__, pMessage.c_str());
-}
-
-void update_client(const std::string& pMessage)
-{
-    if (!s_pObs)
-        return;
-
-    uint64_t key = uint64_t(pthread_self());
-
-    pthread_mutex_lock(&s_map_mutex);
-    map_uint_str_t::const_iterator ki = s_mapClientID.find(key);
-    const char* peer = (ki != s_mapClientID.end() ? ki->second.c_str() : NULL);
-    pthread_mutex_unlock(&s_map_mutex);
-
-    if (peer)
-        s_pObs->Status(pMessage, peer, key);
-    else
-        log("Hmm, stray %s: '%s'", __func__, pMessage.c_str());
-}
diff -d -urpN abrt.8/lib/CommLayer/CommLayerInner.h abrt.9/lib/CommLayer/CommLayerInner.h
--- abrt.8/lib/CommLayer/CommLayerInner.h	2009-09-08 17:05:27.000000000 +0200
+++ abrt.9/lib/CommLayer/CommLayerInner.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-#ifndef COMMLAYERINNER_H_
-#define COMMLAYERINNER_H_
-
-#include "Observer.h"
-
-void init_daemon_logging(CObserver *pObs);
-
-/*
- * Set client's name (dbus ID). NULL unsets it.
- */
-void set_client_name(const char* name);
-/* Ask a client to warn the user about a non-fatal, but unexpected condition.
- * In GUI, it will usually be presented as a popup message.
- */
-void warn_client(const std::string& pMessage);
-/* Logs a message to a client.
- * In UI, it will usually appear as a new status line message in GUI,
- * or as a new message line in CLI.
- */
-void update_client(const std::string& pMessage);
-
-#endif /* COMMLAYERINNER_H_ */
-
diff -d -urpN abrt.8/lib/CommLayer/DBusClientProxy.cpp abrt.9/lib/CommLayer/DBusClientProxy.cpp
--- abrt.8/lib/CommLayer/DBusClientProxy.cpp	2009-09-04 17:47:35.000000000 +0200
+++ abrt.9/lib/CommLayer/DBusClientProxy.cpp	1970-01-01 01:00:00.000000000 +0100
@@ -1,239 +0,0 @@
-/*
-    Copyright (C) 2009  Jiri Moskovcak (jmoskovc@redhat.com)
-    Copyright (C) 2009  RedHat inc.
-
-    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.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-    */
-
-#include "DBusClientProxy.h"
-#include <iostream>
-
-namespace org {
-namespace freedesktop {
-namespace DBus {
-
-/* class DaemonWatcher_proxy */
-
-/* public: */
-
-DaemonWatcher_proxy::DaemonWatcher_proxy()
-: ::DBus::InterfaceProxy("org.freedesktop.DBus")
-{
-    m_pStateChangeHandler_cb_data = NULL;
-    m_pStateChangeHandler = NULL;
-    connect_signal(DaemonWatcher_proxy, NameOwnerChanged, _DaemonStateChanged);
-}
-
-void DaemonWatcher_proxy::ConnectStateChangeHandler(void (*pStateChangeHandler)(bool running, void* data), void *cb_data)
-{
-    m_pStateChangeHandler_cb_data = cb_data;
-    m_pStateChangeHandler = pStateChangeHandler;
-}
-
-/* private: */
-
-/* unmarshalers (to unpack the DBus message before calling the actual signal handler)
- */
-void DaemonWatcher_proxy::_DaemonStateChanged(const ::DBus::SignalMessage &sig)
-{
-    ::DBus::MessageIter ri = sig.reader();
-    std::string name;
-    std::string old_owner;
-    std::string new_owner;
-    ri >> name;
-    ri >> old_owner;
-    ri >> new_owner;
-    if(name.compare("com.redhat.abrt") == 0)
-    {
-        if(new_owner.length() > 0)
-        {
-            if(m_pStateChangeHandler)
-            {
-                m_pStateChangeHandler(true,m_pStateChangeHandler_cb_data);
-            }
-            else
-            {
-                std::cout << "Daemon appeared!" << std::endl;
-            }
-        }
-        if(new_owner.length() == 0)
-        {
-            if(m_pStateChangeHandler)
-            {
-                m_pStateChangeHandler(false, m_pStateChangeHandler_cb_data);
-            }
-            else
-            {
-                std::cout << "Daemon dissapeared!" << std::endl;
-            }
-        }
-    }
-}
-
-} } } /* closing namespaces */
-
-
-/* class DaemonWatcher */
-
-/* public: */
-
-DaemonWatcher::DaemonWatcher(DBus::Connection &connection, const char *path, const char *name)
-: ::DBus::ObjectProxy(connection, path, name)
-{
-}
-DaemonWatcher::~DaemonWatcher()
-{
-    std::cout << "~DaemonWatcher" << std::endl;
-}
-
-
-/* class CDBusClient_proxy */
-
-/* public: */
-
-CDBusClient_proxy::CDBusClient_proxy()
-: DBus::InterfaceProxy(CC_DBUS_IFACE)
-{
-    connect_signal(CDBusClient_proxy, Crash, _Crash_stub);
-    connect_signal(CDBusClient_proxy, JobDone, _JobDone_stub);
-    m_sConnName = "";
-}
-
-CDBusClient_proxy::CDBusClient_proxy(::DBus::Connection &pConnection)
-: DBus::InterfaceProxy(CC_DBUS_IFACE)
-{
-    gloop = g_main_loop_new(NULL, false);
-    //# define connect_signal(interface, signal, callback)
-    connect_signal(CDBusClient_proxy, Crash, _Crash_stub);
-    connect_signal(CDBusClient_proxy, JobDone, _JobDone_stub);
-    m_sConnName = pConnection.unique_name();
-}
-
-/* methods exported by this interface,
- * this functions will invoke the corresponding methods on the remote objects
- */
- /*
-
- <
-  <m_sUUID;m_sUID;m_sCount;m_sExecutable;m_sPackage>
-  <m_sUUID;m_sUID;m_sCount;m_sExecutable;m_sPackage>
-  <m_sUUID;m_sUID;m_sCount;m_sExecutable;m_sPackage>
-  ...
-  >
-  */
-vector_crash_infos_t CDBusClient_proxy::GetCrashInfos()
-{
-    DBus::CallMessage call;
-    DBus::MessageIter wi = call.writer();
-
-    call.member("GetCrashInfos");
-    DBus::Message ret = invoke_method(call);
-    DBus::MessageIter ri = ret.reader();
-
-    vector_crash_infos_t argout;
-    ri >> argout;
-    return argout;
-}
-
-bool CDBusClient_proxy::DeleteDebugDump(const std::string& pUUID)
-{
-    DBus::CallMessage call;
-
-    DBus::MessageIter wi = call.writer();
-
-    wi << pUUID;
-    call.member("DeleteDebugDump");
-    DBus::Message ret = invoke_method(call);
-    DBus::MessageIter ri = ret.reader();
-
-    bool argout;
-    ri >> argout;
-    return argout;
-}
-
-map_crash_report_t CDBusClient_proxy::CreateReport(const std::string& pUUID)
-{
-    m_bJobDone = false;
-    DBus::CallMessage call;
-
-    DBus::MessageIter wi = call.writer();
-
-    wi << pUUID;
-    call.member("CreateReport");
-    DBus::Message ret = invoke_method(call);
-    DBus::MessageIter ri = ret.reader();
-    ri >> m_iPendingJobID;
-    //FIXME: what if the report is created before we start the loop? (we miss the signal and get stuck in the loop)
-    g_main_loop_run(gloop);
-    return GetJobResult(m_iPendingJobID);
-};
-
-void CDBusClient_proxy::Report(const map_crash_report_t& pReport)
-{
-    DBus::CallMessage call;
-
-    DBus::MessageIter wi = call.writer();
-
-    wi << pReport;
-    call.member("Report");
-    DBus::Message ret = invoke_method(call);
-    DBus::MessageIter ri = ret.reader();
-}
-
-map_crash_report_t CDBusClient_proxy::GetJobResult(uint64_t pJobID)
-{
-    DBus::CallMessage call;
-
-    DBus::MessageIter wi = call.writer();
-
-    wi << pJobID;
-    call.member("GetJobResult");
-    DBus::Message ret = invoke_method(call);
-    DBus::MessageIter ri = ret.reader();
-    map_crash_report_t argout;
-    ri >> argout;
-    return argout;
-}
-
-/* signal handlers for this interface
- */
-void CDBusClient_proxy::Crash(const std::string& progname, const std::string& uid)
-{
-}
-
-/* private: */
-
-/* unmarshalers (to unpack the DBus message before calling the actual signal handler)
- */
-void CDBusClient_proxy::_Crash_stub(const ::DBus::SignalMessage &sig)
-{
-    DBus::MessageIter ri = sig.reader();
-
-    std::string progname; ri >> progname;
-    std::string uid; ri >> uid;
-    Crash(progname, uid);
-}
-
-void CDBusClient_proxy::_JobDone_stub(const ::DBus::SignalMessage &sig)
-{
-    DBus::MessageIter ri = sig.reader();
-    std::string dest;
-    ri >> dest;
-    if(m_sConnName == dest)
-    {
-        ri >> m_iPendingJobID;
-        g_main_loop_quit(gloop);
-    }
-}
diff -d -urpN abrt.8/lib/CommLayer/DBusClientProxy.h abrt.9/lib/CommLayer/DBusClientProxy.h
--- abrt.8/lib/CommLayer/DBusClientProxy.h	2009-09-04 17:47:35.000000000 +0200
+++ abrt.9/lib/CommLayer/DBusClientProxy.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,108 +0,0 @@
-/*
-    Copyright (C) 2009  Jiri Moskovcak (jmoskovc@redhat.com)
-    Copyright (C) 2009  RedHat inc.
-
-    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.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-    */
-#ifndef DBUSCLIENTPROXY_H_
-#define DBUSCLIENTPROXY_H_
-
-#include <dbus-c++/dbus.h>
-#include <dbus-c++/glib-integration.h>
-#include "DBusCommon.h"
-
-#define ABRT_NOT_RUNNING 0
-#define ABRT_RUNNING 1
-
-namespace org {
-namespace freedesktop {
-namespace DBus {
-
-class DaemonWatcher_proxy
-: public ::DBus::InterfaceProxy
-{
-private:
-    void *m_pStateChangeHandler_cb_data;
-    void (*m_pStateChangeHandler)(bool running, void* data);
-
-public:
-    DaemonWatcher_proxy();
-    void ConnectStateChangeHandler(void (*pStateChangeHandler)(bool running, void* data), void *cb_data);
-
-private:
-    /* unmarshalers (to unpack the DBus message before calling the actual signal handler)
-     */
-    void _DaemonStateChanged(const ::DBus::SignalMessage &sig);
-};
-
-} } }
-
-
-class DaemonWatcher
-: public org::freedesktop::DBus::DaemonWatcher_proxy,
-  public DBus::IntrospectableProxy,
-  public DBus::ObjectProxy
-{
-public:
-
-    DaemonWatcher(DBus::Connection &connection, const char *path, const char *name);
-    ~DaemonWatcher();
-};
-
-
-class CDBusClient_proxy
-: public DBus::InterfaceProxy
-{
-private:
-    bool m_bJobDone;
-    uint64_t m_iPendingJobID;
-    GMainLoop *gloop;
-    std::string m_sConnName;
-
-public:
-    CDBusClient_proxy();
-    CDBusClient_proxy(::DBus::Connection &pConnection);
-
-public:
-    /* methods exported by this interface,
-     * this functions will invoke the corresponding methods on the remote objects
-     */
-    /*
-     <
-      <m_sUUID;m_sUID;m_sCount;m_sExecutable;m_sPackage>
-      <m_sUUID;m_sUID;m_sCount;m_sExecutable;m_sPackage>
-      <m_sUUID;m_sUID;m_sCount;m_sExecutable;m_sPackage>
-      ...
-      >
-     */
-    vector_crash_infos_t GetCrashInfos();
-    bool DeleteDebugDump(const std::string& pUUID);
-    map_crash_report_t CreateReport(const std::string& pUUID);
-    void Report(const map_crash_report_t& pReport);
-    map_crash_report_t GetJobResult(uint64_t pJobID);
-
-public:
-    /* signal handlers for this interface
-     */
-    virtual void Crash(const std::string& progname, const std::string& uid);
-
-private:
-    /* unmarshalers (to unpack the DBus message before calling the actual signal handler)
-     */
-    void _Crash_stub(const ::DBus::SignalMessage &sig);
-    void _JobDone_stub(const ::DBus::SignalMessage &sig);
-};
-
-#endif
diff -d -urpN abrt.8/lib/CommLayer/DBusCommon.h abrt.9/lib/CommLayer/DBusCommon.h
--- abrt.8/lib/CommLayer/DBusCommon.h	2009-09-04 17:47:35.000000000 +0200
+++ abrt.9/lib/CommLayer/DBusCommon.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,29 +0,0 @@
-/*
-    Copyright (C) 2009  Jiri Moskovcak (jmoskovc@redhat.com)
-    Copyright (C) 2009  RedHat inc.
-
-    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.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-    */
-
-#ifndef DBUSCOMMON_H_
-#define DBUSCOMMON_H_
-
-#include "CrashTypes.h"
-
-#define CC_DBUS_NAME "com.redhat.abrt"
-#define CC_DBUS_PATH "/com/redhat/abrt"
-#define CC_DBUS_IFACE "com.redhat.abrt"
-
-#endif
diff -d -urpN abrt.8/lib/CommLayer/Makefile.am abrt.9/lib/CommLayer/Makefile.am
--- abrt.8/lib/CommLayer/Makefile.am	2009-09-14 14:19:09.014470515 +0200
+++ abrt.9/lib/CommLayer/Makefile.am	1970-01-01 01:00:00.000000000 +0100
@@ -1,32 +0,0 @@
-lib_LTLIBRARIES = libABRTCommLayer.la
-
-libABRTCommLayer_la_SOURCES = \
-    DBusClientProxy.h DBusClientProxy.cpp \
-    CommLayerInner.h CommLayerInner.cpp \
-    Observer.h \
-    DBusCommon.h
-libABRTCommLayer_la_LIBADD = \
-    ../../lib/MiddleWare/libABRTMiddleWare.la \
-    $(DL_LIBS) $(DBUSCPP_LIBS)
-libABRTCommLayer_la_LDFLAGS = -version-info 0:1:0
-libABRTCommLayer_la_CPPFLAGS = \
-    -Wall -Werror \
-    -I$(srcdir)/../../inc \
-    -I$(srcdir)/../../lib/MiddleWare \
-    -I$(srcdir)/../../lib/DBus \
-    -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-    -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-    -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
-    -DCONF_DIR=\"$(CONF_DIR)\" \
-    -DVAR_RUN=\"$(VAR_RUN)\" \
-    $(GLIB_CFLAGS) $(DBUSCPP_CFLAGS) \
-    -D_GNU_SOURCE
-
-#check_PROGRAMS = test
-#test_SOURCES = test.cpp
-#test_LDADD = ../Utils/libABRTUtils.la libABRTCommLayer.la $(DL_LIBS) $(RPM_LIBS)
-#test_CPPFLAGS = -I$(srcdir)/../Utils \
-#                -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-#                -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
-#                -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-#                -DCONF_DIR=\"$(CONF_DIR)\"
diff -d -urpN abrt.8/lib/CommLayer/Observer.h abrt.9/lib/CommLayer/Observer.h
--- abrt.8/lib/CommLayer/Observer.h	2009-09-08 17:05:27.000000000 +0200
+++ abrt.9/lib/CommLayer/Observer.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-#ifndef OBSERVER_H_
-#define OBSERVER_H_
-
-#include <string>
-#include <iostream>
-#include <stdint.h>
-#include "DBusCommon.h"
-
-class CObserver {
-    public:
-        virtual ~CObserver() {}
-        virtual void Status(const std::string& pMessage, const char* peer, uint64_t pDest) = 0;
-        virtual void Warning(const std::string& pMessage, const char* peer, uint64_t pDest) = 0;
-};
-
-#endif
diff -d -urpN abrt.8/lib/Makefile.am abrt.9/lib/Makefile.am
--- abrt.8/lib/Makefile.am	2009-09-04 17:47:35.000000000 +0200
+++ abrt.9/lib/Makefile.am	2009-09-14 16:40:44.705471087 +0200
@@ -1 +1 @@
-SUBDIRS = Utils MiddleWare Plugins CommLayer Python
+SUBDIRS = Utils Plugins Python
diff -d -urpN abrt.8/lib/MiddleWare/Action.h abrt.9/lib/MiddleWare/Action.h
--- abrt.8/lib/MiddleWare/Action.h	2009-09-04 17:47:35.000000000 +0200
+++ abrt.9/lib/MiddleWare/Action.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,47 +0,0 @@
-/*
-    Action.h - header file for action plugin
-
-    Copyright (C) 2009  Zdenek Prikryl (zprikryl@redhat.com)
-    Copyright (C) 2009  RedHat inc.
-
-    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.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-    */
-
-#ifndef ACTION_H_
-#define ACTION_H_
-
-#include <string>
-#include "Plugin.h"
-
-/**
- * An abstract class. The class defines an action plugin interface.
- */
-class CAction : public CPlugin
-{
-    public:
-        /**
-         * A Method which performs particular action. As the first parameter it
-         * takes an action directory. It could be either a directory of actual
-         * crash or it could be a directory contains all crashes. It depends on
-         * who call the plugin. The plugin can takes arguments, but the plugin
-         * has to parse them by itself.
-         * @param pActionDir An actual directory.
-         * @param pArgs Plugin's arguments.
-         */
-        virtual void Run(const std::string& pActionDir,
-                         const std::string& pArgs) = 0;
-};
-
-#endif /*ACTION_H_*/
diff -d -urpN abrt.8/lib/MiddleWare/Analyzer.h abrt.9/lib/MiddleWare/Analyzer.h
--- abrt.8/lib/MiddleWare/Analyzer.h	2009-09-04 17:47:35.000000000 +0200
+++ abrt.9/lib/MiddleWare/Analyzer.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,56 +0,0 @@
-/*
-    Analyzer.h - header file for analyzer plugin
-
-    Copyright (C) 2009  Zdenek Prikryl (zprikryl@redhat.com)
-    Copyright (C) 2009  RedHat inc.
-
-    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.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-    */
-
-#ifndef ANALYZER_H_
-#define ANALYZER_H_
-
-#include <string>
-#include "Plugin.h"
-
-/**
- * An abstract class. The class defines an analyzer plugin interface.
- */
-class CAnalyzer : public CPlugin
-{
-    public:
-        /**
-         * A method, which gets a local UUID of particular crash. The local
-         * UUID is usualy computed from data which are stored in debugdump dir.
-         * @param pDebugDumpPath A debugdump dir containing all necessary data.
-         * @return A local UUID.
-         */
-        virtual std::string GetLocalUUID(const std::string& pDebugDumpPath) = 0;
-        /**
-         * A method, which gets a global UUID of particular crash.
-         * @param pDebugDumpPath A debugdump dir containing all necessary data.
-         * @return A global UUID.
-         */
-        virtual std::string GetGlobalUUID(const std::string& pDebugDumpPath) = 0;
-        /**
-         * A method, which takes care of getting all additional data needed
-         * for computing UUIDs and creating a report. This report could be send
-         * somewhere afterwards.
-         * @param pDebugDumpPath A debugdump dir containing all necessary data.
-         */
-        virtual void CreateReport(const std::string& pDebugDumpPath) = 0;
-};
-
-#endif /*ANALYZER_H_*/
diff -d -urpN abrt.8/lib/MiddleWare/Database.h abrt.9/lib/MiddleWare/Database.h
--- abrt.8/lib/MiddleWare/Database.h	2009-09-08 15:42:11.000000000 +0200
+++ abrt.9/lib/MiddleWare/Database.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,126 +0,0 @@
-/*
-    Database.h - header file for database plugin
-
-    Copyright (C) 2009  Zdenek Prikryl (zprikryl@redhat.com)
-    Copyright (C) 2009  RedHat inc.
-
-    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.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-    */
-
-
-#ifndef DATABASE_H_
-#define DATABASE_H_
-
-#include <string>
-#include <vector>
-#include "Plugin.h"
-
-/**
- * Table
- * =====
- * UUID | UID| DebugDumpPath | Count | Reported | Time | Message
- *
- * primary key (UUID, UID)
- */
-
-#define DATABASE_COLUMN_UUID            "UUID"
-#define DATABASE_COLUMN_UID             "UID"
-#define DATABASE_COLUMN_DEBUG_DUMP_PATH "DebugDumpPath"
-#define DATABASE_COLUMN_COUNT           "Count"
-#define DATABASE_COLUMN_REPORTED        "Reported"
-#define DATABASE_COLUMN_TIME            "Time"
-#define DATABASE_COLUMN_MESSAGE         "Message"
-
-/**
- * A struct contains one database row.
- */
-typedef struct SDatabaseRow
-{
-    std::string m_sUUID; /**< A local UUID.*/
-    std::string m_sUID; /**< An UID of an user.*/
-    std::string m_sDebugDumpDir; /**< A debugdump directory of a crash.*/
-    std::string m_sCount; /**< Crash rate.*/
-    std::string m_sReported; /**< Is a row reported?*/
-    std::string m_sMessage; /**< if a row is reported, then there can be store message abotu that*/
-    std::string m_sTime; /**< Time of last occurred crash with same local UUID*/
-} database_row_t;
-
-/**
- * A vector contains one or more database rows.
- */
-typedef std::vector<database_row_t> vector_database_rows_t;
-
-/**
- * An abstract class. The class defines a database plugin interface.
- */
-class CDatabase : public CPlugin
-{
-    public:
-        /**
-         * A method, which connects to a database.
-         */
-        virtual void Connect() = 0;
-        /**
-         * A method, which disconnects from a database.
-         */
-        virtual void DisConnect() = 0;
-        /**
-         * A method, which inserts one row to a database.
-         * @param pUUID A local UUID of a crash.
-         * @param pUID An UID of an user.
-         * @param pDebugDumpPath A debugdump path.
-         * @param pTime Time when a crash occurs.
-         */
-        virtual void Insert(const std::string& pUUID,
-                            const std::string& pUID,
-                            const std::string& pDebugDumpPath,
-                            const std::string& pTime) = 0;
-        /**
-         * A method, which deletes one row in a database.
-         * @param pUUID A lodal UUID of a crash.
-         * @param pUID An UID of an user.
-         */
-        virtual void Delete(const std::string& pUUID,
-                            const std::string& pUID) = 0;
-        /**
-         * A method, which sets that particular row was reported.
-         * @param pUUID A local UUID of a crash.
-         * @param pUID An UID of an user.
-         * @param pMessga A text explanation of reported problem (where
-         * it is stored etc...
-         */
-        virtual void SetReported(const std::string& pUUID,
-                                 const std::string& pUID,
-                                 const std::string& pMessage) = 0;
-        /**
-         * A method, which gets all rows which belongs to particular user.
-         * If the user is root, then all rows are returned. If there are no
-         * rows, empty vector is returned.
-         * @param pUID An UID of an user.
-         * @return A vector of matched rows.
-         */
-        virtual vector_database_rows_t GetUIDData(const std::string& pUID) = 0;
-        /**
-         * A method, which returns one row accordind to UUID of a crash and
-         * UID of an user. If there are no row, empty row is returned.
-         * @param pUUID A UUID of a crash.
-         * @param pUID An UID of an user.
-         * @return A matched row.
-         */
-        virtual database_row_t GetUUIDData(const std::string& pUUID,
-                                                 const std::string& pUID) = 0;
-};
-
-#endif /* DATABASE_H_ */
diff -d -urpN abrt.8/lib/MiddleWare/Makefile.am abrt.9/lib/MiddleWare/Makefile.am
--- abrt.8/lib/MiddleWare/Makefile.am	2009-09-04 17:47:35.000000000 +0200
+++ abrt.9/lib/MiddleWare/Makefile.am	1970-01-01 01:00:00.000000000 +0100
@@ -1,34 +0,0 @@
-lib_LTLIBRARIES = libABRTMiddleWare.la
-
-libABRTMiddleWare_la_SOURCES = \
-    Plugin.cpp Plugin.h \
-    Action.h Database.h Reporter.h Analyzer.h
-libABRTMiddleWare_la_LIBADD = \
-    $(DL_LIBS) \
-    ../Utils/libABRTUtils.la \
-    $(RPM_LIBS)
-libABRTMiddleWare_la_LDFLAGS = -version-info 0:1:0
-libABRTMiddleWare_la_CPPFLAGS = \
-    -I$(srcdir)/../../inc \
-    -I$(srcdir)/../Utils \
-    -I$(srcdir)/../CommLayer \
-    $(RPM_CFLAGS)
-
-# disabled: MiddleWare.* is moved to src/Daemon/ now
-#
-#check_PROGRAMS = test
-#
-#test_SOURCES = test.cpp
-#test_LDADD = \
-#    ../Utils/libABRTUtils.la \
-#    ../CommLayer/libABRTCommLayer.la \
-#    libABRTMiddleWare.la \
-#    $(DL_LIBS) $(RPM_LIBS)
-#test_CPPFLAGS = \
-#    -I$(srcdir)/../../inc \
-#    -I$(srcdir)/../Utils \
-#    -I$(srcdir)/../CommLayer\
-#    -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-#    -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
-#    -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-#    -DCONF_DIR=\"$(CONF_DIR)\"
diff -d -urpN abrt.8/lib/MiddleWare/Plugin.cpp abrt.9/lib/MiddleWare/Plugin.cpp
--- abrt.8/lib/MiddleWare/Plugin.cpp	2009-09-04 17:47:35.000000000 +0200
+++ abrt.9/lib/MiddleWare/Plugin.cpp	1970-01-01 01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-/*
-    Copyright (C) 2009  Zdenek Prikryl (zprikryl@redhat.com)
-    Copyright (C) 2009  RedHat inc.
-
-    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.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-    */
-
-#include "Plugin.h"
-
-/* class CPlugin's virtuals */
-CPlugin::~CPlugin() {}
-void CPlugin::Init() {}
-void CPlugin::DeInit() {}
-void CPlugin::SetSettings(const map_plugin_settings_t& pSettings) {}
-map_plugin_settings_t CPlugin::GetSettings() {return map_plugin_settings_t();}
diff -d -urpN abrt.8/lib/MiddleWare/Plugin.h abrt.9/lib/MiddleWare/Plugin.h
--- abrt.8/lib/MiddleWare/Plugin.h	2009-09-04 17:47:35.000000000 +0200
+++ abrt.9/lib/MiddleWare/Plugin.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,118 +0,0 @@
-/*
-    Plugin.h - header file for plugin. It contains mandatory macros
-               and common function for plugins
-
-    Copyright (C) 2009  Zdenek Prikryl (zprikryl@redhat.com)
-    Copyright (C) 2009  RedHat inc.
-
-    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.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-    */
-
-#ifndef PLUGIN_H_
-#define PLUGIN_H_
-
-#include "abrt_types.h"
-
-#define PLUGINS_MAGIC_NUMBER 6
-
-#define PLUGINS_CONF_EXTENSION "conf"
-#define PLUGINS_LIB_EXTENSION "so"
-#define PLUGINS_LIB_PREFIX "lib"
-
-#if HAVE_CONFIG_H
-    #include <config.h>
-#endif
-
-#if ENABLE_NLS
-    #include <libintl.h>
-    #define _(S) gettext(S)
-#else
-    #define _(S) (S)
-#endif
-
-/**
- * An abstract class. The class defines a common plugin interface. If a plugin
- * has some settings, then a *Settings(*) method has to be written.
- */
-class CPlugin
-{
-    public:
-        /**
-         * A destructor.
-         */
-        virtual ~CPlugin();
-        /**
-         * A method, which initializes a plugin. It is not mandatory method.
-         */
-        virtual void Init();
-        /**
-         * A method, which deinitializes a plugin. It is not mandatory method.
-         */
-        virtual void DeInit();
-        /**
-         * A method, which takes a settings and apply them. It is not a mandatory method.
-         * @param pSettings Plugin's settings
-         */
-        virtual void SetSettings(const map_plugin_settings_t& pSettings);
-        /**
-         * A method, which return current settings. It is not mandatory method.
-         * @return Plugin's settings
-         */
-        virtual map_plugin_settings_t GetSettings();
-};
-
-/**
- * An enum of plugin types.
- */
-typedef enum {
-    ANALYZER,    /**< An analyzer plugin*/
-    ACTION,      /**< An action plugin*/
-    REPORTER,    /**< A reporter plugin*/
-    DATABASE     /**< A database plugin*/
-} plugin_type_t;
-
-/**
- * A struct contains all needed data about particular plugin.
- */
-typedef struct SPluginInfo
-{
-    const plugin_type_t m_Type;         /**< Plugin type.*/
-    const char *const m_sName;          /**< Plugin name.*/
-    const char *const m_sVersion;       /**< Plugin version.*/
-    const char *const m_sDescription;   /**< Plugin description.*/
-    const char *const m_sEmail;         /**< Plugin author's email.*/
-    const char *const m_sWWW;           /**< Plugin's home page.*/
-    const char *const m_sGTKBuilder;    /**< Plugin's gui description.*/
-    const int m_nMagicNumber;           /**< Plugin magical number.*/
-} plugin_info_t;
-
-#define PLUGIN_INFO(type, plugin_class, name, version, description, email, www, gtk_builder)\
-    extern "C" CPlugin* plugin_new()\
-    {\
-        return new plugin_class();\
-    }\
-    extern "C" const plugin_info_t plugin_info =\
-    {\
-        type,\
-        name,\
-        version,\
-        description,\
-        email,\
-        www,\
-        gtk_builder,\
-        PLUGINS_MAGIC_NUMBER,\
-    };
-
-#endif /* PLUGIN_H_ */
diff -d -urpN abrt.8/lib/MiddleWare/Reporter.h abrt.9/lib/MiddleWare/Reporter.h
--- abrt.8/lib/MiddleWare/Reporter.h	2009-09-04 17:47:35.000000000 +0200
+++ abrt.9/lib/MiddleWare/Reporter.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,47 +0,0 @@
-/*
-    Reporter.h - header file for reporter plugin
-
-    Copyright (C) 2009  Zdenek Prikryl (zprikryl@redhat.com)
-    Copyright (C) 2009  RedHat inc.
-
-    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.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-    */
-
-#ifndef REPORTER_H_
-#define REPORTER_H_
-
-#include <string>
-#include "Plugin.h"
-#include "CrashTypes.h"
-
-/**
- * An abstract class. The class defines a reporter plugin interface.
- */
-class CReporter : public CPlugin
-{
-    public:
-        /**
-         * A method, which reports a crash report to particular receiver.
-         * The plugin can takes arguments, but the plugin  has to parse them
-         * by itself.
-         * @param pCrashReport A crash report.
-         * @param pArgs Plugin's arguments.
-         * @retun A message which can be displayed after a report is created.
-         */
-        virtual std::string Report(const map_crash_report_t& pCrashReport,
-                                   const std::string& pArgs) = 0;
-};
-
-#endif /* REPORTER_H_ */
diff -d -urpN abrt.8/lib/MiddleWare/test.cpp abrt.9/lib/MiddleWare/test.cpp
--- abrt.8/lib/MiddleWare/test.cpp	2009-09-04 17:47:35.000000000 +0200
+++ abrt.9/lib/MiddleWare/test.cpp	1970-01-01 01:00:00.000000000 +0100
@@ -1,108 +0,0 @@
-/*
-    test.cpp - simple library test
-
-    Copyright (C) 2009  Zdenek Prikryl (zprikryl@redhat.com)
-    Copyright (C) 2009  RedHat inc.
-
-    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.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-    */
-
-#include "MiddleWare.h"
-#include "DebugDump.h"
-#include "CrashTypes.h"
-#include <iostream>
-#include <sys/types.h>
-#include <unistd.h>
-#include <iostream>
-
-
-int main(int argc, char** argv)
-{
-
-    if (argc < 2)
-    {
-        std::cerr << "Usage: " << argv[0] << " <DebugDumpDir>" << std::endl;
-        return -1;
-    }
-    try
-    {
-        CMiddleWare middleWare(PLUGINS_CONF_DIR,
-                               PLUGINS_LIB_DIR);
-        vector_map_string_t loaded_plugins;
-        middleWare.RegisterPlugin("CCpp");
-        middleWare.RegisterPlugin("Mailx");
-        middleWare.RegisterPlugin("Logger");
-        middleWare.RegisterPlugin("RunApp");
-        middleWare.RegisterPlugin("SQLite3");
-        middleWare.SetDatabase("SQLite3");
-        middleWare.SetOpenGPGCheck(false);
-        middleWare.AddActionOrReporter("Logger", "");
-        middleWare.AddAnalyzerActionOrReporter("CCpp", "Mailx", "");
-        middleWare.AddAnalyzerActionOrReporter("CCpp", "RunApp", "date");
-
-        loaded_plugins = middleWare.GetPluginsInfo();
-        std::cout << "Loaded plugins" << std::endl;
-        int ii;
-        for ( ii = 0; ii < loaded_plugins.size(); ii++)
-        {
-            std::cout << "-------------------------------------------" << std::endl;
-            map_plugin_settings_t settings;
-            std::cout << "Enabled: " << loaded_plugins[ii]["Enabled"] << std::endl;
-            std::cout << "Type: " << loaded_plugins[ii]["Type"] << std::endl;
-            std::cout << "Name: " << loaded_plugins[ii]["Name"] << std::endl;
-            std::cout << "Version: " << loaded_plugins[ii]["Version"] << std::endl;
-            std::cout << "Description: " << loaded_plugins[ii]["Description"] << std::endl;
-            std::cout << "Email: " << loaded_plugins[ii]["Email"] << std::endl;
-            std::cout << "WWW: " << loaded_plugins[ii]["WWW"] << std::endl;
-            std::cout << "GTKBuilder: " << loaded_plugins[ii]["GTKBuilder"] << std::endl;
-            if (loaded_plugins[ii]["Enabled"] == "yes")
-            {
-                std::cout << std::endl << "Settings: " << std::endl;
-                settings = middleWare.GetPluginSettings(loaded_plugins[ii]["Name"]);
-                map_plugin_settings_t::iterator it;
-                for (it = settings.begin(); it != settings.end(); it++)
-                {
-                    std::cout << "\t" << it->first << ": " << it->second << std::endl;
-                }
-            }
-            std::cout << "-------------------------------------------" << std::endl;
-        }
-        /* Try to save it into DB */
-        map_crash_info_t crashInfo;
-        if (middleWare.SaveDebugDump(argv[1], crashInfo))
-        {
-            std::cout << "Application Crashed! " <<
-                         crashInfo[CD_PACKAGE][CD_CONTENT] << ", " <<
-                         crashInfo[CD_EXECUTABLE][CD_CONTENT] << ", " <<
-                         crashInfo[CD_COUNT][CD_CONTENT] << ", " << std::endl;
-
-            /* Get Report, so user can change data (remove private stuff)
-             * If we do not want user interaction, just send data immediately
-             */
-            map_crash_report_t crashReport;
-            middleWare.CreateCrashReport(crashInfo[CD_UUID][CD_CONTENT],
-                                         crashInfo[CD_UID][CD_CONTENT],
-                                         crashReport);
-            /* Report crash */
-            middleWare.Report(crashReport);
-        }
-    }
-    catch (std::string sError)
-    {
-        std::cerr << sError << std::endl;
-    }
-
-    return 0;
-}
diff -d -urpN abrt.8/lib/Plugins/Makefile.am abrt.9/lib/Plugins/Makefile.am
--- abrt.8/lib/Plugins/Makefile.am	2009-09-09 13:47:29.000000000 +0200
+++ abrt.9/lib/Plugins/Makefile.am	2009-09-14 16:56:58.110470277 +0200
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../MiddleWare -I$(srcdir)/../Utils -I$(srcdir)/../CommLayer
+AM_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils
 pluginslibdir=$(PLUGINS_LIB_DIR)
 pluginslib_LTLIBRARIES = libCCpp.la \
                          libMailx.la \
@@ -36,39 +36,39 @@ install-data-hook:
 libCCpp_la_SOURCES = CCpp.cpp CCpp.h
 libCCpp_la_LDFLAGS = -avoid-version
 libCCpp_la_LIBADD = $(NSS_LIBS)
-libCCpp_la_CPPFLAGS =  -I$(srcdir)/../CommLayer -I$(srcdir)/../../inc -I$(srcdir)/../MiddleWare -I$(srcdir)/../Utils -DCCPP_HOOK_PATH=\"${libexecdir}/hookCCpp\" -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" $(NSS_CFLAGS)
+libCCpp_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils -DCCPP_HOOK_PATH=\"${libexecdir}/hookCCpp\" -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" $(NSS_CFLAGS)
 
 # Kerneloops
 libKerneloops_la_SOURCES = Kerneloops.cpp Kerneloops.h
 libKerneloops_la_LDFLAGS = -avoid-version
-libKerneloops_la_CPPFLAGS = -I$(srcdir)/../CommLayer -I$(srcdir)/../../inc -I$(srcdir)/../MiddleWare -I$(srcdir)/../Utils
+libKerneloops_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils
 
 # KerneloopsReporter
 libKerneloopsReporter_la_SOURCES = KerneloopsReporter.cpp KerneloopsReporter.h
 libKerneloopsReporter_la_LDFLAGS = -avoid-version
 libKerneloopsReporter_la_LIBADD = $(CURL_LIBS)
-libKerneloopsReporter_la_CPPFLAGS = -I$(srcdir)/../CommLayer -I$(srcdir)/../../inc -I$(srcdir)/../MiddleWare $(CURL_CFLAGS) -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\"
+libKerneloopsReporter_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils $(CURL_CFLAGS) -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\"
 
 # KerneloopsScanner
 libKerneloopsScanner_la_SOURCES = KerneloopsScanner.cpp KerneloopsScanner.h KerneloopsSysLog.cpp KerneloopsSysLog.h
 libKerneloopsScanner_la_LDFLAGS = -avoid-version
-libKerneloopsScanner_la_CPPFLAGS = -I$(srcdir)/../CommLayer -I$(srcdir)/../../inc -I$(srcdir)/../MiddleWare -I$(srcdir)/../Utils -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\"
+libKerneloopsScanner_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\"
 
 # Mailx
 libMailx_la_SOURCES = Mailx.cpp Mailx.h
 libMailx_la_LDFLAGS = -avoid-version
-libMailx_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../MiddleWare -I$(srcdir)/../Utils -I$(srcdir)/../CommLayer -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\"
+libMailx_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\"
 
 # SQLite3
 libSQLite3_la_SOURCES = SQLite3.cpp SQLite3.h
 libSQLite3_la_LDFLAGS = -avoid-version
 libSQLite3_la_LIBADD = $(SQLITE3_LIBS)
-libSQLite3_la_CPPFLAGS = -I$(srcdir)/../CommLayer -I$(srcdir)/../../inc -I$(srcdir)/../MiddleWare -I$(srcdir)/../Utils $(SQLITE3_CFLAGS) -DLOCALSTATEDIR='"$(localstatedir)"'
+libSQLite3_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils $(SQLITE3_CFLAGS) -DLOCALSTATEDIR='"$(localstatedir)"'
 
 # Logger
 libLogger_la_SOURCES = Logger.cpp Logger.h
 libLogger_la_LDFLAGS = -avoid-version
-libLogger_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../MiddleWare -I$(srcdir)/../Utils -I$(srcdir)/../CommLayer -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\"
+libLogger_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\"
 
 # RunApp
 libRunApp_la_SOURCES = RunApp.h RunApp.cpp
@@ -82,22 +82,22 @@ libSOSreport_la_LDFLAGS = -avoid-version
 libBugzilla_la_SOURCES = Bugzilla.h Bugzilla.cpp
 libBugzilla_la_LIBADD = $(XMLRPC_CPP_LIBS) $(XMLRPC_CLIENT_CPP_LIBS) $(NSS_LIBS)
 libBugzilla_la_LDFLAGS = -avoid-version
-libBugzilla_la_CPPFLAGS = $(XMLRPC_CPP_CFLAGS) $(XMLRPC_CLIENT_CPP_CFLAGS) $(NSS_CFLAGS) -I$(srcdir)/../CommLayer -I$(srcdir)/../../inc -I$(srcdir)/../MiddleWare -I$(srcdir)/../Utils -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\"
+libBugzilla_la_CPPFLAGS = $(XMLRPC_CPP_CFLAGS) $(XMLRPC_CLIENT_CPP_CFLAGS) $(NSS_CFLAGS) -I$(srcdir)/../../inc -I$(srcdir)/../Utils -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\"
 
 # TicketUploader
 libTicketUploader_la_SOURCES = TicketUploader.h TicketUploader.cpp
 libTicketUploader_la_LDFLAGS = -avoid-version
 libTicketUploader_la_LIBADD = $(CURL_LIBS)
-libTicketUploader_la_CPPFLAGS = -I$(srcdir)/../CommLayer -I$(srcdir)/../../inc -I$(srcdir)/../MiddleWare -I$(srcdir)/../Utils $(CURL_CFLAGS) -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\"
+libTicketUploader_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils $(CURL_CFLAGS) -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\"
 
 # Python
 libPython_la_SOURCES = Python.h Python.cpp
 #libPython_la_LIBADD = $(NSS_LIBS)
 libPython_la_LDFLAGS = -avoid-version
-libPython_la_CPPFLAGS = $(NSS_CFLAGS) -I$(srcdir)/../CommLayer -I$(srcdir)/../../inc -I$(srcdir)/../MiddleWare -I$(srcdir)/../Utils
+libPython_la_CPPFLAGS = $(NSS_CFLAGS) -I$(srcdir)/../../inc -I$(srcdir)/../Utils
 
 # FileTrasfer
 libFileTransfer_la_SOURCES = FileTransfer.cpp FileTransfer.h
 libFileTransfer_la_LDFLAGS = -avoid-version
 libFileTransfer_la_LIBADD = $(CURL_LIBS)
-libFileTransfer_la_CPPFLAGS = -I$(srcdir)/../CommLayer -I$(srcdir)/../../inc -I$(srcdir)/../MiddleWare -I$(srcdir)/../Utils $(CURL_CFLAGS) -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\"
+libFileTransfer_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils $(CURL_CFLAGS) -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\"
diff -d -urpN abrt.8/lib/Utils/Action.h abrt.9/lib/Utils/Action.h
--- abrt.8/lib/Utils/Action.h	1970-01-01 01:00:00.000000000 +0100
+++ abrt.9/lib/Utils/Action.h	2009-09-04 17:47:35.000000000 +0200
@@ -0,0 +1,47 @@
+/*
+    Action.h - header file for action plugin
+
+    Copyright (C) 2009  Zdenek Prikryl (zprikryl@redhat.com)
+    Copyright (C) 2009  RedHat inc.
+
+    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.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+    */
+
+#ifndef ACTION_H_
+#define ACTION_H_
+
+#include <string>
+#include "Plugin.h"
+
+/**
+ * An abstract class. The class defines an action plugin interface.
+ */
+class CAction : public CPlugin
+{
+    public:
+        /**
+         * A Method which performs particular action. As the first parameter it
+         * takes an action directory. It could be either a directory of actual
+         * crash or it could be a directory contains all crashes. It depends on
+         * who call the plugin. The plugin can takes arguments, but the plugin
+         * has to parse them by itself.
+         * @param pActionDir An actual directory.
+         * @param pArgs Plugin's arguments.
+         */
+        virtual void Run(const std::string& pActionDir,
+                         const std::string& pArgs) = 0;
+};
+
+#endif /*ACTION_H_*/
diff -d -urpN abrt.8/lib/Utils/Analyzer.h abrt.9/lib/Utils/Analyzer.h
--- abrt.8/lib/Utils/Analyzer.h	1970-01-01 01:00:00.000000000 +0100
+++ abrt.9/lib/Utils/Analyzer.h	2009-09-04 17:47:35.000000000 +0200
@@ -0,0 +1,56 @@
+/*
+    Analyzer.h - header file for analyzer plugin
+
+    Copyright (C) 2009  Zdenek Prikryl (zprikryl@redhat.com)
+    Copyright (C) 2009  RedHat inc.
+
+    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.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+    */
+
+#ifndef ANALYZER_H_
+#define ANALYZER_H_
+
+#include <string>
+#include "Plugin.h"
+
+/**
+ * An abstract class. The class defines an analyzer plugin interface.
+ */
+class CAnalyzer : public CPlugin
+{
+    public:
+        /**
+         * A method, which gets a local UUID of particular crash. The local
+         * UUID is usualy computed from data which are stored in debugdump dir.
+         * @param pDebugDumpPath A debugdump dir containing all necessary data.
+         * @return A local UUID.
+         */
+        virtual std::string GetLocalUUID(const std::string& pDebugDumpPath) = 0;
+        /**
+         * A method, which gets a global UUID of particular crash.
+         * @param pDebugDumpPath A debugdump dir containing all necessary data.
+         * @return A global UUID.
+         */
+        virtual std::string GetGlobalUUID(const std::string& pDebugDumpPath) = 0;
+        /**
+         * A method, which takes care of getting all additional data needed
+         * for computing UUIDs and creating a report. This report could be send
+         * somewhere afterwards.
+         * @param pDebugDumpPath A debugdump dir containing all necessary data.
+         */
+        virtual void CreateReport(const std::string& pDebugDumpPath) = 0;
+};
+
+#endif /*ANALYZER_H_*/
diff -d -urpN abrt.8/lib/Utils/CommLayerInner.cpp abrt.9/lib/Utils/CommLayerInner.cpp
--- abrt.8/lib/Utils/CommLayerInner.cpp	1970-01-01 01:00:00.000000000 +0100
+++ abrt.9/lib/Utils/CommLayerInner.cpp	2009-09-08 17:13:38.000000000 +0200
@@ -0,0 +1,69 @@
+#include <pthread.h>
+#include <map>
+#include "abrtlib.h"
+#include "CommLayerInner.h"
+
+static CObserver *s_pObs;
+
+typedef std::map<uint64_t, std::string> map_uint_str_t;
+static map_uint_str_t s_mapClientID;
+static pthread_mutex_t s_map_mutex;
+static bool s_map_mutex_inited;
+
+void init_daemon_logging(CObserver *pObs)
+{
+    s_pObs = pObs;
+    if (!s_map_mutex_inited)
+    {
+        pthread_mutex_init(&s_map_mutex, NULL);
+        s_map_mutex_inited = true;
+    }
+}
+
+void set_client_name(const char* name)
+{
+    uint64_t key = uint64_t(pthread_self());
+
+    pthread_mutex_lock(&s_map_mutex);
+    if (!name)
+        s_mapClientID.erase(key);
+    else
+        s_mapClientID[key] = name;
+    pthread_mutex_unlock(&s_map_mutex);
+}
+
+void warn_client(const std::string& pMessage)
+{
+    if (!s_pObs)
+        return;
+
+    uint64_t key = uint64_t(pthread_self());
+
+    pthread_mutex_lock(&s_map_mutex);
+    map_uint_str_t::const_iterator ki = s_mapClientID.find(key);
+    const char* peer = (ki != s_mapClientID.end() ? ki->second.c_str() : NULL);
+    pthread_mutex_unlock(&s_map_mutex);
+
+    if (peer)
+        s_pObs->Warning(pMessage, peer, key);
+    else /* Bug: someone tries to warn_client() without set_client_name()!? */
+        log("Hmm, stray %s: '%s'", __func__, pMessage.c_str());
+}
+
+void update_client(const std::string& pMessage)
+{
+    if (!s_pObs)
+        return;
+
+    uint64_t key = uint64_t(pthread_self());
+
+    pthread_mutex_lock(&s_map_mutex);
+    map_uint_str_t::const_iterator ki = s_mapClientID.find(key);
+    const char* peer = (ki != s_mapClientID.end() ? ki->second.c_str() : NULL);
+    pthread_mutex_unlock(&s_map_mutex);
+
+    if (peer)
+        s_pObs->Status(pMessage, peer, key);
+    else
+        log("Hmm, stray %s: '%s'", __func__, pMessage.c_str());
+}
diff -d -urpN abrt.8/lib/Utils/CommLayerInner.h abrt.9/lib/Utils/CommLayerInner.h
--- abrt.8/lib/Utils/CommLayerInner.h	1970-01-01 01:00:00.000000000 +0100
+++ abrt.9/lib/Utils/CommLayerInner.h	2009-09-08 17:05:27.000000000 +0200
@@ -0,0 +1,23 @@
+#ifndef COMMLAYERINNER_H_
+#define COMMLAYERINNER_H_
+
+#include "Observer.h"
+
+void init_daemon_logging(CObserver *pObs);
+
+/*
+ * Set client's name (dbus ID). NULL unsets it.
+ */
+void set_client_name(const char* name);
+/* Ask a client to warn the user about a non-fatal, but unexpected condition.
+ * In GUI, it will usually be presented as a popup message.
+ */
+void warn_client(const std::string& pMessage);
+/* Logs a message to a client.
+ * In UI, it will usually appear as a new status line message in GUI,
+ * or as a new message line in CLI.
+ */
+void update_client(const std::string& pMessage);
+
+#endif /* COMMLAYERINNER_H_ */
+
diff -d -urpN abrt.8/lib/Utils/Database.h abrt.9/lib/Utils/Database.h
--- abrt.8/lib/Utils/Database.h	1970-01-01 01:00:00.000000000 +0100
+++ abrt.9/lib/Utils/Database.h	2009-09-08 15:42:11.000000000 +0200
@@ -0,0 +1,126 @@
+/*
+    Database.h - header file for database plugin
+
+    Copyright (C) 2009  Zdenek Prikryl (zprikryl@redhat.com)
+    Copyright (C) 2009  RedHat inc.
+
+    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.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+    */
+
+
+#ifndef DATABASE_H_
+#define DATABASE_H_
+
+#include <string>
+#include <vector>
+#include "Plugin.h"
+
+/**
+ * Table
+ * =====
+ * UUID | UID| DebugDumpPath | Count | Reported | Time | Message
+ *
+ * primary key (UUID, UID)
+ */
+
+#define DATABASE_COLUMN_UUID            "UUID"
+#define DATABASE_COLUMN_UID             "UID"
+#define DATABASE_COLUMN_DEBUG_DUMP_PATH "DebugDumpPath"
+#define DATABASE_COLUMN_COUNT           "Count"
+#define DATABASE_COLUMN_REPORTED        "Reported"
+#define DATABASE_COLUMN_TIME            "Time"
+#define DATABASE_COLUMN_MESSAGE         "Message"
+
+/**
+ * A struct contains one database row.
+ */
+typedef struct SDatabaseRow
+{
+    std::string m_sUUID; /**< A local UUID.*/
+    std::string m_sUID; /**< An UID of an user.*/
+    std::string m_sDebugDumpDir; /**< A debugdump directory of a crash.*/
+    std::string m_sCount; /**< Crash rate.*/
+    std::string m_sReported; /**< Is a row reported?*/
+    std::string m_sMessage; /**< if a row is reported, then there can be store message abotu that*/
+    std::string m_sTime; /**< Time of last occurred crash with same local UUID*/
+} database_row_t;
+
+/**
+ * A vector contains one or more database rows.
+ */
+typedef std::vector<database_row_t> vector_database_rows_t;
+
+/**
+ * An abstract class. The class defines a database plugin interface.
+ */
+class CDatabase : public CPlugin
+{
+    public:
+        /**
+         * A method, which connects to a database.
+         */
+        virtual void Connect() = 0;
+        /**
+         * A method, which disconnects from a database.
+         */
+        virtual void DisConnect() = 0;
+        /**
+         * A method, which inserts one row to a database.
+         * @param pUUID A local UUID of a crash.
+         * @param pUID An UID of an user.
+         * @param pDebugDumpPath A debugdump path.
+         * @param pTime Time when a crash occurs.
+         */
+        virtual void Insert(const std::string& pUUID,
+                            const std::string& pUID,
+                            const std::string& pDebugDumpPath,
+                            const std::string& pTime) = 0;
+        /**
+         * A method, which deletes one row in a database.
+         * @param pUUID A lodal UUID of a crash.
+         * @param pUID An UID of an user.
+         */
+        virtual void Delete(const std::string& pUUID,
+                            const std::string& pUID) = 0;
+        /**
+         * A method, which sets that particular row was reported.
+         * @param pUUID A local UUID of a crash.
+         * @param pUID An UID of an user.
+         * @param pMessga A text explanation of reported problem (where
+         * it is stored etc...
+         */
+        virtual void SetReported(const std::string& pUUID,
+                                 const std::string& pUID,
+                                 const std::string& pMessage) = 0;
+        /**
+         * A method, which gets all rows which belongs to particular user.
+         * If the user is root, then all rows are returned. If there are no
+         * rows, empty vector is returned.
+         * @param pUID An UID of an user.
+         * @return A vector of matched rows.
+         */
+        virtual vector_database_rows_t GetUIDData(const std::string& pUID) = 0;
+        /**
+         * A method, which returns one row accordind to UUID of a crash and
+         * UID of an user. If there are no row, empty row is returned.
+         * @param pUUID A UUID of a crash.
+         * @param pUID An UID of an user.
+         * @return A matched row.
+         */
+        virtual database_row_t GetUUIDData(const std::string& pUUID,
+                                                 const std::string& pUID) = 0;
+};
+
+#endif /* DATABASE_H_ */
diff -d -urpN abrt.8/lib/Utils/DBusClientProxy.cpp abrt.9/lib/Utils/DBusClientProxy.cpp
--- abrt.8/lib/Utils/DBusClientProxy.cpp	1970-01-01 01:00:00.000000000 +0100
+++ abrt.9/lib/Utils/DBusClientProxy.cpp	2009-09-04 17:47:35.000000000 +0200
@@ -0,0 +1,239 @@
+/*
+    Copyright (C) 2009  Jiri Moskovcak (jmoskovc@redhat.com)
+    Copyright (C) 2009  RedHat inc.
+
+    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.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+    */
+
+#include "DBusClientProxy.h"
+#include <iostream>
+
+namespace org {
+namespace freedesktop {
+namespace DBus {
+
+/* class DaemonWatcher_proxy */
+
+/* public: */
+
+DaemonWatcher_proxy::DaemonWatcher_proxy()
+: ::DBus::InterfaceProxy("org.freedesktop.DBus")
+{
+    m_pStateChangeHandler_cb_data = NULL;
+    m_pStateChangeHandler = NULL;
+    connect_signal(DaemonWatcher_proxy, NameOwnerChanged, _DaemonStateChanged);
+}
+
+void DaemonWatcher_proxy::ConnectStateChangeHandler(void (*pStateChangeHandler)(bool running, void* data), void *cb_data)
+{
+    m_pStateChangeHandler_cb_data = cb_data;
+    m_pStateChangeHandler = pStateChangeHandler;
+}
+
+/* private: */
+
+/* unmarshalers (to unpack the DBus message before calling the actual signal handler)
+ */
+void DaemonWatcher_proxy::_DaemonStateChanged(const ::DBus::SignalMessage &sig)
+{
+    ::DBus::MessageIter ri = sig.reader();
+    std::string name;
+    std::string old_owner;
+    std::string new_owner;
+    ri >> name;
+    ri >> old_owner;
+    ri >> new_owner;
+    if(name.compare("com.redhat.abrt") == 0)
+    {
+        if(new_owner.length() > 0)
+        {
+            if(m_pStateChangeHandler)
+            {
+                m_pStateChangeHandler(true,m_pStateChangeHandler_cb_data);
+            }
+            else
+            {
+                std::cout << "Daemon appeared!" << std::endl;
+            }
+        }
+        if(new_owner.length() == 0)
+        {
+            if(m_pStateChangeHandler)
+            {
+                m_pStateChangeHandler(false, m_pStateChangeHandler_cb_data);
+            }
+            else
+            {
+                std::cout << "Daemon dissapeared!" << std::endl;
+            }
+        }
+    }
+}
+
+} } } /* closing namespaces */
+
+
+/* class DaemonWatcher */
+
+/* public: */
+
+DaemonWatcher::DaemonWatcher(DBus::Connection &connection, const char *path, const char *name)
+: ::DBus::ObjectProxy(connection, path, name)
+{
+}
+DaemonWatcher::~DaemonWatcher()
+{
+    std::cout << "~DaemonWatcher" << std::endl;
+}
+
+
+/* class CDBusClient_proxy */
+
+/* public: */
+
+CDBusClient_proxy::CDBusClient_proxy()
+: DBus::InterfaceProxy(CC_DBUS_IFACE)
+{
+    connect_signal(CDBusClient_proxy, Crash, _Crash_stub);
+    connect_signal(CDBusClient_proxy, JobDone, _JobDone_stub);
+    m_sConnName = "";
+}
+
+CDBusClient_proxy::CDBusClient_proxy(::DBus::Connection &pConnection)
+: DBus::InterfaceProxy(CC_DBUS_IFACE)
+{
+    gloop = g_main_loop_new(NULL, false);
+    //# define connect_signal(interface, signal, callback)
+    connect_signal(CDBusClient_proxy, Crash, _Crash_stub);
+    connect_signal(CDBusClient_proxy, JobDone, _JobDone_stub);
+    m_sConnName = pConnection.unique_name();
+}
+
+/* methods exported by this interface,
+ * this functions will invoke the corresponding methods on the remote objects
+ */
+ /*
+
+ <
+  <m_sUUID;m_sUID;m_sCount;m_sExecutable;m_sPackage>
+  <m_sUUID;m_sUID;m_sCount;m_sExecutable;m_sPackage>
+  <m_sUUID;m_sUID;m_sCount;m_sExecutable;m_sPackage>
+  ...
+  >
+  */
+vector_crash_infos_t CDBusClient_proxy::GetCrashInfos()
+{
+    DBus::CallMessage call;
+    DBus::MessageIter wi = call.writer();
+
+    call.member("GetCrashInfos");
+    DBus::Message ret = invoke_method(call);
+    DBus::MessageIter ri = ret.reader();
+
+    vector_crash_infos_t argout;
+    ri >> argout;
+    return argout;
+}
+
+bool CDBusClient_proxy::DeleteDebugDump(const std::string& pUUID)
+{
+    DBus::CallMessage call;
+
+    DBus::MessageIter wi = call.writer();
+
+    wi << pUUID;
+    call.member("DeleteDebugDump");
+    DBus::Message ret = invoke_method(call);
+    DBus::MessageIter ri = ret.reader();
+
+    bool argout;
+    ri >> argout;
+    return argout;
+}
+
+map_crash_report_t CDBusClient_proxy::CreateReport(const std::string& pUUID)
+{
+    m_bJobDone = false;
+    DBus::CallMessage call;
+
+    DBus::MessageIter wi = call.writer();
+
+    wi << pUUID;
+    call.member("CreateReport");
+    DBus::Message ret = invoke_method(call);
+    DBus::MessageIter ri = ret.reader();
+    ri >> m_iPendingJobID;
+    //FIXME: what if the report is created before we start the loop? (we miss the signal and get stuck in the loop)
+    g_main_loop_run(gloop);
+    return GetJobResult(m_iPendingJobID);
+};
+
+void CDBusClient_proxy::Report(const map_crash_report_t& pReport)
+{
+    DBus::CallMessage call;
+
+    DBus::MessageIter wi = call.writer();
+
+    wi << pReport;
+    call.member("Report");
+    DBus::Message ret = invoke_method(call);
+    DBus::MessageIter ri = ret.reader();
+}
+
+map_crash_report_t CDBusClient_proxy::GetJobResult(uint64_t pJobID)
+{
+    DBus::CallMessage call;
+
+    DBus::MessageIter wi = call.writer();
+
+    wi << pJobID;
+    call.member("GetJobResult");
+    DBus::Message ret = invoke_method(call);
+    DBus::MessageIter ri = ret.reader();
+    map_crash_report_t argout;
+    ri >> argout;
+    return argout;
+}
+
+/* signal handlers for this interface
+ */
+void CDBusClient_proxy::Crash(const std::string& progname, const std::string& uid)
+{
+}
+
+/* private: */
+
+/* unmarshalers (to unpack the DBus message before calling the actual signal handler)
+ */
+void CDBusClient_proxy::_Crash_stub(const ::DBus::SignalMessage &sig)
+{
+    DBus::MessageIter ri = sig.reader();
+
+    std::string progname; ri >> progname;
+    std::string uid; ri >> uid;
+    Crash(progname, uid);
+}
+
+void CDBusClient_proxy::_JobDone_stub(const ::DBus::SignalMessage &sig)
+{
+    DBus::MessageIter ri = sig.reader();
+    std::string dest;
+    ri >> dest;
+    if(m_sConnName == dest)
+    {
+        ri >> m_iPendingJobID;
+        g_main_loop_quit(gloop);
+    }
+}
diff -d -urpN abrt.8/lib/Utils/DBusClientProxy.h abrt.9/lib/Utils/DBusClientProxy.h
--- abrt.8/lib/Utils/DBusClientProxy.h	1970-01-01 01:00:00.000000000 +0100
+++ abrt.9/lib/Utils/DBusClientProxy.h	2009-09-04 17:47:35.000000000 +0200
@@ -0,0 +1,108 @@
+/*
+    Copyright (C) 2009  Jiri Moskovcak (jmoskovc@redhat.com)
+    Copyright (C) 2009  RedHat inc.
+
+    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.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+    */
+#ifndef DBUSCLIENTPROXY_H_
+#define DBUSCLIENTPROXY_H_
+
+#include <dbus-c++/dbus.h>
+#include <dbus-c++/glib-integration.h>
+#include "DBusCommon.h"
+
+#define ABRT_NOT_RUNNING 0
+#define ABRT_RUNNING 1
+
+namespace org {
+namespace freedesktop {
+namespace DBus {
+
+class DaemonWatcher_proxy
+: public ::DBus::InterfaceProxy
+{
+private:
+    void *m_pStateChangeHandler_cb_data;
+    void (*m_pStateChangeHandler)(bool running, void* data);
+
+public:
+    DaemonWatcher_proxy();
+    void ConnectStateChangeHandler(void (*pStateChangeHandler)(bool running, void* data), void *cb_data);
+
+private:
+    /* unmarshalers (to unpack the DBus message before calling the actual signal handler)
+     */
+    void _DaemonStateChanged(const ::DBus::SignalMessage &sig);
+};
+
+} } }
+
+
+class DaemonWatcher
+: public org::freedesktop::DBus::DaemonWatcher_proxy,
+  public DBus::IntrospectableProxy,
+  public DBus::ObjectProxy
+{
+public:
+
+    DaemonWatcher(DBus::Connection &connection, const char *path, const char *name);
+    ~DaemonWatcher();
+};
+
+
+class CDBusClient_proxy
+: public DBus::InterfaceProxy
+{
+private:
+    bool m_bJobDone;
+    uint64_t m_iPendingJobID;
+    GMainLoop *gloop;
+    std::string m_sConnName;
+
+public:
+    CDBusClient_proxy();
+    CDBusClient_proxy(::DBus::Connection &pConnection);
+
+public:
+    /* methods exported by this interface,
+     * this functions will invoke the corresponding methods on the remote objects
+     */
+    /*
+     <
+      <m_sUUID;m_sUID;m_sCount;m_sExecutable;m_sPackage>
+      <m_sUUID;m_sUID;m_sCount;m_sExecutable;m_sPackage>
+      <m_sUUID;m_sUID;m_sCount;m_sExecutable;m_sPackage>
+      ...
+      >
+     */
+    vector_crash_infos_t GetCrashInfos();
+    bool DeleteDebugDump(const std::string& pUUID);
+    map_crash_report_t CreateReport(const std::string& pUUID);
+    void Report(const map_crash_report_t& pReport);
+    map_crash_report_t GetJobResult(uint64_t pJobID);
+
+public:
+    /* signal handlers for this interface
+     */
+    virtual void Crash(const std::string& progname, const std::string& uid);
+
+private:
+    /* unmarshalers (to unpack the DBus message before calling the actual signal handler)
+     */
+    void _Crash_stub(const ::DBus::SignalMessage &sig);
+    void _JobDone_stub(const ::DBus::SignalMessage &sig);
+};
+
+#endif
diff -d -urpN abrt.8/lib/Utils/DBusCommon.h abrt.9/lib/Utils/DBusCommon.h
--- abrt.8/lib/Utils/DBusCommon.h	1970-01-01 01:00:00.000000000 +0100
+++ abrt.9/lib/Utils/DBusCommon.h	2009-09-04 17:47:35.000000000 +0200
@@ -0,0 +1,29 @@
+/*
+    Copyright (C) 2009  Jiri Moskovcak (jmoskovc@redhat.com)
+    Copyright (C) 2009  RedHat inc.
+
+    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.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+    */
+
+#ifndef DBUSCOMMON_H_
+#define DBUSCOMMON_H_
+
+#include "CrashTypes.h"
+
+#define CC_DBUS_NAME "com.redhat.abrt"
+#define CC_DBUS_PATH "/com/redhat/abrt"
+#define CC_DBUS_IFACE "com.redhat.abrt"
+
+#endif
diff -d -urpN abrt.8/lib/Utils/Makefile.am abrt.9/lib/Utils/Makefile.am
--- abrt.8/lib/Utils/Makefile.am	2009-09-04 17:47:35.000000000 +0200
+++ abrt.9/lib/Utils/Makefile.am	2009-09-14 16:40:23.265470552 +0200
@@ -1,15 +1,37 @@
 lib_LTLIBRARIES = libABRTUtils.la
-libABRTUtils_la_SOURCES = \
-	DebugDump.cpp DebugDump.h \
-	CrashTypesSocket.cpp \
-	xfuncs.cpp \
-	read_write.cpp \
-	logging.cpp \
-	copyfd.cpp
 
-libABRTUtils_la_LDFLAGS = -version-info 0:1:0
-libABRTUtils_la_LIBADD = -lmagic
-libABRTUtils_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../../lib/CommLayer
+libABRTUtils_la_SOURCES = \
+    xfuncs.cpp \
+    read_write.cpp \
+    logging.cpp \
+    copyfd.cpp \
+    CrashTypesSocket.cpp \
+    DebugDump.h DebugDump.cpp \
+    DBusClientProxy.h DBusClientProxy.cpp \
+    CommLayerInner.h CommLayerInner.cpp \
+    Plugin.h Plugin.cpp \
+    Action.h Database.h Reporter.h Analyzer.h \
+    Observer.h \
+    DBusCommon.h
+libABRTUtils_la_LDFLAGS = \
+    -version-info 0:1:0 \
+    $(DL_LIBS) \
+    $(RPM_LIBS) \
+    $(DBUSCPP_LIBS)
+libABRTUtils_la_LIBADD = \
+    -lmagic
+libABRTUtils_la_CPPFLAGS = \
+    -Wall -Werror \
+    -I$(srcdir)/../../inc \
+    -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
+    -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
+    -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
+    -DCONF_DIR=\"$(CONF_DIR)\" \
+    -DVAR_RUN=\"$(VAR_RUN)\" \
+    $(RPM_CFLAGS) \
+    $(GLIB_CFLAGS) \
+    $(DBUSCPP_CFLAGS) \
+    -D_GNU_SOURCE
 
 install-data-local:
 	$(mkdir_p) '$(DESTDIR)/$(DEBUG_DUMPS_DIR)'
diff -d -urpN abrt.8/lib/Utils/Observer.h abrt.9/lib/Utils/Observer.h
--- abrt.8/lib/Utils/Observer.h	1970-01-01 01:00:00.000000000 +0100
+++ abrt.9/lib/Utils/Observer.h	2009-09-08 17:05:27.000000000 +0200
@@ -0,0 +1,16 @@
+#ifndef OBSERVER_H_
+#define OBSERVER_H_
+
+#include <string>
+#include <iostream>
+#include <stdint.h>
+#include "DBusCommon.h"
+
+class CObserver {
+    public:
+        virtual ~CObserver() {}
+        virtual void Status(const std::string& pMessage, const char* peer, uint64_t pDest) = 0;
+        virtual void Warning(const std::string& pMessage, const char* peer, uint64_t pDest) = 0;
+};
+
+#endif
diff -d -urpN abrt.8/lib/Utils/Plugin.cpp abrt.9/lib/Utils/Plugin.cpp
--- abrt.8/lib/Utils/Plugin.cpp	1970-01-01 01:00:00.000000000 +0100
+++ abrt.9/lib/Utils/Plugin.cpp	2009-09-04 17:47:35.000000000 +0200
@@ -0,0 +1,27 @@
+/*
+    Copyright (C) 2009  Zdenek Prikryl (zprikryl@redhat.com)
+    Copyright (C) 2009  RedHat inc.
+
+    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.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+    */
+
+#include "Plugin.h"
+
+/* class CPlugin's virtuals */
+CPlugin::~CPlugin() {}
+void CPlugin::Init() {}
+void CPlugin::DeInit() {}
+void CPlugin::SetSettings(const map_plugin_settings_t& pSettings) {}
+map_plugin_settings_t CPlugin::GetSettings() {return map_plugin_settings_t();}
diff -d -urpN abrt.8/lib/Utils/Plugin.h abrt.9/lib/Utils/Plugin.h
--- abrt.8/lib/Utils/Plugin.h	1970-01-01 01:00:00.000000000 +0100
+++ abrt.9/lib/Utils/Plugin.h	2009-09-04 17:47:35.000000000 +0200
@@ -0,0 +1,118 @@
+/*
+    Plugin.h - header file for plugin. It contains mandatory macros
+               and common function for plugins
+
+    Copyright (C) 2009  Zdenek Prikryl (zprikryl@redhat.com)
+    Copyright (C) 2009  RedHat inc.
+
+    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.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+    */
+
+#ifndef PLUGIN_H_
+#define PLUGIN_H_
+
+#include "abrt_types.h"
+
+#define PLUGINS_MAGIC_NUMBER 6
+
+#define PLUGINS_CONF_EXTENSION "conf"
+#define PLUGINS_LIB_EXTENSION "so"
+#define PLUGINS_LIB_PREFIX "lib"
+
+#if HAVE_CONFIG_H
+    #include <config.h>
+#endif
+
+#if ENABLE_NLS
+    #include <libintl.h>
+    #define _(S) gettext(S)
+#else
+    #define _(S) (S)
+#endif
+
+/**
+ * An abstract class. The class defines a common plugin interface. If a plugin
+ * has some settings, then a *Settings(*) method has to be written.
+ */
+class CPlugin
+{
+    public:
+        /**
+         * A destructor.
+         */
+        virtual ~CPlugin();
+        /**
+         * A method, which initializes a plugin. It is not mandatory method.
+         */
+        virtual void Init();
+        /**
+         * A method, which deinitializes a plugin. It is not mandatory method.
+         */
+        virtual void DeInit();
+        /**
+         * A method, which takes a settings and apply them. It is not a mandatory method.
+         * @param pSettings Plugin's settings
+         */
+        virtual void SetSettings(const map_plugin_settings_t& pSettings);
+        /**
+         * A method, which return current settings. It is not mandatory method.
+         * @return Plugin's settings
+         */
+        virtual map_plugin_settings_t GetSettings();
+};
+
+/**
+ * An enum of plugin types.
+ */
+typedef enum {
+    ANALYZER,    /**< An analyzer plugin*/
+    ACTION,      /**< An action plugin*/
+    REPORTER,    /**< A reporter plugin*/
+    DATABASE     /**< A database plugin*/
+} plugin_type_t;
+
+/**
+ * A struct contains all needed data about particular plugin.
+ */
+typedef struct SPluginInfo
+{
+    const plugin_type_t m_Type;         /**< Plugin type.*/
+    const char *const m_sName;          /**< Plugin name.*/
+    const char *const m_sVersion;       /**< Plugin version.*/
+    const char *const m_sDescription;   /**< Plugin description.*/
+    const char *const m_sEmail;         /**< Plugin author's email.*/
+    const char *const m_sWWW;           /**< Plugin's home page.*/
+    const char *const m_sGTKBuilder;    /**< Plugin's gui description.*/
+    const int m_nMagicNumber;           /**< Plugin magical number.*/
+} plugin_info_t;
+
+#define PLUGIN_INFO(type, plugin_class, name, version, description, email, www, gtk_builder)\
+    extern "C" CPlugin* plugin_new()\
+    {\
+        return new plugin_class();\
+    }\
+    extern "C" const plugin_info_t plugin_info =\
+    {\
+        type,\
+        name,\
+        version,\
+        description,\
+        email,\
+        www,\
+        gtk_builder,\
+        PLUGINS_MAGIC_NUMBER,\
+    };
+
+#endif /* PLUGIN_H_ */
diff -d -urpN abrt.8/lib/Utils/Reporter.h abrt.9/lib/Utils/Reporter.h
--- abrt.8/lib/Utils/Reporter.h	1970-01-01 01:00:00.000000000 +0100
+++ abrt.9/lib/Utils/Reporter.h	2009-09-04 17:47:35.000000000 +0200
@@ -0,0 +1,47 @@
+/*
+    Reporter.h - header file for reporter plugin
+
+    Copyright (C) 2009  Zdenek Prikryl (zprikryl@redhat.com)
+    Copyright (C) 2009  RedHat inc.
+
+    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.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+    */
+
+#ifndef REPORTER_H_
+#define REPORTER_H_
+
+#include <string>
+#include "Plugin.h"
+#include "CrashTypes.h"
+
+/**
+ * An abstract class. The class defines a reporter plugin interface.
+ */
+class CReporter : public CPlugin
+{
+    public:
+        /**
+         * A method, which reports a crash report to particular receiver.
+         * The plugin can takes arguments, but the plugin  has to parse them
+         * by itself.
+         * @param pCrashReport A crash report.
+         * @param pArgs Plugin's arguments.
+         * @retun A message which can be displayed after a report is created.
+         */
+        virtual std::string Report(const map_crash_report_t& pCrashReport,
+                                   const std::string& pArgs) = 0;
+};
+
+#endif /* REPORTER_H_ */
diff -d -urpN abrt.8/lib/Utils/test.cpp abrt.9/lib/Utils/test.cpp
--- abrt.8/lib/Utils/test.cpp	1970-01-01 01:00:00.000000000 +0100
+++ abrt.9/lib/Utils/test.cpp	2009-09-04 17:47:35.000000000 +0200
@@ -0,0 +1,108 @@
+/*
+    test.cpp - simple library test
+
+    Copyright (C) 2009  Zdenek Prikryl (zprikryl@redhat.com)
+    Copyright (C) 2009  RedHat inc.
+
+    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.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+    */
+
+#include "MiddleWare.h"
+#include "DebugDump.h"
+#include "CrashTypes.h"
+#include <iostream>
+#include <sys/types.h>
+#include <unistd.h>
+#include <iostream>
+
+
+int main(int argc, char** argv)
+{
+
+    if (argc < 2)
+    {
+        std::cerr << "Usage: " << argv[0] << " <DebugDumpDir>" << std::endl;
+        return -1;
+    }
+    try
+    {
+        CMiddleWare middleWare(PLUGINS_CONF_DIR,
+                               PLUGINS_LIB_DIR);
+        vector_map_string_t loaded_plugins;
+        middleWare.RegisterPlugin("CCpp");
+        middleWare.RegisterPlugin("Mailx");
+        middleWare.RegisterPlugin("Logger");
+        middleWare.RegisterPlugin("RunApp");
+        middleWare.RegisterPlugin("SQLite3");
+        middleWare.SetDatabase("SQLite3");
+        middleWare.SetOpenGPGCheck(false);
+        middleWare.AddActionOrReporter("Logger", "");
+        middleWare.AddAnalyzerActionOrReporter("CCpp", "Mailx", "");
+        middleWare.AddAnalyzerActionOrReporter("CCpp", "RunApp", "date");
+
+        loaded_plugins = middleWare.GetPluginsInfo();
+        std::cout << "Loaded plugins" << std::endl;
+        int ii;
+        for ( ii = 0; ii < loaded_plugins.size(); ii++)
+        {
+            std::cout << "-------------------------------------------" << std::endl;
+            map_plugin_settings_t settings;
+            std::cout << "Enabled: " << loaded_plugins[ii]["Enabled"] << std::endl;
+            std::cout << "Type: " << loaded_plugins[ii]["Type"] << std::endl;
+            std::cout << "Name: " << loaded_plugins[ii]["Name"] << std::endl;
+            std::cout << "Version: " << loaded_plugins[ii]["Version"] << std::endl;
+            std::cout << "Description: " << loaded_plugins[ii]["Description"] << std::endl;
+            std::cout << "Email: " << loaded_plugins[ii]["Email"] << std::endl;
+            std::cout << "WWW: " << loaded_plugins[ii]["WWW"] << std::endl;
+            std::cout << "GTKBuilder: " << loaded_plugins[ii]["GTKBuilder"] << std::endl;
+            if (loaded_plugins[ii]["Enabled"] == "yes")
+            {
+                std::cout << std::endl << "Settings: " << std::endl;
+                settings = middleWare.GetPluginSettings(loaded_plugins[ii]["Name"]);
+                map_plugin_settings_t::iterator it;
+                for (it = settings.begin(); it != settings.end(); it++)
+                {
+                    std::cout << "\t" << it->first << ": " << it->second << std::endl;
+                }
+            }
+            std::cout << "-------------------------------------------" << std::endl;
+        }
+        /* Try to save it into DB */
+        map_crash_info_t crashInfo;
+        if (middleWare.SaveDebugDump(argv[1], crashInfo))
+        {
+            std::cout << "Application Crashed! " <<
+                         crashInfo[CD_PACKAGE][CD_CONTENT] << ", " <<
+                         crashInfo[CD_EXECUTABLE][CD_CONTENT] << ", " <<
+                         crashInfo[CD_COUNT][CD_CONTENT] << ", " << std::endl;
+
+            /* Get Report, so user can change data (remove private stuff)
+             * If we do not want user interaction, just send data immediately
+             */
+            map_crash_report_t crashReport;
+            middleWare.CreateCrashReport(crashInfo[CD_UUID][CD_CONTENT],
+                                         crashInfo[CD_UID][CD_CONTENT],
+                                         crashReport);
+            /* Report crash */
+            middleWare.Report(crashReport);
+        }
+    }
+    catch (std::string sError)
+    {
+        std::cerr << sError << std::endl;
+    }
+
+    return 0;
+}
diff -d -urpN abrt.8/src/Applet/Makefile.am abrt.9/src/Applet/Makefile.am
--- abrt.8/src/Applet/Makefile.am	2009-09-14 14:18:33.398470541 +0200
+++ abrt.9/src/Applet/Makefile.am	2009-09-14 17:21:07.776468668 +0200
@@ -7,17 +7,19 @@ abrt_applet_CPPFLAGS = \
     -Wall -Werror \
     -I../Daemon/ \
     -I$(srcdir)/../../inc \
-    -I$(srcdir)/../../lib/CommLayer \
-    -I$(srcdir)/../../lib/MiddleWare \
+    -I$(srcdir)/../../lib/Utils \
+    -I/usr/include/glib-2.0 \
+    -I/usr/lib/glib-2.0/include \
     -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
     -DBIN_DIR=\"$(bindir)\" \
-    $(DBUS_GLIB_CFLAGS) $(GTK_CFLAGS) $(DBUSCPP_CFLAGS) $(LIBNOTIFY_CFLAGS) \
-    -I/usr/include/glib-2.0 \
-    -I/usr/lib/glib-2.0/include
+    $(DBUS_GLIB_CFLAGS) \
+    $(GTK_CFLAGS) \
+    $(DBUSCPP_CFLAGS) \
+    $(LIBNOTIFY_CFLAGS)
 abrt_applet_LDADD = \
-    ../../lib/CommLayer/libABRTCommLayer.la \
-    $(DL_LIBS) $(GTK_LIBS) \
+    ../../lib/Utils/libABRTUtils.la \
     -lglib-2.0 -lgthread-2.0 \
+    $(DL_LIBS) $(GTK_LIBS) \
     $(DBUSCPP_LIBS) $(LIBNOTIFY_LIBS)
 
 EXTRA_DIST = abrt-applet.desktop popup.GtkBuilder
diff -d -urpN abrt.8/src/CLI/Makefile.am abrt.9/src/CLI/Makefile.am
--- abrt.8/src/CLI/Makefile.am	2009-09-14 14:54:32.897470829 +0200
+++ abrt.9/src/CLI/Makefile.am	2009-09-14 16:54:09.611470727 +0200
@@ -3,15 +3,19 @@
 #abrt_cli_CPPFLAGS = -I$(srcdir)/../../inc -DVAR_RUN=\"$(VAR_RUN)\"
 
 bin_PROGRAMS = abrt-cli
+
 abrt_cli_SOURCES = \
     CLI.cpp \
     ABRTSocket.h ABRTSocket.cpp \
     CommLayerClientDBus.h CommLayerClientDBus.cpp
 abrt_cli_CPPFLAGS = \
-    $(DBUS_GLIB_CFLAGS) $(GTK_CFLAGS) $(DBUSCPP_CFLAGS) $(LIBNOTIFY_CFLAGS)\
-    -I$(srcdir)/../../inc -DVAR_RUN=\"$(VAR_RUN)\" \
-    -I$(srcdir)/../../lib/CommLayer \
+    -I$(srcdir)/../../inc \
+    -I$(srcdir)/../../lib/Utils \
+    -DVAR_RUN=\"$(VAR_RUN)\" \
     $(ENABLE_SOCKET_OR_DBUS) \
-    -I../../lib/MiddleWare
-
-abrt_cli_LDADD = ../../lib/CommLayer/libABRTCommLayer.la
+    $(DBUS_GLIB_CFLAGS) \
+    $(GTK_CFLAGS) \
+    $(DBUSCPP_CFLAGS) \
+    $(LIBNOTIFY_CFLAGS)
+abrt_cli_LDADD = \
+    ../../lib/Utils/libABRTUtils.la
diff -d -urpN abrt.8/src/Daemon/Makefile.am abrt.9/src/Daemon/Makefile.am
--- abrt.8/src/Daemon/Makefile.am	2009-09-09 15:33:57.000000000 +0200
+++ abrt.9/src/Daemon/Makefile.am	2009-09-14 17:19:34.959470173 +0200
@@ -1,7 +1,7 @@
 sbin_PROGRAMS = abrtd
 
 # FIXME: we still link against dbus-c++ (not just dbus)
-# because lib/CommLayer links it in
+# because lib/Utils links it in
 
 abrtd_SOURCES = \
     ABRTPlugin.cpp ABRTPlugin.h \
@@ -17,8 +17,6 @@ abrtd_SOURCES = \
     Polkit.h Polkit.cpp
 abrtd_CPPFLAGS = \
     -I$(srcdir)/../../inc \
-    -I$(srcdir)/../../lib/MiddleWare \
-    -I$(srcdir)/../../lib/CommLayer \
     -I$(srcdir)/../../lib/Utils \
     -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
     -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
@@ -28,8 +26,7 @@ abrtd_CPPFLAGS = \
     $(GLIB_CFLAGS) $(DBUS_CFLAGS) \
     $(ENABLE_SOCKET_OR_DBUS) $(POLKIT_CFLAGS)
 abrtd_LDADD = \
-    ../../lib/MiddleWare/libABRTMiddleWare.la \
-    ../../lib/CommLayer/libABRTCommLayer.la \
+    ../../lib/Utils/libABRTUtils.la \
     $(DL_LIBS) $(DBUS_LIBS) $(RPM_LIBS) $(POLKIT_LIBS)
 
 dbusabrtconfdir = ${sysconfdir}/dbus-1/system.d/
diff -d -urpN abrt.8/src/Hooks/Makefile.am abrt.9/src/Hooks/Makefile.am
--- abrt.8/src/Hooks/Makefile.am	2009-09-04 17:47:35.000000000 +0200
+++ abrt.9/src/Hooks/Makefile.am	2009-09-14 17:15:30.444719876 +0200
@@ -10,19 +10,19 @@ hookCCpp_CPPFLAGS = -I$(srcdir)/../../in
                     -DVAR_RUN=\"$(VAR_RUN)\"
 
 # dumpoops
-dumpoops_SOURCES = dumpoops.cpp
-dumpoops_LDADD = ../../lib/Utils/libABRTUtils.la \
-                ../../lib/MiddleWare/libABRTMiddleWare.la \
-                ../../lib/CommLayer/libABRTCommLayer.la
-dumpoops_CPPFLAGS = -I$(srcdir)/../../inc \
-                    -I$(srcdir)/../../lib/Utils \
-                    -I$(srcdir)/../../lib/Plugins \
-                    -I$(srcdir)/../../lib/MiddleWare \
-                    -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-                    -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-                    -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
-                    -DCONF_DIR=\"$(CONF_DIR)\" \
-                    -DVAR_RUN=\"$(VAR_RUN)\"
+dumpoops_SOURCES = \
+    dumpoops.cpp
+dumpoops_LDADD = \
+    ../../lib/Utils/libABRTUtils.la
+dumpoops_CPPFLAGS = \
+    -I$(srcdir)/../../inc \
+    -I$(srcdir)/../../lib/Utils \
+    -I$(srcdir)/../../lib/Plugins \
+    -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
+    -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
+    -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
+    -DCONF_DIR=\"$(CONF_DIR)\" \
+    -DVAR_RUN=\"$(VAR_RUN)\"
 
 python_PYTHON = sitecustomize.py abrt_exception_handler.py
 EXTRA_DIST = abrt_exception_handler.py.in
