Commit Graph

225 Commits

Author SHA1 Message Date
David Zeuthen
0b2b4deac5 GDBus: Add GDBusSendMessageFlags
This is currently unused but might be useful in the future. For
example, it might be nice with a way to bypass the current queue of
outgoing messages - having a flag enumeration allows us to add a
G_DBUS_SEND_MESSAGE_FLAGS_BYPASS_QUEUE etc. etc.

This commit breaks ABI and API. Users of the (rarely used) API to send
messages will have to port to this new API.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-19 16:07:57 -04:00
David Zeuthen
7190af4394 GDBus: Remove constness from introspection data structures
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-19 15:45:27 -04:00
David Zeuthen
4a1c5a1b98 GDBus: Add GDBusSignalFlags and use it in g_dbus_connection_signal_subscribe()
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>
2010-07-19 15:05:10 -04:00
David Zeuthen
914b046226 GDBusConnection: Fix up g_dbus_connection_close()
... so it is async, cancelable and returns an error. Also provide a
synchronous version.

This is an API/ABI break but it is expected that only very few
applications use this API.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-14 12:37:32 -04:00
Stefan Kost
463edcb045 docs: xi:include the annotation glossary to kill warnings and make them work 2010-07-14 11:57:36 +03:00
Ryan Lortie
0bb7cc3fce Remove GUnixVolumeMonitor, GUnixMount from docs
David says that they're supposed to be private.
2010-07-13 09:24:16 -04:00
Ryan Lortie
5344c22810 gio/ docs fixup 2010-07-12 18:30:14 -04:00
Ryan Lortie
adde752ec5 More docs fixes
Remove the g*alias.h from the ignore lists

  Remove other old files from ignore lists

  Clean up gobject docs
2010-07-12 17:46:17 -04:00
David Zeuthen
2d2a321a4b GDBus: Hide class structures for classes we don't want to be subclassed
E.g. move these C structures out of public header files and into their
respective C files. Also nuke padding since this is no longer needed.

This leaves only GDBusProxy as an extendable type.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-07 15:57:37 -04:00
David Zeuthen
62a1ccf526 Bug 618882 – No way to ensure that a message is sent
Add g_dbus_connection_flush{_finish,sync}().

https://bugzilla.gnome.org/show_bug.cgi?id=618882

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-07 15:03:03 -04:00
David Zeuthen
aab6d9ed1c GDBus: Handle autolaunching on UNIX/Freedesktop OSes
Also add a 'address' G_DBUS_DEBUG option that will print out useful
debug information such as

  GDBus-debug:Address: In g_dbus_address_get_for_bus_sync() for bus type `session'
  GDBus-debug:Address: env var DBUS_SESSION_BUS_ADDRESS is not set
  GDBus-debug:Address: env var DBUS_SYSTEM_BUS_ADDRESS is not set
  GDBus-debug:Address: env var DBUS_STARTER_BUS_TYPE is not set
  GDBus-debug:Address: Running `dbus-launch --autolaunch=05e508961149264c9b750a4c494aa6f7 --binary-syntax --close-stderr' to get bus address (possibly autolaunching)
  GDBus-debug:Address: dbus-launch output:
    0000: 75 6e 69 78  3a 61 62 73  74 72 61 63  74 3d 2f 74    unix:abstract=/t
    0010: 6d 70 2f 64  62 75 73 2d  77 42 41 6f  4b 59 49 52    mp/dbus-wBAoKYIR
    0020: 7a 75 2c 67  75 69 64 3d  30 34 30 64  31 33 66 33    zu,guid=040d13f3
    0030: 30 61 30 62  35 32 63 32  30 66 36 32  63 34 31 63    0a0b52c20f62c41c
    0040: 30 30 30 30  35 30 38 64  00 d2 38 00  00 01 00 40    0000508d..8....@
    0050: 05 00 00 00  00                                       .....
  GDBus-debug:Address: dbus-launch stderr output:
  14542: Autolaunch enabled (using X11).
  14542: --exit-with-session automatically enabled
  14542: Connected to X11 display ':0.0'
  14542: === Parent dbus-launch continues
  14542: Waiting for babysitter's intermediate parent
  14542: Reading address from bus
  14542: Reading PID from daemon
  14542: Saving x11 address
  14542: Created window 88080385
  14542: session file: /root/.dbus/session-bus/05e508961149264c9b750a4c494aa6f7-0
  14542: dbus-launch exiting
  GDBus-debug:Address: Returning address `unix:abstract=/tmp/dbus-wBAoKYIRzu,guid=040d13f30a0b52c20f62c41c0000508d' for bus type `session'

and

  GDBus-debug:Address: In g_dbus_address_get_for_bus_sync() for bus type `session'
  GDBus-debug:Address: env var DBUS_SESSION_BUS_ADDRESS is not set
  GDBus-debug:Address: env var DBUS_SYSTEM_BUS_ADDRESS is not set
  GDBus-debug:Address: env var DBUS_STARTER_BUS_TYPE is not set
  GDBus-debug:Address: Running `dbus-launch --autolaunch=05e508961149264c9b750a4c494aa6f7 --binary-syntax --close-stderr' to get bus address (possibly autolaunching)
  GDBus-debug:Address: dbus-launch output:
    0000: 75 6e 69 78  3a 61 62 73  74 72 61 63  74 3d 2f 74    unix:abstract=/t
    0010: 6d 70 2f 64  62 75 73 2d  77 42 41 6f  4b 59 49 52    mp/dbus-wBAoKYIR
    0020: 7a 75 2c 67  75 69 64 3d  30 34 30 64  31 33 66 33    zu,guid=040d13f3
    0030: 30 61 30 62  35 32 63 32  30 66 36 32  63 34 31 63    0a0b52c20f62c41c
    0040: 30 30 30 30  35 30 38 64  00 d2 38 00  00 01 00 40    0000508d..8....@
    0050: 05 00 00 00  00                                       .....
  GDBus-debug:Address: dbus-launch stderr output:
  14549: Autolaunch enabled (using X11).
  14549: --exit-with-session automatically enabled
  14549: Connected to X11 display ':0.0'
  14549: dbus-daemon is already running. Returning existing parameters.
  14549: dbus-launch exiting
  GDBus-debug:Address: Returning address `unix:abstract=/tmp/dbus-wBAoKYIRzu,guid=040d13f30a0b52c20f62c41c0000508d' for bus type `session'

Note that things work exactly like libdbus, e.g. from the
dbus-launch(1) man page:

  Whenever an autolaunch occurs, the application that had to start a
  new bus will be in its own little world; it can effectively end up
  starting a whole new session if it tries to use a lot of bus
  services. This can be suboptimal or even totally broken, depending
  on the app and what it tries to do.

  [...]

  You can always avoid autolaunch by manually setting
  DBUS_SESSION_BUS_ADDRESS. Autolaunch happens because the default
  address if none is set is "autolaunch:", so if any other address is
  set there will be no autolaunch. You can however include autolaunch
  in an explicit session bus address as a fallback, for example
  DBUS_SESSION_BUS_ADDRESS="something:,autolaunch:" - in that case if
  the first address doesn't work, processes will autolaunch. (The bus
  address variable contains a comma-separated list of addresses to
  try.)

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-06 17:03:36 -04:00
David Zeuthen
c29ad23928 GDBus: make G_DBUS_DEBUG=authentication work again
This was inadvertently removed in this commit

http://git.gnome.org/browse/glib/commit/?id=1d22b64843c83631bcd0e5255930f3a4e990961e

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-02 09:35:13 -04:00
Ryan Lortie
5383c7110f Bug 622124 - implement flags for GSettings
Add a <flags> tag to the schema file format and a flags='' attribute to
go along with.  Add some extra test cases for those.

Add new g_settings_{get,set}_flags() calls and support binding to
GParamSpecFlags properties.  Add test cases.
2010-07-01 19:06:02 -04:00
David Zeuthen
bd8d837f57 Bug 620913 – More control with G_DBUS_DEBUG
This commit adds the following G_DBUS_DEBUG flags

 - emission
 - incoming
 - call
 - signal
 - payload

https://bugzilla.gnome.org/show_bug.cgi?id=620913

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-01 14:37:16 -04:00
David Zeuthen
038d03cd08 Bug 623142 – Ensure ::new-connection runs before processing D-Bus messages
Without this guarantee, peer-to-peer connections are not very
useful. However, with this guarantee it's possible to export objects
in a handler for the GDBusServer::new-connection signal.

There are two caveats with this patch

 - it won't work on message bus connections
 - we don't queue up messages to be written

that can be addresses later if needed.

https://bugzilla.gnome.org/show_bug.cgi?id=623142

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-06-30 11:51:40 -04:00
Ryan Lortie
137ae2413c g_settings_list_keys() -> _list_items()
This function returns children as well.
2010-06-30 10:02:45 -04:00
Ryan Lortie
168cfc5922 Bug 622127 - GSettings extended key validation
First shot at attempting to implement this in a reasonable way.  See
the bug for more information about why this is needed.
2010-06-28 10:20:50 -04:00
Ryan Lortie
de0464cf89 Tweak GSettings key/schema listing APIs 2010-06-24 12:25:48 -04:00
Ryan Lortie
123699465d GSettings: add g_settings_list_keys()
Second half of bug #622554.
2010-06-24 02:17:34 -04:00
Ryan Lortie
65fc931fb9 Rework the GSettings keyfile backend 2010-06-24 01:39:12 -04:00
Matthias Clasen
13ac216ca3 GIO doc cleanups 2010-06-23 09:25:30 -04:00
Ryan Lortie
7556f660b5 Remove gsettings-schema-convert tool
Having this tool in GLib is a bad idea for a number of reasons:

  - experience has shown that the simple file format was a bad idea

  - the tool is currently implemented with a hack that would require a
    dependency inversion to solve (the tool needs to depend on Python
    GVariant bindings)

  - the tool itself is unmaintained

It will be moved to the GConf git repository so people can continue to
use it for the purpose of converting GConf schemas.
2010-06-21 13:24:40 -04:00
Ryan Lortie
a2888fbbf0 Add a note to docs about paragraphs in schemas 2010-06-18 23:14:46 -04:00
Matthias Clasen
7b1f45c2e8 Fix a mismerge 2010-06-17 19:08:52 -04:00
Matthias Clasen
8a105625b0 Documentation fixups 2010-06-17 16:07:52 -04:00
Matthias Clasen
daee48a0af Update api docs to current api 2010-06-17 15:30:06 -04:00
Matthias Clasen
24f1fa12c1 Add new api 2010-06-17 01:51:23 -04:00
Christian Persch
8c4e1fa0af Add --xml to gdbus-tool to print raw introspected XML
Bug #621442.
2010-06-14 00:02:57 +02:00
David Zeuthen
32f2e9a85b Bug 621213 – GDBusProxy and well-known names
Allow constructing a GDBusProxy for well-known names as discussed here
http://mail.gnome.org/archives/gtk-devel-list/2009-October/msg00075.html
including test cases.

Make it possible to create a GDBusProxy for a GBusType instead of a
GDBusConnection. This requires G_BUS_TYPE_NONE so add that too.

Nuke g_bus_watch_proxy() since one can now more or less use GDBusProxy
for this.

Port gdbus-example-watch-proxy to this new API and include this
example in the GDBusProxy doc page.

Also nuke the GType parameter from the GDBusProxy constructors as
requested here: https://bugzilla.gnome.org/show_bug.cgi?id=621229

Also update the porting guide and other API docs for this change.

Also fix a bug in the signal dispatching code so each subscriber only
get notified once, not N times, for the same signal. Also add a test
case for this.

https://bugzilla.gnome.org/show_bug.cgi?id=621213

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-06-11 18:21:27 -04:00
Ryan Lortie
a8b5353b14 Add g_settings_sync() and use it 2010-06-10 22:30:44 -04:00
Tomeu Vizoso
45e604d029 Add _with_closures alternative functions for those in GDBus that
accept more than one callback.

g_bus_own_name_with_closures
g_bus_own_name_on_connection_with_closures
g_bus_watch_name_with_closures
g_bus_watch_name_on_connection_with_closures
g_bus_watch_proxy_with_closures
g_bus_watch_proxy_on_connection_with_closures

https://bugzilla.gnome.org/show_bug.cgi?id=621092
2010-06-10 18:29:23 +02:00
Matthias Clasen
3b11a7d3f2 Add a lost <SECTION> 2010-06-07 22:22:39 -04:00
Matthias Clasen
6427e93757 Merge the wip/gapplication branch
This adds a GApplication object to GIO, which is the core of
an application support class, supporting
- uniqueness
- exporting actions (simple scripting)
- standard actions (quit, activate)

The implementation for Linux uses D-Bus, takes a name on the
session bus, and exports a org.gtk.Application interface.

Implementations for Win32 and OS X are still missing.
2010-06-07 13:48:42 -04:00
Ryan Lortie
af78f6d418 Bug 620767 - Typo in GSettings documentation
Use the correct variable name and work around the escaping of '@'.
Expand/clarify the section on how translation of <default> is handled.
2010-06-07 13:04:39 +02:00
Matthias Clasen
486c46b945 Include the right header 2010-06-07 06:24:28 -04:00
Ryan Lortie
4733488178 Bug 620582 - a simple GPermission implementation
add GSimplePermission, a trivial const implementation of GPermission

can-request and can-release are always false for this implementation and
the value of 'allowed' is decided at construction.
2010-06-04 22:35:14 +02:00
Ryan Lortie
7a4860d69a Bug 620519 - GPermission
Add an abstract interface representing the permission to perform an
action.
2010-06-04 19:03:38 +02:00
Ryan Lortie
30a8562946 GSettings schema docs: mention need for EXTRA_DIST
Mention that you will need to use EXTRA_DIST for your schema file if it
is distributed with your project.
2010-05-27 13:11:49 -04:00
Ryan Lortie
f2687f588e Remove duplicate copies of migration docs
Fixup for commit 133f66538d which
duplicated the contents of most of the migration documentation by
splitting it out into separate files but keeping the original file
intact (with a rename).

This removes the duplicated content from the renamed file.
2010-05-27 13:07:54 -04:00
Ryan Lortie
b59a5551ec Bug 619038 - increase gsettings.m4 power
handle schema checking, installation, uninstallation, cleaning
2010-05-19 08:55:57 -04:00
Ryan Lortie
8eb377b6f6 glib-compile-schemas rename missed in docs
change a mention of gschema_compile in the docs
2010-05-18 18:24:04 -04:00
Matthias Clasen
4b0fd52e52 Expand information about schema translation
I have added some hints on how to use intltool for translation
of summary and description elements, taken from comments in bug #618523.
2010-05-15 18:25:46 -04:00
Matthias Clasen
c6f01b329c Fix a typo 2010-05-14 00:59:42 -04:00
Matthias Clasen
4e7764fb2d Documentation cleanups 2010-05-14 00:21:39 -04:00
Matthias Clasen
6223341cac Merge branch 'gdbus-merge'
Conflicts:
	docs/reference/gio/gio-docs.xml
	docs/reference/gio/gio-sections.txt
	gio/tests/Makefile.am
2010-05-13 23:08:34 -04:00
Matthias Clasen
a7c4c7de58 Remove a reference to Pango 2010-05-13 22:34:32 -04:00
David Zeuthen
dd3551e7c3 GDBus: update gdbus(1) man page 2010-05-13 18:19:16 -04:00
David Zeuthen
1fd55b8bbf GDBus: Remove g_dbus_is_activated()
It's generally hard to get this right so don't attempt to do so.
2010-05-13 17:44:42 -04:00
David Zeuthen
cb753dfd49 GDBus: Rename ::deny-authentication-peer to ::authorize-authenticated-peer 2010-05-13 16:20:31 -04:00
Matthias Clasen
2d75583fb2 Fill out the export section of the migration guide 2010-05-13 01:04:29 -04:00