2007-07-14 02:44:01 +00:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
2003-05-16 20:09:25 +00:00
|
|
|
/* dbus-print-message.h Utility function to print out a message
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2003 Philip Blundell <philb@gnu.org>
|
|
|
|
|
* Copyright (C) 2003 Red Hat, 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
|
2009-07-10 19:32:38 -04:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2003-05-16 20:09:25 +00:00
|
|
|
*
|
|
|
|
|
*/
|
2010-03-19 12:36:49 +01:00
|
|
|
|
|
|
|
|
#include <config.h>
|
2003-05-16 20:09:25 +00:00
|
|
|
#include "dbus-print-message.h"
|
|
|
|
|
|
2009-10-28 19:40:38 +00:00
|
|
|
#include <stdlib.h>
|
2010-03-22 11:50:24 -04:00
|
|
|
#include "config.h"
|
2009-10-28 19:40:38 +00:00
|
|
|
|
2003-08-11 02:11:58 +00:00
|
|
|
static const char*
|
|
|
|
|
type_to_name (int message_type)
|
|
|
|
|
{
|
|
|
|
|
switch (message_type)
|
|
|
|
|
{
|
|
|
|
|
case DBUS_MESSAGE_TYPE_SIGNAL:
|
|
|
|
|
return "signal";
|
|
|
|
|
case DBUS_MESSAGE_TYPE_METHOD_CALL:
|
|
|
|
|
return "method call";
|
|
|
|
|
case DBUS_MESSAGE_TYPE_METHOD_RETURN:
|
|
|
|
|
return "method return";
|
|
|
|
|
case DBUS_MESSAGE_TYPE_ERROR:
|
|
|
|
|
return "error";
|
|
|
|
|
default:
|
|
|
|
|
return "(unknown message type)";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2009-09-09 20:58:53 +01:00
|
|
|
#define INDENT 3
|
2006-04-16 18:14:51 +00:00
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
indent (int depth)
|
|
|
|
|
{
|
|
|
|
|
while (depth-- > 0)
|
2009-09-09 20:58:53 +01:00
|
|
|
printf (" "); /* INDENT spaces. */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2009-10-28 19:40:38 +00:00
|
|
|
print_hex (unsigned char *bytes, unsigned int len, int depth)
|
2009-09-09 20:58:53 +01:00
|
|
|
{
|
2010-06-07 15:46:33 +02:00
|
|
|
unsigned int i, columns;
|
2009-09-09 20:58:53 +01:00
|
|
|
|
|
|
|
|
printf ("array of bytes [\n");
|
|
|
|
|
|
|
|
|
|
indent (depth + 1);
|
|
|
|
|
|
|
|
|
|
/* Each byte takes 3 cells (two hexits, and a space), except the last one. */
|
|
|
|
|
columns = (80 - ((depth + 1) * INDENT)) / 3;
|
|
|
|
|
|
|
|
|
|
if (columns < 8)
|
|
|
|
|
columns = 8;
|
|
|
|
|
|
2009-10-28 19:40:38 +00:00
|
|
|
i = 0;
|
2009-09-09 20:58:53 +01:00
|
|
|
|
2009-10-28 19:40:38 +00:00
|
|
|
while (i < len)
|
2009-09-09 20:58:53 +01:00
|
|
|
{
|
2009-10-28 19:40:38 +00:00
|
|
|
printf ("%02x", bytes[i]);
|
|
|
|
|
i++;
|
2009-09-09 20:58:53 +01:00
|
|
|
|
2009-10-28 19:40:38 +00:00
|
|
|
if (i != len)
|
2009-09-09 20:58:53 +01:00
|
|
|
{
|
2009-10-28 19:40:38 +00:00
|
|
|
if (i % columns == 0)
|
2009-09-09 20:58:53 +01:00
|
|
|
{
|
|
|
|
|
printf ("\n");
|
|
|
|
|
indent (depth + 1);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
printf (" ");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
printf ("\n");
|
|
|
|
|
indent (depth);
|
|
|
|
|
printf ("]\n");
|
2006-04-16 18:14:51 +00:00
|
|
|
}
|
|
|
|
|
|
2009-10-28 19:40:38 +00:00
|
|
|
#define DEFAULT_SIZE 100
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
print_ay (DBusMessageIter *iter, int depth)
|
|
|
|
|
{
|
|
|
|
|
/* Not using DBusString because it's not public API. It's 2009, and I'm
|
|
|
|
|
* manually growing a string chunk by chunk.
|
|
|
|
|
*/
|
|
|
|
|
unsigned char *bytes = malloc (DEFAULT_SIZE + 1);
|
|
|
|
|
unsigned int len = 0;
|
|
|
|
|
unsigned int max = DEFAULT_SIZE;
|
|
|
|
|
dbus_bool_t all_ascii = TRUE;
|
|
|
|
|
int current_type;
|
|
|
|
|
|
|
|
|
|
while ((current_type = dbus_message_iter_get_arg_type (iter))
|
|
|
|
|
!= DBUS_TYPE_INVALID)
|
|
|
|
|
{
|
|
|
|
|
unsigned char val;
|
|
|
|
|
|
|
|
|
|
dbus_message_iter_get_basic (iter, &val);
|
|
|
|
|
bytes[len] = val;
|
|
|
|
|
len++;
|
|
|
|
|
|
|
|
|
|
if (val < 32 || val > 126)
|
|
|
|
|
all_ascii = FALSE;
|
|
|
|
|
|
|
|
|
|
if (len == max)
|
|
|
|
|
{
|
|
|
|
|
max *= 2;
|
|
|
|
|
bytes = realloc (bytes, max + 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dbus_message_iter_next (iter);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (all_ascii)
|
|
|
|
|
{
|
|
|
|
|
bytes[len] = '\0';
|
|
|
|
|
printf ("array of bytes \"%s\"\n", bytes);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
print_hex (bytes, len, depth);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
free (bytes);
|
|
|
|
|
}
|
|
|
|
|
|
2005-05-11 18:48:24 +00:00
|
|
|
static void
|
2005-07-06 Colin Walters <walters@verbum.org>
* dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
(DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
(dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
Delete in favor of dbus_g_proxy_begin_call and
dbus_g_proxy_cancel_call.
(DBusGProxyCall, DBusGProxyCallNotify): New.
(dbus_g_proxy_begin_call): Change prototype to take callback, user
data, and destroy function. This replaces
dbus_g_pending_call_set_notify.
(dbus_g_proxy_cancel_call): Prototype.
(DBusGAsyncData): Delete, shouldn't be needed anymore.
* glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
pending_calls map.
(struct _DBusGProxyManager): Add bus_proxy member, which is an
internal proxy for calls to the bus. Remove
pending_nameowner_calls, now the internal proxy keeps track.
(dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
pending_nameowner_calls.
(got_name_owner_cb): Update prototype, and use
dbus_g_proxy_end_call.
(got_name_owner_cb): Remove reference to pending_nameowner_calls.
(dbus_g_proxy_manager_register): Delete directly libdbus code in
favor of using internal proxy.
(dbus_g_proxy_manager_unregister): Update to use
dbus_g_proxy_cancel_call for any pending GetNameOwner call.
(dbus_g_proxy_init): Initialize pending calls map.
(dbus_g_proxy_constructor): New.
(dbus_g_proxy_class_init): Add get/set property functions,
constructor, and add NAME, PATH, and INTERFACE properties.
(cancel_pending_call): New function.
(dbus_g_proxy_dispose): Iterate over any outstanding calls and
cancel them.
(dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
(GPendingNotifyClosure): New structure.
(d_pending_call_notify, d_pending_call_free): Moved here from
dbus-glib.c.
(DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
ordering.
(manager_begin_bus_call): New internal function for talking to
internal bus proxy.
(dbus_g_proxy_new): Construct object using GObjet properties.
(dbus_g_proxy_begin_call_internal): Update to take user data, etc.
Create closure of same, and insert call into map of pending calls.
(dbus_g_proxy_end_call_internal): Take call id instead of pending
call. Look up pending call in current set. Remove it when we've
completed.
(dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
(dbus_g_proxy_begin_call): Change API to take callback, user data,
and destroy function directly.
(dbus_g_proxy_end_call): Update to take DBusGProxyCall.
(dbus_g_proxy_call): Invoke with NULL callback.
(dbus_g_proxy_cancel_call): New function, replaces
dbus_g_pending_call_cancel.
* glib/dbus-gparser.c (validate_signature): Fix call to
dbus_set_g_error.
* glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
New quark for attaching metadata to GType.
(info_hash): Delete.
(lookup_object_info): Look up using quark.
(dbus_g_object_type_install_info): Check that a type is classed,
not that it's an object. Also just install type data using quark
instead of using global hash.
* glib/dbus-glib.c (dbus_g_pending_call_ref)
(dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
(GPendingNotifyClosure): Delete.
(d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
* glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
client method generation until we can fix it...
* tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
(load_from_service_thread_func): Ditto.
* tools/dbus-names-model.c (struct NamesModel): Hold
DBusGProxyCall.
(have_names_notify): Update prototype, use
dbus_g_proxy_cancel_call.
(names_model_reload): Update for new dbus_g_proxy_begin_call API.
* tools/dbus-monitor.c (filter_func): Update for print_message
API change.
* test/glib/test-dbus-glib.c: Add more tests for async
invocations. Update many begin_call/end_call pairs to just use
dbus_g_proxy_call.
* tools/dbus-send.c (main): Add --print-reply=literal mode. This
allows us to dump print-introspect.c.
* tools/dbus-print-message.h (print_message): Add literal argument
to print_message which is intended to allow printing arguments without
metadata like "string=".
* tools/dbus-print-message.c (print_iter): Add literal argument.
(print_message): Allow printing string messages literally.
2005-07-06 21:27:53 +00:00
|
|
|
print_iter (DBusMessageIter *iter, dbus_bool_t literal, int depth)
|
2005-05-11 18:48:24 +00:00
|
|
|
{
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
int type = dbus_message_iter_get_arg_type (iter);
|
|
|
|
|
|
|
|
|
|
if (type == DBUS_TYPE_INVALID)
|
|
|
|
|
break;
|
2006-04-16 18:14:51 +00:00
|
|
|
|
|
|
|
|
indent(depth);
|
2005-05-11 18:48:24 +00:00
|
|
|
|
|
|
|
|
switch (type)
|
|
|
|
|
{
|
|
|
|
|
case DBUS_TYPE_STRING:
|
2006-04-16 18:14:51 +00:00
|
|
|
{
|
|
|
|
|
char *val;
|
|
|
|
|
dbus_message_iter_get_basic (iter, &val);
|
|
|
|
|
if (!literal)
|
|
|
|
|
printf ("string \"");
|
|
|
|
|
printf ("%s", val);
|
|
|
|
|
if (!literal)
|
|
|
|
|
printf ("\"\n");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case DBUS_TYPE_SIGNATURE:
|
|
|
|
|
{
|
|
|
|
|
char *val;
|
|
|
|
|
dbus_message_iter_get_basic (iter, &val);
|
|
|
|
|
if (!literal)
|
|
|
|
|
printf ("signature \"");
|
|
|
|
|
printf ("%s", val);
|
|
|
|
|
if (!literal)
|
|
|
|
|
printf ("\"\n");
|
|
|
|
|
break;
|
|
|
|
|
}
|
2005-05-11 18:48:24 +00:00
|
|
|
|
2006-03-10 17:29:48 +00:00
|
|
|
case DBUS_TYPE_OBJECT_PATH:
|
2006-04-16 18:14:51 +00:00
|
|
|
{
|
|
|
|
|
char *val;
|
|
|
|
|
dbus_message_iter_get_basic (iter, &val);
|
|
|
|
|
if (!literal)
|
|
|
|
|
printf ("object path \"");
|
|
|
|
|
printf ("%s", val);
|
|
|
|
|
if (!literal)
|
|
|
|
|
printf ("\"\n");
|
|
|
|
|
break;
|
|
|
|
|
}
|
2006-03-10 17:29:48 +00:00
|
|
|
|
2006-04-16 18:14:51 +00:00
|
|
|
case DBUS_TYPE_INT16:
|
|
|
|
|
{
|
|
|
|
|
dbus_int16_t val;
|
|
|
|
|
dbus_message_iter_get_basic (iter, &val);
|
|
|
|
|
printf ("int16 %d\n", val);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case DBUS_TYPE_UINT16:
|
|
|
|
|
{
|
|
|
|
|
dbus_uint16_t val;
|
|
|
|
|
dbus_message_iter_get_basic (iter, &val);
|
|
|
|
|
printf ("uint16 %u\n", val);
|
|
|
|
|
break;
|
|
|
|
|
}
|
2006-03-10 17:29:48 +00:00
|
|
|
|
2005-05-11 18:48:24 +00:00
|
|
|
case DBUS_TYPE_INT32:
|
2006-04-16 18:14:51 +00:00
|
|
|
{
|
|
|
|
|
dbus_int32_t val;
|
|
|
|
|
dbus_message_iter_get_basic (iter, &val);
|
|
|
|
|
printf ("int32 %d\n", val);
|
|
|
|
|
break;
|
|
|
|
|
}
|
2005-05-11 18:48:24 +00:00
|
|
|
|
|
|
|
|
case DBUS_TYPE_UINT32:
|
2006-04-16 18:14:51 +00:00
|
|
|
{
|
|
|
|
|
dbus_uint32_t val;
|
|
|
|
|
dbus_message_iter_get_basic (iter, &val);
|
|
|
|
|
printf ("uint32 %u\n", val);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case DBUS_TYPE_INT64:
|
|
|
|
|
{
|
|
|
|
|
dbus_int64_t val;
|
|
|
|
|
dbus_message_iter_get_basic (iter, &val);
|
2010-03-22 11:50:24 -04:00
|
|
|
#ifdef DBUS_INT64_PRINTF_MODIFIER
|
2010-03-22 14:33:37 -04:00
|
|
|
printf ("int64 %" DBUS_INT64_PRINTF_MODIFIER "d\n", val);
|
|
|
|
|
#else
|
|
|
|
|
printf ("int64 (omitted)\n");
|
2010-03-22 11:50:24 -04:00
|
|
|
#endif
|
2006-04-16 18:14:51 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case DBUS_TYPE_UINT64:
|
|
|
|
|
{
|
|
|
|
|
dbus_uint64_t val;
|
|
|
|
|
dbus_message_iter_get_basic (iter, &val);
|
2010-03-22 11:50:24 -04:00
|
|
|
#ifdef DBUS_INT64_PRINTF_MODIFIER
|
2010-03-22 14:33:37 -04:00
|
|
|
printf ("uint64 %" DBUS_INT64_PRINTF_MODIFIER "u\n", val);
|
|
|
|
|
#else
|
|
|
|
|
printf ("uint64 (omitted)\n");
|
2010-03-22 11:50:24 -04:00
|
|
|
#endif
|
2006-04-16 18:14:51 +00:00
|
|
|
break;
|
|
|
|
|
}
|
2005-05-11 18:48:24 +00:00
|
|
|
|
|
|
|
|
case DBUS_TYPE_DOUBLE:
|
2006-04-16 18:14:51 +00:00
|
|
|
{
|
|
|
|
|
double val;
|
|
|
|
|
dbus_message_iter_get_basic (iter, &val);
|
|
|
|
|
printf ("double %g\n", val);
|
|
|
|
|
break;
|
|
|
|
|
}
|
2005-05-11 18:48:24 +00:00
|
|
|
|
|
|
|
|
case DBUS_TYPE_BYTE:
|
2006-04-16 18:14:51 +00:00
|
|
|
{
|
|
|
|
|
unsigned char val;
|
|
|
|
|
dbus_message_iter_get_basic (iter, &val);
|
|
|
|
|
printf ("byte %d\n", val);
|
|
|
|
|
break;
|
|
|
|
|
}
|
2005-05-11 18:48:24 +00:00
|
|
|
|
|
|
|
|
case DBUS_TYPE_BOOLEAN:
|
2006-04-16 18:14:51 +00:00
|
|
|
{
|
|
|
|
|
dbus_bool_t val;
|
|
|
|
|
dbus_message_iter_get_basic (iter, &val);
|
|
|
|
|
printf ("boolean %s\n", val ? "true" : "false");
|
|
|
|
|
break;
|
|
|
|
|
}
|
2005-05-11 18:48:24 +00:00
|
|
|
|
|
|
|
|
case DBUS_TYPE_VARIANT:
|
|
|
|
|
{
|
|
|
|
|
DBusMessageIter subiter;
|
|
|
|
|
|
|
|
|
|
dbus_message_iter_recurse (iter, &subiter);
|
|
|
|
|
|
2006-04-16 18:14:51 +00:00
|
|
|
printf ("variant ");
|
|
|
|
|
print_iter (&subiter, literal, depth+1);
|
2005-05-11 18:48:24 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case DBUS_TYPE_ARRAY:
|
|
|
|
|
{
|
|
|
|
|
int current_type;
|
|
|
|
|
DBusMessageIter subiter;
|
|
|
|
|
|
|
|
|
|
dbus_message_iter_recurse (iter, &subiter);
|
|
|
|
|
|
2009-09-09 20:35:13 +01:00
|
|
|
current_type = dbus_message_iter_get_arg_type (&subiter);
|
|
|
|
|
|
2009-09-09 20:58:53 +01:00
|
|
|
if (current_type == DBUS_TYPE_BYTE)
|
|
|
|
|
{
|
|
|
|
|
print_ay (&subiter, depth);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
2006-04-16 18:14:51 +00:00
|
|
|
printf("array [\n");
|
2009-09-09 20:35:13 +01:00
|
|
|
while (current_type != DBUS_TYPE_INVALID)
|
2005-05-11 18:48:24 +00:00
|
|
|
{
|
2006-04-16 18:14:51 +00:00
|
|
|
print_iter (&subiter, literal, depth+1);
|
2009-09-09 20:35:13 +01:00
|
|
|
|
2005-05-11 18:48:24 +00:00
|
|
|
dbus_message_iter_next (&subiter);
|
2009-09-09 20:35:13 +01:00
|
|
|
current_type = dbus_message_iter_get_arg_type (&subiter);
|
|
|
|
|
|
|
|
|
|
if (current_type != DBUS_TYPE_INVALID)
|
2005-05-11 18:48:24 +00:00
|
|
|
printf (",");
|
|
|
|
|
}
|
2006-04-16 18:14:51 +00:00
|
|
|
indent(depth);
|
|
|
|
|
printf("]\n");
|
2005-05-11 18:48:24 +00:00
|
|
|
break;
|
|
|
|
|
}
|
2005-06-16 04:48:10 +00:00
|
|
|
case DBUS_TYPE_DICT_ENTRY:
|
|
|
|
|
{
|
|
|
|
|
DBusMessageIter subiter;
|
|
|
|
|
|
|
|
|
|
dbus_message_iter_recurse (iter, &subiter);
|
|
|
|
|
|
2006-04-16 18:14:51 +00:00
|
|
|
printf("dict entry(\n");
|
|
|
|
|
print_iter (&subiter, literal, depth+1);
|
2005-06-16 04:48:10 +00:00
|
|
|
dbus_message_iter_next (&subiter);
|
2006-04-16 18:14:51 +00:00
|
|
|
print_iter (&subiter, literal, depth+1);
|
|
|
|
|
indent(depth);
|
|
|
|
|
printf(")\n");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case DBUS_TYPE_STRUCT:
|
|
|
|
|
{
|
|
|
|
|
int current_type;
|
|
|
|
|
DBusMessageIter subiter;
|
|
|
|
|
|
|
|
|
|
dbus_message_iter_recurse (iter, &subiter);
|
|
|
|
|
|
|
|
|
|
printf("struct {\n");
|
|
|
|
|
while ((current_type = dbus_message_iter_get_arg_type (&subiter)) != DBUS_TYPE_INVALID)
|
|
|
|
|
{
|
|
|
|
|
print_iter (&subiter, literal, depth+1);
|
|
|
|
|
dbus_message_iter_next (&subiter);
|
|
|
|
|
if (dbus_message_iter_get_arg_type (&subiter) != DBUS_TYPE_INVALID)
|
|
|
|
|
printf (",");
|
|
|
|
|
}
|
|
|
|
|
indent(depth);
|
|
|
|
|
printf("}\n");
|
2005-06-16 04:48:10 +00:00
|
|
|
break;
|
|
|
|
|
}
|
2005-05-11 18:48:24 +00:00
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
printf (" (dbus-monitor too dumb to decipher arg type '%c')\n", type);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
} while (dbus_message_iter_next (iter));
|
|
|
|
|
}
|
|
|
|
|
|
2003-05-16 20:09:25 +00:00
|
|
|
void
|
2005-07-06 Colin Walters <walters@verbum.org>
* dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
(DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
(dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
Delete in favor of dbus_g_proxy_begin_call and
dbus_g_proxy_cancel_call.
(DBusGProxyCall, DBusGProxyCallNotify): New.
(dbus_g_proxy_begin_call): Change prototype to take callback, user
data, and destroy function. This replaces
dbus_g_pending_call_set_notify.
(dbus_g_proxy_cancel_call): Prototype.
(DBusGAsyncData): Delete, shouldn't be needed anymore.
* glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
pending_calls map.
(struct _DBusGProxyManager): Add bus_proxy member, which is an
internal proxy for calls to the bus. Remove
pending_nameowner_calls, now the internal proxy keeps track.
(dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
pending_nameowner_calls.
(got_name_owner_cb): Update prototype, and use
dbus_g_proxy_end_call.
(got_name_owner_cb): Remove reference to pending_nameowner_calls.
(dbus_g_proxy_manager_register): Delete directly libdbus code in
favor of using internal proxy.
(dbus_g_proxy_manager_unregister): Update to use
dbus_g_proxy_cancel_call for any pending GetNameOwner call.
(dbus_g_proxy_init): Initialize pending calls map.
(dbus_g_proxy_constructor): New.
(dbus_g_proxy_class_init): Add get/set property functions,
constructor, and add NAME, PATH, and INTERFACE properties.
(cancel_pending_call): New function.
(dbus_g_proxy_dispose): Iterate over any outstanding calls and
cancel them.
(dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
(GPendingNotifyClosure): New structure.
(d_pending_call_notify, d_pending_call_free): Moved here from
dbus-glib.c.
(DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
ordering.
(manager_begin_bus_call): New internal function for talking to
internal bus proxy.
(dbus_g_proxy_new): Construct object using GObjet properties.
(dbus_g_proxy_begin_call_internal): Update to take user data, etc.
Create closure of same, and insert call into map of pending calls.
(dbus_g_proxy_end_call_internal): Take call id instead of pending
call. Look up pending call in current set. Remove it when we've
completed.
(dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
(dbus_g_proxy_begin_call): Change API to take callback, user data,
and destroy function directly.
(dbus_g_proxy_end_call): Update to take DBusGProxyCall.
(dbus_g_proxy_call): Invoke with NULL callback.
(dbus_g_proxy_cancel_call): New function, replaces
dbus_g_pending_call_cancel.
* glib/dbus-gparser.c (validate_signature): Fix call to
dbus_set_g_error.
* glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
New quark for attaching metadata to GType.
(info_hash): Delete.
(lookup_object_info): Look up using quark.
(dbus_g_object_type_install_info): Check that a type is classed,
not that it's an object. Also just install type data using quark
instead of using global hash.
* glib/dbus-glib.c (dbus_g_pending_call_ref)
(dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
(GPendingNotifyClosure): Delete.
(d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
* glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
client method generation until we can fix it...
* tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
(load_from_service_thread_func): Ditto.
* tools/dbus-names-model.c (struct NamesModel): Hold
DBusGProxyCall.
(have_names_notify): Update prototype, use
dbus_g_proxy_cancel_call.
(names_model_reload): Update for new dbus_g_proxy_begin_call API.
* tools/dbus-monitor.c (filter_func): Update for print_message
API change.
* test/glib/test-dbus-glib.c: Add more tests for async
invocations. Update many begin_call/end_call pairs to just use
dbus_g_proxy_call.
* tools/dbus-send.c (main): Add --print-reply=literal mode. This
allows us to dump print-introspect.c.
* tools/dbus-print-message.h (print_message): Add literal argument
to print_message which is intended to allow printing arguments without
metadata like "string=".
* tools/dbus-print-message.c (print_iter): Add literal argument.
(print_message): Allow printing string messages literally.
2005-07-06 21:27:53 +00:00
|
|
|
print_message (DBusMessage *message, dbus_bool_t literal)
|
2003-05-16 20:09:25 +00:00
|
|
|
{
|
|
|
|
|
DBusMessageIter iter;
|
|
|
|
|
const char *sender;
|
2005-01-30 07:44:08 +00:00
|
|
|
const char *destination;
|
2003-08-11 02:11:58 +00:00
|
|
|
int message_type;
|
2003-05-16 20:09:25 +00:00
|
|
|
|
2003-08-11 02:11:58 +00:00
|
|
|
message_type = dbus_message_get_type (message);
|
2005-01-30 07:44:08 +00:00
|
|
|
sender = dbus_message_get_sender (message);
|
|
|
|
|
destination = dbus_message_get_destination (message);
|
2005-07-06 Colin Walters <walters@verbum.org>
* dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
(DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
(dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
Delete in favor of dbus_g_proxy_begin_call and
dbus_g_proxy_cancel_call.
(DBusGProxyCall, DBusGProxyCallNotify): New.
(dbus_g_proxy_begin_call): Change prototype to take callback, user
data, and destroy function. This replaces
dbus_g_pending_call_set_notify.
(dbus_g_proxy_cancel_call): Prototype.
(DBusGAsyncData): Delete, shouldn't be needed anymore.
* glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
pending_calls map.
(struct _DBusGProxyManager): Add bus_proxy member, which is an
internal proxy for calls to the bus. Remove
pending_nameowner_calls, now the internal proxy keeps track.
(dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
pending_nameowner_calls.
(got_name_owner_cb): Update prototype, and use
dbus_g_proxy_end_call.
(got_name_owner_cb): Remove reference to pending_nameowner_calls.
(dbus_g_proxy_manager_register): Delete directly libdbus code in
favor of using internal proxy.
(dbus_g_proxy_manager_unregister): Update to use
dbus_g_proxy_cancel_call for any pending GetNameOwner call.
(dbus_g_proxy_init): Initialize pending calls map.
(dbus_g_proxy_constructor): New.
(dbus_g_proxy_class_init): Add get/set property functions,
constructor, and add NAME, PATH, and INTERFACE properties.
(cancel_pending_call): New function.
(dbus_g_proxy_dispose): Iterate over any outstanding calls and
cancel them.
(dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
(GPendingNotifyClosure): New structure.
(d_pending_call_notify, d_pending_call_free): Moved here from
dbus-glib.c.
(DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
ordering.
(manager_begin_bus_call): New internal function for talking to
internal bus proxy.
(dbus_g_proxy_new): Construct object using GObjet properties.
(dbus_g_proxy_begin_call_internal): Update to take user data, etc.
Create closure of same, and insert call into map of pending calls.
(dbus_g_proxy_end_call_internal): Take call id instead of pending
call. Look up pending call in current set. Remove it when we've
completed.
(dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
(dbus_g_proxy_begin_call): Change API to take callback, user data,
and destroy function directly.
(dbus_g_proxy_end_call): Update to take DBusGProxyCall.
(dbus_g_proxy_call): Invoke with NULL callback.
(dbus_g_proxy_cancel_call): New function, replaces
dbus_g_pending_call_cancel.
* glib/dbus-gparser.c (validate_signature): Fix call to
dbus_set_g_error.
* glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
New quark for attaching metadata to GType.
(info_hash): Delete.
(lookup_object_info): Look up using quark.
(dbus_g_object_type_install_info): Check that a type is classed,
not that it's an object. Also just install type data using quark
instead of using global hash.
* glib/dbus-glib.c (dbus_g_pending_call_ref)
(dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
(GPendingNotifyClosure): Delete.
(d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
* glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
client method generation until we can fix it...
* tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
(load_from_service_thread_func): Ditto.
* tools/dbus-names-model.c (struct NamesModel): Hold
DBusGProxyCall.
(have_names_notify): Update prototype, use
dbus_g_proxy_cancel_call.
(names_model_reload): Update for new dbus_g_proxy_begin_call API.
* tools/dbus-monitor.c (filter_func): Update for print_message
API change.
* test/glib/test-dbus-glib.c: Add more tests for async
invocations. Update many begin_call/end_call pairs to just use
dbus_g_proxy_call.
* tools/dbus-send.c (main): Add --print-reply=literal mode. This
allows us to dump print-introspect.c.
* tools/dbus-print-message.h (print_message): Add literal argument
to print_message which is intended to allow printing arguments without
metadata like "string=".
* tools/dbus-print-message.c (print_iter): Add literal argument.
(print_message): Allow printing string messages literally.
2005-07-06 21:27:53 +00:00
|
|
|
|
|
|
|
|
if (!literal)
|
2003-08-18 22:43:30 +00:00
|
|
|
{
|
2005-07-06 Colin Walters <walters@verbum.org>
* dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
(DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
(dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
Delete in favor of dbus_g_proxy_begin_call and
dbus_g_proxy_cancel_call.
(DBusGProxyCall, DBusGProxyCallNotify): New.
(dbus_g_proxy_begin_call): Change prototype to take callback, user
data, and destroy function. This replaces
dbus_g_pending_call_set_notify.
(dbus_g_proxy_cancel_call): Prototype.
(DBusGAsyncData): Delete, shouldn't be needed anymore.
* glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
pending_calls map.
(struct _DBusGProxyManager): Add bus_proxy member, which is an
internal proxy for calls to the bus. Remove
pending_nameowner_calls, now the internal proxy keeps track.
(dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
pending_nameowner_calls.
(got_name_owner_cb): Update prototype, and use
dbus_g_proxy_end_call.
(got_name_owner_cb): Remove reference to pending_nameowner_calls.
(dbus_g_proxy_manager_register): Delete directly libdbus code in
favor of using internal proxy.
(dbus_g_proxy_manager_unregister): Update to use
dbus_g_proxy_cancel_call for any pending GetNameOwner call.
(dbus_g_proxy_init): Initialize pending calls map.
(dbus_g_proxy_constructor): New.
(dbus_g_proxy_class_init): Add get/set property functions,
constructor, and add NAME, PATH, and INTERFACE properties.
(cancel_pending_call): New function.
(dbus_g_proxy_dispose): Iterate over any outstanding calls and
cancel them.
(dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
(GPendingNotifyClosure): New structure.
(d_pending_call_notify, d_pending_call_free): Moved here from
dbus-glib.c.
(DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
ordering.
(manager_begin_bus_call): New internal function for talking to
internal bus proxy.
(dbus_g_proxy_new): Construct object using GObjet properties.
(dbus_g_proxy_begin_call_internal): Update to take user data, etc.
Create closure of same, and insert call into map of pending calls.
(dbus_g_proxy_end_call_internal): Take call id instead of pending
call. Look up pending call in current set. Remove it when we've
completed.
(dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
(dbus_g_proxy_begin_call): Change API to take callback, user data,
and destroy function directly.
(dbus_g_proxy_end_call): Update to take DBusGProxyCall.
(dbus_g_proxy_call): Invoke with NULL callback.
(dbus_g_proxy_cancel_call): New function, replaces
dbus_g_pending_call_cancel.
* glib/dbus-gparser.c (validate_signature): Fix call to
dbus_set_g_error.
* glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
New quark for attaching metadata to GType.
(info_hash): Delete.
(lookup_object_info): Look up using quark.
(dbus_g_object_type_install_info): Check that a type is classed,
not that it's an object. Also just install type data using quark
instead of using global hash.
* glib/dbus-glib.c (dbus_g_pending_call_ref)
(dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
(GPendingNotifyClosure): Delete.
(d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
* glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
client method generation until we can fix it...
* tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
(load_from_service_thread_func): Ditto.
* tools/dbus-names-model.c (struct NamesModel): Hold
DBusGProxyCall.
(have_names_notify): Update prototype, use
dbus_g_proxy_cancel_call.
(names_model_reload): Update for new dbus_g_proxy_begin_call API.
* tools/dbus-monitor.c (filter_func): Update for print_message
API change.
* test/glib/test-dbus-glib.c: Add more tests for async
invocations. Update many begin_call/end_call pairs to just use
dbus_g_proxy_call.
* tools/dbus-send.c (main): Add --print-reply=literal mode. This
allows us to dump print-introspect.c.
* tools/dbus-print-message.h (print_message): Add literal argument
to print_message which is intended to allow printing arguments without
metadata like "string=".
* tools/dbus-print-message.c (print_iter): Add literal argument.
(print_message): Allow printing string messages literally.
2005-07-06 21:27:53 +00:00
|
|
|
printf ("%s sender=%s -> dest=%s",
|
|
|
|
|
type_to_name (message_type),
|
|
|
|
|
sender ? sender : "(null sender)",
|
|
|
|
|
destination ? destination : "(null destination)");
|
|
|
|
|
|
|
|
|
|
switch (message_type)
|
|
|
|
|
{
|
|
|
|
|
case DBUS_MESSAGE_TYPE_METHOD_CALL:
|
|
|
|
|
case DBUS_MESSAGE_TYPE_SIGNAL:
|
2008-08-29 08:48:45 -04:00
|
|
|
printf (" serial=%u path=%s; interface=%s; member=%s\n",
|
|
|
|
|
dbus_message_get_serial (message),
|
2006-06-14 11:26:41 +00:00
|
|
|
dbus_message_get_path (message),
|
2005-07-06 Colin Walters <walters@verbum.org>
* dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
(DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
(dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
Delete in favor of dbus_g_proxy_begin_call and
dbus_g_proxy_cancel_call.
(DBusGProxyCall, DBusGProxyCallNotify): New.
(dbus_g_proxy_begin_call): Change prototype to take callback, user
data, and destroy function. This replaces
dbus_g_pending_call_set_notify.
(dbus_g_proxy_cancel_call): Prototype.
(DBusGAsyncData): Delete, shouldn't be needed anymore.
* glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
pending_calls map.
(struct _DBusGProxyManager): Add bus_proxy member, which is an
internal proxy for calls to the bus. Remove
pending_nameowner_calls, now the internal proxy keeps track.
(dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
pending_nameowner_calls.
(got_name_owner_cb): Update prototype, and use
dbus_g_proxy_end_call.
(got_name_owner_cb): Remove reference to pending_nameowner_calls.
(dbus_g_proxy_manager_register): Delete directly libdbus code in
favor of using internal proxy.
(dbus_g_proxy_manager_unregister): Update to use
dbus_g_proxy_cancel_call for any pending GetNameOwner call.
(dbus_g_proxy_init): Initialize pending calls map.
(dbus_g_proxy_constructor): New.
(dbus_g_proxy_class_init): Add get/set property functions,
constructor, and add NAME, PATH, and INTERFACE properties.
(cancel_pending_call): New function.
(dbus_g_proxy_dispose): Iterate over any outstanding calls and
cancel them.
(dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
(GPendingNotifyClosure): New structure.
(d_pending_call_notify, d_pending_call_free): Moved here from
dbus-glib.c.
(DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
ordering.
(manager_begin_bus_call): New internal function for talking to
internal bus proxy.
(dbus_g_proxy_new): Construct object using GObjet properties.
(dbus_g_proxy_begin_call_internal): Update to take user data, etc.
Create closure of same, and insert call into map of pending calls.
(dbus_g_proxy_end_call_internal): Take call id instead of pending
call. Look up pending call in current set. Remove it when we've
completed.
(dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
(dbus_g_proxy_begin_call): Change API to take callback, user data,
and destroy function directly.
(dbus_g_proxy_end_call): Update to take DBusGProxyCall.
(dbus_g_proxy_call): Invoke with NULL callback.
(dbus_g_proxy_cancel_call): New function, replaces
dbus_g_pending_call_cancel.
* glib/dbus-gparser.c (validate_signature): Fix call to
dbus_set_g_error.
* glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
New quark for attaching metadata to GType.
(info_hash): Delete.
(lookup_object_info): Look up using quark.
(dbus_g_object_type_install_info): Check that a type is classed,
not that it's an object. Also just install type data using quark
instead of using global hash.
* glib/dbus-glib.c (dbus_g_pending_call_ref)
(dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
(GPendingNotifyClosure): Delete.
(d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
* glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
client method generation until we can fix it...
* tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
(load_from_service_thread_func): Ditto.
* tools/dbus-names-model.c (struct NamesModel): Hold
DBusGProxyCall.
(have_names_notify): Update prototype, use
dbus_g_proxy_cancel_call.
(names_model_reload): Update for new dbus_g_proxy_begin_call API.
* tools/dbus-monitor.c (filter_func): Update for print_message
API change.
* test/glib/test-dbus-glib.c: Add more tests for async
invocations. Update many begin_call/end_call pairs to just use
dbus_g_proxy_call.
* tools/dbus-send.c (main): Add --print-reply=literal mode. This
allows us to dump print-introspect.c.
* tools/dbus-print-message.h (print_message): Add literal argument
to print_message which is intended to allow printing arguments without
metadata like "string=".
* tools/dbus-print-message.c (print_iter): Add literal argument.
(print_message): Allow printing string messages literally.
2005-07-06 21:27:53 +00:00
|
|
|
dbus_message_get_interface (message),
|
|
|
|
|
dbus_message_get_member (message));
|
|
|
|
|
break;
|
2003-08-18 22:43:30 +00:00
|
|
|
|
2005-07-06 Colin Walters <walters@verbum.org>
* dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
(DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
(dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
Delete in favor of dbus_g_proxy_begin_call and
dbus_g_proxy_cancel_call.
(DBusGProxyCall, DBusGProxyCallNotify): New.
(dbus_g_proxy_begin_call): Change prototype to take callback, user
data, and destroy function. This replaces
dbus_g_pending_call_set_notify.
(dbus_g_proxy_cancel_call): Prototype.
(DBusGAsyncData): Delete, shouldn't be needed anymore.
* glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
pending_calls map.
(struct _DBusGProxyManager): Add bus_proxy member, which is an
internal proxy for calls to the bus. Remove
pending_nameowner_calls, now the internal proxy keeps track.
(dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
pending_nameowner_calls.
(got_name_owner_cb): Update prototype, and use
dbus_g_proxy_end_call.
(got_name_owner_cb): Remove reference to pending_nameowner_calls.
(dbus_g_proxy_manager_register): Delete directly libdbus code in
favor of using internal proxy.
(dbus_g_proxy_manager_unregister): Update to use
dbus_g_proxy_cancel_call for any pending GetNameOwner call.
(dbus_g_proxy_init): Initialize pending calls map.
(dbus_g_proxy_constructor): New.
(dbus_g_proxy_class_init): Add get/set property functions,
constructor, and add NAME, PATH, and INTERFACE properties.
(cancel_pending_call): New function.
(dbus_g_proxy_dispose): Iterate over any outstanding calls and
cancel them.
(dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
(GPendingNotifyClosure): New structure.
(d_pending_call_notify, d_pending_call_free): Moved here from
dbus-glib.c.
(DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
ordering.
(manager_begin_bus_call): New internal function for talking to
internal bus proxy.
(dbus_g_proxy_new): Construct object using GObjet properties.
(dbus_g_proxy_begin_call_internal): Update to take user data, etc.
Create closure of same, and insert call into map of pending calls.
(dbus_g_proxy_end_call_internal): Take call id instead of pending
call. Look up pending call in current set. Remove it when we've
completed.
(dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
(dbus_g_proxy_begin_call): Change API to take callback, user data,
and destroy function directly.
(dbus_g_proxy_end_call): Update to take DBusGProxyCall.
(dbus_g_proxy_call): Invoke with NULL callback.
(dbus_g_proxy_cancel_call): New function, replaces
dbus_g_pending_call_cancel.
* glib/dbus-gparser.c (validate_signature): Fix call to
dbus_set_g_error.
* glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
New quark for attaching metadata to GType.
(info_hash): Delete.
(lookup_object_info): Look up using quark.
(dbus_g_object_type_install_info): Check that a type is classed,
not that it's an object. Also just install type data using quark
instead of using global hash.
* glib/dbus-glib.c (dbus_g_pending_call_ref)
(dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
(GPendingNotifyClosure): Delete.
(d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
* glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
client method generation until we can fix it...
* tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
(load_from_service_thread_func): Ditto.
* tools/dbus-names-model.c (struct NamesModel): Hold
DBusGProxyCall.
(have_names_notify): Update prototype, use
dbus_g_proxy_cancel_call.
(names_model_reload): Update for new dbus_g_proxy_begin_call API.
* tools/dbus-monitor.c (filter_func): Update for print_message
API change.
* test/glib/test-dbus-glib.c: Add more tests for async
invocations. Update many begin_call/end_call pairs to just use
dbus_g_proxy_call.
* tools/dbus-send.c (main): Add --print-reply=literal mode. This
allows us to dump print-introspect.c.
* tools/dbus-print-message.h (print_message): Add literal argument
to print_message which is intended to allow printing arguments without
metadata like "string=".
* tools/dbus-print-message.c (print_iter): Add literal argument.
(print_message): Allow printing string messages literally.
2005-07-06 21:27:53 +00:00
|
|
|
case DBUS_MESSAGE_TYPE_METHOD_RETURN:
|
2007-03-10 19:52:30 +00:00
|
|
|
printf (" reply_serial=%u\n",
|
|
|
|
|
dbus_message_get_reply_serial (message));
|
2005-07-06 Colin Walters <walters@verbum.org>
* dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
(DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
(dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
Delete in favor of dbus_g_proxy_begin_call and
dbus_g_proxy_cancel_call.
(DBusGProxyCall, DBusGProxyCallNotify): New.
(dbus_g_proxy_begin_call): Change prototype to take callback, user
data, and destroy function. This replaces
dbus_g_pending_call_set_notify.
(dbus_g_proxy_cancel_call): Prototype.
(DBusGAsyncData): Delete, shouldn't be needed anymore.
* glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
pending_calls map.
(struct _DBusGProxyManager): Add bus_proxy member, which is an
internal proxy for calls to the bus. Remove
pending_nameowner_calls, now the internal proxy keeps track.
(dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
pending_nameowner_calls.
(got_name_owner_cb): Update prototype, and use
dbus_g_proxy_end_call.
(got_name_owner_cb): Remove reference to pending_nameowner_calls.
(dbus_g_proxy_manager_register): Delete directly libdbus code in
favor of using internal proxy.
(dbus_g_proxy_manager_unregister): Update to use
dbus_g_proxy_cancel_call for any pending GetNameOwner call.
(dbus_g_proxy_init): Initialize pending calls map.
(dbus_g_proxy_constructor): New.
(dbus_g_proxy_class_init): Add get/set property functions,
constructor, and add NAME, PATH, and INTERFACE properties.
(cancel_pending_call): New function.
(dbus_g_proxy_dispose): Iterate over any outstanding calls and
cancel them.
(dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
(GPendingNotifyClosure): New structure.
(d_pending_call_notify, d_pending_call_free): Moved here from
dbus-glib.c.
(DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
ordering.
(manager_begin_bus_call): New internal function for talking to
internal bus proxy.
(dbus_g_proxy_new): Construct object using GObjet properties.
(dbus_g_proxy_begin_call_internal): Update to take user data, etc.
Create closure of same, and insert call into map of pending calls.
(dbus_g_proxy_end_call_internal): Take call id instead of pending
call. Look up pending call in current set. Remove it when we've
completed.
(dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
(dbus_g_proxy_begin_call): Change API to take callback, user data,
and destroy function directly.
(dbus_g_proxy_end_call): Update to take DBusGProxyCall.
(dbus_g_proxy_call): Invoke with NULL callback.
(dbus_g_proxy_cancel_call): New function, replaces
dbus_g_pending_call_cancel.
* glib/dbus-gparser.c (validate_signature): Fix call to
dbus_set_g_error.
* glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
New quark for attaching metadata to GType.
(info_hash): Delete.
(lookup_object_info): Look up using quark.
(dbus_g_object_type_install_info): Check that a type is classed,
not that it's an object. Also just install type data using quark
instead of using global hash.
* glib/dbus-glib.c (dbus_g_pending_call_ref)
(dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
(GPendingNotifyClosure): Delete.
(d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
* glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
client method generation until we can fix it...
* tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
(load_from_service_thread_func): Ditto.
* tools/dbus-names-model.c (struct NamesModel): Hold
DBusGProxyCall.
(have_names_notify): Update prototype, use
dbus_g_proxy_cancel_call.
(names_model_reload): Update for new dbus_g_proxy_begin_call API.
* tools/dbus-monitor.c (filter_func): Update for print_message
API change.
* test/glib/test-dbus-glib.c: Add more tests for async
invocations. Update many begin_call/end_call pairs to just use
dbus_g_proxy_call.
* tools/dbus-send.c (main): Add --print-reply=literal mode. This
allows us to dump print-introspect.c.
* tools/dbus-print-message.h (print_message): Add literal argument
to print_message which is intended to allow printing arguments without
metadata like "string=".
* tools/dbus-print-message.c (print_iter): Add literal argument.
(print_message): Allow printing string messages literally.
2005-07-06 21:27:53 +00:00
|
|
|
break;
|
2003-08-18 22:43:30 +00:00
|
|
|
|
2005-07-06 Colin Walters <walters@verbum.org>
* dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
(DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
(dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
Delete in favor of dbus_g_proxy_begin_call and
dbus_g_proxy_cancel_call.
(DBusGProxyCall, DBusGProxyCallNotify): New.
(dbus_g_proxy_begin_call): Change prototype to take callback, user
data, and destroy function. This replaces
dbus_g_pending_call_set_notify.
(dbus_g_proxy_cancel_call): Prototype.
(DBusGAsyncData): Delete, shouldn't be needed anymore.
* glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
pending_calls map.
(struct _DBusGProxyManager): Add bus_proxy member, which is an
internal proxy for calls to the bus. Remove
pending_nameowner_calls, now the internal proxy keeps track.
(dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
pending_nameowner_calls.
(got_name_owner_cb): Update prototype, and use
dbus_g_proxy_end_call.
(got_name_owner_cb): Remove reference to pending_nameowner_calls.
(dbus_g_proxy_manager_register): Delete directly libdbus code in
favor of using internal proxy.
(dbus_g_proxy_manager_unregister): Update to use
dbus_g_proxy_cancel_call for any pending GetNameOwner call.
(dbus_g_proxy_init): Initialize pending calls map.
(dbus_g_proxy_constructor): New.
(dbus_g_proxy_class_init): Add get/set property functions,
constructor, and add NAME, PATH, and INTERFACE properties.
(cancel_pending_call): New function.
(dbus_g_proxy_dispose): Iterate over any outstanding calls and
cancel them.
(dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
(GPendingNotifyClosure): New structure.
(d_pending_call_notify, d_pending_call_free): Moved here from
dbus-glib.c.
(DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
ordering.
(manager_begin_bus_call): New internal function for talking to
internal bus proxy.
(dbus_g_proxy_new): Construct object using GObjet properties.
(dbus_g_proxy_begin_call_internal): Update to take user data, etc.
Create closure of same, and insert call into map of pending calls.
(dbus_g_proxy_end_call_internal): Take call id instead of pending
call. Look up pending call in current set. Remove it when we've
completed.
(dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
(dbus_g_proxy_begin_call): Change API to take callback, user data,
and destroy function directly.
(dbus_g_proxy_end_call): Update to take DBusGProxyCall.
(dbus_g_proxy_call): Invoke with NULL callback.
(dbus_g_proxy_cancel_call): New function, replaces
dbus_g_pending_call_cancel.
* glib/dbus-gparser.c (validate_signature): Fix call to
dbus_set_g_error.
* glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
New quark for attaching metadata to GType.
(info_hash): Delete.
(lookup_object_info): Look up using quark.
(dbus_g_object_type_install_info): Check that a type is classed,
not that it's an object. Also just install type data using quark
instead of using global hash.
* glib/dbus-glib.c (dbus_g_pending_call_ref)
(dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
(GPendingNotifyClosure): Delete.
(d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
* glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
client method generation until we can fix it...
* tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
(load_from_service_thread_func): Ditto.
* tools/dbus-names-model.c (struct NamesModel): Hold
DBusGProxyCall.
(have_names_notify): Update prototype, use
dbus_g_proxy_cancel_call.
(names_model_reload): Update for new dbus_g_proxy_begin_call API.
* tools/dbus-monitor.c (filter_func): Update for print_message
API change.
* test/glib/test-dbus-glib.c: Add more tests for async
invocations. Update many begin_call/end_call pairs to just use
dbus_g_proxy_call.
* tools/dbus-send.c (main): Add --print-reply=literal mode. This
allows us to dump print-introspect.c.
* tools/dbus-print-message.h (print_message): Add literal argument
to print_message which is intended to allow printing arguments without
metadata like "string=".
* tools/dbus-print-message.c (print_iter): Add literal argument.
(print_message): Allow printing string messages literally.
2005-07-06 21:27:53 +00:00
|
|
|
case DBUS_MESSAGE_TYPE_ERROR:
|
2007-03-10 19:52:30 +00:00
|
|
|
printf (" error_name=%s reply_serial=%u\n",
|
|
|
|
|
dbus_message_get_error_name (message),
|
|
|
|
|
dbus_message_get_reply_serial (message));
|
2005-07-06 Colin Walters <walters@verbum.org>
* dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
(DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
(dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
Delete in favor of dbus_g_proxy_begin_call and
dbus_g_proxy_cancel_call.
(DBusGProxyCall, DBusGProxyCallNotify): New.
(dbus_g_proxy_begin_call): Change prototype to take callback, user
data, and destroy function. This replaces
dbus_g_pending_call_set_notify.
(dbus_g_proxy_cancel_call): Prototype.
(DBusGAsyncData): Delete, shouldn't be needed anymore.
* glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
pending_calls map.
(struct _DBusGProxyManager): Add bus_proxy member, which is an
internal proxy for calls to the bus. Remove
pending_nameowner_calls, now the internal proxy keeps track.
(dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
pending_nameowner_calls.
(got_name_owner_cb): Update prototype, and use
dbus_g_proxy_end_call.
(got_name_owner_cb): Remove reference to pending_nameowner_calls.
(dbus_g_proxy_manager_register): Delete directly libdbus code in
favor of using internal proxy.
(dbus_g_proxy_manager_unregister): Update to use
dbus_g_proxy_cancel_call for any pending GetNameOwner call.
(dbus_g_proxy_init): Initialize pending calls map.
(dbus_g_proxy_constructor): New.
(dbus_g_proxy_class_init): Add get/set property functions,
constructor, and add NAME, PATH, and INTERFACE properties.
(cancel_pending_call): New function.
(dbus_g_proxy_dispose): Iterate over any outstanding calls and
cancel them.
(dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
(GPendingNotifyClosure): New structure.
(d_pending_call_notify, d_pending_call_free): Moved here from
dbus-glib.c.
(DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
ordering.
(manager_begin_bus_call): New internal function for talking to
internal bus proxy.
(dbus_g_proxy_new): Construct object using GObjet properties.
(dbus_g_proxy_begin_call_internal): Update to take user data, etc.
Create closure of same, and insert call into map of pending calls.
(dbus_g_proxy_end_call_internal): Take call id instead of pending
call. Look up pending call in current set. Remove it when we've
completed.
(dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
(dbus_g_proxy_begin_call): Change API to take callback, user data,
and destroy function directly.
(dbus_g_proxy_end_call): Update to take DBusGProxyCall.
(dbus_g_proxy_call): Invoke with NULL callback.
(dbus_g_proxy_cancel_call): New function, replaces
dbus_g_pending_call_cancel.
* glib/dbus-gparser.c (validate_signature): Fix call to
dbus_set_g_error.
* glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
New quark for attaching metadata to GType.
(info_hash): Delete.
(lookup_object_info): Look up using quark.
(dbus_g_object_type_install_info): Check that a type is classed,
not that it's an object. Also just install type data using quark
instead of using global hash.
* glib/dbus-glib.c (dbus_g_pending_call_ref)
(dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
(GPendingNotifyClosure): Delete.
(d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
* glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
client method generation until we can fix it...
* tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
(load_from_service_thread_func): Ditto.
* tools/dbus-names-model.c (struct NamesModel): Hold
DBusGProxyCall.
(have_names_notify): Update prototype, use
dbus_g_proxy_cancel_call.
(names_model_reload): Update for new dbus_g_proxy_begin_call API.
* tools/dbus-monitor.c (filter_func): Update for print_message
API change.
* test/glib/test-dbus-glib.c: Add more tests for async
invocations. Update many begin_call/end_call pairs to just use
dbus_g_proxy_call.
* tools/dbus-send.c (main): Add --print-reply=literal mode. This
allows us to dump print-introspect.c.
* tools/dbus-print-message.h (print_message): Add literal argument
to print_message which is intended to allow printing arguments without
metadata like "string=".
* tools/dbus-print-message.c (print_iter): Add literal argument.
(print_message): Allow printing string messages literally.
2005-07-06 21:27:53 +00:00
|
|
|
break;
|
2003-08-18 22:43:30 +00:00
|
|
|
|
2005-07-06 Colin Walters <walters@verbum.org>
* dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
(DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
(dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
Delete in favor of dbus_g_proxy_begin_call and
dbus_g_proxy_cancel_call.
(DBusGProxyCall, DBusGProxyCallNotify): New.
(dbus_g_proxy_begin_call): Change prototype to take callback, user
data, and destroy function. This replaces
dbus_g_pending_call_set_notify.
(dbus_g_proxy_cancel_call): Prototype.
(DBusGAsyncData): Delete, shouldn't be needed anymore.
* glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
pending_calls map.
(struct _DBusGProxyManager): Add bus_proxy member, which is an
internal proxy for calls to the bus. Remove
pending_nameowner_calls, now the internal proxy keeps track.
(dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
pending_nameowner_calls.
(got_name_owner_cb): Update prototype, and use
dbus_g_proxy_end_call.
(got_name_owner_cb): Remove reference to pending_nameowner_calls.
(dbus_g_proxy_manager_register): Delete directly libdbus code in
favor of using internal proxy.
(dbus_g_proxy_manager_unregister): Update to use
dbus_g_proxy_cancel_call for any pending GetNameOwner call.
(dbus_g_proxy_init): Initialize pending calls map.
(dbus_g_proxy_constructor): New.
(dbus_g_proxy_class_init): Add get/set property functions,
constructor, and add NAME, PATH, and INTERFACE properties.
(cancel_pending_call): New function.
(dbus_g_proxy_dispose): Iterate over any outstanding calls and
cancel them.
(dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
(GPendingNotifyClosure): New structure.
(d_pending_call_notify, d_pending_call_free): Moved here from
dbus-glib.c.
(DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
ordering.
(manager_begin_bus_call): New internal function for talking to
internal bus proxy.
(dbus_g_proxy_new): Construct object using GObjet properties.
(dbus_g_proxy_begin_call_internal): Update to take user data, etc.
Create closure of same, and insert call into map of pending calls.
(dbus_g_proxy_end_call_internal): Take call id instead of pending
call. Look up pending call in current set. Remove it when we've
completed.
(dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
(dbus_g_proxy_begin_call): Change API to take callback, user data,
and destroy function directly.
(dbus_g_proxy_end_call): Update to take DBusGProxyCall.
(dbus_g_proxy_call): Invoke with NULL callback.
(dbus_g_proxy_cancel_call): New function, replaces
dbus_g_pending_call_cancel.
* glib/dbus-gparser.c (validate_signature): Fix call to
dbus_set_g_error.
* glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
New quark for attaching metadata to GType.
(info_hash): Delete.
(lookup_object_info): Look up using quark.
(dbus_g_object_type_install_info): Check that a type is classed,
not that it's an object. Also just install type data using quark
instead of using global hash.
* glib/dbus-glib.c (dbus_g_pending_call_ref)
(dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
(GPendingNotifyClosure): Delete.
(d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
* glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
client method generation until we can fix it...
* tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
(load_from_service_thread_func): Ditto.
* tools/dbus-names-model.c (struct NamesModel): Hold
DBusGProxyCall.
(have_names_notify): Update prototype, use
dbus_g_proxy_cancel_call.
(names_model_reload): Update for new dbus_g_proxy_begin_call API.
* tools/dbus-monitor.c (filter_func): Update for print_message
API change.
* test/glib/test-dbus-glib.c: Add more tests for async
invocations. Update many begin_call/end_call pairs to just use
dbus_g_proxy_call.
* tools/dbus-send.c (main): Add --print-reply=literal mode. This
allows us to dump print-introspect.c.
* tools/dbus-print-message.h (print_message): Add literal argument
to print_message which is intended to allow printing arguments without
metadata like "string=".
* tools/dbus-print-message.c (print_iter): Add literal argument.
(print_message): Allow printing string messages literally.
2005-07-06 21:27:53 +00:00
|
|
|
default:
|
|
|
|
|
printf ("\n");
|
|
|
|
|
break;
|
|
|
|
|
}
|
2003-08-18 22:43:30 +00:00
|
|
|
}
|
2003-05-16 20:09:25 +00:00
|
|
|
|
2005-01-30 07:44:08 +00:00
|
|
|
dbus_message_iter_init (message, &iter);
|
2005-07-06 Colin Walters <walters@verbum.org>
* dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
(DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
(dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
Delete in favor of dbus_g_proxy_begin_call and
dbus_g_proxy_cancel_call.
(DBusGProxyCall, DBusGProxyCallNotify): New.
(dbus_g_proxy_begin_call): Change prototype to take callback, user
data, and destroy function. This replaces
dbus_g_pending_call_set_notify.
(dbus_g_proxy_cancel_call): Prototype.
(DBusGAsyncData): Delete, shouldn't be needed anymore.
* glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
pending_calls map.
(struct _DBusGProxyManager): Add bus_proxy member, which is an
internal proxy for calls to the bus. Remove
pending_nameowner_calls, now the internal proxy keeps track.
(dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
pending_nameowner_calls.
(got_name_owner_cb): Update prototype, and use
dbus_g_proxy_end_call.
(got_name_owner_cb): Remove reference to pending_nameowner_calls.
(dbus_g_proxy_manager_register): Delete directly libdbus code in
favor of using internal proxy.
(dbus_g_proxy_manager_unregister): Update to use
dbus_g_proxy_cancel_call for any pending GetNameOwner call.
(dbus_g_proxy_init): Initialize pending calls map.
(dbus_g_proxy_constructor): New.
(dbus_g_proxy_class_init): Add get/set property functions,
constructor, and add NAME, PATH, and INTERFACE properties.
(cancel_pending_call): New function.
(dbus_g_proxy_dispose): Iterate over any outstanding calls and
cancel them.
(dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
(GPendingNotifyClosure): New structure.
(d_pending_call_notify, d_pending_call_free): Moved here from
dbus-glib.c.
(DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
ordering.
(manager_begin_bus_call): New internal function for talking to
internal bus proxy.
(dbus_g_proxy_new): Construct object using GObjet properties.
(dbus_g_proxy_begin_call_internal): Update to take user data, etc.
Create closure of same, and insert call into map of pending calls.
(dbus_g_proxy_end_call_internal): Take call id instead of pending
call. Look up pending call in current set. Remove it when we've
completed.
(dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
(dbus_g_proxy_begin_call): Change API to take callback, user data,
and destroy function directly.
(dbus_g_proxy_end_call): Update to take DBusGProxyCall.
(dbus_g_proxy_call): Invoke with NULL callback.
(dbus_g_proxy_cancel_call): New function, replaces
dbus_g_pending_call_cancel.
* glib/dbus-gparser.c (validate_signature): Fix call to
dbus_set_g_error.
* glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
New quark for attaching metadata to GType.
(info_hash): Delete.
(lookup_object_info): Look up using quark.
(dbus_g_object_type_install_info): Check that a type is classed,
not that it's an object. Also just install type data using quark
instead of using global hash.
* glib/dbus-glib.c (dbus_g_pending_call_ref)
(dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
(GPendingNotifyClosure): Delete.
(d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
* glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
client method generation until we can fix it...
* tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
(load_from_service_thread_func): Ditto.
* tools/dbus-names-model.c (struct NamesModel): Hold
DBusGProxyCall.
(have_names_notify): Update prototype, use
dbus_g_proxy_cancel_call.
(names_model_reload): Update for new dbus_g_proxy_begin_call API.
* tools/dbus-monitor.c (filter_func): Update for print_message
API change.
* test/glib/test-dbus-glib.c: Add more tests for async
invocations. Update many begin_call/end_call pairs to just use
dbus_g_proxy_call.
* tools/dbus-send.c (main): Add --print-reply=literal mode. This
allows us to dump print-introspect.c.
* tools/dbus-print-message.h (print_message): Add literal argument
to print_message which is intended to allow printing arguments without
metadata like "string=".
* tools/dbus-print-message.c (print_iter): Add literal argument.
(print_message): Allow printing string messages literally.
2005-07-06 21:27:53 +00:00
|
|
|
print_iter (&iter, literal, 1);
|
2005-08-26 15:41:31 +00:00
|
|
|
fflush (stdout);
|
2005-01-30 07:44:08 +00:00
|
|
|
|
2003-05-16 20:09:25 +00:00
|
|
|
}
|
|
|
|
|
|