Back in the far-off twentieth century, it was normal on unix
workstations for U+0060 GRAVE ACCENT to be drawn as "‛" and for U+0027
APOSTROPHE to be drawn as "’". This led to the convention of using
them as poor-man's ‛smart quotes’ in ASCII-only text.
However, "'" is now universally drawn as a vertical line, and "`" at a
45-degree angle, making them an `odd couple' when used together.
Unfortunately, there are lots of very old strings in glib, and also
lots of new strings in which people have kept up the old tradition,
perhaps entirely unaware that it used to not look stupid.
Fix this by just using 'dumb quotes' everywhere.
https://bugzilla.gnome.org/show_bug.cgi?id=700746
Rather than using "extern" declarations of these win32 functions
everywhere they're needed, just prototype them in glib-private.h.
(Which also fixes the fact that they weren't prototyped in the files
where they're defined.)
https://bugzilla.gnome.org/show_bug.cgi?id=688109
Very many testcases, some GLib tools (resource compiler, etc) and
GApplication were calling g_type_init().
Remove those uses, as they are no longer required.
https://bugzilla.gnome.org/show_bug.cgi?id=686161
See https://bugs.freedesktop.org/show_bug.cgi?id=37890#c6 where it was
discovered that dbus-send(1) actually doesn't work (either libdbus-1's
flush implementation or dbus-send(1)'s usage of it is broken) so it's
useful to have here.
Signed-off-by: David Zeuthen <davidz@redhat.com>
This is currently unused but will probably be useful in the
future. For example, we could have a _ARG0_IS_PATH to specify that
arg0 should be used for arg0path.
This commit breaks API and ABI. Users of
g_dbus_connection_signal_subscribe() will need to port to this new
version.
Signed-off-by: David Zeuthen <davidz@redhat.com>
This allows the caller to specify the reply type that they are expecting
for this call. If the reply comes back with the wrong type, GDBus will
generate an appropriate error internally.
- add a GVariantType * argument to g_dbus_connection_call() and
_call_sync().
- move the internal API for computing message types from introspection
data to be based on GVariantType instead of strings. Update users
of this code.
- have GDBusProxy pass this calculated GVariantType into
g_dbus_connection_call(). Remove the checks done in GDBusProxy.
- Update other users of the code (test cases, gdbus-tool, GSettings
tool, etc). In some cases, remove redundant checks; in some other
cases, we are fixing bugs because no checking was done where it
should have been.
Closes bug #619391.
Fix an unintentional double free introduced in commit
4ad4c306c3.
This bug manifested itself when trying to complete this
$ gdbus introspect --system --dest <tab>
This is to match g_dbus_connection_new(). This extension allows us to
extend GDBusAuthObserver to also be used in client-side authentication
in the future (right now it's only used on the server-side).
This uncovered a bug in name watching if the name wasn't activatable.
Also provoked the need for on_connection variants of g_bus_watch_name
(added g_bus_watch_proxy's variant as well).
Also make the gdbus-example-server include some example
annotations. The output looks like this:
$ gdbus introspect --session --dest org.gtk.GDBus.TestServer --object-path /org/gtk/GDBus/TestObject
node /org/gtk/GDBus/TestObject {
interface org.freedesktop.DBus.Properties {
methods:
Get(in s interface_name,
in s property_name,
out v value);
GetAll(in s interface_name,
out a{sv} properties);
Set(in s interface_name,
in s property_name,
in v value);
signals:
PropertiesChanged(s interface_name,
a{sv} changed_properties);
};
interface org.freedesktop.DBus.Introspectable {
methods:
Introspect(out s xml_data);
};
interface org.freedesktop.DBus.Peer {
methods:
Ping();
GetMachineId(out s machine_uuid);
};
@org.gtk.GDBus.Annotation("OnInterface")
@org.gtk.GDBus.Annotation("AlsoOnInterface")
interface org.gtk.GDBus.TestInterface {
methods:
@org.gtk.GDBus.Annotation("OnMethod")
HelloWorld(in s greeting,
out s response);
EmitSignal(@org.gtk.GDBus.Annotation.("OnArg")
in d speed_in_mph);
GimmeStdout();
signals:
@org.gtk.GDBus.Annotation("Onsignal")
VelocityChanged(d speed_in_mph,
@org.gtk.GDBus.Annotation.("OnArg_NonFirst")
s speed_as_string);
properties:
@org.gtk.GDBus.Annotation("OnProperty")
@org.gtk.GDBus.Annotation("OnAnnotation_YesThisIsCrazy")
readonly s FluxCapicitorName = 'DeLorean';
readwrite s Title = 'Back To C!';
readonly s ReadingAlwaysThrowsError;
readwrite s WritingAlwaysThrowsError = "There's no home like home";
writeonly s OnlyWritable;
readonly s Foo = 'Tick';
readonly s Bar = 'Tock';
};
};
This fixes a problem with services that doesn't implement GetAll() for
one reason or another.
$ gdbus introspect --session --dest org.freedesktop.ReserveDevice1.Audio0 --object-path /org/freedesktop/ReserveDevice1/Audio0
node /org/freedesktop/ReserveDevice1/Audio0 {
interface org.freedesktop.ReserveDevice1 {
methods:
RequestRelease(in i priority,
out b result);
properties:
readonly i Priority = 0;
readonly s ApplicationName = 'PulseAudio Sound Server';
readonly s ApplicationDeviceName = 'Internal Audio Analog Stereo';
};
interface org.freedesktop.DBus.Properties {
methods:
Get(in s interface,
in s property,
out v value);
};
interface org.freedesktop.DBus.Introspectable {
methods:
Introspect(out s data);
};
};
Lots of people been suggesting this. We still use MethodInvocation /
method_invocation for handling incoming method calls so use call()
instead of invoke_method() helps to separate the client and server
facilities. Which is a good thing(tm).
Things compile and the test-suite passes. Still need to hook up
gio.symbols and docs. There are still a bunch of TODOs left in the
sources that needs to be addressed.
Signed-off-by: David Zeuthen <davidz@redhat.com>