summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Roberto de Souza <jose.souza@intel.com>2013-08-30 10:52:04 -0300
committerEduardo Lima (Etrunko) <eduardo.lima@intel.com>2013-10-11 16:52:41 -0300
commitd301daf536becedc8b869b2d918c6d0db73f5bb4 (patch)
treee58114b9d278ada1fd7cdd35b99ae9b58c842ef5
parenta5cfb3e7bbc899043331953d000892b971b314ed (diff)
eldbus: Add timeout message error as a macro
-rw-r--r--src/lib/Eldbus.h1
-rw-r--r--src/lib/eldbus_pending.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/Eldbus.h b/src/lib/Eldbus.h
index e49061d..fe05f2e 100644
--- a/src/lib/Eldbus.h
+++ b/src/lib/Eldbus.h
@@ -126,6 +126,7 @@ extern "C" {
126#define ELDBUS_FDO_INTERFACE_INTROSPECTABLE "org.freedesktop.DBus.Introspectable" 126#define ELDBUS_FDO_INTERFACE_INTROSPECTABLE "org.freedesktop.DBus.Introspectable"
127#define ELDBUS_FDO_INTEFACE_PEER "org.freedesktop.DBus.Peer" 127#define ELDBUS_FDO_INTEFACE_PEER "org.freedesktop.DBus.Peer"
128#define ELDBUS_ERROR_PENDING_CANCELED "org.enlightenment.DBus.Canceled" 128#define ELDBUS_ERROR_PENDING_CANCELED "org.enlightenment.DBus.Canceled"
129#define ELDBUS_ERROR_PENDING_TIMEOUT "org.enlightenment.DBus.Timeout"
129 130
130typedef struct _Eldbus_Version 131typedef struct _Eldbus_Version
131{ 132{
diff --git a/src/lib/eldbus_pending.c b/src/lib/eldbus_pending.c
index 4174ac1..bf561bb 100644
--- a/src/lib/eldbus_pending.c
+++ b/src/lib/eldbus_pending.c
@@ -51,8 +51,8 @@ cb_pending(DBusPendingCall *dbus_pending, void *user_data)
51 INF("timeout to pending %p", pending); 51 INF("timeout to pending %p", pending);
52 dbus_pending_call_cancel(dbus_pending); 52 dbus_pending_call_cancel(dbus_pending);
53 msg = eldbus_message_error_new(pending->msg_sent, 53 msg = eldbus_message_error_new(pending->msg_sent,
54 "org.enlightenment.DBus.Timeout", 54 ELDBUS_ERROR_PENDING_TIMEOUT,
55 "This call was not completed."); 55 "This call was not completed in time.");
56 eldbus_pending_dispatch(pending, msg); 56 eldbus_pending_dispatch(pending, msg);
57 return; 57 return;
58 } 58 }
@@ -218,8 +218,8 @@ eldbus_pending_cancel(Eldbus_Pending *pending)
218 dbus_pending_call_cancel(pending->dbus_pending); 218 dbus_pending_call_cancel(pending->dbus_pending);
219 219
220 error_message = eldbus_message_error_new(pending->msg_sent, 220 error_message = eldbus_message_error_new(pending->msg_sent,
221 ELDBUS_ERROR_PENDING_CANCELED, 221 ELDBUS_ERROR_PENDING_CANCELED,
222 "Canceled by user."); 222 "Canceled by user.");
223 eldbus_pending_dispatch(pending, error_message); 223 eldbus_pending_dispatch(pending, error_message);
224} 224}
225 225