Commit Graph

136 Commits

Author SHA1 Message Date
Ryan Lortie
6dfb9d583f Add GMenuModel testcases 2011-12-08 18:05:12 -05:00
Tristan Van Berkom
a00530ecb0 GDBusInterfaceSkeleton: make it possible to export on multiple connections
This is useful in peer-to-peer connections.

With minor changes by David Zeuthen <davidz@redhat.com>.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-12-02 11:20:21 -05:00
Ryan Lortie
59623973fa dist gio/tests/key8.pem 2011-11-21 14:23:17 -05:00
Simon McVittie
4bb411948c Add test case for #662395
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-11-21 18:16:51 +00:00
Simon McVittie
96deb40caa GDBus tests: factor out TestIOStream, test_pipe and test_bidi_pipe
These might even make useful public API if they grew a Windows
implementation, but for now they can be Unix-only test API.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-11-21 18:15:26 +00:00
Matthias Clasen
011a71cf71 'make dist' fixes 2011-11-17 14:03:39 +00:00
Benjamin Otte
60c42f6648 tests: Add tests for fileattributematchers 2011-11-16 17:18:58 +01:00
Dan Winship
fe5ba0f291 add GNetworkMonitor, for... monitoring the network
Add GNetworkMonitor and its associated extension point, provide a base
implementation that always claims the network is available, and a
netlink-based implementation built on top of that that actually tracks
the network state.

https://bugzilla.gnome.org/show_bug.cgi?id=620932
2011-11-14 13:42:30 -05:00
Matthias Clasen
8ff94df632 Add a tests of some GVfs functions
https://bugzilla.gnome.org/show_bug.cgi?id=656621
2011-10-16 16:09:33 -04:00
David Zeuthen
3c4d3dec09 GDBusConnection: Make pending calls error when the connection is lost
If the connection to the bus is lost while a method call is ongoing,
the method call does not get cancelled. Instead it just sits around
until it times out.

This is visible here on XO laptops when stopping the display manager
during shutdown. imsettings starts sending a sync message to give up
its bus name (via g_bus_unown_name()), then systemd terminates the
session bus at approximately the same time. imsettings then hangs for
about 20 seconds before timing out the message.

 http://lists.freedesktop.org/archives/dbus/2011-September/014717.html

imsettings behaviour could be improved as described in that thread,
but I think this is a glib bug. I've also come up with the attached
patch which fixes it.

Credits for the bug-fix goes to Daniel Drake <dsd@laptop.org>. The test
case was written by David Zeuthen <zeuthen@gmail.com>.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-10-07 14:23:03 -04:00
David Zeuthen
f34908ef15 GDBus: Regenerate code when the codegen or options passed to it changes
https://bugzilla.gnome.org/show_bug.cgi?id=660498

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-10-05 12:42:06 -04:00
David Zeuthen
48494dd552 gdbus-codegen: Support Ugly_Case for given C namespace
https://bugzilla.gnome.org/show_bug.cgi?id=658976

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-16 16:01:13 -04:00
Simon McVittie
20497f7af9 Regression test for closing a stream, slowly, while a message is queued
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=651268
Bug-NB: NB#271520
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-16 12:00:22 -04:00
Ryan Lortie
39294664a6 GApplication test: fix testcase to avoid fork()
The GApplication test case tried to fork() while using GMainLoop,
causing problems.  Avoid doing that by splitting the child process into
a separate program and spawning it in the usual way.

https://bugzilla.gnome.org/show_bug.cgi?id=658999
2011-09-14 14:09:12 -04:00
Matthias Clasen
73c427fab9 Expand mimeapps test
This adds a test involving both defaults.list and mimeapps.list.
2011-09-12 01:46:48 -04:00
Matthias Clasen
011c0b488f Add some tests for mimeapps.list handling
These tests directly look at mimeapps.list to verify that
we make the expected changes to the database.
2011-09-09 23:44:41 -04:00
Stef Walter
49bb7cff4b gio: Add GTlsInteraction interaction method invocation guarantees
* Add 'invoke' style method, which can be used to call an interaction
   from any thread. The interaction will be run in the appropriate
   #GMainContext
 * Sync methods can be called whether main loop is running or not.
 * Derived classes can choose to implement only sync or async
   interaction method, and the invoke method will fill in the blanks.
 * Documentation for the above.
 * Tests for the above.

https://bugzilla.gnome.org/show_bug.cgi?id=657567
2011-08-30 18:30:02 +02:00
Dieter Verfaillie
cd0cd95078 Introduce the UNINSTALLED_GLIB_SRCDIR environment variable
This makes it possible to avoid setting PYTHONPATH in
Makefile.am files.

https://bugzilla.gnome.org/show_bug.cgi?id=650763
2011-08-25 16:55:49 -04:00
Dieter Verfaillie
5391aae009 Introduce the UNINSTALLED_GLIB_BUILDDIR environment variable
This makes it possible to also use relative imports for
gdbus-codegen's config module.

https://bugzilla.gnome.org/show_bug.cgi?id=650763
2011-08-25 16:55:49 -04:00
Stef Walter
26548e05bb Merge branch 'concurrent-cancellable' 2011-08-19 11:21:11 +02:00
Stef Walter
54579bf88f gio: GCancellable can be used concurrently
* Update documentation to note that GCancellable can be used
   concurrently by multiple operations.
 * Add documentation to g_cancellable_reset that behavior is
   undefined if called from within cancelled handler.
 * Add test for multiple concurrent operations using the same
   cancellable.

https://bugzilla.gnome.org/show_bug.cgi?id=656387
2011-08-19 11:13:37 +02:00
Ryan Lortie
0a4663343f distcheck fixes 2011-08-15 21:01:23 -04:00
Simon McVittie
67cf3ea368 Add a stress-test for GDBusProxy in threads with no default main context
Destroying a GDBusProxy in a thread used to race with NameOwnerChanged
being delivered to the main context's thread (GNOME #651133).

Also, g_dbus_proxy_call_sync in a thread would race with NameOwnerChanged
being delivered to the main context's thread and rewriting the name_owner
(GNOME #656039).

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=656039
Bug-NB: NB#259760
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-08-15 12:50:04 -04:00
Stef Walter
0f99cfa882 GTlsDatabase and related objects
The database is an abstract object implemented by the various TLS
backends, which is used by GTlsConnection to lookup certificates
and keys, as well as verify certificate chains.

Also add GTlsInteraction, which can be used to prompt the user
for a password or PIN (used with the database).

https://bugzilla.gnome.org/show_bug.cgi?id=636572
2011-08-04 08:54:55 +02:00
Nicolas Dufresne
dbb78fe57d Added TLS PEM parser unit test 2011-07-27 16:23:33 -04:00
David Zeuthen
b7f3638e5c More gdbus-codegen fixed to build on non-Unix
https://bugzilla.gnome.org/show_bug.cgi?id=655148#c6

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-07-26 10:05:57 -04:00
Colin Walters
9053ad07ba Fix a srcdir!=builddir issue, and export that we support it
Future jhbuild versions will consume the BUILD API and automatically
use a builddir, so mark us as supporting it.
2011-06-21 10:30:07 -04:00
Colin Walters
5ec6eafb0e gdbus-codegen tests: Fix usage of top_srcddir
Based on a patch from Rico Tzschichholz.
2011-06-13 14:17:44 -04:00
David Zeuthen
f819aa5f17 gdbus-codegen: Fix build
See https://bugzilla.gnome.org/show_bug.cgi?id=651998 for details.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-09 11:53:08 -04:00
Colin Walters
62072b2a04 gdbus codegen: Ensure PYTHONPATH is set correctly for srcdir != builddir
We need to pick up the Python files from the source directory, so set
PYTHONPATH.
2011-06-06 17:14:45 -04:00
David Zeuthen
723adbc2fe Move gdbus-codegen example code and docs into separate directories
This avoids the generated types (e.g. ExampleAnimal, ExampleCat,
ExampleObject and ExampleObjectManagerClient) being referenced in the
core gio docs. This was requested by Matthias.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-06-03 14:18:56 -04:00
Matthias Clasen
2fb57ff46f Quiet down the build a bit 2011-05-28 14:29:08 -04:00
Matthias Clasen
d5d4659a60 Try to fix distcheck 2011-05-04 19:44:05 -04:00
David Zeuthen
58eb4da5c5 Fix build broken by previous commit
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-23 19:26:56 -04:00
David Zeuthen
b5b34fa2f2 gdbus-codegen: Include docs for generated code in the GIO docs
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-23 17:43:03 -04:00
David Zeuthen
76d3653721 gdbus-codegen: Add --c-generate-object-manager option + doc improvements
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-12 11:50:34 -04:00
David Zeuthen
8276d0e557 Spiff up the "Migrating to GDBus" docs a bit
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-12 09:28:09 -04:00
David Zeuthen
e5525f1010 GDBus: Add ObjectManager example
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-11 16:35:14 -04:00
David Zeuthen
4dffec8906 Dist test-codegen.xml
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-11 14:59:19 -04:00
David Zeuthen
9c1941c07f GDBus: Add test-suite for new ObjectManager and gdbus-codegen(1) code
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-11 10:54:52 -04:00
Matthias Clasen
321682871b Try harder to explain GApplicationCommandline
Trying to answer some of the questions in
https://bugzilla.gnome.org/show_bug.cgi?id=643468
2011-03-03 22:40:48 -05:00
Xavier Claessens
0a2d47b626 Add g_io_stream_splice_async/finish()
That function splice the output stream of both GIOStreams to the input stream
of the other GIOStream.
2010-12-13 17:36:12 +01:00
Christian Persch
57143e311d Inherit gettext-domain from <schemalist>
When the <schema> doesn't have a 'gettext-domain' attribute, but
the <schemalist> does, use that one.

Bug #635640.
2010-11-28 19:01:21 +01:00
Dan Winship
c20c2c0abd Add pollable input/output streams
When interfacing with APIs that expect unix-style async I/O, it is
useful to be able to tell in advance whether a read/write is going to
block. This adds new interfaces GPollableInputStream and
GPollableOutputStream that can be implemented by a GInputStream or
GOutputStream to add _is_readable/_is_writable, _create_source, and
_read_nonblocking/_write_nonblocking methods.

Also, implement for GUnixInput/OutputStream and
GSocketInput/OutputStream

https://bugzilla.gnome.org/show_bug.cgi?id=634241
2010-11-26 15:08:08 -05:00
Matthias Clasen
c34bcefa78 Add an example of using GApplication with actions 2010-10-30 22:19:02 -04:00
Matthias Clasen
b0e45c9799 Add another example for commandline handling
Also, clarify some aspects in the documentation.
2010-10-23 11:59:29 +02:00
Matthias Clasen
499d9ba8b8 Add some examples to the GApplication docs 2010-10-23 02:31:16 +02:00
Dan Winship
87d06109ab GSocket: set protocol when using g_socket_new_from_fd()
Otherwise, attempting to create a GSocketConnection from the socket
will likely return the wrong type, since the protocol won't match any
of the registered subtypes.

Also add the start of a GSocket test program (from davidz).

https://bugzilla.gnome.org/show_bug.cgi?id=627171
2010-10-22 14:42:41 -04:00
Ryan Lortie
2854c373e1 GApplication test case 2010-10-19 01:16:46 +02:00
Ryan Lortie
a7923a4aa3 new GApplication implementation 2010-10-19 01:16:46 +02:00