mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-04-28 06:30:40 +02:00
2003-06-19 Philip Blundell <philb@gnu.org>
* tools/dbus-print-message.c (print_message): Handle BOOLEAN. * tools/dbus-send.c: Accept both --system and --session. * tools/dbus-monitor.c: Same here.
This commit is contained in:
parent
9902499b56
commit
e94493fc11
4 changed files with 20 additions and 2 deletions
|
|
@ -1,3 +1,11 @@
|
|||
2003-06-19 Philip Blundell <philb@gnu.org>
|
||||
|
||||
* tools/dbus-print-message.c (print_message): Handle BOOLEAN.
|
||||
|
||||
* tools/dbus-send.c: Accept both --system and --session.
|
||||
|
||||
* tools/dbus-monitor.c: Same here.
|
||||
|
||||
2003-06-19 Anders Carlsson <andersca@codefactory.se>
|
||||
|
||||
* glib/dbus-glib.h: Fix so that dbus-glib.h can be used
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ handler_func (DBusMessageHandler *handler,
|
|||
static void
|
||||
usage (char *name, int ecode)
|
||||
{
|
||||
fprintf (stderr, "Usage: %s [--system]\n", name);
|
||||
fprintf (stderr, "Usage: %s [--system | --session]\n", name);
|
||||
exit (ecode);
|
||||
}
|
||||
|
||||
|
|
@ -66,6 +66,8 @@ main (int argc, char *argv[])
|
|||
|
||||
if (!strcmp (arg, "--system"))
|
||||
type = DBUS_BUS_SYSTEM;
|
||||
else if (!strcmp (arg, "--session"))
|
||||
type = DBUS_BUS_SESSION;
|
||||
else if (!strcmp (arg, "--help"))
|
||||
usage (argv[0], 0);
|
||||
else if (!strcmp (arg, "--"))
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ print_message (DBusMessage *message)
|
|||
dbus_int32_t int32;
|
||||
double d;
|
||||
unsigned char byte;
|
||||
dbus_bool_t boolean;
|
||||
|
||||
if (type == DBUS_TYPE_INVALID)
|
||||
break;
|
||||
|
|
@ -74,6 +75,11 @@ print_message (DBusMessage *message)
|
|||
printf ("byte:%d\n", byte);
|
||||
break;
|
||||
|
||||
case DBUS_TYPE_BOOLEAN:
|
||||
boolean = dbus_message_iter_get_boolean (&iter);
|
||||
printf ("boolean:%s\n", boolean ? "true" : "false");
|
||||
break;
|
||||
|
||||
default:
|
||||
printf ("(unknown arg type %d)\n", type);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
static void
|
||||
usage (char *name, int ecode)
|
||||
{
|
||||
fprintf (stderr, "Usage: %s [--help] [--session] [--dest=SERVICE] [--print-reply] <message type> [contents ...]\n", name);
|
||||
fprintf (stderr, "Usage: %s [--help] [--system | --session] [--dest=SERVICE] [--print-reply] <message type> [contents ...]\n", name);
|
||||
exit (ecode);
|
||||
}
|
||||
|
||||
|
|
@ -58,6 +58,8 @@ main (int argc, char *argv[])
|
|||
|
||||
if (strcmp (arg, "--system") == 0)
|
||||
type = DBUS_BUS_SYSTEM;
|
||||
else if (strcmp (arg, "--session") == 0)
|
||||
type = DBUS_BUS_SESSION;
|
||||
else if (strcmp (arg, "--print-reply") == 0)
|
||||
print_reply = TRUE;
|
||||
else if (strstr (arg, "--dest=") == arg)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue