Add support for a mutex lock that consumes only one bit of storage
inside of an integer on systems that support futexes. Futex is emulated
(at a higher cost) on systems that don't have it -- but only in the
contended case.
We now allow g_thread_init(NULL) to be called after other glib calls (with
some minor limitations). This is mainly a documentation change as this
really was already possible.
We also allow g_thread_init() to be called multiple times. Only the
first call actually initializes the threading system, further calls
are ignored (but print a warning if the argument is not NULL).
https://bugzilla.gnome.org/show_bug.cgi?id=606775
Previous code used g_mkstemp(). But when using
G_FILE_CREATE_REPLACE_DESTINATION, no attempt was made to ensure proper
mode and flags of the created temporary file. The visible issue was that
the file was always created with mode 0600 as opposed to using 0666.
(The invisible issue was that O_RDWR was used instead of O_WRONLY.)
This function exposes more variables than g_mkstemp() and therefor
allows more flexibility when creating temporary files.
The intended use is gio's code for g_file_replace() (see next patch)
This patch only adds the function. The function is a NOP.
See the API documentation for a rationale.
Part of: Bug 591388 - number of GCancellables available is too limited
For details, see bug 587482. The new api:
- Provide new _with_operation() variants of all unmount and eject methods
- Add GMountOperation::show-processes signal
- this can be used to show processes blocking an unmount operation
- Deprecate all unmount and eject methods
- Add g_drive_can_start_degraded() method
- this is to avoid auto-starting degraded drives
- Make g_drive_stop() resp. g_file_stop_mountable() take a GMountOperation
- these ops were recently added and not yet public API so it's fine
to change how they work
- Provide a way to poll mountable files, e.g. g_file_poll_mountable()
- Add some missing file attributes for mountable files
- G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE
- needed for the GDU Nautilus extensions to format a volume
- G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED:
- mimics g_drive_can_start_degraded()
- G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL:
- mimics g_drive_can_poll_for_media()
- G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC
- mimics g_drive_is_media_check_automatic()
Add API for starting/stopping drives. This new API will enable
GVolumeMonitor and GVfs implementations to add support for the
following features
1. Powering down external hard disk enclosures / drives
2. Starting/stopping multi-disk devices (such as RAID/btrfs/ZFS)
3. Connecting/disconnecting iSCSI devices
4. Reacting to the user pressing e.g. the "remove drive" button on
a IBM/Lenovo Ultrabay: http://www.thinkwiki.org/wiki/Ultrabay
See the bug for the corresponding GVfs and Nautilus changes.
The whole protocol name thing is pretty weird. The getprotobyname functions
seem to only specify one mapping for name <-> ids, so all families/types
must use the same values. Plus the values used for the protocols are
standardized by IANA, so are always the same.
So, we drop using names for protocols, intead introducing an enum with
a few commonly availible and used protocols.
Higher-level wrappers around GResolver. GSocketConnectable provides an
interface for synchronously or asynchronously iterating multiple
socket addresses, with GNetworkAddress and GNetworkService providing
interfaces based on hostname and SRV record resolution.
Part of #548466.
GResolver provides asynchronous (and synchronous-but-cancellable) APIs
for resolving hostnames, reverse-resolving IP addresses back to
hostnames, and resolving SRV records. Part of #548466.
Types and methods for dealing with IPv4 and IPv6 addresses (and UNIX
domain socket addresses under UNIX). This does not include code for
actual socket I/O.
Originally from "gnio". Much of the code was written by Christian
Kellner, Samuel Cormier-Iijima, and Ryan Lortie.
Part of #548466.
Functions for converting between UTF-8 IDNs (Internationalized Domain
Names) and their ASCII-Compatible Encodings, plus a function to recognize
IP addresses. Part of #548466.
There are race conditions when connecting and disconnecting from the
"cancelled" signal on GCancellable which you need to do when
implementing cancellable operations. This adds helper functions that
avoid these races and mentions these races in the docs. (#572844)
Update various README files to refer to git instead of svn.
Add a README.commits that is pretty much a copy of the same file
in GTK+. Also discontinue ChangeLog files.
* gio/gio-docs.xml:
* glib/glib-docs.sgml:
* gobject/gobject-docs.sgml:
Add online urls for library.gnome.org. This allows other docs to do
gtkdoc-rebase --online --html-dir=html
before publishing docs and have working xrefs.
svn path=/trunk/; revision=7853
2009-01-28 Ryan Lortie <desrt@desrt.ca>
Bug 568575 – _async functions for GDataInputStream
* gdatainputstream.h:
* gdatainputstream.c: add _async versions of read_line and read_until.
* gio.symbols:
* ../docs/reference/gio/gio-sections.txt: add new functions
* tests/sleepy-stream.c: new test case for async read line
* tests/Makefile.am: add new test
svn path=/trunk/; revision=7835
* docs/reference/glib/Makefile.am:
Add SCAN_OPTIONS=--ignore-decorators="GLIB_VAR" to Makefile.am to fix
on problem with the doc build.
svn path=/trunk/; revision=7829
2009-01-20 Ryan Lortie <desrt@desrt.ca>
Bug 568394 – dropping the last reference to a stream filter closes the
base stream
* gfilterinputstream.h:
* gfilterinputstream.c: add "close-base-stream" property and only
close the base stream if it is true. issue async close callbacks from
correct source object.
* gfilteroutputstream.h:
* gfilteroutputstream.c: add a "close-base-stream" property and only
close the base stream if it is true. issue async close callbacks from
correct source object.
* gbufferedoutputstream: check g_filter_output_stream_get_close_base()
before closing the base stream. fix invalid source tag comparison in
close_async (was comparing to flush_async).
* ../docs/reference/gio/gio-sections.txt:
* gio.symbols: add
g_filter_{in,out}put_stream_{g,s}et_close_base_stream
* tests/filter-streams.c: new test cases
* tests/Makefile.am: add new test
* tests/.gitignore: add new test
svn path=/trunk/; revision=7825
2009-01-13 Matthias Clasen <mclasen@redhat.com>
Bug 564728 Add function to decode base64 encoded data in place
* glib/glib.symbols:
* glib/gbase64.[hc] (g_base64_decode_inplace): New convenience
API to decode in place, overwriting the input string. Patch by
Sebastian Dröge.
svn path=/trunk/; revision=7807
* gio.symbols:
* gunixinputstream.[hc]:
* gunixoutputstream.[hc]: Add "fd" and "close-fd" properties
including getters and setters. Patch by Maciej Piechotka
svn path=/trunk/; revision=7735
2008-12-07 Behdad Esfahbod <behdad@gnome.org>
Bug 563150 – G_GU?INT*_MODIFIER/FORMAT docs
* glib/tmpl/glib-unused.sgml:
* glib/tmpl/macros_misc.sgml:
* glib/tmpl/types.sgml:
Update docs to mention scanning as well as printing.
Cross reference these from their respective types.
svn path=/trunk/; revision=7730
2008-12-01 Alexander Larsson <alexl@redhat.com>
* gio.symbols:
* gmount.[ch]:
* gunionvolumemonitor.c:
* gvolume.c:
Add and document g_mount_is_shadowed plus calls
to set/unset a mount as shadowed
svn path=/trunk/; revision=7716
* gobject/tut_gtype.xml: Remove the questionable closing sentence
and all references to private functions. Pointed out by Christian
Dywan.
svn path=/trunk/; revision=7711
* gio.symbols:
* gappinfo.[hc]: Add g_app_info_get_commandline. Requested
by Hans Petter Jansson.
* gdesktopappinfo.c: And implement it here.
svn path=/trunk/; revision=7706
2008-10-29 16:04:38 Tim Janik <timj@gtk.org>
* glib/tmpl/macros_misc.sgml: Clarified/added docs for
G_STRINGIFY, G_PASTE and G_STATIC_ASSERT, based on
patches from Christian Persch and Christian Dywan.
svn path=/trunk/; revision=7634
Bug 509446 - portable blocking gio cancellation
* gcancellable.c (g_cancellable_make_pollfd): New method to make a
GPollFD for a cancellable (which is slightly more complicated on
Windows than Unix).
* gunixinputstream.c (g_unix_input_stream_read):
* gunixoutputstream.c (g_unix_output_stream_write): Use
g_cancellable_make_pollfd() and g_poll() rather than using poll()
directly.
* tests/unix-streams.c: test of GUnixInputStream,
GUnixOutputStream, and GCancellable.
svn path=/trunk/; revision=7553
* glib/gpoll.c (g_poll): Move this out of gmain.c and make it part
of the public API. (Part of Bug 505361 - gunixinputstream.c
assumes poll() available.)
svn path=/trunk/; revision=7535
2008-08-15 Tor Lillqvist <tml@novell.com>
* glib/tmpl/threads.sgml: Add an exception: g_mem_set_vtable() may
be called before g_thread_init().
svn path=/trunk/; revision=7361
2008-08-15 Tor Lillqvist <tml@novell.com>
* glib/tmpl/threads.sgml: Warn about the consequences of not
calling g_thread_init() first, if it will be called at all. Advice
calling it if using random GLib-based libraries.
svn path=/trunk/; revision=7355
2008-07-28 Matthias Clasen <mclasen@redhat.com>
* gemblemedicon.[hc]: Add a GIcon implementation that can
add an emblem to another icon.
* gio.h:
* Makefile.am:
* gio.symbols: Glue
* gloadableicon.c:
* gfileicon.c: Small documenatation additions.
svn path=/trunk/; revision=7263
* glib/glib.symbols:
* glib/gstrfuncs.[hc]: Add g_dpgettext2() which is a
variant of g_dpgettext() taking context and id as separate
arguments.
* glib/gi18n-lib.h:
* glib/gi18n.h: Add an NC_() macro that is to C_() as N_()
is to _().
svn path=/trunk/; revision=7202
2008-07-10 Ryan Lortie <desrt@desrt.ca>
* docs/reference/glib/glib-sections.txt:
* glib/glib.symbols:
* glib/gmarkup.c:
* glib/gmarkup.h: add functions g_markup_parse_context_{push,pop} in
order to provide some small hooks on which to build easy-to-use
subparsers.
* glib/tests/Makefile: add new test
* glib/tests/markup-subparser.c: new test for subparsers
Fixes bug #337518.
svn path=/trunk/; revision=7174
2008-07-06 David Zeuthen <davidz@redhat.com>
* gio.symbols:
* gvolume.[ch]: Add new method g_volume_get_activation_root(). This
is needed for easily handling adoption of foreign volumes by
out-of-process volume monitors (#541793)
svn path=/trunk/; revision=7169
* gio.symbols:
* gdesktopappinfo.[hc]: Add a function to create a
GDesktopAppInfo from a GKeyFile. Proposed by Josselin Mouette.
svn path=/trunk/; revision=7143
2008-06-24 Michael Natterer <mitch@imendio.com>
* glib/Makefile.am
* gobject/Makefile.am: don't comment out the include of
Makefile.decl just because there are no tests. It needs to be
included in each Makefile.am or make check will fail.
svn path=/trunk/; revision=7098
* docs/reference/gobject/tmpl/gobject-unused.sgml:
* gobject/gobject.h:
* gobject/gtype.c:
* gobject/gtype.h:
Move some content for gobject-unused.sgml and cleared empty entries.
The remaining 4 ones should be checked by some else. If they are not
needed. The file can be removed.
svn path=/trunk/; revision=7087