Commit Graph

4230 Commits

Author SHA1 Message Date
Ryan Lortie
80fbe0b5b7 some sort of actual progress here... 2014-12-15 08:00:56 -05:00
Ryan Lortie
de2c0f8357 improve bloom filter on send
Avoid creating GVariant instances that we don't need (non-strings) and
remove some bits from the filter (signatures and non-path-matches on
object paths, as per the dbus spec).
2014-12-12 09:48:34 -05:00
Lukasz Skalski
c80652e29f kdbus: use an absolute value for kmsg->timeout_ns
Solution with KDBUS_TIMEOUT_NS macro is temporary - for test purposes.
We have to find better solution for setting timeout value

Conflicts:
	gio/gkdbus.c
2014-12-12 08:26:25 -05:00
Ryan Lortie
d3562a9597 now come the big changes...
also: update kdbus.h with nice new ABI breaks
2014-12-12 08:19:23 -05:00
Ryan Lortie
b3f8546dd2 wip junk 2014-12-10 10:56:38 -05:00
Ryan Lortie
9c7e3dc4d0 hook gvariant vectors up to kdbus 2014-12-06 00:43:15 -05:00
Ryan Lortie
5cd6c41a0c change user bus file locations 2014-12-04 13:23:13 -05:00
Ryan Lortie
c43029992d gdbus-tool: add support for new bus types
Add support for 'machine' and 'user' busses to the commandline tool.
2014-12-04 13:23:13 -05:00
Ryan Lortie
5c10dd2963 gdbus-tool: simplify some logic
This would have gotten pretty ugly with 5 possibilities...
2014-12-04 13:23:13 -05:00
Ryan Lortie
d3e998b370 GDBus: add support for GVariant floats to helpers
Add support for G_VARIANT_TYPE_FLOAT to some helper functions.

We don't add support to the core serialiser because the sending side
already has a catch-all case for unsupported types (because of maybe
types) and the receiving side will never see floats on the wire.

https://bugzilla.gnome.org/show_bug.cgi?id=740897
2014-12-04 13:23:13 -05:00
Lukasz Skalski
c1b1a4ea11 [kdbus] sync with kdbus (kdbus.h - commit: b024fb43c66b) 2014-12-04 13:23:13 -05:00
Lukasz Skalski
1746044478 [kdbus][wip] Import code from tizen.org repo 2014-12-04 13:23:13 -05:00
Lukasz Skalski
f6d8cbfcee [kdbus] Remove redundant g_dbus_name_has_owner() function from new API
https://bugzilla.gnome.org/show_bug.cgi?id=721861#c38
2014-12-04 13:23:13 -05:00
Lukasz Skalski
5128c34e0f [kdbus] sync with kdbus (kdbus.h - commit: 5ae1ecac44cb) 2014-12-04 13:23:13 -05:00
Lukasz Skalski
defb6c810a [kdbus] Add possibility to unsubscribe NameAcquired and NameLost signals 2014-12-04 13:23:13 -05:00
Lukasz Skalski
1e193663b8 [kdbus] Add RequestName and ReleaseName to new API 2014-12-04 13:23:13 -05:00
Lukasz Skalski
0ee61acfa0 [kdbus] set const cookies for NameAcquired and NameLost subscriptions 2014-12-04 13:23:13 -05:00
Lukasz Skalski
f2cdea88c8 [kdbus][wip] Add matches for kernel notifications 2014-12-04 13:23:13 -05:00
Lukasz Skalski
9141fc1668 [kdbus] Initial support for decoding kernel messages 2014-12-04 13:23:13 -05:00
Lukasz Skalski
3d8d1d5629 [kdbus] Enable 'initial_read()' - is no longer needed 2014-12-04 13:23:13 -05:00
Lukasz Skalski
61e466d3f4 [kdbus] Add initial support for receiving messages 2014-12-04 13:23:13 -05:00
Lukasz Skalski
679fdbc5e3 [kdbus] Integrate acquiring and releasing names on kdbus with GLib core
Now it's possible to use GLib API for owning bus names, like:
g_bus_own_name() or g_bus_own_name_on_connection(). It is not yet
fully functional until I'll add 'Add Match' method on kdbus, so
g_bus_unown_name() still doesn't invoke proper handler, when 'name'
is lost - work in progress.
2014-12-04 13:23:13 -05:00
Lukasz Skalski
66027a29a9 [kdbus] Add support for 'ReleaseName' on kdbus 2014-12-04 13:23:13 -05:00
Lukasz Skalski
e088bbc890 [kdbus] Add support for 'RequestName' on kdbus 2014-12-04 13:23:13 -05:00
Lukasz Skalski
f85bce5b98 [kdbus] Add G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE flag
New flag is equivalent to DBUS_NAME_FLAG_DO_NOT_QUEUE flag from
dbus-1 specification [1].

[1] http://dbus.freedesktop.org/doc/dbus-specification.html

Change-Id: I8a50aa586abd5b0ffcbc0bdc41c2e98c18a2e18a
2014-12-04 13:23:13 -05:00
Lukasz Skalski
293d7ae07a [kdbus][TEMPORARY HACK] Disable 'initial read'
This patch allows perform new API test [1] without errors.
'initial_read' should be disabled till old patches from
Tizen repo [2] will be applied in this GitHub repository.

[1] https://github.com/lukasz-skalski/glib-kdbus-tests
[2] https://review.tizen.org/git/?p=platform/upstream/glib.git;a=shortlog;h=refs/heads/kdbus-integration
2014-12-04 13:23:12 -05:00
Lukasz Skalski
d14444d103 [kdbus] Catch up with latest kdbus changes 2014-12-04 13:23:12 -05:00
Lukasz Skalski
cce83618c0 [kdbus] Update kdbus interface header (commit: 017f56c7e53f) 14/10/20 2014-12-04 13:23:12 -05:00
Lukasz Skalski
c06623cbe0 [kdbus] Integrate kdbus core with new API.
Change-Id: I4c9b3853af0f25123dc0cb1dfce6a86c102ee08f
2014-12-04 13:23:12 -05:00
Lukasz Skalski
9f0bfad1ff [kdbus] Update kdbus interface header (commit: b620b72c9127) 14/10/16
Change-Id: I47d31f6cd810f452c31154f7aaff5903a5566ab3
2014-12-04 13:23:12 -05:00
Lukasz Skalski
a9e0487113 [kdbus] Rework kdbus core files
Change-Id: I09fd49dcc5557b25c49752a45d150e69e2886d47
2014-12-04 13:23:12 -05:00
Lukasz Skalski
6635fd4d84 [kdbus] Import gio/gkdbus* files from previous patchset.
With new kdbus.h header, imported files are outdated and will be
reworked soon.

Change-Id: Idfe94c7f72e81cd9910fceb8ac0664140b5eba90
2014-12-04 13:23:12 -05:00
Lukasz Skalski
5080f9bb07 [kdbus] Update kdbus interface header (commit: c34e65633b4e)
Change-Id: Ib9bd554d3bf2d7dacc6c143038253fe2e7f177a8
2014-12-04 13:23:12 -05:00
Lukasz Skalski
030b701401 [kdbus] Initial support for two new bus types: 'user' and 'machine'
Change-Id: I3976e3935a01ea8d67b9a41997d0be8a37765d00
2014-12-04 13:23:12 -05:00
Lukasz Skalski
996eb6592c [kdbus] Import kdbus interface header (commit: 5df28e6dd30b)
Change-Id: Iec05e26a512c3e923442bd9d4fcc3e8ad94df36b
2014-12-04 13:23:12 -05:00
Lukasz Skalski
2c2ea3a4e0 [kdbus] Add new library API for common tasks on dbus/kdbus
For kdbus purpose we need introduce two new bus types
called "user" and "machine". Will not be possible to
make calls to the 'org.freedesktop.DBus' destination on
the new bus types, thus this patch introduce new API
for tasks such as "get Unix user ID of the process connected
to the server", "returns a list of all currently-owned names
on the bus" and so on.

Change-Id: Ib9ba65346290d597341d4157b09cb45bd3d1151d
2014-12-04 13:23:12 -05:00
Ignacio Casal Quinteiro
e0f1a19332 gio: provide G_IO_ERROR_NOT_CONNECTED translation for ENOTCONN
https://bugzilla.gnome.org/show_bug.cgi?id=741016
2014-12-02 14:29:50 +01:00
Ignacio Casal Quinteiro
22ab227348 gio: fix build
next time I should definitely try to compile after a rebase conflict...
2014-12-02 14:29:50 +01:00
Ignacio Casal Quinteiro
fbfc23453d gio: add G_IO_ERROR_NOT_CONNECTED
It adds a new error G_IO_ERROR_NOT_CONNECTED
and makes the win32 error ERROR_PIPE_LISTENING
to be translated to it.

https://bugzilla.gnome.org/show_bug.cgi?id=741016
2014-12-02 14:21:14 +01:00
Dan Winship
967fedc0ae gsocket: add G_IO_ERROR_CONNECTION_CLOSED
Add G_IO_ERROR_CONNECTION_CLOSED as an alias for
G_IO_ERROR_BROKEN_PIPE, and also return it on ECONNRESET.

It doesn't really make sense to try to distinguish EPIPE and
ECONNRESET at the GLib level, since the exact choice of which error
gets returned in what conditions depends on the OS. Given that, we
ought to map the two errors to the same value, and since we're already
mapping EPIPE to G_IO_ERROR_BROKEN_PIPE, we need to map ECONNRESET to
that too. But the existing name doesn't really make sense for sockets,
so we add a new name.

https://bugzilla.gnome.org/show_bug.cgi?id=728928
2014-11-29 14:26:42 -05:00
Dan Winship
64f9bf96fd gnetworkaddress: Add g_network_address_new_loopback() constructor
This is a convenience method for creating a GNetworkAddress which is
guaranteed to return IPv4 and IPv6 loopback addresses. The program
cannot guarantee that 'localhost' will resolve to both types of
address, so programs which wish to connect to a local service over
either IPv4 or IPv6 must currently manually create an IPv4 and another
IPv6 socket, and detect which of the two are working. This new API
allows the existing GSocketConnectable machinery to be used to
automate that.

Based on a patch from Philip Withnall.

https://bugzilla.gnome.org/show_bug.cgi?id=732317
2014-11-29 14:22:42 -05:00
Lars Uebernickel
d511d6b37f GSettings: fix check for delaying backend subscription
g_settings_has_signal_handlers() checks whether any of the signals has
pending handlers. However, g_signal_has_handler_pending() matches on
exact detail, even when passing 0. Subscribing to one of GSettings'
signals with a detail will fail this check and never connect to the
backend.

Fix this by calling has_handler_pending() with the key as detail as
well.

https://bugzilla.gnome.org/show_bug.cgi?id=740848
2014-11-28 15:19:07 +01:00
Matthias Clasen
7f2f4ab12d Use the new g_strv_contains
No need to keep our own copy of this in the testsuite.
2014-11-27 09:12:42 -05:00
Dan Winship
e784a4ba32 gio/tests: add a socket-listener test
Add a GSocketListener test program. Currently the only test is a
regression test for bug 712570 (based on a standalone bug reproducer
provided by Ross Lagerwall).
2014-11-23 12:33:01 -05:00
Ross Lagerwall
9a6e01ea5b gio: Prevent hang when finalizing GThreadedSocketService
If all users of a GThreadedSocketService release their references to the
service while a connection thread is running, the thread function will
release the last reference to the service which causes the finalize to
deadlock waiting for all threads to finish (because it's called from the
thread function).

To fix this, don't wait for all threads to finish in the service's
finalize method.  Since the threads hold a reference to the service,
finalize should only be called when all threads are finished running (or
have unrefed the service and are about to finish).

https://bugzilla.gnome.org/show_bug.cgi?id=712570
2014-11-23 12:02:38 -05:00
Michael Henning
89e663107e gio: Implement g_win32_app_info_launch_uris for windows. 2014-11-22 17:24:51 -05:00
Michael Henning
90f0eb101f gio: Implement g_app_info_get_default_for_uri_scheme for windows. 2014-11-22 17:24:51 -05:00
Dan Winship
7f5c862e16 GTlsClientConnection: loosen the semantics of "use-ssl3"
If SSL 3.0 has been disabled (at the host, application, or library
level), then the "use-ssl3" property becomes a "fail-immediately"
property.

Despite the name, the point of the property wasn't really specifically
to use SSL 3.0; it was to allow fallback when talking to broken
servers that do SSL/TLS negotiation incorrectly and break when they
see unexpectedly-high version numbers. So if we can't fall back to SSL
3.0, then the "use-ssl3" property should fall back to TLS 1.0 instead
(since there are hosts that will reject a TLS 1.2 handshake, but
accept a TLS 1.0 one).

glib-networking is being updated to implement that behavior, so update
the documentation here.

https://bugzilla.gnome.org/show_bug.cgi?id=738633
2014-11-22 11:02:22 -05:00
Chun-wei Fan
f6bbd19beb GSettings Registry Backend: Init cache_lock Earlier
In commit 8ff5668, we are subscribing the GSettings backend later, but this
meant that we need to initialize cache_lock earlier, as we might try to
use that lock before a change notification is issued to subscribe the
backend, which would then cause an access violation if we are trying to
read GSettings values, as that lock is used to access the Windows Registry.

Initialize cache_lock once we initialize the GSettings Registry backend,
and delete it upon finalize, so that g_settings_read_from_backend() can
proceed normally, even if the GSettings backend is not yet subscribed.

https://bugzilla.gnome.org/show_bug.cgi?id=740413
2014-11-20 22:11:25 +08:00
Christian Persch
5c68fc9f93 gsettingsschema: Print the string that failed to parse
When parsing a translated value fails, print the actual string that
failed to parse instead of the 'domain\004string' untranslated string.

https://bugzilla.gnome.org/show_bug.cgi?id=737150
https://bugzilla.gnome.org/show_bug.cgi?id=737160
2014-11-20 10:38:18 +01:00