Commit Graph

1447 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
Ryan Lortie
1a06bd8d3f Update the GDBus subtree example for the new API 2010-07-19 15:03:54 -04:00
David Hoyt
c7c573afb6 Bug 624754 – gdbusaddress.c missing sys/wait.h
https://bugzilla.gnome.org/show_bug.cgi?id=624754

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-19 13:53:17 -04:00
David Zeuthen
f30aef9a10 GDBus: Add nonce-tcp: test case
Also fix a couple of TODO items in gdbusaddress.c

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-16 13:22:45 -04:00
Ryan Lortie
fe6338f446 g_warning on inconsistent subtree behaviour
If the subtree introspection function indicates that an interface exists
but then the dispatch function returns a NULL vtable for that interface,
issue a g_warning pointing programmers in the right direction.
2010-07-15 19:38:45 -04:00
Julien Cristau
732ff1b27c gio: don't assume that SOCK_CLOEXEC is supported whenever it's defined
Just because SOCK_CLOEXEC was defined at build time doesn't mean the
kernel we're running on supports it.  So if socket() fails with EINVAL,
try again without the flag.

https://bugzilla.gnome.org/show_bug.cgi?id=624463
2010-07-15 18:06:05 -04:00
Ryan Lortie
8a2d157d49 Bug 624484: GDBusSubtreeDispatchFunc clarification
Pass NULL rather than "/" for the toplevel of a subtree.

Add clarification to the docs about how trees are flat.
2010-07-15 17:32:04 -04:00
Ryan Lortie
ca14ab7ac0 Bug 624483: GDBusSubtreeEnumerateFunc clarification
Clarify a couple of things in the docs:

  1) you must return flat names (no slashes)

  2) g_strfreev() will be called on the result

  3) a benefit of using the DISPATCH_TO_UNENUMERATED flag
2010-07-15 17:32:04 -04:00
Ryan Lortie
e6b5546cf5 Bug 624473: GDBusSubtreeIntrospectFunc return type
Return a NULL terminated C array instead of a GPtrArray

Also, document that %NULL is a permitted return value and clarify its
meaning.

Finally, avoid calling the enumeration function during dispatch when the
G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag was given.
2010-07-15 17:31:59 -04:00
David Zeuthen
48b1fe948c Bug 623810 – Message serialization bug
https://bugzilla.gnome.org/show_bug.cgi?id=623810

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-15 12:20:30 -04:00
Tomeu Vizoso
58f1977151 Add annotations to g_dbus_proxy_new_sync 2010-07-15 15:33:16 +02:00
David Zeuthen
baf383d1b1 GDBusConnection: copy object and subtree virtual tables
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-14 14:46:12 -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
David Zeuthen
14e37ef796 GDBusMessage: Make endianness for D-Bus messages match host byte order
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-14 11:41:09 -04:00
David Zeuthen
497edd8b40 Bug 623815 – Don't check sender for GDBusProxy objects where name is not set
Based on a patch from Peng Huang <shawn.p.huang@gmail.com>, thanks!

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-14 11:19:24 -04:00
Colin Walters
8a2e7d371f Make default-quit not apply if register=FALSE
Callers who are using g_application_unregistered_try_new are
likely wanting to continue doing something else if _register()
fails.  Change the semantics so that passing register=FALSE
unsets default-quit as well.  This means that a later _register()
call will send Activate but continue the process.

https://bugzilla.gnome.org/show_bug.cgi?id=622005
2010-07-14 09:39:47 -04:00
Ryan Lortie
5344c22810 gio/ docs fixup 2010-07-12 18:30:14 -04:00
Ryan Lortie
83d67bf2e7 move glibconfig.h to glib/ 2010-07-12 15:33:05 -04:00
Colin Walters
d2fe46b476 Annotate all custom GIO GSource using g_source_set_name
Naming the sources allows easier debugging with e.g. SystemTap
probes.

https://bugzilla.gnome.org/show_bug.cgi?id=620536
2010-07-10 20:09:34 -04:00
Matthias Clasen
3dca4ce434 One more dubious return 2010-07-10 20:02:47 -04:00
Matthias Clasen
29babb9fc8 Minor cleanup 2010-07-10 18:04:22 -04:00
Matthias Clasen
f8e22856c6 Add a GAppInfoCreate flag for startup-notification
Using this flag, it will be possible to launch apps without a
desktop file, in the same way that gdk_spawn_... lets you do.

Requested in bug 599223.
2010-07-10 17:57:45 -04:00
Matthias Clasen
5f1490e94a Fix sparse warnings
These were listed in bug 623955
2010-07-10 17:21:32 -04:00
Matthias Clasen
41f4aba2d2 Chain up in g_settings_finalize
Requested in bug 623954
2010-07-10 17:12:31 -04:00
Matthias Clasen
551461b23a Fix some leaks in the inotify code
Also avoid creating some unused objects. Patch by Carlos Garnacho,
bug 613057
2010-07-09 08:33:27 -04:00
Matthias Clasen
c24a29e13b Adapt to recent MLS changes
g_file_query_info returns non-NULL more often now.
2010-07-09 07:24:08 -04:00
Matthias Clasen
448ac22e80 Fix an oversight in the previous commit 2010-07-08 16:24:44 -04:00
Matthias Clasen
33f7f6a748 Use glib infrastructure to parse debug flags
Proposed in bug 623319
2010-07-08 16:22:16 -04:00
Matthias Clasen
29850d03e8 Be a bit more picky when deciding if mounts are internal
Complained about in bug 623780.
2010-07-08 15:18:05 -04:00
Matthias Clasen
349aab2bd4 A little more correctness in formatting pids
Requested in bug 623772
2010-07-08 15:11:24 -04:00
Matthias Clasen
fcddf9c2a1 Escape arguments when putting together a cmdline
See bug 623770
2010-07-08 14:58:33 -04:00
Matthias Clasen
607fec50e6 xinclude the dtd
Keeping two copies in sync manually gets tiresome.
2010-07-08 14:38:55 -04:00
Matthias Clasen
c7816005f9 Update the dtd to match the implementation
See bug 623720
2010-07-08 14:29:17 -04:00
Matthias Clasen
71e7b5800a Handle MLS selinux policy better
Following the behaviour of ls here, we should return at least the
file name, if we can't get any other information about a file. To
do this, handle EACCESS on stat() calls.

Patch by Tomas Bzatek, see bug 623692
2010-07-08 14:19:08 -04:00
Matthias Clasen
5adf506d5b Use proper variables
And also make sure we don't read garbage.
2010-07-08 11:33:21 -04:00
Ryan Lortie
5b946e0504 gio/: fully remove gioalias hacks 2010-07-07 19:53:22 -04:00
Ryan Lortie
c243905c95 .gitignore updates 2010-07-07 16:52:41 -04:00
David Zeuthen
abc65b233c GDBus: Hide instance structures for classes we don't want to be subclassed
This also allows us to nuke the priv-> pointers and save a couple of
indirections.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-07 16:36:51 -04:00
Ryan Lortie
d9e90c3894 GVariant: improve bytestring support
- add G_VARIANT_TYPE_BYTESTRING, _BYTESTRING_ARRAY, _STRING_ARRAY

 - remove g_variant_{new,get}_byte_array functions

 - add g_variant_{new,get,dup}_bytestring{,_array} functions

 - remove undocumented support for deserialising arrays of objectpaths
   or signature strngs using g_variant_get_strv()

 - add and document new format strings '^ay', '^&ay', '^aay' and '^a&ay'

 - update GApplication to use the new API

 - update GSettings binding code to use the new API

 - add tests
2010-07-07 16:25:48 -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
acc9bb2403 GDBus: Only rewrite serial number if g_dbus_message_get_serial() returns 0
While this a dangerous thing to allow (collissions, reply_serial not
matching up etc.), the added flexibility makes this a good trade-off -
for example, with this feature, it's now a lot easier to build message
routers.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-07 11:06:23 -04:00
Ryan Lortie
746721293b GSettings: warn if use the 'memory' backend
but only if it was not explicitly selected.
2010-07-07 10:56:57 -04:00
Ryan Lortie
6ae4d31e75 trivial GSettings docs fix 2010-07-07 10:46:13 -04:00
David Zeuthen
a38fed1b43 Bug 623538 – GDBusProxy::g-properties-changed emission for corner cases
Also emit GDBusProxy::g-properties-changed when dropping (when the
name owner vanishes) or populating (when loading properties) the
property cache.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-07 09:50:44 -04:00
David Zeuthen
ea0607438b Bug 623537 – GDBusProxy has weird checking on NameOwnerChanged
Remove misleading (and always true) check on the name that the
NameOwnerChanged signal is for.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-07 09:07:23 -04:00
Matthias Clasen
99670eaccc Fix some errors in translated strings
gettext can't handle macros, so we have to use literal format
specifiers, unfortunately.
2010-07-07 07:37:42 -04:00
Matthias Clasen
bad9a3718e Clear the buffer initially 2010-07-07 01:00:58 -04:00