Commit Graph

8392 Commits

Author SHA1 Message Date
David Zeuthen
9b0a08449f GDBusAuthObserver: Fix docs
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-20 16:34:28 -04:00
David Zeuthen
7eba41346e Bug 617483 – Credentials passing
- Make GCredentials instance and class structures private so it can't
   be subclassed and we don't have to worry about ABI compat
   issues. This also allows us to get rid of the GCredentialsPrivate
   struct.

 - Add a GCredentialsType enumeration that is used whenever exchanging
   pointers with the user. This allows us to support OSes with
   multiple native credential types. In particular, it allows
   supporting OSes where the native credential evolves or even changes
   over time.

 - Add g_socket_get_credentials() method.

 - Add tests for g_socket_get_credentials(). Right now this is in the
   GDBus peer-to-peer test case but we can change that later.

 - Move GTcpConnection into a separate gtk-doc page as was already
   half-done with GUnixConnection. Also finish the GUnixConnection
   move and ensure send_credentials() and receive_credentials()
   methods are in the docs. Also nuke comment about GTcpConnection
   being empty compared to its superclass.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-20 16:34:18 -04:00
David Zeuthen
b3cf5cbd0b GDBusServer: Avoid handling incoming connections after stop() has been called
Without this fix, we'd sometimes run code after stop() and finalize()
to handle incoming requests. This was observed in the gdbus-peer test
case occasionally crashing:

 $ ./gdbus-peer
 /gdbus/peer-to-peer: OK
 /gdbus/delayed-message-processing: OK
 /gdbus/nonce-tcp:
 GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GDBusServer'
 aborting...

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-20 12:14:30 -04:00
David Zeuthen
2be167f57c GDBus: Add support for D-Bus type 'h' (ie. G_VARIANT_TYPE_HANDLE)
This allows sending and receiving D-Bus messages with instances of the
'h' D-Bus type. Unlike libdbus-1's dbus_message_iter_get_basic()
method, g_variant_get_handle() does not return a duplicated unix file
descriptor (that must be closed with close(2)) - instead, it returns
an index that can be used to get/dup the file descriptor from a
GUnixFDList object that can be obtained from the GDBusMessage object.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-20 11:38:23 -04:00
Ryan Lortie
66388120d2 Move #include <sys/wait.h> down
Until after we include the glib stuff, so that we have G_OS_UNIX
defined.

For some reason <stdlib.h> pulls in <sys/wait.h> on Fedora so this
wasn't a problem, but many others have reported the issue.
2010-07-20 10:49:30 -04:00
Jorge González
2f50567557 Updated Spanish translation 2010-07-20 08:57:35 +02:00
noch
c3737739ae Corrected and updated the new version of the Armenian translation - po file. 2010-07-20 10:33:32 +05:00
David Zeuthen
493d8cb292 GDBus: Introduce G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL
This is preferable to the current magical solution whereby the serial
is only rewritten if non-zero. In particular, it makes it easier to
send the same message on multiple connections without having to reset
the serial number.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-19 17:05:28 -04:00
David Zeuthen
9d7b00638f GDBus: Forgot to add g_dbus_send_message_flags_get_type() to gio.symbols
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-07-19 16:11:20 -04:00
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
Jorge González
f81601f735 Updated Spanish translation 2010-07-18 20:29:41 +02:00
Fran Diéguez
8ab26d42e9 Fixed headers in galician translation file 2010-07-18 19:58:33 +02:00
Yaron Shahrabani
5fb9c9f7de Updated Hebrew translation. 2010-07-17 13:11:08 +03: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
Yaron Shahrabani
27cee11b6c Updated Hebrew translation. 2010-07-16 17:20:42 +03: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
44cf10adce Add annotations for g_variant_new_strv and g_variant_get_strv 2010-07-15 17:05:00 +02:00
Tomeu Vizoso
58f1977151 Add annotations to g_dbus_proxy_new_sync 2010-07-15 15:33:16 +02:00
Aron Xu
6393833570 Update Simplified Chinese translation. 2010-07-15 17:56:14 +08:00
Lucian Adrian Grijincu
2bd201c8b2 po: Updated Romanian translation 2010-07-15 02:10:43 +03:00
Mario Blättermann
d581a7faf1 [i18n] Updated German translation 2010-07-14 23:06:18 +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
Chao-Hsiung Liao
7e0121dfe0 Updated Traditional Chinese translation(Hong Kong and Taiwan) 2010-07-14 19:28:34 +08: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
Javier Jardón
de56aca0b5 Clean autotools config a bit
New requirements:
autoconf >= 2.62
automake >= 1.10
libtool >= 2.2
2010-07-13 19:36:37 +02:00
Ryan Lortie
3a8ab85d96 rename configure.in to configure.ac 2010-07-13 11:59:16 -04: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
Ryan Lortie
de5afbc7cc More gtk-doc cleanups for glib/ 2010-07-12 17:32:44 -04:00
Ryan Lortie
92df91590f trivial whitespace fix 2010-07-12 17:31:03 -04:00
Ryan Lortie
7791fce38a Fix some glib docs warnings
Remove some symbols from glib-sections.txt that gtk-doc has no idea
about.

Add proper callback typedefs for GTester (gtk-doc dislikes inline
function types).

Fix some other minor issues.
2010-07-12 16:56:52 -04:00
Matthias Clasen
dc8cf867c8 Don't return FALSE when a pointer is expected
Pointed out in bug 623956
2010-07-12 16:35:18 -04:00
Ryan Lortie
90285b0643 Bump gtk-doc dependency to 1.15
Use the multiple source-directory support contained therein.
2010-07-12 15:33:05 -04:00
Ryan Lortie
83d67bf2e7 move glibconfig.h to glib/ 2010-07-12 15:33:05 -04:00
Colin Walters
29a6fb68b7 Don't attempt to build dtrace support on OS X
Apparently the OS X "dtrace" command is different from the Sun one,
which is what Linux supports.  Since I don't have access to an OS X
machine to test build patches on, simply disable dtrace on OS X
for now.

https://bugzilla.gnome.org/show_bug.cgi?id=622697
2010-07-12 10:00:35 -04:00
Baurzhan Muftakhidinov
e5834637eb Added Kazakh translation for Kazakh 2010-07-12 16:19:45 +03:00