Commit Graph

609 Commits

Author SHA1 Message Date
Xavier Claessens
6f1b574cea Doc: Fix missing glibconfig.h when builddir!=srcdir
Currently the doc is incomplete when builddir!=srcdir
(e.g. debian package) because glibconfig.h is generared from
configure.ac and is thus missing from srcdir. This leads to
missing doc for symbols like G_GINT64_FORMAT.

https://bugzilla.gnome.org/show_bug.cgi?id=734469
2015-11-02 10:02:43 -05:00
Xavier Claessens
86a7c864b3 Doc: copy included example files
This fix missing files when src_dir != build_dir.

https://bugzilla.gnome.org/show_bug.cgi?id=734469
2015-11-02 09:26:58 -05:00
Rico Tzschichholz
0d4f6afcdf docs: Add index for 2.48 api 2015-10-25 19:42:18 +01:00
Philip Withnall
128c413261 gsocketconnectable: Add a to_string() virtual method
Add string serialisation functions for GNetworkAddress, GSocketAddress,
GUnixSocketAddress, GInetSocketAddress, GNetworkService and
GSocketConnectable. These are intended for use in debug output, not for
serialisation in network or disc protocols.

They are implemented as a new virtual method on GSocketConnectable:
g_socket_connectable_to_string().

GInetSocketAddress and GUnixSocketAddress now implement
GSocketConnectable directly to implement to_string(). Previously they
implemented it via their abstract parent class, GSocketAddress.

https://bugzilla.gnome.org/show_bug.cgi?id=737116
2015-10-13 15:42:14 +01:00
Philip Withnall
4e631d2e5f gio: Add GDatagramBased interface and rebase GSocket on it
GDatagramBased is an interface abstracting datagram-based communications
in the style of the Berkeley sockets API. It may be contrasted to (for
example) GIOStream, which supports only streaming I/O.

GDatagramBased allows socket-like communications to be done through any
object, not just a concrete GSocket (which wraps socket()).

This adds the GDatagramBased interface, and implements it in GSocket.

https://bugzilla.gnome.org/show_bug.cgi?id=697907
2015-10-13 15:33:48 +01:00
Philip Withnall
f62cbfc022 gsocket: Add g_socket_receive_messages()
Add support for receiving multiple messages with a single system call,
using recvmmsg() if available. Otherwise, fall back to looping over
g_socket_receive_message().

This adds new API, g_socket_receive_messages(), and corresponding unit
tests.

https://bugzilla.gnome.org/show_bug.cgi?id=751924
2015-10-01 14:10:10 +01:00
Philip Withnall
8c4c16ddf4 giotypes: Add GInputMessage struct
This complements the GOutputMessage struct. It will shortly be used for
adding a g_socket_receive_messages() function, but needs to be committed
first to allow some internal refactoring of GSocket.

https://bugzilla.gnome.org/show_bug.cgi?id=751924
2015-10-01 13:58:07 +01:00
Matthias Clasen
2bc094264b Documentation fixups
Various parameter fixups and symbol list additions.
2015-09-21 06:44:58 -04:00
Matthias Clasen
e5734c37a6 Add g_list_store_sort
GListStore already has a g_list_store_insert_sorted function,
which can be used to keep the list sorted according to a fixed
sort function. But if the sort function changes (as e.g. with
sort columns in a list UI), the entire list needs to be
resorted. In that case, you want g_list_store_sort().

https://bugzilla.gnome.org/show_bug.cgi?id=754152
2015-08-31 10:40:45 -04:00
Debarshi Ray
fa0f51ddf8 fileinfo: Add a G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE attribute
This is meant for opaque, non-POSIX-like backends to indicate that the
URI is not persistent. Applications should look at
G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET for the persistent URI.
Examples of such backends could be a portal for letting sandboxed
applications access the file-system, or a database-backed storage like
Google Drive.

In these cases, the user visible file and folder names are different
from the real identifiers, used by the backend. So, a request to
create google-drive://user@gmail.com/foo/New\ File, would actually
lead to google-drive://user@gmail.com/foo/bar on the server even though
the user visible name is still "New File". Since the server-defined URI
is persistent and sanity-checked by the backend, it is recommended that
applications switch to it as soon as possible. Backends will try to
keep a mapping from "fake" to "real" URIs, but those are only on a
best effort basis. They might not be persistent or have the same
guarantees as the "real" URIs.

https://bugzilla.gnome.org/show_bug.cgi?id=741602
2015-08-20 18:40:02 +02:00
Janusz Lewandowski
5d014a802a Add a g_dbus_connection_register_object_with_closures function
This is a binding-friendly version of g_dbus_connection_register_object.
Based on a patch by Martin Pitt and the code of g_bus_watch_name_with_closures.

https://bugzilla.gnome.org/show_bug.cgi?id=656325
2015-08-18 16:41:12 -04:00
Richard Hughes
a80e7db1a8 gio: Add network metered information to GNetworkMonitor
Add a property to GNetworkMonitor indicating if the network
is metered, e.g. subject to limitations set by service providers.

The default value is FALSE

https://bugzilla.gnome.org/show_bug.cgi?id=750282
2015-07-27 06:44:52 -04:00
Xavier Claessens
73a71d6a43 doc: Add missing GTlsDatabaseClass
https://bugzilla.gnome.org/show_bug.cgi?id=750573
2015-06-08 16:04:53 -04:00
Matthias Clasen
1405eeeed7 Add registry helpers to the docs 2015-06-05 19:13:19 -04:00
Matthias Clasen
007f6684c5 Add index for new api 2015-06-05 15:27:59 -04:00
Matthias Clasen
01e9302673 Add new API to docs 2015-06-05 15:27:25 -04:00
Xavier Claessens
0d8dd2cf5c doc: add GTlsInteractionClass
https://bugzilla.gnome.org/show_bug.cgi?id=750344
2015-06-03 10:19:02 -04:00
Alexander Larsson
f8273f39a1 Add GNativeSocketAddress for handling "other" addresses
Instead of just dropping address types that we're not specifically
handling we return a GNativeSocketAddress which is just a dummy
container for the stuct sockaddr.

https://bugzilla.gnome.org/show_bug.cgi?id=750203
2015-06-03 08:52:54 +02:00
Matthias Clasen
89d46d1bdc docs: Document the --strict option of glib-compile-schemas
Curiously, this option has managed to remain undocumented for
5 years.
2015-04-08 06:38:16 -04:00
Ross Lagerwall
495d864e43 docs: Fix documentation for 95d300eac5 2015-04-07 18:23:39 +01:00
Paolo Borelli
b64e2956f6 Add an event signal to GSocketListener
This allows the caller to know when a socket has been bound so that
it can for instance set the SO_SENDBUF and SO_RECVBUF socket options
before listen is called

https://bugzilla.gnome.org/show_bug.cgi?id=738207
2015-04-04 21:26:15 +02:00
Ryan Lortie
eff505ed3c docs: more cleanups for GIO 2015-03-12 16:43:02 -04:00
Xavier Claessens
15a4af545e Doc: Mark a few things as private 2015-03-12 16:09:14 -04:00
Philip Withnall
4f1f68e6be gtask: Add a GTask:completed property
This can be used to query whether the task has completed, in the sense
that it has had a result set on it, and has already – or will soon –
invoke its callback function.

Notifications for this property are emitted immediately after the task’s
main callback, in the same main context as that callback. This allows
for multiple bits of code to listen for completion of the GTask, which
opens the door for blocking on cancellation of the GTask and improved
handling of ‘pending’ behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=743636
2015-03-10 08:37:45 +00:00
Paolo Borelli
ed4a742946 HTTP proxy support
Based on code from "WockyHttpProxy" written by Nicolas Dufresne
and Marc-André Lureau. Initial glib patch by Brian J. Murrell.

https://bugzilla.gnome.org/show_bug.cgi?id=733876
2015-03-06 21:23:58 +01:00
Philip Withnall
430814992d docs: Expand introduction to mention using async calls over sync ones
As discussed on the mailing list (see the whole thread):
    https://mail.gnome.org/archives/desktop-devel-list/2015-February/msg00126.html

Expand the GIO documentation introduction to talk a little about when to
use async and sync functions, and how the former should almost always be
preferred over the latter.

Link to this from the GFile documentation, which is an entry point for a
lot of async calls.

https://bugzilla.gnome.org/show_bug.cgi?id=744722
2015-03-03 18:27:45 +00:00
Ryan Lortie
73d4e6f12f Rename g_unix_mount_monitor_new() to _get()
This is a singleton, but we have a function called _new() to get it.
What's worse is that the documentation makes no mention of this, and
actually specifically says that a new monitor will be created each time.

https://bugzilla.gnome.org/show_bug.cgi?id=742599
2015-03-02 15:10:46 -05:00
Colin Walters
52cd62d946 filenumerator: Add g_file_enumerator_iterate()
This is *significantly* more pleasant to use from C (while handling
errors and memory cleanup).

While we're here, change some ugly, leaky code in
tests/desktop-app-info.c to use it, in addition to a test case
in tests/file.c.

https://bugzilla.gnome.org/show_bug.cgi?id=661554
2015-02-20 14:02:05 -05:00
Lars Uebernickel
b4ef6d957f gapplication: add "is-busy"
A property to query the current busy state of an application.

https://bugzilla.gnome.org/show_bug.cgi?id=744756
2015-02-19 08:39:55 +01:00
Lars Uebernickel
2d3d8cdce2 gapplication: tune busy-binding
g_application_bind_busy_property() had the restriction that only one
property can be bound per object, so that NULL could be used to unbind.
Even though this is enough for most uses, it is a weird API.

Lift that restriction and add an explicit unbind function.

https://bugzilla.gnome.org/show_bug.cgi?id=744565
2015-02-18 20:17:03 +01:00
Ignacio Casal Quinteiro
d4e3b82a93 Add GSimpleIOStream class
GSimpleIOStream represents an object that wraps an input and an output
stream making easy to use them by calling the #GIOStream methods.

https://bugzilla.gnome.org/show_bug.cgi?id=741630
2015-02-17 16:27:46 -05:00
Lars Uebernickel
0f2b54142a gapplication: add bind_busy_property()
Balancing g_application_{un,}mark_busy() is non-trivial in some cases.

Make it a bit more convenient by allowing to bind multiple boolean
properties (from different objects) to the busy state. As long as these
properties are true, the application is marked as busy.

https://bugzilla.gnome.org/show_bug.cgi?id=744565
2015-02-16 07:38:43 +01:00
Xavier Claessens
74c22150cf docs: fix up docs issues in gio/ 2015-02-05 16:20:43 +01:00
Xavier Claessens
a1c85833d4 Doc: Add missing functions in gio.types
This is made by doing a build with --rebuild-types option,
then manually remove those functions:
  g_win32_input_stream_get_type
  g_win32_output_stream_get_type
  g_io_extension_get_type

Maybe Makefile.am could remove them automatically so we can
remove gio.types from git and rely on --rebuild-types option?
2015-02-04 15:07:14 +01:00
Xavier Claessens
116d8fa042 Doc: sort and uniquify gio.types 2015-02-04 15:07:14 +01:00
Xavier Claessens
caf9db2dfb Doc: Fix GListModel/GListStore 2015-02-04 15:07:14 +01:00
Ryan Lortie
3f3eac474b GListStore: add sorted insert function
Add g_list_store_insert_sorted() which takes a GCompareDataFunc to
decide where to insert.  This ends up being a very trivial function,
thanks to GSequence.

https://bugzilla.gnome.org/show_bug.cgi?id=743927
2015-02-03 15:46:48 +01:00
Ryan Lortie
08f7f97696 docs: link the GListModel docs from the index 2015-02-02 09:16:35 +01:00
Lars Uebernickel
b69beff426 Add GListModel
GListModel is an interface that represents a dynamic list of GObjects.

Also add GListStore, a simple implementation of GListModel that stores
all objects in memory, using a GSequence.

https://bugzilla.gnome.org/show_bug.cgi?id=729351
2015-01-30 15:08:57 +01:00
Lars Uebernickel
6d55189d8c gsettings: add g_settings_schema_list_children
https://bugzilla.gnome.org/show_bug.cgi?id=743517
2015-01-28 18:09:28 +00:00
Lars Uebernickel
d95bb1f08b gsettings: add g_settings_schema_key_get_name
https://bugzilla.gnome.org/show_bug.cgi?id=743517
2015-01-28 18:09:28 +00:00
Cosimo Cecchi
be2d9b4f58 GSimpleAction: add g_simple_action_set_state_hint
Currently the only way to set a state hint on an action is through a
subclass; add a g_simple_action_set_state_hint() method so that this
becomes easier for clients that already use GSimpleAction.

https://bugzilla.gnome.org/show_bug.cgi?id=743521
2015-01-26 12:06:24 +00:00
Matthias Clasen
169eae47e5 gio: Add missing symbols to docs 2014-12-15 13:17:15 -05:00
Rico Tzschichholz
d0d5ea71bb docs: Add index for 2.44 api 2014-12-01 14:17:26 +01:00
Dan Winship
64f9bf96fd gnetworkaddress: Add g_network_address_new_loopback() constructor
This is a convenience method for creating a GNetworkAddress which is
guaranteed to return IPv4 and IPv6 loopback addresses. The program
cannot guarantee that 'localhost' will resolve to both types of
address, so programs which wish to connect to a local service over
either IPv4 or IPv6 must currently manually create an IPv4 and another
IPv6 socket, and detect which of the two are working. This new API
allows the existing GSocketConnectable machinery to be used to
automate that.

Based on a patch from Philip Withnall.

https://bugzilla.gnome.org/show_bug.cgi?id=732317
2014-11-29 14:22:42 -05:00
Emmanuele Bassi
cb042bf5b5 docs: Add missing get_type() reference to gio.types
GSubprocessLauncher is a GObject, so we need to tell gtk-doc to inspect
it.

https://bugzilla.gnome.org/show_bug.cgi?id=738675
2014-10-17 11:16:16 +01:00
Sébastien Wilmet
dfaaf37338 Update URLs library.gnome.org -> developer.gnome.org 2014-09-18 20:32:43 +02:00
Jonas Danielsson
bf9c862504 GApplication: Add g_application_add_main_option
This function adds a single main option entry to be handeled by
GApplication. The option entry has it arg_data field set to NULL
and will be added to the applications packed_options.

The rationale for this is that bindings will be able to add
command line options even when they can't use the un-boxed struct
GOptionEntry.

https://bugzilla.gnome.org/show_bug.cgi?id=727455
2014-08-20 16:02:59 +02:00
Dan Winship
b88fdf0b0f docs: hyphenate "High-level" and "Low-level" 2014-08-12 07:50:20 -04:00
Ryan Lortie
cea9de93c8 GApplication: add a "resource base path"
We don't use this for anything inside of GApplication yet, but Gtk is
about to start using it to find various bits of the application (such as
its menus, icons, etc.).

By default, we form the base path from the application ID to end up with
the familiar /org/example/app style.

https://bugzilla.gnome.org/show_bug.cgi?id=722092
2014-07-07 13:40:03 -04:00