[Galago-commits] r2832 - in trunk/libgalago: . libgalago
galago-commits at freedesktop.org
galago-commits at freedesktop.org
Sun Jun 11 20:08:33 PDT 2006
Author: chipx86
Date: 2006-06-11 20:08:29 -0700 (Sun, 11 Jun 2006)
New Revision: 2832
Modified:
trunk/libgalago/ChangeLog
trunk/libgalago/libgalago/galago-account.c
trunk/libgalago/libgalago/galago-dbus.c
trunk/libgalago/libgalago/galago-dbus.h
trunk/libgalago/libgalago/galago-person.c
trunk/libgalago/libgalago/galago-service.c
Log:
Push and pop the context inside the D-BUS message sending utility functions, and remove the calls to push/pop that wrap calls to the D-BUS functions in the other files. Saves a few lines..
Modified: trunk/libgalago/ChangeLog
===================================================================
--- trunk/libgalago/ChangeLog 2006-06-12 02:36:22 UTC (rev 2831)
+++ trunk/libgalago/ChangeLog 2006-06-12 03:08:29 UTC (rev 2832)
@@ -1,3 +1,14 @@
+Sun Jun 11 20:05:29 PDT 2006 Christian Hammond <chipx86 at chipx86.com>
+
+ * libgalago/galago-account.c:
+ * libgalago/galago-dbus.c:
+ * libgalago/galago-dbus.h:
+ * libgalago/galago-person.c:
+ * libgalago/galago-service.c:
+ - Push and pop the context inside the D-BUS message sending utility
+ functions, and remove the calls to push/pop that wrap calls to the
+ D-BUS functions in the other files. Saves a few lines..
+
Sun Jun 11 19:36:02 PDT 2006 Christian Hammond <chipx86 at chipx86.com>
* tests/check-libgalago.c:
Modified: trunk/libgalago/libgalago/galago-account.c
===================================================================
--- trunk/libgalago/libgalago/galago-account.c 2006-06-12 02:36:22 UTC (rev 2831)
+++ trunk/libgalago/libgalago/galago-account.c 2006-06-12 03:08:29 UTC (rev 2832)
@@ -934,15 +934,11 @@
if (contact == NULL && query && GALAGO_OBJECT_IS_REMOTE(account) &&
!galago_is_daemon() && galago_is_connected())
{
- galago_context_push(galago_object_get_context(GALAGO_OBJECT(account)));
-
contact = galago_dbus_send_message_with_reply(GALAGO_OBJECT(account),
"GetContact",
galago_value_new_object(GALAGO_TYPE_ACCOUNT, NULL),
galago_value_new(GALAGO_VALUE_TYPE_STRING, &username, NULL),
NULL);
-
- galago_context_pop();
}
return contact;
@@ -974,16 +970,12 @@
{
GList *temp;
- galago_context_push(galago_object_get_context(GALAGO_OBJECT(account)));
-
temp = galago_dbus_send_message_with_reply(GALAGO_OBJECT(account),
"GetContacts",
galago_value_new_list(GALAGO_TYPE_OBJECT, NULL,
(void *)GALAGO_TYPE_ACCOUNT),
NULL);
g_list_free(temp);
-
- galago_context_pop();
}
return account->priv->contacts;
Modified: trunk/libgalago/libgalago/galago-dbus.c
===================================================================
--- trunk/libgalago/libgalago/galago-dbus.c 2006-06-12 02:36:22 UTC (rev 2831)
+++ trunk/libgalago/libgalago/galago-dbus.c 2006-06-12 03:08:29 UTC (rev 2832)
@@ -20,6 +20,7 @@
*/
#include <libgalago/galago-dbus.h>
#include <libgalago/galago-assert.h>
+#include <libgalago/galago-context.h>
#include <libgalago/galago-core.h>
#include <libgalago/galago-status.h>
#include <string.h>
@@ -739,7 +740,10 @@
goto exit;
}
+ galago_context_push(galago_object_get_context(call_data->object));
ret_list = message_reply_received_cb(reply, call_data->return_types);
+ galago_context_pop();
+
call_data->cb(call_data->object, ret_list, call_data->user_data);
/* Hack to prevent this from being freed later. */
@@ -795,7 +799,9 @@
goto exit;
}
+ galago_context_push(galago_object_get_context(object));
ret_list = message_reply_received_cb(reply, return_types);
+ galago_context_pop();
}
else
{
Modified: trunk/libgalago/libgalago/galago-dbus.h
===================================================================
--- trunk/libgalago/libgalago/galago-dbus.h 2006-06-12 02:36:22 UTC (rev 2831)
+++ trunk/libgalago/libgalago/galago-dbus.h 2006-06-12 03:08:29 UTC (rev 2832)
@@ -72,7 +72,7 @@
const char *name,
GCallback cb,
gpointer user_data,
- GalagoValue *cb_param_type_1, ...);
+ GalagoValue *return_value, ...);
void galago_dbus_object_push_full(GalagoObject *object);
Modified: trunk/libgalago/libgalago/galago-person.c
===================================================================
--- trunk/libgalago/libgalago/galago-person.c 2006-06-12 02:36:22 UTC (rev 2831)
+++ trunk/libgalago/libgalago/galago-person.c 2006-06-12 03:08:29 UTC (rev 2832)
@@ -706,13 +706,11 @@
if (query && GALAGO_OBJECT_IS_REMOTE(person) && !galago_is_daemon() &&
galago_is_connected())
{
- galago_context_push(galago_object_get_context(GALAGO_OBJECT(person)));
g_list_free(galago_dbus_send_message_with_reply(GALAGO_OBJECT(person),
"GetAccounts",
galago_value_new_list(GALAGO_VALUE_TYPE_OBJECT, NULL,
(void *)GALAGO_TYPE_ACCOUNT),
NULL));
- galago_context_pop();
}
return person->priv->accounts;
@@ -873,16 +871,12 @@
if (account == NULL && query && GALAGO_OBJECT_IS_REMOTE(person) &&
!galago_is_daemon() && galago_is_connected())
{
- galago_context_push(galago_object_get_context(GALAGO_OBJECT(person)));
-
account = galago_dbus_send_message_with_reply(
GALAGO_OBJECT(person), "GetAccount",
galago_value_new_object(GALAGO_TYPE_ACCOUNT, NULL),
galago_value_new_object(GALAGO_TYPE_SERVICE, G_OBJECT(service)),
galago_value_new(GALAGO_VALUE_TYPE_STRING, &username, NULL),
NULL);
-
- galago_context_pop();
}
return account;
Modified: trunk/libgalago/libgalago/galago-service.c
===================================================================
--- trunk/libgalago/libgalago/galago-service.c 2006-06-12 02:36:22 UTC (rev 2831)
+++ trunk/libgalago/libgalago/galago-service.c 2006-06-12 03:08:29 UTC (rev 2832)
@@ -645,15 +645,11 @@
if (account == NULL && query && GALAGO_OBJECT_IS_REMOTE(service) &&
!galago_is_daemon() && galago_is_connected())
{
- galago_context_push(galago_object_get_context(GALAGO_OBJECT(service)));
-
account = galago_dbus_send_message_with_reply(
GALAGO_OBJECT(service), "GetAccount",
galago_value_new_object(GALAGO_TYPE_ACCOUNT, NULL),
galago_value_new(GALAGO_VALUE_TYPE_STRING, &username, NULL),
NULL);
-
- galago_context_pop();
}
return account;
@@ -780,16 +776,12 @@
{
GList *temp;
- galago_context_push(galago_object_get_context(GALAGO_OBJECT(service)));
-
temp = galago_dbus_send_message_with_reply(
GALAGO_OBJECT(service), "GetAccounts",
galago_value_new_list(GALAGO_VALUE_TYPE_OBJECT, NULL,
(void *)GALAGO_TYPE_ACCOUNT),
NULL);
g_list_free(temp);
-
- galago_context_pop();
}
return service->priv->accounts;
More information about the galago-commits
mailing list