summaryrefslogtreecommitdiffstats
path: root/src/daemon
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2011-04-19 15:43:46 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2011-04-19 15:43:46 +0200
commit6e5688421ab4988e4fc14b340a3931555a02d2c0 (patch)
treee7ed5becc89116445d4b890b43d0a34cc617b060 /src/daemon
parent47ac1ffe396607bb1258afeba4d2b644321c58ed (diff)
downloadabrt-6e5688421ab4988e4fc14b340a3931555a02d2c0.zip
abrt-6e5688421ab4988e4fc14b340a3931555a02d2c0.tar.gz
abrt-6e5688421ab4988e4fc14b340a3931555a02d2c0.tar.xz
remaned some .cpp files to .c in src/daemon/
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/CommLayerServerDBus.c (renamed from src/daemon/CommLayerServerDBus.cpp)14
-rw-r--r--src/daemon/Daemon.cpp3
-rw-r--r--src/daemon/Makefile.am6
-rw-r--r--src/daemon/MiddleWare.c (renamed from src/daemon/MiddleWare.cpp)2
-rw-r--r--src/daemon/MiddleWare.h10
-rw-r--r--src/daemon/Settings.h3
-rw-r--r--src/daemon/comm_layer_inner.c (renamed from src/daemon/comm_layer_inner.cpp)0
7 files changed, 19 insertions, 19 deletions
diff --git a/src/daemon/CommLayerServerDBus.cpp b/src/daemon/CommLayerServerDBus.c
index 3e0a6a7..9d6b6a1 100644
--- a/src/daemon/CommLayerServerDBus.cpp
+++ b/src/daemon/CommLayerServerDBus.c
@@ -29,7 +29,7 @@
*/
/* helpers */
-static DBusMessage* new_signal_msg(const char* member, const char* peer = NULL)
+static DBusMessage* new_signal_msg(const char* member, const char* peer)
{
/* path, interface, member name */
DBusMessage* msg = dbus_message_new_signal(ABRTD_DBUS_PATH, ABRTD_DBUS_IFACE, member);
@@ -59,7 +59,7 @@ void send_dbus_sig_Crash(const char *package_name,
const char *dir,
const char *uid_str
) {
- DBusMessage* msg = new_signal_msg("Crash");
+ DBusMessage* msg = new_signal_msg("Crash", NULL);
if (uid_str)
{
dbus_message_append_args(msg,
@@ -82,7 +82,7 @@ void send_dbus_sig_Crash(const char *package_name,
void send_dbus_sig_QuotaExceeded(const char* str)
{
- DBusMessage* msg = new_signal_msg("QuotaExceeded");
+ DBusMessage* msg = new_signal_msg("QuotaExceeded", NULL);
dbus_message_append_args(msg,
DBUS_TYPE_STRING, &str,
DBUS_TYPE_INVALID);
@@ -113,7 +113,7 @@ void send_dbus_sig_Warning(const char* pMessage, const char* peer)
* DBus call handlers
*/
-static long get_remote_uid(DBusMessage* call, const char** ppSender = NULL)
+static long get_remote_uid(DBusMessage* call, const char** ppSender)
{
DBusError err;
dbus_error_init(&err);
@@ -136,19 +136,19 @@ static int handle_DeleteDebugDump(DBusMessage* call, DBusMessage* reply)
DBusMessageIter in_iter;
dbus_message_iter_init(call, &in_iter);
const char* crash_id;
- r = load_val(&in_iter, crash_id);
+ r = load_charp(&in_iter, &crash_id);
if (r != ABRT_DBUS_LAST_FIELD)
{
error_msg("dbus call %s: parameter type mismatch", __func__ + 7);
return -1;
}
- long unix_uid = get_remote_uid(call);
+ long unix_uid = get_remote_uid(call, NULL);
int32_t result = DeleteDebugDump(crash_id, unix_uid);
DBusMessageIter out_iter;
dbus_message_iter_init_append(reply, &out_iter);
- store_val(&out_iter, result);
+ store_int32(&out_iter, result);
send_flush_and_unref(reply);
return 0;
diff --git a/src/daemon/Daemon.cpp b/src/daemon/Daemon.cpp
index b6735da..3ac53ae 100644
--- a/src/daemon/Daemon.cpp
+++ b/src/daemon/Daemon.cpp
@@ -52,9 +52,6 @@ using namespace std;
*
* DBus methods we have:
* - DeleteDebugDump(crash_id): delete it from DB and delete corresponding /var/spool/abrt/DIR
- * - RegisterPlugin(PluginName): returns void
- * - UnRegisterPlugin(PluginName): returns void
- * - SetSettings(map_abrt_settings_t): returns void
*
* DBus signals we emit:
* - Crash(progname, crash_id, dir, uid) - a new crash occurred (new /var/spool/abrt/DIR is found)
diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am
index df5198b..97e6fb5 100644
--- a/src/daemon/Makefile.am
+++ b/src/daemon/Makefile.am
@@ -10,10 +10,10 @@ sbin_PROGRAMS = \
abrt-server
abrtd_SOURCES = \
- MiddleWare.h MiddleWare.cpp \
- CommLayerServerDBus.h CommLayerServerDBus.cpp \
+ MiddleWare.h MiddleWare.c \
+ CommLayerServerDBus.h CommLayerServerDBus.c \
Settings.h Settings.cpp \
- comm_layer_inner.h comm_layer_inner.cpp \
+ comm_layer_inner.h comm_layer_inner.c \
Daemon.cpp
abrtd_CPPFLAGS = \
-I$(srcdir)/../include/report -I$(srcdir)/../include \
diff --git a/src/daemon/MiddleWare.cpp b/src/daemon/MiddleWare.c
index d0ee40d..cff5d78 100644
--- a/src/daemon/MiddleWare.cpp
+++ b/src/daemon/MiddleWare.c
@@ -24,8 +24,6 @@
#include "CommLayerServerDBus.h"
#include "MiddleWare.h"
-using namespace std;
-
/**
* Get one crash info. If getting is successful,
* then crash info is filled.
diff --git a/src/daemon/MiddleWare.h b/src/daemon/MiddleWare.h
index 4505527..ef246aa 100644
--- a/src/daemon/MiddleWare.h
+++ b/src/daemon/MiddleWare.h
@@ -24,6 +24,10 @@
#include "abrt_types.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* An enum contains all return codes.
*/
@@ -48,6 +52,10 @@ typedef enum {
*/
mw_result_t LoadDebugDump(const char *dump_dir_name, crash_data_t **crash_data);
-int DeleteDebugDump(const char *dump_dir_name, long caller_uid);
+int DeleteDebugDump(const char *dump_dir_name, long caller_uid);
+
+#ifdef __cplusplus
+}
+#endif
#endif /*MIDDLEWARE_H_*/
diff --git a/src/daemon/Settings.h b/src/daemon/Settings.h
index 3f8af8f..a869cfc 100644
--- a/src/daemon/Settings.h
+++ b/src/daemon/Settings.h
@@ -22,9 +22,6 @@
#include "abrt_types.h"
#ifdef __cplusplus
-
-typedef map_map_string_t map_abrt_settings_t;
-
extern "C" {
#endif
diff --git a/src/daemon/comm_layer_inner.cpp b/src/daemon/comm_layer_inner.c
index 7cba1c9..7cba1c9 100644
--- a/src/daemon/comm_layer_inner.cpp
+++ b/src/daemon/comm_layer_inner.c