Commit Graph

241 Commits

Author SHA1 Message Date
David Zeuthen
366b3ffcde Bug 619142 – Build fixes
- Fix various #include issues

 - Change #error to #warning for the EXTERNAL authentication mechanism.
   It is not clear if this should work on Win32 at all.

 - Call close() before unlink() for the SHA1 keyring

 - Change #error to #warning so we don't forget to do
   permission checking of the .dbus-keyrings directory

 - Use Win32 SID for the SHA1 auth mech

 - Apparently we can't use word 'interface' as an identifier

 - Implement a _g_dbus_win32_get_user_sid() function. For now it's
   private. Don't know if it should be public somewhere. Maybe in
   a future GCredentials support for Win32? I don't know.

 - GFileDescriptorBased is not available on Win32. So avoid using
   it in GLocalFile stuff. Now, Win32 still uses GLocalFile + friends
   (which works with file descriptors) so expose a private function
   to get the fd for an OutputStream so things still work.

 - Fixup gio.symbols

 - Fixup tests/gdbus-peer.c so it builds

With this, at least things compile and the gdbus-peer.exe test case
passes. Which is a great start. I've tested this by cross-compiling on
a x86_64 Fedora 13 host using mingw32 and running the code on a 32-bit
Windows 7 box.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-20 10:53:08 -04:00
David Zeuthen
98e4f7f6fb GDBus: Fix introspection of objects registered at /
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-17 11:08:40 -04:00
David Zeuthen
763c1dab1f GDBus: Use specific variant type in GetAll()
Without this fix, we segfault if the exported object returned an error
on all get_property() calls (in reality, this never happens).

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-14 21:08:01 -04:00
Christian Persch
dc39825aa3 Plug a mem leak in get_uninitialized_connection
Free the bus address after creating the singleton.

==26308== 39,736 (10,517 direct, 29,219 indirect) bytes in 388 blocks
are definitely lost in loss record 14 of 15
==26308==    at 0x4024D2E: malloc (vg_replace_malloc.c:207)
==26308==    by 0x4079A90: g_malloc (gmem.c:135)
==26308==    by 0x4079DC8: g_malloc_n (gmem.c:252)
==26308==    by 0x4095607: g_strdup (gstrfuncs.c:102)
==26308==    by 0x4216B9A: g_dbus_address_get_for_bus_sync
(gdbusaddress.c:961)
==26308==    by 0x422A7AE: get_uninitialized_connection
(gdbusconnection.c:5241)

Bug #618622.
2010-05-15 00:12:17 +02:00
Matthias Clasen
1d22b64843 Cleanups
Sort #includes a bit better, and don't include platform-specific
headers in gio.h.
2010-05-14 08:38:07 -04:00
Matthias Clasen
6e8637e478 The default timeout is 25s 2010-05-13 22:15:47 -04:00
Matthias Clasen
bdc29f82d3 Document more floating variant details. 2010-05-13 21:53:51 -04:00
Christian Persch
4ad4c306c3 Plug some mem leaks
g_variant_get (v, "s", &str) returns a string copy; use "&s" instead.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-13 16:43:41 -04:00
David Zeuthen
60e7ae26af GDBus: Add GDBusAuthObserver param in g_dbus_connection_new_for_address()
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).
2010-05-13 16:32:11 -04:00
David Zeuthen
cb753dfd49 GDBus: Rename ::deny-authentication-peer to ::authorize-authenticated-peer 2010-05-13 16:20:31 -04:00
David Zeuthen
33952347ff GDBus: Make message serialization routines take capabilities param
This is needed to e.g. allow encoding maybe types (once we add
G_DBUS_CAPABILITY_FLAGS_MAYBE_TYPES) if, and only if, that capability
has been negotiated with the peer (via authentication).
2010-05-13 14:03:58 -04:00
Matthias Clasen
107b4d4bae remove the redundant interface_name parameter 2010-05-13 13:09:58 -04:00
David Zeuthen
82158afdad GDBus: Catch up with new PropertiesChanged signal
After a long discussion, this has finally been standardized in the
D-Bus spec. See

 http://lists.freedesktop.org/archives/dbus/2010-May/012667.html
 http://lists.freedesktop.org/archives/dbus/2010-May/012712.html

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-05-13 11:56:15 -04:00
Matthias Clasen
9a065edf6f Add an example of exporting a GObject
This is more manual work than dbus-glib.
2010-05-13 00:40:41 -04:00
Matthias Clasen
cce08f1973 Add a note about implemented standard interfaces 2010-05-12 21:55:09 -04:00
David Zeuthen
d40767fc62 GDBus: Add an example of a GDBusProxy subclass 2010-05-12 15:52:08 -04:00
Matthias Clasen
7c0196f026 Update an example to the latest auth observer api 2010-05-12 13:01:40 -04:00
Matthias Clasen
e2b9d07765 Update TODO list 2010-05-11 23:26:51 -04:00
Matthias Clasen
a63d3bb868 mention inline use of floating variants 2010-05-11 23:18:48 -04:00
Matthias Clasen
ab2ff1a307 Remove properties from GDBusMethodInvocation class 2010-05-11 22:51:14 -04:00
Matthias Clasen
c4cf88c22f Document remove_filter 2010-05-11 22:50:40 -04:00
Matthias Clasen
26f65d83c5 Don't refer to nonexisting API. 2010-05-11 21:59:42 -04:00
Matthias Clasen
e4b1e48fca Match up parameter names
and similar cleanups to make gtk-doc happy.
2010-05-11 20:57:44 -04:00
David Zeuthen
8c523c069b GDBus: Update TODO list 2010-05-11 12:04:37 -04:00
David Zeuthen
6e23b0b785 GDBus: Add TODO item about a need to validate data / messages 2010-05-10 14:43:08 -04:00
David Zeuthen
adf50912dd GDBus Add TODO items about finding and launching bus instances 2010-05-10 14:07:13 -04:00
David Zeuthen
7e8b07ae3b GDBus: Use GVariant instead of GHashTable for GDBusProxy::g-properties-changed 2010-05-10 13:31:54 -04:00
David Zeuthen
869b4c6833 GDBus: Use call() instead of invoke_method()
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).
2010-05-10 11:47:08 -04:00
Matthias Clasen
5d1135618e Trivia 2010-05-10 08:07:07 -04:00
Matthias Clasen
25a8aa5d88 Cosmetic fixes
Use P_() for properties, fix up indentation, etc.
2010-05-09 22:13:18 -04:00
Matthias Clasen
0cf467c2ca Update copyright years to include 2010 2010-05-09 13:14:55 -04:00
Matthias Clasen
e82eea6fda Microoptimize string reallocations 2010-05-09 13:09:54 -04:00
Matthias Clasen
8315eb77d5 Some documentation tweaks
Add links to the D-Bus docs in some places, and various
other additions.
2010-05-09 01:44:11 -04:00
David Zeuthen
f1855c2f77 GDBus: add TODO item about maybe having to rework ::g-properties-changed 2010-05-07 15:02:37 -04:00
David Zeuthen
85c85ae63a GDBus: add TODO item about the need to rewrite private GDBusAuth* classes 2010-05-07 14:57:20 -04:00
David Zeuthen
5bd876bef0 Add TODO item about wanting G_DBUS_NONCE_TCP_TMPDIR 2010-05-07 14:56:01 -04:00
David Zeuthen
46ce134d51 GDBus: Add new symbols to gio.symbols 2010-05-06 17:31:51 -04:00
David Zeuthen
fb1b4599a0 GDBus: Fix up i18n 2010-05-06 16:34:23 -04:00
David Zeuthen
0fd6498cd8 Add "Since: 2.26" to all new GDBus API 2010-05-06 16:02:08 -04:00
David Zeuthen
c490c14f4e Set up gtk-doc for GDBus
Also move send_credentials() and receive_credentials() to
GUnixConnection. This code might change, discussion is still ongoing
in

 https://bugzilla.gnome.org/show_bug.cgi?id=617483.
2010-05-06 15:31:45 -04:00
David Zeuthen
d0a14469d0 Initial GDBus code-drop from GDBus-standalone repo
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>
2010-05-06 14:21:32 -04:00