diff options
| author | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-02-19 14:50:19 +0100 |
|---|---|---|
| committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-02-19 14:50:19 +0100 |
| commit | e5fdb1cbef199fd48ed7615cc83383bc55a345fa (patch) | |
| tree | de440078c55cce6be8d0e1f0204903949e957d8f /src/Daemon/CrashWatcher.h | |
| parent | 67a0890956d2c9878e2fdaf078c90551548b765c (diff) | |
| download | abrt-e5fdb1cbef199fd48ed7615cc83383bc55a345fa.tar.gz abrt-e5fdb1cbef199fd48ed7615cc83383bc55a345fa.tar.xz abrt-e5fdb1cbef199fd48ed7615cc83383bc55a345fa.zip | |
Moved dbus backend from dbus lib to daemon - better OO model.
Modified dbus policy config file to allow all users to call daemon's methods
Diffstat (limited to 'src/Daemon/CrashWatcher.h')
| -rw-r--r-- | src/Daemon/CrashWatcher.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/Daemon/CrashWatcher.h b/src/Daemon/CrashWatcher.h index 92ef27f..bb3b3ee 100644 --- a/src/Daemon/CrashWatcher.h +++ b/src/Daemon/CrashWatcher.h @@ -25,7 +25,7 @@ #include <sys/inotify.h> #include <glib.h> //#include "DBusManager.h" -#include "DBusServer.h" +#include "DBusServerProxy.h" #include "MiddleWare.h" // 1024 simultaneous actions @@ -33,6 +33,9 @@ class CCrashWatcher +: public CDBusServer_adaptor, + public DBus::IntrospectableAdaptor, + public DBus::ObjectAdaptor { private: static gboolean handle_event_cb(GIOChannel *gio, GIOCondition condition, gpointer data); @@ -41,21 +44,25 @@ class CCrashWatcher void GStartWatch(); void Lock(); - //CDBusManager m_nDbus_manager; - CDBusServer *m_pDbusServer; int m_nFd; GIOChannel* m_nGio; GMainLoop *m_nMainloop; std::string m_sTarget; CMiddleWare *m_pMW; + DBus::Connection *m_pConn; public: - CCrashWatcher(const std::string& pPath); - //CCrashWatcher(); + CCrashWatcher(const std::string& pPath,DBus::Connection &connection); ~CCrashWatcher(); //run as daemon void Daemonize(); //don't go background - for debug void Run(); + + /* methods exported on dbus */ + public: + dbus_vector_crash_infos_t GetCrashInfos(const std::string &pUID); + dbus_vector_map_crash_infos_t GetCrashInfosMap(const std::string &pUID); + }; #endif /*CRASHWATCHER_H_*/ |
