diff -Nru gobject-introspection-1.56.1/acinclude.m4 gobject-introspection-1.64.1/acinclude.m4 --- gobject-introspection-1.56.1/acinclude.m4 2014-08-04 14:37:07.000000000 +0000 +++ gobject-introspection-1.64.1/acinclude.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -dnl as-ac-expand.m4 0.2.0 -*- autoconf -*- -dnl autostars m4 macro for expanding directories using configure's prefix - -dnl (C) 2003, 2004, 2005 Thomas Vander Stichele - -dnl Copying and distribution of this file, with or without modification, -dnl are permitted in any medium without royalty provided the copyright -dnl notice and this notice are preserved. - -dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR) - -dnl example: -dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir) -dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local - -AC_DEFUN([AS_AC_EXPAND], -[ - EXP_VAR=[$1] - FROM_VAR=[$2] - - dnl first expand prefix and exec_prefix if necessary - prefix_save=$prefix - exec_prefix_save=$exec_prefix - - dnl if no prefix given, then use /usr/local, the default prefix - if test "x$prefix" = "xNONE"; then - prefix="$ac_default_prefix" - fi - dnl if no exec_prefix given, then use prefix - if test "x$exec_prefix" = "xNONE"; then - exec_prefix=$prefix - fi - - full_var="$FROM_VAR" - dnl loop until it doesn't change anymore - while true; do - new_full_var="`eval echo $full_var`" - if test "x$new_full_var" = "x$full_var"; then break; fi - full_var=$new_full_var - done - - dnl clean up - full_var=$new_full_var - AC_SUBST([$1], "$full_var") - - dnl restore prefix and exec_prefix - prefix=$prefix_save - exec_prefix=$exec_prefix_save -]) diff -Nru gobject-introspection-1.56.1/aclocal.m4 gobject-introspection-1.64.1/aclocal.m4 --- gobject-introspection-1.56.1/aclocal.m4 2018-04-09 06:15:33.000000000 +0000 +++ gobject-introspection-1.64.1/aclocal.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,1708 +0,0 @@ -# generated automatically by aclocal 1.15.1 -*- Autoconf -*- - -# Copyright (C) 1996-2017 Free Software Foundation, Inc. - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, -[m4_warning([this file was generated for autoconf 2.69. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically 'autoreconf'.])]) - -dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -dnl serial 11 (pkg-config-0.29.1) -dnl -dnl Copyright © 2004 Scott James Remnant . -dnl Copyright © 2012-2015 Dan Nicholson -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -dnl 02111-1307, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a -dnl configuration script generated by Autoconf, you may include it under -dnl the same distribution terms that you use for the rest of that -dnl program. - -dnl PKG_PREREQ(MIN-VERSION) -dnl ----------------------- -dnl Since: 0.29 -dnl -dnl Verify that the version of the pkg-config macros are at least -dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's -dnl installed version of pkg-config, this checks the developer's version -dnl of pkg.m4 when generating configure. -dnl -dnl To ensure that this macro is defined, also add: -dnl m4_ifndef([PKG_PREREQ], -dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) -dnl -dnl See the "Since" comment for each macro you use to see what version -dnl of the macros you require. -m4_defun([PKG_PREREQ], -[m4_define([PKG_MACROS_VERSION], [0.29.1]) -m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, - [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) -])dnl PKG_PREREQ - -dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) -dnl ---------------------------------- -dnl Since: 0.16 -dnl -dnl Search for the pkg-config tool and set the PKG_CONFIG variable to -dnl first found in the path. Checks that the version of pkg-config found -dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is -dnl used since that's the first version where most current features of -dnl pkg-config existed. -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) -m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) -AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) -AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.9.0]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi -fi[]dnl -])dnl PKG_PROG_PKG_CONFIG - -dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl ------------------------------------------------------------------- -dnl Since: 0.18 -dnl -dnl Check to see whether a particular set of modules exists. Similar to -dnl PKG_CHECK_MODULES(), but does not set variables or print errors. -dnl -dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -dnl only at the first occurence in configure.ac, so if the first place -dnl it's called might be skipped (such as if it is within an "if", you -dnl have to call PKG_CHECK_EXISTS manually -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_default([$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - -dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -dnl --------------------------------------------- -dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting -dnl pkg_failed based on the result. -m4_define([_PKG_CONFIG], -[if test -n "$$1"; then - pkg_cv_[]$1="$$1" - elif test -n "$PKG_CONFIG"; then - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes ], - [pkg_failed=yes]) - else - pkg_failed=untried -fi[]dnl -])dnl _PKG_CONFIG - -dnl _PKG_SHORT_ERRORS_SUPPORTED -dnl --------------------------- -dnl Internal check to see if pkg-config supports short errors. -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])dnl _PKG_SHORT_ERRORS_SUPPORTED - - -dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -dnl [ACTION-IF-NOT-FOUND]) -dnl -------------------------------------------------------------- -dnl Since: 0.4.0 -dnl -dnl Note that if there is a possibility the first call to -dnl PKG_CHECK_MODULES might not happen, you should be sure to include an -dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -AC_DEFUN([PKG_CHECK_MODULES], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -if test $pkg_failed = yes; then - AC_MSG_RESULT([no]) - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - - m4_default([$4], [AC_MSG_ERROR( -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT])[]dnl - ]) -elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) - m4_default([$4], [AC_MSG_FAILURE( -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see .])[]dnl - ]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - AC_MSG_RESULT([yes]) - $3 -fi[]dnl -])dnl PKG_CHECK_MODULES - - -dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -dnl [ACTION-IF-NOT-FOUND]) -dnl --------------------------------------------------------------------- -dnl Since: 0.29 -dnl -dnl Checks for existence of MODULES and gathers its build flags with -dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags -dnl and VARIABLE-PREFIX_LIBS from --libs. -dnl -dnl Note that if there is a possibility the first call to -dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to -dnl include an explicit call to PKG_PROG_PKG_CONFIG in your -dnl configure.ac. -AC_DEFUN([PKG_CHECK_MODULES_STATIC], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -_save_PKG_CONFIG=$PKG_CONFIG -PKG_CONFIG="$PKG_CONFIG --static" -PKG_CHECK_MODULES($@) -PKG_CONFIG=$_save_PKG_CONFIG[]dnl -])dnl PKG_CHECK_MODULES_STATIC - - -dnl PKG_INSTALLDIR([DIRECTORY]) -dnl ------------------------- -dnl Since: 0.27 -dnl -dnl Substitutes the variable pkgconfigdir as the location where a module -dnl should install pkg-config .pc files. By default the directory is -dnl $libdir/pkgconfig, but the default can be changed by passing -dnl DIRECTORY. The user can override through the --with-pkgconfigdir -dnl parameter. -AC_DEFUN([PKG_INSTALLDIR], -[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) -m4_pushdef([pkg_description], - [pkg-config installation directory @<:@]pkg_default[@:>@]) -AC_ARG_WITH([pkgconfigdir], - [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, - [with_pkgconfigdir=]pkg_default) -AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) -m4_popdef([pkg_default]) -m4_popdef([pkg_description]) -])dnl PKG_INSTALLDIR - - -dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) -dnl -------------------------------- -dnl Since: 0.27 -dnl -dnl Substitutes the variable noarch_pkgconfigdir as the location where a -dnl module should install arch-independent pkg-config .pc files. By -dnl default the directory is $datadir/pkgconfig, but the default can be -dnl changed by passing DIRECTORY. The user can override through the -dnl --with-noarch-pkgconfigdir parameter. -AC_DEFUN([PKG_NOARCH_INSTALLDIR], -[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) -m4_pushdef([pkg_description], - [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) -AC_ARG_WITH([noarch-pkgconfigdir], - [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, - [with_noarch_pkgconfigdir=]pkg_default) -AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) -m4_popdef([pkg_default]) -m4_popdef([pkg_description]) -])dnl PKG_NOARCH_INSTALLDIR - - -dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, -dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl ------------------------------------------- -dnl Since: 0.28 -dnl -dnl Retrieves the value of the pkg-config variable for the given module. -AC_DEFUN([PKG_CHECK_VAR], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl - -_PKG_CONFIG([$1], [variable="][$3]["], [$2]) -AS_VAR_COPY([$1], [pkg_cv_][$1]) - -AS_VAR_IF([$1], [""], [$5], [$4])dnl -])dnl PKG_CHECK_VAR - -# Copyright (C) 2002-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.15' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to -# '$srcdir', '$srcdir/..', or '$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is '.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ([2.52])dnl - m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - - -# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], - [$1], [CXX], [depcc="$CXX" am_compiler_list=], - [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], - [$1], [UPC], [depcc="$UPC" am_compiler_list=], - [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES. -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE([dependency-tracking], [dnl -AS_HELP_STRING( - [--enable-dependency-tracking], - [do not reject slow dependency extractors]) -AS_HELP_STRING( - [--disable-dependency-tracking], - [speeds up one-time build])]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -AC_SUBST([am__nodep])dnl -_AM_SUBST_NOTMAKE([am__nodep])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. -m4_define([AC_PROG_CC], -m4_defn([AC_PROG_CC]) -[_AM_PROG_CC_C_O -]) - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.65])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[AC_DIAGNOSE([obsolete], - [$0: two- and three-arguments forms are deprecated.]) -m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if( - m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), - [ok:ok],, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) - AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) -AM_MISSING_PROG([AUTOCONF], [autoconf]) -AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) -AM_MISSING_PROG([AUTOHEADER], [autoheader]) -AM_MISSING_PROG([MAKEINFO], [makeinfo]) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES([CC])], - [m4_define([AC_PROG_CC], - m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES([CXX])], - [m4_define([AC_PROG_CXX], - m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES([OBJC])], - [m4_define([AC_PROG_OBJC], - m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], - [_AM_DEPENDENCIES([OBJCXX])], - [m4_define([AC_PROG_OBJCXX], - m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl -]) -AC_REQUIRE([AM_SILENT_RULES])dnl -dnl The testsuite driver may need to know about EXEEXT, so add the -dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This -dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) - fi -fi -dnl The trailing newline in this macro's definition is deliberate, for -dnl backward compatibility and to allow trailing 'dnl'-style comments -dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. -]) - -dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST([install_sh])]) - -# Copyright (C) 2003-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- -# From Jim Meyering - -# Copyright (C) 1996-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MAINTAINER_MODE([DEFAULT-MODE]) -# ---------------------------------- -# Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless 'enable' is passed literally. -# For symmetry, 'disable' may be passed as well. Anyway, the user -# can override the default with the --enable/--disable switch. -AC_DEFUN([AM_MAINTAINER_MODE], -[m4_case(m4_default([$1], [disable]), - [enable], [m4_define([am_maintainer_other], [disable])], - [disable], [m4_define([am_maintainer_other], [enable])], - [m4_define([am_maintainer_other], [enable]) - m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) -AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode's default is 'disable' unless 'enable' is passed - AC_ARG_ENABLE([maintainer-mode], - [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], - am_maintainer_other[ make rules and dependencies not useful - (and sometimes confusing) to the casual installer])], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) - AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) - MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST([MAINT])dnl -] -) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it is modern enough. -# If it is, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - AC_MSG_WARN(['missing' script is too old or missing]) -fi -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# -------------------- -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) - -# _AM_SET_OPTIONS(OPTIONS) -# ------------------------ -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Copyright (C) 1999-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_PROG_CC_C_O -# --------------- -# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC -# to automatically call this. -AC_DEFUN([_AM_PROG_CC_C_O], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -AC_LANG_PUSH([C])dnl -AC_CACHE_CHECK( - [whether $CC understands -c and -o together], - [am_cv_prog_cc_c_o], - [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i]) -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -AC_LANG_POP([C])]) - -# For backward compatibility. -AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) - -# Copyright (C) 1999-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - - -# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# --------------------------------------------------------------------------- -# Adds support for distributing Python modules and packages. To -# install modules, copy them to $(pythondir), using the python_PYTHON -# automake variable. To install a package with the same name as the -# automake package, install to $(pkgpythondir), or use the -# pkgpython_PYTHON automake variable. -# -# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as -# locations to install python extension modules (shared libraries). -# Another macro is required to find the appropriate flags to compile -# extension modules. -# -# If your package is configured with a different prefix to python, -# users will have to add the install directory to the PYTHONPATH -# environment variable, or create a .pth file (see the python -# documentation for details). -# -# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will -# cause an error if the version of python installed on the system -# doesn't meet the requirement. MINIMUM-VERSION should consist of -# numbers and dots only. -AC_DEFUN([AM_PATH_PYTHON], - [ - dnl Find a Python interpreter. Python versions prior to 2.0 are not - dnl supported. (2.0 was released on October 16, 2000). - dnl FIXME: Remove the need to hard-code Python versions here. - m4_define_default([_AM_PYTHON_INTERPRETER_LIST], -[python python2 python3 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 dnl - python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) - - AC_ARG_VAR([PYTHON], [the Python interpreter]) - - m4_if([$1],[],[ - dnl No version check is needed. - # Find any Python interpreter. - if test -z "$PYTHON"; then - AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) - fi - am_display_PYTHON=python - ], [ - dnl A version check is needed. - if test -n "$PYTHON"; then - # If the user set $PYTHON, use it and don't search something else. - AC_MSG_CHECKING([whether $PYTHON version is >= $1]) - AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([Python interpreter is too old])]) - am_display_PYTHON=$PYTHON - else - # Otherwise, try each interpreter until we find one that satisfies - # VERSION. - AC_CACHE_CHECK([for a Python interpreter with version >= $1], - [am_cv_pathless_PYTHON],[ - for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do - test "$am_cv_pathless_PYTHON" = none && break - AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) - done]) - # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. - if test "$am_cv_pathless_PYTHON" = none; then - PYTHON=: - else - AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) - fi - am_display_PYTHON=$am_cv_pathless_PYTHON - fi - ]) - - if test "$PYTHON" = :; then - dnl Run any user-specified action, or abort. - m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) - else - - dnl Query Python for its version number. Getting [:3] seems to be - dnl the best way to do this; it's what "site.py" does in the standard - dnl library. - - AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], - [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) - AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) - - dnl Use the values of $prefix and $exec_prefix for the corresponding - dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made - dnl distinct variables so they can be overridden if need be. However, - dnl general consensus is that you shouldn't need this ability. - - AC_SUBST([PYTHON_PREFIX], ['${prefix}']) - AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) - - dnl At times (like when building shared libraries) you may want - dnl to know which OS platform Python thinks this is. - - AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], - [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) - AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) - - # Just factor out some code duplication. - am_python_setup_sysconfig="\ -import sys -# Prefer sysconfig over distutils.sysconfig, for better compatibility -# with python 3.x. See automake bug#10227. -try: - import sysconfig -except ImportError: - can_use_sysconfig = 0 -else: - can_use_sysconfig = 1 -# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: -# -try: - from platform import python_implementation - if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7': - can_use_sysconfig = 0 -except ImportError: - pass" - - dnl Set up 4 directories: - - dnl pythondir -- where to install python scripts. This is the - dnl site-packages directory, not the python standard library - dnl directory like in previous automake betas. This behavior - dnl is more consistent with lispdir.m4 for example. - dnl Query distutils for this directory. - AC_CACHE_CHECK([for $am_display_PYTHON script directory], - [am_cv_python_pythondir], - [if test "x$prefix" = xNONE - then - am_py_prefix=$ac_default_prefix - else - am_py_prefix=$prefix - fi - am_cv_python_pythondir=`$PYTHON -c " -$am_python_setup_sysconfig -if can_use_sysconfig: - sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) -else: - from distutils import sysconfig - sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') -sys.stdout.write(sitedir)"` - case $am_cv_python_pythondir in - $am_py_prefix*) - am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` - am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` - ;; - *) - case $am_py_prefix in - /usr|/System*) ;; - *) - am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages - ;; - esac - ;; - esac - ]) - AC_SUBST([pythondir], [$am_cv_python_pythondir]) - - dnl pkgpythondir -- $PACKAGE directory under pythondir. Was - dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is - dnl more consistent with the rest of automake. - - AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) - - dnl pyexecdir -- directory for installing python extension modules - dnl (shared libraries) - dnl Query distutils for this directory. - AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], - [am_cv_python_pyexecdir], - [if test "x$exec_prefix" = xNONE - then - am_py_exec_prefix=$am_py_prefix - else - am_py_exec_prefix=$exec_prefix - fi - am_cv_python_pyexecdir=`$PYTHON -c " -$am_python_setup_sysconfig -if can_use_sysconfig: - sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) -else: - from distutils import sysconfig - sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') -sys.stdout.write(sitedir)"` - case $am_cv_python_pyexecdir in - $am_py_exec_prefix*) - am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` - am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` - ;; - *) - case $am_py_exec_prefix in - /usr|/System*) ;; - *) - am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages - ;; - esac - ;; - esac - ]) - AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) - - dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) - - AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) - - dnl Run any user-specified action. - $2 - fi - -]) - - -# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# --------------------------------------------------------------------------- -# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. -# Run ACTION-IF-FALSE otherwise. -# This test uses sys.hexversion instead of the string equivalent (first -# word of sys.version), in order to cope with versions such as 2.2c1. -# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). -AC_DEFUN([AM_PYTHON_CHECK_VERSION], - [prog="import sys -# split strings by '.' and convert to numeric. Append some zeros -# because we need at least 4 digits for the hex conversion. -# map returns an iterator in Python 3.0 and a list in 2.x -minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] -minverhex = 0 -# xrange is not present in Python 3.0 and range returns an iterator -for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] -sys.exit(sys.hexversion < minverhex)" - AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) - -# Copyright (C) 2001-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_RUN_LOG(COMMAND) -# ------------------- -# Run COMMAND, save the exit status in ac_status, and log it. -# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) -AC_DEFUN([AM_RUN_LOG], -[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD - ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - (exit $ac_status); }]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken - alias in your environment]) - fi - if test "$[2]" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT([yes]) -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi -AC_CONFIG_COMMANDS_PRE( - [AC_MSG_CHECKING([that generated files are newer than configure]) - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - AC_MSG_RESULT([done])]) -rm -f conftest.file -]) - -# Copyright (C) 2009-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_SILENT_RULES([DEFAULT]) -# -------------------------- -# Enable less verbose build rules; with the default set to DEFAULT -# ("yes" being less verbose, "no" or empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], [dnl -AS_HELP_STRING( - [--enable-silent-rules], - [less verbose build output (undo: "make V=1")]) -AS_HELP_STRING( - [--disable-silent-rules], - [verbose build output (undo: "make V=0")])dnl -]) -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac -dnl -dnl A few 'make' implementations (e.g., NonStop OS and NextStep) -dnl do not support nested variable expansions. -dnl See automake bug#9928 and bug#10237. -am_make=${MAKE-make} -AC_CACHE_CHECK([whether $am_make supports nested variables], - [am_cv_make_support_nested_variables], - [if AS_ECHO([['TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi]) -if test $am_cv_make_support_nested_variables = yes; then - dnl Using '$V' instead of '$(V)' breaks IRIX make. - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AC_SUBST([AM_V])dnl -AM_SUBST_NOTMAKE([AM_V])dnl -AC_SUBST([AM_DEFAULT_V])dnl -AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl -AC_SUBST([AM_DEFAULT_VERBOSITY])dnl -AM_BACKSLASH='\' -AC_SUBST([AM_BACKSLASH])dnl -_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl -]) - -# Copyright (C) 2001-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor 'install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in "make install-strip", and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# -------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004-2017 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of 'v7', 'ustar', or 'pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -# -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AC_SUBST([AMTAR], ['$${TAR-tar}']) - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' - -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - - [m4_case([$1], - [ustar], - [# The POSIX 1988 'ustar' format is defined with fixed-size fields. - # There is notably a 21 bits limit for the UID and the GID. In fact, - # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 - # and bug#13588). - am_max_uid=2097151 # 2^21 - 1 - am_max_gid=$am_max_uid - # The $UID and $GID variables are not portable, so we need to resort - # to the POSIX-mandated id(1) utility. Errors in the 'id' calls - # below are definitely unexpected, so allow the users to see them - # (that is, avoid stderr redirection). - am_uid=`id -u || echo unknown` - am_gid=`id -g || echo unknown` - AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) - if test $am_uid -le $am_max_uid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi - AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) - if test $am_gid -le $am_max_gid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi], - - [pax], - [], - - [m4_fatal([Unknown tar format])]) - - AC_MSG_CHECKING([how to create a $1 tar archive]) - - # Go ahead even if we have the value already cached. We do so because we - # need to set the values for the 'am__tar' and 'am__untar' variables. - _am_tools=${am_cv_prog_tar_$1-$_am_tools} - - for _am_tool in $_am_tools; do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works. - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi - done - rm -rf conftest.dir - - AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) - AC_MSG_RESULT([$am_cv_prog_tar_$1])]) - -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([m4/gtk-doc.m4]) -m4_include([m4/libtool.m4]) -m4_include([m4/ltoptions.m4]) -m4_include([m4/ltsugar.m4]) -m4_include([m4/ltversion.m4]) -m4_include([m4/lt~obsolete.m4]) -m4_include([m4/python.m4]) -m4_include([acinclude.m4]) diff -Nru gobject-introspection-1.56.1/AUTHORS gobject-introspection-1.64.1/AUTHORS --- gobject-introspection-1.56.1/AUTHORS 2014-08-04 14:37:07.000000000 +0000 +++ gobject-introspection-1.64.1/AUTHORS 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -Colin Walters -Johan Dahlin - -Original girepository author: -Matthias Clasen - -Original scanner author: -Jürg Billeter - diff -Nru gobject-introspection-1.56.1/autogen.sh gobject-introspection-1.64.1/autogen.sh --- gobject-introspection-1.56.1/autogen.sh 2014-08-04 14:37:07.000000000 +0000 +++ gobject-introspection-1.64.1/autogen.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -#!/bin/sh -# Run this to generate all the initial makefiles, etc. - -test -n "$srcdir" || srcdir=`dirname "$0"` -test -n "$srcdir" || srcdir=. - -olddir=`pwd` -cd "$srcdir" - -GTKDOCIZE=$(which gtkdocize 2>/dev/null) -if test -z $GTKDOCIZE; then - echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation." - rm -f gtk-doc.make - cat > gtk-doc.make <. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -nl=' -' - -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent tools from complaining about whitespace usage. -IFS=" "" $nl" - -file_conv= - -# func_file_conv build_file lazy -# Convert a $build file to $host form and store it in $file -# Currently only supports Windows hosts. If the determined conversion -# type is listed in (the comma separated) LAZY, no conversion will -# take place. -func_file_conv () -{ - file=$1 - case $file in - / | /[!/]*) # absolute file, and not a UNC file - if test -z "$file_conv"; then - # lazily determine how to convert abs files - case `uname -s` in - MINGW*) - file_conv=mingw - ;; - CYGWIN*) - file_conv=cygwin - ;; - *) - file_conv=wine - ;; - esac - fi - case $file_conv/,$2, in - *,$file_conv,*) - ;; - mingw/*) - file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` - ;; - cygwin/*) - file=`cygpath -m "$file" || echo "$file"` - ;; - wine/*) - file=`winepath -w "$file" || echo "$file"` - ;; - esac - ;; - esac -} - -# func_cl_dashL linkdir -# Make cl look for libraries in LINKDIR -func_cl_dashL () -{ - func_file_conv "$1" - if test -z "$lib_path"; then - lib_path=$file - else - lib_path="$lib_path;$file" - fi - linker_opts="$linker_opts -LIBPATH:$file" -} - -# func_cl_dashl library -# Do a library search-path lookup for cl -func_cl_dashl () -{ - lib=$1 - found=no - save_IFS=$IFS - IFS=';' - for dir in $lib_path $LIB - do - IFS=$save_IFS - if $shared && test -f "$dir/$lib.dll.lib"; then - found=yes - lib=$dir/$lib.dll.lib - break - fi - if test -f "$dir/$lib.lib"; then - found=yes - lib=$dir/$lib.lib - break - fi - if test -f "$dir/lib$lib.a"; then - found=yes - lib=$dir/lib$lib.a - break - fi - done - IFS=$save_IFS - - if test "$found" != yes; then - lib=$lib.lib - fi -} - -# func_cl_wrapper cl arg... -# Adjust compile command to suit cl -func_cl_wrapper () -{ - # Assume a capable shell - lib_path= - shared=: - linker_opts= - for arg - do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - eat=1 - case $2 in - *.o | *.[oO][bB][jJ]) - func_file_conv "$2" - set x "$@" -Fo"$file" - shift - ;; - *) - func_file_conv "$2" - set x "$@" -Fe"$file" - shift - ;; - esac - ;; - -I) - eat=1 - func_file_conv "$2" mingw - set x "$@" -I"$file" - shift - ;; - -I*) - func_file_conv "${1#-I}" mingw - set x "$@" -I"$file" - shift - ;; - -l) - eat=1 - func_cl_dashl "$2" - set x "$@" "$lib" - shift - ;; - -l*) - func_cl_dashl "${1#-l}" - set x "$@" "$lib" - shift - ;; - -L) - eat=1 - func_cl_dashL "$2" - ;; - -L*) - func_cl_dashL "${1#-L}" - ;; - -static) - shared=false - ;; - -Wl,*) - arg=${1#-Wl,} - save_ifs="$IFS"; IFS=',' - for flag in $arg; do - IFS="$save_ifs" - linker_opts="$linker_opts $flag" - done - IFS="$save_ifs" - ;; - -Xlinker) - eat=1 - linker_opts="$linker_opts $2" - ;; - -*) - set x "$@" "$1" - shift - ;; - *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) - func_file_conv "$1" - set x "$@" -Tp"$file" - shift - ;; - *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) - func_file_conv "$1" mingw - set x "$@" "$file" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift - done - if test -n "$linker_opts"; then - linker_opts="-link$linker_opts" - fi - exec "$@" $linker_opts - exit 1 -} - -eat= - -case $1 in - '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand '-c -o'. -Remove '-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file 'INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) - func_cl_wrapper "$@" # Doesn't return... - ;; -esac - -ofile= -cfile= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - # So we strip '-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no '-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # '.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` - -# Create the lock directory. -# Note: use '[/\\:.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - test "$cofile" = "$ofile" || mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff -Nru gobject-introspection-1.56.1/build-aux/config.guess gobject-introspection-1.64.1/build-aux/config.guess --- gobject-introspection-1.56.1/build-aux/config.guess 2018-04-09 06:15:36.000000000 +0000 +++ gobject-introspection-1.64.1/build-aux/config.guess 1970-01-01 00:00:00.000000000 +0000 @@ -1,1480 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright 1992-2018 Free Software Foundation, Inc. - -timestamp='2018-02-24' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). -# -# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. -# -# You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess -# -# Please send patches to . - - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Options: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright 1992-2018 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > "$dummy.c" ; - for c in cc gcc c89 c99 ; do - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -case "$UNAME_SYSTEM" in -Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu - - eval "$set_cc_for_build" - cat <<-EOF > "$dummy.c" - #include - #if defined(__UCLIBC__) - LIBC=uclibc - #elif defined(__dietlibc__) - LIBC=dietlibc - #else - LIBC=gnu - #endif - EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" - - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl - fi - ;; -esac - -# Note: order is significant - the case branches are not exclusive. - -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ - echo unknown)` - case "$UNAME_MACHINE_ARCH" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - earmv*) - arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine="${arch}${endian}"-unknown - ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in - earm*) - os=netbsdelf - ;; - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval "$set_cc_for_build" - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in - earm*) - expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in - Debian*) - release='-gnu' - ;; - *) - release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi}" - exit ;; - *:Bitrig:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; - *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; - *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; - *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; - *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; - *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; - *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; - *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; - mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE=alpha ;; - "EV4.5 (21064)") - UNAME_MACHINE=alpha ;; - "LCA4 (21066/21068)") - UNAME_MACHINE=alpha ;; - "EV5 (21164)") - UNAME_MACHINE=alphaev5 ;; - "EV5.6 (21164A)") - UNAME_MACHINE=alphaev56 ;; - "EV5.6 (21164PC)") - UNAME_MACHINE=alphapca56 ;; - "EV5.7 (21164PC)") - UNAME_MACHINE=alphapca57 ;; - "EV6 (21264)") - UNAME_MACHINE=alphaev6 ;; - "EV6.7 (21264A)") - UNAME_MACHINE=alphaev67 ;; - "EV6.8CB (21264C)") - UNAME_MACHINE=alphaev68 ;; - "EV6.8AL (21264B)") - UNAME_MACHINE=alphaev68 ;; - "EV6.8CX (21264D)") - UNAME_MACHINE=alphaev68 ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE=alphaev69 ;; - "EV7 (21364)") - UNAME_MACHINE=alphaev7 ;; - "EV7.9 (21364A)") - UNAME_MACHINE=alphaev79 ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; - arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval "$set_cc_for_build" - SUN_ARCH=i386 - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH=x86_64 - fi - fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" - ;; - sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && - dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`"$dummy" "$dummyarg"` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] - then - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ - [ "$TARGET_BINARY_INTERFACE"x = x ] - then - echo m88k-dg-dgux"$UNAME_RELEASE" - else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" - fi - else - echo i586-dg-dgux"$UNAME_RELEASE" - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" - fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/lslpp ] ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` - else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" - fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - case "$UNAME_MACHINE" in - 9000/31?) HP_ARCH=m68000 ;; - 9000/[34]??) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "$sc_cpu_version" in - 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 - 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in - 32) HP_ARCH=hppa2.0n ;; - 64) HP_ARCH=hppa2.0w ;; - '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "$HP_ARCH" = "" ]; then - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ "$HP_ARCH" = hppa2.0w ] - then - eval "$set_cc_for_build" - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH=hppa2.0w - else - HP_ARCH=hppa64 - fi - fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux"$HPUX_REV" - exit ;; - 3050*:HI-UX:*:*) - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo "$UNAME_MACHINE"-unknown-osf1mk - else - echo "$UNAME_MACHINE"-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; - *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; - *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` - case "$UNAME_PROCESSOR" in - amd64) - UNAME_PROCESSOR=x86_64 ;; - i386) - UNAME_PROCESSOR=i586 ;; - esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; - i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; - *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; - *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; - *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; - i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; - *:Interix*:*) - case "$UNAME_MACHINE" in - x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; - IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; - esac ;; - i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - *:GNU:*:*) - # the GNU system - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" - exit ;; - i*86:Minix:*:*) - echo "$UNAME_MACHINE"-pc-minix - exit ;; - aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - aarch64_be:Linux:*:*) - UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arm*:Linux:*:*) - eval "$set_cc_for_build" - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi - else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf - fi - fi - exit ;; - avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; - crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; - e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; - ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" - test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } - ;; - mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; - or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; - ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; - ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; - riscv32:Linux:*:* | riscv64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; - sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; - x86_64:Linux:*:*) - if objdump -f /bin/sh | grep -q elf32-x86-64; then - echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 - else - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - fi - exit ;; - xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; - i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; - i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; - i*86:*:4.*:*) - UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" - else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" - else - echo "$UNAME_MACHINE"-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configure will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo "$UNAME_MACHINE"-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv"$UNAME_RELEASE" - else - echo mips-unknown-sysv"$UNAME_RELEASE" - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; - SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; - *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval "$set_cc_for_build" - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc - fi - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi - fi - elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 - fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = x86; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = 386; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; - *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "$UNAME_MACHINE" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" - exit ;; - i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros - exit ;; - x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; - amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; -esac - -echo "$0: unable to guess system type" >&2 - -case "$UNAME_MACHINE:$UNAME_SYSTEM" in - mips:Linux | mips64:Linux) - # If we got here on MIPS GNU/Linux, output extra information. - cat >&2 <&2 </dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = "$UNAME_MACHINE" -UNAME_RELEASE = "$UNAME_RELEASE" -UNAME_SYSTEM = "$UNAME_SYSTEM" -UNAME_VERSION = "$UNAME_VERSION" -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff -Nru gobject-introspection-1.56.1/build-aux/config.sub gobject-introspection-1.64.1/build-aux/config.sub --- gobject-introspection-1.56.1/build-aux/config.sub 2018-04-09 06:15:36.000000000 +0000 +++ gobject-introspection-1.64.1/build-aux/config.sub 1970-01-01 00:00:00.000000000 +0000 @@ -1,1801 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright 1992-2018 Free Software Foundation, Inc. - -timestamp='2018-02-22' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). - - -# Please send patches to . -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS - -Canonicalize a configuration name. - -Options: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright 1992-2018 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo "$1" - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | cloudabi*-eabi* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo "$1" | sed 's/-[^-]*$//'` - if [ "$basic_machine" != "$1" ] - then os=`echo "$1" | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) - ;; - ms1) - basic_machine=mt-unknown - ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none - ;; - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | e2k-* | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pru-* \ - | pyramid-* \ - | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-pc - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - asmjs) - basic_machine=asmjs-unknown - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2*) - basic_machine=m68k-bull - os=-sysv3 - ;; - e500v[12]) - basic_machine=powerpc-unknown - os=$os"spe" - ;; - e500v[12]-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=$os"spe" - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; - i*86v32) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - nsv-tandem) - basic_machine=nsv-tandem - ;; - nsx-tandem) - basic_machine=nsx-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc | ppcbe) basic_machine=powerpc-unknown - ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=-rdos - ;; - rdos32) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - strongarm-* | thumb-*) - basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tile*) - basic_machine=$basic_machine-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - x64) - basic_machine=x86_64-pc - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - xscale-* | xscalee[bl]-*) - basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases that might get confused - # with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # es1800 is here to avoid being matched by es* (a different OS) - -es1800*) - os=-ose - ;; - # Now accept the basic system types. - # The portable systems comes first. - # Each alternative MUST end in a * to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* | -cloudabi* | -sortix* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ - | -midnightbsd*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -xray | -os68k* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo "$os" | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo "$os" | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo "$os" | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4*) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -pikeos*) - # Until real need of OS specific support for - # particular features comes up, bare metal - # configurations are quite functional. - case $basic_machine in - arm*) - os=-eabi - ;; - *) - os=-elf - ;; - esac - ;; - -nacl*) - ;; - -ios) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - c8051-*) - os=-elf - ;; - hexagon-*) - os=-elf - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - pru-*) - os=-elf - ;; - *-be) - os=-beos - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` - ;; -esac - -echo "$basic_machine$os" -exit - -# Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff -Nru gobject-introspection-1.56.1/build-aux/depcomp gobject-introspection-1.64.1/build-aux/depcomp --- gobject-introspection-1.56.1/build-aux/depcomp 2018-04-09 06:15:37.000000000 +0000 +++ gobject-introspection-1.64.1/build-aux/depcomp 1970-01-01 00:00:00.000000000 +0000 @@ -1,791 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2016-01-11.22; # UTC - -# Copyright (C) 1999-2017 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by 'PROGRAMS ARGS'. - object Object file output by 'PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputting dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -# Get the directory component of the given path, and save it in the -# global variables '$dir'. Note that this directory component will -# be either empty or ending with a '/' character. This is deliberate. -set_dir_from () -{ - case $1 in - */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; - *) dir=;; - esac -} - -# Get the suffix-stripped basename of the given path, and save it the -# global variable '$base'. -set_base_from () -{ - base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` -} - -# If no dependency file was actually created by the compiler invocation, -# we still have to create a dummy depfile, to avoid errors with the -# Makefile "include basename.Plo" scheme. -make_dummy_depfile () -{ - echo "#dummy" > "$depfile" -} - -# Factor out some common post-processing of the generated depfile. -# Requires the auxiliary global variable '$tmpdepfile' to be set. -aix_post_process_depfile () -{ - # If the compiler actually managed to produce a dependency file, - # post-process it. - if test -f "$tmpdepfile"; then - # Each line is of the form 'foo.o: dependency.h'. - # Do two passes, one to just change these to - # $object: dependency.h - # and one to simply output - # dependency.h: - # which is needed to avoid the deleted-header problem. - { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" - sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" - } > "$depfile" - rm -f "$tmpdepfile" - else - make_dummy_depfile - fi -} - -# A tabulation character. -tab=' ' -# A newline character. -nl=' -' -# Character ranges might be problematic outside the C locale. -# These definitions help. -upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ -lower=abcdefghijklmnopqrstuvwxyz -digits=0123456789 -alpha=${upper}${lower} - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Avoid interferences from the environment. -gccflag= dashmflag= - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -cygpath_u="cygpath -u -f -" -if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvisualcpp -fi - -if test "$depmode" = msvc7msys; then - # This is just like msvc7 but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvc7 -fi - -if test "$depmode" = xlc; then - # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. - gccflag=-qmakedep=gcc,-MF - depmode=gcc -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. -## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. -## (see the conditional assignment to $gccflag above). -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). Also, it might not be -## supported by the other compilers which use the 'gcc' depmode. -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - # The second -e expression handles DOS-style file names with drive - # letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the "deleted header file" problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. -## Some versions of gcc put a space before the ':'. On the theory -## that the space means something, we add a space to the output as -## well. hp depmode also adds that space, but also prefixes the VPATH -## to the object. Take care to not repeat it in the output. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like '#:fec' to the end of the - # dependency line. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ - | tr "$nl" ' ' >> "$depfile" - echo >> "$depfile" - # The second pass generates a dummy entry for each header file. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - make_dummy_depfile - fi - rm -f "$tmpdepfile" - ;; - -xlc) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts '$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - set_dir_from "$object" - set_base_from "$object" - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - aix_post_process_depfile - ;; - -tcc) - # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 - # FIXME: That version still under development at the moment of writing. - # Make that this statement remains true also for stable, released - # versions. - # It will wrap lines (doesn't matter whether long or short) with a - # trailing '\', as in: - # - # foo.o : \ - # foo.c \ - # foo.h \ - # - # It will put a trailing '\' even on the last line, and will use leading - # spaces rather than leading tabs (at least since its commit 0394caf7 - # "Emit spaces for -MD"). - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. - # We have to change lines of the first kind to '$object: \'. - sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" - # And for each line of the second kind, we have to emit a 'dep.h:' - # dummy dependency, to avoid the deleted-header problem. - sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" - rm -f "$tmpdepfile" - ;; - -## The order of this option in the case statement is important, since the -## shell code in configure will try each of these formats in the order -## listed in this file. A plain '-MD' option would be understood by many -## compilers, so we must ensure this comes after the gcc and icc options. -pgcc) - # Portland's C compiler understands '-MD'. - # Will always output deps to 'file.d' where file is the root name of the - # source file under compilation, even if file resides in a subdirectory. - # The object file name does not affect the name of the '.d' file. - # pgcc 10.2 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using '\' : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - set_dir_from "$object" - # Use the source, not the object, to determine the base name, since - # that's sadly what pgcc will do too. - set_base_from "$source" - tmpdepfile=$base.d - - # For projects that build the same source file twice into different object - # files, the pgcc approach of using the *source* file root name can cause - # problems in parallel builds. Use a locking strategy to avoid stomping on - # the same $tmpdepfile. - lockdir=$base.d-lock - trap " - echo '$0: caught signal, cleaning up...' >&2 - rmdir '$lockdir' - exit 1 - " 1 2 13 15 - numtries=100 - i=$numtries - while test $i -gt 0; do - # mkdir is a portable test-and-set. - if mkdir "$lockdir" 2>/dev/null; then - # This process acquired the lock. - "$@" -MD - stat=$? - # Release the lock. - rmdir "$lockdir" - break - else - # If the lock is being held by a different process, wait - # until the winning process is done or we timeout. - while test -d "$lockdir" && test $i -gt 0; do - sleep 1 - i=`expr $i - 1` - done - fi - i=`expr $i - 1` - done - trap - 1 2 13 15 - if test $i -le 0; then - echo "$0: failed to acquire lock after $numtries attempts" >&2 - echo "$0: check lockdir '$lockdir'" >&2 - exit 1 - fi - - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - set_dir_from "$object" - set_base_from "$object" - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" - # Add 'dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - make_dummy_depfile - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in 'foo.d' instead, so we check for that too. - # Subdirectories are respected. - set_dir_from "$object" - set_base_from "$object" - - if test "$libtool" = yes; then - # Libtool generates 2 separate objects for the 2 libraries. These - # two compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir$base.o.d # libtool 1.5 - tmpdepfile2=$dir.libs/$base.o.d # Likewise. - tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - # Same post-processing that is required for AIX mode. - aix_post_process_depfile - ;; - -msvc7) - if test "$libtool" = yes; then - showIncludes=-Wc,-showIncludes - else - showIncludes=-showIncludes - fi - "$@" $showIncludes > "$tmpdepfile" - stat=$? - grep -v '^Note: including file: ' "$tmpdepfile" - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - # The first sed program below extracts the file names and escapes - # backslashes for cygpath. The second sed program outputs the file - # name when reading, but also accumulates all include files in the - # hold buffer in order to output them again at the end. This only - # works with sed implementations that can handle large buffers. - sed < "$tmpdepfile" -n ' -/^Note: including file: *\(.*\)/ { - s//\1/ - s/\\/\\\\/g - p -}' | $cygpath_u | sort -u | sed -n ' -s/ /\\ /g -s/\(.*\)/'"$tab"'\1 \\/p -s/.\(.*\) \\/\1:/ -H -$ { - s/.*/'"$tab"'/ - G - p -}' >> "$depfile" - echo >> "$depfile" # make sure the fragment doesn't end with a backslash - rm -f "$tmpdepfile" - ;; - -msvc7msys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove '-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for ':' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. - "$@" $dashmflag | - sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this sed invocation - # correctly. Breaking it into two sed invocations is a workaround. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no eat=no - for arg - do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - if test $eat = yes; then - eat=no - continue - fi - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix=`echo "$object" | sed 's/^.*\././'` - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - # makedepend may prepend the VPATH from the source file name to the object. - # No need to regex-escape $object, excess matching of '.' is harmless. - sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process the last invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed '1,2d' "$tmpdepfile" \ - | tr ' ' "$nl" \ - | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove '-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E \ - | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - | sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - IFS=" " - for arg - do - case "$arg" in - -o) - shift - ;; - $object) - shift - ;; - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E 2>/dev/null | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" - echo "$tab" >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvcmsys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: diff -Nru gobject-introspection-1.56.1/build-aux/install-sh gobject-introspection-1.64.1/build-aux/install-sh --- gobject-introspection-1.56.1/build-aux/install-sh 2018-04-09 06:15:36.000000000 +0000 +++ gobject-introspection-1.64.1/build-aux/install-sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,508 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2014-09-12.12; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# 'make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -tab=' ' -nl=' -' -IFS=" $tab$nl" - -# Set DOITPROG to "echo" to test this script. - -doit=${DOITPROG-} -doit_exec=${doit:-exec} - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -is_target_a_directory=possibly - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) - is_target_a_directory=always - dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; - - -T) is_target_a_directory=never;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -# We allow the use of options -d and -T together, by making -d -# take the precedence; this is for compatibility with GNU install. - -if test -n "$dir_arg"; then - if test -n "$dst_arg"; then - echo "$0: target directory not allowed when installing a directory." >&2 - exit 1 - fi -fi - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call 'install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - if test $# -gt 1 || test "$is_target_a_directory" = always; then - if test ! -d "$dst_arg"; then - echo "$0: $dst_arg: Is not a directory." >&2 - exit 1 - fi - fi -fi - -if test -z "$dir_arg"; then - do_exit='(exit $ret); exit $ret' - trap "ret=129; $do_exit" 1 - trap "ret=130; $do_exit" 2 - trap "ret=141; $do_exit" 13 - trap "ret=143; $do_exit" 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names problematic for 'test' and other utilities. - case $src in - -* | [=\(\)!]) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - dst=$dst_arg - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test "$is_target_a_directory" = never; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - dstdir=`dirname "$dst"` - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - # $RANDOM is not portable (e.g. dash); use it when possible to - # lower collision chance - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - - # As "mkdir -p" follows symlinks and we work in /tmp possibly; so - # create the $tmpdir first (and fail if unsuccessful) to make sure - # that nobody tries to guess the $tmpdir name. - if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; - esac - - oIFS=$IFS - IFS=/ - set -f - set fnord $dstdir - shift - set +f - IFS=$oIFS - - prefixes= - - for d - do - test X"$d" = X && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - set +f && - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff -Nru gobject-introspection-1.56.1/build-aux/ltmain.sh gobject-introspection-1.64.1/build-aux/ltmain.sh --- gobject-introspection-1.56.1/build-aux/ltmain.sh 2018-04-09 06:15:26.000000000 +0000 +++ gobject-introspection-1.64.1/build-aux/ltmain.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,11156 +0,0 @@ -#! /bin/sh -## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2014-01-03.01 - -# libtool (GNU libtool) 2.4.6 -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -PROGRAM=libtool -PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-2" -package_revision=2.4.6 - - -## ------ ## -## Usage. ## -## ------ ## - -# Run './libtool --help' for help with using this script from the -# command line. - - -## ------------------------------- ## -## User overridable command paths. ## -## ------------------------------- ## - -# After configure completes, it has a better idea of some of the -# shell tools we need than the defaults used by the functions shared -# with bootstrap, so set those here where they can still be over- -# ridden by the user, but otherwise take precedence. - -: ${AUTOCONF="autoconf"} -: ${AUTOMAKE="automake"} - - -## -------------------------- ## -## Source external libraries. ## -## -------------------------- ## - -# Much of our low-level functionality needs to be sourced from external -# libraries, which are installed to $pkgauxdir. - -# Set a version string for this script. -scriptversion=2015-01-20.17; # UTC - -# General shell script boiler plate, and helper functions. -# Written by Gary V. Vaughan, 2004 - -# Copyright (C) 2004-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. - -# As a special exception to the GNU General Public License, if you distribute -# this file as part of a program or library that is built using GNU Libtool, -# you may include this file under the same distribution terms that you use -# for the rest of that program. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Please report bugs or propose patches to gary@gnu.org. - - -## ------ ## -## Usage. ## -## ------ ## - -# Evaluate this file near the top of your script to gain access to -# the functions and variables defined here: -# -# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh -# -# If you need to override any of the default environment variable -# settings, do that before evaluating this file. - - -## -------------------- ## -## Shell normalisation. ## -## -------------------- ## - -# Some shells need a little help to be as Bourne compatible as possible. -# Before doing anything else, make sure all that help has been provided! - -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac -fi - -# NLS nuisances: We save the old values in case they are required later. -_G_user_locale= -_G_safe_locale= -for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test set = \"\${$_G_var+set}\"; then - save_$_G_var=\$$_G_var - $_G_var=C - export $_G_var - _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" - _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" - fi" -done - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Make sure IFS has a sensible default -sp=' ' -nl=' -' -IFS="$sp $nl" - -# There are apparently some retarded systems that use ';' as a PATH separator! -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - - -## ------------------------- ## -## Locate command utilities. ## -## ------------------------- ## - - -# func_executable_p FILE -# ---------------------- -# Check that FILE is an executable regular file. -func_executable_p () -{ - test -f "$1" && test -x "$1" -} - - -# func_path_progs PROGS_LIST CHECK_FUNC [PATH] -# -------------------------------------------- -# Search for either a program that responds to --version with output -# containing "GNU", or else returned by CHECK_FUNC otherwise, by -# trying all the directories in PATH with each of the elements of -# PROGS_LIST. -# -# CHECK_FUNC should accept the path to a candidate program, and -# set $func_check_prog_result if it truncates its output less than -# $_G_path_prog_max characters. -func_path_progs () -{ - _G_progs_list=$1 - _G_check_func=$2 - _G_PATH=${3-"$PATH"} - - _G_path_prog_max=0 - _G_path_prog_found=false - _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} - for _G_dir in $_G_PATH; do - IFS=$_G_save_IFS - test -z "$_G_dir" && _G_dir=. - for _G_prog_name in $_G_progs_list; do - for _exeext in '' .EXE; do - _G_path_prog=$_G_dir/$_G_prog_name$_exeext - func_executable_p "$_G_path_prog" || continue - case `"$_G_path_prog" --version 2>&1` in - *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; - *) $_G_check_func $_G_path_prog - func_path_progs_result=$func_check_prog_result - ;; - esac - $_G_path_prog_found && break 3 - done - done - done - IFS=$_G_save_IFS - test -z "$func_path_progs_result" && { - echo "no acceptable sed could be found in \$PATH" >&2 - exit 1 - } -} - - -# We want to be able to use the functions in this file before configure -# has figured out where the best binaries are kept, which means we have -# to search for them ourselves - except when the results are already set -# where we skip the searches. - -# Unless the user overrides by setting SED, search the path for either GNU -# sed, or the sed that truncates its output the least. -test -z "$SED" && { - _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for _G_i in 1 2 3 4 5 6 7; do - _G_sed_script=$_G_sed_script$nl$_G_sed_script - done - echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed - _G_sed_script= - - func_check_prog_sed () - { - _G_path_prog=$1 - - _G_count=0 - printf 0123456789 >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo '' >> conftest.nl - "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - _G_count=`expr $_G_count + 1` - if test "$_G_count" -gt "$_G_path_prog_max"; then - # Best one so far, save it but keep looking for a better one - func_check_prog_result=$_G_path_prog - _G_path_prog_max=$_G_count - fi - # 10*(2^10) chars as input seems more than enough - test 10 -lt "$_G_count" && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out - } - - func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin - rm -f conftest.sed - SED=$func_path_progs_result -} - - -# Unless the user overrides by setting GREP, search the path for either GNU -# grep, or the grep that truncates its output the least. -test -z "$GREP" && { - func_check_prog_grep () - { - _G_path_prog=$1 - - _G_count=0 - _G_path_prog_max=0 - printf 0123456789 >conftest.in - while : - do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo 'GREP' >> conftest.nl - "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break - diff conftest.out conftest.nl >/dev/null 2>&1 || break - _G_count=`expr $_G_count + 1` - if test "$_G_count" -gt "$_G_path_prog_max"; then - # Best one so far, save it but keep looking for a better one - func_check_prog_result=$_G_path_prog - _G_path_prog_max=$_G_count - fi - # 10*(2^10) chars as input seems more than enough - test 10 -lt "$_G_count" && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out - } - - func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin - GREP=$func_path_progs_result -} - - -## ------------------------------- ## -## User overridable command paths. ## -## ------------------------------- ## - -# All uppercase variable names are used for environment variables. These -# variables can be overridden by the user before calling a script that -# uses them if a suitable command of that name is not already available -# in the command search PATH. - -: ${CP="cp -f"} -: ${ECHO="printf %s\n"} -: ${EGREP="$GREP -E"} -: ${FGREP="$GREP -F"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} - - -## -------------------- ## -## Useful sed snippets. ## -## -------------------- ## - -sed_dirname='s|/[^/]*$||' -sed_basename='s|^.*/||' - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s|\([`"$\\]\)|\\\1|g' - -# Same as above, but do not quote variable references. -sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution that turns a string into a regex matching for the -# string literally. -sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' - -# Sed substitution that converts a w32 file name or path -# that contains forward slashes, into one that contains -# (escaped) backslashes. A very naive implementation. -sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - -# Re-'\' parameter expansions in output of sed_double_quote_subst that -# were '\'-ed in input to the same. If an odd number of '\' preceded a -# '$' in input to sed_double_quote_subst, that '$' was protected from -# expansion. Since each input '\' is now two '\'s, look for any number -# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. -_G_bs='\\' -_G_bs2='\\\\' -_G_bs4='\\\\\\\\' -_G_dollar='\$' -sed_double_backslash="\ - s/$_G_bs4/&\\ -/g - s/^$_G_bs2$_G_dollar/$_G_bs&/ - s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g - s/\n//g" - - -## ----------------- ## -## Global variables. ## -## ----------------- ## - -# Except for the global variables explicitly listed below, the following -# functions in the '^func_' namespace, and the '^require_' namespace -# variables initialised in the 'Resource management' section, sourcing -# this file will not pollute your global namespace with anything -# else. There's no portable way to scope variables in Bourne shell -# though, so actually running these functions will sometimes place -# results into a variable named after the function, and often use -# temporary variables in the '^_G_' namespace. If you are careful to -# avoid using those namespaces casually in your sourcing script, things -# should continue to work as you expect. And, of course, you can freely -# overwrite any of the functions or variables defined here before -# calling anything to customize them. - -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -# Allow overriding, eg assuming that you follow the convention of -# putting '$debug_cmd' at the start of all your functions, you can get -# bash to show function call trace with: -# -# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name -debug_cmd=${debug_cmd-":"} -exit_cmd=: - -# By convention, finish your script with: -# -# exit $exit_status -# -# so that you can set exit_status to non-zero if you want to indicate -# something went wrong during execution without actually bailing out at -# the point of failure. -exit_status=$EXIT_SUCCESS - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath=$0 - -# The name of this program. -progname=`$ECHO "$progpath" |$SED "$sed_basename"` - -# Make sure we have an absolute progpath for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` - progdir=`cd "$progdir" && pwd` - progpath=$progdir/$progname - ;; - *) - _G_IFS=$IFS - IFS=${PATH_SEPARATOR-:} - for progdir in $PATH; do - IFS=$_G_IFS - test -x "$progdir/$progname" && break - done - IFS=$_G_IFS - test -n "$progdir" || progdir=`pwd` - progpath=$progdir/$progname - ;; -esac - - -## ----------------- ## -## Standard options. ## -## ----------------- ## - -# The following options affect the operation of the functions defined -# below, and should be set appropriately depending on run-time para- -# meters passed on the command line. - -opt_dry_run=false -opt_quiet=false -opt_verbose=false - -# Categories 'all' and 'none' are always available. Append any others -# you will pass as the first argument to func_warning from your own -# code. -warning_categories= - -# By default, display warnings according to 'opt_warning_types'. Set -# 'warning_func' to ':' to elide all warnings, or func_fatal_error to -# treat the next displayed warning as a fatal error. -warning_func=func_warn_and_continue - -# Set to 'all' to display all warnings, 'none' to suppress all -# warnings, or a space delimited list of some subset of -# 'warning_categories' to display only the listed warnings. -opt_warning_types=all - - -## -------------------- ## -## Resource management. ## -## -------------------- ## - -# This section contains definitions for functions that each ensure a -# particular resource (a file, or a non-empty configuration variable for -# example) is available, and if appropriate to extract default values -# from pertinent package files. Call them using their associated -# 'require_*' variable to ensure that they are executed, at most, once. -# -# It's entirely deliberate that calling these functions can set -# variables that don't obey the namespace limitations obeyed by the rest -# of this file, in order that that they be as useful as possible to -# callers. - - -# require_term_colors -# ------------------- -# Allow display of bold text on terminals that support it. -require_term_colors=func_require_term_colors -func_require_term_colors () -{ - $debug_cmd - - test -t 1 && { - # COLORTERM and USE_ANSI_COLORS environment variables take - # precedence, because most terminfo databases neglect to describe - # whether color sequences are supported. - test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} - - if test 1 = "$USE_ANSI_COLORS"; then - # Standard ANSI escape sequences - tc_reset='' - tc_bold=''; tc_standout='' - tc_red=''; tc_green='' - tc_blue=''; tc_cyan='' - else - # Otherwise trust the terminfo database after all. - test -n "`tput sgr0 2>/dev/null`" && { - tc_reset=`tput sgr0` - test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` - tc_standout=$tc_bold - test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` - test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` - test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` - test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` - test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` - } - fi - } - - require_term_colors=: -} - - -## ----------------- ## -## Function library. ## -## ----------------- ## - -# This section contains a variety of useful functions to call in your -# scripts. Take note of the portable wrappers for features provided by -# some modern shells, which will fall back to slower equivalents on -# less featureful shells. - - -# func_append VAR VALUE -# --------------------- -# Append VALUE onto the existing contents of VAR. - - # We should try to minimise forks, especially on Windows where they are - # unreasonably slow, so skip the feature probes when bash or zsh are - # being used: - if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then - : ${_G_HAVE_ARITH_OP="yes"} - : ${_G_HAVE_XSI_OPS="yes"} - # The += operator was introduced in bash 3.1 - case $BASH_VERSION in - [12].* | 3.0 | 3.0*) ;; - *) - : ${_G_HAVE_PLUSEQ_OP="yes"} - ;; - esac - fi - - # _G_HAVE_PLUSEQ_OP - # Can be empty, in which case the shell is probed, "yes" if += is - # useable or anything else if it does not work. - test -z "$_G_HAVE_PLUSEQ_OP" \ - && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ - && _G_HAVE_PLUSEQ_OP=yes - -if test yes = "$_G_HAVE_PLUSEQ_OP" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_append () - { - $debug_cmd - - eval "$1+=\$2" - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_append () - { - $debug_cmd - - eval "$1=\$$1\$2" - } -fi - - -# func_append_quoted VAR VALUE -# ---------------------------- -# Quote VALUE and append to the end of shell variable VAR, separated -# by a space. -if test yes = "$_G_HAVE_PLUSEQ_OP"; then - eval 'func_append_quoted () - { - $debug_cmd - - func_quote_for_eval "$2" - eval "$1+=\\ \$func_quote_for_eval_result" - }' -else - func_append_quoted () - { - $debug_cmd - - func_quote_for_eval "$2" - eval "$1=\$$1\\ \$func_quote_for_eval_result" - } -fi - - -# func_append_uniq VAR VALUE -# -------------------------- -# Append unique VALUE onto the existing contents of VAR, assuming -# entries are delimited by the first character of VALUE. For example: -# -# func_append_uniq options " --another-option option-argument" -# -# will only append to $options if " --another-option option-argument " -# is not already present somewhere in $options already (note spaces at -# each end implied by leading space in second argument). -func_append_uniq () -{ - $debug_cmd - - eval _G_current_value='`$ECHO $'$1'`' - _G_delim=`expr "$2" : '\(.\)'` - - case $_G_delim$_G_current_value$_G_delim in - *"$2$_G_delim"*) ;; - *) func_append "$@" ;; - esac -} - - -# func_arith TERM... -# ------------------ -# Set func_arith_result to the result of evaluating TERMs. - test -z "$_G_HAVE_ARITH_OP" \ - && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ - && _G_HAVE_ARITH_OP=yes - -if test yes = "$_G_HAVE_ARITH_OP"; then - eval 'func_arith () - { - $debug_cmd - - func_arith_result=$(( $* )) - }' -else - func_arith () - { - $debug_cmd - - func_arith_result=`expr "$@"` - } -fi - - -# func_basename FILE -# ------------------ -# Set func_basename_result to FILE with everything up to and including -# the last / stripped. -if test yes = "$_G_HAVE_XSI_OPS"; then - # If this shell supports suffix pattern removal, then use it to avoid - # forking. Hide the definitions single quotes in case the shell chokes - # on unsupported syntax... - _b='func_basename_result=${1##*/}' - _d='case $1 in - */*) func_dirname_result=${1%/*}$2 ;; - * ) func_dirname_result=$3 ;; - esac' - -else - # ...otherwise fall back to using sed. - _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' - _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` - if test "X$func_dirname_result" = "X$1"; then - func_dirname_result=$3 - else - func_append func_dirname_result "$2" - fi' -fi - -eval 'func_basename () -{ - $debug_cmd - - '"$_b"' -}' - - -# func_dirname FILE APPEND NONDIR_REPLACEMENT -# ------------------------------------------- -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -eval 'func_dirname () -{ - $debug_cmd - - '"$_d"' -}' - - -# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT -# -------------------------------------------------------- -# Perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# For efficiency, we do not delegate to the functions above but instead -# duplicate the functionality here. -eval 'func_dirname_and_basename () -{ - $debug_cmd - - '"$_b"' - '"$_d"' -}' - - -# func_echo ARG... -# ---------------- -# Echo program name prefixed message. -func_echo () -{ - $debug_cmd - - _G_message=$* - - func_echo_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_IFS - $ECHO "$progname: $_G_line" - done - IFS=$func_echo_IFS -} - - -# func_echo_all ARG... -# -------------------- -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - - -# func_echo_infix_1 INFIX ARG... -# ------------------------------ -# Echo program name, followed by INFIX on the first line, with any -# additional lines not showing INFIX. -func_echo_infix_1 () -{ - $debug_cmd - - $require_term_colors - - _G_infix=$1; shift - _G_indent=$_G_infix - _G_prefix="$progname: $_G_infix: " - _G_message=$* - - # Strip color escape sequences before counting printable length - for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" - do - test -n "$_G_tc" && { - _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` - _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` - } - done - _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes - - func_echo_infix_1_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_infix_1_IFS - $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 - _G_prefix=$_G_indent - done - IFS=$func_echo_infix_1_IFS -} - - -# func_error ARG... -# ----------------- -# Echo program name prefixed message to standard error. -func_error () -{ - $debug_cmd - - $require_term_colors - - func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 -} - - -# func_fatal_error ARG... -# ----------------------- -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - $debug_cmd - - func_error "$*" - exit $EXIT_FAILURE -} - - -# func_grep EXPRESSION FILENAME -# ----------------------------- -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $debug_cmd - - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_len STRING -# --------------- -# Set func_len_result to the length of STRING. STRING may not -# start with a hyphen. - test -z "$_G_HAVE_XSI_OPS" \ - && (eval 'x=a/b/c; - test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ - && _G_HAVE_XSI_OPS=yes - -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_len () - { - $debug_cmd - - func_len_result=${#1} - }' -else - func_len () - { - $debug_cmd - - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` - } -fi - - -# func_mkdir_p DIRECTORY-PATH -# --------------------------- -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - $debug_cmd - - _G_directory_path=$1 - _G_dir_list= - - if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then - - # Protect directory names starting with '-' - case $_G_directory_path in - -*) _G_directory_path=./$_G_directory_path ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$_G_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - _G_dir_list=$_G_directory_path:$_G_dir_list - - # If the last portion added has no slash in it, the list is done - case $_G_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` - done - _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` - - func_mkdir_p_IFS=$IFS; IFS=: - for _G_dir in $_G_dir_list; do - IFS=$func_mkdir_p_IFS - # mkdir can fail with a 'File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$_G_dir" 2>/dev/null || : - done - IFS=$func_mkdir_p_IFS - - # Bail out if we (or some other process) failed to create a directory. - test -d "$_G_directory_path" || \ - func_fatal_error "Failed to create '$1'" - fi -} - - -# func_mktempdir [BASENAME] -# ------------------------- -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, BASENAME is the basename for that directory. -func_mktempdir () -{ - $debug_cmd - - _G_template=${TMPDIR-/tmp}/${1-$progname} - - if test : = "$opt_dry_run"; then - # Return a directory name, but don't create it in dry-run mode - _G_tmpdir=$_G_template-$$ - else - - # If mktemp works, use that first and foremost - _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` - - if test ! -d "$_G_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - _G_tmpdir=$_G_template-${RANDOM-0}$$ - - func_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$_G_tmpdir" - umask $func_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$_G_tmpdir" || \ - func_fatal_error "cannot create temporary directory '$_G_tmpdir'" - fi - - $ECHO "$_G_tmpdir" -} - - -# func_normal_abspath PATH -# ------------------------ -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -func_normal_abspath () -{ - $debug_cmd - - # These SED scripts presuppose an absolute path with a trailing slash. - _G_pathcar='s|^/\([^/]*\).*$|\1|' - _G_pathcdr='s|^/[^/]*||' - _G_removedotparts=':dotsl - s|/\./|/|g - t dotsl - s|/\.$|/|' - _G_collapseslashes='s|/\{1,\}|/|g' - _G_finalslash='s|/*$|/|' - - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` - while :; do - # Processed it all yet? - if test / = "$func_normal_abspath_tpath"; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result"; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$_G_pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} - - -# func_notquiet ARG... -# -------------------- -# Echo program name prefixed message only when not in quiet mode. -func_notquiet () -{ - $debug_cmd - - $opt_quiet || func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - - -# func_relative_path SRCDIR DSTDIR -# -------------------------------- -# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. -func_relative_path () -{ - $debug_cmd - - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=$func_dirname_result - if test -z "$func_relative_path_tlibdir"; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done - - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test -n "$func_stripname_result"; then - func_append func_relative_path_result "/$func_stripname_result" - fi - - # Normalisation. If bindir is libdir, return '.' else relative path. - if test -n "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - fi - - test -n "$func_relative_path_result" || func_relative_path_result=. - - : -} - - -# func_quote_for_eval ARG... -# -------------------------- -# Aesthetically quote ARGs to be evaled later. -# This function returns two values: -# i) func_quote_for_eval_result -# double-quoted, suitable for a subsequent eval -# ii) func_quote_for_eval_unquoted_result -# has all characters that are still active within double -# quotes backslashified. -func_quote_for_eval () -{ - $debug_cmd - - func_quote_for_eval_unquoted_result= - func_quote_for_eval_result= - while test 0 -lt $#; do - case $1 in - *[\\\`\"\$]*) - _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; - *) - _G_unquoted_arg=$1 ;; - esac - if test -n "$func_quote_for_eval_unquoted_result"; then - func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" - else - func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" - fi - - case $_G_unquoted_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and variable expansion - # for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_quoted_arg=\"$_G_unquoted_arg\" - ;; - *) - _G_quoted_arg=$_G_unquoted_arg - ;; - esac - - if test -n "$func_quote_for_eval_result"; then - func_append func_quote_for_eval_result " $_G_quoted_arg" - else - func_append func_quote_for_eval_result "$_G_quoted_arg" - fi - shift - done -} - - -# func_quote_for_expand ARG -# ------------------------- -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - $debug_cmd - - case $1 in - *[\\\`\"]*) - _G_arg=`$ECHO "$1" | $SED \ - -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; - *) - _G_arg=$1 ;; - esac - - case $_G_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_arg=\"$_G_arg\" - ;; - esac - - func_quote_for_expand_result=$_G_arg -} - - -# func_stripname PREFIX SUFFIX NAME -# --------------------------------- -# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_stripname () - { - $debug_cmd - - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary variable first. - func_stripname_result=$3 - func_stripname_result=${func_stripname_result#"$1"} - func_stripname_result=${func_stripname_result%"$2"} - }' -else - func_stripname () - { - $debug_cmd - - case $2 in - .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; - *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; - esac - } -fi - - -# func_show_eval CMD [FAIL_EXP] -# ----------------------------- -# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - $debug_cmd - - _G_cmd=$1 - _G_fail_exp=${2-':'} - - func_quote_for_expand "$_G_cmd" - eval "func_notquiet $func_quote_for_expand_result" - - $opt_dry_run || { - eval "$_G_cmd" - _G_status=$? - if test 0 -ne "$_G_status"; then - eval "(exit $_G_status); $_G_fail_exp" - fi - } -} - - -# func_show_eval_locale CMD [FAIL_EXP] -# ------------------------------------ -# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - $debug_cmd - - _G_cmd=$1 - _G_fail_exp=${2-':'} - - $opt_quiet || { - func_quote_for_expand "$_G_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - $opt_dry_run || { - eval "$_G_user_locale - $_G_cmd" - _G_status=$? - eval "$_G_safe_locale" - if test 0 -ne "$_G_status"; then - eval "(exit $_G_status); $_G_fail_exp" - fi - } -} - - -# func_tr_sh -# ---------- -# Turn $1 into a string suitable for a shell variable name. -# Result is stored in $func_tr_sh_result. All characters -# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -# if $1 begins with a digit, a '_' is prepended as well. -func_tr_sh () -{ - $debug_cmd - - case $1 in - [0-9]* | *[!a-zA-Z0-9_]*) - func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` - ;; - * ) - func_tr_sh_result=$1 - ;; - esac -} - - -# func_verbose ARG... -# ------------------- -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $debug_cmd - - $opt_verbose && func_echo "$*" - - : -} - - -# func_warn_and_continue ARG... -# ----------------------------- -# Echo program name prefixed warning message to standard error. -func_warn_and_continue () -{ - $debug_cmd - - $require_term_colors - - func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 -} - - -# func_warning CATEGORY ARG... -# ---------------------------- -# Echo program name prefixed warning message to standard error. Warning -# messages can be filtered according to CATEGORY, where this function -# elides messages where CATEGORY is not listed in the global variable -# 'opt_warning_types'. -func_warning () -{ - $debug_cmd - - # CATEGORY must be in the warning_categories list! - case " $warning_categories " in - *" $1 "*) ;; - *) func_internal_error "invalid warning category '$1'" ;; - esac - - _G_category=$1 - shift - - case " $opt_warning_types " in - *" $_G_category "*) $warning_func ${1+"$@"} ;; - esac -} - - -# func_sort_ver VER1 VER2 -# ----------------------- -# 'sort -V' is not generally available. -# Note this deviates from the version comparison in automake -# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a -# but this should suffice as we won't be specifying old -# version formats or redundant trailing .0 in bootstrap.conf. -# If we did want full compatibility then we should probably -# use m4_version_compare from autoconf. -func_sort_ver () -{ - $debug_cmd - - printf '%s\n%s\n' "$1" "$2" \ - | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n -} - -# func_lt_ver PREV CURR -# --------------------- -# Return true if PREV and CURR are in the correct order according to -# func_sort_ver, otherwise false. Use it like this: -# -# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." -func_lt_ver () -{ - $debug_cmd - - test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` -} - - -# Local variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" -# time-stamp-time-zone: "UTC" -# End: -#! /bin/sh - -# Set a version string for this script. -scriptversion=2014-01-07.03; # UTC - -# A portable, pluggable option parser for Bourne shell. -# Written by Gary V. Vaughan, 2010 - -# Copyright (C) 2010-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Please report bugs or propose patches to gary@gnu.org. - - -## ------ ## -## Usage. ## -## ------ ## - -# This file is a library for parsing options in your shell scripts along -# with assorted other useful supporting features that you can make use -# of too. -# -# For the simplest scripts you might need only: -# -# #!/bin/sh -# . relative/path/to/funclib.sh -# . relative/path/to/options-parser -# scriptversion=1.0 -# func_options ${1+"$@"} -# eval set dummy "$func_options_result"; shift -# ...rest of your script... -# -# In order for the '--version' option to work, you will need to have a -# suitably formatted comment like the one at the top of this file -# starting with '# Written by ' and ending with '# warranty; '. -# -# For '-h' and '--help' to work, you will also need a one line -# description of your script's purpose in a comment directly above the -# '# Written by ' line, like the one at the top of this file. -# -# The default options also support '--debug', which will turn on shell -# execution tracing (see the comment above debug_cmd below for another -# use), and '--verbose' and the func_verbose function to allow your script -# to display verbose messages only when your user has specified -# '--verbose'. -# -# After sourcing this file, you can plug processing for additional -# options by amending the variables from the 'Configuration' section -# below, and following the instructions in the 'Option parsing' -# section further down. - -## -------------- ## -## Configuration. ## -## -------------- ## - -# You should override these variables in your script after sourcing this -# file so that they reflect the customisations you have added to the -# option parser. - -# The usage line for option parsing errors and the start of '-h' and -# '--help' output messages. You can embed shell variables for delayed -# expansion at the time the message is displayed, but you will need to -# quote other shell meta-characters carefully to prevent them being -# expanded when the contents are evaled. -usage='$progpath [OPTION]...' - -# Short help message in response to '-h' and '--help'. Add to this or -# override it after sourcing this library to reflect the full set of -# options your script accepts. -usage_message="\ - --debug enable verbose shell tracing - -W, --warnings=CATEGORY - report the warnings falling in CATEGORY [all] - -v, --verbose verbosely report processing - --version print version information and exit - -h, --help print short or long help message and exit -" - -# Additional text appended to 'usage_message' in response to '--help'. -long_help_message=" -Warning categories include: - 'all' show all warnings - 'none' turn off all the warnings - 'error' warnings are treated as fatal errors" - -# Help message printed before fatal option parsing errors. -fatal_help="Try '\$progname --help' for more information." - - - -## ------------------------- ## -## Hook function management. ## -## ------------------------- ## - -# This section contains functions for adding, removing, and running hooks -# to the main code. A hook is just a named list of of function, that can -# be run in order later on. - -# func_hookable FUNC_NAME -# ----------------------- -# Declare that FUNC_NAME will run hooks added with -# 'func_add_hook FUNC_NAME ...'. -func_hookable () -{ - $debug_cmd - - func_append hookable_fns " $1" -} - - -# func_add_hook FUNC_NAME HOOK_FUNC -# --------------------------------- -# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must -# first have been declared "hookable" by a call to 'func_hookable'. -func_add_hook () -{ - $debug_cmd - - case " $hookable_fns " in - *" $1 "*) ;; - *) func_fatal_error "'$1' does not accept hook functions." ;; - esac - - eval func_append ${1}_hooks '" $2"' -} - - -# func_remove_hook FUNC_NAME HOOK_FUNC -# ------------------------------------ -# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. -func_remove_hook () -{ - $debug_cmd - - eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' -} - - -# func_run_hooks FUNC_NAME [ARG]... -# --------------------------------- -# Run all hook functions registered to FUNC_NAME. -# It is assumed that the list of hook functions contains nothing more -# than a whitespace-delimited list of legal shell function names, and -# no effort is wasted trying to catch shell meta-characters or preserve -# whitespace. -func_run_hooks () -{ - $debug_cmd - - case " $hookable_fns " in - *" $1 "*) ;; - *) func_fatal_error "'$1' does not support hook funcions.n" ;; - esac - - eval _G_hook_fns=\$$1_hooks; shift - - for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift - done - - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result -} - - - -## --------------- ## -## Option parsing. ## -## --------------- ## - -# In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed -# options in '_result', escaped suitably for -# 'eval'. Like this: -# -# my_options_prep () -# { -# $debug_cmd -# -# # Extend the existing usage message. -# usage_message=$usage_message' -# -s, --silent don'\''t print informational messages -# ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result -# } -# func_add_hook func_options_prep my_options_prep -# -# -# my_silent_option () -# { -# $debug_cmd -# -# # Note that for efficiency, we parse as many options as we can -# # recognise in a loop before passing the remainder back to the -# # caller on the first unrecognised argument we encounter. -# while test $# -gt 0; do -# opt=$1; shift -# case $opt in -# --silent|-s) opt_silent=: ;; -# # Separate non-argument short options: -# -s*) func_split_short_opt "$_G_opt" -# set dummy "$func_split_short_opt_name" \ -# "-$func_split_short_opt_arg" ${1+"$@"} -# shift -# ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; -# esac -# done -# -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result -# } -# func_add_hook func_parse_options my_silent_option -# -# -# my_option_validation () -# { -# $debug_cmd -# -# $opt_silent && $opt_verbose && func_fatal_help "\ -# '--silent' and '--verbose' options are mutually exclusive." -# -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result -# } -# func_add_hook func_validate_options my_option_validation -# -# You'll alse need to manually amend $usage_message to reflect the extra -# options you parse. It's preferable to append if you can, so that -# multiple option parsing hooks can be added safely. - - -# func_options [ARG]... -# --------------------- -# All the functions called inside func_options are hookable. See the -# individual implementations for details. -func_hookable func_options -func_options () -{ - $debug_cmd - - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} - - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} - - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result -} - - -# func_options_prep [ARG]... -# -------------------------- -# All initialisations required before starting the option parse loop. -# Note that when calling hook functions, we pass through the list of -# positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete -# modified list must be put in 'func_run_hooks_result' before -# returning. -func_hookable func_options_prep -func_options_prep () -{ - $debug_cmd - - # Option defaults: - opt_verbose=false - opt_warning_types= - - func_run_hooks func_options_prep ${1+"$@"} - - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result -} - - -# func_parse_options [ARG]... -# --------------------------- -# The main option parsing loop. -func_hookable func_parse_options -func_parse_options () -{ - $debug_cmd - - func_parse_options_result= - - # this just eases exit handling - while test $# -gt 0; do - # Defer to hook functions for initial option parsing, so they - # get priority in the event of reusing an option name. - func_run_hooks func_parse_options ${1+"$@"} - - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift - - # Break out of the loop if we already parsed every option. - test $# -gt 0 || break - - _G_opt=$1 - shift - case $_G_opt in - --debug|-x) debug_cmd='set -x' - func_echo "enabling shell trace mode" - $debug_cmd - ;; - - --no-warnings|--no-warning|--no-warn) - set dummy --warnings none ${1+"$@"} - shift - ;; - - --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break - case " $warning_categories $1" in - *" $1 "*) - # trailing space prevents matching last $1 above - func_append_uniq opt_warning_types " $1" - ;; - *all) - opt_warning_types=$warning_categories - ;; - *none) - opt_warning_types=none - warning_func=: - ;; - *error) - opt_warning_types=$warning_categories - warning_func=func_fatal_error - ;; - *) - func_fatal_error \ - "unsupported warning category: '$1'" - ;; - esac - shift - ;; - - --verbose|-v) opt_verbose=: ;; - --version) func_version ;; - -\?|-h) func_usage ;; - --help) func_help ;; - - # Separate optargs to long options (plugins may need this): - --*=*) func_split_equals "$_G_opt" - set dummy "$func_split_equals_lhs" \ - "$func_split_equals_rhs" ${1+"$@"} - shift - ;; - - # Separate optargs to short options: - -W*) - func_split_short_opt "$_G_opt" - set dummy "$func_split_short_opt_name" \ - "$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - # Separate non-argument short options: - -\?*|-h*|-v*|-x*) - func_split_short_opt "$_G_opt" - set dummy "$func_split_short_opt_name" \ - "-$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - --) break ;; - -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; - esac - done - - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result -} - - -# func_validate_options [ARG]... -# ------------------------------ -# Perform any sanity checks on option settings and/or unconsumed -# arguments. -func_hookable func_validate_options -func_validate_options () -{ - $debug_cmd - - # Display all warnings if -W was not given. - test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - - func_run_hooks func_validate_options ${1+"$@"} - - # Bail if the options were screwed! - $exit_cmd $EXIT_FAILURE - - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result -} - - - -## ----------------- ## -## Helper functions. ## -## ----------------- ## - -# This section contains the helper functions used by the rest of the -# hookable option parser framework in ascii-betical order. - - -# func_fatal_help ARG... -# ---------------------- -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - $debug_cmd - - eval \$ECHO \""Usage: $usage"\" - eval \$ECHO \""$fatal_help"\" - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - - -# func_help -# --------- -# Echo long help message to standard output and exit. -func_help () -{ - $debug_cmd - - func_usage_message - $ECHO "$long_help_message" - exit 0 -} - - -# func_missing_arg ARGNAME -# ------------------------ -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - $debug_cmd - - func_error "Missing argument for '$1'." - exit_cmd=exit -} - - -# func_split_equals STRING -# ------------------------ -# Set func_split_equals_lhs and func_split_equals_rhs shell variables after -# splitting STRING at the '=' sign. -test -z "$_G_HAVE_XSI_OPS" \ - && (eval 'x=a/b/c; - test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ - && _G_HAVE_XSI_OPS=yes - -if test yes = "$_G_HAVE_XSI_OPS" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_split_equals () - { - $debug_cmd - - func_split_equals_lhs=${1%%=*} - func_split_equals_rhs=${1#*=} - test "x$func_split_equals_lhs" = "x$1" \ - && func_split_equals_rhs= - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_split_equals () - { - $debug_cmd - - func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` - func_split_equals_rhs= - test "x$func_split_equals_lhs" = "x$1" \ - || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` - } -fi #func_split_equals - - -# func_split_short_opt SHORTOPT -# ----------------------------- -# Set func_split_short_opt_name and func_split_short_opt_arg shell -# variables after splitting SHORTOPT after the 2nd character. -if test yes = "$_G_HAVE_XSI_OPS" -then - # This is an XSI compatible shell, allowing a faster implementation... - eval 'func_split_short_opt () - { - $debug_cmd - - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"} - }' -else - # ...otherwise fall back to using expr, which is often a shell builtin. - func_split_short_opt () - { - $debug_cmd - - func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` - func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` - } -fi #func_split_short_opt - - -# func_usage -# ---------- -# Echo short help message to standard output and exit. -func_usage () -{ - $debug_cmd - - func_usage_message - $ECHO "Run '$progname --help |${PAGER-more}' for full usage" - exit 0 -} - - -# func_usage_message -# ------------------ -# Echo short help message to standard output. -func_usage_message () -{ - $debug_cmd - - eval \$ECHO \""Usage: $usage"\" - echo - $SED -n 's|^# || - /^Written by/{ - x;p;x - } - h - /^Written by/q' < "$progpath" - echo - eval \$ECHO \""$usage_message"\" -} - - -# func_version -# ------------ -# Echo version message to standard output and exit. -func_version () -{ - $debug_cmd - - printf '%s\n' "$progname $scriptversion" - $SED -n ' - /(C)/!b go - :more - /\./!{ - N - s|\n# | | - b more - } - :go - /^# Written by /,/# warranty; / { - s|^# || - s|^# *$|| - s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| - p - } - /^# Written by / { - s|^# || - p - } - /^warranty; /q' < "$progpath" - - exit $? -} - - -# Local variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" -# time-stamp-time-zone: "UTC" -# End: - -# Set a version string. -scriptversion='(GNU libtool) 2.4.6' - - -# func_echo ARG... -# ---------------- -# Libtool also displays the current mode in messages, so override -# funclib.sh func_echo with this custom definition. -func_echo () -{ - $debug_cmd - - _G_message=$* - - func_echo_IFS=$IFS - IFS=$nl - for _G_line in $_G_message; do - IFS=$func_echo_IFS - $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" - done - IFS=$func_echo_IFS -} - - -# func_warning ARG... -# ------------------- -# Libtool warnings are not categorized, so override funclib.sh -# func_warning with this simpler definition. -func_warning () -{ - $debug_cmd - - $warning_func ${1+"$@"} -} - - -## ---------------- ## -## Options parsing. ## -## ---------------- ## - -# Hook in the functions to make sure our own options are parsed during -# the option parsing loop. - -usage='$progpath [OPTION]... [MODE-ARG]...' - -# Short help message in response to '-h'. -usage_message="Options: - --config show all configuration variables - --debug enable verbose shell tracing - -n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --mode=MODE use operation mode MODE - --no-warnings equivalent to '-Wnone' - --preserve-dup-deps don't remove duplicate dependency libraries - --quiet, --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - -v, --verbose print more informational messages than default - --version print version information - -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] - -h, --help, --help-all print short, long, or detailed help message -" - -# Additional text appended to 'usage_message' in response to '--help'. -func_help () -{ - $debug_cmd - - func_usage_message - $ECHO "$long_help_message - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. When passed as first option, -'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. -Try '$progname --help --mode=MODE' for a more detailed description of MODE. - -When reporting a bug, please describe a test case to reproduce it and -include the following information: - - host-triplet: $host - shell: $SHELL - compiler: $LTCC - compiler flags: $LTCFLAGS - linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-2 - automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` - autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` - -Report bugs to . -GNU libtool home page: . -General help using GNU software: ." - exit 0 -} - - -# func_lo2o OBJECT-NAME -# --------------------- -# Transform OBJECT-NAME from a '.lo' suffix to the platform specific -# object suffix. - -lo2o=s/\\.lo\$/.$objext/ -o2lo=s/\\.$objext\$/.lo/ - -if test yes = "$_G_HAVE_XSI_OPS"; then - eval 'func_lo2o () - { - case $1 in - *.lo) func_lo2o_result=${1%.lo}.$objext ;; - * ) func_lo2o_result=$1 ;; - esac - }' - - # func_xform LIBOBJ-OR-SOURCE - # --------------------------- - # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) - # suffix to a '.lo' libtool-object suffix. - eval 'func_xform () - { - func_xform_result=${1%.*}.lo - }' -else - # ...otherwise fall back to using sed. - func_lo2o () - { - func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` - } - - func_xform () - { - func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` - } -fi - - -# func_fatal_configuration ARG... -# ------------------------------- -# Echo program name prefixed message to standard error, followed by -# a configuration failure hint, and exit. -func_fatal_configuration () -{ - func__fatal_error ${1+"$@"} \ - "See the $PACKAGE documentation for more information." \ - "Fatal configuration error." -} - - -# func_config -# ----------- -# Display the configuration for all the tags in this script. -func_config () -{ - re_begincf='^# ### BEGIN LIBTOOL' - re_endcf='^# ### END LIBTOOL' - - # Default configuration. - $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - - # Now print the configurations for the tags. - for tagname in $taglist; do - $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" - done - - exit $? -} - - -# func_features -# ------------- -# Display the features supported by this script. -func_features () -{ - echo "host: $host" - if test yes = "$build_libtool_libs"; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test yes = "$build_old_libs"; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - - exit $? -} - - -# func_enable_tag TAGNAME -# ----------------------- -# Verify that TAGNAME is valid, and either flag an error and exit, or -# enable the TAGNAME tag. We also add TAGNAME to the global $taglist -# variable here. -func_enable_tag () -{ - # Global variable: - tagname=$1 - - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf=/$re_begincf/,/$re_endcf/p - - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac - - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; - *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - - -# func_check_version_match -# ------------------------ -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -# libtool_options_prep [ARG]... -# ----------------------------- -# Preparation for options parsed by libtool. -libtool_options_prep () -{ - $debug_mode - - # Option defaults: - opt_config=false - opt_dlopen= - opt_dry_run=false - opt_help=false - opt_mode= - opt_preserve_dup_deps=false - opt_quiet=false - - nonopt= - preserve_args= - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result -} -func_add_hook func_options_prep libtool_options_prep - - -# libtool_parse_options [ARG]... -# --------------------------------- -# Provide handling for libtool specific options. -libtool_parse_options () -{ - $debug_cmd - - # Perform our own loop to consume as many options as possible in - # each iteration. - while test $# -gt 0; do - _G_opt=$1 - shift - case $_G_opt in - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - - --config) func_config ;; - - --dlopen|-dlopen) - opt_dlopen="${opt_dlopen+$opt_dlopen -}$1" - shift - ;; - - --preserve-dup-deps) - opt_preserve_dup_deps=: ;; - - --features) func_features ;; - - --finish) set dummy --mode finish ${1+"$@"}; shift ;; - - --help) opt_help=: ;; - - --help-all) opt_help=': help-all' ;; - - --mode) test $# = 0 && func_missing_arg $_G_opt && break - opt_mode=$1 - case $1 in - # Valid mode arguments: - clean|compile|execute|finish|install|link|relink|uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $_G_opt" - exit_cmd=exit - break - ;; - esac - shift - ;; - - --no-silent|--no-quiet) - opt_quiet=false - func_append preserve_args " $_G_opt" - ;; - - --no-warnings|--no-warning|--no-warn) - opt_warning=false - func_append preserve_args " $_G_opt" - ;; - - --no-verbose) - opt_verbose=false - func_append preserve_args " $_G_opt" - ;; - - --silent|--quiet) - opt_quiet=: - opt_verbose=false - func_append preserve_args " $_G_opt" - ;; - - --tag) test $# = 0 && func_missing_arg $_G_opt && break - opt_tag=$1 - func_append preserve_args " $_G_opt $1" - func_enable_tag "$1" - shift - ;; - - --verbose|-v) opt_quiet=false - opt_verbose=: - func_append preserve_args " $_G_opt" - ;; - - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; - esac - done - - - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result -} -func_add_hook func_parse_options libtool_parse_options - - - -# libtool_validate_options [ARG]... -# --------------------------------- -# Perform any sanity checks on option settings and/or unconsumed -# arguments. -libtool_validate_options () -{ - # save first non-option argument - if test 0 -lt $#; then - nonopt=$1 - shift - fi - - # preserve --debug - test : = "$debug_cmd" || func_append preserve_args " --debug" - - case $host in - # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 - # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 - *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac - - $opt_help || { - # Sanity checks first: - func_check_version_match - - test yes != "$build_libtool_libs" \ - && test yes != "$build_old_libs" \ - && func_fatal_configuration "not configured to build any kind of library" - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$opt_dlopen" && test execute != "$opt_mode"; then - func_error "unrecognized option '-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help=$help - help="Try '$progname --help --mode=$opt_mode' for more information." - } - - # Pass back the unparsed argument list - func_quote_for_eval ${1+"$@"} - libtool_validate_options_result=$func_quote_for_eval_result -} -func_add_hook func_validate_options libtool_validate_options - - -# Process options as early as possible so that --help and --version -# can return quickly. -func_options ${1+"$@"} -eval set dummy "$func_options_result"; shift - - - -## ----------- ## -## Main. ## -## ----------- ## - -magic='%%%MAGIC variable%%%' -magic_exe='%%%MAGIC EXE variable%%%' - -# Global variables. -extracted_archives= -extracted_serial=0 - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# func_generated_by_libtool -# True iff stdin has been generated by Libtool. This function is only -# a basic sanity check; it will hardly flush out determined imposters. -func_generated_by_libtool_p () -{ - $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_p file -# True iff FILE is a libtool '.la' library or '.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool '.la' library or '.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if 'file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case $lalib_p_line in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test yes = "$lalib_p" -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - test -f "$1" && - $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $debug_cmd - - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$sp$nl - eval cmd=\"$cmd\" - IFS=$save_ifs - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# 'FILE.' does not work on cygwin managed mounts. -func_source () -{ - $debug_cmd - - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_resolve_sysroot PATH -# Replace a leading = in PATH with a sysroot. Store the result into -# func_resolve_sysroot_result -func_resolve_sysroot () -{ - func_resolve_sysroot_result=$1 - case $func_resolve_sysroot_result in - =*) - func_stripname '=' '' "$func_resolve_sysroot_result" - func_resolve_sysroot_result=$lt_sysroot$func_stripname_result - ;; - esac -} - -# func_replace_sysroot PATH -# If PATH begins with the sysroot, replace it with = and -# store the result into func_replace_sysroot_result. -func_replace_sysroot () -{ - case $lt_sysroot:$1 in - ?*:"$lt_sysroot"*) - func_stripname "$lt_sysroot" '' "$1" - func_replace_sysroot_result='='$func_stripname_result - ;; - *) - # Including no sysroot. - func_replace_sysroot_result=$1 - ;; - esac -} - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $debug_cmd - - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case "$@ " in - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with '--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=$1 - if test yes = "$build_libtool_libs"; then - write_lobj=\'$2\' - else - write_lobj=none - fi - - if test yes = "$build_old_libs"; then - write_oldobj=\'$3\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T </dev/null` - if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then - func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | - $SED -e "$sed_naive_backslashify"` - else - func_convert_core_file_wine_to_w32_result= - fi - fi -} -# end: func_convert_core_file_wine_to_w32 - - -# func_convert_core_path_wine_to_w32 ARG -# Helper function used by path conversion functions when $build is *nix, and -# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly -# configured wine environment available, with the winepath program in $build's -# $PATH. Assumes ARG has no leading or trailing path separator characters. -# -# ARG is path to be converted from $build format to win32. -# Result is available in $func_convert_core_path_wine_to_w32_result. -# Unconvertible file (directory) names in ARG are skipped; if no directory names -# are convertible, then the result may be empty. -func_convert_core_path_wine_to_w32 () -{ - $debug_cmd - - # unfortunately, winepath doesn't convert paths, only file names - func_convert_core_path_wine_to_w32_result= - if test -n "$1"; then - oldIFS=$IFS - IFS=: - for func_convert_core_path_wine_to_w32_f in $1; do - IFS=$oldIFS - func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" - if test -n "$func_convert_core_file_wine_to_w32_result"; then - if test -z "$func_convert_core_path_wine_to_w32_result"; then - func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result - else - func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" - fi - fi - done - IFS=$oldIFS - fi -} -# end: func_convert_core_path_wine_to_w32 - - -# func_cygpath ARGS... -# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when -# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) -# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or -# (2), returns the Cygwin file name or path in func_cygpath_result (input -# file name or path is assumed to be in w32 format, as previously converted -# from $build's *nix or MSYS format). In case (3), returns the w32 file name -# or path in func_cygpath_result (input file name or path is assumed to be in -# Cygwin format). Returns an empty string on error. -# -# ARGS are passed to cygpath, with the last one being the file name or path to -# be converted. -# -# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH -# environment variable; do not put it in $PATH. -func_cygpath () -{ - $debug_cmd - - if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then - func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` - if test "$?" -ne 0; then - # on failure, ensure result is empty - func_cygpath_result= - fi - else - func_cygpath_result= - func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" - fi -} -#end: func_cygpath - - -# func_convert_core_msys_to_w32 ARG -# Convert file name or path ARG from MSYS format to w32 format. Return -# result in func_convert_core_msys_to_w32_result. -func_convert_core_msys_to_w32 () -{ - $debug_cmd - - # awkward: cmd appends spaces to result - func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` -} -#end: func_convert_core_msys_to_w32 - - -# func_convert_file_check ARG1 ARG2 -# Verify that ARG1 (a file name in $build format) was converted to $host -# format in ARG2. Otherwise, emit an error message, but continue (resetting -# func_to_host_file_result to ARG1). -func_convert_file_check () -{ - $debug_cmd - - if test -z "$2" && test -n "$1"; then - func_error "Could not determine host file name corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_file_result=$1 - fi -} -# end func_convert_file_check - - -# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH -# Verify that FROM_PATH (a path in $build format) was converted to $host -# format in TO_PATH. Otherwise, emit an error message, but continue, resetting -# func_to_host_file_result to a simplistic fallback value (see below). -func_convert_path_check () -{ - $debug_cmd - - if test -z "$4" && test -n "$3"; then - func_error "Could not determine the host path corresponding to" - func_error " '$3'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This is a deliberately simplistic "conversion" and - # should not be "improved". See libtool.info. - if test "x$1" != "x$2"; then - lt_replace_pathsep_chars="s|$1|$2|g" - func_to_host_path_result=`echo "$3" | - $SED -e "$lt_replace_pathsep_chars"` - else - func_to_host_path_result=$3 - fi - fi -} -# end func_convert_path_check - - -# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG -# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT -# and appending REPL if ORIG matches BACKPAT. -func_convert_path_front_back_pathsep () -{ - $debug_cmd - - case $4 in - $1 ) func_to_host_path_result=$3$func_to_host_path_result - ;; - esac - case $4 in - $2 ) func_append func_to_host_path_result "$3" - ;; - esac -} -# end func_convert_path_front_back_pathsep - - -################################################## -# $build to $host FILE NAME CONVERSION FUNCTIONS # -################################################## -# invoked via '$to_host_file_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# Result will be available in $func_to_host_file_result. - - -# func_to_host_file ARG -# Converts the file name ARG from $build format to $host format. Return result -# in func_to_host_file_result. -func_to_host_file () -{ - $debug_cmd - - $to_host_file_cmd "$1" -} -# end func_to_host_file - - -# func_to_tool_file ARG LAZY -# converts the file name ARG from $build format to toolchain format. Return -# result in func_to_tool_file_result. If the conversion in use is listed -# in (the comma separated) LAZY, no conversion takes place. -func_to_tool_file () -{ - $debug_cmd - - case ,$2, in - *,"$to_tool_file_cmd",*) - func_to_tool_file_result=$1 - ;; - *) - $to_tool_file_cmd "$1" - func_to_tool_file_result=$func_to_host_file_result - ;; - esac -} -# end func_to_tool_file - - -# func_convert_file_noop ARG -# Copy ARG to func_to_host_file_result. -func_convert_file_noop () -{ - func_to_host_file_result=$1 -} -# end func_convert_file_noop - - -# func_convert_file_msys_to_w32 ARG -# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_file_result. -func_convert_file_msys_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_to_host_file_result=$func_convert_core_msys_to_w32_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_w32 - - -# func_convert_file_cygwin_to_w32 ARG -# Convert file name ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_file_cygwin_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - # because $build is cygwin, we call "the" cygpath in $PATH; no need to use - # LT_CYGPATH in this case. - func_to_host_file_result=`cygpath -m "$1"` - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_cygwin_to_w32 - - -# func_convert_file_nix_to_w32 ARG -# Convert file name ARG from *nix to w32 format. Requires a wine environment -# and a working winepath. Returns result in func_to_host_file_result. -func_convert_file_nix_to_w32 () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_file_wine_to_w32 "$1" - func_to_host_file_result=$func_convert_core_file_wine_to_w32_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_w32 - - -# func_convert_file_msys_to_cygwin ARG -# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_file_msys_to_cygwin () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_cygpath -u "$func_convert_core_msys_to_w32_result" - func_to_host_file_result=$func_cygpath_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_cygwin - - -# func_convert_file_nix_to_cygwin ARG -# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed -# in a wine environment, working winepath, and LT_CYGPATH set. Returns result -# in func_to_host_file_result. -func_convert_file_nix_to_cygwin () -{ - $debug_cmd - - func_to_host_file_result=$1 - if test -n "$1"; then - # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. - func_convert_core_file_wine_to_w32 "$1" - func_cygpath -u "$func_convert_core_file_wine_to_w32_result" - func_to_host_file_result=$func_cygpath_result - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_cygwin - - -############################################# -# $build to $host PATH CONVERSION FUNCTIONS # -############################################# -# invoked via '$to_host_path_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# The result will be available in $func_to_host_path_result. -# -# Path separators are also converted from $build format to $host format. If -# ARG begins or ends with a path separator character, it is preserved (but -# converted to $host format) on output. -# -# All path conversion functions are named using the following convention: -# file name conversion function : func_convert_file_X_to_Y () -# path conversion function : func_convert_path_X_to_Y () -# where, for any given $build/$host combination the 'X_to_Y' value is the -# same. If conversion functions are added for new $build/$host combinations, -# the two new functions must follow this pattern, or func_init_to_host_path_cmd -# will break. - - -# func_init_to_host_path_cmd -# Ensures that function "pointer" variable $to_host_path_cmd is set to the -# appropriate value, based on the value of $to_host_file_cmd. -to_host_path_cmd= -func_init_to_host_path_cmd () -{ - $debug_cmd - - if test -z "$to_host_path_cmd"; then - func_stripname 'func_convert_file_' '' "$to_host_file_cmd" - to_host_path_cmd=func_convert_path_$func_stripname_result - fi -} - - -# func_to_host_path ARG -# Converts the path ARG from $build format to $host format. Return result -# in func_to_host_path_result. -func_to_host_path () -{ - $debug_cmd - - func_init_to_host_path_cmd - $to_host_path_cmd "$1" -} -# end func_to_host_path - - -# func_convert_path_noop ARG -# Copy ARG to func_to_host_path_result. -func_convert_path_noop () -{ - func_to_host_path_result=$1 -} -# end func_convert_path_noop - - -# func_convert_path_msys_to_w32 ARG -# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_path_result. -func_convert_path_msys_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # Remove leading and trailing path separator characters from ARG. MSYS - # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; - # and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result=$func_convert_core_msys_to_w32_result - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_msys_to_w32 - - -# func_convert_path_cygwin_to_w32 ARG -# Convert path ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_path_cygwin_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_cygwin_to_w32 - - -# func_convert_path_nix_to_w32 ARG -# Convert path ARG from *nix to w32 format. Requires a wine environment and -# a working winepath. Returns result in func_to_host_file_result. -func_convert_path_nix_to_w32 () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result=$func_convert_core_path_wine_to_w32_result - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_nix_to_w32 - - -# func_convert_path_msys_to_cygwin ARG -# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_path_msys_to_cygwin () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - func_to_host_path_result=$func_cygpath_result - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_msys_to_cygwin - - -# func_convert_path_nix_to_cygwin ARG -# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a -# a wine environment, working winepath, and LT_CYGPATH set. Returns result in -# func_to_host_file_result. -func_convert_path_nix_to_cygwin () -{ - $debug_cmd - - func_to_host_path_result=$1 - if test -n "$1"; then - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" - func_to_host_path_result=$func_cygpath_result - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_nix_to_cygwin - - -# func_dll_def_p FILE -# True iff FILE is a Windows DLL '.def' file. -# Keep in sync with _LT_DLL_DEF_P in libtool.m4 -func_dll_def_p () -{ - $debug_cmd - - func_dll_def_p_tmp=`$SED -n \ - -e 's/^[ ]*//' \ - -e '/^\(;.*\)*$/d' \ - -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ - -e q \ - "$1"` - test DEF = "$func_dll_def_p_tmp" -} - - -# func_mode_compile arg... -func_mode_compile () -{ - $debug_cmd - - # Get the compilation command and the source file. - base_compile= - srcfile=$nonopt # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - pie_flag= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg=$arg - arg_mode=normal - ;; - - target ) - libobj=$arg - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - test -n "$libobj" && \ - func_fatal_error "you cannot specify '-o' more than once" - arg_mode=target - continue - ;; - - -pie | -fpie | -fPIE) - func_append pie_flag " $arg" - continue - ;; - - -shared | -static | -prefer-pic | -prefer-non-pic) - func_append later " $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - lastarg= - save_ifs=$IFS; IFS=, - for arg in $args; do - IFS=$save_ifs - func_append_quoted lastarg "$arg" - done - IFS=$save_ifs - func_stripname ' ' '' "$lastarg" - lastarg=$func_stripname_result - - # Add the arguments to base_compile. - func_append base_compile " $lastarg" - continue - ;; - - *) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg=$srcfile - srcfile=$arg - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - func_append_quoted base_compile "$lastarg" - done # for arg - - case $arg_mode in - arg) - func_fatal_error "you must specify an argument for -Xcompile" - ;; - target) - func_fatal_error "you must specify a target with '-o'" - ;; - *) - # Get the name of the library object. - test -z "$libobj" && { - func_basename "$srcfile" - libobj=$func_basename_result - } - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - case $libobj in - *.[cCFSifmso] | \ - *.ada | *.adb | *.ads | *.asm | \ - *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) - func_xform "$libobj" - libobj=$func_xform_result - ;; - esac - - case $libobj in - *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; - *) - func_fatal_error "cannot determine name of library object from '$libobj'" - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -shared) - test yes = "$build_libtool_libs" \ - || func_fatal_configuration "cannot build a shared library" - build_old_libs=no - continue - ;; - - -static) - build_libtool_libs=no - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ - && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name '$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname=$func_basename_result - xdir=$func_dirname_result - lobj=$xdir$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test yes = "$build_old_libs"; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test no = "$compiler_c_o"; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext - lockfile=$output_obj.lock - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test yes = "$need_locks"; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test warn = "$need_locks"; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - func_append removelist " $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - func_append removelist " $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 - srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test yes = "$build_libtool_libs"; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test no != "$pic_mode"; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - func_append command " -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test warn = "$need_locks" && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test yes = "$suppress_opt"; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test yes = "$build_old_libs"; then - if test yes != "$pic_mode"; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test yes = "$compiler_c_o"; then - func_append command " -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - func_append command "$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test warn = "$need_locks" && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support '-c' and '-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test no != "$need_locks"; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { - test compile = "$opt_mode" && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $opt_mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to build PIC objects only - -prefer-non-pic try to build non-PIC objects only - -shared do not build a '.o' file suitable for static linking - -static only build a '.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler - -COMPILE-COMMAND is a command to be used in creating a 'standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix '.c' with the -library object suffix, '.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to '-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the '--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the 'install' or 'cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -bindir BINDIR specify path to binaries directory (for systems where - libraries must be found in the PATH setting at runtime) - -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE use a list of object files found in FILE to specify objects - -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -Wc,FLAG - -Xcompiler FLAG pass linker-specific FLAG directly to the compiler - -Wl,FLAG - -Xlinker FLAG pass linker-specific FLAG directly to the linker - -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) - -All other options (arguments beginning with '-') are ignored. - -Every other argument is treated as a filename. Files ending in '.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in '.la', then a libtool library is created, -only library objects ('.lo' files) may be specified, and '-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created -using 'ar' and 'ranlib', or on Windows using 'lib'. - -If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode '$opt_mode'" - ;; - esac - - echo - $ECHO "Try '$progname --help' for more information about other modes." -} - -# Now that we've collected a possible --mode arg, show help if necessary -if $opt_help; then - if test : = "$opt_help"; then - func_mode_help - else - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - func_mode_help - done - } | $SED -n '1p; 2,$s/^Usage:/ or: /p' - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - echo - func_mode_help - done - } | - $SED '1d - /^When reporting/,/^Report/{ - H - d - } - $x - /information about other modes/d - /more detailed .*MODE/d - s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' - fi - exit $? -fi - - -# func_mode_execute arg... -func_mode_execute () -{ - $debug_cmd - - # The first argument is the command name. - cmd=$nonopt - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $opt_dlopen; do - test -f "$file" \ - || func_fatal_help "'$file' is not a file" - - dir= - case $file in - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "'$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "'$file' was not linked with '-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir=$func_dirname_result - - if test -f "$dir/$objdir/$dlname"; then - func_append dir "/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir=$func_dirname_result - ;; - - *) - func_warning "'-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir=$absdir - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic=$magic - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -* | *.la | *.lo ) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file=$progdir/$program - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file=$progdir/$program - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_append_quoted args "$file" - done - - if $opt_dry_run; then - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - else - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd=\$cmd$args - fi -} - -test execute = "$opt_mode" && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $debug_cmd - - libs= - libdirs= - admincmds= - - for opt in "$nonopt" ${1+"$@"} - do - if test -d "$opt"; then - func_append libdirs " $opt" - - elif test -f "$opt"; then - if func_lalib_unsafe_p "$opt"; then - func_append libs " $opt" - else - func_warning "'$opt' is not a valid libtool archive" - fi - - else - func_fatal_error "invalid argument '$opt'" - fi - done - - if test -n "$libs"; then - if test -n "$lt_sysroot"; then - sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` - sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" - else - sysroot_cmd= - fi - - # Remove sysroot references - if $opt_dry_run; then - for lib in $libs; do - echo "removing references to $lt_sysroot and '=' prefixes from $lib" - done - else - tmpdir=`func_mktempdir` - for lib in $libs; do - $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ - > $tmpdir/tmp-la - mv -f $tmpdir/tmp-la $lib - done - ${RM}r "$tmpdir" - fi - fi - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || func_append admincmds " - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_quiet && exit $EXIT_SUCCESS - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the '-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the '$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the '$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the '$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" - fi - echo - - echo "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" - echo "pages." - ;; - *) - echo "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - echo "----------------------------------------------------------------------" - fi - exit $EXIT_SUCCESS -} - -test finish = "$opt_mode" && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $debug_cmd - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || - # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac - then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" - install_shared_prog=$install_prog - case " $install_prog " in - *[\\\ /]cp\ *) install_cp=: ;; - *) install_cp=false ;; - esac - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=false - stripme= - no_mode=: - for arg - do - arg2= - if test -n "$dest"; then - func_append files " $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=: ;; - -f) - if $install_cp; then :; else - prev=$arg - fi - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - if test X-m = "X$prev" && test -n "$install_override_mode"; then - arg2=$install_override_mode - no_mode=false - fi - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" - if test -n "$arg2"; then - func_quote_for_eval "$arg2" - fi - func_append install_shared_prog " $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the '$prev' option requires an argument" - - if test -n "$install_override_mode" && $no_mode; then - if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" - fi - fi - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=: - if $isdir; then - destdir=$dest - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir=$func_dirname_result - destname=$func_basename_result - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "'$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "'$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic=$magic - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - func_append staticlibs " $file" - ;; - - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "'$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) func_append current_libdirs " $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) func_append future_libdirs " $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir=$func_dirname_result - func_append dir "$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking '$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname=$1 - shift - - srcname=$realname - test -n "$relink_command" && srcname=${realname}T - - # Install the shared library and build the symlinks. - func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme=$stripme - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme= - ;; - esac - ;; - os2*) - case $realname in - *_dll.a) - tstripme= - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try 'ln -sf' first, because the 'ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib=$destdir/$realname - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name=$func_basename_result - instname=$dir/${name}i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && func_append staticlibs " $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile=$destdir/$destname - else - func_basename "$file" - destfile=$func_basename_result - destfile=$destdir/$destfile - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest=$destfile - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to '$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test yes = "$build_old_libs"; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile=$destdir/$destname - else - func_basename "$file" - destfile=$func_basename_result - destfile=$destdir/$destfile - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext= - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=.exe - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script '$wrapper'" - - finalize=: - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "'$lib' has not been installed in '$libdir'" - finalize=false - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test no = "$fast_install" && test -n "$relink_command"; then - $opt_dry_run || { - if $finalize; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file=$func_basename_result - outputname=$tmpdir/$file - # Replace the output file specification. - relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_quiet || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink '$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file=$outputname - else - func_warning "cannot relink '$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name=$func_basename_result - - # Set up the ranlib parameters. - oldlib=$destdir/$name - func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 - tool_oldlib=$func_to_tool_file_result - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $tool_oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run '$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test install = "$opt_mode" && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $debug_cmd - - my_outputname=$1 - my_originator=$2 - my_pic_p=${3-false} - my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms=${my_outputname}S.c - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist=$output_objdir/$my_outputname.nm - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) -#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" -#endif - -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) - -/* External symbol declarations for the compiler. */\ -" - - if test yes = "$dlself"; then - func_verbose "generating symbol list for '$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_to_tool_file "$progfile" func_convert_file_msys_to_w32 - func_verbose "extracting global C symbols from '$func_to_tool_file_result'" - $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols=$output_objdir/$outputname.exp - $opt_dry_run || { - $RM $export_symbols - eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from '$dlprefile'" - func_basename "$dlprefile" - name=$func_basename_result - case $host in - *cygwin* | *mingw* | *cegcc* ) - # if an import library, we need to obtain dlname - if func_win32_import_lib_p "$dlprefile"; then - func_tr_sh "$dlprefile" - eval "curr_lafile=\$libfile_$func_tr_sh_result" - dlprefile_dlbasename= - if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then - # Use subshell, to avoid clobbering current variable values - dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` - if test -n "$dlprefile_dlname"; then - func_basename "$dlprefile_dlname" - dlprefile_dlbasename=$func_basename_result - else - # no lafile. user explicitly requested -dlpreopen . - $sharedlib_from_linklib_cmd "$dlprefile" - dlprefile_dlbasename=$sharedlib_from_linklib_result - fi - fi - $opt_dry_run || { - if test -n "$dlprefile_dlbasename"; then - eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' - else - func_warning "Could not compute DLL name from $name" - eval '$ECHO ": $name " >> "$nlist"' - fi - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | - $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" - } - else # not an import lib - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - fi - ;; - *) - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - ;; - esac - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - echo '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - func_show_eval '$RM "${nlist}I"' - if test -n "$global_symbol_to_import"; then - eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' - fi - - echo >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[];\ -" - - if test -s "$nlist"I; then - echo >> "$output_objdir/$my_dlsyms" "\ -static void lt_syminit(void) -{ - LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; - for (; symbol->name; ++symbol) - {" - $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" - echo >> "$output_objdir/$my_dlsyms" "\ - } -}" - fi - echo >> "$output_objdir/$my_dlsyms" "\ -LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{ {\"$my_originator\", (void *) 0}," - - if test -s "$nlist"I; then - echo >> "$output_objdir/$my_dlsyms" "\ - {\"@INIT@\", (void *) <_syminit}," - fi - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - echo >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - $my_pic_p && pic_flag_for_symtable=" $pic_flag" - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) func_append symtab_cflags " $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' - - # Transform the symbol file into the correct name. - symfileobj=$output_objdir/${my_outputname}S.$objext - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for '$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` - fi -} - -# func_cygming_gnu_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is a GNU/binutils-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_gnu_implib_p () -{ - $debug_cmd - - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` - test -n "$func_cygming_gnu_implib_tmp" -} - -# func_cygming_ms_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is an MS-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_ms_implib_p () -{ - $debug_cmd - - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` - test -n "$func_cygming_ms_implib_tmp" -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -# Despite the name, also deal with 64 bit binaries. -func_win32_libid () -{ - $debug_cmd - - win32_libid_type=unknown - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - case $nm_interface in - "MS dumpbin") - if func_cygming_ms_implib_p "$1" || - func_cygming_gnu_implib_p "$1" - then - win32_nmres=import - else - win32_nmres= - fi - ;; - *) - func_to_tool_file "$1" func_convert_file_msys_to_w32 - win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' - 1,100{ - / I /{ - s|.*|import| - p - q - } - }'` - ;; - esac - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - -# func_cygming_dll_for_implib ARG -# -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib () -{ - $debug_cmd - - sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` -} - -# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs -# -# The is the core of a fallback implementation of a -# platform-specific function to extract the name of the -# DLL associated with the specified import library LIBNAME. -# -# SECTION_NAME is either .idata$6 or .idata$7, depending -# on the platform and compiler that created the implib. -# -# Echos the name of the DLL associated with the -# specified import library. -func_cygming_dll_for_implib_fallback_core () -{ - $debug_cmd - - match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` - $OBJDUMP -s --section "$1" "$2" 2>/dev/null | - $SED '/^Contents of section '"$match_literal"':/{ - # Place marker at beginning of archive member dllname section - s/.*/====MARK====/ - p - d - } - # These lines can sometimes be longer than 43 characters, but - # are always uninteresting - /:[ ]*file format pe[i]\{,1\}-/d - /^In archive [^:]*:/d - # Ensure marker is printed - /^====MARK====/p - # Remove all lines with less than 43 characters - /^.\{43\}/!d - # From remaining lines, remove first 43 characters - s/^.\{43\}//' | - $SED -n ' - # Join marker and all lines until next marker into a single line - /^====MARK====/ b para - H - $ b para - b - :para - x - s/\n//g - # Remove the marker - s/^====MARK====// - # Remove trailing dots and whitespace - s/[\. \t]*$// - # Print - /./p' | - # we now have a list, one entry per line, of the stringified - # contents of the appropriate section of all members of the - # archive that possess that section. Heuristic: eliminate - # all those that have a first or second character that is - # a '.' (that is, objdump's representation of an unprintable - # character.) This should work for all archives with less than - # 0x302f exports -- but will fail for DLLs whose name actually - # begins with a literal '.' or a single character followed by - # a '.'. - # - # Of those that remain, print the first one. - $SED -e '/^\./d;/^.\./d;q' -} - -# func_cygming_dll_for_implib_fallback ARG -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# -# This fallback implementation is for use when $DLLTOOL -# does not support the --identify-strict option. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib_fallback () -{ - $debug_cmd - - if func_cygming_gnu_implib_p "$1"; then - # binutils import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` - elif func_cygming_ms_implib_p "$1"; then - # ms-generated import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` - else - # unknown - sharedlib_from_linklib_result= - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $debug_cmd - - f_ex_an_ar_dir=$1; shift - f_ex_an_ar_oldlib=$1 - if test yes = "$lock_old_archive_extraction"; then - lockfile=$f_ex_an_ar_oldlib.lock - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - fi - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ - 'stat=$?; rm -f "$lockfile"; exit $stat' - if test yes = "$lock_old_archive_extraction"; then - $opt_dry_run || rm -f "$lockfile" - fi - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $debug_cmd - - my_gentop=$1; shift - my_oldlibs=${1+"$@"} - my_oldobjs= - my_xlib= - my_xabs= - my_xdir= - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib=$func_basename_result - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir=$my_gentop/$my_xlib_u - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - func_basename "$darwin_archive" - darwin_base_archive=$func_basename_result - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches; do - func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" - $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" - cd "unfat-$$/$darwin_base_archive-$darwin_arch" - func_extract_an_archive "`pwd`" "$darwin_base_archive" - cd "$darwin_curdir" - $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` - done - - func_extract_archives_result=$my_oldobjs -} - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory where it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=${1-no} - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - file=\"\$0\"" - - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` - $ECHO "\ - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - ECHO=\"$qECHO\" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ that is used only on -# windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options that match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's $0 value, followed by "$@". -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=\$0 - shift - for lt_opt - do - case \"\$lt_opt\" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` - test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. - lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` - cat \"\$lt_dump_D/\$lt_dump_F\" - exit 0 - ;; - --lt-*) - \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n \"\$lt_option_debug\"; then - echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" - lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from \$@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - case \" \$* \" in - *\\ --lt-*) - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done ;; - esac - func_exec_program_core \${1+\"\$@\"} -} - - # Parse options - func_parse_lt_options \"\$0\" \${1+\"\$@\"} - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test yes = "$fast_install"; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - \$ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # fixup the dll searchpath if we need to. - # - # Fix the DLL searchpath if we need to. Do this before prepending - # to shlibpath, because on Windows, both are PATH and uninstalled - # libraries must come first. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - # Export our shlibpath_var if we have one. - if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` - - export $shlibpath_var -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. - func_exec_program \${1+\"\$@\"} - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} - - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -#else -# include -# include -# ifdef __CYGWIN__ -# include -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) - -/* declarations of non-ANSI functions */ -#if defined __MINGW32__ -# ifdef __STRICT_ANSI__ -int _putenv (const char *); -# endif -#elif defined __CYGWIN__ -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -/* #elif defined other_platform || defined ... */ -#endif - -/* portability defines, excluding path handling macros */ -#if defined _MSC_VER -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -# define S_IXUSR _S_IEXEC -#elif defined __MINGW32__ -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -#elif defined __CYGWIN__ -# define HAVE_SETENV -# define FOPEN_WB "wb" -/* #elif defined other platforms ... */ -#endif - -#if defined PATH_MAX -# define LT_PATHMAX PATH_MAX -#elif defined MAXPATHLEN -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -/* path handling portability macros */ -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ - defined __OS2__ -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free (stale); stale = 0; } \ -} while (0) - -#if defined LT_DEBUGWRAPPER -static int lt_debug = 1; -#else -static int lt_debug = 0; -#endif - -const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_debugprintf (const char *file, int line, const char *fmt, ...); -void lt_fatal (const char *file, int line, const char *message, ...); -static const char *nonnull (const char *s); -static const char *nonempty (const char *s); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); -char **prepare_spawn (char **argv); -void lt_dump_script (FILE *f); -EOF - - cat <= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", - nonempty (path)); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - size_t tmp_len; - char *concat_name; - - lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", - nonempty (wrapper)); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined HAVE_DOS_BASED_FILE_SYSTEM - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined HAVE_DOS_BASED_FILE_SYSTEM - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = (size_t) (q - p); - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - lt_debugprintf (__FILE__, __LINE__, - "checking path component for symlinks: %s\n", - tmp_pathspec); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - lt_fatal (__FILE__, __LINE__, - "error accessing file \"%s\": %s", - tmp_pathspec, nonnull (strerror (errno))); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal (__FILE__, __LINE__, - "could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (STREQ (str, pat)) - *str = '\0'; - } - return str; -} - -void -lt_debugprintf (const char *file, int line, const char *fmt, ...) -{ - va_list args; - if (lt_debug) - { - (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); - } -} - -static void -lt_error_core (int exit_status, const char *file, - int line, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *file, int line, const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); - va_end (ap); -} - -static const char * -nonnull (const char *s) -{ - return s ? s : "(null)"; -} - -static const char * -nonempty (const char *s) -{ - return (s && !*s) ? "(empty)" : nonnull (s); -} - -void -lt_setenv (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_setenv) setting '%s' to '%s'\n", - nonnull (name), nonnull (value)); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - size_t len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - size_t orig_value_len = strlen (orig_value); - size_t add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - size_t len = strlen (new_value); - while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[--len] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -EOF - case $host_os in - mingw*) - cat <<"EOF" - -/* Prepares an argument vector before calling spawn(). - Note that spawn() does not by itself call the command interpreter - (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : - ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx(&v); - v.dwPlatformId == VER_PLATFORM_WIN32_NT; - }) ? "cmd.exe" : "command.com"). - Instead it simply concatenates the arguments, separated by ' ', and calls - CreateProcess(). We must quote the arguments since Win32 CreateProcess() - interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a - special way: - - Space and tab are interpreted as delimiters. They are not treated as - delimiters if they are surrounded by double quotes: "...". - - Unescaped double quotes are removed from the input. Their only effect is - that within double quotes, space and tab are treated like normal - characters. - - Backslashes not followed by double quotes are not special. - - But 2*n+1 backslashes followed by a double quote become - n backslashes followed by a double quote (n >= 0): - \" -> " - \\\" -> \" - \\\\\" -> \\" - */ -#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -char ** -prepare_spawn (char **argv) -{ - size_t argc; - char **new_argv; - size_t i; - - /* Count number of arguments. */ - for (argc = 0; argv[argc] != NULL; argc++) - ; - - /* Allocate new argument vector. */ - new_argv = XMALLOC (char *, argc + 1); - - /* Put quoted arguments into the new argument vector. */ - for (i = 0; i < argc; i++) - { - const char *string = argv[i]; - - if (string[0] == '\0') - new_argv[i] = xstrdup ("\"\""); - else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) - { - int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); - size_t length; - unsigned int backslashes; - const char *s; - char *quoted_string; - char *p; - - length = 0; - backslashes = 0; - if (quote_around) - length++; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - length += backslashes + 1; - length++; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - length += backslashes + 1; - - quoted_string = XMALLOC (char, length + 1); - - p = quoted_string; - backslashes = 0; - if (quote_around) - *p++ = '"'; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - { - unsigned int j; - for (j = backslashes + 1; j > 0; j--) - *p++ = '\\'; - } - *p++ = c; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - { - unsigned int j; - for (j = backslashes; j > 0; j--) - *p++ = '\\'; - *p++ = '"'; - } - *p = '\0'; - - new_argv[i] = quoted_string; - } - else - new_argv[i] = (char *) string; - } - new_argv[argc] = NULL; - - return new_argv; -} -EOF - ;; - esac - - cat <<"EOF" -void lt_dump_script (FILE* f) -{ -EOF - func_emit_wrapper yes | - $SED -n -e ' -s/^\(.\{79\}\)\(..*\)/\1\ -\2/ -h -s/\([\\"]\)/\\\1/g -s/$/\\n/ -s/\([^\n]*\).*/ fputs ("\1", f);/p -g -D' - cat <<"EOF" -} -EOF -} -# end: func_emit_cwrapperexe_src - -# func_win32_import_lib_p ARG -# True if ARG is an import lib, as indicated by $file_magic_cmd -func_win32_import_lib_p () -{ - $debug_cmd - - case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in - *import*) : ;; - *) false ;; - esac -} - -# func_suncc_cstd_abi -# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! -# Several compiler flags select an ABI that is incompatible with the -# Cstd library. Avoid specifying it if any are in CXXFLAGS. -func_suncc_cstd_abi () -{ - $debug_cmd - - case " $compile_command " in - *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) - suncc_use_cstd_abi=no - ;; - *) - suncc_use_cstd_abi=yes - ;; - esac -} - -# func_mode_link arg... -func_mode_link () -{ - $debug_cmd - - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # what system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll that has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - bindir= - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - os2dllname= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=false - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module=$wl-single_module - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test yes != "$build_libtool_libs" \ - && func_fatal_configuration "cannot build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg=$1 - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - bindir) - bindir=$arg - prev= - continue - ;; - dlfiles|dlprefiles) - $preload || { - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=: - } - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test no = "$dlself"; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test dlprefiles = "$prev"; then - dlself=yes - elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test dlfiles = "$prev"; then - func_append dlfiles " $arg" - else - func_append dlprefiles " $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols=$arg - test -f "$arg" \ - || func_fatal_error "symbol file '$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex=$arg - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) func_append deplibs " $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir=$arg - prev= - continue - ;; - mllvm) - # Clang does not use LLVM to link, so we can simply discard any - # '-mllvm $arg' options when doing the link step. - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# func_append moreargs " $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test none = "$pic_object" && - test none = "$non_pic_object"; then - func_fatal_error "cannot find name of object for '$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - if test none != "$pic_object"; then - # Prepend the subdirectory the object is found in. - pic_object=$xdir$pic_object - - if test dlfiles = "$prev"; then - if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test dlprefiles = "$prev"; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg=$pic_object - fi - - # Non-PIC object. - if test none != "$non_pic_object"; then - # Prepend the subdirectory the object is found in. - non_pic_object=$xdir$non_pic_object - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test none = "$pic_object"; then - arg=$non_pic_object - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object=$pic_object - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "'$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file '$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - os2dllname) - os2dllname=$arg - prev= - continue - ;; - precious_regex) - precious_files_regex=$arg - prev= - continue - ;; - release) - release=-$arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test rpath = "$prev"; then - case "$rpath " in - *" $arg "*) ;; - *) func_append rpath " $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) func_append xrpath " $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds=$arg - prev= - continue - ;; - weak) - func_append weak_libs " $arg" - prev= - continue - ;; - xcclinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg=$arg - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "'-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -bindir) - prev=bindir - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test X-export-symbols = "X$arg"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname "-L" '' "$arg" - if test -z "$func_stripname_result"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between '-L' and '$1'" - else - func_fatal_error "need path for '-L' option" - fi - fi - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of '$dir'" - dir=$absdir - ;; - esac - case "$deplibs " in - *" -L$dir "* | *" $arg "*) - # Will only happen for absolute or sysroot arguments - ;; - *) - # Preserve sysroot, but never include relative directories - case $dir in - [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; - *) func_append deplibs " -L$dir" ;; - esac - func_append lib_search_path " $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) func_append dllsearchpath ":$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test X-lc = "X$arg" || test X-lm = "X$arg"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test X-lc = "X$arg" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) - # Do not include libc due to us having libc/libc_r. - test X-lc = "X$arg" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - func_append deplibs " System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test X-lc = "X$arg" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test X-lc = "X$arg" && continue - ;; - esac - elif test X-lc_r = "X$arg"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - func_append deplibs " $arg" - continue - ;; - - -mllvm) - prev=mllvm - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot|--sysroot) - func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) func_append new_inherited_linker_flags " $arg" ;; - esac - continue - ;; - - -multi_module) - single_module=$wl-multi_module - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "'-no-install' is ignored for $host" - func_warning "assuming '-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -os2dllname) - prev=os2dllname - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - =*) - func_stripname '=' '' "$dir" - dir=$lt_sysroot$func_stripname_result - ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs=$IFS; IFS=, - for flag in $args; do - IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" - done - IFS=$save_ifs - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs=$IFS; IFS=, - for flag in $args; do - IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $wl$func_quote_for_eval_result" - func_append compiler_flags " $wl$func_quote_for_eval_result" - func_append linker_flags " $func_quote_for_eval_result" - done - IFS=$save_ifs - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - - # Flags to be passed through unchanged, with rationale: - # -64, -mips[0-9] enable 64-bit mode for the SGI compiler - # -r[0-9][0-9]* specify processor for the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler - # +DA*, +DD* enable 64-bit mode for the HP compiler - # -q* compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* architecture-specific flags for GCC - # -F/path path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* profiling flags for GCC - # -fstack-protector* stack protector flags for GCC - # @file GCC response files - # -tp=* Portland pgcc target processor selection - # --sysroot=* for sysroot support - # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - # -specs=* GCC specs files - # -stdlib=* select c++ std lib with clang - # -fsanitize=* Clang/GCC memory and address sanitizer - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - func_append compile_command " $arg" - func_append finalize_command " $arg" - func_append compiler_flags " $arg" - continue - ;; - - -Z*) - if test os2 = "`expr $host : '.*\(os2\)'`"; then - # OS/2 uses -Zxxx to specify OS/2-specific options - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case $arg in - -Zlinker | -Zstack) - prev=xcompiler - ;; - esac - continue - else - # Otherwise treat like 'Some other compiler flag' below - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - fi - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - - *.$objext) - # A standard object. - func_append objs " $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test none = "$pic_object" && - test none = "$non_pic_object"; then - func_fatal_error "cannot find name of object for '$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - test none = "$pic_object" || { - # Prepend the subdirectory the object is found in. - pic_object=$xdir$pic_object - - if test dlfiles = "$prev"; then - if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test dlprefiles = "$prev"; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg=$pic_object - } - - # Non-PIC object. - if test none != "$non_pic_object"; then - # Prepend the subdirectory the object is found in. - non_pic_object=$xdir$non_pic_object - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test none = "$pic_object"; then - arg=$non_pic_object - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object=$pic_object - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir=$func_dirname_result - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "'$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - func_append deplibs " $arg" - func_append old_deplibs " $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - func_resolve_sysroot "$arg" - if test dlfiles = "$prev"; then - # This library was specified with -dlopen. - func_append dlfiles " $func_resolve_sysroot_result" - prev= - elif test dlprefiles = "$prev"; then - # The library was specified with -dlpreopen. - func_append dlprefiles " $func_resolve_sysroot_result" - prev= - else - func_append deplibs " $func_resolve_sysroot_result" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the '$prevarg' option requires an argument" - - if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname=$func_basename_result - libobjs_save=$libobjs - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - # Definition is injected by LT_CONFIG during libtool generation. - func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" - - func_dirname "$output" "/" "" - output_objdir=$func_dirname_result$objdir - func_to_tool_file "$output_objdir/" - tool_output_objdir=$func_to_tool_file_result - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_preserve_dup_deps; then - case "$libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append libs " $deplib" - done - - if test lib = "$linkmode"; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; - esac - func_append pre_post_deps " $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=false - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test lib,link = "$linkmode,$pass"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs=$tmp_deplibs - fi - - if test lib,link = "$linkmode,$pass" || - test prog,scan = "$linkmode,$pass"; then - libs=$deplibs - deplibs= - fi - if test prog = "$linkmode"; then - case $pass in - dlopen) libs=$dlfiles ;; - dlpreopen) libs=$dlprefiles ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; - esac - fi - if test lib,dlpreopen = "$linkmode,$pass"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - func_resolve_sysroot "$lib" - case $lib in - *.la) func_source "$func_resolve_sysroot_result" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - func_basename "$deplib" - deplib_base=$func_basename_result - case " $weak_libs " in - *" $deplib_base "*) ;; - *) func_append deplibs " $deplib" ;; - esac - done - done - libs=$dlprefiles - fi - if test dlopen = "$pass"; then - # Collect dlpreopened libraries - save_deplibs=$deplibs - deplibs= - fi - - for deplib in $libs; do - lib= - found=false - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ - |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append compiler_flags " $deplib" - if test lib = "$linkmode"; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test lib != "$linkmode" && test prog != "$linkmode"; then - func_warning "'-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test lib = "$linkmode"; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib=$searchdir/lib$name$search_ext - if test -f "$lib"; then - if test .la = "$search_ext"; then - found=: - else - found=false - fi - break 2 - fi - done - done - if $found; then - # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll=$l - done - if test "X$ll" = "X$old_library"; then # only static version available - found=false - func_dirname "$lib" "" "." - ladir=$func_dirname_result - lib=$ladir/$old_library - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - else - # deplib doesn't seem to be a libtool library - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - ;; # -l - *.ltframework) - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test lib = "$linkmode"; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test conv = "$pass" && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - prog) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - continue - fi - if test scan = "$pass"; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - *) - func_warning "'-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test link = "$pass"; then - func_stripname '-R' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) - func_resolve_sysroot "$deplib" - lib=$func_resolve_sysroot_result - ;; - *.$libext) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=false - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=: - fi - ;; - pass_all) - valid_a_lib=: - ;; - esac - if $valid_a_lib; then - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - else - echo - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because the file extensions .$libext of this argument makes me believe" - echo "*** that it is just a static archive that I should not use here." - fi - ;; - esac - continue - ;; - prog) - if test link != "$pass"; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test conv = "$pass"; then - deplibs="$deplib $deplibs" - elif test prog = "$linkmode"; then - if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - func_append newdlprefiles " $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append newdlfiles " $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=: - continue - ;; - esac # case $deplib - - $found || test -f "$lib" \ - || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "'$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir=$func_dirname_result - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test lib,link = "$linkmode,$pass" || - test prog,scan = "$linkmode,$pass" || - { test prog != "$linkmode" && test lib != "$linkmode"; }; then - test -n "$dlopen" && func_append dlfiles " $dlopen" - test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" - fi - - if test conv = "$pass"; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for '$lib'" - fi - # It is a libtool convenience library, so add in its objects. - func_append convenience " $ladir/$objdir/$old_library" - func_append old_convenience " $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done - elif test prog != "$linkmode" && test lib != "$linkmode"; then - func_fatal_error "'$lib' is not a convenience library" - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - if test -n "$old_library" && - { test yes = "$prefer_static_libs" || - test built,no = "$prefer_static_libs,$installed"; }; then - linklib=$old_library - else - for l in $old_library $library_names; do - linklib=$l - done - fi - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for '$lib'" - fi - - # This library was specified with -dlopen. - if test dlopen = "$pass"; then - test -z "$libdir" \ - && func_fatal_error "cannot -dlopen a convenience library: '$lib'" - if test -z "$dlname" || - test yes != "$dlopen_support" || - test no = "$build_libtool_libs" - then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - func_append dlprefiles " $lib $dependency_libs" - else - func_append newdlfiles " $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of '$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir=$ladir - fi - ;; - esac - func_basename "$lib" - laname=$func_basename_result - - # Find the relevant object directory and library name. - if test yes = "$installed"; then - if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library '$lib' was moved." - dir=$ladir - absdir=$abs_ladir - libdir=$abs_ladir - else - dir=$lt_sysroot$libdir - absdir=$lt_sysroot$libdir - fi - test yes = "$hardcode_automatic" && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir=$ladir - absdir=$abs_ladir - # Remove this search path later - func_append notinst_path " $abs_ladir" - else - dir=$ladir/$objdir - absdir=$abs_ladir/$objdir - # Remove this search path later - func_append notinst_path " $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test dlpreopen = "$pass"; then - if test -z "$libdir" && test prog = "$linkmode"; then - func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" - fi - case $host in - # special handling for platforms with PE-DLLs. - *cygwin* | *mingw* | *cegcc* ) - # Linker will automatically link against shared library if both - # static and shared are present. Therefore, ensure we extract - # symbols from the import library if a shared library is present - # (otherwise, the dlopen module name will be incorrect). We do - # this by putting the import library name into $newdlprefiles. - # We recover the dlopen module name by 'saving' the la file - # name in a special purpose variable, and (later) extracting the - # dlname from the la file. - if test -n "$dlname"; then - func_tr_sh "$dir/$linklib" - eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" - func_append newdlprefiles " $dir/$linklib" - else - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - fi - ;; - * ) - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - func_append newdlprefiles " $dir/$dlname" - else - func_append newdlprefiles " $dir/$linklib" - fi - ;; - esac - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test lib = "$linkmode"; then - deplibs="$dir/$old_library $deplibs" - elif test prog,link = "$linkmode,$pass"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test prog = "$linkmode" && test link != "$pass"; then - func_append newlib_search_path " $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=false - if test no != "$link_all_deplibs" || test -z "$library_names" || - test no = "$build_libtool_libs"; then - linkalldeplibs=: - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - esac - # Need to link against all dependency_libs? - if $linkalldeplibs; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test prog,link = "$linkmode,$pass"; then - if test -n "$library_names" && - { { test no = "$prefer_static_libs" || - test built,yes = "$prefer_static_libs,$installed"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then - # Make sure the rpath contains only unique directories. - case $temp_rpath: in - *"$absdir:"*) ;; - *) func_append temp_rpath "$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if $alldeplibs && - { test pass_all = "$deplibs_check_method" || - { test yes = "$build_libtool_libs" && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test built = "$use_static_libs" && test yes = "$installed"; then - use_static_libs=no - fi - if test -n "$library_names" && - { test no = "$use_static_libs" || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc* | *os2*) - # No point in relinking DLLs because paths are not encoded - func_append notinst_deplibs " $lib" - need_relink=no - ;; - *) - if test no = "$installed"; then - func_append notinst_deplibs " $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule= - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule=$dlpremoduletest - break - fi - done - if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then - echo - if test prog = "$linkmode"; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test lib = "$linkmode" && - test yes = "$hardcode_into_libs"; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname=$1 - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname=$dlname - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc* | *os2*) - func_arith $current - $age - major=$func_arith_result - versuffix=-$major - ;; - esac - eval soname=\"$soname_spec\" - else - soname=$realname - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot=$soname - func_basename "$soroot" - soname=$func_basename_result - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from '$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for '$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test prog = "$linkmode" || test relink != "$opt_mode"; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test no = "$hardcode_direct"; then - add=$dir/$linklib - case $host in - *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; - *-*-sysv4*uw2*) add_dir=-L$dir ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir=-L$dir ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we cannot - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library"; then - echo - echo "*** And there doesn't seem to be a static archive available" - echo "*** The link will probably fail, sorry" - else - add=$dir/$old_library - fi - elif test -n "$old_library"; then - add=$dir/$old_library - fi - fi - esac - elif test no = "$hardcode_minus_L"; then - case $host in - *-*-sunos*) add_shlibpath=$dir ;; - esac - add_dir=-L$dir - add=-l$name - elif test no = "$hardcode_shlibpath_var"; then - add_shlibpath=$dir - add=-l$name - else - lib_linked=no - fi - ;; - relink) - if test yes = "$hardcode_direct" && - test no = "$hardcode_direct_absolute"; then - add=$dir/$linklib - elif test yes = "$hardcode_minus_L"; then - add_dir=-L$absdir - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add=-l$name - elif test yes = "$hardcode_shlibpath_var"; then - add_shlibpath=$dir - add=-l$name - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test yes != "$lib_linked"; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) func_append compile_shlibpath "$add_shlibpath:" ;; - esac - fi - if test prog = "$linkmode"; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test yes != "$hardcode_direct" && - test yes != "$hardcode_minus_L" && - test yes = "$hardcode_shlibpath_var"; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - fi - fi - fi - - if test prog = "$linkmode" || test relink = "$opt_mode"; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test yes = "$hardcode_direct" && - test no = "$hardcode_direct_absolute"; then - add=$libdir/$linklib - elif test yes = "$hardcode_minus_L"; then - add_dir=-L$libdir - add=-l$name - elif test yes = "$hardcode_shlibpath_var"; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - add=-l$name - elif test yes = "$hardcode_automatic"; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib"; then - add=$inst_prefix_dir$libdir/$linklib - else - add=$libdir/$linklib - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir=-L$libdir - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add=-l$name - fi - - if test prog = "$linkmode"; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test prog = "$linkmode"; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test unsupported != "$hardcode_direct"; then - test -n "$old_library" && linklib=$old_library - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test yes = "$build_libtool_libs"; then - # Not a shared library - if test pass_all != "$deplibs_check_method"; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - echo - $ECHO "*** Warning: This system cannot link to static lib archive $lib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - if test yes = "$module"; then - echo "*** But as you try to build a module library, libtool will still create " - echo "*** a static module, that should work as long as the dlopening application" - echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using 'nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** 'nm' from GNU binutils and a full rebuild may help." - fi - if test no = "$build_old_libs"; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test lib = "$linkmode"; then - if test -n "$dependency_libs" && - { test yes != "$hardcode_into_libs" || - test yes = "$build_old_libs" || - test yes = "$link_static"; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) func_append xrpath " $temp_xrpath";; - esac;; - *) func_append temp_deplibs " $libdir";; - esac - done - dependency_libs=$temp_deplibs - fi - - func_append newlib_search_path " $absdir" - # Link against this library - test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result";; - *) func_resolve_sysroot "$deplib" ;; - esac - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $func_resolve_sysroot_result "*) - func_append specialdeplibs " $func_resolve_sysroot_result" ;; - esac - fi - func_append tmp_libs " $func_resolve_sysroot_result" - done - - if test no != "$link_all_deplibs"; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - path= - case $deplib in - -L*) path=$deplib ;; - *.la) - func_resolve_sysroot "$deplib" - deplib=$func_resolve_sysroot_result - func_dirname "$deplib" "" "." - dir=$func_dirname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of '$dir'" - absdir=$dir - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names"; then - for tmp in $deplibrary_names; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl"; then - depdepl=$absdir/$objdir/$depdepl - darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" - func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" - path= - fi - fi - ;; - *) - path=-L$absdir/$objdir - ;; - esac - else - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "'$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "'$deplib' seems to be moved" - - path=-L$absdir - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test link = "$pass"; then - if test prog = "$linkmode"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs=$newdependency_libs - if test dlpreopen = "$pass"; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test dlopen != "$pass"; then - test conv = "$pass" || { - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) func_append lib_search_path " $dir" ;; - esac - done - newlib_search_path= - } - - if test prog,link = "$linkmode,$pass"; then - vars="compile_deplibs finalize_deplibs" - else - vars=deplibs - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) func_append tmp_libs " $deplib" ;; - esac - ;; - *) func_append tmp_libs " $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - - # Add Sun CC postdeps if required: - test CXX = "$tagname" && { - case $host_os in - linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C++ 5.9 - func_suncc_cstd_abi - - if test no != "$suncc_use_cstd_abi"; then - func_append postdeps ' -library=Cstd -library=Crun' - fi - ;; - esac - ;; - - solaris*) - func_cc_basename "$CC" - case $func_cc_basename_result in - CC* | sunCC*) - func_suncc_cstd_abi - - if test no != "$suncc_use_cstd_abi"; then - func_append postdeps ' -library=Cstd -library=Crun' - fi - ;; - esac - ;; - esac - } - - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i= - ;; - esac - if test -n "$i"; then - func_append tmp_libs " $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test prog = "$linkmode"; then - dlfiles=$newdlfiles - fi - if test prog = "$linkmode" || test lib = "$linkmode"; then - dlprefiles=$newdlprefiles - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - func_warning "'-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "'-l' and '-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "'-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "'-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "'-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "'-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "'-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs=$output - func_append objs "$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form 'libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test no = "$module" \ - && func_fatal_help "libtool library '$output' must begin with 'lib'" - - if test no != "$need_lib_prefix"; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test pass_all != "$deplibs_check_method"; then - func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" - else - echo - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - func_append libobjs " $objs" - fi - fi - - test no = "$dlself" \ - || func_warning "'-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test 1 -lt "$#" \ - && func_warning "ignoring multiple '-rpath's for a libtool library" - - install_libdir=$1 - - oldlibs= - if test -z "$rpath"; then - if test yes = "$build_libtool_libs"; then - # Building a libtool convenience library. - # Some compilers have problems with a '.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "'-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "'-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs=$IFS; IFS=: - set dummy $vinfo 0 0 0 - shift - IFS=$save_ifs - - test -n "$7" && \ - func_fatal_help "too many parameters to '-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major=$1 - number_minor=$2 - number_revision=$3 - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # that has an extra 1 added just for fun - # - case $version_type in - # correct linux to gnu/linux during the next big refactor - darwin|freebsd-elf|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age=$number_minor - revision=$number_revision - ;; - freebsd-aout|qnx|sunos) - current=$number_major - revision=$number_minor - age=0 - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age=$number_minor - revision=$number_minor - lt_irix_increment=no - ;; - *) - func_fatal_configuration "$modename: unknown library version type '$version_type'" - ;; - esac - ;; - no) - current=$1 - revision=$2 - age=$3 - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT '$current' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION '$revision' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE '$age' must be a nonnegative integer" - func_fatal_error "'$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE '$age' is greater than the current interface number '$current'" - func_fatal_error "'$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - # On Darwin other compilers - case $CC in - nagfor*) - verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" - ;; - *) - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - esac - ;; - - freebsd-aout) - major=.$current - versuffix=.$current.$revision - ;; - - freebsd-elf) - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - ;; - - irix | nonstopux) - if test no = "$lt_irix_increment"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring=$verstring_prefix$major.$revision - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test 0 -ne "$loop"; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring=$verstring_prefix$major.$iface:$verstring - done - - # Before this point, $major must not contain '.'. - major=.$major - versuffix=$major.$revision - ;; - - linux) # correct to gnu/linux during the next big refactor - func_arith $current - $age - major=.$func_arith_result - versuffix=$major.$age.$revision - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=.$current.$age.$revision - verstring=$current.$age.$revision - - # Add in all the interfaces that we are compatible with. - loop=$age - while test 0 -ne "$loop"; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring=$verstring:$iface.0 - done - - # Make executables depend on our current version. - func_append verstring ":$current.0" - ;; - - qnx) - major=.$current - versuffix=.$current - ;; - - sco) - major=.$current - versuffix=.$current - ;; - - sunos) - major=.$current - versuffix=.$current.$revision - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 file systems. - func_arith $current - $age - major=$func_arith_result - versuffix=-$major - ;; - - *) - func_fatal_configuration "unknown library version type '$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring=0.0 - ;; - esac - if test no = "$need_version"; then - versuffix= - else - versuffix=.0.0 - fi - fi - - # Remove version info from name if versioning should be avoided - if test yes,no = "$avoid_version,$need_version"; then - major= - versuffix= - verstring= - fi - - # Check to see if the archive will have undefined symbols. - if test yes = "$allow_undefined"; then - if test unsupported = "$allow_undefined_flag"; then - if test yes = "$build_old_libs"; then - func_warning "undefined symbols not allowed in $host shared libraries; building static only" - build_libtool_libs=no - else - func_fatal_error "can't build $host shared library unless -no-undefined is specified" - fi - fi - else - # Don't allow undefined symbols. - allow_undefined_flag=$no_undefined_flag - fi - - fi - - func_generate_dlsyms "$libname" "$libname" : - func_append libobjs " $symfileobj" - test " " = "$libobjs" && libobjs= - - if test relink != "$opt_mode"; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) - if test -n "$precious_files_regex"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - func_append removelist " $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then - func_append oldlibs " $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` - # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` - # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - func_replace_sysroot "$libdir" - func_append temp_xrpath " -R$func_replace_sysroot_result" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles=$dlfiles - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) func_append dlfiles " $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles=$dlprefiles - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) func_append dlprefiles " $lib" ;; - esac - done - - if test yes = "$build_libtool_libs"; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - func_append deplibs " System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test yes = "$build_libtool_need_lc"; then - func_append deplibs " -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release= - versuffix= - major= - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - $nocaseglob - else - potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` - fi - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib=$potent_lib - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | $SED 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; - *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib= - break 2 - fi - done - done - fi - if test -n "$a_deplib"; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib"; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - case " $predeps $postdeps " in - *" $a_deplib "*) - func_append newdeplibs " $a_deplib" - a_deplib= - ;; - esac - fi - if test -n "$a_deplib"; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib=$potent_lib # see symlink-check above in file_magic test - if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib= - break 2 - fi - done - done - fi - if test -n "$a_deplib"; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib"; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs= - tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test yes = "$allow_libtool_libs_with_static_runtimes"; then - for i in $predeps $postdeps; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` - done - fi - case $tmp_deplibs in - *[!\ \ ]*) - echo - if test none = "$deplibs_check_method"; then - echo "*** Warning: inter-library dependencies are not supported in this platform." - else - echo "*** Warning: inter-library dependencies are not known to be supported." - fi - echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - ;; - esac - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - if test yes = "$droppeddeps"; then - if test yes = "$module"; then - echo - echo "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - echo "*** a static module, that should work as long as the dlopening" - echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using 'nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** 'nm' from GNU binutils and a full rebuild may help." - fi - if test no = "$build_old_libs"; then - oldlibs=$output_objdir/$libname.$libext - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." - - if test no = "$allow_undefined"; then - echo - echo "*** Since this library must not contain undefined symbols," - echo "*** because either the platform does not support them or" - echo "*** it was explicitly requested with -no-undefined," - echo "*** libtool will only create a static version of it." - if test no = "$build_old_libs"; then - oldlibs=$output_objdir/$libname.$libext - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - deplibs=$new_libs - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test yes = "$build_libtool_libs"; then - # Remove $wl instances when linking with ld. - # FIXME: should test the right _cmds variable. - case $archive_cmds in - *\$LD\ *) wl= ;; - esac - if test yes = "$hardcode_into_libs"; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath=$finalize_rpath - test relink = "$opt_mode" || rpath=$compile_rpath$rpath - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - func_replace_sysroot "$libdir" - libdir=$func_replace_sysroot_result - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append dep_rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath=$finalize_shlibpath - test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname=$1 - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname=$realname - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib=$output_objdir/$realname - linknames= - for link - do - func_append linknames " $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols=$output_objdir/$libname.uexp - func_append delfiles " $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - func_dll_def_p "$export_symbols" || { - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols=$export_symbols - export_symbols= - always_export_symbols=yes - } - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for '$libname.la'" - export_symbols=$output_objdir/$libname.exp - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs=$IFS; IFS='~' - for cmd1 in $cmds; do - IFS=$save_ifs - # Take the normal branch if the nm_file_list_spec branch - # doesn't work or if tool conversion is not needed. - case $nm_file_list_spec~$to_tool_file_cmd in - *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) - try_normal_branch=yes - eval cmd=\"$cmd1\" - func_len " $cmd" - len=$func_len_result - ;; - *) - try_normal_branch=no - ;; - esac - if test yes = "$try_normal_branch" \ - && { test "$len" -lt "$max_cmd_len" \ - || test "$max_cmd_len" -le -1; } - then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - elif test -n "$nm_file_list_spec"; then - func_basename "$output" - output_la=$func_basename_result - save_libobjs=$libobjs - save_output=$output - output=$output_objdir/$output_la.nm - func_to_tool_file "$output" - libobjs=$nm_file_list_spec$func_to_tool_file_result - func_append delfiles " $output" - func_verbose "creating $NM input file list: $output" - for obj in $save_libobjs; do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > "$output" - eval cmd=\"$cmd1\" - func_show_eval "$cmd" 'exit $?' - output=$save_output - libobjs=$save_libobjs - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS=$save_ifs - if test -n "$export_symbols_regex" && test : != "$skipped_export"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols=$export_symbols - test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test : != "$skipped_export" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for '$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands, which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - func_append tmp_deplibs " $test_deplib" - ;; - esac - done - deplibs=$tmp_deplibs - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test yes = "$compiler_needs_object" && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - func_append linker_flags " $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test relink = "$opt_mode"; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test yes = "$module" && test -n "$module_cmds"; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test : != "$skipped_export" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - func_basename "$output" - output_la=$func_basename_result - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then - output=$output_objdir/$output_la.lnkscript - func_verbose "creating GNU ld script: $output" - echo 'INPUT (' > $output - for obj in $save_libobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - echo ')' >> $output - func_append delfiles " $output" - func_to_tool_file "$output" - output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then - output=$output_objdir/$output_la.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test yes = "$compiler_needs_object"; then - firstobj="$1 " - shift - fi - for obj - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - func_append delfiles " $output" - func_to_tool_file "$output" - output=$firstobj\"$file_list_spec$func_to_tool_file_result\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-$k.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test -z "$objlist" || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test 1 -eq "$k"; then - # The first file doesn't have a previous command to add. - reload_objs=$objlist - eval concat_cmds=\"$reload_cmds\" - else - # All subsequent reloadable object files will link in - # the last one created. - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-$k.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-$k.$objext - objlist=" $obj" - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds$reload_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - func_append delfiles " $output" - - else - output= - fi - - ${skipped_export-false} && { - func_verbose "generating symbol list for '$libname.la'" - export_symbols=$output_objdir/$libname.exp - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - } - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs=$IFS; IFS='~' - for cmd in $concat_cmds; do - IFS=$save_ifs - $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS=$save_ifs - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - ${skipped_export-false} && { - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols=$export_symbols - test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for '$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands, which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - } - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test yes = "$module" && test -n "$module_cmds"; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs=$IFS; IFS='~' - for cmd in $cmds; do - IFS=$sp$nl - eval cmd=\"$cmd\" - IFS=$save_ifs - $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS=$save_ifs - - # Restore the uninstalled library and exit - if test relink = "$opt_mode"; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test yes = "$module" || test yes = "$export_dynamic"; then - # On all known operating systems, these are identical. - dlname=$soname - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then - func_warning "'-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "'-l' and '-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "'-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "'-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "'-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "'-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object '$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj=$output - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # if reload_cmds runs $LD directly, get rid of -Wl from - # whole_archive_flag_spec and hope we can get by with turning comma - # into space. - case $reload_cmds in - *\$LD[\ \$]*) wl= ;; - esac - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` - reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags - else - gentop=$output_objdir/${obj}x - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # If we're not building shared, we need to use non_pic_objs - test yes = "$build_libtool_libs" || libobjs=$non_pic_objects - - # Create the old-style object. - reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs - - output=$obj - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - test yes = "$build_libtool_libs" || { - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - } - - if test -n "$pic_flag" || test default != "$pic_mode"; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output=$libobj - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "'-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "'-release' is ignored for programs" - - $preload \ - && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ - && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test CXX = "$tagname"; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - func_append compile_command " $wl-bind_at_load" - func_append finalize_command " $wl-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - compile_deplibs=$new_libs - - - func_append compile_command " $compile_deplibs" - func_append finalize_command " $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) func_append dllsearchpath ":$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath=$rpath - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) func_append finalize_perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir=$hardcode_libdirs - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath=$rpath - - if test -n "$libobjs" && test yes = "$build_old_libs"; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" false - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=: - case $host in - *cegcc* | *mingw32ce*) - # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=false - ;; - *cygwin* | *mingw* ) - test yes = "$build_libtool_libs" || wrappers_required=false - ;; - *) - if test no = "$need_relink" || test yes != "$build_libtool_libs"; then - wrappers_required=false - fi - ;; - esac - $wrappers_required || { - # Replace the output file specification. - compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command=$compile_command$compile_rpath - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.$objext"; then - func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' - fi - - exit $exit_status - } - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - func_append rpath "$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test yes = "$no_install"; then - # We don't need to create a wrapper script. - link_command=$compile_var$compile_command$compile_rpath - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - exit $EXIT_SUCCESS - fi - - case $hardcode_action,$fast_install in - relink,*) - # Fast installation is not supported - link_command=$compile_var$compile_command$compile_rpath - relink_command=$finalize_var$finalize_command$finalize_rpath - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "'$output' will be relinked during installation" - ;; - *,yes) - link_command=$finalize_var$compile_command$finalize_rpath - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - ;; - *,no) - link_command=$compile_var$compile_command$compile_rpath - relink_command=$finalize_var$finalize_command$finalize_rpath - ;; - *,needless) - link_command=$finalize_var$compile_command$finalize_rpath - relink_command= - ;; - esac - - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output_objdir/$outputname" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource=$output_path/$objdir/lt-$output_name.c - cwrapper=$output_path/$output_name.exe - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host"; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - case $build_libtool_libs in - convenience) - oldobjs="$libobjs_save $symfileobj" - addlibs=$convenience - build_libtool_libs=no - ;; - module) - oldobjs=$libobjs_save - addlibs=$old_convenience - build_libtool_libs=no - ;; - *) - oldobjs="$old_deplibs $non_pic_objects" - $preload && test -f "$symfileobj" \ - && func_append oldobjs " $symfileobj" - addlibs=$old_convenience - ;; - esac - - if test -n "$addlibs"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $addlibs - func_append oldobjs " $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append oldobjs " $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - echo "copying selected object files to avoid basename conflicts..." - gentop=$output_objdir/${outputname}x - func_append generated " $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase=$func_basename_result - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - func_append oldobjs " $gentop/$newobj" - ;; - *) func_append oldobjs " $obj" ;; - esac - done - fi - func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 - tool_oldlib=$func_to_tool_file_result - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - elif test -n "$archiver_list_spec"; then - func_verbose "using command file archive linking..." - for obj in $oldobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > $output_objdir/$libname.libcmd - func_to_tool_file "$output_objdir/$libname.libcmd" - oldobjs=" $archiver_list_spec$func_to_tool_file_result" - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj"; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test -z "$oldobjs"; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test yes = "$build_old_libs" && old_library=$libname.$libext - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test yes = "$hardcode_automatic"; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test yes = "$installed"; then - if test -z "$install_libdir"; then - break - fi - output=$output_objdir/${outputname}i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name=$func_basename_result - func_resolve_sysroot "$deplib" - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` - test -z "$libdir" && \ - func_fatal_error "'$deplib' is not a valid libtool archive" - func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" - ;; - -L*) - func_stripname -L '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -L$func_replace_sysroot_result" - ;; - -R*) - func_stripname -R '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -R$func_replace_sysroot_result" - ;; - *) func_append newdependency_libs " $deplib" ;; - esac - done - dependency_libs=$newdependency_libs - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name=$func_basename_result - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "'$lib' is not a valid libtool archive" - func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" - ;; - *) func_append newdlfiles " $lib" ;; - esac - done - dlfiles=$newdlfiles - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name=$func_basename_result - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "'$lib' is not a valid libtool archive" - func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" - ;; - esac - done - dlprefiles=$newdlprefiles - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlfiles " $abs" - done - dlfiles=$newdlfiles - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlprefiles " $abs" - done - dlprefiles=$newdlprefiles - fi - $RM $output - # place dlname in correct position for cygwin - # In fact, it would be nice if we could use this code for all target - # systems that can't hard-code library paths into their executables - # and that have no shared library path variable independent of PATH, - # but it turns out we can't easily determine that from inspecting - # libtool variables, so we have to hard-code the OSs to which it - # applies here; at the moment, that means platforms that use the PE - # object format with DLL files. See the long comment at the top of - # tests/bindir.at for full details. - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) - # If a -bindir argument was supplied, place the dll there. - if test -n "$bindir"; then - func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result/$dlname - else - # Otherwise fall back on heuristic. - tdlname=../bin/$dlname - fi - ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that cannot go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test no,yes = "$installed,$need_relink"; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -if test link = "$opt_mode" || test relink = "$opt_mode"; then - func_mode_link ${1+"$@"} -fi - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $debug_cmd - - RM=$nonopt - files= - rmforce=false - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic=$magic - - for arg - do - case $arg in - -f) func_append RM " $arg"; rmforce=: ;; - -*) func_append RM " $arg" ;; - *) func_append files " $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - for file in $files; do - func_dirname "$file" "" "." - dir=$func_dirname_result - if test . = "$dir"; then - odir=$objdir - else - odir=$dir/$objdir - fi - func_basename "$file" - name=$func_basename_result - test uninstall = "$opt_mode" && odir=$dir - - # Remember odir for removal later, being careful to avoid duplicates - if test clean = "$opt_mode"; then - case " $rmdirs " in - *" $odir "*) ;; - *) func_append rmdirs " $odir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif $rmforce; then - continue - fi - - rmfiles=$file - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - func_append rmfiles " $odir/$n" - done - test -n "$old_library" && func_append rmfiles " $odir/$old_library" - - case $opt_mode in - clean) - case " $library_names " in - *" $dlname "*) ;; - *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; - esac - test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && test none != "$pic_object"; then - func_append rmfiles " $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && test none != "$non_pic_object"; then - func_append rmfiles " $dir/$non_pic_object" - fi - fi - ;; - - *) - if test clean = "$opt_mode"; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - func_append rmfiles " $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - func_append rmfiles " $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - func_append rmfiles " $odir/$name $odir/${name}S.$objext" - if test yes = "$fast_install" && test -n "$relink_command"; then - func_append rmfiles " $odir/lt-$name" - fi - if test "X$noexename" != "X$name"; then - func_append rmfiles " $odir/lt-$noexename.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - - # Try to remove the $objdir's in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then - func_mode_uninstall ${1+"$@"} -fi - -test -z "$opt_mode" && { - help=$generic_help - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode '$opt_mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# where we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff -Nru gobject-introspection-1.56.1/build-aux/missing gobject-introspection-1.64.1/build-aux/missing --- gobject-introspection-1.56.1/build-aux/missing 2018-04-09 06:15:36.000000000 +0000 +++ gobject-introspection-1.64.1/build-aux/missing 1970-01-01 00:00:00.000000000 +0000 @@ -1,215 +0,0 @@ -#! /bin/sh -# Common wrapper for a few potentially missing GNU programs. - -scriptversion=2013-10-28.13; # UTC - -# Copyright (C) 1996-2014 Free Software Foundation, Inc. -# Originally written by Fran,cois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try '$0 --help' for more information" - exit 1 -fi - -case $1 in - - --is-lightweight) - # Used by our autoconf macros to check whether the available missing - # script is modern enough. - exit 0 - ;; - - --run) - # Back-compat with the calling convention used by older automake. - shift - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due -to PROGRAM being missing or too old. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - -Supported PROGRAM values: - aclocal autoconf autoheader autom4te automake makeinfo - bison yacc flex lex help2man - -Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and -'g' are ignored when checking the name. - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: unknown '$1' option" - echo 1>&2 "Try '$0 --help' for more information" - exit 1 - ;; - -esac - -# Run the given program, remember its exit status. -"$@"; st=$? - -# If it succeeded, we are done. -test $st -eq 0 && exit 0 - -# Also exit now if we it failed (or wasn't found), and '--version' was -# passed; such an option is passed most likely to detect whether the -# program is present and works. -case $2 in --version|--help) exit $st;; esac - -# Exit code 63 means version mismatch. This often happens when the user -# tries to use an ancient version of a tool on a file that requires a -# minimum version. -if test $st -eq 63; then - msg="probably too old" -elif test $st -eq 127; then - # Program was missing. - msg="missing on your system" -else - # Program was found and executed, but failed. Give up. - exit $st -fi - -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software - -program_details () -{ - case $1 in - aclocal|automake) - echo "The '$1' program is part of the GNU Automake package:" - echo "<$gnu_software_URL/automake>" - echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" - echo "<$gnu_software_URL/autoconf>" - echo "<$gnu_software_URL/m4/>" - echo "<$perl_URL>" - ;; - autoconf|autom4te|autoheader) - echo "The '$1' program is part of the GNU Autoconf package:" - echo "<$gnu_software_URL/autoconf/>" - echo "It also requires GNU m4 and Perl in order to run:" - echo "<$gnu_software_URL/m4/>" - echo "<$perl_URL>" - ;; - esac -} - -give_advice () -{ - # Normalize program name to check for. - normalized_program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - - printf '%s\n' "'$1' is $msg." - - configure_deps="'configure.ac' or m4 files included by 'configure.ac'" - case $normalized_program in - autoconf*) - echo "You should only need it if you modified 'configure.ac'," - echo "or m4 files included by it." - program_details 'autoconf' - ;; - autoheader*) - echo "You should only need it if you modified 'acconfig.h' or" - echo "$configure_deps." - program_details 'autoheader' - ;; - automake*) - echo "You should only need it if you modified 'Makefile.am' or" - echo "$configure_deps." - program_details 'automake' - ;; - aclocal*) - echo "You should only need it if you modified 'acinclude.m4' or" - echo "$configure_deps." - program_details 'aclocal' - ;; - autom4te*) - echo "You might have modified some maintainer files that require" - echo "the 'autom4te' program to be rebuilt." - program_details 'autom4te' - ;; - bison*|yacc*) - echo "You should only need it if you modified a '.y' file." - echo "You may want to install the GNU Bison package:" - echo "<$gnu_software_URL/bison/>" - ;; - lex*|flex*) - echo "You should only need it if you modified a '.l' file." - echo "You may want to install the Fast Lexical Analyzer package:" - echo "<$flex_URL>" - ;; - help2man*) - echo "You should only need it if you modified a dependency" \ - "of a man page." - echo "You may want to install the GNU Help2man package:" - echo "<$gnu_software_URL/help2man/>" - ;; - makeinfo*) - echo "You should only need it if you modified a '.texi' file, or" - echo "any other file indirectly affecting the aspect of the manual." - echo "You might want to install the Texinfo package:" - echo "<$gnu_software_URL/texinfo/>" - echo "The spurious makeinfo call might also be the consequence of" - echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" - echo "want to install GNU make:" - echo "<$gnu_software_URL/make/>" - ;; - *) - echo "You might have modified some files without having the proper" - echo "tools for further handling them. Check the 'README' file, it" - echo "often tells you about the needed prerequisites for installing" - echo "this package. You may also peek at any GNU archive site, in" - echo "case some other package contains this missing '$1' program." - ;; - esac -} - -give_advice "$1" | sed -e '1s/^/WARNING: /' \ - -e '2,$s/^/ /' >&2 - -# Propagate the correct exit status (expected to be 127 for a program -# not found, 63 for a program that failed due to version mismatch). -exit $st - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff -Nru gobject-introspection-1.56.1/build-aux/py-compile gobject-introspection-1.64.1/build-aux/py-compile --- gobject-introspection-1.56.1/build-aux/py-compile 2018-04-09 06:15:36.000000000 +0000 +++ gobject-introspection-1.64.1/build-aux/py-compile 1970-01-01 00:00:00.000000000 +0000 @@ -1,170 +0,0 @@ -#!/bin/sh -# py-compile - Compile a Python program - -scriptversion=2016-01-11.22; # UTC - -# Copyright (C) 2000-2017 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -if [ -z "$PYTHON" ]; then - PYTHON=python -fi - -me=py-compile - -usage_error () -{ - echo "$me: $*" >&2 - echo "Try '$me --help' for more information." >&2 - exit 1 -} - -basedir= -destdir= -while test $# -ne 0; do - case "$1" in - --basedir) - if test $# -lt 2; then - usage_error "option '--basedir' requires an argument" - else - basedir=$2 - fi - shift - ;; - --destdir) - if test $# -lt 2; then - usage_error "option '--destdir' requires an argument" - else - destdir=$2 - fi - shift - ;; - -h|--help) - cat <<\EOF -Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..." - -Byte compile some python scripts FILES. Use --destdir to specify any -leading directory path to the FILES that you don't want to include in the -byte compiled file. Specify --basedir for any additional path information you -do want to be shown in the byte compiled file. - -Example: - py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py - -Report bugs to . -EOF - exit $? - ;; - -v|--version) - echo "$me $scriptversion" - exit $? - ;; - --) - shift - break - ;; - -*) - usage_error "unrecognized option '$1'" - ;; - *) - break - ;; - esac - shift -done - -files=$* -if test -z "$files"; then - usage_error "no files given" -fi - -# if basedir was given, then it should be prepended to filenames before -# byte compilation. -if [ -z "$basedir" ]; then - pathtrans="path = file" -else - pathtrans="path = os.path.join('$basedir', file)" -fi - -# if destdir was given, then it needs to be prepended to the filename to -# byte compile but not go into the compiled file. -if [ -z "$destdir" ]; then - filetrans="filepath = path" -else - filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)" -fi - -$PYTHON -c " -import sys, os, py_compile, imp - -files = '''$files''' - -sys.stdout.write('Byte-compiling python modules...\n') -for file in files.split(): - $pathtrans - $filetrans - if not os.path.exists(filepath) or not (len(filepath) >= 3 - and filepath[-3:] == '.py'): - continue - sys.stdout.write(file) - sys.stdout.flush() - if hasattr(imp, 'get_tag'): - py_compile.compile(filepath, imp.cache_from_source(filepath), path) - else: - py_compile.compile(filepath, filepath + 'c', path) -sys.stdout.write('\n')" || exit $? - -# this will fail for python < 1.5, but that doesn't matter ... -$PYTHON -O -c " -import sys, os, py_compile, imp - -# pypy does not use .pyo optimization -if hasattr(sys, 'pypy_translation_info'): - sys.exit(0) - -files = '''$files''' -sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n') -for file in files.split(): - $pathtrans - $filetrans - if not os.path.exists(filepath) or not (len(filepath) >= 3 - and filepath[-3:] == '.py'): - continue - sys.stdout.write(file) - sys.stdout.flush() - if hasattr(imp, 'get_tag'): - py_compile.compile(filepath, imp.cache_from_source(filepath, False), path) - else: - py_compile.compile(filepath, filepath + 'o', path) -sys.stdout.write('\n')" 2>/dev/null || : - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: diff -Nru gobject-introspection-1.56.1/build-aux/test-driver gobject-introspection-1.64.1/build-aux/test-driver --- gobject-introspection-1.56.1/build-aux/test-driver 2018-04-09 06:15:37.000000000 +0000 +++ gobject-introspection-1.64.1/build-aux/test-driver 1970-01-01 00:00:00.000000000 +0000 @@ -1,148 +0,0 @@ -#! /bin/sh -# test-driver - basic testsuite driver script. - -scriptversion=2013-07-13.22; # UTC - -# Copyright (C) 2011-2014 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -# Make unconditional expansion of undefined variables an error. This -# helps a lot in preventing typo-related bugs. -set -u - -usage_error () -{ - echo "$0: $*" >&2 - print_usage >&2 - exit 2 -} - -print_usage () -{ - cat <$log_file 2>&1 -estatus=$? - -if test $enable_hard_errors = no && test $estatus -eq 99; then - tweaked_estatus=1 -else - tweaked_estatus=$estatus -fi - -case $tweaked_estatus:$expect_failure in - 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; - 0:*) col=$grn res=PASS recheck=no gcopy=no;; - 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; - 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; - *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; - *:*) col=$red res=FAIL recheck=yes gcopy=yes;; -esac - -# Report the test outcome and exit status in the logs, so that one can -# know whether the test passed or failed simply by looking at the '.log' -# file, without the need of also peaking into the corresponding '.trs' -# file (automake bug#11814). -echo "$res $test_name (exit status: $estatus)" >>$log_file - -# Report outcome to console. -echo "${col}${res}${std}: $test_name" - -# Register the test result, and other relevant metadata. -echo ":test-result: $res" > $trs_file -echo ":global-test-result: $res" >> $trs_file -echo ":recheck: $recheck" >> $trs_file -echo ":copy-in-global-log: $gcopy" >> $trs_file - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff -Nru gobject-introspection-1.56.1/build-aux/ylwrap gobject-introspection-1.64.1/build-aux/ylwrap --- gobject-introspection-1.56.1/build-aux/ylwrap 2018-04-09 06:15:36.000000000 +0000 +++ gobject-introspection-1.64.1/build-aux/ylwrap 1970-01-01 00:00:00.000000000 +0000 @@ -1,247 +0,0 @@ -#! /bin/sh -# ylwrap - wrapper for lex/yacc invocations. - -scriptversion=2016-01-11.22; # UTC - -# Copyright (C) 1996-2017 Free Software Foundation, Inc. -# -# Written by Tom Tromey . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -get_dirname () -{ - case $1 in - */*|*\\*) printf '%s\n' "$1" | sed -e 's|\([\\/]\)[^\\/]*$|\1|';; - # Otherwise, we want the empty string (not "."). - esac -} - -# guard FILE -# ---------- -# The CPP macro used to guard inclusion of FILE. -guard () -{ - printf '%s\n' "$1" \ - | sed \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ - -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g' \ - -e 's/__*/_/g' -} - -# quote_for_sed [STRING] -# ---------------------- -# Return STRING (or stdin) quoted to be used as a sed pattern. -quote_for_sed () -{ - case $# in - 0) cat;; - 1) printf '%s\n' "$1";; - esac \ - | sed -e 's|[][\\.*]|\\&|g' -} - -case "$1" in - '') - echo "$0: No files given. Try '$0 --help' for more information." 1>&2 - exit 1 - ;; - --basedir) - basedir=$2 - shift 2 - ;; - -h|--h*) - cat <<\EOF -Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... - -Wrapper for lex/yacc invocations, renaming files as desired. - - INPUT is the input file - OUTPUT is one file PROG generates - DESIRED is the file we actually want instead of OUTPUT - PROGRAM is program to run - ARGS are passed to PROG - -Any number of OUTPUT,DESIRED pairs may be used. - -Report bugs to . -EOF - exit $? - ;; - -v|--v*) - echo "ylwrap $scriptversion" - exit $? - ;; -esac - - -# The input. -input=$1 -shift -# We'll later need for a correct munging of "#line" directives. -input_sub_rx=`get_dirname "$input" | quote_for_sed` -case $input in - [\\/]* | ?:[\\/]*) - # Absolute path; do nothing. - ;; - *) - # Relative path. Make it absolute. - input=`pwd`/$input - ;; -esac -input_rx=`get_dirname "$input" | quote_for_sed` - -# Since DOS filename conventions don't allow two dots, -# the DOS version of Bison writes out y_tab.c instead of y.tab.c -# and y_tab.h instead of y.tab.h. Test to see if this is the case. -y_tab_nodot=false -if test -f y_tab.c || test -f y_tab.h; then - y_tab_nodot=true -fi - -# The parser itself, the first file, is the destination of the .y.c -# rule in the Makefile. -parser=$1 - -# A sed program to s/FROM/TO/g for all the FROM/TO so that, for -# instance, we rename #include "y.tab.h" into #include "parse.h" -# during the conversion from y.tab.c to parse.c. -sed_fix_filenames= - -# Also rename header guards, as Bison 2.7 for instance uses its header -# guard in its implementation file. -sed_fix_header_guards= - -while test $# -ne 0; do - if test x"$1" = x"--"; then - shift - break - fi - from=$1 - # Handle y_tab.c and y_tab.h output by DOS - if $y_tab_nodot; then - case $from in - "y.tab.c") from=y_tab.c;; - "y.tab.h") from=y_tab.h;; - esac - fi - shift - to=$1 - shift - sed_fix_filenames="${sed_fix_filenames}s|"`quote_for_sed "$from"`"|$to|g;" - sed_fix_header_guards="${sed_fix_header_guards}s|"`guard "$from"`"|"`guard "$to"`"|g;" -done - -# The program to run. -prog=$1 -shift -# Make any relative path in $prog absolute. -case $prog in - [\\/]* | ?:[\\/]*) ;; - *[\\/]*) prog=`pwd`/$prog ;; -esac - -dirname=ylwrap$$ -do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret' -trap "ret=129; $do_exit" 1 -trap "ret=130; $do_exit" 2 -trap "ret=141; $do_exit" 13 -trap "ret=143; $do_exit" 15 -mkdir $dirname || exit 1 - -cd $dirname - -case $# in - 0) "$prog" "$input" ;; - *) "$prog" "$@" "$input" ;; -esac -ret=$? - -if test $ret -eq 0; then - for from in * - do - to=`printf '%s\n' "$from" | sed "$sed_fix_filenames"` - if test -f "$from"; then - # If $2 is an absolute path name, then just use that, - # otherwise prepend '../'. - case $to in - [\\/]* | ?:[\\/]*) target=$to;; - *) target=../$to;; - esac - - # Do not overwrite unchanged header files to avoid useless - # recompilations. Always update the parser itself: it is the - # destination of the .y.c rule in the Makefile. Divert the - # output of all other files to a temporary file so we can - # compare them to existing versions. - if test $from != $parser; then - realtarget=$target - target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'` - fi - - # Munge "#line" or "#" directives. Don't let the resulting - # debug information point at an absolute srcdir. Use the real - # output file name, not yy.lex.c for instance. Adjust the - # include guards too. - sed -e "/^#/!b" \ - -e "s|$input_rx|$input_sub_rx|" \ - -e "$sed_fix_filenames" \ - -e "$sed_fix_header_guards" \ - "$from" >"$target" || ret=$? - - # Check whether files must be updated. - if test "$from" != "$parser"; then - if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then - echo "$to is unchanged" - rm -f "$target" - else - echo "updating $to" - mv -f "$target" "$realtarget" - fi - fi - else - # A missing file is only an error for the parser. This is a - # blatant hack to let us support using "yacc -d". If -d is not - # specified, don't fail when the header file is "missing". - if test "$from" = "$parser"; then - ret=1 - fi - fi - done -fi - -# Remove the directory. -cd .. -rm -rf $dirname - -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: diff -Nru gobject-introspection-1.56.1/common.mk gobject-introspection-1.64.1/common.mk --- gobject-introspection-1.56.1/common.mk 2016-03-14 10:49:00.000000000 +0000 +++ gobject-introspection-1.64.1/common.mk 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -# -*- Mode: make -*- -# Copyright 2009-2010 Johan Dahlin -# -# This file defines variables that are compatible with -# Makefile.introspection, but for use within the gobject-introspection -# module itself. -# - -INTROSPECTION_SCANNER = \ - env PATH=".libs:$(PATH)" \ - LPATH=.libs \ - CC="$(CC)" \ - PYTHONPATH=$(top_builddir):$(top_srcdir) \ - UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \ - UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \ - $(top_builddir)/g-ir-scanner - -INTROSPECTION_SCANNER_ARGS = \ - --verbose \ - -I$(top_srcdir) \ - --add-include-path=$(srcdir) \ - --add-include-path=$(top_srcdir)/gir \ - --add-include-path=$(builddir) \ - --add-include-path=$(top_builddir) \ - --add-include-path=$(top_builddir)/gir - -# GI_CROSS_LAUNCHER is the command to use for executing g-ir-compiler. -# Normally will be undefined but can be set (e.g. to wine or qemu) -# when cross-compiling -INTROSPECTION_COMPILER = \ - env PATH=".libs:$(PATH)" \ - $(GI_CROSS_LAUNCHER) \ - $(top_builddir)/g-ir-compiler$(EXEEXT) - -INTROSPECTION_COMPILER_ARGS = \ - --includedir=$(srcdir) \ - --includedir=$(top_srcdir)/gir \ - --includedir=$(builddir) \ - --includedir=$(top_builddir) \ - --includedir=$(top_builddir)/gir - -INTROSPECTION_DOCTOOL = \ - env PATH=".libs:$(PATH)" \ - LPATH=.libs \ - PYTHONPATH=$(top_builddir):$(top_srcdir) \ - UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \ - UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \ - $(top_builddir)/g-ir-doc-tool - -INTROSPECTION_DOCTOOL_ARGS = \ - --add-include-path=$(srcdir) \ - --add-include-path=$(top_srcdir)/gir \ - --add-include-path=$(builddir) \ - --add-include-path=$(top_builddir) \ - --add-include-path=$(top_builddir)/gir diff -Nru gobject-introspection-1.56.1/config.h.in gobject-introspection-1.64.1/config.h.in --- gobject-introspection-1.56.1/config.h.in 2018-04-09 06:15:35.000000000 +0000 +++ gobject-introspection-1.64.1/config.h.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,125 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Director prefix for gir installation */ -#undef GIR_DIR - -/* Name of the gir directory */ -#undef GIR_SUFFIX - -/* Directory prefix for typelib installation */ -#undef GOBJECT_INTROSPECTION_LIBDIR - -/* Define to 1 if you have the `backtrace' function. */ -#undef HAVE_BACKTRACE - -/* Define to 1 if you have the `backtrace_symbols' function. */ -#undef HAVE_BACKTRACE_SYMBOLS - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `dl' library (-ldl). */ -#undef HAVE_LIBDL - -/* Define to 1 if you have the `memchr' function. */ -#undef HAVE_MEMCHR - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the `strchr' function. */ -#undef HAVE_STRCHR - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strspn' function. */ -#undef HAVE_STRSPN - -/* Define to 1 if you have the `strstr' function. */ -#undef HAVE_STRSTR - -/* Define to 1 if you have the `strtol' function. */ -#undef HAVE_STRTOL - -/* Define to 1 if you have the `strtoull' function. */ -#undef HAVE_STRTOULL - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#undef LT_OBJDIR - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to the platform's shared library suffix */ -#undef SHLIB_SUFFIX - -/* The size of `char', as computed by sizeof. */ -#undef SIZEOF_CHAR - -/* The size of `int', as computed by sizeof. */ -#undef SIZEOF_INT - -/* The size of `long', as computed by sizeof. */ -#undef SIZEOF_LONG - -/* The size of `short', as computed by sizeof. */ -#undef SIZEOF_SHORT - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#undef YYTEXT_POINTER - -/* defines how to decorate public symbols while building */ -#undef _GI_EXTERN - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const diff -Nru gobject-introspection-1.56.1/config.h.win32 gobject-introspection-1.64.1/config.h.win32 --- gobject-introspection-1.56.1/config.h.win32 2018-04-09 06:15:44.000000000 +0000 +++ gobject-introspection-1.64.1/config.h.win32 1970-01-01 00:00:00.000000000 +0000 @@ -1,143 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Director prefix for gir installation */ -#define GIR_DIR "/some/dynamically/constructed/dir" - -/* Name of the gir directory */ -#define GIR_SUFFIX "gir-1.0" - -/* Directory prefix for typelib installation */ -#define GOBJECT_INTROSPECTION_LIBDIR "/some/dynamically/constructed/dir" - -/* Define to 1 if you have the `backtrace' function. */ -/* #undef HAVE_BACKTRACE */ - -/* Define to 1 if you have the `backtrace_symbols' function. */ -/* #undef HAVE_BACKTRACE_SYMBOLS */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#ifndef _MSC_VER -#define HAVE_INTTYPES_H 1 -#endif - -/* Define to 1 if you have the `dl' library (-ldl). */ -/* #undef HAVE_LIBDL */ - -/* Define to 1 if you have the `memchr' function. */ -#define HAVE_MEMCHR 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -#if (!defined (_MSC_VER) || (_MSC_VER >= 1600)) -#define HAVE_STDINT_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the header file. */ -#ifndef _MSC_VER -#define HAVE_STRINGS_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strspn' function. */ -#define HAVE_STRSPN 1 - -/* Define to 1 if you have the `strstr' function. */ -#define HAVE_STRSTR 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoull' function. */ -#ifndef _MSC_VER -#define HAVE_STRTOULL 1 -#endif - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#ifndef _MSC_VER -#define HAVE_UNISTD_H 1 -#endif - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -/* #undef NO_MINUS_C_MINUS_O - -/* Name of package */ -#define PACKAGE "gobject-introspection" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=gobject-introspection" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "gobject-introspection" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gojbect-introspection 1.56.1" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gobject-introspection" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "1.56.1" - -/* Define to the platform's shared library suffix */ -#define SHLIB_SUFFIX ".dll" - -/* The size of `char', as computed by sizeof. */ -#define SIZEOF_CHAR 1 - -/* The size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of `long', as computed by sizeof. */ -#define SIZEOF_LONG 4 - -/* The size of `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Version number of package */ -#define VERSION "1.56.1" - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* defines how to decorate public symbols while building */ -#ifdef _MSC_VER -#define _GI_EXTERN __declspec (dllexport) extern -#else -#define _GI_EXTERN __attribute__((visibility("default"))) __declspec (dllexport) extern -#endif - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ diff -Nru gobject-introspection-1.56.1/config.h.win32.in gobject-introspection-1.64.1/config.h.win32.in --- gobject-introspection-1.56.1/config.h.win32.in 2014-08-15 06:12:46.000000000 +0000 +++ gobject-introspection-1.64.1/config.h.win32.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,143 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Director prefix for gir installation */ -#define GIR_DIR "/some/dynamically/constructed/dir" - -/* Name of the gir directory */ -#define GIR_SUFFIX "@GIR_SUFFIX@" - -/* Directory prefix for typelib installation */ -#define GOBJECT_INTROSPECTION_LIBDIR "/some/dynamically/constructed/dir" - -/* Define to 1 if you have the `backtrace' function. */ -/* #undef HAVE_BACKTRACE */ - -/* Define to 1 if you have the `backtrace_symbols' function. */ -/* #undef HAVE_BACKTRACE_SYMBOLS */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#ifndef _MSC_VER -#define HAVE_INTTYPES_H 1 -#endif - -/* Define to 1 if you have the `dl' library (-ldl). */ -/* #undef HAVE_LIBDL */ - -/* Define to 1 if you have the `memchr' function. */ -#define HAVE_MEMCHR 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -#if (!defined (_MSC_VER) || (_MSC_VER >= 1600)) -#define HAVE_STDINT_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the header file. */ -#ifndef _MSC_VER -#define HAVE_STRINGS_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strspn' function. */ -#define HAVE_STRSPN 1 - -/* Define to 1 if you have the `strstr' function. */ -#define HAVE_STRSTR 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoull' function. */ -#ifndef _MSC_VER -#define HAVE_STRTOULL 1 -#endif - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#ifndef _MSC_VER -#define HAVE_UNISTD_H 1 -#endif - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -/* #undef NO_MINUS_C_MINUS_O - -/* Name of package */ -#define PACKAGE "gobject-introspection" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "gobject-introspection" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gojbect-introspection @PACKAGE_VERSION@" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gobject-introspection" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "@PACKAGE_VERSION@" - -/* Define to the platform's shared library suffix */ -#define SHLIB_SUFFIX ".dll" - -/* The size of `char', as computed by sizeof. */ -#define SIZEOF_CHAR 1 - -/* The size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of `long', as computed by sizeof. */ -#define SIZEOF_LONG 4 - -/* The size of `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Version number of package */ -#define VERSION "@PACKAGE_VERSION@" - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* defines how to decorate public symbols while building */ -#ifdef _MSC_VER -#define _GI_EXTERN __declspec (dllexport) extern -#else -#define _GI_EXTERN __attribute__((visibility("default"))) __declspec (dllexport) extern -#endif - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ diff -Nru gobject-introspection-1.56.1/configure gobject-introspection-1.64.1/configure --- gobject-introspection-1.56.1/configure 2018-04-09 06:15:34.000000000 +0000 +++ gobject-introspection-1.64.1/configure 1970-01-01 00:00:00.000000000 +0000 @@ -1,17849 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for gobject-introspection 1.56.1. -# -# Report bugs to . -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: http://bugzilla.gnome.org/enter_bug.cgi?product=gobject-introspection -$0: about your system, including any error possibly output -$0: before this message. Then install a modern shell, or -$0: manually run the script under such a shell if you do -$0: have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='gobject-introspection' -PACKAGE_TARNAME='gobject-introspection' -PACKAGE_VERSION='1.56.1' -PACKAGE_STRING='gobject-introspection 1.56.1' -PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=gobject-introspection' -PACKAGE_URL='' - -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -MSVC_NO_TOOLSET_SET_FALSE -MSVC_NO_TOOLSET_SET_TRUE -MSVC_BASE_NO_TOOLSET_SET_FALSE -MSVC_BASE_NO_TOOLSET_SET_TRUE -EXTRA_LINK_FLAGS -GI_HIDDEN_VISIBILITY_CFLAGS -GLIBSRC -WITH_GLIBSRC_FALSE -WITH_GLIBSRC_TRUE -BUILD_DOCTOOL_FALSE -BUILD_DOCTOOL_TRUE -PYTHON_LIBS -PYTHON_INCLUDES -pkgpyexecdir -pyexecdir -pkgpythondir -pythondir -PYTHON_PLATFORM -PYTHON_EXEC_PREFIX -PYTHON_PREFIX -PYTHON_VERSION -PYTHON -LIBOBJS -POW_LIB -GTK_DOC_USE_REBASE_FALSE -GTK_DOC_USE_REBASE_TRUE -GTK_DOC_USE_LIBTOOL_FALSE -GTK_DOC_USE_LIBTOOL_TRUE -GTK_DOC_BUILD_PDF_FALSE -GTK_DOC_BUILD_PDF_TRUE -GTK_DOC_BUILD_HTML_FALSE -GTK_DOC_BUILD_HTML_TRUE -ENABLE_GTK_DOC_FALSE -ENABLE_GTK_DOC_TRUE -HAVE_GTK_DOC_FALSE -HAVE_GTK_DOC_TRUE -GTKDOC_DEPS_LIBS -GTKDOC_DEPS_CFLAGS -HTML_DIR -GTKDOC_MKPDF -GTKDOC_REBASE -GTKDOC_CHECK_PATH -GTKDOC_CHECK -GIREPO_LIBS -GIREPO_CFLAGS -FFI_PC_PACKAGES -FFI_PC_LIBS -FFI_PC_CFLAGS -FFI_LIBS -FFI_CFLAGS -SCANNER_LIBS -SCANNER_CFLAGS -CAIRO_GIR_PACKAGE -CAIRO_SHARED_LIBRARY -HAVE_CAIRO_FALSE -HAVE_CAIRO_TRUE -CAIRO_LIBS -CAIRO_CFLAGS -HAVE_GIO_UNIX_FALSE -HAVE_GIO_UNIX_TRUE -GIO_UNIX_LIBS -GIO_UNIX_CFLAGS -GIO_LIBS -GIO_CFLAGS -GMODULE_LIBS -GMODULE_CFLAGS -GOBJECT_LIBS -GOBJECT_CFLAGS -GLIB_LIBS -GLIB_CFLAGS -GIR_DIR -GIR_SUFFIX -GOBJECT_INTROSPECTION_LIBDIR -EXPANDED_DATADIR -EXPANDED_LIBEXECDIR -EXPANDED_LIBDIR -EXPANDED_BINDIR -EXPANDED_SYSCONFDIR -EXPANDED_LOCALSTATEDIR -YACC -LEXLIB -LEX_OUTPUT_ROOT -LEX -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH -PKG_CONFIG -CPP -LT_SYS_LIBRARY_PATH -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -RANLIB -ac_ct_AR -AR -DLLTOOL -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -GREP -SED -LIBTOOL -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -am__nodep -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -OS_WIN32_FALSE -OS_WIN32_TRUE -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -GI_VERSION -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -runstatedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_maintainer_mode -enable_dependency_tracking -enable_shared -enable_static -with_pic -enable_fast_install -with_aix_soname -with_gnu_ld -with_sysroot -enable_libtool_lock -with_cairo -with_html_dir -enable_gtk_doc -enable_gtk_doc_html -enable_gtk_doc_pdf -with_python -enable_doctool -with_glib_src -enable_Bsymbolic -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -LT_SYS_LIBRARY_PATH -CPP -PKG_CONFIG -PKG_CONFIG_PATH -PKG_CONFIG_LIBDIR -GLIB_CFLAGS -GLIB_LIBS -GOBJECT_CFLAGS -GOBJECT_LIBS -GMODULE_CFLAGS -GMODULE_LIBS -GIO_CFLAGS -GIO_LIBS -GIO_UNIX_CFLAGS -GIO_UNIX_LIBS -CAIRO_CFLAGS -CAIRO_LIBS -SCANNER_CFLAGS -SCANNER_LIBS -FFI_CFLAGS -FFI_LIBS -GIREPO_CFLAGS -GIREPO_LIBS -GTKDOC_DEPS_CFLAGS -GTKDOC_DEPS_LIBS -PYTHON' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures gobject-introspection 1.56.1 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root - [DATAROOTDIR/doc/gobject-introspection] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of gobject-introspection 1.56.1:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") - --disable-maintainer-mode - disable make rules and dependencies not useful (and - sometimes confusing) to the casual installer - --enable-dependency-tracking - do not reject slow dependency extractors - --disable-dependency-tracking - speeds up one-time build - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-gtk-doc use gtk-doc to build documentation [[default=no]] - --enable-gtk-doc-html build documentation in html format [[default=yes]] - --enable-gtk-doc-pdf build documentation in pdf format [[default=no]] - --disable-doctool disable g-ir-doc-tool - --disable-Bsymbolic avoid linking with -Bsymbolic - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use - both] - --with-aix-soname=aix|svr4|both - shared library versioning (aka "SONAME") variant to - provide on AIX, [default=aix]. - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot[=DIR] Search for dependent libraries within DIR (or the - compiler's sysroot if not specified). - --with-cairo Use cairo [default=maybe] - --with-html-dir=PATH path to installed docs - --with-python=PATH Path to Python interpreter; searches $PATH if only a - program name is given; if not given, searches for a - few standard names such as "python3" or "python2" - --with-glib-src=PATH Source directory for glib - needed to add docs to gir - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - LT_SYS_LIBRARY_PATH - User-defined run-time library search path. - CPP C preprocessor - PKG_CONFIG path to pkg-config utility - PKG_CONFIG_PATH - directories to add to pkg-config's search path - PKG_CONFIG_LIBDIR - path overriding pkg-config's built-in search path - GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config - GLIB_LIBS linker flags for GLIB, overriding pkg-config - GOBJECT_CFLAGS - C compiler flags for GOBJECT, overriding pkg-config - GOBJECT_LIBS - linker flags for GOBJECT, overriding pkg-config - GMODULE_CFLAGS - C compiler flags for GMODULE, overriding pkg-config - GMODULE_LIBS - linker flags for GMODULE, overriding pkg-config - GIO_CFLAGS C compiler flags for GIO, overriding pkg-config - GIO_LIBS linker flags for GIO, overriding pkg-config - GIO_UNIX_CFLAGS - C compiler flags for GIO_UNIX, overriding pkg-config - GIO_UNIX_LIBS - linker flags for GIO_UNIX, overriding pkg-config - CAIRO_CFLAGS - C compiler flags for CAIRO, overriding pkg-config - CAIRO_LIBS linker flags for CAIRO, overriding pkg-config - SCANNER_CFLAGS - C compiler flags for SCANNER, overriding pkg-config - SCANNER_LIBS - linker flags for SCANNER, overriding pkg-config - FFI_CFLAGS C compiler flags for FFI, overriding pkg-config - FFI_LIBS linker flags for FFI, overriding pkg-config - GIREPO_CFLAGS - C compiler flags for GIREPO, overriding pkg-config - GIREPO_LIBS linker flags for GIREPO, overriding pkg-config - GTKDOC_DEPS_CFLAGS - C compiler flags for GTKDOC_DEPS, overriding pkg-config - GTKDOC_DEPS_LIBS - linker flags for GTKDOC_DEPS, overriding pkg-config - PYTHON the Python interpreter - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -gobject-introspection configure 1.56.1 -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 &5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------------------------------------------------------------ ## -## Report this to http://bugzilla.gnome.org/enter_bug.cgi?product=gobject-introspection ## -## ------------------------------------------------------------------------------------ ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by gobject-introspection $as_me 1.56.1, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_config_headers="$ac_config_headers config.h" - - -ac_aux_dir= -for ac_dir in build-aux "$srcdir"/build-aux; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - -am__api_version='1.15' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken - alias in your environment" "$LINENO" 5 - fi - if test "$2" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi - -rm -f conftest.file - -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=1;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='gobject-introspection' - VERSION='1.56.1' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -mkdir_p='$(MKDIR_P)' - -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-tar}' - - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar plaintar pax cpio none' - -# The POSIX 1988 'ustar' format is defined with fixed-size fields. - # There is notably a 21 bits limit for the UID and the GID. In fact, - # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 - # and bug#13588). - am_max_uid=2097151 # 2^21 - 1 - am_max_gid=$am_max_uid - # The $UID and $GID variables are not portable, so we need to resort - # to the POSIX-mandated id(1) utility. Errors in the 'id' calls - # below are definitely unexpected, so allow the users to see them - # (that is, avoid stderr redirection). - am_uid=`id -u || echo unknown` - am_gid=`id -g || echo unknown` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 -$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } - if test $am_uid -le $am_max_uid; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - _am_tools=none - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 -$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } - if test $am_gid -le $am_max_gid; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - _am_tools=none - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 -$as_echo_n "checking how to create a ustar tar archive... " >&6; } - - # Go ahead even if we have the value already cached. We do so because we - # need to set the values for the 'am__tar' and 'am__untar' variables. - _am_tools=${am_cv_prog_tar_ustar-$_am_tools} - - for _am_tool in $_am_tools; do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; do - { echo "$as_me:$LINENO: $_am_tar --version" >&5 - ($_am_tar --version) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && break - done - am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x ustar -w "$$tardir"' - am__tar_='pax -L -x ustar -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H ustar -L' - am__tar_='find "$tardir" -print | cpio -o -H ustar -L' - am__untar='cpio -i -H ustar -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_ustar}" && break - - # tar/untar a dummy directory, and stop if the command works. - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 - (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - rm -rf conftest.dir - if test -s conftest.tar; then - { echo "$as_me:$LINENO: $am__untar &5 - ($am__untar &5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 - (cat conftest.dir/file) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi - done - rm -rf conftest.dir - - if ${am_cv_prog_tar_ustar+:} false; then : - $as_echo_n "(cached) " >&6 -else - am_cv_prog_tar_ustar=$_am_tool -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 -$as_echo "$am_cv_prog_tar_ustar" >&6; } - - - - - - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 - fi -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then : - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=yes -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } - if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - - -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=0;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - - -# Used in docs/reference/version.xml -GI_VERSION=1.56.1 - - -# Check for Win32 -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -case "$host" in -*-*-mingw*) - os_win32=yes - ;; -*) - os_win32=no - ;; -esac - if test "x$os_win32" = "xyes"; then - OS_WIN32_TRUE= - OS_WIN32_FALSE='#' -else - OS_WIN32_TRUE='#' - OS_WIN32_FALSE= -fi - - -# Checks for programs. -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - - - -# Initialize libtool - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.6' -macro_revision='2.4.6' - - - - - - - - - - - - - -ltmain=$ac_aux_dir/ltmain.sh - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case $ECHO in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_FGREP" || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n "$lt_cv_sys_max_cmd_len"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test yes != "$GCC"; then - reload_cmds=false - fi - ;; - darwin*) - if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } - -if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test ia64 = "$host_cpu"; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } - -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; -else - with_sysroot=no -fi - - -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -$as_echo_n "checking for a working dd... " >&6; } -if ${ac_cv_path_lt_DD+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -if test -z "$lt_DD"; then - ac_path_lt_DD_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in dd; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_lt_DD" || continue -if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi - $ac_path_lt_DD_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_lt_DD"; then - : - fi -else - ac_cv_path_lt_DD=$lt_DD -fi - -rm -f conftest.i conftest2.i conftest.out -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -$as_echo "$ac_cv_path_lt_DD" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -$as_echo_n "checking how to truncate binary pipes... " >&6; } -if ${lt_cv_truncate_bin+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -$as_echo "$lt_cv_truncate_bin" >&6; } - - - - - - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test no = "$enable_libtool_lock" || enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE=32 - ;; - *ELF-64*) - HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS - fi - ;; -*-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*|x86_64-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks=$enable_libtool_lock - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&5 - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[012][,.]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - pic_mode=default -fi - - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[5-9]*,yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } - -# Check whether --with-aix-soname was given. -if test "${with_aix_soname+set}" = set; then : - withval=$with_aix_soname; case $withval in - aix|svr4|both) - ;; - *) - as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname -else - if ${lt_cv_with_aix_soname+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_with_aix_soname=aix -fi - - with_aix_soname=$lt_cv_with_aix_soname -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -$as_echo "$with_aix_soname" >&6; } - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld=$lt_cv_prog_gnu_ld - -old_CC=$CC -old_CFLAGS=$CFLAGS - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -func_cc_basename $compiler -cc_basename=$func_cc_basename_result - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/${ac_tool_prefix}file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac -fi - -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC=$CC -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test yes = "$GCC"; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - lt_prog_compiler_pic='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works"; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_static_works"; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd* | bitrig*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu | gnu*) - link_all_deplibs=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - export_dynamic_flag_spec='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='$wl--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - tcc*) - export_dynamic_flag_spec='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test no = "$ld_shlibs"; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct=no - hardcode_direct_absolute=no - ;; - esac - - if test yes = "$GCC"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - export_dynamic_flag_spec='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' $wl-bernotok' - allow_undefined_flag=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test yes = "$GCC"; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='$wl-E' - ;; - - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test yes = "$lt_cv_prog_compiler__b"; then - archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test yes = "$lt_cv_irix_exported_symbol"; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - link_all_deplibs=no - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - ld_shlibs=yes - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' - else - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - - osf3*) - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='$wl-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='$wl-z,text' - allow_undefined_flag='$wl-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='$wl-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test no = "$ld_shlibs" && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test yes = "$GCC"; then - case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([A-Za-z]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - - - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test yes = "$hardcode_automatic"; then - - # We can hardcode non-existent directories. - if test no != "$hardcode_direct" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && - test no != "$hardcode_minus_L"; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test relink = "$hardcode_action" || - test yes = "$inherit_rpath"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen=shl_load -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen=dlopen -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report what library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC=$lt_save_CC - - - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - - - - - - - - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi -fi - -for ac_prog in flex lex -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LEX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LEX"; then - ac_cv_prog_LEX="$LEX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LEX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LEX=$ac_cv_prog_LEX -if test -n "$LEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 -$as_echo "$LEX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$LEX" && break -done -test -n "$LEX" || LEX=":" - -if test "x$LEX" != "x:"; then - cat >conftest.l <<_ACEOF -%% -a { ECHO; } -b { REJECT; } -c { yymore (); } -d { yyless (1); } -e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ - yyless ((input () != 0)); } -f { unput (yytext[0]); } -. { BEGIN INITIAL; } -%% -#ifdef YYTEXT_POINTER -extern char *yytext; -#endif -int -main (void) -{ - return ! yylex () + ! yywrap (); -} -_ACEOF -{ { ac_try="$LEX conftest.l" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$LEX conftest.l") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 -$as_echo_n "checking lex output file root... " >&6; } -if ${ac_cv_prog_lex_root+:} false; then : - $as_echo_n "(cached) " >&6 -else - -if test -f lex.yy.c; then - ac_cv_prog_lex_root=lex.yy -elif test -f lexyy.c; then - ac_cv_prog_lex_root=lexyy -else - as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 -$as_echo "$ac_cv_prog_lex_root" >&6; } -LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root - -if test -z "${LEXLIB+set}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 -$as_echo_n "checking lex library... " >&6; } -if ${ac_cv_lib_lex+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ac_save_LIBS=$LIBS - ac_cv_lib_lex='none needed' - for ac_lib in '' -lfl -ll; do - LIBS="$ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -`cat $LEX_OUTPUT_ROOT.c` -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lex=$ac_lib -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - test "$ac_cv_lib_lex" != 'none needed' && break - done - LIBS=$ac_save_LIBS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 -$as_echo "$ac_cv_lib_lex" >&6; } - test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 -$as_echo_n "checking whether yytext is a pointer... " >&6; } -if ${ac_cv_prog_lex_yytext_pointer+:} false; then : - $as_echo_n "(cached) " >&6 -else - # POSIX says lex can declare yytext either as a pointer or an array; the -# default is implementation-dependent. Figure out which it is, since -# not all implementations provide the %pointer and %array declarations. -ac_cv_prog_lex_yytext_pointer=no -ac_save_LIBS=$LIBS -LIBS="$LEXLIB $ac_save_LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #define YYTEXT_POINTER 1 -`cat $LEX_OUTPUT_ROOT.c` -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_prog_lex_yytext_pointer=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_save_LIBS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 -$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } -if test $ac_cv_prog_lex_yytext_pointer = yes; then - -$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h - -fi -rm -f conftest.l $LEX_OUTPUT_ROOT.c - -fi -if test "$LEX" = :; then - as_fn_error $? "flex not found but required" "$LINENO" 5 -fi - -for ac_prog in 'bison -y' -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_YACC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$YACC"; then - ac_cv_prog_YACC="$YACC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_YACC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -YACC=$ac_cv_prog_YACC -if test -n "$YACC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 -$as_echo "$YACC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$YACC" && break -done -test -n "$YACC" || YACC=":" - -if test "$YACC" = :; then - as_fn_error $? "bison not found but required" "$LINENO" 5 -fi - - -ensureflag() { - flag="$1"; shift - result="$@" - - case " ${result} " in - *[\ \ ]${flag}[\ \ ]*) ;; - *) result="${flag} ${result}" ;; - esac - - echo ${result} -} - -if test "$GCC" = "yes"; then - for flag in -Wall -Wchar-subscripts -Wmissing-declarations \ - -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align \ - -Wsign-compare -fno-strict-aliasing; - do - CFLAGS="$(ensureflag $flag $CFLAGS)" - done -fi - -# Checks for libraries. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDL 1 -_ACEOF - - LIBS="-ldl $LIBS" - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the suffix of shared libraries" >&5 -$as_echo_n "checking for the suffix of shared libraries... " >&6; } -# libtool variables are immediately available since 2.0, prior to that we need -# to call libtool --config explicitly -if test "x$shrext_cmds" = x; then - shrext_cmds=`SED=$SED ./libtool --config | grep '^shrext_cmds='` - eval $shrext_cmds -fi -eval std_shrext=$shrext_cmds -# chop the initial dot -SHLIB_SUFFIX=${std_shrext#.} -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: .$SHLIB_SUFFIX" >&5 -$as_echo ".$SHLIB_SUFFIX" >&6; } -# any reason it may fail? -if test "x$SHLIB_SUFFIX" = x; then - as_fn_error $? "Cannot determine shared library suffix from libtool" "$LINENO" 5 -fi - -cat >>confdefs.h <<_ACEOF -#define SHLIB_SUFFIX "$SHLIB_SUFFIX" -_ACEOF - - -# Copied from dbus configure.in -#### find the actual value for $prefix that we'll end up with -## (I know this is broken and should be done in the Makefile, but -## that's a major pain and almost nobody actually seems to care) - - EXP_VAR=EXPANDED_LOCALSTATEDIR - FROM_VAR="$localstatedir" - - prefix_save=$prefix - exec_prefix_save=$exec_prefix - - if test "x$prefix" = "xNONE"; then - prefix="$ac_default_prefix" - fi - if test "x$exec_prefix" = "xNONE"; then - exec_prefix=$prefix - fi - - full_var="$FROM_VAR" - while true; do - new_full_var="`eval echo $full_var`" - if test "x$new_full_var" = "x$full_var"; then break; fi - full_var=$new_full_var - done - - full_var=$new_full_var - EXPANDED_LOCALSTATEDIR="$full_var" - - - prefix=$prefix_save - exec_prefix=$exec_prefix_save - - - EXP_VAR=EXPANDED_SYSCONFDIR - FROM_VAR="$sysconfdir" - - prefix_save=$prefix - exec_prefix_save=$exec_prefix - - if test "x$prefix" = "xNONE"; then - prefix="$ac_default_prefix" - fi - if test "x$exec_prefix" = "xNONE"; then - exec_prefix=$prefix - fi - - full_var="$FROM_VAR" - while true; do - new_full_var="`eval echo $full_var`" - if test "x$new_full_var" = "x$full_var"; then break; fi - full_var=$new_full_var - done - - full_var=$new_full_var - EXPANDED_SYSCONFDIR="$full_var" - - - prefix=$prefix_save - exec_prefix=$exec_prefix_save - - - EXP_VAR=EXPANDED_BINDIR - FROM_VAR="$bindir" - - prefix_save=$prefix - exec_prefix_save=$exec_prefix - - if test "x$prefix" = "xNONE"; then - prefix="$ac_default_prefix" - fi - if test "x$exec_prefix" = "xNONE"; then - exec_prefix=$prefix - fi - - full_var="$FROM_VAR" - while true; do - new_full_var="`eval echo $full_var`" - if test "x$new_full_var" = "x$full_var"; then break; fi - full_var=$new_full_var - done - - full_var=$new_full_var - EXPANDED_BINDIR="$full_var" - - - prefix=$prefix_save - exec_prefix=$exec_prefix_save - - - EXP_VAR=EXPANDED_LIBDIR - FROM_VAR="$libdir" - - prefix_save=$prefix - exec_prefix_save=$exec_prefix - - if test "x$prefix" = "xNONE"; then - prefix="$ac_default_prefix" - fi - if test "x$exec_prefix" = "xNONE"; then - exec_prefix=$prefix - fi - - full_var="$FROM_VAR" - while true; do - new_full_var="`eval echo $full_var`" - if test "x$new_full_var" = "x$full_var"; then break; fi - full_var=$new_full_var - done - - full_var=$new_full_var - EXPANDED_LIBDIR="$full_var" - - - prefix=$prefix_save - exec_prefix=$exec_prefix_save - - - EXP_VAR=EXPANDED_LIBEXECDIR - FROM_VAR="$libexecdir" - - prefix_save=$prefix - exec_prefix_save=$exec_prefix - - if test "x$prefix" = "xNONE"; then - prefix="$ac_default_prefix" - fi - if test "x$exec_prefix" = "xNONE"; then - exec_prefix=$prefix - fi - - full_var="$FROM_VAR" - while true; do - new_full_var="`eval echo $full_var`" - if test "x$new_full_var" = "x$full_var"; then break; fi - full_var=$new_full_var - done - - full_var=$new_full_var - EXPANDED_LIBEXECDIR="$full_var" - - - prefix=$prefix_save - exec_prefix=$exec_prefix_save - - - EXP_VAR=EXPANDED_DATADIR - FROM_VAR="$datadir" - - prefix_save=$prefix - exec_prefix_save=$exec_prefix - - if test "x$prefix" = "xNONE"; then - prefix="$ac_default_prefix" - fi - if test "x$exec_prefix" = "xNONE"; then - exec_prefix=$prefix - fi - - full_var="$FROM_VAR" - while true; do - new_full_var="`eval echo $full_var`" - if test "x$new_full_var" = "x$full_var"; then break; fi - full_var=$new_full_var - done - - full_var=$new_full_var - EXPANDED_DATADIR="$full_var" - - - prefix=$prefix_save - exec_prefix=$exec_prefix_save - - -#### Directory to install the libexec binaries -GOBJECT_INTROSPECTION_LIBDIR="$EXPANDED_LIBDIR" - - -cat >>confdefs.h <<_ACEOF -#define GOBJECT_INTROSPECTION_LIBDIR "$GOBJECT_INTROSPECTION_LIBDIR" -_ACEOF - - -#### Directory to install the gir files -GIR_SUFFIX="gir-1.0" - - -cat >>confdefs.h <<_ACEOF -#define GIR_SUFFIX "$GIR_SUFFIX" -_ACEOF - - -GIR_DIR="$EXPANDED_DATADIR/$GIR_SUFFIX" - - -cat >>confdefs.h <<_ACEOF -#define GIR_DIR "$GIR_DIR" -_ACEOF - - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5 -$as_echo_n "checking for GLIB... " >&6; } - -if test -n "$GLIB_CFLAGS"; then - pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.56.1\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.56.1") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.56.1" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$GLIB_LIBS"; then - pkg_cv_GLIB_LIBS="$GLIB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.56.1\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.56.1") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.56.1" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.56.1" 2>&1` - else - GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.56.1" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GLIB_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (glib-2.0 >= 2.56.1) were not met: - -$GLIB_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables GLIB_CFLAGS -and GLIB_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GLIB_CFLAGS -and GLIB_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS - GLIB_LIBS=$pkg_cv_GLIB_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GOBJECT" >&5 -$as_echo_n "checking for GOBJECT... " >&6; } - -if test -n "$GOBJECT_CFLAGS"; then - pkg_cv_GOBJECT_CFLAGS="$GOBJECT_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gobject-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$GOBJECT_LIBS"; then - pkg_cv_GOBJECT_LIBS="$GOBJECT_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gobject-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GOBJECT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gobject-2.0" 2>&1` - else - GOBJECT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gobject-2.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GOBJECT_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (gobject-2.0) were not met: - -$GOBJECT_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables GOBJECT_CFLAGS -and GOBJECT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GOBJECT_CFLAGS -and GOBJECT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - GOBJECT_CFLAGS=$pkg_cv_GOBJECT_CFLAGS - GOBJECT_LIBS=$pkg_cv_GOBJECT_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMODULE" >&5 -$as_echo_n "checking for GMODULE... " >&6; } - -if test -n "$GMODULE_CFLAGS"; then - pkg_cv_GMODULE_CFLAGS="$GMODULE_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gmodule-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gmodule-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GMODULE_CFLAGS=`$PKG_CONFIG --cflags "gmodule-2.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$GMODULE_LIBS"; then - pkg_cv_GMODULE_LIBS="$GMODULE_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gmodule-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gmodule-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GMODULE_LIBS=`$PKG_CONFIG --libs "gmodule-2.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GMODULE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gmodule-2.0" 2>&1` - else - GMODULE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gmodule-2.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GMODULE_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (gmodule-2.0) were not met: - -$GMODULE_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables GMODULE_CFLAGS -and GMODULE_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GMODULE_CFLAGS -and GMODULE_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - GMODULE_CFLAGS=$pkg_cv_GMODULE_CFLAGS - GMODULE_LIBS=$pkg_cv_GMODULE_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIO" >&5 -$as_echo_n "checking for GIO... " >&6; } - -if test -n "$GIO_CFLAGS"; then - pkg_cv_GIO_CFLAGS="$GIO_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gio-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$GIO_LIBS"; then - pkg_cv_GIO_LIBS="$GIO_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gio-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gio-2.0" 2>&1` - else - GIO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gio-2.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GIO_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (gio-2.0) were not met: - -$GIO_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables GIO_CFLAGS -and GIO_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GIO_CFLAGS -and GIO_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - GIO_CFLAGS=$pkg_cv_GIO_CFLAGS - GIO_LIBS=$pkg_cv_GIO_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIO_UNIX" >&5 -$as_echo_n "checking for GIO_UNIX... " >&6; } - -if test -n "$GIO_UNIX_CFLAGS"; then - pkg_cv_GIO_UNIX_CFLAGS="$GIO_UNIX_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-unix-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gio-unix-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GIO_UNIX_CFLAGS=`$PKG_CONFIG --cflags "gio-unix-2.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$GIO_UNIX_LIBS"; then - pkg_cv_GIO_UNIX_LIBS="$GIO_UNIX_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-unix-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gio-unix-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GIO_UNIX_LIBS=`$PKG_CONFIG --libs "gio-unix-2.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GIO_UNIX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gio-unix-2.0" 2>&1` - else - GIO_UNIX_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gio-unix-2.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GIO_UNIX_PKG_ERRORS" >&5 - - have_gio_unix=false -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_gio_unix=false -else - GIO_UNIX_CFLAGS=$pkg_cv_GIO_UNIX_CFLAGS - GIO_UNIX_LIBS=$pkg_cv_GIO_UNIX_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_gio_unix=true -fi - if test x$have_gio_unix = xtrue; then - HAVE_GIO_UNIX_TRUE= - HAVE_GIO_UNIX_FALSE='#' -else - HAVE_GIO_UNIX_TRUE='#' - HAVE_GIO_UNIX_FALSE= -fi - - -# Prefer cairo-gobject if we have it - -# Check whether --with-cairo was given. -if test "${with_cairo+set}" = set; then : - withval=$with_cairo; -else - with_cairo=maybe -fi - - -if test x${with_cairo} != xno; then : - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAIRO" >&5 -$as_echo_n "checking for CAIRO... " >&6; } - -if test -n "$CAIRO_CFLAGS"; then - pkg_cv_CAIRO_CFLAGS="$CAIRO_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo cairo-gobject\""; } >&5 - ($PKG_CONFIG --exists --print-errors "cairo cairo-gobject") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo cairo-gobject" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$CAIRO_LIBS"; then - pkg_cv_CAIRO_LIBS="$CAIRO_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo cairo-gobject\""; } >&5 - ($PKG_CONFIG --exists --print-errors "cairo cairo-gobject") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo cairo-gobject" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "cairo cairo-gobject" 2>&1` - else - CAIRO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "cairo cairo-gobject" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$CAIRO_PKG_ERRORS" >&5 - - have_cairo=no -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_cairo=no -else - CAIRO_CFLAGS=$pkg_cv_CAIRO_CFLAGS - CAIRO_LIBS=$pkg_cv_CAIRO_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_cairo=yes -fi - if test x$have_cairo = xno && test x$with_cairo = xyes ; then : - - as_fn_error $? "cairo enabled but not found" "$LINENO" 5 - -fi - -fi - if test x$have_cairo = xyes; then - HAVE_CAIRO_TRUE= - HAVE_CAIRO_FALSE='#' -else - HAVE_CAIRO_TRUE='#' - HAVE_CAIRO_FALSE= -fi - - -case "$host" in - *-*-darwin*) - CAIRO_SHARED_LIBRARY="libcairo-gobject.2.dylib" - ;; - *-*-mingw*) - CAIRO_SHARED_LIBRARY="libcairo-gobject-2.dll" - ;; - *-*-openbsd*) - CAIRO_SHARED_LIBRARY="libcairo-gobject.so" - ;; - *) - CAIRO_SHARED_LIBRARY="libcairo-gobject.so.2" - ;; -esac -CAIRO_GIR_PACKAGE="cairo-gobject" - - - - - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SCANNER" >&5 -$as_echo_n "checking for SCANNER... " >&6; } - -if test -n "$SCANNER_CFLAGS"; then - pkg_cv_SCANNER_CFLAGS="$SCANNER_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0 gio-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gobject-2.0 gio-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SCANNER_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0 gio-2.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SCANNER_LIBS"; then - pkg_cv_SCANNER_LIBS="$SCANNER_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-2.0 gio-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gobject-2.0 gio-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SCANNER_LIBS=`$PKG_CONFIG --libs "gobject-2.0 gio-2.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SCANNER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gobject-2.0 gio-2.0" 2>&1` - else - SCANNER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gobject-2.0 gio-2.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SCANNER_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (gobject-2.0 gio-2.0) were not met: - -$SCANNER_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables SCANNER_CFLAGS -and SCANNER_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables SCANNER_CFLAGS -and SCANNER_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - SCANNER_CFLAGS=$pkg_cv_SCANNER_CFLAGS - SCANNER_LIBS=$pkg_cv_SCANNER_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFI" >&5 -$as_echo_n "checking for FFI... " >&6; } - -if test -n "$FFI_CFLAGS"; then - pkg_cv_FFI_CFLAGS="$FFI_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi >= 3.0.0 \""; } >&5 - ($PKG_CONFIG --exists --print-errors "libffi >= 3.0.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_FFI_CFLAGS=`$PKG_CONFIG --cflags "libffi >= 3.0.0 " 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$FFI_LIBS"; then - pkg_cv_FFI_LIBS="$FFI_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi >= 3.0.0 \""; } >&5 - ($PKG_CONFIG --exists --print-errors "libffi >= 3.0.0 ") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_FFI_LIBS=`$PKG_CONFIG --libs "libffi >= 3.0.0 " 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - FFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libffi >= 3.0.0 " 2>&1` - else - FFI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libffi >= 3.0.0 " 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$FFI_PKG_ERRORS" >&5 - - have_ffi_pkgconfig=no -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ffi_pkgconfig=no -else - FFI_CFLAGS=$pkg_cv_FFI_CFLAGS - FFI_LIBS=$pkg_cv_FFI_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_ffi_pkgconfig=yes -fi -FFI_PC_CFLAGS="" -FFI_PC_LIBS="" -FFI_PC_PACKAGES="" -if test x"$have_ffi_pkgconfig" = xyes ; then - FFI_PC_PACKAGES="libffi" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffi.h" >&5 -$as_echo_n "checking for ffi.h... " >&6; } - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - have_ffi_h=yes -else - have_ffi_h=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext - if test x"$have_ffi_h" = x"yes"; then - - save_LIBS=$LIBS - if test x"$with_ffi" = x"yes" || test x"$with_ffi" = x"auto"; then - other_LIBS= - else - other_LIBS=$with_ffi - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ffi_call" >&5 -$as_echo_n "checking for library containing ffi_call... " >&6; } -if ${ac_cv_search_ffi_call+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ffi_call (); -int -main () -{ -return ffi_call (); - ; - return 0; -} -_ACEOF -for ac_lib in '' ffi; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $other_LIBS $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_ffi_call=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_ffi_call+:} false; then : - break -fi -done -if ${ac_cv_search_ffi_call+:} false; then : - -else - ac_cv_search_ffi_call=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ffi_call" >&5 -$as_echo "$ac_cv_search_ffi_call" >&6; } -ac_res=$ac_cv_search_ffi_call -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - as_fn_error $? "libffi not found" "$LINENO" 5 -fi - - if test x"$ac_cv_search_ffi_call" = x"none required" ; then - FFI_LIBS=$other_LIBS - else - FFI_LIBS="$ac_cv_search_ffi_call $other_LIBS" - fi - - LIBS=$save_LIBS - fi - if test x"$have_ffi_h" != x"yes" ; then - as_fn_error $? "ffi.h not found" "$LINENO" 5 - fi - - FFI_PC_LIBS=$FFI_LIBS - FFI_PC_CFLAGS=$FFI_CFLAGS - FFI_CFLAGS= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ffi_h" >&5 -$as_echo "$have_ffi_h" >&6; } - - -fi - - - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 -$as_echo_n "checking size of char... " >&6; } -if ${ac_cv_sizeof_char+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_char" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (char) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_char=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 -$as_echo "$ac_cv_sizeof_char" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_CHAR $ac_cv_sizeof_char -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 -$as_echo_n "checking size of short... " >&6; } -if ${ac_cv_sizeof_short+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_short" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (short) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_short=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 -$as_echo "$ac_cv_sizeof_short" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SHORT $ac_cv_sizeof_short -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 -$as_echo_n "checking size of int... " >&6; } -if ${ac_cv_sizeof_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if ${ac_cv_sizeof_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF - - - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIREPO" >&5 -$as_echo_n "checking for GIREPO... " >&6; } - -if test -n "$GIREPO_CFLAGS"; then - pkg_cv_GIREPO_CFLAGS="$GIREPO_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GIREPO_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$GIREPO_LIBS"; then - pkg_cv_GIREPO_LIBS="$GIREPO_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GIREPO_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GIREPO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0" 2>&1` - else - GIREPO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GIREPO_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0) were not met: - -$GIREPO_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables GIREPO_CFLAGS -and GIREPO_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GIREPO_CFLAGS -and GIREPO_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - GIREPO_CFLAGS=$pkg_cv_GIREPO_CFLAGS - GIREPO_LIBS=$pkg_cv_GIREPO_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - -# if we ever remove manual check for ffi and require .pc file, then -# just put libffi in the PKG_CHECK_MODULES(GIREPO) deps -GIREPO_LIBS="$GIREPO_LIBS $GCOV_LIBS $FFI_LIBS" -GIREPO_CFLAGS="$GIREPO_CFLAGS $FFI_CFLAGS" - -GIREPO_CFLAGS="$GIREPO_CFLAGS $GCOV_CFLAGS" - -# gtk-doc -# gtkdocize greps for ^GTK_DOC_CHECK and parses it, so you need to have -# it on it's own line. - - - - - gtk_doc_requires="gtk-doc >= 1.19" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk-doc" >&5 -$as_echo_n "checking for gtk-doc... " >&6; } - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gtk_doc_requires\""; } >&5 - ($PKG_CONFIG --exists --print-errors "$gtk_doc_requires") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - have_gtk_doc=yes -else - have_gtk_doc=no -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gtk_doc" >&5 -$as_echo "$have_gtk_doc" >&6; } - - if test "$have_gtk_doc" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: - You will not be able to create source packages with 'make dist' - because $gtk_doc_requires is not found." >&5 -$as_echo "$as_me: WARNING: - You will not be able to create source packages with 'make dist' - because $gtk_doc_requires is not found." >&2;} - fi - - # Extract the first word of "gtkdoc-check", so it can be a program name with args. -set dummy gtkdoc-check; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_GTKDOC_CHECK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$GTKDOC_CHECK"; then - ac_cv_prog_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_GTKDOC_CHECK="gtkdoc-check.test" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -GTKDOC_CHECK=$ac_cv_prog_GTKDOC_CHECK -if test -n "$GTKDOC_CHECK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 -$as_echo "$GTKDOC_CHECK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - # Extract the first word of "gtkdoc-check", so it can be a program name with args. -set dummy gtkdoc-check; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GTKDOC_CHECK_PATH+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $GTKDOC_CHECK_PATH in - [\\/]* | ?:[\\/]*) - ac_cv_path_GTKDOC_CHECK_PATH="$GTKDOC_CHECK_PATH" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GTKDOC_CHECK_PATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -GTKDOC_CHECK_PATH=$ac_cv_path_GTKDOC_CHECK_PATH -if test -n "$GTKDOC_CHECK_PATH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK_PATH" >&5 -$as_echo "$GTKDOC_CHECK_PATH" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - for ac_prog in gtkdoc-rebase -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GTKDOC_REBASE+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $GTKDOC_REBASE in - [\\/]* | ?:[\\/]*) - ac_cv_path_GTKDOC_REBASE="$GTKDOC_REBASE" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GTKDOC_REBASE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -GTKDOC_REBASE=$ac_cv_path_GTKDOC_REBASE -if test -n "$GTKDOC_REBASE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_REBASE" >&5 -$as_echo "$GTKDOC_REBASE" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$GTKDOC_REBASE" && break -done -test -n "$GTKDOC_REBASE" || GTKDOC_REBASE="true" - - # Extract the first word of "gtkdoc-mkpdf", so it can be a program name with args. -set dummy gtkdoc-mkpdf; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GTKDOC_MKPDF+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $GTKDOC_MKPDF in - [\\/]* | ?:[\\/]*) - ac_cv_path_GTKDOC_MKPDF="$GTKDOC_MKPDF" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GTKDOC_MKPDF="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -GTKDOC_MKPDF=$ac_cv_path_GTKDOC_MKPDF -if test -n "$GTKDOC_MKPDF"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_MKPDF" >&5 -$as_echo "$GTKDOC_MKPDF" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# Check whether --with-html-dir was given. -if test "${with_html_dir+set}" = set; then : - withval=$with_html_dir; -else - with_html_dir='${datadir}/gtk-doc/html' -fi - - HTML_DIR="$with_html_dir" - - - # Check whether --enable-gtk-doc was given. -if test "${enable_gtk_doc+set}" = set; then : - enableval=$enable_gtk_doc; -else - enable_gtk_doc=no -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 -$as_echo_n "checking whether to build gtk-doc documentation... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 -$as_echo "$enable_gtk_doc" >&6; } - - if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then - as_fn_error $? " - You must have $gtk_doc_requires installed to build documentation for - $PACKAGE_NAME. Please install gtk-doc or disable building the - documentation by adding '--disable-gtk-doc' to '$0'." "$LINENO" 5 - fi - - if test "x$PACKAGE_NAME" != "xglib"; then - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKDOC_DEPS" >&5 -$as_echo_n "checking for GTKDOC_DEPS... " >&6; } - -if test -n "$GTKDOC_DEPS_CFLAGS"; then - pkg_cv_GTKDOC_DEPS_CFLAGS="$GTKDOC_DEPS_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GTKDOC_DEPS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$GTKDOC_DEPS_LIBS"; then - pkg_cv_GTKDOC_DEPS_LIBS="$GTKDOC_DEPS_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GTKDOC_DEPS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1` - else - GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GTKDOC_DEPS_PKG_ERRORS" >&5 - - : -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - : -else - GTKDOC_DEPS_CFLAGS=$pkg_cv_GTKDOC_DEPS_CFLAGS - GTKDOC_DEPS_LIBS=$pkg_cv_GTKDOC_DEPS_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - fi - - # Check whether --enable-gtk-doc-html was given. -if test "${enable_gtk_doc_html+set}" = set; then : - enableval=$enable_gtk_doc_html; -else - enable_gtk_doc_html=yes -fi - - # Check whether --enable-gtk-doc-pdf was given. -if test "${enable_gtk_doc_pdf+set}" = set; then : - enableval=$enable_gtk_doc_pdf; -else - enable_gtk_doc_pdf=no -fi - - - if test -z "$GTKDOC_MKPDF"; then - enable_gtk_doc_pdf=no - fi - - if test -z "$AM_DEFAULT_VERBOSITY"; then - AM_DEFAULT_VERBOSITY=1 - fi - - - if test x$have_gtk_doc = xyes; then - HAVE_GTK_DOC_TRUE= - HAVE_GTK_DOC_FALSE='#' -else - HAVE_GTK_DOC_TRUE='#' - HAVE_GTK_DOC_FALSE= -fi - - if test x$enable_gtk_doc = xyes; then - ENABLE_GTK_DOC_TRUE= - ENABLE_GTK_DOC_FALSE='#' -else - ENABLE_GTK_DOC_TRUE='#' - ENABLE_GTK_DOC_FALSE= -fi - - if test x$enable_gtk_doc_html = xyes; then - GTK_DOC_BUILD_HTML_TRUE= - GTK_DOC_BUILD_HTML_FALSE='#' -else - GTK_DOC_BUILD_HTML_TRUE='#' - GTK_DOC_BUILD_HTML_FALSE= -fi - - if test x$enable_gtk_doc_pdf = xyes; then - GTK_DOC_BUILD_PDF_TRUE= - GTK_DOC_BUILD_PDF_FALSE='#' -else - GTK_DOC_BUILD_PDF_TRUE='#' - GTK_DOC_BUILD_PDF_FALSE= -fi - - if test -n "$LIBTOOL"; then - GTK_DOC_USE_LIBTOOL_TRUE= - GTK_DOC_USE_LIBTOOL_FALSE='#' -else - GTK_DOC_USE_LIBTOOL_TRUE='#' - GTK_DOC_USE_LIBTOOL_FALSE= -fi - - if test -n "$GTKDOC_REBASE"; then - GTK_DOC_USE_REBASE_TRUE= - GTK_DOC_USE_REBASE_FALSE='#' -else - GTK_DOC_USE_REBASE_TRUE='#' - GTK_DOC_USE_REBASE_FALSE= -fi - - - - -# Checks for header files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -for ac_header in fcntl.h stdlib.h string.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -# Checks for typedefs, structures, and compiler characteristics. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#ifndef __cplusplus - /* Ultrix mips cc rejects this sort of thing. */ - typedef int charset[2]; - const charset cs = { 0, 0 }; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this sort of thing. */ - char tx; - char *t = &tx; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; } bx; - struct s *b = &bx; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - - -# Checks for library functions. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5 -$as_echo_n "checking for working strtod... " >&6; } -if ${ac_cv_func_strtod+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_strtod=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -$ac_includes_default -#ifndef strtod -double strtod (); -#endif -int -main() -{ - { - /* Some versions of Linux strtod mis-parse strings with leading '+'. */ - char *string = " +69"; - char *term; - double value; - value = strtod (string, &term); - if (value != 69 || term != (string + 4)) - return 1; - } - - { - /* Under Solaris 2.4, strtod returns the wrong value for the - terminating character under some conditions. */ - char *string = "NaN"; - char *term; - strtod (string, &term); - if (term != string && *(term - 1) == 0) - return 1; - } - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_strtod=yes -else - ac_cv_func_strtod=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5 -$as_echo "$ac_cv_func_strtod" >&6; } -if test $ac_cv_func_strtod = no; then - case " $LIBOBJS " in - *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" - ;; -esac - -ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" -if test "x$ac_cv_func_pow" = xyes; then : - -fi - -if test $ac_cv_func_pow = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 -$as_echo_n "checking for pow in -lm... " >&6; } -if ${ac_cv_lib_m_pow+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pow (); -int -main () -{ -return pow (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_pow=yes -else - ac_cv_lib_m_pow=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 -$as_echo "$ac_cv_lib_m_pow" >&6; } -if test "x$ac_cv_lib_m_pow" = xyes; then : - POW_LIB=-lm -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 -$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;} -fi - -fi - -fi - -for ac_func in memchr strchr strspn strstr strtol strtoull -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -for ac_func in backtrace backtrace_symbols -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -# Python -# option to specify python interpreter to use; this just sets $PYTHON, so that -# we will fallback to reading $PYTHON if --with-python is not given, and -# python.m4 will get the expected input - -# Check whether --with-python was given. -if test "${with_python+set}" = set; then : - withval=$with_python; PYTHON="$withval" -fi - -if test x"$PYTHON" = xyes; then - as_fn_error $? "--with-python option requires a path or program argument" "$LINENO" 5 -fi -if test -n "$PYTHON" && ! which "$PYTHON"; then - as_fn_error $? "Python interpreter $PYTHON does not exist" "$LINENO" 5 -fi - - - - - - - - if test -n "$PYTHON"; then - # If the user set $PYTHON, use it and don't search something else. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 2.7" >&5 -$as_echo_n "checking whether $PYTHON version is >= 2.7... " >&6; } - prog="import sys -# split strings by '.' and convert to numeric. Append some zeros -# because we need at least 4 digits for the hex conversion. -# map returns an iterator in Python 3.0 and a list in 2.x -minver = list(map(int, '2.7'.split('.'))) + [0, 0, 0] -minverhex = 0 -# xrange is not present in Python 3.0 and range returns an iterator -for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] -sys.exit(sys.hexversion < minverhex)" - if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 - ($PYTHON -c "$prog") >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "Python interpreter is too old" "$LINENO" 5 -fi - am_display_PYTHON=$PYTHON - else - # Otherwise, try each interpreter until we find one that satisfies - # VERSION. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.7" >&5 -$as_echo_n "checking for a Python interpreter with version >= 2.7... " >&6; } -if ${am_cv_pathless_PYTHON+:} false; then : - $as_echo_n "(cached) " >&6 -else - - for am_cv_pathless_PYTHON in python python2 python3 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do - test "$am_cv_pathless_PYTHON" = none && break - prog="import sys -# split strings by '.' and convert to numeric. Append some zeros -# because we need at least 4 digits for the hex conversion. -# map returns an iterator in Python 3.0 and a list in 2.x -minver = list(map(int, '2.7'.split('.'))) + [0, 0, 0] -minverhex = 0 -# xrange is not present in Python 3.0 and range returns an iterator -for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] -sys.exit(sys.hexversion < minverhex)" - if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 - ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then : - break -fi - done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 -$as_echo "$am_cv_pathless_PYTHON" >&6; } - # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. - if test "$am_cv_pathless_PYTHON" = none; then - PYTHON=: - else - # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. -set dummy $am_cv_pathless_PYTHON; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PYTHON+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PYTHON in - [\\/]* | ?:[\\/]*) - ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PYTHON=$ac_cv_path_PYTHON -if test -n "$PYTHON"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 -$as_echo "$PYTHON" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi - am_display_PYTHON=$am_cv_pathless_PYTHON - fi - - - if test "$PYTHON" = :; then - as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5 - else - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 -$as_echo_n "checking for $am_display_PYTHON version... " >&6; } -if ${am_cv_python_version+:} false; then : - $as_echo_n "(cached) " >&6 -else - am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 -$as_echo "$am_cv_python_version" >&6; } - PYTHON_VERSION=$am_cv_python_version - - - - PYTHON_PREFIX='${prefix}' - - PYTHON_EXEC_PREFIX='${exec_prefix}' - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 -$as_echo_n "checking for $am_display_PYTHON platform... " >&6; } -if ${am_cv_python_platform+:} false; then : - $as_echo_n "(cached) " >&6 -else - am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 -$as_echo "$am_cv_python_platform" >&6; } - PYTHON_PLATFORM=$am_cv_python_platform - - - # Just factor out some code duplication. - am_python_setup_sysconfig="\ -import sys -# Prefer sysconfig over distutils.sysconfig, for better compatibility -# with python 3.x. See automake bug#10227. -try: - import sysconfig -except ImportError: - can_use_sysconfig = 0 -else: - can_use_sysconfig = 1 -# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: -# -try: - from platform import python_implementation - if python_implementation() == 'CPython' and sys.version[:3] == '2.7': - can_use_sysconfig = 0 -except ImportError: - pass" - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 -$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } -if ${am_cv_python_pythondir+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$prefix" = xNONE - then - am_py_prefix=$ac_default_prefix - else - am_py_prefix=$prefix - fi - am_cv_python_pythondir=`$PYTHON -c " -$am_python_setup_sysconfig -if can_use_sysconfig: - sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) -else: - from distutils import sysconfig - sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') -sys.stdout.write(sitedir)"` - case $am_cv_python_pythondir in - $am_py_prefix*) - am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` - am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` - ;; - *) - case $am_py_prefix in - /usr|/System*) ;; - *) - am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages - ;; - esac - ;; - esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 -$as_echo "$am_cv_python_pythondir" >&6; } - pythondir=$am_cv_python_pythondir - - - - pkgpythondir=\${pythondir}/$PACKAGE - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 -$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } -if ${am_cv_python_pyexecdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$exec_prefix" = xNONE - then - am_py_exec_prefix=$am_py_prefix - else - am_py_exec_prefix=$exec_prefix - fi - am_cv_python_pyexecdir=`$PYTHON -c " -$am_python_setup_sysconfig -if can_use_sysconfig: - sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) -else: - from distutils import sysconfig - sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') -sys.stdout.write(sitedir)"` - case $am_cv_python_pyexecdir in - $am_py_exec_prefix*) - am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` - am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` - ;; - *) - case $am_py_exec_prefix in - /usr|/System*) ;; - *) - am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages - ;; - esac - ;; - esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 -$as_echo "$am_cv_python_pyexecdir" >&6; } - pyexecdir=$am_cv_python_pyexecdir - - - - pkgpyexecdir=\${pyexecdir}/$PACKAGE - - - - fi - - -case "$host" in -*-*-mingw*) - # Change backslashes to forward slashes in pyexecdir to avoid - # quoting issues - pyexecdir=`echo $pyexecdir | tr '\\\\' '/'` - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for headers required to compile python extensions" >&5 -$as_echo_n "checking for headers required to compile python extensions... " >&6; } -PYTHON_INCLUDES=`$PYTHON-config --includes` - -save_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } -as_fn_error $? "Python headers not found" "$LINENO" 5 -fi -rm -f conftest.err conftest.i conftest.$ac_ext -CPPFLAGS="$save_CPPFLAGS" - -if test "x$os_win32" = "xyes"; then - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libraries required to link against libpython" >&5 -$as_echo_n "checking for libraries required to link against libpython... " >&6; } -if test "x$PYTHON_LIBS" = x; then - PYTHON_LIBS=`$PYTHON-config --ldflags --libs` -fi - -save_LIBS="$LIBS" -LIBS="$LIBS $PYTHON_LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char Py_Initialize (); -int -main () -{ -return Py_Initialize (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - LIBS="$save_LIBS"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; }; -else - LIBS="$save_LIBS"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; }; as_fn_error $? "Python libs not found. Windows requires Python modules to be explicitly linked to libpython." "$LINENO" 5 -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -fi - -# Check whether --enable-doctool was given. -if test "${enable_doctool+set}" = set; then : - enableval=$enable_doctool; -else - enable_doctool=auto -fi - -if test x$enable_doctool != xno; then : - - -py_mod_var=`echo mako'_' | sed 'y%./+-%__p_%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python module mako" >&5 -$as_echo_n "checking for python module mako... " >&6; } -if eval \${py_cv_mod_$py_mod_var+:} false; then : - $as_echo_n "(cached) " >&6 -else - -prog=" -import sys -try: - import mako -except ImportError: - sys.exit(1) -except: - sys.exit(0) -sys.exit(0)" -if $PYTHON -c "$prog" 1>&5 2>&5 - then - eval "py_cv_mod_$py_mod_var=yes" - else - eval "py_cv_mod_$py_mod_var=no" - fi - -fi - -py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"` -if test "x$py_val" != xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_python_mako=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_python_mako=no -fi - - -fi -if test x$enable_doctool = xauto && test x$have_python_mako = xyes ; then : - enable_doctool=yes -elif test x$enable_doctool = xauto && test x$have_python_mako = xno ; then : - enable_doctool=no -elif test x$enable_doctool = xyes && test x$have_python_mako = xno ; then : - as_fn_error $? "Python mako module not found" "$LINENO" 5 -fi - if test x$enable_doctool != xno; then - BUILD_DOCTOOL_TRUE= - BUILD_DOCTOOL_FALSE='#' -else - BUILD_DOCTOOL_TRUE='#' - BUILD_DOCTOOL_FALSE= -fi - - -# Glib documentation - -GLIBSRC= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glib source directory to use for documentation" >&5 -$as_echo_n "checking for glib source directory to use for documentation... " >&6; } - - -# Check whether --with-glib-src was given. -if test "${with_glib_src+set}" = set; then : - withval=$with_glib_src; GLIBSRC=$withval - -fi - - if test x"$GLIBSRC" != x; then - WITH_GLIBSRC_TRUE= - WITH_GLIBSRC_FALSE='#' -else - WITH_GLIBSRC_TRUE='#' - WITH_GLIBSRC_FALSE= -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIBSRC" >&5 -$as_echo "$GLIBSRC" >&6; } - -GI_HIDDEN_VISIBILITY_CFLAGS="" -case "$host" in - *-*-mingw*) - -$as_echo "#define _GI_EXTERN __attribute__((visibility(\"default\"))) __declspec(dllexport) extern" >>confdefs.h - - CFLAGS="${CFLAGS} -fvisibility=hidden" - ;; - *) - SAVED_CFLAGS="${CFLAGS}" - CFLAGS="-fvisibility=hidden" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fvisibility=hidden compiler flag" >&5 -$as_echo_n "checking for -fvisibility=hidden compiler flag... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -return 0 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - enable_fvisibility_hidden=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - enable_fvisibility_hidden=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="${SAVED_CFLAGS}" - - if test "${enable_fvisibility_hidden}" = "yes"; then : - - -$as_echo "#define _GI_EXTERN __attribute__((visibility(\"default\"))) extern" >>confdefs.h - - GI_HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden" - -fi - ;; -esac - - -# Check whether --enable-Bsymbolic was given. -if test "${enable_Bsymbolic+set}" = set; then : - enableval=$enable_Bsymbolic; -else - SAVED_LDFLAGS="${LDFLAGS}" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Bsymbolic-functions linker flag" >&5 -$as_echo_n "checking for -Bsymbolic-functions linker flag... " >&6; } - LDFLAGS=-Wl,-Bsymbolic-functions - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -return 0 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - enable_Bsymbolic=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - enable_Bsymbolic=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="${SAVED_LDFLAGS}" -fi - - -if test "x${enable_Bsymbolic}" = "xyes"; then - EXTRA_LINK_FLAGS=-Wl,-Bsymbolic-functions -fi - - - - if test x$MSVC_BASE_TOOLSET = x; then - MSVC_BASE_NO_TOOLSET_SET_TRUE= - MSVC_BASE_NO_TOOLSET_SET_FALSE='#' -else - MSVC_BASE_NO_TOOLSET_SET_TRUE='#' - MSVC_BASE_NO_TOOLSET_SET_FALSE= -fi - - if test x$MSVC_TOOLSET = x; then - MSVC_NO_TOOLSET_SET_TRUE= - MSVC_NO_TOOLSET_SET_FALSE='#' -else - MSVC_NO_TOOLSET_SET_TRUE='#' - MSVC_NO_TOOLSET_SET_FALSE= -fi - - -ac_config_files="$ac_config_files Makefile tests/Makefile tests/offsets/Makefile tests/scanner/Makefile tests/scanner/annotationparser/Makefile tests/repository/Makefile tests/warn/Makefile docs/Makefile docs/reference/Makefile docs/reference/version.xml gobject-introspection-1.0.pc gobject-introspection-no-export-1.0.pc config.h.win32 win32/Makefile win32/vs9/Makefile win32/vs9/gi-version-paths.vsprops win32/vs10/Makefile win32/vs10/gi-version-paths.props win32/vs11/Makefile win32/vs12/Makefile win32/vs14/Makefile win32/vs15/Makefile" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${OS_WIN32_TRUE}" && test -z "${OS_WIN32_FALSE}"; then - as_fn_error $? "conditional \"OS_WIN32\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_GIO_UNIX_TRUE}" && test -z "${HAVE_GIO_UNIX_FALSE}"; then - as_fn_error $? "conditional \"HAVE_GIO_UNIX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_CAIRO_TRUE}" && test -z "${HAVE_CAIRO_FALSE}"; then - as_fn_error $? "conditional \"HAVE_CAIRO\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_GTK_DOC_TRUE}" && test -z "${HAVE_GTK_DOC_FALSE}"; then - as_fn_error $? "conditional \"HAVE_GTK_DOC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then - as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${GTK_DOC_BUILD_HTML_TRUE}" && test -z "${GTK_DOC_BUILD_HTML_FALSE}"; then - as_fn_error $? "conditional \"GTK_DOC_BUILD_HTML\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${GTK_DOC_BUILD_PDF_TRUE}" && test -z "${GTK_DOC_BUILD_PDF_FALSE}"; then - as_fn_error $? "conditional \"GTK_DOC_BUILD_PDF\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then - as_fn_error $? "conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${GTK_DOC_USE_REBASE_TRUE}" && test -z "${GTK_DOC_USE_REBASE_FALSE}"; then - as_fn_error $? "conditional \"GTK_DOC_USE_REBASE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILD_DOCTOOL_TRUE}" && test -z "${BUILD_DOCTOOL_FALSE}"; then - as_fn_error $? "conditional \"BUILD_DOCTOOL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_GLIBSRC_TRUE}" && test -z "${WITH_GLIBSRC_FALSE}"; then - as_fn_error $? "conditional \"WITH_GLIBSRC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${MSVC_BASE_NO_TOOLSET_SET_TRUE}" && test -z "${MSVC_BASE_NO_TOOLSET_SET_FALSE}"; then - as_fn_error $? "conditional \"MSVC_BASE_NO_TOOLSET_SET\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${MSVC_NO_TOOLSET_SET_TRUE}" && test -z "${MSVC_NO_TOOLSET_SET_FALSE}"; then - as_fn_error $? "conditional \"MSVC_NO_TOOLSET_SET\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by gobject-introspection $as_me 1.56.1, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -gobject-introspection config.status 1.56.1 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' -configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SHELL \ -ECHO \ -PATH_SEPARATOR \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -DLLTOOL \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_import \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -lt_cv_nm_interface \ -nm_file_list_spec \ -lt_cv_truncate_bin \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -configure_time_dlsearch_path \ -configure_time_lt_sys_library_path; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' - -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - RM='$RM' - ofile='$ofile' - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - "tests/offsets/Makefile") CONFIG_FILES="$CONFIG_FILES tests/offsets/Makefile" ;; - "tests/scanner/Makefile") CONFIG_FILES="$CONFIG_FILES tests/scanner/Makefile" ;; - "tests/scanner/annotationparser/Makefile") CONFIG_FILES="$CONFIG_FILES tests/scanner/annotationparser/Makefile" ;; - "tests/repository/Makefile") CONFIG_FILES="$CONFIG_FILES tests/repository/Makefile" ;; - "tests/warn/Makefile") CONFIG_FILES="$CONFIG_FILES tests/warn/Makefile" ;; - "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; - "docs/reference/Makefile") CONFIG_FILES="$CONFIG_FILES docs/reference/Makefile" ;; - "docs/reference/version.xml") CONFIG_FILES="$CONFIG_FILES docs/reference/version.xml" ;; - "gobject-introspection-1.0.pc") CONFIG_FILES="$CONFIG_FILES gobject-introspection-1.0.pc" ;; - "gobject-introspection-no-export-1.0.pc") CONFIG_FILES="$CONFIG_FILES gobject-introspection-no-export-1.0.pc" ;; - "config.h.win32") CONFIG_FILES="$CONFIG_FILES config.h.win32" ;; - "win32/Makefile") CONFIG_FILES="$CONFIG_FILES win32/Makefile" ;; - "win32/vs9/Makefile") CONFIG_FILES="$CONFIG_FILES win32/vs9/Makefile" ;; - "win32/vs9/gi-version-paths.vsprops") CONFIG_FILES="$CONFIG_FILES win32/vs9/gi-version-paths.vsprops" ;; - "win32/vs10/Makefile") CONFIG_FILES="$CONFIG_FILES win32/vs10/Makefile" ;; - "win32/vs10/gi-version-paths.props") CONFIG_FILES="$CONFIG_FILES win32/vs10/gi-version-paths.props" ;; - "win32/vs11/Makefile") CONFIG_FILES="$CONFIG_FILES win32/vs11/Makefile" ;; - "win32/vs12/Makefile") CONFIG_FILES="$CONFIG_FILES win32/vs12/Makefile" ;; - "win32/vs14/Makefile") CONFIG_FILES="$CONFIG_FILES win32/vs14/Makefile" ;; - "win32/vs15/Makefile") CONFIG_FILES="$CONFIG_FILES win32/vs15/Makefile" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -# The names of the tagged configurations supported by this script. -available_tags='' - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shared archive member basename,for filename based shared library versioning on AIX. -shared_archive_member_spec=$shared_archive_member_spec - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The PATH separator for the build system. -PATH_SEPARATOR=$lt_PATH_SEPARATOR - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm into a list of symbols to manually relocate. -global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name lister interface. -nm_interface=$lt_lt_cv_nm_interface - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and where our libraries should be installed. -lt_sysroot=$lt_sysroot - -# Command to truncate a binary pipe. -lt_truncate_bin=$lt_lt_cv_truncate_bin - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Detected run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path - -# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. -configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain=$ac_aux_dir/ltmain.sh - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff -Nru gobject-introspection-1.56.1/configure.ac gobject-introspection-1.64.1/configure.ac --- gobject-introspection-1.56.1/configure.ac 2018-04-09 06:11:35.000000000 +0000 +++ gobject-introspection-1.64.1/configure.ac 1970-01-01 00:00:00.000000000 +0000 @@ -1,393 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -dnl the gi version number -m4_define(gi_major_version, 1) -m4_define(gi_minor_version, 56) -m4_define(gi_micro_version, 1) -m4_define(gi_version, gi_major_version.gi_minor_version.gi_micro_version) - -AC_PREREQ([2.63]) -AC_INIT([gobject-introspection], - [gi_version], - [http://bugzilla.gnome.org/enter_bug.cgi?product=gobject-introspection], - [gobject-introspection]) - -AC_CONFIG_HEADER([config.h]) -AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_AUX_DIR([build-aux]) - -AM_INIT_AUTOMAKE([1.11 tar-ustar dist-xz no-dist-gzip foreign -Wno-portability parallel-tests subdir-objects]) -AM_MAINTAINER_MODE([enable]) - -AM_SILENT_RULES([yes]) - -# Used in docs/reference/version.xml -GI_VERSION=gi_version -AC_SUBST(GI_VERSION) - -# Check for Win32 -AC_CANONICAL_HOST -case "$host" in -*-*-mingw*) - os_win32=yes - ;; -*) - os_win32=no - ;; -esac -AM_CONDITIONAL(OS_WIN32, [test "x$os_win32" = "xyes"]) - -# Checks for programs. -AC_PROG_CC -AM_PROG_CC_C_O -AC_PROG_MKDIR_P - -# Initialize libtool -LT_PREREQ([2.2]) -LT_INIT - -PKG_PROG_PKG_CONFIG - -AC_PROG_LEX -if test "$LEX" = :; then - AC_MSG_ERROR([flex not found but required]) -fi - -AC_CHECK_PROGS(YACC, 'bison -y', :) -if test "$YACC" = :; then - AC_MSG_ERROR([bison not found but required]) -fi - - -changequote(,)dnl -ensureflag() { - flag="$1"; shift - result="$@" - - case " ${result} " in - *[\ \ ]${flag}[\ \ ]*) ;; - *) result="${flag} ${result}" ;; - esac - - echo ${result} -} -changequote([,])dnl - -if test "$GCC" = "yes"; then - for flag in -Wall -Wchar-subscripts -Wmissing-declarations \ - -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align \ - -Wsign-compare -fno-strict-aliasing; - do - CFLAGS="$(ensureflag $flag $CFLAGS)" - done -fi - -# Checks for libraries. -AC_CHECK_LIB([dl], [dlopen]) - -AC_MSG_CHECKING(for the suffix of shared libraries) -# libtool variables are immediately available since 2.0, prior to that we need -# to call libtool --config explicitly -if test "x$shrext_cmds" = x; then - shrext_cmds=`SED=$SED ./libtool --config | grep '^shrext_cmds='` - eval $shrext_cmds -fi -eval std_shrext=$shrext_cmds -# chop the initial dot -SHLIB_SUFFIX=${std_shrext#.} -AC_MSG_RESULT(.$SHLIB_SUFFIX) -# any reason it may fail? -if test "x$SHLIB_SUFFIX" = x; then - AC_MSG_ERROR(Cannot determine shared library suffix from libtool) -fi -AC_DEFINE_UNQUOTED([SHLIB_SUFFIX], "$SHLIB_SUFFIX", [Define to the platform's shared library suffix]) - -# Copied from dbus configure.in -#### find the actual value for $prefix that we'll end up with -## (I know this is broken and should be done in the Makefile, but -## that's a major pain and almost nobody actually seems to care) -AS_AC_EXPAND(EXPANDED_LOCALSTATEDIR, "$localstatedir") -AS_AC_EXPAND(EXPANDED_SYSCONFDIR, "$sysconfdir") -AS_AC_EXPAND(EXPANDED_BINDIR, "$bindir") -AS_AC_EXPAND(EXPANDED_LIBDIR, "$libdir") -AS_AC_EXPAND(EXPANDED_LIBEXECDIR, "$libexecdir") -AS_AC_EXPAND(EXPANDED_DATADIR, "$datadir") - -#### Directory to install the libexec binaries -GOBJECT_INTROSPECTION_LIBDIR="$EXPANDED_LIBDIR" -AC_SUBST(GOBJECT_INTROSPECTION_LIBDIR) -AC_DEFINE_UNQUOTED(GOBJECT_INTROSPECTION_LIBDIR,"$GOBJECT_INTROSPECTION_LIBDIR", [Directory prefix for typelib installation]) - -#### Directory to install the gir files -GIR_SUFFIX="gir-1.0" -AC_SUBST(GIR_SUFFIX) -AC_DEFINE_UNQUOTED(GIR_SUFFIX, "$GIR_SUFFIX", [Name of the gir directory]) - -GIR_DIR="$EXPANDED_DATADIR/$GIR_SUFFIX" -AC_SUBST(GIR_DIR) -AC_DEFINE_UNQUOTED(GIR_DIR, "$GIR_DIR", [Director prefix for gir installation]) - -PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.56.1]) - -PKG_CHECK_MODULES(GOBJECT, [gobject-2.0]) -PKG_CHECK_MODULES(GMODULE, [gmodule-2.0]) -PKG_CHECK_MODULES(GIO, [gio-2.0]) -PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0], have_gio_unix=true, have_gio_unix=false) -AM_CONDITIONAL(HAVE_GIO_UNIX, test x$have_gio_unix = xtrue) - -# Prefer cairo-gobject if we have it -AC_ARG_WITH(cairo, - AS_HELP_STRING([--with-cairo], [Use cairo @<:@default=maybe@:>@]), - [], [with_cairo=maybe]) - -AS_IF([test x${with_cairo} != xno], [ - PKG_CHECK_MODULES(CAIRO, [cairo cairo-gobject], have_cairo=yes, have_cairo=no) - AS_IF([ test x$have_cairo = xno && test x$with_cairo = xyes ], [ - AC_MSG_ERROR([cairo enabled but not found]) - ]) -]) -AM_CONDITIONAL(HAVE_CAIRO, test x$have_cairo = xyes) - -case "$host" in - *-*-darwin*) - CAIRO_SHARED_LIBRARY="libcairo-gobject.2.dylib" - ;; - *-*-mingw*) - CAIRO_SHARED_LIBRARY="libcairo-gobject-2.dll" - ;; - *-*-openbsd*) - CAIRO_SHARED_LIBRARY="libcairo-gobject.so" - ;; - *) - CAIRO_SHARED_LIBRARY="libcairo-gobject.so.2" - ;; -esac -CAIRO_GIR_PACKAGE="cairo-gobject" - -AC_SUBST(CAIRO_SHARED_LIBRARY) -AC_SUBST(CAIRO_GIR_PACKAGE) - - -PKG_CHECK_MODULES(SCANNER, [gobject-2.0 gio-2.0]) - -dnl libffi -PKG_CHECK_MODULES(FFI, [libffi >= 3.0.0 ], have_ffi_pkgconfig=yes, have_ffi_pkgconfig=no) -FFI_PC_CFLAGS="" -FFI_PC_LIBS="" -FFI_PC_PACKAGES="" -if test x"$have_ffi_pkgconfig" = xyes ; then - FFI_PC_PACKAGES="libffi" -else - AC_MSG_CHECKING(for ffi.h) - - AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include ]])], - [have_ffi_h=yes],[have_ffi_h=no]) - if test x"$have_ffi_h" = x"yes"; then - - save_LIBS=$LIBS - if test x"$with_ffi" = x"yes" || test x"$with_ffi" = x"auto"; then - other_LIBS= - else - other_LIBS=$with_ffi - fi - - AC_SEARCH_LIBS(ffi_call,ffi,,AC_MSG_ERROR([libffi not found]),$other_LIBS) - if test x"$ac_cv_search_ffi_call" = x"none required" ; then - FFI_LIBS=$other_LIBS - else - FFI_LIBS="$ac_cv_search_ffi_call $other_LIBS" - fi - - LIBS=$save_LIBS - fi - if test x"$have_ffi_h" != x"yes" ; then - AC_MSG_ERROR([ffi.h not found]) - fi - - FFI_PC_LIBS=$FFI_LIBS - FFI_PC_CFLAGS=$FFI_CFLAGS - FFI_CFLAGS= - AC_MSG_RESULT([$have_ffi_h]) - AC_SUBST(FFI_LIBS) - AC_SUBST(FFI_CFLAGS) -fi -AC_SUBST(FFI_PC_CFLAGS) -AC_SUBST(FFI_PC_LIBS) -AC_SUBST(FFI_PC_PACKAGES) - -AC_CHECK_SIZEOF(char) -AC_CHECK_SIZEOF(short) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long) - -PKG_CHECK_MODULES(GIREPO, [glib-2.0 >= 2.24.0 gobject-2.0 gmodule-2.0 gio-2.0]) - -# if we ever remove manual check for ffi and require .pc file, then -# just put libffi in the PKG_CHECK_MODULES(GIREPO) deps -GIREPO_LIBS="$GIREPO_LIBS $GCOV_LIBS $FFI_LIBS" -GIREPO_CFLAGS="$GIREPO_CFLAGS $FFI_CFLAGS" - -GIREPO_CFLAGS="$GIREPO_CFLAGS $GCOV_CFLAGS" - -# gtk-doc -# gtkdocize greps for ^GTK_DOC_CHECK and parses it, so you need to have -# it on it's own line. -m4_ifdef([GTK_DOC_CHECK], [ -GTK_DOC_CHECK([1.19], [--flavour no-tmpl]) -],[ -AM_CONDITIONAL([ENABLE_GTK_DOC],[false]) -]) - -# Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS([fcntl.h stdlib.h string.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST - -# Checks for library functions. -AC_FUNC_STRTOD -AC_CHECK_FUNCS([memchr strchr strspn strstr strtol strtoull]) -AC_CHECK_FUNCS([backtrace backtrace_symbols]) - -# Python -# option to specify python interpreter to use; this just sets $PYTHON, so that -# we will fallback to reading $PYTHON if --with-python is not given, and -# python.m4 will get the expected input -AC_ARG_WITH(python, - AS_HELP_STRING([--with-python=PATH],[Path to Python interpreter; searches $PATH if only a program name is given; if not given, searches for a few standard names such as "python3" or "python2"]), - [PYTHON="$withval"], []) -if test x"$PYTHON" = xyes; then - AC_MSG_ERROR([--with-python option requires a path or program argument]) -fi -if test -n "$PYTHON" && ! which "$PYTHON"; then - AC_MSG_ERROR([Python interpreter $PYTHON does not exist]) -fi - -AM_PATH_PYTHON([2.7]) -case "$host" in -*-*-mingw*) - # Change backslashes to forward slashes in pyexecdir to avoid - # quoting issues - pyexecdir=`echo $pyexecdir | tr '\\\\' '/'` - ;; -esac -AM_CHECK_PYTHON_HEADERS(, AC_MSG_ERROR([Python headers not found])) -if test "x$os_win32" = "xyes"; then - AM_CHECK_PYTHON_LIBS(, AC_MSG_ERROR([Python libs not found. Windows requires Python modules to be explicitly linked to libpython.])) -fi - -dnl Not enabled by default until 3.6 cycle when we can propose mako as -dnl an external dependency -AC_ARG_ENABLE(doctool,[ --disable-doctool disable g-ir-doc-tool ],,enable_doctool=auto) -AS_IF([ test x$enable_doctool != xno], [ - AM_CHECK_PYMOD(mako,,have_python_mako=yes,have_python_mako=no) -]) -AS_IF([ test x$enable_doctool = xauto && test x$have_python_mako = xyes ], - [ enable_doctool=yes ], - [ test x$enable_doctool = xauto && test x$have_python_mako = xno ], - [ enable_doctool=no ], - [ test x$enable_doctool = xyes && test x$have_python_mako = xno ], - [ AC_MSG_ERROR([Python mako module not found]) ]) -AM_CONDITIONAL(BUILD_DOCTOOL, test x$enable_doctool != xno) - -# Glib documentation - -GLIBSRC= -AC_MSG_CHECKING([for glib source directory to use for documentation]) - -AC_ARG_WITH(glib-src, - [ --with-glib-src=PATH Source directory for glib - needed to add docs to gir], - GLIBSRC=$withval -) -AM_CONDITIONAL(WITH_GLIBSRC, test x"$GLIBSRC" != x) -AC_SUBST(GLIBSRC) -AC_MSG_RESULT([$GLIBSRC]) - -dnl -dnl Check for -fvisibility=hidden to determine if we can do GNU-style -dnl visibility attributes for symbol export control -dnl -GI_HIDDEN_VISIBILITY_CFLAGS="" -case "$host" in - *-*-mingw*) - dnl on mingw32 we do -fvisibility=hidden and __declspec(dllexport) - AC_DEFINE([_GI_EXTERN], [__attribute__((visibility("default"))) __declspec(dllexport) extern], - [defines how to decorate public symbols while building]) - CFLAGS="${CFLAGS} -fvisibility=hidden" - ;; - *) - dnl on other compilers, check if we can do -fvisibility=hidden - SAVED_CFLAGS="${CFLAGS}" - CFLAGS="-fvisibility=hidden" - AC_MSG_CHECKING([for -fvisibility=hidden compiler flag]) - AC_TRY_COMPILE([], [return 0], - AC_MSG_RESULT(yes) - enable_fvisibility_hidden=yes, - AC_MSG_RESULT(no) - enable_fvisibility_hidden=no) - CFLAGS="${SAVED_CFLAGS}" - - AS_IF([test "${enable_fvisibility_hidden}" = "yes"], [ - AC_DEFINE([_GI_EXTERN], [__attribute__((visibility("default"))) extern], - [defines how to decorate public symbols while building]) - GI_HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden" - ]) - ;; -esac -AC_SUBST(GI_HIDDEN_VISIBILITY_CFLAGS) - -dnl -dnl Check for -Bsymbolic-functions linker flag used to avoid -dnl intra-library PLT jumps, if available. -dnl -AC_ARG_ENABLE(Bsymbolic, - [AS_HELP_STRING([--disable-Bsymbolic], - [avoid linking with -Bsymbolic])],, - [SAVED_LDFLAGS="${LDFLAGS}" - AC_MSG_CHECKING([for -Bsymbolic-functions linker flag]) - LDFLAGS=-Wl,-Bsymbolic-functions - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[return 0]])], - [AC_MSG_RESULT(yes) - enable_Bsymbolic=yes], - [AC_MSG_RESULT(no) - enable_Bsymbolic=no]) - LDFLAGS="${SAVED_LDFLAGS}"]) - -if test "x${enable_Bsymbolic}" = "xyes"; then - EXTRA_LINK_FLAGS=-Wl,-Bsymbolic-functions -fi - -AC_SUBST(EXTRA_LINK_FLAGS) - -dnl -dnl Check whether MSVC toolset is explicitly set -dnl -AM_CONDITIONAL(MSVC_BASE_NO_TOOLSET_SET, [test x$MSVC_BASE_TOOLSET = x]) -AM_CONDITIONAL(MSVC_NO_TOOLSET_SET, [test x$MSVC_TOOLSET = x]) - -AC_CONFIG_FILES([ -Makefile -tests/Makefile -tests/offsets/Makefile -tests/scanner/Makefile -tests/scanner/annotationparser/Makefile -tests/repository/Makefile -tests/warn/Makefile -docs/Makefile -docs/reference/Makefile -docs/reference/version.xml -gobject-introspection-1.0.pc -gobject-introspection-no-export-1.0.pc -config.h.win32 -win32/Makefile -win32/vs9/Makefile -win32/vs9/gi-version-paths.vsprops -win32/vs10/Makefile -win32/vs10/gi-version-paths.props -win32/vs11/Makefile -win32/vs12/Makefile -win32/vs14/Makefile -win32/vs15/Makefile]) -AC_OUTPUT diff -Nru gobject-introspection-1.56.1/CONTRIBUTORS gobject-introspection-1.64.1/CONTRIBUTORS --- gobject-introspection-1.56.1/CONTRIBUTORS 2014-08-04 14:37:07.000000000 +0000 +++ gobject-introspection-1.64.1/CONTRIBUTORS 1970-01-01 00:00:00.000000000 +0000 @@ -1,78 +0,0 @@ -Adam Sampson -Adel Gadllah -Alan Knowles -Alexey Zakhlestin -Andreas Rottmann -Bastien Nocera -Brian Cameron -Chris Rivera -Christian Persch -Christophe Fergeau -Colin Walters -C. Scott Ananian -Damien Lespiau -Danielle Madeley -Dan Winship -David Ignacio -David Zeuthen -Didier 'Ptitjes -dyfet@gnutelephony.org -Eduardo Lima Mitev -Emmanuele Bassi -Florian Müllner -Funda Wang -Gustavo J. A. M. Carneiro -Gustavo Noronha Silva -Halton Huo -Havoc Pennington -Holger Hans Peter Freyther -Iain Nicol -Jani Monoses -Jasper Lievisse Adriaanse -Javier Jardón -Joe Marcus Clarke -Johan Bilien -Johan Dahlin -John (J5) Palmieri -John Ehresman -Jonathan Matthew -Josselin Mouette -Jürg Billeter -Kedar Sovani -Luca Bruno -Lucas Rocha -Maciej Katafiasz -Marc-Andre Lureau -Marco Pesenti Gritti -Marina Zhurakhinskaya -Mark Doffman -Mark Lee -Matthias Clasen -Maxim Ermilov -Michael Meeks -Owen Taylor -Pavel Holejsovsky -Philip Van Hoof -Richard Hult -Robert Ancell -Robert Carr -Rob Taylor -Ryan Lortie -Saikiran Madugula -Saleem Abdulrasool -Saleem Ansari -Simon McVittie -Simon van der Linden -Simón Pena -Stefan Kost -Steve Frécinaux -Theppitak Karoonboonyanan -Tim Horton -Tobias Mueller -Tomeu Vizoso -Tommi Komulainen -Tor Lillqvist -Torsten Schönfeld -Tristan Van Berkom -Xan Lopez -Zachary Goldberg diff -Nru gobject-introspection-1.56.1/COPYING gobject-introspection-1.64.1/COPYING --- gobject-introspection-1.56.1/COPYING 2018-03-10 20:26:54.000000000 +0000 +++ gobject-introspection-1.64.1/COPYING 2020-04-05 14:08:04.682724700 +0000 @@ -1,12 +1,13 @@ gobject-introspection has two licenses; one for the typelib library, and one for the tools. -The scanner (giscanner/) and typelib libraries (girepository/) are -licensed under the LGPLv2+. See the file COPYING.LGPL. +* The typelib libraries (girepository/) are licensed under the LGPLv2+. + See the file COPYING.LGPL. -The tools (tools/) are licensed under the GPLv2+. See the file COPYING.GPL. - -There is also some MIT code in giscanner/. In general where -applicable files should have headers denoting their license status; if -they do not, please file a bug at https://gitlab.gnome.org/GNOME/gobject-introspection/issues. +* The remaining code is GPLv2+ compatible (see the file COPYING.GPL) and + consists of a mix of GPLv2+, LGPLv2+ and MIT. See the license headers in + each file for details. +In general where applicable files should have headers denoting their license +status; if they do not, please file a bug at +https://gitlab.gnome.org/GNOME/gobject-introspection/issues. diff -Nru gobject-introspection-1.56.1/debian/changelog gobject-introspection-1.64.1/debian/changelog --- gobject-introspection-1.56.1/debian/changelog 2020-01-04 04:41:59.000000000 +0000 +++ gobject-introspection-1.64.1/debian/changelog 2023-11-01 19:07:30.000000000 +0000 @@ -1,20 +1,292 @@ -gobject-introspection (1.56.1-1~16.04.sav1) xenial; urgency=medium +gobject-introspection (1.64.1-1~ubuntu16.04.1sav0) xenial; urgency=medium - * Rebuild against ppa:savoury1/build-tools (backported debhelper 11.3.5) - * debian/compat: Set compat level to 10 (Launchpad sbuild highest for Xenial) - * debian/control{.in}: Set debhelper (>= 11) BD as per original files + * Backport to Xenial + * Revert "Add Breaks on older cjs, to avoid broken partial upgrades when + transitioning to libffi7" and "Add more Breaks, to avoid broken partial + upgrades during the libffi7 transition" (this build is with libffi6) + * Revert "Add dependencies for libffi transition" (building with libffi6)) + * Revert "Use dh-sequence-gnome and dh-sequence-python3 build-dependencies" + * debian/control{.in}: Set debhelper-compat (= 10) BD (LP highest for Xenial) + - Remove python3-distutils BD and PD from gobject-introspection (distutils + is fully included in libpython3.5-stdlib for Ubuntu 16.04 Xenial) + * Fix build with Meson >= 0.61 (as in gobject-introspection >= 1.71.0): + - debian/patches/: Backport fix-build-with-newer-meson.patch (part + backport of merge request !305 to fix build with Meson >= 0.61) + - debian/rules: Remove unneeded meson.build files in override_dh_python3 + + -- Rob Savoury Wed, 01 Nov 2023 12:07:30 -0700 - -- Rob Savoury Fri, 03 Jan 2020 20:41:59 -0800 +gobject-introspection (1.64.1-1~ubuntu20.04.1) focal; urgency=medium -gobject-introspection (1.56.1-1~16.04.sav0) xenial; urgency=medium + * Backport new stable release from unstable / groovy. (LP: #1876693) + * control, gbp.conf: Update for focal - * Backport to Xenial - * debian/compat: Drop compat level to 9 (Xenial) - * debian/control.in: Drop debhelper BD to 9 and Standards to 3.9.8 (Xenial) - + Remove python3-distutils BD and python3-distutils PD for - gobject-introspection package (Xenial) + -- Iain Lane Mon, 04 May 2020 11:13:36 +0100 + +gobject-introspection (1.64.1-1) unstable; urgency=medium + + * Team upload + * New upstream release + - d/p/gimarshallingtests-Use-g_assert_cmpfloat_with_epsilon.patch: + Drop patch, applied upstream + + -- Simon McVittie Sun, 12 Apr 2020 12:02:48 +0100 + +gobject-introspection (1.64.0-2) unstable; urgency=medium + + * debian/dh_girepository: Make the parsing of BD more robust. + Thanks to Simon McVittie (Closes: #933729) + + -- Laurent Bigonville Sat, 28 Mar 2020 20:17:49 +0100 + +gobject-introspection (1.64.0-1) experimental; urgency=medium + + [ Simon McVittie ] + * Add Breaks on older cjs, to avoid broken partial upgrades when + transitioning to libffi7 (see version 1.62.0-5 for more details) + + [ Iain Lane ] + * New upstream release + + Update glib annotations + + Fix regress scanner tests for non-gcc/clang compilers + * gimarshallingtests-Use-g_assert_cmpfloat_with_epsilon.patch: Add. Don't + perform exact float comparisons; this doesn't work everywhere - + particularly on i386. This should fix the tests for gjs 1.62. + + -- Iain Lane Thu, 12 Mar 2020 18:17:19 +0000 + +gobject-introspection (1.63.2-1) experimental; urgency=medium + + * New upstream release + - Add GMemoryMonitor to glib annotations + - autotools: Make INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR respect + prefix/datadir/libdir + - build: require meson 0.50.1 + - build: use proper dylib versioning on macOS + - Cross compile support + - Drop deprecated xml.etree.ElementTree.Element.getchildren() calls + - Fix a memory leak in g_irepository_get_object_gtype_interfaces() + - Fix build reproducibility + - Fix non-libtool code being run with no nob-libtool dependencies + - girepository: Also store GType cache misses + - meson: change "cairo" from a boolean to a feature option + - meson: change "doctool" from a boolean to a feature option + - scanner: Support array arguments with static keyword + - tests: Actually test libregress by specifying the LD_LIBRARY_PATH + - Update glib annotations + * rules: Update doctool/cairo build flags for bool → feature switch + * control: Bump BD on meson to 0.50.1 per upstream + + -- Iain Lane Mon, 17 Feb 2020 18:19:18 +0000 + +gobject-introspection (1.62.0-5) unstable; urgency=medium + + * Team upload + + [ Simon McVittie ] + * Add more Breaks, to avoid broken partial upgrades during the libffi7 + transition by ensuring that users of our libffi-related APIs are + upgraded to a version that was definitely built against libffi7 + - libgjs0g (<< 1.58.1-2~) + - libglib-object-introspection-perl (<< 0.048-2~) + - ruby-gobject-introspection (<< 3.4.1-2~) + * Version the (build-)dependency on GLib to make sure libgobject is + also not linked to libffi6 + + [ Iain Lane ] + * rules: Pass the private module directory to dh_python3. + We only build for the default python version. Previously dh_python3 + wasn't finding the directory containing the private modules, so it + didn't know this. (Closes: #950267) + + -- Simon McVittie Mon, 03 Feb 2020 19:29:41 +0000 + +gobject-introspection (1.62.0-4) unstable; urgency=medium + + * Team upload + + [ Simon McVittie ] + * Add dependencies for libffi transition: + - Build-depend on libffi-dev (>= 3.3) to guarantee that our ABI + includes libffi7 objects + - Change -dev dependency to libffi-dev (>= 3.3) too + - d/libgirepository-1.0-1.symbols: Bump ffi-related symbols to 1.62.0-4~. + This forces dependent packages to pick up a suitably versioned + dependency on this package. + - Add Breaks on older python-gi and python3-gi versions that would + have expected libffi6 objects. + The same should ideally be done for cjs, gjs, + libglib-object-introspection-perl and ruby-gnome, but they haven't + had a sourceful upload since the libffi7 transition started, and I + would prefer not to add Breaks on specific binNMU versions. + * Bump Standards-Version to 4.5.0 (no changes required) + + [ lintian-brush ] + * Set field Upstream-Name in debian/copyright. + * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository, + Repository-Browse. + + -- Simon McVittie Thu, 30 Jan 2020 00:09:56 +0000 + +gobject-introspection (1.62.0-3) unstable; urgency=medium + + * Team upload + * d/tests/build: Mark as superficial + * Explicitly build-depend on dh-python, fixing FTBFS with + python3-defaults (>= 3.7.5-3) + * Use debhelper-compat 12 + * Use dh-sequence-gnome and dh-sequence-python3 build-dependencies to + enable debhelper addons + * d/copyright: Fix syntax. + Patterns with character classes, such as foo.[ch], are not supported + by the machine-readable copyright file spec. + * d/tests: Fix some shellcheck warnings + * d/tests/build: Make autopkgtest cross-test-friendly + + -- Simon McVittie Sun, 19 Jan 2020 19:01:51 +0000 + +gobject-introspection (1.62.0-2) unstable; urgency=medium + + * Team upload. + * Upload to unstable. + + -- Andreas Henriksson Mon, 30 Sep 2019 13:58:19 +0200 + +gobject-introspection (1.62.0-1) experimental; urgency=medium + + [ Iain Lane ] + * New upstream release + + Add documentation to the RelaxNG schema + + Add Vulkan gir + + cachestore: handle cache getting deleted while loading it + + Drop autotools build system + + dumper: Use the distutils linker + + gimarshallingtests: Add a marshalling test case for GPtrArrays and + GArrays of structures + + Make g_irepository_get_object_gtype_interfaces actually work + + meson: Fix wrong dependency type check for gio-unix + + meson: require 0.49.2 + + meson: use pkg-config directly for libffi cflags and libs + + regress: Add regression test for signal with GError param + + scanner: parse and expose function macros + + structinfo: Fix offset in find_method() + + tests: Don't include "config.h" in installed files + + Unused variable fixes + + Update glib annotations + + [ Philip Chimento ] + * debian/control.in: Bump meson build dependency. This is a new requirement + documented in the upstream meson.build file. + * debian/patches: Refresh + * Install new Vulkan-1.0.typelib. This is now part of the gir1.2-freedesktop + package which Provides gir1.2-vulkan-1.0 as well. + + -- Tim Lunn Tue, 10 Sep 2019 21:50:41 +1000 - -- Rob Savoury Sun, 20 Oct 2019 14:06:47 -0700 +gobject-introspection (1.60.1-1) experimental; urgency=medium + + * New upstream release + + docs: include '--c-include' in g-ir-scanner man page + + meson: always pass --quiet to g-ir-scanner + + tests: Fix compatibility with Python 3.5 + + Update glib annotations (glib-2-60) + + -- Iain Lane Tue, 09 Apr 2019 09:51:49 +0100 + +gobject-introspection (1.60.0-1) experimental; urgency=medium + + * New upstream release + + -- Jeremy Bicha Sun, 10 Mar 2019 13:02:02 -0400 + +gobject-introspection (1.59.4-1) experimental; urgency=medium + + * New upstream development release + * Build with meson + * debian/libgirepository-1.0-1.symbols: Add new symbols + + -- Jeremy Bicha Thu, 07 Feb 2019 19:02:20 -0500 + +gobject-introspection (1.58.3-2) unstable; urgency=medium + + * Add Provides: dh-sequence-gir + + -- Jeremy Bicha Thu, 10 Jan 2019 23:28:15 -0500 + +gobject-introspection (1.58.3-1) unstable; urgency=medium + + * New upstream release + * Drop python-markdown_3.patch: Applied in new release + + -- Jeremy Bicha Sun, 30 Dec 2018 08:28:02 -0500 + +gobject-introspection (1.58.2-2) unstable; urgency=medium + + [ Dmitry Shachnev ] + * Backport upstream patch to make giscanner/docwriter.py support + Python-Markdown 3.0. + + [ Jeremy Bicha ] + * Add -Wl,-O1 -Wl,--as-needed to our LDFLAGS + * Enable all hardening flags + * Bump Standards-Version to 4.3.0 + + -- Jeremy Bicha Sun, 23 Dec 2018 12:31:08 -0500 + +gobject-introspection (1.58.2-1) unstable; urgency=medium + + * New upstream release + * debianlibgirepository-1.0-1.symbols; Add Build-Depends-Package + + -- Jeremy Bicha Fri, 14 Dec 2018 14:29:00 -0500 + +gobject-introspection (1.58.1-1) unstable; urgency=medium + + * New upstream release + * Bump Standards-Version to 4.2.1 + + -- Jeremy Bicha Sun, 25 Nov 2018 20:55:11 -0500 + +gobject-introspection (1.58.0-1) unstable; urgency=medium + + * New upstream release + * Bump minimum libglib2.0-dev to 2.58.0 + * Release to unstable + + -- Jeremy Bicha Sun, 02 Sep 2018 09:23:01 -0400 + +gobject-introspection (1.57.3-2) experimental; urgency=medium + + * Have gobject-introspection depend on python3-markdown. + Missing dependency was detected by autopkgtest. + + -- Jeremy Bicha Sat, 18 Aug 2018 12:19:04 -0400 + +gobject-introspection (1.57.3-1) experimental; urgency=medium + + * New upstream development release + * Build-Depend on python3-markdown + + -- Jeremy Bicha Fri, 17 Aug 2018 20:40:09 -0400 + +gobject-introspection (1.57.2-2) experimental; urgency=medium + + * Set LC_ALL=C.UTF-8 to avoid test failure + + -- Jeremy Bicha Mon, 06 Aug 2018 22:43:02 -0400 + +gobject-introspection (1.57.2-1) experimental; urgency=medium + + * New upstream development release + * Bump minimum libglib2.0-dev to 2.57.2 + * Build-Depend on autoconf-archive + * debian/gobject-introspection.install: collections has been dropped + in favor of the built-in support in recent Python + * debian/gobject-introspection.docs: README → README.rst, + AUTHORS was dropped in new release + * Refresh patch and rename to multiarch_compat.patch + + -- Jeremy Bicha Mon, 06 Aug 2018 17:42:21 -0400 gobject-introspection (1.56.1-1) unstable; urgency=medium @@ -1151,4 +1423,3 @@ * Initial version (Closes: #497451). -- Sebastian Dröge Sat, 01 Nov 2008 12:16:00 +0100 - diff -Nru gobject-introspection-1.56.1/debian/compat gobject-introspection-1.64.1/debian/compat --- gobject-introspection-1.56.1/debian/compat 2020-01-04 04:41:59.000000000 +0000 +++ gobject-introspection-1.64.1/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -10 diff -Nru gobject-introspection-1.56.1/debian/control gobject-introspection-1.64.1/debian/control --- gobject-introspection-1.56.1/debian/control 2020-01-04 04:41:59.000000000 +0000 +++ gobject-introspection-1.64.1/debian/control 2023-10-30 22:36:33.000000000 +0000 @@ -6,30 +6,36 @@ Section: devel Priority: optional Maintainer: Debian GNOME Maintainers -Uploaders: Iain Lane , Jeremy Bicha , Laurent Bigonville , Matthias Klumpp , Michael Biebl -Build-Depends: debhelper (>= 11), +Uploaders: Iain Lane , Jeremy Bicha , Laurent Bigonville , Tim Lunn +Build-Depends: debhelper-compat (= 10), gnome-pkg-tools (>= 0.10), + dh-python, + meson (>= 0.50.1), python3-dev, pkg-config, flex, gtk-doc-tools (>= 1.19), bison, - libglib2.0-dev (>= 2.56.1), + libglib2.0-dev (>= 2.62.4-2~), libcairo2-dev, libffi-dev (>= 3.0.0), libtool, python3-mako, + python3-markdown Build-Depends-Indep: libglib2.0-doc Rules-Requires-Root: no -Standards-Version: 3.9.8 -Vcs-Browser: https://salsa.debian.org/gnome-team/gobject-introspection -Vcs-Git: https://salsa.debian.org/gnome-team/gobject-introspection.git +Standards-Version: 4.5.0 +Vcs-Browser: https://salsa.debian.org/gnome-team/gobject-introspection/-/tree/ubuntu/focal +Vcs-Git: https://salsa.debian.org/gnome-team/gobject-introspection.git -b ubuntu/focal +XS-Debian-Vcs-Browser: https://salsa.debian.org/gnome-team/gobject-introspection +XS-Debian-Vcs-Git: https://salsa.debian.org/gnome-team/gobject-introspection.git Homepage: https://wiki.gnome.org/GObjectIntrospection Package: libgirepository-1.0-1 Section: libs Architecture: any -Depends: ${shlibs:Depends}, +Depends: libglib2.0-0 (>= 2.62.4-2~), + ${shlibs:Depends}, ${misc:Depends} Multi-Arch: same Description: Library for handling GObject introspection data (runtime library) @@ -51,8 +57,8 @@ gobject-introspection (= ${binary:Version}), gir1.2-glib-2.0 (= ${binary:Version}), gir1.2-freedesktop (= ${binary:Version}), - libglib2.0-dev (>= 2.56.1), - libffi-dev, + libglib2.0-dev (>= 2.58.0), + libffi-dev (>= 3.0.0), ${shlibs:Depends}, ${misc:Depends} Multi-Arch: same @@ -94,9 +100,12 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, + libdpkg-perl, libgirepository-1.0-1 (= ${binary:Version}), build-essential, - python3-mako + python3-mako, + python3-markdown +Provides: dh-sequence-gir Description: Generate interface introspection data for GObject libraries GObject Introspection is a project for providing machine readable introspection data of the API of C libraries. This introspection @@ -145,6 +154,7 @@ gir1.2-freetype2-2.0 (= ${binary:Version}), gir1.2-gl-1.0 (= ${binary:Version}), gir1.2-libxml2-2.0 (= ${binary:Version}), + gir1.2-vulkan-1.0 (= ${binary:Version}), gir1.2-xfixes-4.0 (= ${binary:Version}), gir1.2-xft-2.0 (= ${binary:Version}), gir1.2-xlib-2.0 (= ${binary:Version}), diff -Nru gobject-introspection-1.56.1/debian/control.in gobject-introspection-1.64.1/debian/control.in --- gobject-introspection-1.56.1/debian/control.in 2020-01-04 04:41:59.000000000 +0000 +++ gobject-introspection-1.64.1/debian/control.in 2023-10-30 22:36:32.000000000 +0000 @@ -3,29 +3,35 @@ Priority: optional Maintainer: Debian GNOME Maintainers Uploaders: @GNOME_TEAM@ -Build-Depends: debhelper (>= 11), +Build-Depends: debhelper-compat (= 10), gnome-pkg-tools (>= 0.10), + dh-python, + meson (>= 0.50.1), python3-dev, pkg-config, flex, gtk-doc-tools (>= 1.19), bison, - libglib2.0-dev (>= 2.56.1), + libglib2.0-dev (>= 2.62.4-2~), libcairo2-dev, libffi-dev (>= 3.0.0), libtool, python3-mako, + python3-markdown Build-Depends-Indep: libglib2.0-doc Rules-Requires-Root: no -Standards-Version: 3.9.8 -Vcs-Browser: https://salsa.debian.org/gnome-team/gobject-introspection -Vcs-Git: https://salsa.debian.org/gnome-team/gobject-introspection.git +Standards-Version: 4.5.0 +Vcs-Browser: https://salsa.debian.org/gnome-team/gobject-introspection/-/tree/ubuntu/focal +Vcs-Git: https://salsa.debian.org/gnome-team/gobject-introspection.git -b ubuntu/focal +XS-Debian-Vcs-Browser: https://salsa.debian.org/gnome-team/gobject-introspection +XS-Debian-Vcs-Git: https://salsa.debian.org/gnome-team/gobject-introspection.git Homepage: https://wiki.gnome.org/GObjectIntrospection Package: libgirepository-1.0-1 Section: libs Architecture: any -Depends: ${shlibs:Depends}, +Depends: libglib2.0-0 (>= 2.62.4-2~), + ${shlibs:Depends}, ${misc:Depends} Multi-Arch: same Description: Library for handling GObject introspection data (runtime library) @@ -47,8 +53,8 @@ gobject-introspection (= ${binary:Version}), gir1.2-glib-2.0 (= ${binary:Version}), gir1.2-freedesktop (= ${binary:Version}), - libglib2.0-dev (>= 2.56.1), - libffi-dev, + libglib2.0-dev (>= 2.58.0), + libffi-dev (>= 3.0.0), ${shlibs:Depends}, ${misc:Depends} Multi-Arch: same @@ -90,9 +96,12 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, + libdpkg-perl, libgirepository-1.0-1 (= ${binary:Version}), build-essential, - python3-mako + python3-mako, + python3-markdown +Provides: dh-sequence-gir Description: Generate interface introspection data for GObject libraries GObject Introspection is a project for providing machine readable introspection data of the API of C libraries. This introspection @@ -141,6 +150,7 @@ gir1.2-freetype2-2.0 (= ${binary:Version}), gir1.2-gl-1.0 (= ${binary:Version}), gir1.2-libxml2-2.0 (= ${binary:Version}), + gir1.2-vulkan-1.0 (= ${binary:Version}), gir1.2-xfixes-4.0 (= ${binary:Version}), gir1.2-xft-2.0 (= ${binary:Version}), gir1.2-xlib-2.0 (= ${binary:Version}), diff -Nru gobject-introspection-1.56.1/debian/copyright gobject-introspection-1.64.1/debian/copyright --- gobject-introspection-1.56.1/debian/copyright 2018-04-15 14:09:24.000000000 +0000 +++ gobject-introspection-1.64.1/debian/copyright 2020-05-04 10:13:36.000000000 +0000 @@ -1,5 +1,6 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Source: https://download.gnome.org/sources/gobject-introspection/ +Upstream-Name: GObject Introspection Files: * Copyright: @@ -19,7 +20,14 @@ On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. -Files: girepository/*.[ch] giscanner/giscannermodule.c giscanner/sourcescanner.[ch] tools/compiler.c tools/generate.c +Files: + girepository/*.c + girepository/*.h + giscanner/giscannermodule.c + giscanner/sourcescanner.c + giscanner/sourcescanner.h + tools/compiler.c + tools/generate.c Copyright: Copyright (C) 2010 Red Hat, Inc. License: LGPL-2+ This library is free software; you can redistribute it and/or diff -Nru gobject-introspection-1.56.1/debian/dh_girepository gobject-introspection-1.64.1/debian/dh_girepository --- gobject-introspection-1.56.1/debian/dh_girepository 2018-04-15 14:09:24.000000000 +0000 +++ gobject-introspection-1.64.1/debian/dh_girepository 2020-05-04 10:13:36.000000000 +0000 @@ -8,6 +8,8 @@ use strict; use File::Find; +use Dpkg::Deps; +use Dpkg::Control; use Debian::Debhelper::Dh_Lib; =head1 SYNOPSIS @@ -101,32 +103,15 @@ # Get Build-Depends in an array my @bdeps; -my $cur = 0; -open (my $control, "<", "debian/control") or error ("Cannot open debian/control"); -while (<$control>) { - chomp; - s/\s+$//; - if ($cur) { - if (/^\s+(.*)$/) { - push @bdeps, split ",",$1; - if ($1 !~ /,$/) { - $cur = 0; - } - } else { - $cur = 0; - } - } - if (/^Build-Depends:\s*(.*)$/) { - push @bdeps, split ",",$1; - if ($1 =~ /,$/) { - $cur = 1; - } else { - $cur = 0; - } + +my $ctrl = Dpkg::Control->new(type => CTRL_INFO_SRC); +$ctrl->load('debian/control'); +foreach my $field (qw(Build-Depends Build-Depends-Arch Build-Depends-Indep)) { + if (defined $ctrl->{$field}) { + my $value = deps_parse($ctrl->{$field}, build_dep => 1); + push @bdeps, split ', ', $value->output; } } -close $control; - # We can’t parse .typelib files, so we need the corresponding .gir # somewhere in the same source package (or with -l). diff -Nru gobject-introspection-1.56.1/debian/gbp.conf gobject-introspection-1.64.1/debian/gbp.conf --- gobject-introspection-1.56.1/debian/gbp.conf 2018-04-15 14:09:24.000000000 +0000 +++ gobject-introspection-1.64.1/debian/gbp.conf 2020-05-04 10:13:36.000000000 +0000 @@ -1,5 +1,17 @@ [DEFAULT] pristine-tar = True -debian-branch = debian/master +debian-branch = ubuntu/focal upstream-branch = upstream/latest + +[buildpackage] +sign-tags = True + +[dch] +multimaint-merge = True + +[import-orig] +postimport = dch -v%(version)s New upstream release; git add debian/changelog; debcommit upstream-vcs-tag = %(version)s + +[pq] +patch-numbers = False diff -Nru gobject-introspection-1.56.1/debian/gir1.2-freedesktop.install gobject-introspection-1.64.1/debian/gir1.2-freedesktop.install --- gobject-introspection-1.56.1/debian/gir1.2-freedesktop.install 2018-04-15 14:09:24.000000000 +0000 +++ gobject-introspection-1.64.1/debian/gir1.2-freedesktop.install 2020-05-04 10:13:36.000000000 +0000 @@ -5,6 +5,7 @@ usr/lib/*/girepository-1.0/freetype2-2.0.typelib usr/lib/*/girepository-1.0/GL-1.0.typelib usr/lib/*/girepository-1.0/libxml2-2.0.typelib +usr/lib/*/girepository-1.0/Vulkan-1.0.typelib usr/lib/*/girepository-1.0/xfixes-4.0.typelib usr/lib/*/girepository-1.0/xft-2.0.typelib usr/lib/*/girepository-1.0/xlib-2.0.typelib diff -Nru gobject-introspection-1.56.1/debian/gobject-introspection.docs gobject-introspection-1.64.1/debian/gobject-introspection.docs --- gobject-introspection-1.56.1/debian/gobject-introspection.docs 2018-04-15 14:09:24.000000000 +0000 +++ gobject-introspection-1.64.1/debian/gobject-introspection.docs 2020-05-04 10:13:36.000000000 +0000 @@ -1,4 +1,3 @@ -AUTHORS NEWS -README +README.rst debian/policy.txt diff -Nru gobject-introspection-1.56.1/debian/gobject-introspection.install gobject-introspection-1.64.1/debian/gobject-introspection.install --- gobject-introspection-1.56.1/debian/gobject-introspection.install 2018-04-15 14:09:24.000000000 +0000 +++ gobject-introspection-1.64.1/debian/gobject-introspection.install 2020-05-04 10:13:36.000000000 +0000 @@ -4,7 +4,6 @@ usr/share/man usr/lib/*/gobject-introspection/giscanner/*.py usr/lib/*/gobject-introspection/giscanner/*.so -usr/lib/*/gobject-introspection/giscanner/collections/*.py usr/lib/*/gobject-introspection/giscanner/doctemplates debian/dh_girepository /usr/bin debian/gir.pm /usr/share/perl5/Debian/Debhelper/Sequence diff -Nru gobject-introspection-1.56.1/debian/libgirepository-1.0-1.symbols gobject-introspection-1.64.1/debian/libgirepository-1.0-1.symbols --- gobject-introspection-1.56.1/debian/libgirepository-1.0-1.symbols 2018-04-15 14:09:24.000000000 +0000 +++ gobject-introspection-1.64.1/debian/libgirepository-1.0-1.symbols 2023-10-30 21:48:50.000000000 +0000 @@ -1,4 +1,5 @@ libgirepository-1.0.so.1 libgirepository-1.0-1 #MINVER# +* Build-Depends-Package: libgirepository1.0-dev g_arg_info_get_closure@Base 0.9.2 g_arg_info_get_destroy@Base 0.9.2 g_arg_info_get_direction@Base 0.9.2 @@ -94,6 +95,7 @@ g_irepository_get_info@Base 0.9.2 g_irepository_get_loaded_namespaces@Base 0.9.2 g_irepository_get_n_infos@Base 0.9.2 + g_irepository_get_object_gtype_interfaces@Base 1.59.4 g_irepository_get_option_group@Base 0.9.2 g_irepository_get_search_path@Base 0.9.2 g_irepository_get_shared_library@Base 0.9.2 @@ -195,5 +197,8 @@ g_vfunc_info_get_signal@Base 0.9.2 g_vfunc_info_invoke@Base 0.10.2 gi_cclosure_marshal_generic@Base 0.9.2 + gi_get_major_version@Base 1.59.4 + gi_get_micro_version@Base 1.59.4 + gi_get_minor_version@Base 1.59.4 gi_type_info_extract_ffi_return_value@Base 1.31.22 gi_type_tag_get_ffi_type@Base 0.10.0 diff -Nru gobject-introspection-1.56.1/debian/libgirepository1.0-dev.install gobject-introspection-1.64.1/debian/libgirepository1.0-dev.install --- gobject-introspection-1.56.1/debian/libgirepository1.0-dev.install 2018-04-15 14:09:24.000000000 +0000 +++ gobject-introspection-1.64.1/debian/libgirepository1.0-dev.install 2020-05-04 10:13:36.000000000 +0000 @@ -1,5 +1,4 @@ usr/lib/*/libgirepository-1.0.so -usr/lib/*/libgirepository-1.0.a usr/include usr/lib/*/pkgconfig usr/share/gir-1.0 diff -Nru gobject-introspection-1.56.1/debian/patches/01_pre_multiarch_compat.diff gobject-introspection-1.64.1/debian/patches/01_pre_multiarch_compat.diff --- gobject-introspection-1.56.1/debian/patches/01_pre_multiarch_compat.diff 2018-04-15 14:09:24.000000000 +0000 +++ gobject-introspection-1.64.1/debian/patches/01_pre_multiarch_compat.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -Description: Search the pre-multiarch paths too -Author: Michael Vogt -Forwarded: not-needed - ---- a/girepository/girepository.c -+++ b/girepository/girepository.c -@@ -186,6 +186,9 @@ - - search_path = g_slist_prepend (search_path, typelib_dir); - -+ // compat with pre-multiarch -+ search_path = g_slist_prepend (search_path, "/usr/lib/girepository-1.0"); -+ - search_path = g_slist_reverse (search_path); - } diff -Nru gobject-introspection-1.56.1/debian/patches/fix-build-with-newer-meson.patch gobject-introspection-1.64.1/debian/patches/fix-build-with-newer-meson.patch --- gobject-introspection-1.56.1/debian/patches/fix-build-with-newer-meson.patch 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/debian/patches/fix-build-with-newer-meson.patch 2023-10-30 23:23:17.000000000 +0000 @@ -0,0 +1,294 @@ +From 827494d6415b696a98fa195cbd883b50cc893bfc Mon Sep 17 00:00:00 2001 +From: Emmanuele Bassi +Date: Tue, 11 Jan 2022 15:47:50 +0000 +Subject: [PATCH 1/7] doctool: Add templates_dir CLI argument + +We can find the templates directory using the module file once +installed, but when running uninstalled we need to have a way to specify +where the templates can be found in the sources directory. +--- + giscanner/docmain.py | 4 +++- + giscanner/docwriter.py | 14 ++++++++------ + 2 files changed, 11 insertions(+), 7 deletions(-) + +diff --git a/giscanner/docmain.py b/giscanner/docmain.py +index dab063ef2..88430f058 100644 +--- a/giscanner/docmain.py ++++ b/giscanner/docmain.py +@@ -51,6 +51,8 @@ def doc_main(args): + parser.add_argument("-s", "--write-sections-file", + action="store_const", dest="format", const="sections", + help="Backwards-compatible equivalent to -f sections") ++ parser.add_argument("--templates-dir", ++ action="store") + + args = parser.parse_args(args[1:]) + if not args.output: +@@ -74,7 +76,7 @@ def doc_main(args): + with open(args.output, 'w') as fp: + write_sections_file(fp, sections_file) + else: +- writer = DocWriter(transformer, args.language, args.format) ++ writer = DocWriter(transformer, args.language, args.format, args.templates_dir) + writer.write(args.output) + + return 0 +diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py +index d0cd610f2..b72ab2ac9 100644 +--- a/giscanner/docwriter.py ++++ b/giscanner/docwriter.py +@@ -1288,7 +1288,7 @@ LANGUAGES = { + + + class DocWriter(object): +- def __init__(self, transformer, language, output_format): ++ def __init__(self, transformer, language, output_format, templates_dir=None): + self._transformer = transformer + + try: +@@ -1300,18 +1300,20 @@ class DocWriter(object): + self._formatter = formatter_class(self._transformer) + self._language = self._formatter.language + self._output_format = output_format ++ self._templates_dir = templates_dir + + self._lookup = self._get_template_lookup() + + def _get_template_lookup(self): +- if 'UNINSTALLED_INTROSPECTION_SRCDIR' in os.environ: ++ if self._templates_dir is not None: ++ srcdir = self._templates_dir ++ elif 'UNINSTALLED_INTROSPECTION_SRCDIR' in os.environ: + top_srcdir = os.environ['UNINSTALLED_INTROSPECTION_SRCDIR'] +- srcdir = os.path.join(top_srcdir, 'giscanner') ++ srcdir = os.path.join(top_srcdir, 'giscanner', 'doctemplates') + else: +- srcdir = os.path.dirname(__file__) ++ srcdir = os.path.join(os.path.dirname(__file__), 'doctemplates') + +- template_dir = os.path.join(srcdir, 'doctemplates', +- self._formatter.output_format) ++ template_dir = os.path.join(srcdir, self._formatter.output_format) + + return TemplateLookup(directories=[template_dir], + module_directory=tempfile.mkdtemp(), +-- +GitLab + + +From effb1e09dee263cdac4ec593e8caf316e6f01fe2 Mon Sep 17 00:00:00 2001 +From: Emmanuele Bassi +Date: Tue, 11 Jan 2022 15:51:10 +0000 +Subject: [PATCH 3/7] build: Avoid the doctemplates hack +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The hack that copies the doctemplates directory into the build +directory has stopped working with newer versions of Meson; while it's +possible to copy files, custom_target() cannot depend on a directory. +Additionally, the dependency has always been broken. + +Instead, we enumerate the template files—after all, it's not like they +change a lot—and then we list them as dependencies for the test targets. + +Fixes: #414 +--- + giscanner/doctemplates/devdocs/meson.build | 19 +++++++ + giscanner/doctemplates/mallard/meson.build | 63 ++++++++++++++++++++++ + giscanner/meson.build | 14 ++--- + tests/scanner/meson.build | 24 +++++---- + 4 files changed, 98 insertions(+), 22 deletions(-) + create mode 100644 giscanner/doctemplates/devdocs/meson.build + create mode 100644 giscanner/doctemplates/mallard/meson.build + +diff --git a/giscanner/doctemplates/devdocs/meson.build b/giscanner/doctemplates/devdocs/meson.build +new file mode 100644 +index 000000000..2037182a5 +--- /dev/null ++++ b/giscanner/doctemplates/devdocs/meson.build +@@ -0,0 +1,19 @@ ++doc_templates += files([ ++ 'Gjs/_doc.tmpl', ++ 'Gjs/_index.tmpl', ++ 'Gjs/_method.tmpl', ++ 'Gjs/_methods.tmpl', ++ 'Gjs/_properties.tmpl', ++ 'Gjs/_signals.tmpl', ++ 'Gjs/_staticmethods.tmpl', ++ 'Gjs/_vfuncs.tmpl', ++ 'Gjs/base.tmpl', ++ 'Gjs/callback.tmpl', ++ 'Gjs/class.tmpl', ++ 'Gjs/default.tmpl', ++ 'Gjs/enum.tmpl', ++ 'Gjs/function.tmpl', ++ 'Gjs/interface.tmpl', ++ 'Gjs/method.tmpl', ++ 'Gjs/namespace.tmpl', ++]) +diff --git a/giscanner/doctemplates/mallard/meson.build b/giscanner/doctemplates/mallard/meson.build +new file mode 100644 +index 000000000..5fe4e2af6 +--- /dev/null ++++ b/giscanner/doctemplates/mallard/meson.build +@@ -0,0 +1,63 @@ ++base_templates = files([ ++ 'base.tmpl', ++ 'class.tmpl', ++ 'namespace.tmpl', ++]) ++ ++c_templates = files([ ++ 'C/callback.tmpl', ++ 'C/class.tmpl', ++ 'C/constructor.tmpl', ++ 'C/default.tmpl', ++ 'C/enum.tmpl', ++ 'C/field.tmpl', ++ 'C/function.tmpl', ++ 'C/interface.tmpl', ++ 'C/method.tmpl', ++ 'C/namespace.tmpl', ++ 'C/property.tmpl', ++ 'C/record.tmpl', ++ 'C/signal.tmpl', ++ 'C/vfunc.tmpl', ++]) ++ ++gjs_templates = files([ ++ 'Gjs/callback.tmpl', ++ 'Gjs/class.tmpl', ++ 'Gjs/constructor.tmpl', ++ 'Gjs/default.tmpl', ++ 'Gjs/enum.tmpl', ++ 'Gjs/field.tmpl', ++ 'Gjs/function.tmpl', ++ 'Gjs/interface.tmpl', ++ 'Gjs/method.tmpl', ++ 'Gjs/namespace.tmpl', ++ 'Gjs/property.tmpl', ++ 'Gjs/record.tmpl', ++ 'Gjs/signal.tmpl', ++ 'Gjs/vfunc.tmpl', ++]) ++ ++py_templates = files([ ++ 'Python/callback.tmpl', ++ 'Python/class.tmpl', ++ 'Python/constructor.tmpl', ++ 'Python/default.tmpl', ++ 'Python/enum.tmpl', ++ 'Python/field.tmpl', ++ 'Python/function.tmpl', ++ 'Python/interface.tmpl', ++ 'Python/method.tmpl', ++ 'Python/namespace.tmpl', ++ 'Python/property.tmpl', ++ 'Python/record.tmpl', ++ 'Python/signal.tmpl', ++ 'Python/vfunc.tmpl', ++]) ++ ++doc_templates += [ ++ base_templates, ++ c_templates, ++ gjs_templates, ++ py_templates, ++] +diff --git a/giscanner/meson.build b/giscanner/meson.build +index 41edcd44c..3d7dc678a 100644 +--- a/giscanner/meson.build ++++ b/giscanner/meson.build +@@ -53,17 +53,9 @@ configure_file(input : '../girepository/gdump.c', + + install_subdir('doctemplates', install_dir: giscannerdir) + +-# XXX: this doesn't track the input, but there is nothing to copy many files +-# in meson. +-doc_templates = custom_target('copy-templates', +- input : 'doctemplates', +- output : 'doctemplates', +- command : [ +- python, '-c', +- 'import sys, shutil;' + +- 'shutil.rmtree(sys.argv[2], ignore_errors=True);' + +- 'shutil.copytree(sys.argv[1], sys.argv[2])', +- '@INPUT@', '@OUTPUT@']) ++doc_templates = [] ++subdir('doctemplates/devdocs') ++subdir('doctemplates/mallard') + + flex = find_program('flex', 'win_flex') + bison = find_program('bison', 'win_bison') +diff --git a/tests/scanner/meson.build b/tests/scanner/meson.build +index 5176b9572..b81b3fd5f 100644 +--- a/tests/scanner/meson.build ++++ b/tests/scanner/meson.build +@@ -525,19 +525,26 @@ foreach gir : test_girs + endforeach + + if has_girdoctool and glib_dep.type_name() == 'pkgconfig' ++ doctool_env = environment() ++ doctool_env.set('srcdir', meson.current_source_dir()) ++ doctool_env.set('builddir', meson.current_build_dir()) ++ + foreach language : ['C', 'Python', 'Gjs'] + regress_docs = custom_target( + 'generate-docs-' + language, + input: regress_gir, +- depends: [doc_templates], ++ depend_files: doc_templates, + build_by_default: not cairo_deps_found, ++ env: doctool_env, + output: 'Regress-1.0-' + language, + command: [ + python, girdoctool, + '--add-include-path=' + join_paths(meson.build_root(), 'gir'), + '--add-include-path=' + meson.current_build_dir(), + '--language', language, +- '@INPUT@', '-o', '@OUTPUT@'], ++ '--templates-dir=' + join_paths(meson.current_source_dir(), '../../giscanner/doctemplates'), ++ '@INPUT@', '-o', '@OUTPUT@', ++ ], + ) + + if cairo_deps_found +@@ -546,10 +553,7 @@ if has_girdoctool and glib_dep.type_name() == 'pkgconfig' + python, + args: [gi_tester, 'Regress-1.0-' + language], + depends: [regress_docs], +- env: [ +- 'srcdir=' + meson.current_source_dir(), +- 'builddir=' + meson.current_build_dir(), +- ], ++ env: doctool_env, + ) + endif + endforeach +@@ -557,9 +561,10 @@ if has_girdoctool and glib_dep.type_name() == 'pkgconfig' + regress_sections = custom_target( + 'generate-docs-sections', + input: regress_gir, +- depends: [doc_templates], ++ depend_files: [doc_templates], + build_by_default: not cairo_deps_found, + output: 'Regress-1.0-sections.txt', ++ env: doctool_env, + command: [ + python, girdoctool, + '--add-include-path=' + join_paths(meson.build_root(), 'gir'), +@@ -574,10 +579,7 @@ if has_girdoctool and glib_dep.type_name() == 'pkgconfig' + python, + args: [gi_tester, 'Regress-1.0-sections.txt'], + depends: [regress_sections], +- env: [ +- 'srcdir=' + meson.current_source_dir(), +- 'builddir=' + meson.current_build_dir(), +- ], ++ env: doctool_env, + ) + endif + endif +-- +GitLab diff -Nru gobject-introspection-1.56.1/debian/patches/multiarch_compat.patch gobject-introspection-1.64.1/debian/patches/multiarch_compat.patch --- gobject-introspection-1.56.1/debian/patches/multiarch_compat.patch 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/debian/patches/multiarch_compat.patch 2020-05-04 10:13:36.000000000 +0000 @@ -0,0 +1,25 @@ +From: Michael Vogt +Date: Sat, 30 Aug 2014 21:40:04 +0000 +Subject: Search the pre-multiarch paths too + +needed only until all packages are moved to mutliarch paths + +Forwarded: not-needed +--- + girepository/girepository.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/girepository/girepository.c b/girepository/girepository.c +index b7948d6..37094a1 100644 +--- a/girepository/girepository.c ++++ b/girepository/girepository.c +@@ -221,6 +221,9 @@ init_globals (void) + + typelib_search_path = g_slist_prepend (typelib_search_path, typelib_dir); + ++ // compat with pre-multiarch ++ typelib_search_path = g_slist_prepend (typelib_search_path, "/usr/lib/girepository-1.0"); ++ + typelib_search_path = g_slist_reverse (typelib_search_path); + } + diff -Nru gobject-introspection-1.56.1/debian/patches/series gobject-introspection-1.64.1/debian/patches/series --- gobject-introspection-1.56.1/debian/patches/series 2018-04-15 14:09:24.000000000 +0000 +++ gobject-introspection-1.64.1/debian/patches/series 2023-10-30 22:50:18.000000000 +0000 @@ -1,2 +1,2 @@ -#needed only until all packages are moved to mutliarch paths -01_pre_multiarch_compat.diff +multiarch_compat.patch +fix-build-with-newer-meson.patch diff -Nru gobject-introspection-1.56.1/debian/rules gobject-introspection-1.64.1/debian/rules --- gobject-introspection-1.56.1/debian/rules 2018-04-15 14:09:24.000000000 +0000 +++ gobject-introspection-1.64.1/debian/rules 2023-10-30 23:39:25.000000000 +0000 @@ -1,18 +1,22 @@ #!/usr/bin/make -f -include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk +include /usr/share/dpkg/pkg-info.mk + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,--as-needed MANPAGES := debian/dh_girepository.1 $(MANPAGES): debian/dh_girepository pod2man -c "gobject-introspection" -r "$(DEB_VERSION)" $< $@ %: - dh $@ --with gnome,python3 + dh $@ --buildsystem=meson --with gnome,python3 override_dh_auto_configure: dh_auto_configure -- \ - --enable-gtk-doc \ - --enable-doctool \ - --with-python=python3 + -Dgtk_doc=true \ + -Dcairo=enabled \ + -Ddoctool=enabled \ + -Dpython=python3 override_dh_auto_build: $(MANPAGES) dh_auto_build @@ -25,12 +29,11 @@ override_dh_makeshlibs: dh_makeshlibs -- -c4 -override_dh_install: - find debian/tmp -name '*.la' -print -delete - find debian/tmp -name '*.pyc' -print -delete - find debian/tmp -name '*.pyo' -print -delete - dh_install - override_dh_auto_clean: dh_auto_clean rm -rf $(MANPAGES) + +override_dh_python3: + dh_python3 -pgobject-introspection /usr/lib/$(DEB_HOST_MULTIARCH)/gobject-introspection/giscanner/ + find debian/gobject-introspection -name 'meson.build' -print -delete + dh_python3 diff -Nru gobject-introspection-1.56.1/debian/tests/build gobject-introspection-1.64.1/debian/tests/build --- gobject-introspection-1.56.1/debian/tests/build 2018-04-15 14:09:24.000000000 +0000 +++ gobject-introspection-1.64.1/debian/tests/build 2020-05-04 10:13:36.000000000 +0000 @@ -7,8 +7,15 @@ set -e WORKDIR=$(mktemp -d) -trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM -cd $WORKDIR +trap 'rm -rf "$WORKDIR"' 0 INT QUIT ABRT PIPE TERM +cd "$WORKDIR" + +if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then + CROSS_COMPILE="$DEB_HOST_GNU_TYPE-" +else + CROSS_COMPILE= +fi + cat < gitest.c #include #include @@ -46,7 +53,7 @@ } EOF -gcc -o gitest gitest.c -Wall -Werror `pkg-config --cflags --libs gobject-introspection-1.0` +"${CROSS_COMPILE}gcc" -o gitest gitest.c -Wall -Werror $("${CROSS_COMPILE}pkg-config" --cflags --libs gobject-introspection-1.0) echo "build: OK" [ -x gitest ] echo -n "run: " diff -Nru gobject-introspection-1.56.1/debian/tests/control gobject-introspection-1.64.1/debian/tests/control --- gobject-introspection-1.56.1/debian/tests/control 2018-04-15 14:09:24.000000000 +0000 +++ gobject-introspection-1.64.1/debian/tests/control 2020-05-04 10:13:36.000000000 +0000 @@ -1,4 +1,5 @@ Tests: build +Restrictions: superficial # deliberately avoid depending on gir1.2-glib-2.0 and friends; gir1.2-gtk-3.0 # ought to pull these in Depends: build-essential, libgirepository1.0-dev, gir1.2-gtk-3.0, libcairo2-dev diff -Nru gobject-introspection-1.56.1/debian/tests/tools gobject-introspection-1.64.1/debian/tests/tools --- gobject-introspection-1.56.1/debian/tests/tools 2018-04-15 14:09:24.000000000 +0000 +++ gobject-introspection-1.64.1/debian/tests/tools 2020-05-04 10:13:36.000000000 +0000 @@ -6,8 +6,8 @@ set -e WORKDIR=$(mktemp -d) -trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM -cd $WORKDIR +trap 'rm -rf "$WORKDIR"' 0 INT QUIT ABRT PIPE TERM +cd "$WORKDIR" echo "g-ir-scanner..." g-ir-scanner --include=cairo-1.0 --include=Gio-2.0 --namespace=Regress --nsversion=1.0 --header-only /usr/share/gobject-introspection-1.0/tests/*.h --output Regress.gir diff -Nru gobject-introspection-1.56.1/debian/upstream/metadata gobject-introspection-1.64.1/debian/upstream/metadata --- gobject-introspection-1.56.1/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/debian/upstream/metadata 2020-05-04 10:13:36.000000000 +0000 @@ -0,0 +1,4 @@ +Bug-Database: https://gitlab.gnome.org/GNOME/gobject-introspection/issues/ +Bug-Submit: https://gitlab.gnome.org/GNOME/gobject-introspection/issues/new +Repository: https://gitlab.gnome.org/GNOME/gobject-introspection.git +Repository-Browse: https://gitlab.gnome.org/GNOME/gobject-introspection diff -Nru gobject-introspection-1.56.1/debian/watch gobject-introspection-1.64.1/debian/watch --- gobject-introspection-1.56.1/debian/watch 2018-04-15 14:09:24.000000000 +0000 +++ gobject-introspection-1.64.1/debian/watch 2020-05-04 10:13:36.000000000 +0000 @@ -1,3 +1,3 @@ version=4 -https://download.gnome.org/sources/@PACKAGE@/([\d\.]+[02468])/ \ +https://download.gnome.org/sources/@PACKAGE@/([\d\.]+)/ \ @PACKAGE@@ANY_VERSION@\.tar\.xz diff -Nru gobject-introspection-1.56.1/docs/gir-1.2.rnc gobject-introspection-1.64.1/docs/gir-1.2.rnc --- gobject-introspection-1.56.1/docs/gir-1.2.rnc 2016-11-04 07:47:13.000000000 +0000 +++ gobject-introspection-1.64.1/docs/gir-1.2.rnc 2020-04-05 14:08:04.682724700 +0000 @@ -5,27 +5,40 @@ grammar { start = Repository + ## Root node of a GIR repository. It contains namespaces, which can in turn be implemented in several libraries Repository = element repository { + ## version number of the repository attribute version { xsd:string }?, + ## prefixes to filter out from C identifiers for data structures and types. For example, GtkWindow will be Window. If c:symbol-prefixes is not used, then this element is used for both attribute c:identifier-prefixes { xsd:string }?, + ## prefixes to filter out from C functions. For example, gtk_window_new will lose gtk_ attribute c:symbol-prefixes { xsd:string }?, + # Other elements a repository can contain (Include* & CInclude* & Package* & Namespace*) } + ## Namespace which maps metadata entries to C functionality. This a similar concept to namespace in C++, but for GObject-based C libraries Namespace = element namespace { + ## name of the namespace. For example, 'Gtk' attribute name { xsd:string }?, + ## version number of the namespace attribute version { xsd:string }?, + ## prefixes to filter out from C identifiers for data structures and types. For example, GtkWindow will be Window. If c:symbol-prefixes is not used, then this element is used for both attribute c:identifier-prefixes { xsd:string }?, + ## prefixes to filter out from C functions. For example, gtk_window_new will lose gtk_ attribute c:symbol-prefixes { xsd:string }?, + ## Deprecated: the same as c:identifier-prefixes. Only used for backward compatibility attribute c:prefix { xsd:string }?, + ## Path to the shared library implementing the namespace. It can be a comma-separated list, with relative path only attribute shared-library { xsd:string }?, + # Other elements a namespace can contain (Alias* & Class* & Interface* @@ -41,54 +54,77 @@ } Annotation = + ## element defining an annotation from the source code, usually a user-defined annotation associated to a parameter or a return value element attribute { + ## name of the attribute attribute name { xsd:string }, + ## value of the attribute attribute value { xsd:string } } CInclude = + ## Dependant C header file which should be included in C programs element c:include { + ## File name of the C header file. The path can be relative. attribute name { xsd:string }, empty } Include = + ## Dependant namespace to include with the current namespace. For example, Gtk will need the namespace GLib element include { + ## name of the dependant namespace to include attribute name { xsd:string }, + ## version of the dependant namespace to use attribute version { xsd:string }?, empty } Package = + ## Deprecated: package name containing the library element package { + ## name of the package attribute name { xsd:string }, empty } Alias = + ## Type's name substitution, representing a typedef in C element alias { + # Attributes of an Alias (see definition below) Info.attrs, + ## the new name or typedef'd name attribute name { xsd:string }, + ## the corresponding C type's name attribute c:type { xsd:string }, + # Other elements an alias can contain (Info.elements & Type) } Interface = + ## Abstract interface to other classes element interface { + # Attributes of an Interface (see definition below) Info.attrs, + ## name of the interface attribute name { xsd:string }, + ## Type name compatible with the GObject type system attribute glib:type-name { xsd:string }, + ## Function to get the GObject compatible type of the interface attribute glib:get-type { xsd:string }, - + ## prefix to filter out from C functions. For example, gtk_window_new will lose gtk_ attribute c:symbol-prefix { xsd:string }?, + ## Corresponding C type attribute c:type { xsd:string }?, + ## GObject compatible C structure defining the Interface attribute glib:type-struct { xsd:string }?, + # Other elements an interface can contain (Info.elements & Prerequisite* & Implements* @@ -104,23 +140,38 @@ } Class = + ## GObject inherited class definition element class { Info.attrs, + + ## Name of the class attribute name { xsd:string }, + ## GObject compatible type name of the class attribute glib:type-name { xsd:string }, + ## Function to get the GObject compatible type of the class attribute glib:get-type { xsd:string }, - + ## Name of the parent class if any attribute parent { xsd:string }?, + ## GObject compatible C structure defining the class attribute glib:type-struct { xsd:string }?, + ## GObject compatible function to reference or increase the reference count of the class attribute glib:ref-func { xsd:string }?, + ## GObject compatible function to unreference or decrease the reference count of the class attribute glib:unref-func { xsd:string }?, + ## GObject compatible function to set a value of a property of the class attribute glib:set-value-func { xsd:string }?, + ## GObject compatible function to get a value of a property of the class attribute glib:get-value-func { xsd:string }?, + ## C type of the class attribute c:type { xsd:string }?, + ## prefix to filter out from C functions. For example, gtk_window_new will lose gtk_ attribute c:symbol-prefix { xsd:string }?, + ## Binary attribute to declare the class abstract or not attribute abstract { "0" | "1" }?, + ## Binary attribute to declare the class fundamental or not (top-level class which do not derives from any other type) attribute glib:fundamental { "0" | "1" }?, + # Other elements a class can contain (Info.elements & Implements* & Constructor* @@ -137,31 +188,47 @@ } Boxed = + ## Boxed type (wrapper to opaque C structures registered by the type system) element glib:boxed { Info.attrs, + ## GObject compatible type name of the boxed type attribute glib:name { xsd:string }, - + ## prefix to filter out from C functions. For example, gtk_window_new will lose gtk_ attribute c:symbol-prefix { xsd:string }?, + ## GObject compatible type name of the boxed type attribute glib:type-name { xsd:string }?, + ## Function to get the GObject compatible type of the boxed type attribute glib:get-type { xsd:string }?, + # Other elements a Boxed type can contain (Info.elements & Function*) } Record = + ## Record definition, equivalent to a C struct, that is a simple structure, not a class element record { Info.attrs, + ## name of the record attribute name { xsd:string }, - + ## Corresponding C type of the record attribute c:type { xsd:string }?, + ## Binary attribute to tell if the record is disguised, i.e. whether the c:type is a typedef that doesn't look like a pointer, but is one internally + ## Its second meaning is "private" and is set when any typedef struct is parsed which doesn't also include a full struct with fields (https://gitlab.gnome.org/GNOME/gobject-introspection/issues/101) attribute disguised { "0" | "1" }?, + ## GObject compatible C type of the record attribute glib:type-name { xsd:string }?, + ## Function to get the GObject compatible type of the record attribute glib:get-type { xsd:string }?, + ## prefix to filter out from C functions. For example, gtk_window_new will lose gtk_ attribute c:symbol-prefix { xsd:string }?, + ## Binary attribute to tell if the record is foreign, that is it is not available in a g-i supported library attribute foreign { "0" | "1" }?, + ## Name of the GObject compatible gtype this record represents. If empty, this record will be hidden from generated public APIs. attribute glib:is-gtype-struct-for { xsd:string }?, + # Other elements a record can contain + # mandatory (Info.elements & Field* & Function* @@ -171,153 +238,237 @@ & Property*) } + # Some base information for most elements like version, deprecation, stability, if they are introspectable or not, etc... Info.attrs = ( + ## Binary attribute which is "0" (false) if the element is not introspectable. It doesn't exist in the bindings, due in general to missing information in the annotations in the original C code attribute introspectable { "0" | "1" }?, + ## Binary attribute which is "1" (true) if the element has been deprecated attribute deprecated { xsd:string }?, + ## Version number from which this element is deprecated attribute deprecated-version { xsd:string }?, + ## version number of an element attribute version { xsd:string }?, + ## give the statibility status of the element. Can take the values "Stable", "Unstable" or "Private" attribute stability { xsd:string }? ) + # Documentation of elements DocElements = ( + ## Version of the documentation element doc-version { + ## Preserve the original formatting of the documentation from the source code attribute xml:space { "preserve" }?, + ## Preserve the original formatting of the documentation from the source code. Recommended to use this instead of xml:space attribute xml:whitespace { "preserve" }?, - + ## the text of the version of the documentation text }? + ## give the stability of the documentation & element doc-stability { + ## Preserve the original formatting of the documentation from the source code attribute xml:space { "preserve" }?, + ## Preserve the original formatting of the documentation from the source code. Recommended to use this instead of xml:space attribute xml:whitespace { "preserve" }?, - + ## a text value about the stability of the documentation. Usually a simple description like stable or unstable text }? + ## documentation of an element & element doc { + ## Preserve the original formatting of the documentation from the source code attribute xml:space { "preserve" }?, + ## Keep the whitespace as they were in the source code attribute xml:whitespace { "preserve" }?, - + ## The file containing this documentation + attribute filename { xsd:string }, + ## The first line of the documentation in the source code + attribute line { xsd:string }, + ## The first column of the documentation in the source code + attribute column { xsd:string }, + ## the text of the documentation text }? + ## Deprecated documentation of an element. Kept for historical reasons in general & element doc-deprecated { + ## Preserve the original formatting of the documentation from the source code attribute xml:space { "preserve" }?, + ## Keep the whitespace as they were in the source code attribute xml:whitespace { "preserve" }?, - + ## the text of the deprecated documentation text }? + ## Position of the documentation in the original source code + & element source-position { + ## File name of the source of the documentation + attribute filename { xsd:string }, + ## The first line of the documentation in the source code + attribute line { xsd:string }, + ## The first column of the documentation in the source code + attribute column { xsd:string }, + }? ) + # Information about elements can be a documentation of annotations Info.elements = ( DocElements & Annotation* ) Constant = + ## A constant entity, similar to const variable in C element constant { Info.attrs, + ## name of the constant attribute name { xsd:string }, + ## value of the constant attribute value { xsd:string }, + ## corresponding C type of the constant in C attribute c:type { xsd:string }?, + ## corresponding C identifier in the source code attribute c:identifier { xsd:string }?, + # Other elements a record can contain (Info.elements & AnyType?) } Property = + ## Property, that is a variable or members with getter and setter functions element property { Info.attrs, + ## name of the property attribute name { xsd:string }, - + ## Binary attribute, true if the property is writeable, that is it has a setter function attribute writable { "0" | "1" }?, + ## Binary attribute, true if the property is readable, that is it has a getter function attribute readable { "0" | "1" }?, + ## Binary attribute, true if the property will be set upon construction attribute construct { "0" | "1" }?, + ## Binary attribute, true if the property can only be set upon construction attribute construct-only { "0" | "1" }?, + # Define the transfer of ownership of the property element TransferOwnership?, + # Other elements a property can contain (Info.elements & AnyType) } Signal = + ## A signal as defined in the GObject system (https://developer.gnome.org/gobject/stable/signal.html) element glib:signal { Info.attrs, + ## name of the signal attribute name { xsd:string }, - + ## Binary attribute, true if the signal has a detailed parameter (https://developer.gnome.org/gobject/stable/signal.html#signal-detail# and https://developer.gnome.org/gobject/unstable/gobject-Signals.html#GSignalFlags) attribute detailed { "0" | "1" }?, + ## When to run the signal during the 5 steps of signal emission (https://developer.gnome.org/gobject/stable/signal.html#signal-emission and https://developer.gnome.org/gobject/unstable/gobject-Signals.html#GSignalFlags) attribute when { "first" | "last" | "cleanup" }?, + ## Binary attribute, true if the signal can be freely emitted on alive objects from user code (https://developer.gnome.org/gobject/unstable/gobject-Signals.html#GSignalFlags) attribute action { "0" | "1" }?, + ## Binary attribute, true if no emission hooks are supported for this signal (https://developer.gnome.org/gobject/unstable/gobject-Signals.html#GSignalFlags) attribute no-hooks { "0" | "1" }?, + ## Binary attribute, true if signals emitted for an object while currently being in emission for this very object will not be emitted recursively, but instead cause the first emission to be restarted (https://developer.gnome.org/gobject/unstable/gobject-Signals.html#GSignalFlags) attribute no-recurse { "0" | "1" }?, + # Other elements a property can contain (Info.elements & Callable.params? & Callable.return?) } Field = + ## A field of struct of union structure, that is a C bit field, that is a fixed length in bits variable element field { Info.attrs, + ## name of the field attribute name { xsd:string }, - + ## Binary attribute, true if the field is writeable attribute writable { "0" | "1" }?, + ## Binary attribute, true if the field is readable attribute readable { "0" | "1" }?, + ## Binary attribute, true if the field is private to the structure or has public ("0") visibility attribute private { "0" | "1" }?, + ## number of bits of the field attribute bits { xsd:integer }?, + # Other elements a property can contain (Info.elements & (Callback | AnyType)) } Callback = + ## A callback closure, that is a function called when a signal is emitted (as an answer to that signal) element callback { Info.attrs, + ## name of the callback attribute name { xsd:string }, - + ## the C type returned by the callback closure (i.e. function) attribute c:type { xsd:string }?, + ## Binary attribute, true if the callback can throw an error attribute throws { "0" | "1" }?, + # Other elements a property can contain (Info.elements & Callable.params? & Callable.return?) } Implements = + ## Give the name of the interface it implements. This element is generally used within a class element element implements { + ## name of the interface implemented by a class attribute name { xsd:string } } Prerequisite = + ## Interface which is pre-required to implement another interface. This node is generally using within an interface element element prerequisite { + ## name of the required interface attribute name { xsd:string } } + # A generic grammar element to represent either a simple Type or an Array of the same Type AnyType = (Type | ArrayType) Type = + # A simple type of data (as opposed to an array) element type { + ## name of the type attribute name { xsd:string }?, + ## the C representation of the type attribute c:type { xsd:string }?, - attribute introspectable { xsd:string }?, + ## Binary attribute which is "0" (false) if the element is not introspectable. It doesn't exist in the bindings, due in general to missing information in the annotations in the original C code + attribute introspectable { "0" | "1" }?, (DocElements & AnyType*) } ArrayType = + ## An array type of data where each element is of the same type element array { + ## name of the array type attribute name { xsd:string }?, + ## Binary attribute, true if the last element of the array is zero. For example, in an array of pointers, the last pointer would be NULL attribute zero-terminated { "0" | "1" }?, + ## size of an array of predetermined fixed size. For example a C array declared as char arr[5]. attribute fixed-size { xsd:integer }?, - attribute introspectable { xsd:string }?, + ## Binary attribute which is "0" (false) if the element is not introspectable. It doesn't exist in the bindings, due in general to missing information in the annotations in the original C code + attribute introspectable { "0" | "1" }?, + ## 0-based index of parameter element that specifies the length of the array attribute length { xsd:integer }?, + ## the C representation of the array type attribute c:type { xsd:string }?, + # Type of the values contained in the array AnyType } TransferOwnership = + ## attributes used by many elements for the transfer of ownership, with for example, a returned value. "none" if the recipient does not own the value, "container" if the recipient owns the container but not the value (for arrays or lists for example) , "full" the recipient owns the entire value. For details, see https://wiki.gnome.org/Projects/GObjectIntrospection/Annotations#Memory_and_lifecycle_management attribute transfer-ownership { "none" | "container" | "full" } Constructor = + ## A constructor of a class element constructor { Callable.attrs, @@ -326,35 +477,56 @@ & Callable.return?) } + ## Attributes of a Callable (functions, callbacks, closures, etc...) Callable.attrs = ( Info.attrs, + ## name of the Callable attribute name { xsd:string }, - + # C identifier in the source code of the Callable attribute c:identifier { xsd:string }?, + ## Callable it is shadowed by. For example, in C++, only one version of an overloaded callable will appear attribute shadowed-by { xsd:string }?, + ## Callable it shadows. For example, in C++, only one version of an overloaded callable will appear attribute shadows { xsd:string }?, + ## Binary attribute, true if the callable can throw an error attribute throws { "0" | "1" }?, + ## if for backward compatibility reason the callable has a name in the source code but should be known by another one, this attribute contains the new name attribute moved-to { xsd:string }? ) VarArgs = + ## an element, usually found in a parameter element for variadic parameter in a function or callable element varargs { empty } + # Refer to https://wiki.gnome.org/Projects/GObjectIntrospection/Annotations#Support_for_GObject_closures Callable.params = + ## parameters element of a callable, that is in general parameters of a function or similar element parameters { + ## parameter element of a list of parameters element parameter { + ## name of the parameter attribute name { xsd:string }?, + ## Binary attribute, true if the parameter can have a null value attribute nullable { "0" | "1" }?, + ## Deprecated. Replaced by nullable and optional attribute allow-none { "0" | "1" }?, + ## Binary attribute which is "0" (false) if the element is not introspectable. It doesn't exist in the bindings, due in general to missing information in the annotations in the original C code attribute introspectable { "0" | "1" }?, + ## the parameter is a user_data for callbacks. The value points to a different parameter that is the actual callback attribute closure { xsd:integer }?, + ## the parameter is a destroy_data for callbacks. The value points to a different parameter that is the actual callback attribute destroy { xsd:integer }?, + ## the parameter is a callback, the value indicates the lifetime of the call. For language bindings which want to know when the resources required to do the call can be freed. "notified" valid until a GDestroyNotify argument is called, "async" only valid for the duration of the first callback invocationi (can only be called once), "call" only valid for the duration of the call, can be called multiple times during the call. attribute scope { "notified" | "async" | "call" }?, + ## direction of the parameter. "in" goes into the callable, "out" for output parameters from the callable (reference in C++, var in Pascal, etc...), "inout" for both (like a pre-allocated structure which will be filled-in by the callable) attribute direction { "out" | "in" | "inout" }?, + ## Binary attribute, true if the caller should allocate the parameter before calling the callable attribute caller-allocates { "0" | "1" }?, + ## Binary attribute, true if the parameter is optional attribute optional { "0" | "1" }?, + ## Binary attribute, true if the parameter can be omitted from the introspected output attribute skip { "0" | "1" }?, TransferOwnership?, @@ -362,12 +534,17 @@ & (AnyType | VarArgs)) }* + ## instance-parameter is a parameter of a C function which is an instance of an existing object. So the callable is surely a method of a class, and this parameter points to the instance of the object. In C++, this would be equivalent to the pointer this which is not passed to the method, in Python it's equivalent to self. & element instance-parameter { + ## name of the instance-parameter attribute name { xsd:string }, - + ## Binary attribute, true if the parameter can have a null value attribute nullable { "0" | "1" }?, + ## Deprecated. Replaced by nullable and optional attribute allow-none { "0" | "1" }?, + ## direction of the parameter. "in" goes into the callable, "out" for output parameters from the callable (reference in C++, var in Pascal, etc...), "inout" for both (like a pre-allocated structure which will be filled-in by the callable) attribute direction { "out" | "in" | "inout" }?, + ## Binary attribute, true if the caller should allocate the parameter before calling the callable attribute caller-allocates { "0" | "1" }?, TransferOwnership?, @@ -377,13 +554,21 @@ } Callable.return = + ## return value of a callable element return-value { - attribute introspectable { xsd:string }?, + ## Binary attribute which is "0" (false) if the element is not introspectable. It doesn't exist in the bindings, due in general to missing information in the annotations in the original C code + attribute introspectable { "0" | "1" }?, + ## Binary attribute, true if the parameter can have a null value attribute nullable { "0" | "1" }?, + ## the parameter is a user_data for callbacks. The value points to a different parameter that is the actual callback attribute closure { xsd:integer }?, + ## the parameter is a callback, the value indicates the lifetime of the call. For language bindings which want to know when the resources required to do the call can be freed. "notified" valid until a GDestroyNotify argument is called, "async" only valid for the duration of the first callback invocationi (can only be called once), "call" only valid for the duration of the call, can be called multiple times during the call. attribute scope { "notified" | "async" | "call" }?, + ## the parameter is a destroy_data for callbacks. The value points to a different parameter that is the actual callback attribute destroy { xsd:integer }?, + ## Binary attribute, true if the parameter can be omitted from the introspected output attribute skip { "0" | "1" }?, + ## Deprecated. Replaced by nullable and optional attribute allow-none { "0" | "1" }?, TransferOwnership?, @@ -392,6 +577,7 @@ } Function = + ## element defining a standalone function (as usual in most programming languages) element function { Callable.attrs, @@ -401,6 +587,7 @@ } Method = + ## element defining a method from a class element method { Callable.attrs, @@ -410,8 +597,10 @@ } VirtualMethod = + ## element defining a virtual method from a class, concept similar to C++ element virtual-method { Callable.attrs, + ## name of the callable called when invoking this virtual method attribute invoker { xsd:string }?, (Info.elements @@ -420,13 +609,19 @@ } Union = + ## element defining a type of data being a union of type, similar to union in C/C++ but extended with fields and methods element union { Info.attrs, + ## name of the union attribute name { xsd:string }?, + ## C type defining the union attribute c:type { xsd:string }?, + ## prefix to filter out from C functions. For example, gtk_window_new will lose gtk_ attribute c:symbol-prefix { xsd:string }?, - attribute glib:get-type { xsd:string }?, + ## GObject compatible type name attribute glib:type-name { xsd:string }?, + ## function to retrieve the GObject compatible type of the element + attribute glib:get-type { xsd:string }?, (Info.elements & Field* @@ -437,12 +632,16 @@ } BitField = + ## element defining a bit field (as in C) element bitfield { Info.attrs, + ## name of the bit field attribute name { xsd:string }, + ## corresponding C type of the bit field type attribute c:type { xsd:string }, - + ## GObject compatible type name attribute glib:type-name { xsd:string }?, + ## function to retrieve the GObject compatible type of the element attribute glib:get-type { xsd:string }?, (Info.elements @@ -451,13 +650,18 @@ } Enum = + ## element defining a enumeration type similar to enum in C/C++ element enumeration { Info.attrs, + ## name of the enumeration attribute name { xsd:string }, + ## corresponding C type of the enumeration type attribute c:type { xsd:string }, - + ## GObject compatible type name attribute glib:type-name { xsd:string }?, + ## function to retrieve the GObject compatible type of the element attribute glib:get-type { xsd:string }?, + ## Error domain of this enumeration in a stringified form attribute glib:error-domain { xsd:string }?, (Info.elements @@ -466,12 +670,16 @@ } Member = + ## element defining a member of a bit field or an enumeration element member { Info.attrs, + ## name of the member attribute name { xsd:string }, + ## value of the member attribute value { xsd:string }, + ## corresponding C type of the member attribute c:identifier { xsd:string }, - + ## short nickname of the member attribute glib:nick { xsd:string }?, Info.elements diff -Nru gobject-introspection-1.56.1/docs/g-ir-compiler.1 gobject-introspection-1.64.1/docs/g-ir-compiler.1 --- gobject-introspection-1.56.1/docs/g-ir-compiler.1 2018-03-10 20:26:54.000000000 +0000 +++ gobject-introspection-1.64.1/docs/g-ir-compiler.1 2020-04-05 14:08:04.682724700 +0000 @@ -1,41 +1,80 @@ -.TH "g-ir-compiler" 1 -.nh +.\" Man page generated from reStructuredText. +. +.TH G-IR-COMPILER 1 "" "" "" .SH NAME -g-ir-compiler \- typelib compiler. +g-ir-compiler \- Typelib compiler +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. .SH SYNOPSIS -.B g-ir-compiler -[OPTION...] GIRFILE +.sp +\fBg\-ir\-compiler\fP [OPTION...] GIRFILE .SH DESCRIPTION -g-ir-compiler converts one or more GIR files into one or more typelib. -The output will be written to standard output unless the --output -is specified. +.sp +g\-ir\-compiler converts one or more GIR files into one or more typelib. The +output will be written to standard output unless the \fB\-\-output\fP is +specified. .SH OPTIONS +.INDENT 0.0 .TP -.B \--help +.B \-\-help Show help options .TP -.B \--output=FILENAME +.BI \-\-output\fB= FILENAME Save the resulting output in FILENAME. .TP -.B \--verbose +.B \-\-verbose Show verbose messages .TP -.B \--debug +.B \-\-debug Show debug messages .TP -.B \--includedir=DIRECTORY +.BI \-\-includedir\fB= DIRECTORY Adds a directory which will be used to find includes inside the GIR format. .TP -.B \--module=MODULE +.BI \-\-module\fB= MODULE FIXME .TP -.B \--shared-library=FILENAME -Specifies the shared library where the symbols in the typelib can be found. -The name of the library should not contain the ending shared library suffix. -.TP +.BI \-\-shared\-library\fB= FILENAME +Specifies the shared library where the symbols in the typelib can be +found. The name of the library should not contain the ending shared +library suffix. +.TP +.B \-\-version +Show program\(aqs version number and exit +.UNINDENT .SH BUGS -Report bugs at https://gitlab.gnome.org/GNOME/gobject\-introspection/issues. -.SH HOMEPAGE and CONTACT -http://live.gnome.org/GObjectIntrospection +.sp +Report bugs at \fI\%https://gitlab.gnome.org/GNOME/gobject\-introspection/issues\fP +.SH HOMEPAGE AND CONTACT +.sp +\fI\%http://live.gnome.org/GObjectIntrospection\fP .SH AUTHORS +.sp Mattias Clasen +.\" Generated by docutils manpage writer. +. diff -Nru gobject-introspection-1.56.1/docs/g-ir-generate.1 gobject-introspection-1.64.1/docs/g-ir-generate.1 --- gobject-introspection-1.56.1/docs/g-ir-generate.1 2018-03-10 20:26:54.000000000 +0000 +++ gobject-introspection-1.64.1/docs/g-ir-generate.1 2020-04-05 14:08:04.682724700 +0000 @@ -1,29 +1,66 @@ -.TH "g-ir-generate" 1 -.nh +.\" Man page generated from reStructuredText. +. +.TH G-IR-GENERATE 1 "" "" "" .SH NAME -g-ir-generate \- typelib generator +g-ir-generate \- Typelib generator +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. .SH SYNOPSIS -.B g-ir-generate -[OPTION...] FILES... +.sp +\fBg\-ir\-generate\fP [OPTION...] FILES... .SH DESCRIPTION -g-ir-generate is an GIR generator, using the repository API. It generates -GIR files from a raw typelib or in a shared library (--shlib). -The output will be written to standard output unless the --output -is specified. +.sp +g\-ir\-generate is an GIR generator, using the repository API. It generates GIR +files from a raw typelib or in a shared library (\fB\-\-shlib\fP). The output will +be written to standard output unless the \fB\-\-output\fP is specified. .SH OPTIONS +.INDENT 0.0 .TP -.B \, --help +.B \-\-help Show help options .TP -.B \, --shlib=FILENAME +.BI \-\-shlib\fB= FILENAME The shared library to read the symbols from. .TP -.B \, --output=FILENAME +.BI \-\-output\fB= FILENAME Save the resulting output in FILENAME. .TP +.B \-\-version +Show program\(aqs version number and exit +.UNINDENT .SH BUGS -Report bugs at https://gitlab.gnome.org/GNOME/gobject\-introspection/issues. -.SH HOMEPAGE and CONTACT -http://live.gnome.org/GObjectIntrospection +.sp +Report bugs at \fI\%https://gitlab.gnome.org/GNOME/gobject\-introspection/issues\fP +.SH HOMEPAGE AND CONTACT +.sp +\fI\%http://live.gnome.org/GObjectIntrospection\fP .SH AUTHORS +.sp Mattias Clasen +.\" Generated by docutils manpage writer. +. diff -Nru gobject-introspection-1.56.1/docs/g-ir-scanner.1 gobject-introspection-1.64.1/docs/g-ir-scanner.1 --- gobject-introspection-1.56.1/docs/g-ir-scanner.1 2018-03-10 20:26:54.000000000 +0000 +++ gobject-introspection-1.64.1/docs/g-ir-scanner.1 2020-04-05 14:08:04.682724700 +0000 @@ -1,154 +1,185 @@ -.TH "g-ir-scanner" 1 -.nh +.\" Man page generated from reStructuredText. +. +.TH G-IR-SCANNER 1 "" "" "" .SH NAME -g-ir-scanner \- extracting C metadata from sources and headers +g-ir-scanner \- Extracting C metadata from sources and headers +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. .SH SYNOPSIS -.B g-ir-scanner -[OPTION...] FILES... +.sp +\fBg\-ir\-scanner\fP [OPTION...] FILES... .SH DESCRIPTION -g-ir-scanner is a tool which generates GIR XML files by parsing headers -and introspecting GObject based libraries. -It is usually invoked during the normal build step for a project and -the information is saved to disk and later installed, so that language bindings -and other applications can use it. -Header files and source files are passed in as arguments on the command line. -The suffix determines whether a file be treated as a source file (.c) or a -header file (.h). Currently only C based libraries are supported by the scanner. +.sp +g\-ir\-scanner is a tool which generates GIR XML files by parsing headers and +introspecting GObject based libraries. It is usually invoked during the normal +build step for a project and the information is saved to disk and later +installed, so that language bindings and other applications can use it. Header +files and source files are passed in as arguments on the command line. The +suffix determines whether a file be treated as a source file (.c) or a header +file (.h). Currently only C based libraries are supported by the scanner. .SH OPTIONS +.INDENT 0.0 .TP -.B \--help +.B \-\-help Show help options .TP -.B \--quiet +.B \-\-quiet If passed, do not print details of normal operation. .TP -.B \--warn-all +.B \-\-warn\-all Display warnings for public API which is not introspectable. .TP -.B \--warn-error +.B \-\-warn\-error Make warnings be fatal errors. .TP -.B \--format=FORMAT -This parameters decides which the resulting format will be used. -The default value is gir. +.BI \-\-format\fB= FORMAT +This parameters decides which the resulting format will be used. The +default value is gir. .TP -.B \--include=NAME +.BI \-\-include\fB= NAME Add the specified introspection dependency to the scanned namespace. -NAME is of the form NAMESPACE-VERSION, like Gtk-3.0. +NAME is of the form NAMESPACE\-VERSION, like Gtk\-3.0. .TP -.B \--include-uninstalled=PATH +.BI \-\-include\-uninstalled\fB= PATH Add the specified introspection dependency to the scanned namespace. -This differs from \--include in that it takes a file path, and -does not process the pkg-config dependencies (since they may not -be installed yet). -.TP -.B \--add-include-path=PATH -Add a directory to the path which the scanner uses to find GIR files. -Can be used multiple times to specify multiple directories +This differs from \fB\-\-include\fP in that it takes a file path, and does not +process the pkg\-config dependencies (since they may not be installed yet). .TP -.B \-i, --library=LIBRARY +.BI \-\-add\-include\-path\fB= PATH +Add a directory to the path which the scanner uses to find GIR files. Can +be used multiple times to specify multiple directories +.TP +.BI \-i\fP,\fB \-\-library\fB= LIBRARY Specifies a library that will be introspected. This means that the -*_get_type() functions in it will be called for GObject data types. -The name of the library should not contain the leading lib prefix nor -the ending shared library suffix. -.TP -.B \-L, --library-path=PATH -Include this directory when searching for a library. -This option can be specified multiple times to include more than one -directory to look for libraries in. +*_get_type() functions in it will be called for GObject data types. The +name of the library should not contain the leading lib prefix nor the +ending shared library suffix. +.TP +.BI \-L\fP,\fB \-\-library\-path\fB= PATH +Include this directory when searching for a library. This option can be +specified multiple times to include more than one directory to look for +libraries in. .TP -.B \-Idirectory +.BI \-I\fB directory Include this directory in the list of directories to be searched for -header files. You need to pass to the scanner all the directories -you'd normally pass to the compiler when using the specified source -files. +header files. You need to pass to the scanner all the directories you\(aqd +normally pass to the compiler when using the specified source files. +.TP +.BI \-\-c\-include\fB= C_INCLUDES +Headers which should be included in C programs. This option can be +specified multiple times to include more than one header. .TP -.B \-n, --namespace=NAME +.BI \-n\fP,\fB \-\-namespace\fB= NAME The namespace name. This name should be capitalized, eg the first letter should be upper case. Examples: Gtk, Clutter, WebKit. .TP -.B \--no-libtool -Disable usage of libtool for compiling stub introspection binary. Use this +.B \-\-no\-libtool +Disable usage of libtool for compiling stub introspection binary. Use this if your build system does not require libtool. .TP -.B \--libtool -Full path to libtool executable. Typically used for Automake systems. +.B \-\-libtool +Full path to libtool executable. Typically used for Automake systems. .TP -.B \--nsversion=VERSION -The namespace version. For instance 1.0. This is usually the platform version, -eg 2.0 for Gtk+, not 2.12.7. +.BI \-\-nsversion\fB= VERSION +The namespace version. For instance 1.0. This is usually the platform +version, eg 2.0 for Gtk+, not 2.12.7. .TP -.B \-p, --program=PROGRAM +.BI \-p\fP,\fB \-\-program\fB= PROGRAM Specifies a binary that will be introspected. This means that the -*_get_type() functions in it will be called for GObject data types. -The binary must be modified to take a --introspect-dump= option, and -to pass the argument to this function to g_irepository_dump. +*_get_type() functions in it will be called for GObject data types. The +binary must be modified to take a \fB\-\-introspect\-dump=\fP option, and to pass +the argument to this function to g_irepository_dump. .TP -.B \--program-arg=ARG +.BI \-\-program\-arg\fB= ARG Additional argument to pass to program for introspection. .TP -.B \--identifier-prefix=PREFIX -This option may be specified multiple times. Each one -gives a prefix that will be stripped from all C identifiers. -If none specified, the namespace will be used. -Eg, an identifier prefix of -.B Foo -will export the identifier -.B typdef struct _FooBar FooBar; -as -.B Foo.Bar. -.TP -.B \--symbol-prefix=PREFIX -This option may be specified multiple times. Each one -gives a prefix that will be stripped from all C symbols. -Eg, an symbol prefix of -.B foo -will export the symbol -.B foo_bar_do_something -as -.B Foo.Bar.do_something. -.TP -.B \--accept-unprefixed -If specified, the scanner will accept identifiers and symbols which -do not match the namespace prefix. Try to avoid using this if possible. -.TP -.B \--output=FILENAME -Name of the file to output. Normally namespace + format extension. -Eg, GLib-2.0.gir. -.TP -.B \--pkg=PACKAGE -List of pkg-config packages to get compiler and linker flags from. -This option can be specified multiple times to include flags from -several pkg-config packages. -.TP -.B \--pkg-export=PACKAGE -List of pkg-config packages that are provided by the generated gir. -This option can be specified multiple times if the gir provides more -packages. -If not specified, the packages specified with --pkg= will be used. +.BI \-\-identifier\-prefix\fB= PREFIX +This option may be specified multiple times. Each one gives a prefix that +will be stripped from all C identifiers. If none specified, the namespace +will be used. Eg, an identifier prefix of Foo will export the identifier +typdef struct _FooBar FooBar; as Foo.Bar. +.TP +.BI \-\-symbol\-prefix\fB= PREFIX +This option may be specified multiple times. Each one gives a +prefix that will be stripped from all C symbols. Eg, an symbol +prefix of foo will export the symbol foo_bar_do_something as +Foo.Bar.do_something. +.TP +.B \-\-accept\-unprefixed +If specified, the scanner will accept identifiers and symbols which do not +match the namespace prefix. Try to avoid using this if possible. +.TP +.BI \-\-output\fB= FILENAME +Name of the file to output. Normally namespace + format extension. Eg, +GLib\-2.0.gir. +.TP +.BI \-\-pkg\fB= PACKAGE +List of pkg\-config packages to get compiler and linker flags from. This +option can be specified multiple times to include flags from several +pkg\-config packages. +.TP +.BI \-\-pkg\-export\fB= PACKAGE +List of pkg\-config packages that are provided by the generated gir. This +option can be specified multiple times if the gir provides more packages. +If not specified, the packages specified with \fB\-\-pkg=\fP will be used. .TP -.B \--verbose +.B \-\-verbose Be verbose, include some debugging information. -.TP +.UNINDENT .SH ENVIRONMENT VARIABLES -The g-ir-scanner uses the XDG_DATA_DIRS variable to check for dirs, -the girs are located in XDG_DATA_DIRS/gir-1.0. It is normally -set on a distribution so you shouldn't need to set it yourself. - -The variable GI_SCANNER_DISABLE_CACHE ensures that the scanner will -not write cache data to $HOME. - -The variable GI_SCANNER_DEBUG can be used to debug issues in the build-system that -involve g-ir-scanner. When it is set to 'save-temps', then g-ir-scanner will not remove -temporary files and directories after it terminates. - -The variable GI_HOST_OS can be used to control the OS name on the -host that runs the scanner. It has the same semantics as the Python -os.name property. +.sp +The g\-ir\-scanner uses the \fBXDG_DATA_DIRS\fP variable to check for dirs, the +girs are located in \fBXDG_DATA_DIRS/gir\-1.0\fP\&. It is normally set on a +distribution so you shouldn\(aqt need to set it yourself. +.sp +The variable \fBGI_SCANNER_DISABLE_CACHE\fP ensures that the scanner will not +write cache data to \fB$HOME\fP\&. +.sp +The variable \fBGI_SCANNER_DEBUG\fP can be used to debug issues in the +build\-system that involve g\-ir\-scanner. When it is set to \fBsave\-temps\fP, then +g\-ir\-scanner will not remove temporary files and directories after it +terminates. +.sp +The variable \fBGI_HOST_OS\fP can be used to control the OS name on the host +that runs the scanner. It has the same semantics as the Python \fBos.name\fP +property. +.sp +The variable \fBGI_CROSS_LAUNCHER\fP can be used to wrap the GType introspection +binary generated by g\-ir\-scanner before executing it. It is useful when +generating introspection data in a cross-compilation environment. .SH BUGS -Report bugs at https://gitlab.gnome.org/GNOME/gobject\-introspection/issues. -.SH HOMEPAGE and CONTACT -http://live.gnome.org/GObjectIntrospection +.sp +Report bugs at \fI\%https://gitlab.gnome.org/GNOME/gobject\-introspection/issues\fP +.SH HOMEPAGE AND CONTACT +.sp +\fI\%http://live.gnome.org/GObjectIntrospection\fP .SH AUTHORS +.sp Johan Dahlin - +.\" Generated by docutils manpage writer. +. diff -Nru gobject-introspection-1.56.1/docs/global-module-registry.txt gobject-introspection-1.64.1/docs/global-module-registry.txt --- gobject-introspection-1.56.1/docs/global-module-registry.txt 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/global-module-registry.txt 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,60 @@ +Problem statement +================= +On-disk registry for mapping namespace to typelib. +Conceptually similar to mono /etc/mono/config. + +It should be possible in a dynamic language such as python to just do: + +>>> import PythonIntrospectionBindings +>>> import Gtk + + +Gtk should be a special namespace provided by the package containing the +Gtk namespace + +Layout of the on disk tool +========================== + +Location to should be /var/lib/glib/introspection-registry.xml +Should be read completely. Not expected to be larger than one page on most +systems. + +Layout in XML: + + + + + + + +FIXME: version? +FIXME: pkg-config name? + +The overhead should be reduced to a minimum, both runtime and memory footprint. +Thus a binary format that is mmap(2):able is ideal: + +gir-registry-tool +================ +Is a command line utility, probably written in C which should be used +to update/modify the registry. + +Example use cases, installing a new typelib + +gir-registry-tool --install Gtk /usr/lib/glib/introspection/gtk.typelib 2.12.0 +gir-registry-tool --uninstall Gtk /usr/lib/glib/introspection/gtk.typelib 2.12.0 + +It's the registry tools responsibility to sort the disk format. + +API +=== + +libgirepository should provide an api: + +gi_locale_typelib (const gchar *name, const gchar * version); + +version should NULL, if so it should pick the first one in the on-disk registry. + +libgirepository should mmap the registry and read it when that API is called +the first time. diff -Nru gobject-introspection-1.56.1/docs/Makefile.am gobject-introspection-1.64.1/docs/Makefile.am --- gobject-introspection-1.56.1/docs/Makefile.am 2017-05-13 13:19:04.000000000 +0000 +++ gobject-introspection-1.64.1/docs/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -if ENABLE_GTK_DOC -SUBDIRS = reference -endif - -# Install the gir-1.2 schema -schemadir = $(datadir)/gir-1.0 -dist_schema_DATA = gir-1.2.rnc diff -Nru gobject-introspection-1.56.1/docs/Makefile.in gobject-introspection-1.64.1/docs/Makefile.in --- gobject-introspection-1.56.1/docs/Makefile.in 2018-04-09 06:15:36.000000000 +0000 +++ gobject-introspection-1.64.1/docs/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,740 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = docs -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(dist_schema_DATA) \ - $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ - ctags-recursive dvi-recursive html-recursive info-recursive \ - install-data-recursive install-dvi-recursive \ - install-exec-recursive install-html-recursive \ - install-info-recursive install-pdf-recursive \ - install-ps-recursive install-recursive installcheck-recursive \ - installdirs-recursive pdf-recursive ps-recursive \ - tags-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(schemadir)" -DATA = $(dist_schema_DATA) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -am__recursive_targets = \ - $(RECURSIVE_TARGETS) \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = reference -am__DIST_COMMON = $(srcdir)/Makefile.in -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CAIRO_CFLAGS = @CAIRO_CFLAGS@ -CAIRO_GIR_PACKAGE = @CAIRO_GIR_PACKAGE@ -CAIRO_LIBS = @CAIRO_LIBS@ -CAIRO_SHARED_LIBRARY = @CAIRO_SHARED_LIBRARY@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXPANDED_BINDIR = @EXPANDED_BINDIR@ -EXPANDED_DATADIR = @EXPANDED_DATADIR@ -EXPANDED_LIBDIR = @EXPANDED_LIBDIR@ -EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@ -EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@ -EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@ -EXTRA_LINK_FLAGS = @EXTRA_LINK_FLAGS@ -FFI_CFLAGS = @FFI_CFLAGS@ -FFI_LIBS = @FFI_LIBS@ -FFI_PC_CFLAGS = @FFI_PC_CFLAGS@ -FFI_PC_LIBS = @FFI_PC_LIBS@ -FFI_PC_PACKAGES = @FFI_PC_PACKAGES@ -FGREP = @FGREP@ -GIO_CFLAGS = @GIO_CFLAGS@ -GIO_LIBS = @GIO_LIBS@ -GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ -GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ -GIREPO_CFLAGS = @GIREPO_CFLAGS@ -GIREPO_LIBS = @GIREPO_LIBS@ -GIR_DIR = @GIR_DIR@ -GIR_SUFFIX = @GIR_SUFFIX@ -GI_HIDDEN_VISIBILITY_CFLAGS = @GI_HIDDEN_VISIBILITY_CFLAGS@ -GI_VERSION = @GI_VERSION@ -GLIBSRC = @GLIBSRC@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ -GMODULE_CFLAGS = @GMODULE_CFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CFLAGS = @GOBJECT_CFLAGS@ -GOBJECT_INTROSPECTION_LIBDIR = @GOBJECT_INTROSPECTION_LIBDIR@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTKDOC_CHECK = @GTKDOC_CHECK@ -GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ -GTKDOC_MKPDF = @GTKDOC_MKPDF@ -GTKDOC_REBASE = @GTKDOC_REBASE@ -HTML_DIR = @HTML_DIR@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -POW_LIB = @POW_LIB@ -PYTHON = @PYTHON@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_INCLUDES = @PYTHON_INCLUDES@ -PYTHON_LIBS = @PYTHON_LIBS@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SCANNER_CFLAGS = @SCANNER_CFLAGS@ -SCANNER_LIBS = @SCANNER_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -YACC = @YACC@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pyexecdir = @pyexecdir@ -pythondir = @pythondir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -@ENABLE_GTK_DOC_TRUE@SUBDIRS = reference - -# Install the gir-1.2 schema -schemadir = $(datadir)/gir-1.0 -dist_schema_DATA = gir-1.2.rnc -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign docs/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-dist_schemaDATA: $(dist_schema_DATA) - @$(NORMAL_INSTALL) - @list='$(dist_schema_DATA)'; test -n "$(schemadir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(schemadir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(schemadir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(schemadir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(schemadir)" || exit $$?; \ - done - -uninstall-dist_schemaDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_schema_DATA)'; test -n "$(schemadir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(schemadir)'; $(am__uninstall_files_from_dir) - -# This directory's subdirectories are mostly independent; you can cd -# into them and run 'make' without going through this Makefile. -# To change the values of 'make' variables: instead of editing Makefiles, -# (1) if the variable is set in 'config.status', edit 'config.status' -# (which will cause the Makefiles to be regenerated when you run 'make'); -# (2) otherwise, pass the desired values on the 'make' command line. -$(am__recursive_targets): - @fail=; \ - if $(am__make_keepgoing); then \ - failcom='fail=yes'; \ - else \ - failcom='exit 1'; \ - fi; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-recursive - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-recursive - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(DATA) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(schemadir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: install-dist_schemaDATA - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-dist_schemaDATA - -.MAKE: $(am__recursive_targets) install-am install-strip - -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ - check-am clean clean-generic clean-libtool cscopelist-am ctags \ - ctags-am distclean distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-dist_schemaDATA install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-dist_schemaDATA - -.PRECIOUS: Makefile - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru gobject-introspection-1.56.1/docs/meson.build gobject-introspection-1.64.1/docs/meson.build --- gobject-introspection-1.56.1/docs/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/meson.build 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,6 @@ +install_man('g-ir-compiler.1', 'g-ir-generate.1', 'g-ir-scanner.1') +install_data('gir-1.2.rnc', install_dir: join_paths(get_option('datadir'), 'gir-1.0')) + +if get_option('gtk_doc') + subdir('reference') +endif diff -Nru gobject-introspection-1.56.1/docs/metadata-annotations-proposal.txt gobject-introspection-1.64.1/docs/metadata-annotations-proposal.txt --- gobject-introspection-1.56.1/docs/metadata-annotations-proposal.txt 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/metadata-annotations-proposal.txt 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,181 @@ +***FIXME**** +Currently annotations are required to be pooled in one place, +sorted by entry offset. That makes it impossible to add annotations +in incremental manner, making it impossible for dynamic languages +like Python to give correct metadata. We should probably remove that +requirement, and add offset to annotations to each annotatable entry, +this however means 4*n more bytes used :\ +***FIXME**** + + mclasen: Incremental generation of metadata is already + problematic without annotations, since you have to grow the + directory, and we currently assume that local entries + are before remote entries in the directory. + Adding 4 bytes to each type, value and arg blob is certainly + going to blow the size of the metadata up unreasonably, + since these are the most common blob types. + + +Typed annotations: + +struct AnnotationBlob +{ + guint32 entry_offset; + guint32 type; + guint32 values_offset; +}; + +entry_offset: offset of metadata entry (must be valid target for this + annotation) described by this annotation + +type: offset of AttributeBlob describing type of this annotation + +values_offset: offset to n_fields (read from corresponding AttributeBlob) + values of appropriate types, specifying value of this + annotation + + + mclasen: What type of blob is being pointed to here ? + ValueBlob only holds integer types (for use in enums). + For general types, you will probably have to use + ConstantBlobs. + + +typedef enum +{ + function = 1 << 0, + type = 1 << 1, + param = 1 << 2, + value = 1 << 3, + signal = 1 << 4, + property = 1 << 5, + + all = 0x3F, +} AttributeTargets; + + + mclasen: Does "all" mean just all of the above, or + any blob ? Whats the rationale for not allowing annotations + on some blob types ? Wouldn't it be better to specify + the attribut target using the blob type enum (no way to + specify a subset of targets then, but we could still + indicate "all", e.g. as 0) + + +struct AttributeBlob +{ + guint16 blob_type; /* 11 */ + guint deprecated : 1; + guint allow_multiple : 1; + AttributeTargets targets : 6; + guint has_constructor : 1; + guint reserved : 8; + guint32 name; + + GTypeBlob gtype; + guint32 constructor; + guint16 n_fields; + FieldBlob fields[]; +}; + +allow_multiple: if that attribute can be applied multiple times to one + annotated entry. + +targets: bitmask of allowed targets for annotation with this attribute. + Possible targets are: function (including methods), function + parameter, type (that is, object, enum, or interface), value + (constant or variable exposed from metadata), signal or + property. + +has_constructor: if that attribute has constructor. If 0, default constructor + is used. + +name: name of this attribute. + +gtype: GType under which is the attribute registered. + + + mclasen: This is unclear. Why would attributes be registered + in GType ? Do we have a special base type for them ? Do + they need to conform to some interface ? + + +constructor: offset to constructor function for this attribute, or 0 if + default is used. + + + mclasen: This is unclear. Who uses this constructor, and + what is it used for ? + + +n_fields: number of fields this attribute has + + + mclasen: it seems to me that, since we have struct support, + a single field would be sufficient. + + +fields: array of SimpleTypeBlobs describing fields this attribute has. + Only allowed are types for which valid literals exist. Currently + that's the following types: + void + boolean + int8 + uint8 + int16 + uint16 + int32 + uint32 + int64 + uint64 + int + uint + long + ulong + ssize_t + size_t + float + double + utf8 + filename + type + + "type" is guint32 specifying offset to another metadata + entry describing one of: object, interface, enum, function + (including methods), callback, signal or constant. "type" + literals should be exposed to the user either as strings + specyfing fully qualified name of one of above types, + mangled according to rules of language used (if the language + uses any mangling of type names), or type expressed as + valid type literal in syntax of language. + Implementation is responsible for reading such type name and + converting it to correct guint32 value. + + + mclasen: I would be pragmatic and specify types just be + a qualified name, as you already do in your C example below. + But I think there is a case for allowing arrays of basic + types. I could imagine storing the "Since: 2.6" annotation + as { 2, 6 } + + + For example, Python might use the following syntax: + + gobject.annotation(my_container, ContainerTypeAttribute, + type=gobject.GObject) + + Here, my_container is variable of some container class, + ContainerTypeAttribute is hypothetical attribute specifying + specialisation for containers, and type=gobject.GObject says + that this given container will hold GObjects. Python + implementation is now responsible for converting gobject.GObject + into guint32 value pointing to definition of GObject (***FIXME*** + how do we deal with GObject which is fundamental type?). + + The same expressed in C could look as follows: + + G_OBJECT_ANNOTATION(my_container_constant, ContainerTypeAttribute + "type", "GObject.GObject") + + where G_OBJECT_ANNOTATION is hypothetical macro used for marking + annotations for metadata scanner. diff -Nru gobject-introspection-1.56.1/docs/reference/gi-docs.xml gobject-introspection-1.64.1/docs/reference/gi-docs.xml --- gobject-introspection-1.56.1/docs/reference/gi-docs.xml 2014-08-04 14:37:07.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/gi-docs.xml 2020-04-05 14:08:04.682724700 +0000 @@ -5,99 +5,31 @@ ]> - GObject Introspection Reference Manual + libgirepository API Reference - GObject Introspection Reference Manual + libgirepository API Reference - This document is for GObject Introspection version &version;. + This document is for libgirepository version &version;. The latest version of this documentation can be found on-line at - http://developer.gnome.org/gi/unstable/. - - - - - GObject-Introspection Overview - - GObject-Introspection is striving to provide a middleware layer between - (GObject based) C libraries and language bindings. The primary goal of - this project is to minimize duplicated effort in language binding - projects by providing shared metadata files on bound C libraries. - Language bindings can read these metadata files at runtime to learn - how to interface with a bound C library. - - - - - - - + + - - The GObject-Introspection package contains of a few different parts: - - - The GIR XML format - an XML format describing the exported C API including documentation - - - The GTypelib format - a binary format optimized for fast disk access and low memory usage - - - g-ir-scanner - parses C source code and gtk-doc comments and generates GIR XML files - - - g-ir-compiler - compiles GIR XML files into typelibs - - - libgirepository - library to access typelib from C - - - - The following illustration shows how the different components fit together: - - + + + + - - API Reference - GIRepository - + GIBaseInfo - - @@ -121,25 +53,15 @@ - - GITypelib - - - - - TODO + FFI Interface - - - - + + Internals & Typelib Format + + Index @@ -149,26 +71,37 @@ Index of deprecated symbols - - Index of new symbols in 1.29.0 - - - - Index of new symbols in 1.29.17 - - - - Index of new symbols in 1.30.1 - + + Index of new symbols in 1.30 + + + + Index of new symbols in 1.32 + Index of new symbols in 1.34 - - Index of new symbols in 1.35.8 - + + Index of new symbols in 1.36 + + + + Index of new symbols in 1.42 + + + + Index of new symbols in 1.44 + + + + Index of new symbols in 1.46 + + + + Index of new symbols in 1.60 + - diff -Nru gobject-introspection-1.56.1/docs/reference/gi-gir-reference.xml gobject-introspection-1.64.1/docs/reference/gi-gir-reference.xml --- gobject-introspection-1.56.1/docs/reference/gi-gir-reference.xml 2015-03-14 07:48:59.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/gi-gir-reference.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,123 +0,0 @@ - - - -]> - - - The GIR XML format - 3 - The GIR XML format - - - The GIR XML format - The GIR XML format - - - - This chapter describes the GIR XML markup format. This describes exported C - API, including documentation. It may contain installation-specific data, - such as library filenames which may differ between platforms. - - - - <emphasis>api</emphasis> node - - The root node of all GIR documents is the api node. - - Possible children: namespace. - - - A GIR fragment showing an api node - - - ]]> - - - - - <emphasis>namespace</emphasis> node - - Parent node: api. - Possible children: callback, - class, - function. - interface. - - - A GIR fragment showing an namespace node - - - - - - ]]> - - - - - <emphasis>class</emphasis> node - - Parent node: namespace. - Possible children: constructor, - field, - method, - property. - - A GIR fragment showing an class node - - - - - - - - - - ]]> - - - - - <emphasis>interface</emphasis> node - - Parent node: namespace. - Possible children: field, - method, - property. - - A GIR fragment showing an interface node - - - - - - - - - ]]> - - - - - <emphasis>function</emphasis> node - - Parent node: namespace. - - A GIR fragment showing an function node - - - - - - ]]> - - - - diff -Nru gobject-introspection-1.56.1/docs/reference/gi-sections.txt gobject-introspection-1.64.1/docs/reference/gi-sections.txt --- gobject-introspection-1.56.1/docs/reference/gi-sections.txt 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/gi-sections.txt 2020-04-05 14:08:04.682724700 +0000 @@ -29,6 +29,8 @@ g_irepository_find_by_error_domain g_irepository_find_by_name +g_irepository_get_object_gtype_interfaces + g_irepository_dump gi_cclosure_marshal_generic @@ -47,10 +49,48 @@ GIRepositoryPrivate g_irepository_get_type g_irepository_error_quark +GI_AVAILABLE_IN_1_32 +GI_AVAILABLE_IN_1_34 +GI_AVAILABLE_IN_1_36 +GI_AVAILABLE_IN_1_38 +GI_AVAILABLE_IN_1_40 +GI_AVAILABLE_IN_1_42 +GI_AVAILABLE_IN_1_44 +GI_AVAILABLE_IN_1_46 +GI_AVAILABLE_IN_1_60 +GI_AVAILABLE_IN_ALL +GI_DEPRECATED_IN_1_32 +GI_DEPRECATED_IN_1_32_FOR +GI_DEPRECATED_IN_1_34 +GI_DEPRECATED_IN_1_34_FOR +GI_DEPRECATED_IN_1_36 +GI_DEPRECATED_IN_1_36_FOR +GI_DEPRECATED_IN_1_38 +GI_DEPRECATED_IN_1_38_FOR +GI_DEPRECATED_IN_1_40 +GI_DEPRECATED_IN_1_40_FOR +GI_DEPRECATED_IN_1_42 +GI_DEPRECATED_IN_1_42_FOR +GI_DEPRECATED_IN_1_44 +GI_DEPRECATED_IN_1_44_FOR +GI_DEPRECATED_IN_1_46 +GI_DEPRECATED_IN_1_46_FOR + + +
+giversion +GI_MAJOR_VERSION +GI_MINOR_VERSION +GI_MICRO_VERSION +GI_CHECK_VERSION +gi_get_major_version +gi_get_minor_version +gi_get_micro_version
gibaseinfo +GIBaseInfo GIInfoType GIAttributeIter g_info_new @@ -65,11 +105,12 @@ g_base_info_iterate_attributes g_base_info_get_container g_base_info_is_deprecated +g_info_type_to_string GI_TYPE_BASE_INFO g_base_info_gtype_get_type -GIBaseInfoStub +GIUnresolvedInfo
@@ -101,6 +142,7 @@ g_callable_info_get_n_args g_callable_info_get_arg g_callable_info_get_caller_owns +g_callable_info_get_instance_ownership_transfer g_callable_info_get_return_attribute g_callable_info_get_return_type g_callable_info_invoke @@ -115,11 +157,11 @@
gicommontypes GIArgument -GIUnresolvedInfo GITypeTag GIArrayType GI_TYPE_TAG_N_TYPES G_TYPE_TAG_IS_BASIC +g_type_tag_to_string
@@ -297,6 +339,7 @@ gistructinfo GI_IS_STRUCT_INFO GIStructInfo +g_struct_info_find_field g_struct_info_get_alignment g_struct_info_get_size g_struct_info_is_gtype_struct @@ -314,8 +357,6 @@ gitypeinfo GI_IS_TYPE_INFO GITypeInfo -g_type_tag_to_string -g_info_type_to_string g_type_info_is_pointer g_type_info_get_tag g_type_info_get_param_type diff -Nru gobject-introspection-1.56.1/docs/reference/gi-struct-hierarchy.xml gobject-introspection-1.64.1/docs/reference/gi-struct-hierarchy.xml --- gobject-introspection-1.56.1/docs/reference/gi-struct-hierarchy.xml 2014-08-04 14:37:07.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/gi-struct-hierarchy.xml 2020-04-05 14:08:04.682724700 +0000 @@ -19,22 +19,24 @@ Synopsis -* GIBaseInfo +* GIBaseInfo * GICallableInfo * GIFunctionInfo + * GICallbackInfo * GISignalInfo * GIVFuncInfo * GIRegisteredTypeInfo * GIEnumInfo - * GIInterfaceInfo - * GIObjectInfo * GIStructInfo * GIUnionInfo + * GIObjectInfo + * GIInterfaceInfo * GIArgInfo * GIConstantInfo * GIFieldInfo * GIPropertyInfo * GITypeInfo + * GIValueInfo diff -Nru gobject-introspection-1.56.1/docs/reference/gi.types gobject-introspection-1.64.1/docs/reference/gi.types --- gobject-introspection-1.56.1/docs/reference/gi.types 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/gi.types 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -g_base_info_gtype_get_type -g_irepository_get_type diff -Nru gobject-introspection-1.56.1/docs/reference/html/annotation-glossary.html gobject-introspection-1.64.1/docs/reference/html/annotation-glossary.html --- gobject-introspection-1.56.1/docs/reference/html/annotation-glossary.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/annotation-glossary.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ - - - - -Annotation Glossary: GObject Introspection Reference Manual - - - - - - - - - - - - - - - -
-

-Annotation Glossary

-

A

-
allow-none
-

NULL is OK, both for passing and for returning.

-
array
-

Parameter points to an array of items.

-

E

-
element-type
-

Generics and defining elements of containers and arrays.

-

I

-
inout
-

Parameter for input and for returning results. Default is transfer full.

-

N

-
nullable
-

NULL may be passed as the value in, out, in-out; or as a return value.

-

O

-
out
-

Parameter for returning results. Default is transfer full.

-
out caller-allocates
-

Out parameter, where caller must allocate storage.

-

S

-
skip
-

Exposed in C code, not necessarily available in other languages.

-
Stable
-

The intention of a Stable interface is to enable arbitrary third parties to -develop applications to these interfaces, release them, and have confidence that -they will run on all minor releases of the product (after the one in which the -interface was introduced, and within the same major release). Even at a major -release, incompatible changes are expected to be rare, and to have strong -justifications. -

-

T

-
transfer full
-

Free data after the code is done.

-
transfer none
-

Don't free data after the code is done.

-
type
-

Override the parsed C type with given type.

-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/api-index-1-29-0.html gobject-introspection-1.64.1/docs/reference/html/api-index-1-29-0.html --- gobject-introspection-1.56.1/docs/reference/html/api-index-1-29-0.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/api-index-1-29-0.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ - - - - -Index of new symbols in 1.29.0: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-

-Index of new symbols in 1.29.0

-

A

-
-g_arg_info_is_skip, function in GIArgInfo -
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/api-index-1-29-17.html gobject-introspection-1.64.1/docs/reference/html/api-index-1-29-17.html --- gobject-introspection-1.56.1/docs/reference/html/api-index-1-29-17.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/api-index-1-29-17.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ - - - - -Index of new symbols in 1.29.17: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-

-Index of new symbols in 1.29.17

-

E

-
-g_enum_info_get_error_domain, function in GIEnumInfo -
-
-
-g_enum_info_get_method, function in GIEnumInfo -
-
-
-g_enum_info_get_n_methods, function in GIEnumInfo -
-
-

I

-
-g_irepository_find_by_error_domain, function in GIRepository -
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/api-index-1-30-1.html gobject-introspection-1.64.1/docs/reference/html/api-index-1-30-1.html --- gobject-introspection-1.56.1/docs/reference/html/api-index-1-30-1.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/api-index-1-30-1.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ - - - - -Index of new symbols in 1.30.1: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-

-Index of new symbols in 1.30.1

-

C

-
-g_constant_info_free_value, function in GIConstantInfo -
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/api-index-1-34.html gobject-introspection-1.64.1/docs/reference/html/api-index-1-34.html --- gobject-introspection-1.56.1/docs/reference/html/api-index-1-34.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/api-index-1-34.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ - - - - -Index of new symbols in 1.34: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-

-Index of new symbols in 1.34

-

C

-
-g_callable_info_can_throw_gerror, function in GICallableInfo -
-
-
-g_callable_info_is_method, function in GICallableInfo -
-
-

I

-
-g_interface_info_find_signal, function in GIInterfaceInfo -
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/api-index-1-35-8.html gobject-introspection-1.64.1/docs/reference/html/api-index-1-35-8.html --- gobject-introspection-1.56.1/docs/reference/html/api-index-1-35-8.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/api-index-1-35-8.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ - - - - -Index of new symbols in 1.35.8: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-

-Index of new symbols in 1.35.8

-

I

-
-g_irepository_prepend_library_path, function in GIRepository -
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/api-index-deprecated.html gobject-introspection-1.64.1/docs/reference/html/api-index-deprecated.html --- gobject-introspection-1.56.1/docs/reference/html/api-index-deprecated.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/api-index-deprecated.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ - - - - -Index of deprecated symbols: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-

-Index of deprecated symbols

- -
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/api-index-full.html gobject-introspection-1.64.1/docs/reference/html/api-index-full.html --- gobject-introspection-1.56.1/docs/reference/html/api-index-full.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/api-index-full.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,1244 +0,0 @@ - - - - -Index: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-

-Index

-

A

-
-ArgBlob, struct in GITypelib -
-
-
-g_arg_info_get_closure, function in GIArgInfo -
-
-
-g_arg_info_get_destroy, function in GIArgInfo -
-
-
-g_arg_info_get_direction, function in GIArgInfo -
-
-
-g_arg_info_get_ownership_transfer, function in GIArgInfo -
-
-
-g_arg_info_get_scope, function in GIArgInfo -
-
-
-g_arg_info_get_type, function in GIArgInfo -
-
-
-g_arg_info_is_caller_allocates, function in GIArgInfo -
-
-
-g_arg_info_is_optional, function in GIArgInfo -
-
-
-g_arg_info_is_return_value, function in GIArgInfo -
-
-
-g_arg_info_is_skip, function in GIArgInfo -
-
-
-g_arg_info_load_type, function in GIArgInfo -
-
-
-g_arg_info_may_be_null, function in GIArgInfo -
-
-
-ArrayTypeBlob, struct in GITypelib -
-
-
-ArrayTypeDimension, union in GITypelib -
-
-
-AttributeBlob, struct in GITypelib -
-
-

B

-
-g_base_info_equal, function in GIBaseInfo -
-
-
-g_base_info_get_attribute, function in GIBaseInfo -
-
-
-g_base_info_get_container, function in GIBaseInfo -
-
-
-g_base_info_get_name, function in GIBaseInfo -
-
-
-g_base_info_get_namespace, function in GIBaseInfo -
-
-
-g_base_info_get_type, function in GIBaseInfo -
-
-
-g_base_info_get_typelib, function in GIBaseInfo -
-
-
-g_base_info_is_deprecated, function in GIBaseInfo -
-
-
-g_base_info_iterate_attributes, function in GIBaseInfo -
-
-
-g_base_info_ref, function in GIBaseInfo -
-
-
-g_base_info_unref, function in GIBaseInfo -
-
-

C

-
-g_callable_info_can_throw_gerror, function in GICallableInfo -
-
-
-g_callable_info_free_closure, function in girffi -
-
-
-g_callable_info_get_arg, function in GICallableInfo -
-
-
-g_callable_info_get_caller_owns, function in GICallableInfo -
-
-
-g_callable_info_get_n_args, function in GICallableInfo -
-
-
-g_callable_info_get_return_attribute, function in GICallableInfo -
-
-
-g_callable_info_get_return_type, function in GICallableInfo -
-
-
-g_callable_info_invoke, function in GICallableInfo -
-
-
-g_callable_info_is_method, function in GICallableInfo -
-
-
-g_callable_info_iterate_return_attributes, function in GICallableInfo -
-
-
-g_callable_info_load_arg, function in GICallableInfo -
-
-
-g_callable_info_load_return_type, function in GICallableInfo -
-
-
-g_callable_info_may_return_null, function in GICallableInfo -
-
-
-g_callable_info_prepare_closure, function in girffi -
-
-
-g_callable_info_skip_return, function in GICallableInfo -
-
-
-CallbackBlob, struct in GITypelib -
-
-
-CommonBlob, struct in GITypelib -
-
-
-ConstantBlob, struct in GITypelib -
-
-
-g_constant_info_free_value, function in GIConstantInfo -
-
-
-g_constant_info_get_type, function in GIConstantInfo -
-
-
-g_constant_info_get_value, function in GIConstantInfo -
-
-

D

-
-DirEntry, struct in GITypelib -
-
-

E

-
-EnumBlob, struct in GITypelib -
-
-
-g_enum_info_get_error_domain, function in GIEnumInfo -
-
-
-g_enum_info_get_method, function in GIEnumInfo -
-
-
-g_enum_info_get_n_methods, function in GIEnumInfo -
-
-
-g_enum_info_get_n_values, function in GIEnumInfo -
-
-
-g_enum_info_get_storage_type, function in GIEnumInfo -
-
-
-g_enum_info_get_value, function in GIEnumInfo -
-
-
-ErrorTypeBlob, struct in GITypelib -
-
-

F

-
-FieldBlob, struct in GITypelib -
-
-
-g_field_info_get_field, function in GIFieldInfo -
-
-
-g_field_info_get_flags, function in GIFieldInfo -
-
-
-g_field_info_get_offset, function in GIFieldInfo -
-
-
-g_field_info_get_size, function in GIFieldInfo -
-
-
-g_field_info_get_type, function in GIFieldInfo -
-
-
-g_field_info_set_field, function in GIFieldInfo -
-
-
-FunctionBlob, struct in GITypelib -
-
-
-g_function_info_get_flags, function in GIFunctionInfo -
-
-
-g_function_info_get_property, function in GIFunctionInfo -
-
-
-g_function_info_get_symbol, function in GIFunctionInfo -
-
-
-g_function_info_get_vfunc, function in GIFunctionInfo -
-
-
-g_function_info_invoke, function in GIFunctionInfo -
-
-
-g_function_info_prep_invoker, function in girffi -
-
-
-g_function_invoker_destroy, function in girffi -
-
-
-g_function_invoker_new_for_address, function in girffi -
-
-

H

-
-Header, struct in GITypelib -
-
-

I

-
-GIArgInfo, typedef in GIArgInfo -
-
-
-GIArgument, union in common types -
-
-
-GIArrayType, enum in common types -
-
-
-GIAttributeIter, struct in GIBaseInfo -
-
-
-GICallableInfo, typedef in GICallableInfo -
-
-
-GICallbackInfo, typedef in GICallbackInfo -
-
-
-GIConstantInfo, typedef in GIConstantInfo -
-
-
-GIDirection, enum in GIArgInfo -
-
-
-GIEnumInfo, typedef in GIEnumInfo -
-
-
-GIFFIClosureCallback, user_function in girffi -
-
-
-GIFFIReturnValue, typedef in girffi -
-
-
-GIFieldInfo, typedef in GIFieldInfo -
-
-
-GIFieldInfoFlags, enum in GIFieldInfo -
-
-
-GIFunctionInfo, typedef in GIFunctionInfo -
-
-
-GIFunctionInfoFlags, enum in GIFunctionInfo -
-
-
-GIFunctionInvoker, struct in girffi -
-
-
-GIInfoType, enum in GIBaseInfo -
-
-
-GIInterfaceInfo, typedef in GIInterfaceInfo -
-
-
-g_info_new, function in GIBaseInfo -
-
-
-g_info_type_to_string, function in GITypeInfo -
-
-
-InterfaceBlob, struct in GITypelib -
-
-
-InterfaceTypeBlob, struct in GITypelib -
-
-
-g_interface_info_find_method, function in GIInterfaceInfo -
-
-
-g_interface_info_find_signal, function in GIInterfaceInfo -
-
-
-g_interface_info_find_vfunc, function in GIInterfaceInfo -
-
-
-g_interface_info_get_constant, function in GIInterfaceInfo -
-
-
-g_interface_info_get_iface_struct, function in GIInterfaceInfo -
-
-
-g_interface_info_get_method, function in GIInterfaceInfo -
-
-
-g_interface_info_get_n_constants, function in GIInterfaceInfo -
-
-
-g_interface_info_get_n_methods, function in GIInterfaceInfo -
-
-
-g_interface_info_get_n_prerequisites, function in GIInterfaceInfo -
-
-
-g_interface_info_get_n_properties, function in GIInterfaceInfo -
-
-
-g_interface_info_get_n_signals, function in GIInterfaceInfo -
-
-
-g_interface_info_get_n_vfuncs, function in GIInterfaceInfo -
-
-
-g_interface_info_get_prerequisite, function in GIInterfaceInfo -
-
-
-g_interface_info_get_property, function in GIInterfaceInfo -
-
-
-g_interface_info_get_signal, function in GIInterfaceInfo -
-
-
-g_interface_info_get_vfunc, function in GIInterfaceInfo -
-
-
-GInvokeError, enum in GIFunctionInfo -
-
-
-G_INVOKE_ERROR, macro in GIFunctionInfo -
-
-
-g_invoke_error_quark, function in GIFunctionInfo -
-
-
-GIObjectInfo, typedef in GIObjectInfo -
-
-
-GIObjectInfoGetValueFunction, user_function in GIObjectInfo -
-
-
-GIObjectInfoRefFunction, user_function in GIObjectInfo -
-
-
-GIObjectInfoSetValueFunction, user_function in GIObjectInfo -
-
-
-GIObjectInfoUnrefFunction, user_function in GIObjectInfo -
-
-
-GIPropertyInfo, typedef in GIPropertyInfo -
-
-
-GIRegisteredTypeInfo, typedef in GIRegisteredTypeInfo -
-
-
-GIRepository, struct in GIRepository -
-
-
-GIRepositoryError, enum in GIRepository -
-
-
-GIRepositoryLoadFlags, enum in GIRepository -
-
-
-g_irepository_dump, function in GIRepository -
-
-
-g_irepository_enumerate_versions, function in GIRepository -
-
-
-G_IREPOSITORY_ERROR, macro in GIRepository -
-
-
-g_irepository_find_by_error_domain, function in GIRepository -
-
-
-g_irepository_find_by_gtype, function in GIRepository -
-
-
-g_irepository_find_by_name, function in GIRepository -
-
-
-g_irepository_get_c_prefix, function in GIRepository -
-
-
-g_irepository_get_default, function in GIRepository -
-
-
-g_irepository_get_dependencies, function in GIRepository -
-
-
-g_irepository_get_immediate_dependencies, function in GIRepository -
-
-
-g_irepository_get_info, function in GIRepository -
-
-
-g_irepository_get_loaded_namespaces, function in GIRepository -
-
-
-g_irepository_get_n_infos, function in GIRepository -
-
-
-g_irepository_get_option_group, function in GIRepository -
-
-
-g_irepository_get_search_path, function in GIRepository -
-
-
-g_irepository_get_shared_library, function in GIRepository -
-
-
-g_irepository_get_typelib_path, function in GIRepository -
-
-
-g_irepository_get_version, function in GIRepository -
-
-
-g_irepository_is_registered, function in GIRepository -
-
-
-g_irepository_load_typelib, function in GIRepository -
-
-
-g_irepository_prepend_library_path, function in GIRepository -
-
-
-g_irepository_prepend_search_path, function in GIRepository -
-
-
-g_irepository_require, function in GIRepository -
-
-
-g_irepository_require_private, function in GIRepository -
-
-
-G_IR_MAGIC, macro in GITypelib -
-
-
-GIScopeType, enum in GIArgInfo -
-
-
-GISignalInfo, typedef in GISignalInfo -
-
-
-GIStructInfo, typedef in GIStructInfo -
-
-
-GITransfer, enum in GIArgInfo -
-
-
-GITypeInfo, typedef in GITypeInfo -
-
-
-GITypelib, struct in gitypelib -
-
-
-GITypelibError, enum in GITypelib -
-
-
-GITypelibHashBuilder, struct in GITypelib -
-
-
-GITypeTag, enum in common types -
-
-
-GIUnionInfo, typedef in GIUnionInfo -
-
-
-GIUnresolvedInfo, struct in common types -
-
-
-GIValueInfo, typedef in GIValueInfo -
-
-
-GIVFuncInfo, typedef in GIVFuncInfo -
-
-
-GIVFuncInfoFlags, enum in GIVFuncInfo -
-
-
-gi_cclosure_marshal_generic, function in GIRepository -
-
-
-GI_IS_ARG_INFO, macro in GIArgInfo -
-
-
-GI_IS_CALLABLE_INFO, macro in GICallableInfo -
-
-
-GI_IS_CONSTANT_INFO, macro in GIConstantInfo -
-
-
-GI_IS_ENUM_INFO, macro in GIEnumInfo -
-
-
-GI_IS_FIELD_INFO, macro in GIFieldInfo -
-
-
-GI_IS_FUNCTION_INFO, macro in GIFunctionInfo -
-
-
-GI_IS_INTERFACE_INFO, macro in GIInterfaceInfo -
-
-
-GI_IS_OBJECT_INFO, macro in GIObjectInfo -
-
-
-GI_IS_PROPERTY_INFO, macro in GIPropertyInfo -
-
-
-GI_IS_REGISTERED_TYPE_INFO, macro in GIRegisteredTypeInfo -
-
-
-GI_IS_SIGNAL_INFO, macro in GISignalInfo -
-
-
-GI_IS_STRUCT_INFO, macro in GIStructInfo -
-
-
-GI_IS_TYPE_INFO, macro in GITypeInfo -
-
-
-GI_IS_VALUE_INFO, macro in GIEnumInfo -
-
-
-gi_type_info_extract_ffi_return_value, function in girffi -
-
-
-gi_type_tag_get_ffi_type, function in girffi -
-
-
-GI_TYPE_TAG_N_TYPES, macro in common types -
-
-

O

-
-ObjectBlob, struct in GITypelib -
-
-
-g_object_info_find_method, function in GIObjectInfo -
-
-
-g_object_info_find_method_using_interfaces, function in GIObjectInfo -
-
-
-g_object_info_find_signal, function in GIObjectInfo -
-
-
-g_object_info_find_vfunc, function in GIObjectInfo -
-
-
-g_object_info_find_vfunc_using_interfaces, function in GIObjectInfo -
-
-
-g_object_info_get_abstract, function in GIObjectInfo -
-
-
-g_object_info_get_class_struct, function in GIObjectInfo -
-
-
-g_object_info_get_constant, function in GIObjectInfo -
-
-
-g_object_info_get_field, function in GIObjectInfo -
-
-
-g_object_info_get_fundamental, function in GIObjectInfo -
-
-
-g_object_info_get_get_value_function, function in GIObjectInfo -
-
-
-g_object_info_get_get_value_function_pointer, function in GIObjectInfo -
-
-
-g_object_info_get_interface, function in GIObjectInfo -
-
-
-g_object_info_get_method, function in GIObjectInfo -
-
-
-g_object_info_get_n_constants, function in GIObjectInfo -
-
-
-g_object_info_get_n_fields, function in GIObjectInfo -
-
-
-g_object_info_get_n_interfaces, function in GIObjectInfo -
-
-
-g_object_info_get_n_methods, function in GIObjectInfo -
-
-
-g_object_info_get_n_properties, function in GIObjectInfo -
-
-
-g_object_info_get_n_signals, function in GIObjectInfo -
-
-
-g_object_info_get_n_vfuncs, function in GIObjectInfo -
-
-
-g_object_info_get_parent, function in GIObjectInfo -
-
-
-g_object_info_get_property, function in GIObjectInfo -
-
-
-g_object_info_get_ref_function, function in GIObjectInfo -
-
-
-g_object_info_get_ref_function_pointer, function in GIObjectInfo -
-
-
-g_object_info_get_set_value_function, function in GIObjectInfo -
-
-
-g_object_info_get_set_value_function_pointer, function in GIObjectInfo -
-
-
-g_object_info_get_signal, function in GIObjectInfo -
-
-
-g_object_info_get_type_init, function in GIObjectInfo -
-
-
-g_object_info_get_type_name, function in GIObjectInfo -
-
-
-g_object_info_get_unref_function, function in GIObjectInfo -
-
-
-g_object_info_get_unref_function_pointer, function in GIObjectInfo -
-
-
-g_object_info_get_vfunc, function in GIObjectInfo -
-
-

P

-
-ParamTypeBlob, struct in GITypelib -
-
-
-PropertyBlob, struct in GITypelib -
-
-
-g_property_info_get_flags, function in GIPropertyInfo -
-
-
-g_property_info_get_ownership_transfer, function in GIPropertyInfo -
-
-
-g_property_info_get_type, function in GIPropertyInfo -
-
-

R

-
-RegisteredTypeBlob, struct in GITypelib -
-
-
-g_registered_type_info_get_g_type, function in GIRegisteredTypeInfo -
-
-
-g_registered_type_info_get_type_init, function in GIRegisteredTypeInfo -
-
-
-g_registered_type_info_get_type_name, function in GIRegisteredTypeInfo -
-
-

S

-
-Section, struct in GITypelib -
-
-
-SectionType, enum in GITypelib -
-
-
-SignalBlob, struct in GITypelib -
-
-
-g_signal_info_get_class_closure, function in GISignalInfo -
-
-
-g_signal_info_get_flags, function in GISignalInfo -
-
-
-g_signal_info_true_stops_emit, function in GISignalInfo -
-
-
-SignatureBlob, struct in GITypelib -
-
-
-SimpleTypeBlob, union in GITypelib -
-
-
-SimpleTypeBlobFlags, struct in GITypelib -
-
-
-StructBlob, struct in GITypelib -
-
-
-g_struct_info_find_method, function in GIStructInfo -
-
-
-g_struct_info_get_alignment, function in GIStructInfo -
-
-
-g_struct_info_get_field, function in GIStructInfo -
-
-
-g_struct_info_get_method, function in GIStructInfo -
-
-
-g_struct_info_get_n_fields, function in GIStructInfo -
-
-
-g_struct_info_get_n_methods, function in GIStructInfo -
-
-
-g_struct_info_get_size, function in GIStructInfo -
-
-
-g_struct_info_is_foreign, function in GIStructInfo -
-
-
-g_struct_info_is_gtype_struct, function in GIStructInfo -
-
-

T

-
-GTypelibBlobType, enum in GITypelib -
-
-
-g_typelib_check_sanity, function in GITypelib -
-
-
-G_TYPELIB_ERROR, macro in GITypelib -
-
-
-g_typelib_error_quark, function in GITypelib -
-
-
-g_typelib_free, function in gitypelib -
-
-
-g_typelib_get_dir_entry, function in GITypelib -
-
-
-g_typelib_get_dir_entry_by_error_domain, function in GITypelib -
-
-
-g_typelib_get_dir_entry_by_gtype_name, function in GITypelib -
-
-
-g_typelib_get_dir_entry_by_name, function in GITypelib -
-
-
-g_typelib_get_namespace, function in gitypelib -
-
-
-g_typelib_get_string, macro in GITypelib -
-
-
-g_typelib_matches_gtype_name_prefix, function in GITypelib -
-
-
-g_typelib_new_from_const_memory, function in gitypelib -
-
-
-g_typelib_new_from_mapped_file, function in gitypelib -
-
-
-g_typelib_new_from_memory, function in gitypelib -
-
-
-g_typelib_symbol, function in gitypelib -
-
-
-g_typelib_validate, function in GITypelib -
-
-
-g_type_info_get_array_fixed_size, function in GITypeInfo -
-
-
-g_type_info_get_array_length, function in GITypeInfo -
-
-
-g_type_info_get_array_type, function in GITypeInfo -
-
-
-g_type_info_get_ffi_type, function in girffi -
-
-
-g_type_info_get_interface, function in GITypeInfo -
-
-
-g_type_info_get_param_type, function in GITypeInfo -
-
-
-g_type_info_get_tag, function in GITypeInfo -
-
-
-g_type_info_is_pointer, function in GITypeInfo -
-
-
-g_type_info_is_zero_terminated, function in GITypeInfo -
-
-
-G_TYPE_TAG_IS_BASIC, macro in common types -
-
-
-g_type_tag_to_string, function in GITypeInfo -
-
-

U

-
-UnionBlob, struct in GITypelib -
-
-
-g_union_info_find_method, function in GIUnionInfo -
-
-
-g_union_info_get_alignment, function in GIUnionInfo -
-
-
-g_union_info_get_discriminator, function in GIUnionInfo -
-
-
-g_union_info_get_discriminator_offset, function in GIUnionInfo -
-
-
-g_union_info_get_discriminator_type, function in GIUnionInfo -
-
-
-g_union_info_get_field, function in GIUnionInfo -
-
-
-g_union_info_get_method, function in GIUnionInfo -
-
-
-g_union_info_get_n_fields, function in GIUnionInfo -
-
-
-g_union_info_get_n_methods, function in GIUnionInfo -
-
-
-g_union_info_get_size, function in GIUnionInfo -
-
-
-g_union_info_is_discriminated, function in GIUnionInfo -
-
-

V

-
-ValueBlob, struct in GITypelib -
-
-
-g_value_info_get_value, function in GIEnumInfo -
-
-
-VFuncBlob, struct in GITypelib -
-
-
-g_vfunc_info_get_address, function in GIVFuncInfo -
-
-
-g_vfunc_info_get_flags, function in GIVFuncInfo -
-
-
-g_vfunc_info_get_invoker, function in GIVFuncInfo -
-
-
-g_vfunc_info_get_offset, function in GIVFuncInfo -
-
-
-g_vfunc_info_get_signal, function in GIVFuncInfo -
-
-
-g_vfunc_info_invoke, function in GIVFuncInfo -
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/ch01.html gobject-introspection-1.64.1/docs/reference/html/ch01.html --- gobject-introspection-1.56.1/docs/reference/html/ch01.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/ch01.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,94 +0,0 @@ - - - - -GIRepository: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-

-GIRepository

-
-
-GIRepository — GObject Introspection repository manager -
-
-Struct hierarchy — Struct hierarchy description for GIBaseInfo and all its sub structs -
-
-common types — TODO -
-
-GIBaseInfo — Base struct for all GITypelib structs -
-
-GICallableInfo — Struct representing a callable -
-
-GIFunctionInfo — Struct representing a function -
-
-GICallbackInfo — Struct representing a callback -
-
-GISignalInfo — Struct representing a signal -
-
-GIVFuncInfo — Struct representing a virtual function -
-
-GIRegisteredTypeInfo — Struct representing a struct with a GType -
-
-GIEnumInfo — Structs representing an enumeration and its values -
-
-GIStructInfo — Struct representing a C structure -
-
-GIUnionInfo — Struct representing a union. -
-
-GIObjectInfo — Struct representing a GObject -
-
-GIInterfaceInfo — Struct representing a GInterface -
-
-GIArgInfo — Struct representing an argument -
-
-GIConstantInfo — Struct representing a constant -
-
-GIFieldInfo — Struct representing a struct or union field -
-
-GIPropertyInfo — Struct representing a property -
-
-GITypeInfo — Struct representing a type -
-
-GIValueInfo — Struct representing a value -
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/ch03.html gobject-introspection-1.64.1/docs/reference/html/ch03.html --- gobject-introspection-1.56.1/docs/reference/html/ch03.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/ch03.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ - - - - -TODO: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-

-TODO

-
-
-girffi — TODO -
-
-The GIR XML format — The GIR XML format -
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-building.html gobject-introspection-1.64.1/docs/reference/html/gi-building.html --- gobject-introspection-1.56.1/docs/reference/html/gi-building.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-building.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,178 +0,0 @@ - - - - -Compiling the GObject Introspection package: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Compiling the GObject Introspection package

-

Compiling the GObject Introspection Package — How to compile GObject Introspection itself

-
-
-

Building on UNIX

-

- On UNIX, GObject Introspection uses the standard GNU build system, - using autoconf for package - configuration and resolving portability issues, - automake for building makefiles - that comply with the GNU Coding Standards, and - libtool for building shared - libraries on multiple platforms. The normal sequence for - compiling and installing the GObject Introspection package is thus: - -

-


-        ./configure
-        make
-        make install
-      

-

-

-

- The standard options provided by GNU - autoconf may be passed to the - configure script. Please see the - autoconf documentation or run - ./configure --help for information about - the standard options. -

-
-
-

Dependencies

-

- Before you can compile GObject Introspection, you need to have - various other tools and libraries installed on your - system. The tools needed during the build process (as - differentiated from the basic build tools mentioned - before are: -

-
    -
  • - pkg-config - is a tool for tracking the compilation flags needed for - libraries that are used by the GObjecct Introspection. (For each - library, a small .pc text file is - installed in a standard location that contains the compilation - flags needed for that library along with version number - information.) -

  • -
  • - The GObject-Introspection makefiles will mostly work with different - versions of make, however, there tends to be a - few incompatibilities, so the GObject-Introspection team recommends - installing GNU - make if you don't already have it on your system - and using it. (It may be called gmake - rather than make.) -

  • -
-

- GObject-Introspection depends on a number of libraries and tools - maintained under the umbrella of the GNOME project: -

-
    -
  • - The GLib library provides core non-graphical functionality - such as high level data types, Unicode manipulation, and - an object and type system to C programs. It is available - from the GNOME - FTP site or - here. -

  • -
  • - TODO: GTK-Doc -

  • -
-
-

External dependencies

-
    -
  • - Python -

  • -
  • - GObject Introspection has an option dependency on the - libffi library. When available, - ... -

  • -
  • -

    -

    -

    - Cairo - is a graphics library that supports vector graphics and image - compositing. When available, GObject Introspection uses - Cairo in its unit tests. -

    -

    -

    -
  • -
-
-
-
-

Extra Configuration Options

-

- In addition to the normal options, the - configure script in the GObject Introspection - package supports these additional arguments: -

-

--disable-Bsymbolic and - --enable-Bsymbolic - By default, the GObject Introspection package uses the - -Bsymbolic-functions linker flag to avoid intra-library - PLT jumps. A side-effect of this is that it is no longer - possible to override internal uses of GObject Introspection - functions with LD_PRELOAD. Therefore, it may - make sense to turn this feature off in some situations. - The --disable-Bsymbolic option allows - to do that. -

-

--disable-gtk-doc and - --enable-gtk-doc - By default the configure script will try - to auto-detect whether the - gtk-doc package is installed. - If it is, then it will use it to extract and build the - documentation for the GObject Introspection package. These options - can be used to explicitly control whether - gtk-doc should be - used or not. If it is not used, the distributed, - pre-generated HTML files will be installed instead of - building them on your machine. -

-

--disable-doctool and - --enable-doctool - TODO -

-

--with-python - Allows specifying the Python interpreter to use, either as an - absolute path, or as a program name. GObject Introspection can - be built with Python 2 (at least version 2.6) but does not yet - support Python 3. -

-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-common-types.html gobject-introspection-1.64.1/docs/reference/html/gi-common-types.html --- gobject-introspection-1.56.1/docs/reference/html/gi-common-types.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-common-types.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,468 +0,0 @@ - - - - -common types: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

common types

-

common types — TODO

-
-
-

Functions

-
---- - - - - -
#define -G_TYPE_TAG_IS_BASIC() -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - -
 GIArgument
 GIUnresolvedInfo
enumGITypeTag
enumGIArrayType
#defineGI_TYPE_TAG_N_TYPES
-
-
-

Description

-

TODO

-
-
-

Functions

-
-

G_TYPE_TAG_IS_BASIC()

-
#define G_TYPE_TAG_IS_BASIC(tag) (tag < GI_TYPE_TAG_ARRAY || tag == GI_TYPE_TAG_UNICHAR)
-
-

Checks if tag - is a basic type.

-
-

Parameters

-
----- - - - - - -

tag

a type tag

 
-
-
-
-
-

Types and Values

-
-

GIArgument

-

Stores an argument of varying type

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

gboolean v_boolean;

TODO

 

gint8 v_int8;

TODO

 

guint8 v_uint8;

TODO

 

gint16 v_int16;

TODO

 

guint16 v_uint16;

TODO

 

gint32 v_int32;

TODO

 

guint32 v_uint32;

TODO

 

gint64 v_int64;

TODO

 

guint64 v_uint64;

TODO

 

gfloat v_float;

TODO

 

gdouble v_double;

TODO

 

gshort v_short;

TODO

 

gushort v_ushort;

TODO

 

gint v_int;

TODO

 

guint v_uint;

TODO

 

glong v_long;

TODO

 

gulong v_ulong;

TODO

 

gssize v_ssize;

TODO

 

gsize v_size;

TODO

 

gchar *v_string;

TODO

 

gpointer v_pointer;

TODO

 
-
-
-
-
-

GIUnresolvedInfo

-
typedef struct _GIUnresolvedInfo GIUnresolvedInfo;
-

Represents a unresolved type in a typelib.

-
-
-
-

enum GITypeTag

-

The type tag of a GITypeInfo.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

GI_TYPE_TAG_VOID

-

void

-
 

GI_TYPE_TAG_BOOLEAN

-

boolean

-
 

GI_TYPE_TAG_INT8

-

8-bit signed integer

-
 

GI_TYPE_TAG_UINT8

-

8-bit unsigned integer

-
 

GI_TYPE_TAG_INT16

-

16-bit signed integer

-
 

GI_TYPE_TAG_UINT16

-

16-bit unsigned integer

-
 

GI_TYPE_TAG_INT32

-

32-bit signed integer

-
 

GI_TYPE_TAG_UINT32

-

32-bit unsigned integer

-
 

GI_TYPE_TAG_INT64

-

64-bit signed integer

-
 

GI_TYPE_TAG_UINT64

-

64-bit unsigned integer

-
 

GI_TYPE_TAG_FLOAT

-

float

-
 

GI_TYPE_TAG_DOUBLE

-

double floating point

-
 

GI_TYPE_TAG_GTYPE

-

a GType

-
 

GI_TYPE_TAG_UTF8

-

a UTF-8 encoded string

-
 

GI_TYPE_TAG_FILENAME

-

a filename, encoded in the same encoding - as the native filesystem is using.

-
 

GI_TYPE_TAG_ARRAY

-

an array

-
 

GI_TYPE_TAG_INTERFACE

-

an extended interface object

-
 

GI_TYPE_TAG_GLIST

-

a GList

-
 

GI_TYPE_TAG_GSLIST

-

a GSList

-
 

GI_TYPE_TAG_GHASH

-

a GHashTable

-
 

GI_TYPE_TAG_ERROR

-

a GError

-
 

GI_TYPE_TAG_UNICHAR

-

Unicode character

-
 
-
-
-
-
-

enum GIArrayType

-

The type of array in a GITypeInfo.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

GI_ARRAY_TYPE_C

-

a C array, char[] for instance

-
 

GI_ARRAY_TYPE_ARRAY

-

a GArray - array

-
 

GI_ARRAY_TYPE_PTR_ARRAY

-

a GPtrArray array

-
 

GI_ARRAY_TYPE_BYTE_ARRAY

-

a GByteArray array

-
 
-
-
-
-
-

GI_TYPE_TAG_N_TYPES

-
#define GI_TYPE_TAG_N_TYPES (GI_TYPE_TAG_UNICHAR+1)
-
-

TODO

-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi.devhelp2 gobject-introspection-1.64.1/docs/reference/html/gi.devhelp2 --- gobject-introspection-1.56.1/docs/reference/html/gi.devhelp2 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi.devhelp2 1970-01-01 00:00:00.000000000 +0000 @@ -1,721 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GIArgInfo.html gobject-introspection-1.64.1/docs/reference/html/gi-GIArgInfo.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GIArgInfo.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GIArgInfo.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,712 +0,0 @@ - - - - -GIArgInfo: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIArgInfo

-

GIArgInfo — Struct representing an argument

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -GI_IS_ARG_INFO() -
-gint - -g_arg_info_get_closure () -
-gint - -g_arg_info_get_destroy () -
-GIDirection - -g_arg_info_get_direction () -
-GITransfer - -g_arg_info_get_ownership_transfer () -
-GIScopeType - -g_arg_info_get_scope () -
-GITypeInfo * - -g_arg_info_get_type () -
-void - -g_arg_info_load_type () -
-gboolean - -g_arg_info_may_be_null () -
-gboolean - -g_arg_info_is_caller_allocates () -
-gboolean - -g_arg_info_is_optional () -
-gboolean - -g_arg_info_is_return_value () -
-gboolean - -g_arg_info_is_skip () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
typedefGIArgInfo
enumGIDirection
enumGIScopeType
enumGITransfer
-
-
-

Description

-

GIArgInfo represents an argument. An argument is always -part of a GICallableInfo.

-
-

Struct hierarchy

-
-  GIBaseInfo
-   +----GIArgInfo
-
-
-
-
-

Functions

-
-

GI_IS_ARG_INFO()

-
#define             GI_IS_ARG_INFO(info)
-

Checks if info - is a GIArgInfo.

-
-

Parameters

-
----- - - - - - -

info

an info structure

 
-
-
-
-
-

g_arg_info_get_closure ()

-
gint
-g_arg_info_get_closure (GIArgInfo *info);
-

Obtain the index of the user data argument. This is only valid -for arguments which are callbacks.

-
-

Parameters

-
----- - - - - - -

info

a GIArgInfo

 
-
-
-

Returns

-

index of the user data argument or -1 if there is none

-
-
-
-
-

g_arg_info_get_destroy ()

-
gint
-g_arg_info_get_destroy (GIArgInfo *info);
-

Obtains the index of the GDestroyNotify argument. This is only valid -for arguments which are callbacks.

-
-

Parameters

-
----- - - - - - -

info

a GIArgInfo

 
-
-
-

Returns

-

index of the GDestroyNotify argument or -1 if there is none

-
-
-
-
-

g_arg_info_get_direction ()

-
GIDirection
-g_arg_info_get_direction (GIArgInfo *info);
-

Obtain the direction of the argument. Check GIDirection for possible -direction values.

-
-

Parameters

-
----- - - - - - -

info

a GIArgInfo

 
-
-
-

Returns

-

the direction

-
-
-
-
-

g_arg_info_get_ownership_transfer ()

-
GITransfer
-g_arg_info_get_ownership_transfer (GIArgInfo *info);
-

Obtain the ownership transfer for this argument. -GITransfer contains a list of possible values.

-
-

Parameters

-
----- - - - - - -

info

a GIArgInfo

 
-
-
-

Returns

-

the transfer

-
-
-
-
-

g_arg_info_get_scope ()

-
GIScopeType
-g_arg_info_get_scope (GIArgInfo *info);
-

Obtain the scope type for this argument. The scope type explains -how a callback is going to be invoked, most importantly when -the resources required to invoke it can be freed. -GIScopeType contains a list of possible values.

-
-

Parameters

-
----- - - - - - -

info

a GIArgInfo

 
-
-
-

Returns

-

the scope type

-
-
-
-
-

g_arg_info_get_type ()

-
GITypeInfo *
-g_arg_info_get_type (GIArgInfo *info);
-

Obtain the type information for info -.

-
-

Parameters

-
----- - - - - - -

info

a GIArgInfo

 
-
-
-

Returns

-

the GITypeInfo holding the type -information for info -, free it with g_base_info_unref() -when done.

-

[transfer full]

-
-
-
-
-

g_arg_info_load_type ()

-
void
-g_arg_info_load_type (GIArgInfo *info,
-                      GITypeInfo *type);
-

Obtain information about a the type of given argument info -; this -function is a variant of g_arg_info_get_type() designed for stack -allocation.

-

The initialized type - must not be referenced after info - is deallocated.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIArgInfo

 

type

Initialized with information about type of info -.

[out caller-allocates]
-
-
-
-
-

g_arg_info_may_be_null ()

-
gboolean
-g_arg_info_may_be_null (GIArgInfo *info);
-

Obtain if the type of the argument includes the possibility of NULL. -For 'in' values this means that NULL is a valid value. For 'out' -values, this means that NULL may be returned.

-

See also g_arg_info_is_optional().

-
-

Parameters

-
----- - - - - - -

info

a GIArgInfo

 
-
-
-

Returns

-

TRUE if the value may be NULL

-
-
-
-
-

g_arg_info_is_caller_allocates ()

-
gboolean
-g_arg_info_is_caller_allocates (GIArgInfo *info);
-

Obtain if the argument is a pointer to a struct or object that will -receive an output of a function. The default assumption for -GI_DIRECTION_OUT arguments which have allocation is that the -callee allocates; if this is TRUE, then the caller must allocate.

-
-

Parameters

-
----- - - - - - -

info

a GIArgInfo

 
-
-
-

Returns

-

TRUE if caller is required to have allocated the argument

-
-
-
-
-

g_arg_info_is_optional ()

-
gboolean
-g_arg_info_is_optional (GIArgInfo *info);
-

Obtain if the argument is optional. For 'out' arguments this means -that you can pass NULL in order to ignore the result.

-
-

Parameters

-
----- - - - - - -

info

a GIArgInfo

 
-
-
-

Returns

-

TRUE if it is an optional argument

-
-
-
-
-

g_arg_info_is_return_value ()

-
gboolean
-g_arg_info_is_return_value (GIArgInfo *info);
-

Obtain if the argument is a return value. It can either be a -parameter or a return value.

-
-

Parameters

-
----- - - - - - -

info

a GIArgInfo

 
-
-
-

Returns

-

TRUE if it is a return value

-
-
-
-
-

g_arg_info_is_skip ()

-
gboolean
-g_arg_info_is_skip (GIArgInfo *info);
-

Obtain if an argument is only useful in C.

-
-

Parameters

-
----- - - - - - -

info

a GIArgInfo

 
-
-
-

Returns

-

TRUE if argument is only useful in C.

-
-

Since: 1.29.0

-
-
-
-

Types and Values

-
-

GIArgInfo

-
typedef GIBaseInfo GIArgInfo;
-
-

Represents an argument.

-
-
-
-

enum GIDirection

-

The direction of a GIArgInfo.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

GI_DIRECTION_IN

-

in argument.

-
 

GI_DIRECTION_OUT

-

out argument.

-
 

GI_DIRECTION_INOUT

-

in and out argument.

-
 
-
-
-
-
-

enum GIScopeType

-

Scope type of a GIArgInfo representing callback, determines how the -callback is invoked and is used to decided when the invoke structs -can be freed.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

GI_SCOPE_TYPE_INVALID

-

The argument is not of callback type.

-
 

GI_SCOPE_TYPE_CALL

-

The callback and associated user_data is only -used during the call to this function.

-
 

GI_SCOPE_TYPE_ASYNC

-

The callback and associated user_data is -only used until the callback is invoked, and the callback. -is invoked always exactly once.

-
 

GI_SCOPE_TYPE_NOTIFIED

-

The callback and and associated -user_data is used until the caller is notfied via the destroy_notify.

-
 
-
-
-
-
-

enum GITransfer

-

The transfer is the exchange of data between two parts, from the callee to -the caller. The callee is either a function/method/signal or an -object/interface where a property is defined. The caller is the side -accessing a property or calling a function. -GITransfer specifies who's responsible for freeing the resources after the -ownership transfer is complete. In case of a containing type such as a list, -an array or a hash table the container itself is specified differently from -the items within the container itself. Each container is freed differently, -check the documentation for the types themselves for information on how to -free them.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

GI_TRANSFER_NOTHING

-

transfer nothing from the callee (function or the type -instance the property belongs to) to the caller. The callee retains the -ownership of the transfer and the caller doesn't need to do anything to free -up the resources of this transfer.

-
 

GI_TRANSFER_CONTAINER

-

transfer the container (list, array, hash table) from -the callee to the caller. The callee retains the ownership of the individual -items in the container and the caller has to free up the container resources -(g_list_free()/g_hash_table_destroy() etc) of this transfer.

-
 

GI_TRANSFER_EVERYTHING

-

transfer everything, eg the container and its -contents from the callee to the caller. This is the case when the callee -creates a copy of all the data it returns. The caller is responsible for -cleaning up the container and item resources of this transfer.

-
 
-
-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GIBaseInfo.html gobject-introspection-1.64.1/docs/reference/html/gi-GIBaseInfo.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GIBaseInfo.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GIBaseInfo.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,822 +0,0 @@ - - - - -GIBaseInfo: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIBaseInfo

-

GIBaseInfo — Base struct for all GITypelib structs

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GIBaseInfo * - -g_info_new () -
-GIBaseInfo * - -g_base_info_ref () -
-void - -g_base_info_unref () -
-gboolean - -g_base_info_equal () -
-GIInfoType - -g_base_info_get_type () -
-GITypelib * - -g_base_info_get_typelib () -
const gchar * - -g_base_info_get_namespace () -
const gchar * - -g_base_info_get_name () -
const gchar * - -g_base_info_get_attribute () -
-gboolean - -g_base_info_iterate_attributes () -
-GIBaseInfo * - -g_base_info_get_container () -
-gboolean - -g_base_info_is_deprecated () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
enumGIInfoType
 GIAttributeIter
-
-
-

Description

-

GIBaseInfo is the common base struct of all other *Info structs -accessible through the GIRepository API. -All other structs can be casted to a GIBaseInfo, for instance:

-
-

Example 1. Casting a GIFunctionInfo to GIBaseInfo

-
- - - - - - - -
1
-2
GIFunctionInfo *function_info = ...;
-GIBaseInfo *info = (GIBaseInfo*)function_info;
-
- -
-

Most GIRepository APIs returning a GIBaseInfo is actually creating a new struct, in other -words, g_base_info_unref() has to be called when done accessing the data. -GIBaseInfos are normally accessed by calling either -g_irepository_find_by_name(), g_irepository_find_by_gtype() or g_irepository_get_info().

-
-

Example 2. Getting the Button of the Gtk typelib

-
- - - - - - - -
1
-2
-3
GIBaseInfo *button_info = g_irepository_find_by_name(NULL, "Gtk", "Button");
-... use button_info ...
-g_base_info_unref(button_info);
-
- -
-
-

Struct hierarchy

-
-  GIBaseInfo
-   +----GIArgInfo
-   +----GICallableInfo
-   +----GIConstantInfo
-   +----GIFieldInfo
-   +----GIPropertyInfo
-   +----GIRegisteredTypeInfo
-   +----GITypeInfo
-
-
-
-
-

Functions

-
-

g_info_new ()

-
GIBaseInfo *
-g_info_new (GIInfoType type,
-            GIBaseInfo *container,
-            GITypelib *typelib,
-            guint32 offset);
-

TODO

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

type

TODO

 

container

TODO

 

typelib

TODO

 

offset

TODO

 
-
-
-

Returns

-

TODO

-
-
-
-
-

g_base_info_ref ()

-
GIBaseInfo *
-g_base_info_ref (GIBaseInfo *info);
-

Increases the reference count of info -.

-

[skip]

-
-

Parameters

-
----- - - - - - -

info

a GIBaseInfo

 
-
-
-

Returns

-

the same info -.

-
-
-
-
-

g_base_info_unref ()

-
void
-g_base_info_unref (GIBaseInfo *info);
-

Decreases the reference count of info -. When its reference count -drops to 0, the info is freed.

-

[skip]

-
-

Parameters

-
----- - - - - - -

info

a GIBaseInfo

 
-
-
-
-
-

g_base_info_equal ()

-
gboolean
-g_base_info_equal (GIBaseInfo *info1,
-                   GIBaseInfo *info2);
-

Compare two GIBaseInfo.

-

Using pointer comparison is not practical since many functions return -different instances of GIBaseInfo that refers to the same part of the -TypeLib; use this function instead to do GIBaseInfo comparisons.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info1

a GIBaseInfo

 

info2

a GIBaseInfo

 
-
-
-

Returns

-

TRUE if and only if info1 -equals info2 -.

-
-
-
-
-

g_base_info_get_type ()

-
GIInfoType
-g_base_info_get_type (GIBaseInfo *info);
-

Obtain the info type of the GIBaseInfo.

-
-

Parameters

-
----- - - - - - -

info

a GIBaseInfo

 
-
-
-

Returns

-

the info type of info -

-
-
-
-
-

g_base_info_get_typelib ()

-
GITypelib *
-g_base_info_get_typelib (GIBaseInfo *info);
-

Obtain the typelib this info - belongs to

-
-

Parameters

-
----- - - - - - -

info

a GIBaseInfo

 
-
-
-

Returns

-

the typelib.

-

[transfer none]

-
-
-
-
-

g_base_info_get_namespace ()

-
const gchar *
-g_base_info_get_namespace (GIBaseInfo *info);
-

Obtain the namespace of info -.

-
-

Parameters

-
----- - - - - - -

info

a GIBaseInfo

 
-
-
-

Returns

-

the namespace

-
-
-
-
-

g_base_info_get_name ()

-
const gchar *
-g_base_info_get_name (GIBaseInfo *info);
-

Obtain the name of the info -. What the name represents depends on -the GIInfoType of the info -. For instance for GIFunctionInfo it is -the name of the function.

-
-

Parameters

-
----- - - - - - -

info

a GIBaseInfo

 
-
-
-

Returns

-

the name of info -or NULL if it lacks a name.

-
-
-
-
-

g_base_info_get_attribute ()

-
const gchar *
-g_base_info_get_attribute (GIBaseInfo *info,
-                           const gchar *name);
-

Retrieve an arbitrary attribute associated with this node.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIBaseInfo

 

name

a freeform string naming an attribute

 
-
-
-

Returns

-

The value of the attribute, or NULL if no such attribute exists

-
-
-
-
-

g_base_info_iterate_attributes ()

-
gboolean
-g_base_info_iterate_attributes (GIBaseInfo *info,
-                                GIAttributeIter *iterator,
-                                char **name,
-                                char **value);
-

Iterate over all attributes associated with this node. The iterator -structure is typically stack allocated, and must have its first -member initialized to NULL. Attributes are arbitrary namespaced key–value -pairs which can be attached to almost any item. They are intended for use -by software higher in the toolchain than bindings, and are distinct from -normal GIR annotations.

-

Both the name - and value - should be treated as constants -and must not be freed.

-
-

Example 3. Iterating over attributes

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
void
-print_attributes (GIBaseInfo *info)
-{
-  GIAttributeIter iter = { 0, };
-  char *name;
-  char *value;
-  while (g_base_info_iterate_attributes (info, &iter, &name, &value))
-    {
-      g_print ("attribute name: %s value: %s", name, value);
-    }
-}
-
- -
-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

info

a GIBaseInfo

 

iterator

a GIAttributeIter structure, must be initialized; see below.

[inout]

name

Returned name, must not be freed.

[out][transfer none]

value

Returned name, must not be freed.

[out][transfer none]
-
-
-

Returns

-

TRUE if there are more attributes

-
-
-
-
-

g_base_info_get_container ()

-
GIBaseInfo *
-g_base_info_get_container (GIBaseInfo *info);
-

Obtain the container of the info -. The container is the parent -GIBaseInfo. For instance, the parent of a GIFunctionInfo is an -GIObjectInfo or GIInterfaceInfo.

-
-

Parameters

-
----- - - - - - -

info

a GIBaseInfo

 
-
-
-

Returns

-

the container.

-

[transfer none]

-
-
-
-
-

g_base_info_is_deprecated ()

-
gboolean
-g_base_info_is_deprecated (GIBaseInfo *info);
-

Obtain whether the info - is represents a metadata which is -deprecated or not.

-
-

Parameters

-
----- - - - - - -

info

a GIBaseInfo

 
-
-
-

Returns

-

TRUE if deprecated

-
-
-
-
-

Types and Values

-
-

enum GIInfoType

-

The type of a GIBaseInfo struct.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

GI_INFO_TYPE_INVALID

-

invalid type

-
 

GI_INFO_TYPE_FUNCTION

-

function, see GIFunctionInfo

-
 

GI_INFO_TYPE_CALLBACK

-

callback, see GIFunctionInfo

-
 

GI_INFO_TYPE_STRUCT

-

struct, see GIStructInfo

-
 

GI_INFO_TYPE_BOXED

-

boxed, see GIStructInfo or GIUnionInfo

-
 

GI_INFO_TYPE_ENUM

-

enum, see GIEnumInfo

-
 

GI_INFO_TYPE_FLAGS

-

flags, see GIEnumInfo

-
 

GI_INFO_TYPE_OBJECT

-

object, see GIObjectInfo

-
 

GI_INFO_TYPE_INTERFACE

-

interface, see GIInterfaceInfo

-
 

GI_INFO_TYPE_CONSTANT

-

contant, see GIConstantInfo

-
 

GI_INFO_TYPE_INVALID_0

-

deleted, used to be GI_INFO_TYPE_ERROR_DOMAIN.

-
 

GI_INFO_TYPE_UNION

-

union, see GIUnionInfo

-
 

GI_INFO_TYPE_VALUE

-

enum value, see GIValueInfo

-
 

GI_INFO_TYPE_SIGNAL

-

signal, see GISignalInfo

-
 

GI_INFO_TYPE_VFUNC

-

virtual function, see GIVFuncInfo

-
 

GI_INFO_TYPE_PROPERTY

-

GObject property, see GIPropertyInfo

-
 

GI_INFO_TYPE_FIELD

-

struct or union field, see GIFieldInfo

-
 

GI_INFO_TYPE_ARG

-

argument of a function or callback, see GIArgInfo

-
 

GI_INFO_TYPE_TYPE

-

type information, see GITypeInfo

-
 

GI_INFO_TYPE_UNRESOLVED

-

unresolved type, a type which is not present in - the typelib, or any of its dependencies.

-
 
-
-
-
-
-

GIAttributeIter

-
typedef struct {
-} GIAttributeIter;
-
-

An opaque structure used to iterate over attributes -in a GIBaseInfo struct.

-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GICallableInfo.html gobject-introspection-1.64.1/docs/reference/html/gi-GICallableInfo.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GICallableInfo.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GICallableInfo.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,699 +0,0 @@ - - - - -GICallableInfo: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GICallableInfo

-

GICallableInfo — Struct representing a callable

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -GI_IS_CALLABLE_INFO() -
-gboolean - -g_callable_info_can_throw_gerror () -
-gint - -g_callable_info_get_n_args () -
-GIArgInfo * - -g_callable_info_get_arg () -
-GITransfer - -g_callable_info_get_caller_owns () -
const gchar * - -g_callable_info_get_return_attribute () -
-GITypeInfo * - -g_callable_info_get_return_type () -
-gboolean - -g_callable_info_invoke () -
-gboolean - -g_callable_info_is_method () -
-gboolean - -g_callable_info_iterate_return_attributes () -
-void - -g_callable_info_load_arg () -
-void - -g_callable_info_load_return_type () -
-gboolean - -g_callable_info_may_return_null () -
-gboolean - -g_callable_info_skip_return () -
-
-
-

Types and Values

-
---- - - - - -
typedefGICallableInfo
-
-
-

Description

-

GICallableInfo represents an entity which is callable. -Currently a function (GIFunctionInfo), virtual function, -(GIVFuncInfo) or callback (GICallbackInfo).

-

A callable has a list of arguments (GIArgInfo), a return type, -direction and a flag which decides if it returns null.

-
-

Struct hierarchy

-
-  GIBaseInfo
-   +----GICallableInfo
-         +----GIFunctionInfo
-         +----GISignalInfo
-         +----GIVFuncInfo
-
-
-
-
-

Functions

-
-

GI_IS_CALLABLE_INFO()

-
#define             GI_IS_CALLABLE_INFO(info)
-

Checks if info - is a GICallableInfo or derived from it.

-
-

Parameters

-
----- - - - - - -

info

an info structure

 
-
-
-
-
-

g_callable_info_can_throw_gerror ()

-
gboolean
-g_callable_info_can_throw_gerror (GICallableInfo *info);
-

TODO

-
-

Parameters

-
----- - - - - - -

info

a GICallableInfo

 
-
-
-

Returns

-

TRUE if this GICallableInfo can throw a GError

-
-

Since: 1.34

-
-
-
-

g_callable_info_get_n_args ()

-
gint
-g_callable_info_get_n_args (GICallableInfo *info);
-

Obtain the number of arguments (both IN and OUT) for this callable.

-
-

Parameters

-
----- - - - - - -

info

a GICallableInfo

 
-
-
-

Returns

-

The number of arguments this callable expects.

-
-
-
-
-

g_callable_info_get_arg ()

-
GIArgInfo *
-g_callable_info_get_arg (GICallableInfo *info,
-                         gint n);
-

Obtain information about a particular argument of this callable.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GICallableInfo

 

n

the argument index to fetch

 
-
-
-

Returns

-

the GIArgInfo. Free it with -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_callable_info_get_caller_owns ()

-
GITransfer
-g_callable_info_get_caller_owns (GICallableInfo *info);
-

See whether the caller owns the return value of this callable. -GITransfer contains a list of possible transfer values.

-
-

Parameters

-
----- - - - - - -

info

a GICallableInfo

 
-
-
-

Returns

-

the transfer mode for the return value of the callable

-
-
-
-
-

g_callable_info_get_return_attribute ()

-
const gchar *
-g_callable_info_get_return_attribute (GICallableInfo *info,
-                                      const gchar *name);
-

Retrieve an arbitrary attribute associated with the return value.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GICallableInfo

 

name

a freeform string naming an attribute

 
-
-
-

Returns

-

The value of the attribute, or NULL if no such attribute exists

-
-
-
-
-

g_callable_info_get_return_type ()

-
GITypeInfo *
-g_callable_info_get_return_type (GICallableInfo *info);
-

Obtain the return type of a callable item as a GITypeInfo.

-
-

Parameters

-
----- - - - - - -

info

a GICallableInfo

 
-
-
-

Returns

-

the GITypeInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_callable_info_invoke ()

-
gboolean
-g_callable_info_invoke (GICallableInfo *info,
-                        gpointer function,
-                        const GIArgument *in_args,
-                        int n_in_args,
-                        const GIArgument *out_args,
-                        int n_out_args,
-                        GIArgument *return_value,
-                        gboolean is_method,
-                        gboolean throws,
-                        GError **error);
-

TODO

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

info

TODO

 

function

TODO

 

in_args

TODO.

[array length=n_in_args]

n_in_args

TODO

 

out_args

TODO.

[array length=n_out_args]

n_out_args

TODO

 

return_value

TODO

 

is_method

TODO

 

throws

TODO

 

error

TODO

 
-
-
-
-
-

g_callable_info_is_method ()

-
gboolean
-g_callable_info_is_method (GICallableInfo *info);
-

Determines if the callable info is a method. For GIVFuncInfos, -GICallbackInfos, and GISignalInfos, -this is always true. Otherwise, this looks at the GI_FUNCTION_IS_METHOD -flag on the GIFunctionInfo.

-

Concretely, this function returns whether g_callable_info_get_n_args() -matches the number of arguments in the raw C method. For methods, there -is one more C argument than is exposed by introspection: the "self" -or "this" object.

-
-

Parameters

-
----- - - - - - -

info

a GICallableInfo

 
-
-
-

Returns

-

TRUE if info -is a method, FALSE otherwise

-
-

Since: 1.34

-
-
-
-

g_callable_info_iterate_return_attributes ()

-
gboolean
-g_callable_info_iterate_return_attributes
-                               (GICallableInfo *info,
-                                GIAttributeIter *iterator,
-                                char **name,
-                                char **value);
-

Iterate over all attributes associated with the return value. The -iterator structure is typically stack allocated, and must have its -first member initialized to NULL.

-

Both the name - and value - should be treated as constants -and must not be freed.

-

See g_base_info_iterate_attributes() for an example of how to use a -similar API.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

info

a GICallableInfo

 

iterator

a GIAttributeIter structure, must be initialized; see below.

[inout]

name

Returned name, must not be freed.

[out][transfer none]

value

Returned name, must not be freed.

[out][transfer none]
-
-
-

Returns

-

TRUE if there are more attributes

-
-
-
-
-

g_callable_info_load_arg ()

-
void
-g_callable_info_load_arg (GICallableInfo *info,
-                          gint n,
-                          GIArgInfo *arg);
-

Obtain information about a particular argument of this callable; this -function is a variant of g_callable_info_get_arg() designed for stack -allocation.

-

The initialized arg - must not be referenced after info - is deallocated.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

info

a GICallableInfo

 

n

the argument index to fetch

 

arg

Initialize with argument number n -.

[out caller-allocates]
-
-
-
-
-

g_callable_info_load_return_type ()

-
void
-g_callable_info_load_return_type (GICallableInfo *info,
-                                  GITypeInfo *type);
-

Obtain information about a return value of callable; this -function is a variant of g_callable_info_get_return_type() designed for stack -allocation.

-

The initialized type - must not be referenced after info - is deallocated.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GICallableInfo

 

type

Initialized with return type of info -.

[out caller-allocates]
-
-
-
-
-

g_callable_info_may_return_null ()

-
gboolean
-g_callable_info_may_return_null (GICallableInfo *info);
-

See if a callable could return NULL.

-
-

Parameters

-
----- - - - - - -

info

a GICallableInfo

 
-
-
-

Returns

-

TRUE if callable could return NULL

-
-
-
-
-

g_callable_info_skip_return ()

-
gboolean
-g_callable_info_skip_return (GICallableInfo *info);
-

See if a callable's return value is only useful in C.

-
-

Parameters

-
----- - - - - - -

info

a GICallableInfo

 
-
-
-

Returns

-

TRUE if return value is only useful in C.

-
-
-
-
-

Types and Values

-
-

GICallableInfo

-
typedef GIBaseInfo GICallableInfo;
-
-

Represents a callable, either GIFunctionInfo, GICallbackInfo or -GIVFuncInfo.

-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GICallbackInfo.html gobject-introspection-1.64.1/docs/reference/html/gi-GICallbackInfo.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GICallbackInfo.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GICallbackInfo.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,78 +0,0 @@ - - - - -GICallbackInfo: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GICallbackInfo

-

GICallbackInfo — Struct representing a callback

-
-
-

Types and Values

-
---- - - - - -
typedefGICallbackInfo
-
-
-

Description

-

GICallbackInfo represents a callback.

-
-

Struct hierarchy

-
-  GIBaseInfo
-   +----GICallableInfo
-         +----GIFunctionInfo
-         +----GISignalInfo
-         +----GIVFuncInfo
-
-
-
-
-

Functions

-

-
-
-

Types and Values

-
-

GICallbackInfo

-
typedef GIBaseInfo GICallbackInfo;
-
-

Represents a callback, eg arguments and return value.

-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GIConstantInfo.html gobject-introspection-1.64.1/docs/reference/html/gi-GIConstantInfo.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GIConstantInfo.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GIConstantInfo.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,239 +0,0 @@ - - - - -GIConstantInfo: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIConstantInfo

-

GIConstantInfo — Struct representing a constant

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
#define -GI_IS_CONSTANT_INFO() -
-void - -g_constant_info_free_value () -
-GITypeInfo * - -g_constant_info_get_type () -
-gint - -g_constant_info_get_value () -
-
-
-

Types and Values

-
---- - - - - -
typedefGIConstantInfo
-
-
-

Description

-

GIConstantInfo represents a constant. A constant has a type associated -which can be obtained by calling g_constant_info_get_type() and a value, -which can be obtained by calling g_constant_info_get_value().

-
-

Struct hierarchy

-
-  GIBaseInfo
-   +----GIConstantInfo
-
-
-
-
-

Functions

-
-

GI_IS_CONSTANT_INFO()

-
#define             GI_IS_CONSTANT_INFO(info)
-

Checks if info - is a GIConstantInfo.

-
-

Parameters

-
----- - - - - - -

info

an info structure

 
-
-
-
-
-

g_constant_info_free_value ()

-
void
-g_constant_info_free_value (GIConstantInfo *info,
-                            GIArgument *value);
-

Free the value returned from g_constant_info_get_value().

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIConstantInfo

 

value

the argument

 
-
-

Since: 1.30.1

-
-
-
-

g_constant_info_get_type ()

-
GITypeInfo *
-g_constant_info_get_type (GIConstantInfo *info);
-

Obtain the type of the constant as a GITypeInfo.

-
-

Parameters

-
----- - - - - - -

info

a GIConstantInfo

 
-
-
-

Returns

-

the GITypeInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_constant_info_get_value ()

-
gint
-g_constant_info_get_value (GIConstantInfo *info,
-                           GIArgument *value);
-

Obtain the value associated with the GIConstantInfo and store it in the -value - parameter. argument - needs to be allocated before passing it in. -The size of the constant value stored in argument - will be returned. -Free the value with g_constant_info_free_value().

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIConstantInfo

 

value

an argument.

[out]
-
-
-

Returns

-

size of the constant

-
-
-
-
-

Types and Values

-
-

GIConstantInfo

-
typedef GIBaseInfo GIConstantInfo;
-
-

Represents a constant.

-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GIEnumInfo.html gobject-introspection-1.64.1/docs/reference/html/gi-GIEnumInfo.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GIEnumInfo.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GIEnumInfo.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,413 +0,0 @@ - - - - -GIEnumInfo: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIEnumInfo

-

GIEnumInfo — Structs representing an enumeration and its values

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -GI_IS_ENUM_INFO() -
#define -GI_IS_VALUE_INFO() -
-gint - -g_enum_info_get_n_values () -
-GIValueInfo * - -g_enum_info_get_value () -
-gint - -g_enum_info_get_n_methods () -
-GIFunctionInfo * - -g_enum_info_get_method () -
-GITypeTag - -g_enum_info_get_storage_type () -
const gchar * - -g_enum_info_get_error_domain () -
-gint64 - -g_value_info_get_value () -
-
-
-

Types and Values

-
---- - - - - -
typedefGIEnumInfo
-
-
-

Description

-

A GIEnumInfo represents an enumeration and a GIValueInfo struct represents a value -of an enumeration. The GIEnumInfo contains a set of values and a type -The GIValueInfo is fetched by calling g_enum_info_get_value() on a GIEnumInfo.

-
-

Struct hierarchy

-
-  GIBaseInfo
-   +----GIRegisteredTypeInfo
-         +----GIEnumInfo
-
-
-
-
-

Functions

-
-

GI_IS_ENUM_INFO()

-
#define             GI_IS_ENUM_INFO(info)
-

Checks if info - is a GIEnumInfo.

-
-

Parameters

-
----- - - - - - -

info

an info structure

 
-
-
-
-
-

GI_IS_VALUE_INFO()

-
#define             GI_IS_VALUE_INFO(info)
-

Checks if info - is a GIValueInfo.

-
-

Parameters

-
----- - - - - - -

info

an info structure

 
-
-
-
-
-

g_enum_info_get_n_values ()

-
gint
-g_enum_info_get_n_values (GIEnumInfo *info);
-

Obtain the number of values this enumeration contains.

-
-

Parameters

-
----- - - - - - -

info

a GIEnumInfo

 
-
-
-

Returns

-

the number of enumeration values

-
-
-
-
-

g_enum_info_get_value ()

-
GIValueInfo *
-g_enum_info_get_value (GIEnumInfo *info,
-                       gint n);
-

Obtain a value for this enumeration.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIEnumInfo

 

n

index of value to fetch

 
-
-
-

Returns

-

the enumeration value or NULL if type tag is wrong, -free the struct with g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_enum_info_get_n_methods ()

-
gint
-g_enum_info_get_n_methods (GIEnumInfo *info);
-

Obtain the number of methods that this enum type has.

-
-

Parameters

-
----- - - - - - -

info

a GIEnumInfo

 
-
-
-

Returns

-

number of methods

-
-

Since: 1.29.17

-
-
-
-

g_enum_info_get_method ()

-
GIFunctionInfo *
-g_enum_info_get_method (GIEnumInfo *info,
-                        gint n);
-

Obtain an enum type method at index n -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIEnumInfo

 

n

index of method to get

 
-
-
-

Returns

-

the GIFunctionInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-

Since: 1.29.17

-
-
-
-

g_enum_info_get_storage_type ()

-
GITypeTag
-g_enum_info_get_storage_type (GIEnumInfo *info);
-

Obtain the tag of the type used for the enum in the C ABI. This will -will be a signed or unsigned integral type.

-

Note that in the current implementation the width of the type is -computed correctly, but the signed or unsigned nature of the type -may not match the sign of the type used by the C compiler.

-
-

Parameters

-
----- - - - - - -

info

a GIEnumInfo

 
-
-
-

Returns

-

the storage type for the enumeration

-
-
-
-
-

g_enum_info_get_error_domain ()

-
const gchar *
-g_enum_info_get_error_domain (GIEnumInfo *info);
-

Obtain the string form of the quark for the error domain associated with -this enum, if any.

-
-

Parameters

-
----- - - - - - -

info

a GIEnumInfo

 
-
-
-

Returns

-

the string form of the error domain associated -with this enum, or NULL.

-

[transfer none]

-
-

Since: 1.29.17

-
-
-
-

g_value_info_get_value ()

-
gint64
-g_value_info_get_value (GIValueInfo *info);
-

Obtain the enumeration value of the GIValueInfo.

-
-

Parameters

-
----- - - - - - -

info

a GIValueInfo

 
-
-
-

Returns

-

the enumeration value. This will always be representable -as a 32-bit signed or unsigned value. The use of gint64 as the -return type is to allow both.

-
-
-
-
-

Types and Values

-
-

GIEnumInfo

-
typedef GIBaseInfo GIEnumInfo;
-
-

Represents an enum or a flag.

-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GIFieldInfo.html gobject-introspection-1.64.1/docs/reference/html/gi-GIFieldInfo.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GIFieldInfo.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GIFieldInfo.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,401 +0,0 @@ - - - - -GIFieldInfo: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIFieldInfo

-

GIFieldInfo — Struct representing a struct or union field

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -GI_IS_FIELD_INFO() -
-gboolean - -g_field_info_get_field () -
-gboolean - -g_field_info_set_field () -
-GIFieldInfoFlags - -g_field_info_get_flags () -
-gint - -g_field_info_get_offset () -
-gint - -g_field_info_get_size () -
-GITypeInfo * - -g_field_info_get_type () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
typedefGIFieldInfo
enumGIFieldInfoFlags
-
-
-

Description

-

A GIFieldInfo struct represents a field of a struct (see GIStructInfo), -union (see GIUnionInfo) or an object (see GIObjectInfo). The GIFieldInfo -is fetched by calling g_struct_info_get_field(), g_union_info_get_field() -or g_object_info_get_field(). -A field has a size, type and a struct offset asssociated and a set of flags, -which is currently GI_FIELD_IS_READABLE or GI_FIELD_IS_WRITABLE.

-
-

Struct hierarchy

-
-  GIBaseInfo
-   +----GIFieldInfo
-
-
-
-
-

Functions

-
-

GI_IS_FIELD_INFO()

-
#define             GI_IS_FIELD_INFO(info)
-

Checks if info - is a GIFieldInfo.

-
-

Parameters

-
----- - - - - - -

info

an info structure

 
-
-
-
-
-

g_field_info_get_field ()

-
gboolean
-g_field_info_get_field (GIFieldInfo *field_info,
-                        gpointer mem,
-                        GIArgument *value);
-

Reads a field identified by a GIFieldInfo from a C structure or -union. This only handles fields of simple C types. It will fail -for a field of a composite type like a nested structure or union -even if that is actually readable.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

field_info

a GIFieldInfo

 

mem

pointer to a block of memory representing a C structure or union

 

value

a GIArgument into which to store the value retrieved

 
-
-
-

Returns

-

TRUE if reading the field succeeded, otherwise FALSE

-
-
-
-
-

g_field_info_set_field ()

-
gboolean
-g_field_info_set_field (GIFieldInfo *field_info,
-                        gpointer mem,
-                        const GIArgument *value);
-

Writes a field identified by a GIFieldInfo to a C structure or -union. This only handles fields of simple C types. It will fail -for a field of a composite type like a nested structure or union -even if that is actually writable. Note also that that it will refuse -to write fields where memory management would by required. A field -with a type such as 'char *' must be set with a setter function.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

field_info

a GIFieldInfo

 

mem

pointer to a block of memory representing a C structure or union

 

value

a GIArgument holding the value to store

 
-
-
-

Returns

-

TRUE if writing the field succeeded, otherwise FALSE

-
-
-
-
-

g_field_info_get_flags ()

-
GIFieldInfoFlags
-g_field_info_get_flags (GIFieldInfo *info);
-

Obtain the flags for this GIFieldInfo. See GIFieldInfoFlags for possible -flag values.

-
-

Parameters

-
----- - - - - - -

info

a GIFieldInfo

 
-
-
-

Returns

-

the flags

-
-
-
-
-

g_field_info_get_offset ()

-
gint
-g_field_info_get_offset (GIFieldInfo *info);
-

Obtain the offset in bits of the field member, this is relative -to the beginning of the struct or union.

-
-

Parameters

-
----- - - - - - -

info

a GIFieldInfo

 
-
-
-

Returns

-

the field offset

-
-
-
-
-

g_field_info_get_size ()

-
gint
-g_field_info_get_size (GIFieldInfo *info);
-

Obtain the size in bits of the field member, this is how -much space you need to allocate to store the field.

-
-

Parameters

-
----- - - - - - -

info

a GIFieldInfo

 
-
-
-

Returns

-

the field size

-
-
-
-
-

g_field_info_get_type ()

-
GITypeInfo *
-g_field_info_get_type (GIFieldInfo *info);
-

Obtain the type of a field as a GITypeInfo.

-
-

Parameters

-
----- - - - - - -

info

a GIFieldInfo

 
-
-
-

Returns

-

the GITypeInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

Types and Values

-
-

GIFieldInfo

-
typedef GIBaseInfo GIFieldInfo;
-
-

Represents a field of a GIStructInfo or a GIUnionInfo.

-
-
-
-

enum GIFieldInfoFlags

-

Flags for a GIFieldInfo.

-
-

Members

-
----- - - - - - - - - - - - - -

GI_FIELD_IS_READABLE

-

field is readable.

-
 

GI_FIELD_IS_WRITABLE

-

field is writable.

-
 
-
-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GIFunctionInfo.html gobject-introspection-1.64.1/docs/reference/html/gi-GIFunctionInfo.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GIFunctionInfo.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GIFunctionInfo.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,497 +0,0 @@ - - - - -GIFunctionInfo: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIFunctionInfo

-

GIFunctionInfo — Struct representing a function

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -GI_IS_FUNCTION_INFO() -
-GIFunctionInfoFlags - -g_function_info_get_flags () -
-GIPropertyInfo * - -g_function_info_get_property () -
const gchar * - -g_function_info_get_symbol () -
-GIVFuncInfo * - -g_function_info_get_vfunc () -
-gboolean - -g_function_info_invoke () -
-GQuark - -g_invoke_error_quark () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
typedefGIFunctionInfo
enumGIFunctionInfoFlags
#defineG_INVOKE_ERROR
enumGInvokeError
-
-
-

Description

-

GIFunctionInfo represents a function, method or constructor. -To find out what kind of entity a GIFunctionInfo represents, call -g_function_info_get_flags().

-

See also GICallableInfo for information on how to retreive arguments and -other metadata.

-
-

Struct hierarchy

-
-  GIBaseInfo
-   +----GICallableInfo
-         +----GIFunctionInfo
-         +----GISignalInfo
-         +----GIVFuncInfo
-
-
-
-
-

Functions

-
-

GI_IS_FUNCTION_INFO()

-
#define             GI_IS_FUNCTION_INFO(info)
-

Checks if info - is a GIFunctionInfo.

-
-

Parameters

-
----- - - - - - -

info

an info structure

 
-
-
-
-
-

g_function_info_get_flags ()

-
GIFunctionInfoFlags
-g_function_info_get_flags (GIFunctionInfo *info);
-

Obtain the GIFunctionInfoFlags for the info -.

-
-

Parameters

-
----- - - - - - -

info

a GIFunctionInfo

 
-
-
-

Returns

-

the flags

-
-
-
-
-

g_function_info_get_property ()

-
GIPropertyInfo *
-g_function_info_get_property (GIFunctionInfo *info);
-

Obtain the property associated with this GIFunctionInfo. -Only GIFunctionInfo with the flag GI_FUNCTION_IS_GETTER or -GI_FUNCTION_IS_SETTER have a property set. For other cases, -NULL will be returned.

-
-

Parameters

-
----- - - - - - -

info

a GIFunctionInfo

 
-
-
-

Returns

-

the property or NULL if not set. Free it with -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_function_info_get_symbol ()

-
const gchar *
-g_function_info_get_symbol (GIFunctionInfo *info);
-

Obtain the symbol of the function. The symbol is the name of the -exported function, suitable to be used as an argument to -g_module_symbol().

-
-

Parameters

-
----- - - - - - -

info

a GIFunctionInfo

 
-
-
-

Returns

-

the symbol

-
-
-
-
-

g_function_info_get_vfunc ()

-
GIVFuncInfo *
-g_function_info_get_vfunc (GIFunctionInfo *info);
-

Obtain the virtual function associated with this GIFunctionInfo. -Only GIFunctionInfo with the flag GI_FUNCTION_WRAPS_VFUNC has -a virtual function set. For other cases, NULL will be returned.

-
-

Parameters

-
----- - - - - - -

info

a GIFunctionInfo

 
-
-
-

Returns

-

the virtual function or NULL if not set. -Free it by calling g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_function_info_invoke ()

-
gboolean
-g_function_info_invoke (GIFunctionInfo *info,
-                        const GIArgument *in_args,
-                        int n_in_args,
-                        const GIArgument *out_args,
-                        int n_out_args,
-                        GIArgument *return_value,
-                        GError **error);
-

Invokes the function described in info - with the given -arguments. Note that inout parameters must appear in both -argument lists. This function uses dlsym() to obtain a pointer -to the function, so the library or shared object containing the -described function must either be linked to the caller, or must -have been g_module_symbol()ed before calling this function.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

info

a GIFunctionInfo describing the function to invoke

 

in_args

an array of GIArguments, one for each in -parameter of info -. If there are no in parameter, in_args -can be NULL.

[array length=n_in_args]

n_in_args

the length of the in_args -array

 

out_args

an array of GIArguments, one for each out -parameter of info -. If there are no out parameters, out_args -may be NULL.

[array length=n_out_args]

n_out_args

the length of the out_args -array

 

return_value

return location for the return value of the -function. If the function returns void, return_value -may be -NULL

 

error

return location for detailed error information, or NULL

 
-
-
-

Returns

-

TRUE if the function has been invoked, FALSE if an -error occurred.

-
-
-
-
-

g_invoke_error_quark ()

-
GQuark
-g_invoke_error_quark (void);
-

TODO

-
-

Returns

-

TODO

-
-
-
-
-

Types and Values

-
-

GIFunctionInfo

-
typedef GIBaseInfo GIFunctionInfo;
-
-

Represents a function, eg arguments and return value.

-
-
-
-

enum GIFunctionInfoFlags

-

Flags for a GIFunctionInfo struct.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

GI_FUNCTION_IS_METHOD

-

is a method.

-
 

GI_FUNCTION_IS_CONSTRUCTOR

-

is a constructor.

-
 

GI_FUNCTION_IS_GETTER

-

is a getter of a GIPropertyInfo.

-
 

GI_FUNCTION_IS_SETTER

-

is a setter of a GIPropertyInfo.

-
 

GI_FUNCTION_WRAPS_VFUNC

-

represents a virtual function.

-
 

GI_FUNCTION_THROWS

-

the function may throw an error.

-
 
-
-
-
-
-

G_INVOKE_ERROR

-
#define G_INVOKE_ERROR (g_invoke_error_quark ())
-
-

TODO

-
-
-
-

enum GInvokeError

-

An error occuring while invoking a function via -g_function_info_invoke().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_INVOKE_ERROR_FAILED

-

invokation failed, unknown error.

-
 

G_INVOKE_ERROR_SYMBOL_NOT_FOUND

-

symbol couldn't be found in any of the -libraries associated with the typelib of the function.

-
 

G_INVOKE_ERROR_ARGUMENT_MISMATCH

-

the arguments provided didn't match -the expected arguments for the functions type signature.

-
 
-
-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GIInterfaceInfo.html gobject-introspection-1.64.1/docs/reference/html/gi-GIInterfaceInfo.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GIInterfaceInfo.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GIInterfaceInfo.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,766 +0,0 @@ - - - - -GIInterfaceInfo: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIInterfaceInfo

-

GIInterfaceInfo — Struct representing a GInterface

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -GI_IS_INTERFACE_INFO() -
-gint - -g_interface_info_get_n_prerequisites () -
-GIBaseInfo * - -g_interface_info_get_prerequisite () -
-gint - -g_interface_info_get_n_properties () -
-GIPropertyInfo * - -g_interface_info_get_property () -
-gint - -g_interface_info_get_n_methods () -
-GIFunctionInfo * - -g_interface_info_get_method () -
-GIFunctionInfo * - -g_interface_info_find_method () -
-gint - -g_interface_info_get_n_signals () -
-GISignalInfo * - -g_interface_info_get_signal () -
-GISignalInfo * - -g_interface_info_find_signal () -
-gint - -g_interface_info_get_n_vfuncs () -
-GIVFuncInfo * - -g_interface_info_get_vfunc () -
-GIVFuncInfo * - -g_interface_info_find_vfunc () -
-gint - -g_interface_info_get_n_constants () -
-GIConstantInfo * - -g_interface_info_get_constant () -
-GIStructInfo * - -g_interface_info_get_iface_struct () -
-
-
-

Types and Values

-
---- - - - - -
typedefGIInterfaceInfo
-
-
-

Description

-

GIInterfaceInfo represents a GInterface type.

-

A GInterface has methods, fields, properties, signals, interfaces, constants, -virtual functions and prerequisites.

-
-

Struct hierarchy

-
-  GIBaseInfo
-   +----GIRegisteredTypeInfo
-         +----GIInterfaceInfo
-
-
-
-
-

Functions

-
-

GI_IS_INTERFACE_INFO()

-
#define             GI_IS_INTERFACE_INFO(info)
-

Checks if info - is a GIInterfaceInfo.

-
-

Parameters

-
----- - - - - - -

info

an info structure

 
-
-
-
-
-

g_interface_info_get_n_prerequisites ()

-
gint
-g_interface_info_get_n_prerequisites (GIInterfaceInfo *info);
-

Obtain the number of prerequisites for this interface type. -A prerequisites is another interface that needs to be implemented for -interface, similar to an base class for GObjects.

-
-

Parameters

-
----- - - - - - -

info

a GIInterfaceInfo

 
-
-
-

Returns

-

number of prerequisites

-
-
-
-
-

g_interface_info_get_prerequisite ()

-
GIBaseInfo *
-g_interface_info_get_prerequisite (GIInterfaceInfo *info,
-                                   gint n);
-

Obtain an interface type prerequisites index n -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIInterfaceInfo

 

n

index of prerequisites to get

 
-
-
-

Returns

-

the prerequisites as a GIBaseInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_interface_info_get_n_properties ()

-
gint
-g_interface_info_get_n_properties (GIInterfaceInfo *info);
-

Obtain the number of properties that this interface type has.

-
-

Parameters

-
----- - - - - - -

info

a GIInterfaceInfo

 
-
-
-

Returns

-

number of properties

-
-
-
-
-

g_interface_info_get_property ()

-
GIPropertyInfo *
-g_interface_info_get_property (GIInterfaceInfo *info,
-                               gint n);
-

Obtain an interface type property at index n -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIInterfaceInfo

 

n

index of property to get

 
-
-
-

Returns

-

the GIPropertyInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_interface_info_get_n_methods ()

-
gint
-g_interface_info_get_n_methods (GIInterfaceInfo *info);
-

Obtain the number of methods that this interface type has.

-
-

Parameters

-
----- - - - - - -

info

a GIInterfaceInfo

 
-
-
-

Returns

-

number of methods

-
-
-
-
-

g_interface_info_get_method ()

-
GIFunctionInfo *
-g_interface_info_get_method (GIInterfaceInfo *info,
-                             gint n);
-

Obtain an interface type method at index n -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIInterfaceInfo

 

n

index of method to get

 
-
-
-

Returns

-

the GIFunctionInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_interface_info_find_method ()

-
GIFunctionInfo *
-g_interface_info_find_method (GIInterfaceInfo *info,
-                              const gchar *name);
-

Obtain a method of the interface type given a name -. NULL will be -returned if there's no method available with that name.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIInterfaceInfo

 

name

name of method to obtain

 
-
-
-

Returns

-

the GIFunctionInfo or NULL if none found. -Free the struct by calling g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_interface_info_get_n_signals ()

-
gint
-g_interface_info_get_n_signals (GIInterfaceInfo *info);
-

Obtain the number of signals that this interface type has.

-
-

Parameters

-
----- - - - - - -

info

a GIInterfaceInfo

 
-
-
-

Returns

-

number of signals

-
-
-
-
-

g_interface_info_get_signal ()

-
GISignalInfo *
-g_interface_info_get_signal (GIInterfaceInfo *info,
-                             gint n);
-

Obtain an interface type signal at index n -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIInterfaceInfo

 

n

index of signal to get

 
-
-
-

Returns

-

the GISignalInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_interface_info_find_signal ()

-
GISignalInfo *
-g_interface_info_find_signal (GIInterfaceInfo *info,
-                              const gchar *name);
-

TODO

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIInterfaceInfo

 

name

Name of signal

 
-
-
-

Returns

-

Info for the signal with name name -in info -, or -NULL on failure.

-

[transfer full]

-
-

Since: 1.34

-
-
-
-

g_interface_info_get_n_vfuncs ()

-
gint
-g_interface_info_get_n_vfuncs (GIInterfaceInfo *info);
-

Obtain the number of virtual functions that this interface type has.

-
-

Parameters

-
----- - - - - - -

info

a GIInterfaceInfo

 
-
-
-

Returns

-

number of virtual functions

-
-
-
-
-

g_interface_info_get_vfunc ()

-
GIVFuncInfo *
-g_interface_info_get_vfunc (GIInterfaceInfo *info,
-                            gint n);
-

Obtain an interface type virtual function at index n -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIInterfaceInfo

 

n

index of virtual function to get

 
-
-
-

Returns

-

the GIVFuncInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_interface_info_find_vfunc ()

-
GIVFuncInfo *
-g_interface_info_find_vfunc (GIInterfaceInfo *info,
-                             const gchar *name);
-

Locate a virtual function slot with name name -. See the documentation -for g_object_info_find_vfunc() for more information on virtuals.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIInterfaceInfo

 

name

The name of a virtual function to find.

 
-
-
-

Returns

-

the GIVFuncInfo, or NULL. Free it with -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_interface_info_get_n_constants ()

-
gint
-g_interface_info_get_n_constants (GIInterfaceInfo *info);
-

Obtain the number of constants that this interface type has.

-
-

Parameters

-
----- - - - - - -

info

a GIInterfaceInfo

 
-
-
-

Returns

-

number of constants

-
-
-
-
-

g_interface_info_get_constant ()

-
GIConstantInfo *
-g_interface_info_get_constant (GIInterfaceInfo *info,
-                               gint n);
-

Obtain an interface type constant at index n -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIInterfaceInfo

 

n

index of constant to get

 
-
-
-

Returns

-

the GIConstantInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_interface_info_get_iface_struct ()

-
GIStructInfo *
-g_interface_info_get_iface_struct (GIInterfaceInfo *info);
-

Returns the layout C structure associated with this GInterface.

-
-

Parameters

-
----- - - - - - -

info

a GIInterfaceInfo

 
-
-
-

Returns

-

the GIStructInfo or NULL. Free it with -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

Types and Values

-
-

GIInterfaceInfo

-
typedef GIBaseInfo GIInterfaceInfo;
-
-

Represents an interface.

-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GIObjectInfo.html gobject-introspection-1.64.1/docs/reference/html/gi-GIObjectInfo.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GIObjectInfo.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GIObjectInfo.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,1585 +0,0 @@ - - - - -GIObjectInfo: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIObjectInfo

-

GIObjectInfo — Struct representing a GObject

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -GI_IS_OBJECT_INFO() -
-gboolean - -g_object_info_get_abstract () -
-gboolean - -g_object_info_get_fundamental () -
-GIObjectInfo * - -g_object_info_get_parent () -
const gchar * - -g_object_info_get_type_name () -
const gchar * - -g_object_info_get_type_init () -
-gint - -g_object_info_get_n_constants () -
-GIConstantInfo * - -g_object_info_get_constant () -
-gint - -g_object_info_get_n_fields () -
-GIFieldInfo * - -g_object_info_get_field () -
-gint - -g_object_info_get_n_interfaces () -
-GIInterfaceInfo * - -g_object_info_get_interface () -
-gint - -g_object_info_get_n_methods () -
-GIFunctionInfo * - -g_object_info_get_method () -
-GIFunctionInfo * - -g_object_info_find_method () -
-GIFunctionInfo * - -g_object_info_find_method_using_interfaces () -
-gint - -g_object_info_get_n_properties () -
-GIPropertyInfo * - -g_object_info_get_property () -
-gint - -g_object_info_get_n_signals () -
-GISignalInfo * - -g_object_info_get_signal () -
-GISignalInfo * - -g_object_info_find_signal () -
-gint - -g_object_info_get_n_vfuncs () -
-GIVFuncInfo * - -g_object_info_get_vfunc () -
-GIVFuncInfo * - -g_object_info_find_vfunc () -
-GIVFuncInfo * - -g_object_info_find_vfunc_using_interfaces () -
-GIStructInfo * - -g_object_info_get_class_struct () -
const char * - -g_object_info_get_ref_function () -
-GIObjectInfoRefFunction - -g_object_info_get_ref_function_pointer () -
const char * - -g_object_info_get_unref_function () -
-GIObjectInfoUnrefFunction - -g_object_info_get_unref_function_pointer () -
const char * - -g_object_info_get_set_value_function () -
-GIObjectInfoSetValueFunction - -g_object_info_get_set_value_function_pointer () -
const char * - -g_object_info_get_get_value_function () -
-GIObjectInfoGetValueFunction - -g_object_info_get_get_value_function_pointer () -
-void * - -(*GIObjectInfoRefFunction) () -
-void - -(*GIObjectInfoUnrefFunction) () -
-void - -(*GIObjectInfoSetValueFunction) () -
-void * - -(*GIObjectInfoGetValueFunction) () -
-
-
-

Types and Values

-
---- - - - - -
typedefGIObjectInfo
-
-
-

Description

-

GIObjectInfo represents a GObject. This doesn't represent a specific -instance of a GObject, instead this represent the object type (eg class).

-

A GObject has methods, fields, properties, signals, interfaces, constants -and virtual functions.

-
-

Struct hierarchy

-
-  GIBaseInfo
-   +----GIRegisteredTypeInfo
-         +----GIObjectInfo
-
-
-
-
-

Functions

-
-

GI_IS_OBJECT_INFO()

-
#define             GI_IS_OBJECT_INFO(info)
-

Checks if info - is a GIObjectInfo.

-
-

Parameters

-
----- - - - - - -

info

an info structure

 
-
-
-
-
-

g_object_info_get_abstract ()

-
gboolean
-g_object_info_get_abstract (GIObjectInfo *info);
-

Obtain if the object type is an abstract type, eg if it cannot be -instantiated

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

TRUE if the object type is abstract

-
-
-
-
-

g_object_info_get_fundamental ()

-
gboolean
-g_object_info_get_fundamental (GIObjectInfo *info);
-

Obtain if the object type is of a fundamental type which is not -G_TYPE_OBJECT. This is mostly for supporting GstMiniObject.

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

TRUE if the object type is a fundamental type

-
-
-
-
-

g_object_info_get_parent ()

-
GIObjectInfo *
-g_object_info_get_parent (GIObjectInfo *info);
-

Obtain the parent of the object type.

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

the GIObjectInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_object_info_get_type_name ()

-
const gchar *
-g_object_info_get_type_name (GIObjectInfo *info);
-

Obtain the name of the objects class/type.

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

name of the objects type

-
-
-
-
-

g_object_info_get_type_init ()

-
const gchar *
-g_object_info_get_type_init (GIObjectInfo *info);
-

Obtain the function which when called will return the GType -function for which this object type is registered.

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

the type init function

-
-
-
-
-

g_object_info_get_n_constants ()

-
gint
-g_object_info_get_n_constants (GIObjectInfo *info);
-

Obtain the number of constants that this object type has.

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

number of constants

-
-
-
-
-

g_object_info_get_constant ()

-
GIConstantInfo *
-g_object_info_get_constant (GIObjectInfo *info,
-                            gint n);
-

Obtain an object type constant at index n -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIObjectInfo

 

n

index of constant to get

 
-
-
-

Returns

-

the GIConstantInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_object_info_get_n_fields ()

-
gint
-g_object_info_get_n_fields (GIObjectInfo *info);
-

Obtain the number of fields that this object type has.

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

number of fields

-
-
-
-
-

g_object_info_get_field ()

-
GIFieldInfo *
-g_object_info_get_field (GIObjectInfo *info,
-                         gint n);
-

Obtain an object type field at index n -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIObjectInfo

 

n

index of field to get

 
-
-
-

Returns

-

the GIFieldInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_object_info_get_n_interfaces ()

-
gint
-g_object_info_get_n_interfaces (GIObjectInfo *info);
-

Obtain the number of interfaces that this object type has.

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

number of interfaces

-
-
-
-
-

g_object_info_get_interface ()

-
GIInterfaceInfo *
-g_object_info_get_interface (GIObjectInfo *info,
-                             gint n);
-

Obtain an object type interface at index n -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIObjectInfo

 

n

index of interface to get

 
-
-
-

Returns

-

the GIInterfaceInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_object_info_get_n_methods ()

-
gint
-g_object_info_get_n_methods (GIObjectInfo *info);
-

Obtain the number of methods that this object type has.

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

number of methods

-
-
-
-
-

g_object_info_get_method ()

-
GIFunctionInfo *
-g_object_info_get_method (GIObjectInfo *info,
-                          gint n);
-

Obtain an object type method at index n -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIObjectInfo

 

n

index of method to get

 
-
-
-

Returns

-

the GIFunctionInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_object_info_find_method ()

-
GIFunctionInfo *
-g_object_info_find_method (GIObjectInfo *info,
-                           const gchar *name);
-

Obtain a method of the object type given a name -. NULL will be -returned if there's no method available with that name.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIObjectInfo

 

name

name of method to obtain

 
-
-
-

Returns

-

the GIFunctionInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_object_info_find_method_using_interfaces ()

-
GIFunctionInfo *
-g_object_info_find_method_using_interfaces
-                               (GIObjectInfo *info,
-                                const gchar *name,
-                                GIObjectInfo **implementor);
-

Obtain a method of the object given a name -, searching both the -object info - and any interfaces it implements. NULL will be -returned if there's no method available with that name.

-

Note that this function does *not* search parent classes; you will have -to chain up if that's desired.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

info

a GIObjectInfo

 

name

name of method to obtain

 

implementor

The implementor of the interface.

[out][transfer full]
-
-
-

Returns

-

the GIFunctionInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_object_info_get_n_properties ()

-
gint
-g_object_info_get_n_properties (GIObjectInfo *info);
-

Obtain the number of properties that this object type has.

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

number of properties

-
-
-
-
-

g_object_info_get_property ()

-
GIPropertyInfo *
-g_object_info_get_property (GIObjectInfo *info,
-                            gint n);
-

Obtain an object type property at index n -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIObjectInfo

 

n

index of property to get

 
-
-
-

Returns

-

the GIPropertyInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_object_info_get_n_signals ()

-
gint
-g_object_info_get_n_signals (GIObjectInfo *info);
-

Obtain the number of signals that this object type has.

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

number of signals

-
-
-
-
-

g_object_info_get_signal ()

-
GISignalInfo *
-g_object_info_get_signal (GIObjectInfo *info,
-                          gint n);
-

Obtain an object type signal at index n -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIObjectInfo

 

n

index of signal to get

 
-
-
-

Returns

-

the GISignalInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_object_info_find_signal ()

-
GISignalInfo *
-g_object_info_find_signal (GIObjectInfo *info,
-                           const gchar *name);
-

TODO

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIObjectInfo

 

name

Name of signal

 
-
-
-

Returns

-

Info for the signal with name name -in info -, or NULL on failure.

-

[transfer full]

-
-
-
-
-

g_object_info_get_n_vfuncs ()

-
gint
-g_object_info_get_n_vfuncs (GIObjectInfo *info);
-

Obtain the number of virtual functions that this object type has.

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

number of virtual functions

-
-
-
-
-

g_object_info_get_vfunc ()

-
GIVFuncInfo *
-g_object_info_get_vfunc (GIObjectInfo *info,
-                         gint n);
-

Obtain an object type virtual function at index n -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIObjectInfo

 

n

index of virtual function to get

 
-
-
-

Returns

-

the GIVFuncInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_object_info_find_vfunc ()

-
GIVFuncInfo *
-g_object_info_find_vfunc (GIObjectInfo *info,
-                          const gchar *name);
-

Locate a virtual function slot with name name -. Note that the namespace -for virtuals is distinct from that of methods; there may or may not be -a concrete method associated for a virtual. If there is one, it may -be retrieved using g_vfunc_info_get_invoker(), otherwise NULL will be -returned. -See the documentation for g_vfunc_info_get_invoker() for more -information on invoking virtuals.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIObjectInfo

 

name

The name of a virtual function to find.

 
-
-
-

Returns

-

the GIVFuncInfo, or NULL. Free it with -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_object_info_find_vfunc_using_interfaces ()

-
GIVFuncInfo *
-g_object_info_find_vfunc_using_interfaces
-                               (GIObjectInfo *info,
-                                const gchar *name,
-                                GIObjectInfo **implementor);
-

Locate a virtual function slot with name name -, searching both the object -info - and any interfaces it implements. Note that the namespace for -virtuals is distinct from that of methods; there may or may not be a -concrete method associated for a virtual. If there is one, it may be -retrieved using g_vfunc_info_get_invoker(), otherwise NULL will be -returned.

-

Note that this function does *not* search parent classes; you will have -to chain up if that's desired.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

info

a GIObjectInfo

 

name

name of method to obtain

 

implementor

The implementor of the interface.

[out][transfer full]
-
-
-

Returns

-

the GIFunctionInfo. Free the struct by calling -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_object_info_get_class_struct ()

-
GIStructInfo *
-g_object_info_get_class_struct (GIObjectInfo *info);
-

Every GObject has two structures; an instance structure and a class -structure. This function returns the metadata for the class structure.

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

the GIStructInfo or NULL. Free with -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_object_info_get_ref_function ()

-
const char *
-g_object_info_get_ref_function (GIObjectInfo *info);
-

Obtain the symbol name of the function that should be called to ref this -object type. It's mainly used fundamental types. The type signature for -the symbol is GIObjectInfoRefFunction, to fetch the function pointer -see g_object_info_get_ref_function().

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

the symbol or NULL

-
-
-
-
-

g_object_info_get_ref_function_pointer ()

-
GIObjectInfoRefFunction
-g_object_info_get_ref_function_pointer
-                               (GIObjectInfo *info);
-

Obtain a pointer to a function which can be used to -increase the reference count an instance of this object type. -This takes derivation into account and will reversely traverse -the base classes of this type, starting at the top type.

-

[skip]

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

the function pointer or NULL

-
-
-
-
-

g_object_info_get_unref_function ()

-
const char *
-g_object_info_get_unref_function (GIObjectInfo *info);
-

Obtain the symbol name of the function that should be called to unref this -object type. It's mainly used fundamental types. The type signature for -the symbol is GIObjectInfoUnrefFunction, to fetch the function pointer -see g_object_info_get_unref_function().

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

the symbol or NULL

-
-
-
-
-

g_object_info_get_unref_function_pointer ()

-
GIObjectInfoUnrefFunction
-g_object_info_get_unref_function_pointer
-                               (GIObjectInfo *info);
-

Obtain a pointer to a function which can be used to -decrease the reference count an instance of this object type. -This takes derivation into account and will reversely traverse -the base classes of this type, starting at the top type.

-

[skip]

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

the function pointer or NULL

-
-
-
-
-

g_object_info_get_set_value_function ()

-
const char *
-g_object_info_get_set_value_function (GIObjectInfo *info);
-

Obtain the symbol name of the function that should be called to convert -set a GValue giving an object instance pointer of this object type. -I's mainly used fundamental types. The type signature for the symbol -is GIObjectInfoSetValueFunction, to fetch the function pointer -see g_object_info_get_set_value_function().

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

the symbol or NULL

-
-
-
-
-

g_object_info_get_set_value_function_pointer ()

-
GIObjectInfoSetValueFunction
-g_object_info_get_set_value_function_pointer
-                               (GIObjectInfo *info);
-

Obtain a pointer to a function which can be used to -set a GValue given an instance of this object type. -This takes derivation into account and will reversely traverse -the base classes of this type, starting at the top type.

-

[skip]

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

the function pointer or NULL

-
-
-
-
-

g_object_info_get_get_value_function ()

-
const char *
-g_object_info_get_get_value_function (GIObjectInfo *info);
-

Obtain the symbol name of the function that should be called to convert -an object instance pointer of this object type to a GValue. -I's mainly used fundamental types. The type signature for the symbol -is GIObjectInfoGetValueFunction, to fetch the function pointer -see g_object_info_get_get_value_function().

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

the symbol or NULL

-
-
-
-
-

g_object_info_get_get_value_function_pointer ()

-
GIObjectInfoGetValueFunction
-g_object_info_get_get_value_function_pointer
-                               (GIObjectInfo *info);
-

Obtain a pointer to a function which can be used to -extract an instance of this object type out of a GValue. -This takes derivation into account and will reversely traverse -the base classes of this type, starting at the top type.

-

[skip]

-
-

Parameters

-
----- - - - - - -

info

a GIObjectInfo

 
-
-
-

Returns

-

the function pointer or NULL

-
-
-
-
-

GIObjectInfoRefFunction ()

-
void *
-(*GIObjectInfoRefFunction) (void *object);
-

Increases the reference count of an object instance.

-

[skip]

-
-

Parameters

-
----- - - - - - -

object

object instance pointer

 
-
-
-

Returns

-

the object instance.

-

[transfer full]

-
-
-
-
-

GIObjectInfoUnrefFunction ()

-
void
-(*GIObjectInfoUnrefFunction) (void *object);
-

Decreases the reference count of an object instance.

-

[skip]

-
-

Parameters

-
----- - - - - - -

object

object instance pointer

 
-
-
-
-
-

GIObjectInfoSetValueFunction ()

-
void
-(*GIObjectInfoSetValueFunction) (GValue *value,
-                                 void *object);
-

Update value - and attach the object instance pointer object - to it.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a GValue

 

object

object instance pointer

 
-
-
-
-
-

GIObjectInfoGetValueFunction ()

-
void *
-(*GIObjectInfoGetValueFunction) (const GValue *value);
-

Extract an object instance out of value -

-

[skip]

-
-

Parameters

-
----- - - - - - -

value

a GValue

 
-
-
-

Returns

-

the object instance.

-

[transfer full]

-
-
-
-
-

Types and Values

-
-

GIObjectInfo

-
typedef GIBaseInfo GIObjectInfo;
-
-

Represents an object.

-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GIPropertyInfo.html gobject-introspection-1.64.1/docs/reference/html/gi-GIPropertyInfo.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GIPropertyInfo.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GIPropertyInfo.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,221 +0,0 @@ - - - - -GIPropertyInfo: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIPropertyInfo

-

GIPropertyInfo — Struct representing a property

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
#define -GI_IS_PROPERTY_INFO() -
-GParamFlags - -g_property_info_get_flags () -
-GITransfer - -g_property_info_get_ownership_transfer () -
-GITypeInfo * - -g_property_info_get_type () -
-
-
-

Types and Values

-
---- - - - - -
typedefGIPropertyInfo
-
-
-

Description

-

GIPropertyInfo represents a property. A property belongs to -either a GIObjectInfo or a GIInterfaceInfo.

-
-

Struct hierarchy

-
-  GIBaseInfo
-   +----GIPropertyInfo
-
-
-
-
-

Functions

-
-

GI_IS_PROPERTY_INFO()

-
#define             GI_IS_PROPERTY_INFO(info)
-

Checks if info - is a GIPropertyInfo.

-
-

Parameters

-
----- - - - - - -

info

an info structure

 
-
-
-
-
-

g_property_info_get_flags ()

-
GParamFlags
-g_property_info_get_flags (GIPropertyInfo *info);
-

Obtain the flags for this property info. See GParamFlags for -more information about possible flag values.

-
-

Parameters

-
----- - - - - - -

info

a GIPropertyInfo

 
-
-
-

Returns

-

the flags

-
-
-
-
-

g_property_info_get_ownership_transfer ()

-
GITransfer
-g_property_info_get_ownership_transfer
-                               (GIPropertyInfo *info);
-

Obtain the ownership transfer for this property. See GITransfer for more -information about transfer values.

-
-

Parameters

-
----- - - - - - -

info

a GIPropertyInfo

 
-
-
-

Returns

-

the transfer

-
-
-
-
-

g_property_info_get_type ()

-
GITypeInfo *
-g_property_info_get_type (GIPropertyInfo *info);
-

Obtain the type information for the property info -.

-
-

Parameters

-
----- - - - - - -

info

a GIPropertyInfo

 
-
-
-

Returns

-

the GITypeInfo, free it with -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

Types and Values

-
-

GIPropertyInfo

-
typedef GIBaseInfo GIPropertyInfo;
-
-

Represents a property of a GIObjectInfo or a GIInterfaceInfo.

-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GIRegisteredTypeInfo.html gobject-introspection-1.64.1/docs/reference/html/gi-GIRegisteredTypeInfo.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GIRegisteredTypeInfo.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GIRegisteredTypeInfo.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,234 +0,0 @@ - - - - -GIRegisteredTypeInfo: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIRegisteredTypeInfo

-

GIRegisteredTypeInfo — Struct representing a struct with a GType

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
#define -GI_IS_REGISTERED_TYPE_INFO() -
const gchar * - -g_registered_type_info_get_type_name () -
const gchar * - -g_registered_type_info_get_type_init () -
-GType - -g_registered_type_info_get_g_type () -
-
-
-

Types and Values

-
---- - - - - -
typedefGIRegisteredTypeInfo
-
-
-

Description

-

GIRegisteredTypeInfo represents an entity with a GType associated. Could -be either a GIEnumInfo, GIInterfaceInfo, GIObjectInfo, GIStructInfo or a -GIUnionInfo.

-

A registered type info struct has a name and a type function. -To get the name call g_registered_type_info_get_type_name(). -Most users want to call g_registered_type_info_get_g_type() and don't worry -about the rest of the details.

-
-

Struct hierarchy

-
-  GIBaseInfo
-   +----GIRegisteredTypeInfo
-         +----GIEnumInfo
-         +----GIInterfaceInfo
-         +----GIObjectInfo
-         +----GIStructInfo
-         +----GIUnionInfo
-
-
-
-
-

Functions

-
-

GI_IS_REGISTERED_TYPE_INFO()

-
#define             GI_IS_REGISTERED_TYPE_INFO(info)
-

Checks if info - is a GIRegisteredTypeInfo or derived from it.

-
-

Parameters

-
----- - - - - - -

info

an info structure

 
-
-
-
-
-

g_registered_type_info_get_type_name ()

-
const gchar *
-g_registered_type_info_get_type_name (GIRegisteredTypeInfo *info);
-

Obtain the type name of the struct within the GObject type system. -This type can be passed to g_type_name() to get a GType.

-
-

Parameters

-
----- - - - - - -

info

a GIRegisteredTypeInfo

 
-
-
-

Returns

-

the type name

-
-
-
-
-

g_registered_type_info_get_type_init ()

-
const gchar *
-g_registered_type_info_get_type_init (GIRegisteredTypeInfo *info);
-

Obtain the type init function for info -. The type init function is the -function which will register the GType within the GObject type system. -Usually this is not called by langauge bindings or applications, use -g_registered_type_info_get_g_type() directly instead.

-
-

Parameters

-
----- - - - - - -

info

a GIRegisteredTypeInfo

 
-
-
-

Returns

-

the symbol name of the type init function, suitable for -passing into g_module_symbol().

-
-
-
-
-

g_registered_type_info_get_g_type ()

-
GType
-g_registered_type_info_get_g_type (GIRegisteredTypeInfo *info);
-

Obtain the GType for this registered type or G_TYPE_NONE which a special meaning. -It means that either there is no type information associated with this info - or -that the shared library which provides the type_init function for this -info - cannot be called.

-
-

Parameters

-
----- - - - - - -

info

a GIRegisteredTypeInfo

 
-
-
-

Returns

-

the GType.

-
-
-
-
-

Types and Values

-
-

GIRegisteredTypeInfo

-
typedef GIBaseInfo GIRegisteredTypeInfo;
-
-

Represent a registered type.

-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-girffi.html gobject-introspection-1.64.1/docs/reference/html/gi-girffi.html --- gobject-introspection-1.56.1/docs/reference/html/gi-girffi.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-girffi.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,535 +0,0 @@ - - - - -girffi: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

girffi

-

girffi — TODO

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -(*GIFFIClosureCallback) () -
-ffi_type * - -gi_type_tag_get_ffi_type () -
-ffi_type * - -g_type_info_get_ffi_type () -
-void - -gi_type_info_extract_ffi_return_value () -
-gboolean - -g_function_info_prep_invoker () -
-gboolean - -g_function_invoker_new_for_address () -
-void - -g_function_invoker_destroy () -
-ffi_closure * - -g_callable_info_prepare_closure () -
-void - -g_callable_info_free_closure () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
structGIFunctionInvoker
typedefGIFFIReturnValue
-
-
-

Description

-

TODO

-
-
-

Functions

-
-

GIFFIClosureCallback ()

-
void
-(*GIFFIClosureCallback) (ffi_cif *Param1,
-                         void *Param2,
-                         void **Param3,
-                         void *Param4);
-

TODO

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

Param1

TODO

 

Param2

TODO

 

Param3

TODO

 

Param4

TODO

 
-
-
-
-
-

gi_type_tag_get_ffi_type ()

-
ffi_type *
-gi_type_tag_get_ffi_type (GITypeTag type_tag,
-                          gboolean is_pointer);
-

TODO

-
-

Parameters

-
----- - - - - - - - - - - - - -

type_tag

A GITypeTag

 

is_pointer

Whether or not this is a pointer type

 
-
-
-

Returns

-

A ffi_type corresponding to the platform default C ABI for tag -and is_pointer -.

-
-
-
-
-

g_type_info_get_ffi_type ()

-
ffi_type *
-g_type_info_get_ffi_type (GITypeInfo *info);
-

TODO

-
-

Parameters

-
----- - - - - - -

info

A GITypeInfo

 
-
-
-

Returns

-

A ffi_type corresponding to the platform default C ABI for info -.

-
-
-
-
-

gi_type_info_extract_ffi_return_value ()

-
void
-gi_type_info_extract_ffi_return_value (GITypeInfo *return_info,
-                                       GIFFIReturnValue *ffi_value,
-                                       GIArgument *arg);
-

Extract the correct bits from an ffi_arg return value into -GIArgument: https://bugzilla.gnome.org/show_bug.cgi?id=665152

-

Also see ffi_call(3)

-
  • the storage requirements for return values are "special".

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

return_info

TODO

 

ffi_value

TODO

 

arg

TODO.

[out caller-allocates]
-
-
-
-
-

g_function_info_prep_invoker ()

-
gboolean
-g_function_info_prep_invoker (GIFunctionInfo *info,
-                              GIFunctionInvoker *invoker,
-                              GError **error);
-

Initialize the caller-allocated invoker - structure with a cache -of information needed to invoke the C function corresponding to -info - with the platform's default ABI.

-

A primary intent of this function is that a dynamic structure allocated -by a language binding could contain a GIFunctionInvoker structure -inside the binding's function mapping.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

info

A GIFunctionInfo

 

invoker

Output invoker structure

 

error

A GError

 
-
-
-

Returns

-

TRUE on success, FALSE otherwise with error -set.

-
-
-
-
-

g_function_invoker_new_for_address ()

-
gboolean
-g_function_invoker_new_for_address (gpointer addr,
-                                    GICallableInfo *info,
-                                    GIFunctionInvoker *invoker,
-                                    GError **error);
-

Initialize the caller-allocated invoker - structure with a cache -of information needed to invoke the C function corresponding to -info - with the platform's default ABI.

-

A primary intent of this function is that a dynamic structure allocated -by a language binding could contain a GIFunctionInvoker structure -inside the binding's function mapping.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

addr

The address

 

info

A GICallableInfo

 

invoker

Output invoker structure

 

error

A GError

 
-
-
-

Returns

-

TRUE on success, FALSE otherwise with error -set.

-
-
-
-
-

g_function_invoker_destroy ()

-
void
-g_function_invoker_destroy (GIFunctionInvoker *invoker);
-

Release all resources allocated for the internals of invoker -; callers -are responsible for freeing any resources allocated for the structure -itself however.

-
-

Parameters

-
----- - - - - - -

invoker

A GIFunctionInvoker

 
-
-
-
-
-

g_callable_info_prepare_closure ()

-
ffi_closure *
-g_callable_info_prepare_closure (GICallableInfo *callable_info,
-                                 ffi_cif *cif,
-                                 GIFFIClosureCallback callback,
-                                 gpointer user_data);
-

Prepares a callback for ffi invocation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

callable_info

a callable info from a typelib

 

cif

a ffi_cif structure

 

callback

the ffi callback

 

user_data

data to be passed into the callback

 
-
-
-

Returns

-

the ffi_closure or NULL on error. The return value -should be freed by calling g_callable_info_free_closure().

-
-
-
-
-

g_callable_info_free_closure ()

-
void
-g_callable_info_free_closure (GICallableInfo *callable_info,
-                              ffi_closure *closure);
-

Frees a ffi_closure returned from g_callable_info_prepare_closure()

-
-

Parameters

-
----- - - - - - - - - - - - - -

callable_info

a callable info from a typelib

 

closure

ffi closure

 
-
-
-
-
-

Types and Values

-
-

struct GIFunctionInvoker

-
struct GIFunctionInvoker {
-  ffi_cif cif;
-  gpointer native_address;
-};
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - -

ffi_cif cif;

the cif

 

gpointer native_address;

the native address

 
-
-
-
-
-

GIFFIReturnValue

-
typedef GIArgument GIFFIReturnValue;
-
-

TODO

-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-gir-reference.html gobject-introspection-1.64.1/docs/reference/html/gi-gir-reference.html --- gobject-introspection-1.56.1/docs/reference/html/gi-gir-reference.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-gir-reference.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,222 +0,0 @@ - - - - -The GIR XML format: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

The GIR XML format

-

The GIR XML format — The GIR XML format

-
-

- This chapter describes the GIR XML markup format. This describes exported C - API, including documentation. It may contain installation-specific data, - such as library filenames which may differ between platforms. -

-
-

-api node

- - The root node of all GIR documents is the api node. - - Possible children: namespace. - -
-

Example 4. A GIR fragment showing an api node

-
- - - - - - - -
1
-2
-3
<api version="1.0">
-  <namespace/>
-</api>
-
- -
-
-
-
-
-

-namespace node

- - Parent node: api. - Possible children: callback, - class, - function. - interface. - -
-

Example 5. A GIR fragment showing an namespace node

-
- - - - - - - -
1
-2
-3
-4
-5
-6
<api version="1.0">
-  <namespace="Gtk">
-     <class/>
-     <function/>
-  </namespace>
-</api>
-
- -
-
-
-
-
-

-class node

- - Parent node: namespace. - Possible children: constructor, - field, - method, - property. -
-

Example 6. A GIR fragment showing an class node

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
<api version="1.0">
-  <namespace="Gtk">
-    <class name="Widget">
-       <constructor/>
-       <field/>
-       <method/>
-       <property/>
-    <class>
-  </namespace>
-</api>
-
- -
-
-
-
-
-

-interface node

- - Parent node: namespace. - Possible children: field, - method, - property. -
-

Example 7. A GIR fragment showing an interface node

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
<api version="1.0">
-  <namespace="Gtk">
-    <interface name="Buildable">
-       <field/>
-       <method/>
-       <property/>
-    <interface>
-  </namespace>
-</api>
-
- -
-
-
-
-
-

-function node

- - Parent node: namespace. -
-

Example 8. A GIR fragment showing an function node

-
- - - - - - - -
1
-2
-3
-4
-5
-6
<api version="1.0">
-  <namespace="Gtk">
-    <function name="init">
-    </function>
-  </namespace>
-</api>
-
- -
-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GISignalInfo.html gobject-introspection-1.64.1/docs/reference/html/gi-GISignalInfo.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GISignalInfo.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GISignalInfo.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,225 +0,0 @@ - - - - -GISignalInfo: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GISignalInfo

-

GISignalInfo — Struct representing a signal

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
#define -GI_IS_SIGNAL_INFO() -
-GSignalFlags - -g_signal_info_get_flags () -
-GIVFuncInfo * - -g_signal_info_get_class_closure () -
-gboolean - -g_signal_info_true_stops_emit () -
-
-
-

Types and Values

-
---- - - - - -
typedefGISignalInfo
-
-
-

Description

-

GISignalInfo represents a signal. It's a sub-struct of GICallableInfo -and contains a set of flags and a class closure.

-

See GICallableInfo for information on how to retreive arguments -and other metadata from the signal.

-
-

Struct hierarchy

-
-  GIBaseInfo
-   +----GICallableInfo
-         +----GIFunctionInfo
-         +----GISignalInfo
-         +----GIVFuncInfo
-
-
-
-
-

Functions

-
-

GI_IS_SIGNAL_INFO()

-
#define             GI_IS_SIGNAL_INFO(info)
-

Checks if info - is a GISignalInfo.

-
-

Parameters

-
----- - - - - - -

info

an info structure

 
-
-
-
-
-

g_signal_info_get_flags ()

-
GSignalFlags
-g_signal_info_get_flags (GISignalInfo *info);
-

Obtain the flags for this signal info. See GSignalFlags for -more information about possible flag values.

-
-

Parameters

-
----- - - - - - -

info

a GISignalInfo

 
-
-
-

Returns

-

the flags

-
-
-
-
-

g_signal_info_get_class_closure ()

-
GIVFuncInfo *
-g_signal_info_get_class_closure (GISignalInfo *info);
-

Obtain the class closure for this signal if one is set. The class -closure is a virtual function on the type that the signal belongs to. -If the signal lacks a closure NULL will be returned.

-
-

Parameters

-
----- - - - - - -

info

a GISignalInfo

 
-
-
-

Returns

-

the class closure or NULL.

-

[transfer full]

-
-
-
-
-

g_signal_info_true_stops_emit ()

-
gboolean
-g_signal_info_true_stops_emit (GISignalInfo *info);
-

Obtain if the returning true in the signal handler will -stop the emission of the signal.

-
-

Parameters

-
----- - - - - - -

info

a GISignalInfo

 
-
-
-

Returns

-

TRUE if returning true stops the signal emission

-
-
-
-
-

Types and Values

-
-

GISignalInfo

-
typedef GIBaseInfo GISignalInfo;
-
-

Represents a signal.

-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GIStructInfo.html gobject-introspection-1.64.1/docs/reference/html/gi-GIStructInfo.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GIStructInfo.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GIStructInfo.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,453 +0,0 @@ - - - - -GIStructInfo: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIStructInfo

-

GIStructInfo — Struct representing a C structure

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -GI_IS_STRUCT_INFO() -
-gsize - -g_struct_info_get_alignment () -
-gsize - -g_struct_info_get_size () -
-gboolean - -g_struct_info_is_gtype_struct () -
-gboolean - -g_struct_info_is_foreign () -
-gint - -g_struct_info_get_n_fields () -
-GIFieldInfo * - -g_struct_info_get_field () -
-gint - -g_struct_info_get_n_methods () -
-GIFunctionInfo * - -g_struct_info_get_method () -
-GIFunctionInfo * - -g_struct_info_find_method () -
-
-
-

Types and Values

-
---- - - - - -
typedefGIStructInfo
-
-
-

Description

-

GIStructInfo represents a generic C structure type.

-

A structure has methods and fields.

-
-

Struct hierarchy

-
-  GIBaseInfo
-   +----GIRegisteredTypeInfo
-         +----GIStructInfo
-
-
-
-
-

Functions

-
-

GI_IS_STRUCT_INFO()

-
#define             GI_IS_STRUCT_INFO(info)
-

Checks if info - is a GIStructInfo.

-
-

Parameters

-
----- - - - - - -

info

an info structure

 
-
-
-
-
-

g_struct_info_get_alignment ()

-
gsize
-g_struct_info_get_alignment (GIStructInfo *info);
-

Obtain the required alignment of the structure.

-
-

Parameters

-
----- - - - - - -

info

a GIStructInfo

 
-
-
-

Returns

-

required alignment in bytes

-
-
-
-
-

g_struct_info_get_size ()

-
gsize
-g_struct_info_get_size (GIStructInfo *info);
-

Obtain the total size of the structure.

-
-

Parameters

-
----- - - - - - -

info

a GIStructInfo

 
-
-
-

Returns

-

size of the structure in bytes

-
-
-
-
-

g_struct_info_is_gtype_struct ()

-
gboolean
-g_struct_info_is_gtype_struct (GIStructInfo *info);
-

Return true if this structure represents the "class structure" for some -GObject or GInterface. This function is mainly useful to hide this kind of structure -from generated public APIs.

-
-

Parameters

-
----- - - - - - -

info

a GIStructInfo

 
-
-
-

Returns

-

TRUE if this is a class struct, FALSE otherwise

-
-
-
-
-

g_struct_info_is_foreign ()

-
gboolean
-g_struct_info_is_foreign (GIStructInfo *info);
-

TODO

-
-

Parameters

-
----- - - - - - -

info

TODO

 
-
-
-

Returns

-

TODO

-
-
-
-
-

g_struct_info_get_n_fields ()

-
gint
-g_struct_info_get_n_fields (GIStructInfo *info);
-

Obtain the number of fields this structure has.

-
-

Parameters

-
----- - - - - - -

info

a GIStructInfo

 
-
-
-

Returns

-

number of fields

-
-
-
-
-

g_struct_info_get_field ()

-
GIFieldInfo *
-g_struct_info_get_field (GIStructInfo *info,
-                         gint n);
-

Obtain the type information for field with specified index.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIStructInfo

 

n

a field index

 
-
-
-

Returns

-

the GIFieldInfo, free it with g_base_info_unref() -when done.

-

[transfer full]

-
-
-
-
-

g_struct_info_get_n_methods ()

-
gint
-g_struct_info_get_n_methods (GIStructInfo *info);
-

Obtain the number of methods this structure has.

-
-

Parameters

-
----- - - - - - -

info

a GIStructInfo

 
-
-
-

Returns

-

number of methods

-
-
-
-
-

g_struct_info_get_method ()

-
GIFunctionInfo *
-g_struct_info_get_method (GIStructInfo *info,
-                          gint n);
-

Obtain the type information for method with specified index.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIStructInfo

 

n

a method index

 
-
-
-

Returns

-

the GIFunctionInfo, free it with g_base_info_unref() -when done.

-

[transfer full]

-
-
-
-
-

g_struct_info_find_method ()

-
GIFunctionInfo *
-g_struct_info_find_method (GIStructInfo *info,
-                           const gchar *name);
-

Obtain the type information for method named name -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIStructInfo

 

name

a method name

 
-
-
-

Returns

-

the GIFunctionInfo, free it with g_base_info_unref() -when done.

-

[transfer full]

-
-
-
-
-

Types and Values

-
-

GIStructInfo

-
typedef GIBaseInfo GIStructInfo;
-
-

Represents a struct.

-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GITypeInfo.html gobject-introspection-1.64.1/docs/reference/html/gi-GITypeInfo.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GITypeInfo.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GITypeInfo.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,484 +0,0 @@ - - - - -GITypeInfo: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GITypeInfo

-

GITypeInfo — Struct representing a type

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -GI_IS_TYPE_INFO() -
const gchar * - -g_type_tag_to_string () -
const gchar * - -g_info_type_to_string () -
-gboolean - -g_type_info_is_pointer () -
-GITypeTag - -g_type_info_get_tag () -
-GITypeInfo * - -g_type_info_get_param_type () -
-GIBaseInfo * - -g_type_info_get_interface () -
-gint - -g_type_info_get_array_length () -
-gint - -g_type_info_get_array_fixed_size () -
-gboolean - -g_type_info_is_zero_terminated () -
-GIArrayType - -g_type_info_get_array_type () -
-
-
-

Types and Values

-
---- - - - - -
typedefGITypeInfo
-
-
-

Description

-

GITypeInfo represents a type. You can retrieve a type info from -an argument (see GIArgInfo), a functions return value (see GIFunctionInfo), -a field (see GIFieldInfo), a property (see GIPropertyInfo), a constant -(see GIConstantInfo) or for a union discriminator (see GIUnionInfo).

-

A type can either be a of a basic type which is a standard C primitive -type or an interface type. For interface types you need to call -g_type_info_get_interface() to get a reference to the base info for that -interface.

-
-

Struct hierarchy

-
-  GIBaseInfo
-   +----GITypeInfo
-
-
-
-
-

Functions

-
-

GI_IS_TYPE_INFO()

-
#define             GI_IS_TYPE_INFO(info)
-

Checks if info - is a GITypeInfo.

-
-

Parameters

-
----- - - - - - -

info

an info structure

 
-
-
-
-
-

g_type_tag_to_string ()

-
const gchar *
-g_type_tag_to_string (GITypeTag type);
-

Obtain a string representation of type -

-
-

Parameters

-
----- - - - - - -

type

the type_tag

 
-
-
-

Returns

-

the string

-
-
-
-
-

g_info_type_to_string ()

-
const gchar *
-g_info_type_to_string (GIInfoType type);
-

Obtain a string representation of type -

-
-

Parameters

-
----- - - - - - -

type

the info type

 
-
-
-

Returns

-

the string

-
-
-
-
-

g_type_info_is_pointer ()

-
gboolean
-g_type_info_is_pointer (GITypeInfo *info);
-

Obtain if the type is passed as a reference.

-

Note that the types of GI_DIRECTION_OUT and GI_DIRECTION_INOUT parameters -will only be pointers if the underlying type being transferred is a pointer -(i.e. only if the type of the C function’s formal parameter is a pointer to a -pointer).

-
-

Parameters

-
----- - - - - - -

info

a GITypeInfo

 
-
-
-

Returns

-

TRUE if it is a pointer

-
-
-
-
-

g_type_info_get_tag ()

-
GITypeTag
-g_type_info_get_tag (GITypeInfo *info);
-

Obtain the type tag for the type. See GITypeTag for a list -of type tags.

-
-

Parameters

-
----- - - - - - -

info

a GITypeInfo

 
-
-
-

Returns

-

the type tag

-
-
-
-
-

g_type_info_get_param_type ()

-
GITypeInfo *
-g_type_info_get_param_type (GITypeInfo *info,
-                            gint n);
-

Obtain the parameter type n -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GITypeInfo

 

n

index of the parameter

 
-
-
-

Returns

-

the param type info.

-

[transfer full]

-
-
-
-
-

g_type_info_get_interface ()

-
GIBaseInfo *
-g_type_info_get_interface (GITypeInfo *info);
-

For types which have GI_TYPE_TAG_INTERFACE such as GObjects and boxed values, -this function returns full information about the referenced type. You can then -inspect the type of the returned GIBaseInfo to further query whether it is -a concrete GObject, a GInterface, a structure, etc. using g_base_info_get_type().

-
-

Parameters

-
----- - - - - - -

info

a GITypeInfo

 
-
-
-

Returns

-

the GIBaseInfo, or NULL. Free it with -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_type_info_get_array_length ()

-
gint
-g_type_info_get_array_length (GITypeInfo *info);
-

Obtain the array length of the type. The type tag must be a -GI_TYPE_TAG_ARRAY or -1 will returned.

-
-

Parameters

-
----- - - - - - -

info

a GITypeInfo

 
-
-
-

Returns

-

the array length, or -1 if the type is not an array

-
-
-
-
-

g_type_info_get_array_fixed_size ()

-
gint
-g_type_info_get_array_fixed_size (GITypeInfo *info);
-

Obtain the fixed array size of the type. The type tag must be a -GI_TYPE_TAG_ARRAY or -1 will returned.

-
-

Parameters

-
----- - - - - - -

info

a GITypeInfo

 
-
-
-

Returns

-

the size or -1 if it's not an array

-
-
-
-
-

g_type_info_is_zero_terminated ()

-
gboolean
-g_type_info_is_zero_terminated (GITypeInfo *info);
-

Obtain if the last element of the array is NULL. The type tag must be a -GI_TYPE_TAG_ARRAY or FALSE will returned.

-
-

Parameters

-
----- - - - - - -

info

a GITypeInfo

 
-
-
-

Returns

-

TRUE if zero terminated

-
-
-
-
-

g_type_info_get_array_type ()

-
GIArrayType
-g_type_info_get_array_type (GITypeInfo *info);
-

Obtain the array type for this type. See GIArrayType for a list of -possible values. If the type tag of this type is not array, -1 will be -returned.

-
-

Parameters

-
----- - - - - - -

info

a GITypeInfo

 
-
-
-

Returns

-

the array type or -1

-
-
-
-
-

Types and Values

-
-

GITypeInfo

-
typedef GIBaseInfo GITypeInfo;
-
-

Represents type information, direction, transfer etc.

-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-gitypelib.html gobject-introspection-1.64.1/docs/reference/html/gi-gitypelib.html --- gobject-introspection-1.56.1/docs/reference/html/gi-gitypelib.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-gitypelib.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,333 +0,0 @@ - - - - -gitypelib: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

gitypelib

-

gitypelib — TODO

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GITypelib * - -g_typelib_new_from_memory () -
-GITypelib * - -g_typelib_new_from_const_memory () -
-GITypelib * - -g_typelib_new_from_mapped_file () -
-void - -g_typelib_free () -
-gboolean - -g_typelib_symbol () -
const gchar * - -g_typelib_get_namespace () -
-
-
-

Types and Values

-
---- - - - - -
 GITypelib
-
-
-

Description

-

TODO

-
-
-

Functions

-
-

g_typelib_new_from_memory ()

-
GITypelib *
-g_typelib_new_from_memory (guint8 *memory,
-                           gsize len,
-                           GError **error);
-

Creates a new GITypelib from a memory location. The memory block -pointed to by typelib - will be automatically g_free()d when the -repository is destroyed.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

memory

address of memory chunk containing the typelib

 

len

length of memory chunk containing the typelib

 

error

a GError

 
-
-
-

Returns

-

the new GITypelib

-
-
-
-
-

g_typelib_new_from_const_memory ()

-
GITypelib *
-g_typelib_new_from_const_memory (const guint8 *memory,
-                                 gsize len,
-                                 GError **error);
-

Creates a new GITypelib from a memory location.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

memory

address of memory chunk containing the typelib

 

len

length of memory chunk containing the typelib

 

error

A GError

 
-
-
-

Returns

-

the new GITypelib

-
-
-
-
-

g_typelib_new_from_mapped_file ()

-
GITypelib *
-g_typelib_new_from_mapped_file (GMappedFile *mfile,
-                                GError **error);
-

Creates a new GITypelib from a GMappedFile.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

mfile

a GMappedFile, that will be free'd when the repository is destroyed

 

error

a GError

 
-
-
-

Returns

-

the new GITypelib

-
-
-
-
-

g_typelib_free ()

-
void
-g_typelib_free (GITypelib *typelib);
-

Free a GITypelib.

-
-

Parameters

-
----- - - - - - -

typelib

a GITypelib

 
-
-
-
-
-

g_typelib_symbol ()

-
gboolean
-g_typelib_symbol (GITypelib *typelib,
-                  const gchar *symbol_name,
-                  gpointer *symbol);
-

Loads a symbol from GITypelib.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

typelib

the typelib

 

symbol_name

name of symbol to be loaded

 

symbol

returns a pointer to the symbol value

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

g_typelib_get_namespace ()

-
const gchar *
-g_typelib_get_namespace (GITypelib *typelib);
-

TODO

-
-

Parameters

-
----- - - - - - -

typelib

TODO

 
-
-
-

Returns

-

TODO

-
-
-
-
-

Types and Values

-
-

GITypelib

-
typedef struct {
-} GITypelib;
-
-

TODO

-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GITypelib.html gobject-introspection-1.64.1/docs/reference/html/gi-GITypelib.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GITypelib.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GITypelib.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,3239 +0,0 @@ - - - - -GITypelib: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GITypelib

-

GITypelib — Layout and accessors for typelib

-
-
-

Stability Level

-Stable, unless otherwise indicated -
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-DirEntry * - -g_typelib_get_dir_entry () -
-DirEntry * - -g_typelib_get_dir_entry_by_name () -
-DirEntry * - -g_typelib_get_dir_entry_by_gtype_name () -
-DirEntry * - -g_typelib_get_dir_entry_by_error_domain () -
-gboolean - -g_typelib_matches_gtype_name_prefix () -
-void - -g_typelib_check_sanity () -
#define -g_typelib_get_string() -
-GQuark - -g_typelib_error_quark () -
-gboolean - -g_typelib_validate () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#defineG_IR_MAGIC
enumGTypelibBlobType
 Header
enumSectionType
 Section
 DirEntry
 SimpleTypeBlobFlags
 SimpleTypeBlob
 ArgBlob
 SignatureBlob
 CommonBlob
 FunctionBlob
 CallbackBlob
 InterfaceTypeBlob
 ArrayTypeDimension
 ArrayTypeBlob
 ParamTypeBlob
 ErrorTypeBlob
 ValueBlob
 FieldBlob
 RegisteredTypeBlob
 StructBlob
 UnionBlob
 EnumBlob
 PropertyBlob
 SignalBlob
 VFuncBlob
 ObjectBlob
 InterfaceBlob
 ConstantBlob
 AttributeBlob
enumGITypelibError
#defineG_TYPELIB_ERROR
 GITypelibHashBuilder
-
-
-

Description

-

The "typelib" is a binary, readonly, memory-mappable database -containing reflective information about a GObject library. -What the typelib describes and the types used are the same for every -platform so, apart the endianness of its scalar values, the typelib -database must be considered architecture-independent.

-

The format of GObject typelib is strongly influenced by the Mozilla XPCOM -format.

-

Some of the differences to XPCOM include:

-
    -
  • Type information is stored not quite as compactly (XPCOM stores it inline -in function descriptions in variable-sized blobs of 1 to n bytes. We store -16 bits of type information for each parameter, which is enough to encode -simple types inline. Complex (e.g. recursive) types are stored out of line -in a separate list of types.

  • -
  • String and complex type data is stored outside of typelib entry blobs, -references are stored as offsets relative to the start of the typelib. -One possibility is to store the strings and types in a pools at the end -of the typelib.

  • -
-

The typelib has the following general format:

-

typelib ::= header, section-index, directory, blobs, attributes, attributedata

-

directory ::= list of entries

-

entry ::= blob type, name, namespace, offset - blob ::= function|callback|struct|boxed|enum|flags|object|interface|constant|union - attribute ::= offset, key, value - attributedata ::= string data for attributes

-

Details

-

We describe the fragments that make up the typelib in the form of C structs -(although some fall short of being valid C structs since they contain -multiple flexible arrays).

-
-
-

Functions

-
-

g_typelib_get_dir_entry ()

-
DirEntry *
-g_typelib_get_dir_entry (GITypelib *typelib,
-                         guint16 index);
-

TODO

-
-

Parameters

-
----- - - - - - - - - - - - - -

typelib

TODO

 

index

TODO

 
-
-
-

Returns

-

TODO

-
-
-
-
-

g_typelib_get_dir_entry_by_name ()

-
DirEntry *
-g_typelib_get_dir_entry_by_name (GITypelib *typelib,
-                                 const char *name);
-

TODO

-
-

Parameters

-
----- - - - - - - - - - - - - -

typelib

TODO

 

name

TODO

 
-
-
-

Returns

-

TODO

-
-
-
-
-

g_typelib_get_dir_entry_by_gtype_name ()

-
DirEntry *
-g_typelib_get_dir_entry_by_gtype_name (GITypelib *typelib,
-                                       const gchar *gtype_name);
-

TODO

-
-

Parameters

-
----- - - - - - - - - - - - - -

typelib

TODO

 

gtype_name

TODO

 
-
-
-

Returns

-

TODO

-
-
-
-
-

g_typelib_get_dir_entry_by_error_domain ()

-
DirEntry *
-g_typelib_get_dir_entry_by_error_domain
-                               (GITypelib *typelib,
-                                GQuark error_domain);
-

TODO

-
-

Parameters

-
----- - - - - - - - - - - - - -

typelib

TODO

 

error_domain

TODO

 
-
-
-

Returns

-

TODO

-
-
-
-
-

g_typelib_matches_gtype_name_prefix ()

-
gboolean
-g_typelib_matches_gtype_name_prefix (GITypelib *typelib,
-                                     const gchar *gtype_name);
-

TODO

-
-

Parameters

-
----- - - - - - - - - - - - - -

typelib

TODO

 

gtype_name

TODO

 
-
-
-

Returns

-

TODO

-
-
-
-
-

g_typelib_check_sanity ()

-
void
-g_typelib_check_sanity (void);
-

TODO

-
-
-
-

g_typelib_get_string()

-
#define             g_typelib_get_string(typelib,offset)
-

TODO

-
-

Parameters

-
----- - - - - - - - - - - - - -

typelib

TODO

 

offset

TODO

 
-
-
-

Returns

-

TODO

-
-
-
-
-

g_typelib_error_quark ()

-
GQuark
-g_typelib_error_quark (void);
-

TODO

-
-

Returns

-

TODO

-
-
-
-
-

g_typelib_validate ()

-
gboolean
-g_typelib_validate (GITypelib *typelib,
-                    GError **error);
-

TODO

-
-

Parameters

-
----- - - - - - - - - - - - - -

typelib

TODO

 

error

TODO

 
-
-
-

Returns

-

TODO

-
-
-
-
-

Types and Values

-
-

G_IR_MAGIC

-
#define G_IR_MAGIC "GOBJ\nMETADATA\r\n\032"
-
-

Identifying prefix for the typelib. This was inspired by XPCOM, -which in turn borrowed from PNG.

-
-
-
-

enum GTypelibBlobType

-

The integral value of this enumeration appears in each "Blob" component of -a typelib to identify its type.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

BLOB_TYPE_INVALID

-

Should not appear in code

-
 

BLOB_TYPE_FUNCTION

-

A FunctionBlob

-
 

BLOB_TYPE_CALLBACK

-

A CallbackBlob

-
 

BLOB_TYPE_STRUCT

-

A StructBlob

-
 

BLOB_TYPE_BOXED

-

Can be either a StructBlob or UnionBlob

-
 

BLOB_TYPE_ENUM

-

An EnumBlob

-
 

BLOB_TYPE_FLAGS

-

An EnumBlob

-
 

BLOB_TYPE_OBJECT

-

An ObjectBlob

-
 

BLOB_TYPE_INTERFACE

-

An InterfaceBlob

-
 

BLOB_TYPE_CONSTANT

-

A ConstantBlob

-
 

BLOB_TYPE_INVALID_0

-

Deleted, used to be ErrorDomain.

-
 

BLOB_TYPE_UNION

-

A UnionBlob

-
 
-
-
-
-
-

Header

-
typedef struct {
-  gchar   magic[16];
-  guint8  major_version;
-  guint8  minor_version;
-  guint16 reserved;
-  guint16 n_entries;
-  guint16 n_local_entries;
-  guint32 directory;
-  guint32 n_attributes;
-  guint32 attributes;
-
-  guint32 dependencies;
-
-  guint32 size;
-  guint32 namespace;
-  guint32 nsversion;
-  guint32 shared_library;
-  guint32 c_prefix;
-
-  guint16 entry_blob_size;
-  guint16 function_blob_size;
-  guint16 callback_blob_size;
-  guint16 signal_blob_size;
-  guint16 vfunc_blob_size;
-  guint16 arg_blob_size;
-  guint16 property_blob_size;
-  guint16 field_blob_size;
-  guint16 value_blob_size;
-  guint16 attribute_blob_size;
-  guint16 constant_blob_size;
-  guint16 error_domain_blob_size;
-
-  guint16 signature_blob_size;
-  guint16 enum_blob_size;
-  guint16 struct_blob_size;
-  guint16 object_blob_size;
-  guint16 interface_blob_size;
-  guint16 union_blob_size;
-
-  guint32 sections;
-
-  guint16 padding[6];
-} Header;
-
-

The header structure appears exactly once at the beginning of a typelib. It is a -collection of meta-information, such as the number of entries and dependencies.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

gchar magic[16];

See G_IR_MAGIC.

 

guint8 major_version;

The major version number of the typelib format. Major version -number changes indicate incompatible changes to the tyeplib format.

 

guint8 minor_version;

The minor version number of the typelib format. Minor version -number changes indicate compatible changes and should still allow the -typelib to be parsed by a parser designed for the same major_version -.

 

guint16 reserved;

Reserved for future use.

 

guint16 n_entries;

The number of entries in the directory.

 

guint16 n_local_entries;

The number of entries referring to blobs in this typelib. -The local entries must occur before the unresolved entries.

 

guint32 directory;

Offset of the directory in the typelib.

 

guint32 n_attributes;

Number of attribute blocks

 

guint32 attributes;

Offset of the list of attributes in the typelib.

 

guint32 dependencies;

Offset of a single string, which is the list of immediate -dependencies, separated by the '|' character. The dependencies are -required in order to avoid having programs consuming a typelib check for -an "Unresolved" type return from every API call.

 

guint32 size;

The size in bytes of the typelib.

 

guint32 namespace;

Offset of the namespace string in the typelib.

 

guint32 nsversion;

Offset of the namespace version string in the typelib.

 

guint32 shared_library;

This field is the set of shared libraries associated with -the typelib. The entries are separated by the '|' (pipe) character.

 

guint32 c_prefix;

The prefix for the function names of the library

 

guint16 entry_blob_size;

The sizes of fixed-size blobs. Recording this information -here allows to write parser which continue to work if the format is -extended by adding new fields to the end of the fixed-size blobs.

 

guint16 function_blob_size;

See entry_blob_size -.

 

guint16 callback_blob_size;

See entry_blob_size -.

 

guint16 signal_blob_size;

See entry_blob_size -.

 

guint16 vfunc_blob_size;

See entry_blob_size -.

 

guint16 arg_blob_size;

See entry_blob_size -.

 

guint16 property_blob_size;

See entry_blob_size -.

 

guint16 field_blob_size;

See entry_blob_size -.

 

guint16 value_blob_size;

See entry_blob_size -.

 

guint16 attribute_blob_size;

See entry_blob_size -.

 

guint16 constant_blob_size;

See entry_blob_size -.

 

guint16 error_domain_blob_size;

See entry_blob_size -.

 

guint16 signature_blob_size;

See entry_blob_size -.

 

guint16 enum_blob_size;

See entry_blob_size -.

 

guint16 struct_blob_size;

See entry_blob_size -.

 

guint16 object_blob_size;

See entry_blob_size -.

 

guint16 interface_blob_size;

For variable-size blobs, the size of the struct up to -the first flexible array member. Recording this information here allows -to write parser which continue to work if the format is extended by -adding new fields before the first flexible array member in -variable-size blobs.

 

guint16 union_blob_size;

See entry_blob_size -.

 

guint32 sections;

Offset of section blob array

 

guint16 padding[6];

TODO

 
-
-
-
-
-

enum SectionType

-

TODO

-
-

Members

-
----- - - - - - - - - - - - - -

GI_SECTION_END

-

TODO

-
 

GI_SECTION_DIRECTORY_INDEX

-

TODO

-
 
-
-
-
-
-

Section

-
typedef struct {
-  guint32 id;
-  guint32 offset;
-} Section;
-
-

A section is a blob of data that's (at least theoretically) optional, -and may or may not be present in the typelib. Presently, just used -for the directory index. This allows a form of dynamic extensibility -with different tradeoffs from the format minor version.

-
-

Members

-
----- - - - - - - - - - - - - -

guint32 id;

A SectionType

 

guint32 offset;

Integer offset for this section

 
-
-
-
-
-

DirEntry

-
typedef struct {
-  guint16 blob_type;
-
-  guint16 local    : 1;
-  guint16 reserved :15;
-  guint32 name;
-  guint32 offset;
-} DirEntry;
-
-

References to directory entries are stored as 1-based 16-bit indexes.

-

All blobs pointed to by a directory entry start with the same layout for -the first 8 bytes (the reserved flags may be used by some blob types)

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint16 blob_type;

A GTypelibBlobType

 

guint16 local : 1;

Whether this entry refers to a blob in this typelib.

 

guint16 reserved :15;

Reserved for future use.

 

guint32 name;

The name of the entry.

 

guint32 offset;

If is_local is set, this is the offset of the blob in the typelib. -Otherwise, it is the offset of the namespace in which the blob has to be -looked up by name.

 
-
-
-
-
-

SimpleTypeBlobFlags

-
typedef struct {
-  guint reserved   : 8;
-  guint reserved2  :16;
-  guint pointer    : 1;
-  guint reserved3  : 2;
-  guint tag        : 5;
-} SimpleTypeBlobFlags;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint reserved : 8;

Reserved for future use.

 

guint reserved2 :16;

Reserved for future use.

 

guint pointer : 1;

TODO

 

guint reserved3 : 2;

Reserved for future use.

 

guint tag : 5;

A GITypeTag

 
-
-
-
-
-

SimpleTypeBlob

-

The SimpleTypeBlob is the general purpose "reference to a type" construct, -used in method parameters, returns, callback definitions, fields, constants, -etc. It's actually just a 32 bit integer which you can see from the union -definition. This is for efficiency reasons, since there are so many -references to types.

-

SimpleTypeBlob is divided into two cases; first, if "reserved" and -"reserved2", the type tag for a basic type is embedded in the "tag" bits. -This allows e.g. GI_TYPE_TAG_UTF8, GI_TYPE_TAG_INT and the like to be -embedded directly without taking up extra space.

-

References to "interfaces" (objects, interfaces) are more complicated; -In this case, the integer is actually an offset into the directory (see -above). Because the header is larger than 2^8=256 bits, all offsets will -have one of the upper 24 bits set.

-
-

Members

-
----- - - - - - - - - - - - - -

SimpleTypeBlobFlags flags;

TODO

 

guint32 offset;

Offset relative to header->types that points to a TypeBlob. -Unlike other offsets, this is in words (ie 32bit units) rather -than bytes.

 
-
-
-
-
-

ArgBlob

-
typedef struct {
-  guint32        name;
-
-  guint          in                           : 1;
-  guint          out                          : 1;
-  guint          caller_allocates             : 1;
-  guint          nullable                     : 1;
-  guint          optional                     : 1;
-  guint          transfer_ownership           : 1;
-  guint          transfer_container_ownership : 1;
-  guint          return_value                 : 1;
-  guint          scope                        : 3;
-  guint          skip                         : 1;
-  guint          reserved                     :20;
-  gint8          closure;
-  gint8          destroy;
-
-  guint16        padding;
-
-  SimpleTypeBlob arg_type;
-} ArgBlob;
-
-

Types are specified by four bytes. If the three high bytes are zero, -the low byte describes a basic type, otherwise the 32bit number is an -offset which points to a TypeBlob.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint32 name;

A suggested name for the parameter.

 

guint in : 1;

The parameter is an input to the function

 

guint out : 1;

The parameter is used to return an output of the function. Parameters -can be both in and out. Out parameters implicitly add another level of -indirection to the parameter type. Ie if the type is uint32 in an out -parameter, the function actually takes an uint32*.

 

guint caller_allocates : 1;

The parameter is a pointer to a struct or object that -will receive an output of the function.

 

guint nullable : 1;

Only meaningful for types which are passed as pointers. For an -in parameter, indicates if it is ok to pass NULL in. Gor an out -parameter, indicates whether it may return NULL. Note that NULL is a -valid GList and GSList value, thus allow_none will normally be set -for parameters of these types.

 

guint optional : 1;

For an out parameter, indicates that NULL may be passed in -if the value is not needed.

 

guint transfer_ownership : 1;

For an in parameter, indicates that the function takes -over ownership of the parameter value. For an out parameter, it indicates -that the caller is responsible for freeing the return value.

 

guint transfer_container_ownership : 1;

For container types, indicates that the -ownership of the container, but not of its contents is transferred. -This is typically the case for out parameters returning lists of -statically allocated things.

 

guint return_value : 1;

The parameter should be considered the return value of the -function. Only out parameters can be marked as return value, and there -can be at most one per function call. If an out parameter is marked as -return value, the actual return value of the function should be either -void or a boolean indicating the success of the call.

 

guint scope : 3;

A GIScopeType. If the parameter is of a callback type, this denotes -the scope of the user_data and the callback function pointer itself -(for languages that emit code at run-time).

 

guint skip : 1;

Indicates that the parameter is only useful in C and should be skipped.

 

guint reserved :20;

Reserved for future use.

 

gint8 closure;

Index of the closure (user_data) parameter associated with the -callback, or -1.

 

gint8 destroy;

Index of the destroy notfication callback parameter associated -with the callback, or -1.

 

guint16 padding;

TODO

 

SimpleTypeBlob arg_type;

Describes the type of the parameter. See details below.

 
-
-
-
-
-

SignatureBlob

-
typedef struct {
-  SimpleTypeBlob return_type;
-
-  guint16        may_return_null              : 1;
-  guint16        caller_owns_return_value     : 1;
-  guint16        caller_owns_return_container : 1;
-  guint16        skip_return                  : 1;
-  guint16        instance_transfer_ownership  : 1;
-  guint16        throws                       : 1;
-  guint16        reserved                     :10;
-
-  guint16        n_arguments;
-
-  ArgBlob        arguments[];
-} SignatureBlob;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

SimpleTypeBlob return_type;

Describes the type of the return value. See details below.

 

guint16 may_return_null : 1;

Only relevant for pointer types. Indicates whether the -caller must expect NULL as a return value.

 

guint16 caller_owns_return_value : 1;

If set, the caller is responsible for freeing -the return value if it is no longer needed.

 

guint16 caller_owns_return_container : 1;

This flag is only relevant if the return type -is a container type. If the flag is set, the caller is resonsible for -freeing the container, but not its contents.

 

guint16 skip_return : 1;

Indicates that the return value is only useful in C and should -be skipped.

 

guint16 instance_transfer_ownership : 1;

When calling, the function assumes ownership of -the instance parameter.

 

guint16 throws : 1;

Denotes the signature takes an additional GError argument beyond -the annotated arguments.

 

guint16 reserved :10;

Reserved for future use.

 

guint16 n_arguments;

The number of arguments that this function expects, also the -length of the array of ArgBlobs.

 

ArgBlob arguments[];

An array of ArgBlob for the arguments of the function.

 
-
-
-
-
-

CommonBlob

-
typedef struct {
-  guint16 blob_type;  /* 1 */
-
-  guint16 deprecated : 1;
-  guint16 reserved   :15;
-  guint32 name;
-} CommonBlob;
-
-

The CommonBlob is shared between FunctionBlob, -CallbackBlob, SignalBlob.

-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

guint16 blob_type;

A GTypelibBlobType

 

guint16 deprecated : 1;

Whether the blob is deprecated.

 

guint16 reserved :15;

Reserved for future use.

 

guint32 name;

The name of the blob.

 
-
-
-
-
-

FunctionBlob

-
typedef struct {
-  guint16 blob_type;  /* 1 */
-
-  guint16 deprecated  : 1;
-  guint16 setter      : 1;
-  guint16 getter      : 1;
-  guint16 constructor : 1;
-  guint16 wraps_vfunc : 1;
-  guint16 throws      : 1;
-  guint16 index       :10;
-  /* Note the bits above need to match CommonBlob
-   * and are thus exhausted, extend things using
-   * the reserved block below. */
-
-  guint32 name;
-  guint32 symbol;
-  guint32 signature;
-
-  guint16 is_static   : 1;
-  guint16 reserved    : 15;
-  guint16 reserved2   : 16;
-} FunctionBlob;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint16 blob_type;

BLOB_TYPE_FUNCTION

 

guint16 deprecated : 1;

The function is deprecated.

 

guint16 setter : 1;

The function is a setter for a property. Language bindings may -prefer to not bind individual setters and rely on the generic -g_object_set().

 

guint16 getter : 1;

The function is a getter for a property. Language bindings may -prefer to not bind individual getters and rely on the generic -g_object_get().

 

guint16 constructor : 1;

The function acts as a constructor for the object it is -contained in.

 

guint16 wraps_vfunc : 1;

The function is a simple wrapper for a virtual function.

 

guint16 throws : 1;

This is now additionally stored in the SignatureBlob.

[deprecated]

guint16 index :10;

Index of the property that this function is a setter or getter of -in the array of properties of the containing interface, or index -of the virtual function that this function wraps.

 

guint32 name;

TODO

 

guint32 symbol;

The symbol which can be used to obtain the function pointer with -dlsym().

 

guint32 signature;

Offset of the SignatureBlob describing the parameter types and the -return value type.

 

guint16 is_static : 1;

The function is a "static method"; in other words it's a pure -function whose name is conceptually scoped to the object.

 

guint16 reserved : 15;

Reserved for future use.

 

guint16 reserved2 : 16;

Reserved for future use.

 
-
-
-
-
-

CallbackBlob

-
typedef struct {
-  guint16 blob_type;  /* 2 */
-
-  guint16 deprecated : 1;
-  guint16 reserved   :15;
-  guint32 name;
-  guint32 signature;
-} CallbackBlob;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint16 blob_type;

TODO

 

guint16 deprecated : 1;

TODO

 

guint16 reserved :15;

Reserved for future use.

 

guint32 name;

TODO

 

guint32 signature;

Offset of the SignatureBlob describing the parameter types and -the return value type.

 
-
-
-
-
-

InterfaceTypeBlob

-
typedef struct {
-  guint8  pointer  :1;
-  guint8  reserved :2;
-  guint8  tag      :5;
-  guint8  reserved2;
-  guint16 interface;
-} InterfaceTypeBlob;
-
-

If the interface is an enum of flags type, is_pointer is 0, otherwise it is 1.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint8 pointer :1;

Whether this type represents an indirection

 

guint8 reserved :2;

Reserved for future use.

 

guint8 tag :5;

A GITypeTag

 

guint8 reserved2;

Reserved for future use.

 

guint16 interface;

Index of the directory entry for the interface.

 
-
-
-
-
-

ArrayTypeDimension

-

TODO

-
-

Members

-
----- - - - - - - - - - - - - -

guint16 length;

TODO

 

guint16 size;

TODO

 
-
-
-
-
-

ArrayTypeBlob

-
typedef struct {
-  guint16 pointer         :1;
-  guint16 reserved        :2;
-  guint16 tag             :5;
-
-  guint16 zero_terminated :1;
-  guint16 has_length      :1;
-  guint16 has_size        :1;
-  guint16 array_type      :2;
-  guint16 reserved2       :3;
-
-  ArrayTypeDimension dimensions;
-
-  SimpleTypeBlob type;
-} ArrayTypeBlob;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint16 pointer :1;

TODO

 

guint16 reserved :2;

Reserved for future use.

 

guint16 tag :5;

TODO

 

guint16 zero_terminated :1;

Indicates that the array must be terminated by a suitable -NULL value.

 

guint16 has_length :1;

Indicates that length points to a parameter specifying the -length of the array. If both has_length and zero_terminated are set, the -convention is to pass -1 for the length if the array is zero-terminated.

 

guint16 has_size :1;

Indicates that size is the fixed size of the array.

 

guint16 array_type :2;

Indicates whether this is a C array, GArray, GPtrArray, or -GByteArray. If something other than a C array, the length and element -size are implicit in the structure.

 

guint16 reserved2 :3;

Reserved for future use.

 

ArrayTypeDimension dimensions;

TODO

 

SimpleTypeBlob type;

TODO

 
-
-
-
-
-

ParamTypeBlob

-
typedef struct {
-  guint8	 pointer  :1;
-  guint8	 reserved :2;
-  guint8	 tag      :5;
-
-  guint8	 reserved2;
-  guint16	 n_types;
-
-  SimpleTypeBlob type[];
-} ParamTypeBlob;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint8 pointer :1;

TODO

 

guint8 reserved :2;

Reserved for future use.

 

guint8 tag :5;

TODO

 

guint8 reserved2;

Reserved for future use.

 

guint16 n_types;

The number of parameter types to follow.

 

SimpleTypeBlob type[];

Describes the type of the list elements.

 
-
-
-
-
-

ErrorTypeBlob

-
typedef struct {
-  guint8  pointer  :1;
-  guint8  reserved :2;
-  guint8  tag      :5;
-
-  guint8  reserved2;
-
-  guint16 n_domains; /* Must be 0 */
-  guint16 domains[];
-} ErrorTypeBlob;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint8 pointer :1;

TODO

 

guint8 reserved :2;

TODO

 

guint8 tag :5;

TODO

 

guint8 reserved2;

TODO

 

guint16 n_domains;

TODO: must be 0

 

guint16 domains[];

TODO

 
-
-
-
-
-

ValueBlob

-
typedef struct {
-  guint32 deprecated : 1;
-  guint32 unsigned_value : 1;
-  guint32 reserved   :30;
-  guint32 name;
-  gint32 value;
-} ValueBlob;
-
-

Values commonly occur in enums and flags.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint32 deprecated : 1;

Whether this value is deprecated

 

guint32 unsigned_value : 1;

if set, value is a 32-bit unsigned integer cast to gint32

 

guint32 reserved :30;

Reserved for future use.

 

guint32 name;

Name of blob

 

gint32 value;

The numerical value

 
-
-
-
-
-

FieldBlob

-
typedef struct {
-  guint32        name;
-
-  guint8         readable :1;
-  guint8         writable :1;
-  guint8         has_embedded_type :1;
-  guint8         reserved :5;
-  guint8         bits;
-
-  guint16        struct_offset;
-
-  guint32        reserved2;
-
-  SimpleTypeBlob type;
-} FieldBlob;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint32 name;

The name of the field.

 

guint8 readable :1;

TODO

 

guint8 writable :1;

How the field may be accessed.

 

guint8 has_embedded_type :1;

An anonymous type follows the FieldBlob.

 

guint8 reserved :5;

Reserved for future use.

 

guint8 bits;

If this field is part of a bitfield, the number of bits which it -uses, otherwise 0.

 

guint16 struct_offset;

The offset of the field in the struct. The value 0xFFFF -indicates that the struct offset is unknown.

 

guint32 reserved2;

Reserved for future use.

 

SimpleTypeBlob type;

The type of the field.

 
-
-
-
-
-

RegisteredTypeBlob

-
typedef struct {
-  guint16 blob_type;
-  guint16 deprecated   : 1;
-  guint16 unregistered : 1;
-  guint16 reserved :14;
-  guint32 name;
-
-  guint32 gtype_name;
-  guint32 gtype_init;
-} RegisteredTypeBlob;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint16 blob_type;

TODO

 

guint16 deprecated : 1;

TODO

 

guint16 unregistered : 1;

TODO

 

guint16 reserved :14;

Reserved for future use.

 

guint32 name;

TODO

 

guint32 gtype_name;

The name under which the type is registered with GType.

 

guint32 gtype_init;

The symbol name of the get_type() function which registers the -type.

 
-
-
-
-
-

StructBlob

-
typedef struct {
-  guint16   blob_type;
-
-  guint16   deprecated   : 1;
-  guint16   unregistered : 1;
-  guint16   is_gtype_struct : 1;
-  guint16   alignment    : 6;
-  guint16   foreign      : 1;
-  guint16   reserved     : 6;
-
-  guint32   name;
-
-  guint32   gtype_name;
-  guint32   gtype_init;
-
-  guint32   size;
-
-  guint16   n_fields;
-  guint16   n_methods;
-
-  guint32   reserved2;
-  guint32   reserved3;
-} StructBlob;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint16 blob_type;

BLOB_TYPE_STRUCT

 

guint16 deprecated : 1;

Whether this structure is deprecated

 

guint16 unregistered : 1;

If this is set, the type is not registered with GType.

 

guint16 is_gtype_struct : 1;

Whether this structure is the class or interface layout -for a GObject

 

guint16 alignment : 6;

The byte boundary that the struct is aligned to in memory

 

guint16 foreign : 1;

If the type is foreign, eg if it's expected to be overridden by -a native language binding instead of relying of introspected bindings.

 

guint16 reserved : 6;

Reserved for future use.

 

guint32 name;

TODO

 

guint32 gtype_name;

String name of the associated GType

 

guint32 gtype_init;

String naming the symbol which gets the runtime GType

 

guint32 size;

The size of the struct in bytes.

 

guint16 n_fields;

TODO

 

guint16 n_methods;

TODO

 

guint32 reserved2;

Reserved for future use.

 

guint32 reserved3;

Reserved for future use.

 
-
-
-
-
-

UnionBlob

-
typedef struct {
-  guint16      blob_type;
-  guint16      deprecated    : 1;
-  guint16      unregistered  : 1;
-  guint16      discriminated : 1;
-  guint16      alignment     : 6;
-  guint16      reserved      : 7;
-  guint32      name;
-
-  guint32      gtype_name;
-  guint32      gtype_init;
-
-  guint32      size;
-
-  guint16      n_fields;
-  guint16      n_functions;
-
-  guint32      reserved2;
-  guint32      reserved3;
-
-  gint32       discriminator_offset;
-  SimpleTypeBlob discriminator_type;
-} UnionBlob;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint16 blob_type;

TODO

 

guint16 deprecated : 1;

TODO

 

guint16 unregistered : 1;

If this is set, the type is not registered with GType.

 

guint16 discriminated : 1;

Is set if the union is discriminated

 

guint16 alignment : 6;

The byte boundary that the union is aligned to in memory

 

guint16 reserved : 7;

Reserved for future use.

 

guint32 name;

TODO

 

guint32 gtype_name;

String name of the associated GType

 

guint32 gtype_init;

String naming the symbol which gets the runtime GType

 

guint32 size;

TODO

 

guint16 n_fields;

Length of the arrays

 

guint16 n_functions;

TODO

 

guint32 reserved2;

Reserved for future use.

 

guint32 reserved3;

Reserved for future use.

 

gint32 discriminator_offset;

Offset from the beginning of the union where the -discriminator of a discriminated union is located. The value 0xFFFF -indicates that the discriminator offset is unknown.

 

SimpleTypeBlob discriminator_type;

Type of the discriminator

 
-
-
-
-
-

EnumBlob

-
typedef struct {
-  guint16   blob_type;
-
-  guint16   deprecated   : 1;
-  guint16   unregistered : 1;
-  guint16   storage_type : 5;
-  guint16   reserved     : 9;
-
-  guint32   name;
-
-  guint32   gtype_name;
-  guint32   gtype_init;
-
-  guint16   n_values;
-  guint16   n_methods;
-
-  guint32   error_domain;
-
-  ValueBlob values[];
-} EnumBlob;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint16 blob_type;

TODO

 

guint16 deprecated : 1;

TODO

 

guint16 unregistered : 1;

If this is set, the type is not registered with GType.

 

guint16 storage_type : 5;

The tag of the type used for the enum in the C ABI -(will be a signed or unsigned integral type)

 

guint16 reserved : 9;

Reserved for future use.

 

guint32 name;

TODO

 

guint32 gtype_name;

String name of the associated GType

 

guint32 gtype_init;

String naming the symbol which gets the runtime GType

 

guint16 n_values;

The length of the values array.

 

guint16 n_methods;

The length of the methods array.

 

guint32 error_domain;

String naming the GError domain this enum is associated with

 

ValueBlob values[];

TODO

 
-
-
-
-
-

PropertyBlob

-
typedef struct {
-  guint32        name;
-
-  guint32        deprecated                   : 1;
-  guint32        readable                     : 1;
-  guint32        writable                     : 1;
-  guint32        construct                    : 1;
-  guint32        construct_only               : 1;
-  guint32        transfer_ownership           : 1;
-  guint32        transfer_container_ownership : 1;
-  guint32        reserved                     :25;
-
-  guint32        reserved2;
-
-  SimpleTypeBlob type;
-} PropertyBlob;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint32 name;

The name of the property.

 

guint32 deprecated : 1;

TODO

 

guint32 readable : 1;

TODO

 

guint32 writable : 1;

TODO

 

guint32 construct : 1;

TODO

 

guint32 construct_only : 1;

The ParamFlags used when registering the property.

 

guint32 transfer_ownership : 1;

When writing, the type containing the property takes -ownership of the value. When reading, the returned value needs to be -released by the caller.

 

guint32 transfer_container_ownership : 1;

For container types indicates that the -ownership of the container, but not of its contents, is transferred. -This is typically the case when reading lists of statically allocated -things.

 

guint32 reserved :25;

Reserved for future use.

 

guint32 reserved2;

Reserved for future use.

 

SimpleTypeBlob type;

Describes the type of the property.

 
-
-
-
-
-

SignalBlob

-
typedef struct {
-  guint16 deprecated        : 1;
-  guint16 run_first         : 1;
-  guint16 run_last          : 1;
-  guint16 run_cleanup       : 1;
-  guint16 no_recurse        : 1;
-  guint16 detailed          : 1;
-  guint16 action            : 1;
-  guint16 no_hooks          : 1;
-  guint16 has_class_closure : 1;
-  guint16 true_stops_emit   : 1;
-  guint16 reserved          : 6;
-
-  guint16 class_closure;
-
-  guint32 name;
-
-  guint32 reserved2;
-
-  guint32 signature;
-} SignalBlob;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint16 deprecated : 1;

TODO

 

guint16 run_first : 1;

TODO

 

guint16 run_last : 1;

TODO

 

guint16 run_cleanup : 1;

TODO

 

guint16 no_recurse : 1;

TODO

 

guint16 detailed : 1;

TODO

 

guint16 action : 1;

TODO

 

guint16 no_hooks : 1;

The flags used when registering the signal.

 

guint16 has_class_closure : 1;

Set if the signal has a class closure.

 

guint16 true_stops_emit : 1;

Whether the signal has true-stops-emit semantics

 

guint16 reserved : 6;

Reserved for future use.

 

guint16 class_closure;

The index of the class closure in the list of virtual -functions of the object or interface on which the signal is defined.

 

guint32 name;

The name of the signal.

 

guint32 reserved2;

Reserved for future use.

 

guint32 signature;

Offset of the SignatureBlob describing the parameter types -and the return value type.

 
-
-
-
-
-

VFuncBlob

-
typedef struct {
-  guint32 name;
-
-  guint16 must_chain_up           : 1;
-  guint16 must_be_implemented     : 1;
-  guint16 must_not_be_implemented : 1;
-  guint16 class_closure           : 1;
-  guint16 throws                  : 1;
-  guint16 reserved                :11;
-  guint16 signal;
-
-  guint16 struct_offset;
-  guint16 invoker : 10; /* Number of bits matches @index in FunctionBlob */
-  guint16 reserved2 : 6;
-
-  guint32 reserved3;
-  guint32 signature;
-} VFuncBlob;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint32 name;

The name of the virtual function.

 

guint16 must_chain_up : 1;

If set, every implementation of this virtual function must -chain up to the implementation of the parent class.

 

guint16 must_be_implemented : 1;

If set, every derived class must override this virtual -function.

 

guint16 must_not_be_implemented : 1;

If set, derived class must not override this -virtual function.

 

guint16 class_closure : 1;

Set if this virtual function is the class closure of a -signal.

 

guint16 throws : 1;

This is now additionally stored in the SignatureBlob.

[deprecated]

guint16 reserved :11;

Reserved for future use.

 

guint16 signal;

The index of the signal in the list of signals of the object or -interface to which this virtual function belongs.

 

guint16 struct_offset;

The offset of the function pointer in the class struct. -The value 0xFFFF indicates that the struct offset is unknown.

 

guint16 invoker : 10;

If a method invoker for this virtual exists, this is the offset -in the class structure of the method. If no method is known, this value -will be 0x3ff.

 

guint16 reserved2 : 6;

Reserved for future use.

 

guint32 reserved3;

Reserved for future use.

 

guint32 signature;

Offset of the SignatureBlob describing the parameter types and -the return value type.

 
-
-
-
-
-

ObjectBlob

-
typedef struct {
-  guint16   blob_type;  /* 7 */
-  guint16   deprecated   : 1;
-  guint16   abstract     : 1;
-  guint16   fundamental  : 1;
-  guint16   reserved     :13;
-  guint32   name;
-
-  guint32   gtype_name;
-  guint32   gtype_init;
-
-  guint16   parent;
-  guint16   gtype_struct;
-
-  guint16   n_interfaces;
-  guint16   n_fields;
-  guint16   n_properties;
-  guint16   n_methods;
-  guint16   n_signals;
-  guint16   n_vfuncs;
-  guint16   n_constants;
-  guint16   n_field_callbacks;
-
-  guint32   ref_func;
-  guint32   unref_func;
-  guint32   set_value_func;
-  guint32   get_value_func;
-
-  guint32   reserved3;
-  guint32   reserved4;
-
-  guint16   interfaces[];
-} ObjectBlob;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint16 blob_type;

BLOB_TYPE_OBJECT

 

guint16 deprecated : 1;

TODO

 

guint16 abstract : 1;

TODO

 

guint16 fundamental : 1;

this object is not a GObject derived type, instead it's -an additional fundamental type.

 

guint16 reserved :13;

Reserved for future use.

 

guint32 name;

TODO

 

guint32 gtype_name;

String name of the associated GType

 

guint32 gtype_init;

String naming the symbol which gets the runtime GType

 

guint16 parent;

The directory index of the parent type. This is only set for -objects. If an object does not have a parent, it is zero.

 

guint16 gtype_struct;

TODO

 

guint16 n_interfaces;

TODO

 

guint16 n_fields;

TODO

 

guint16 n_properties;

TODO

 

guint16 n_methods;

TODO

 

guint16 n_signals;

TODO

 

guint16 n_vfuncs;

TODO

 

guint16 n_constants;

The lengths of the arrays.Up to 16bits of padding may be -inserted between the arrays to ensure that they start on a 32bit -boundary.

 

guint16 n_field_callbacks;

The number of n_fields which are also callbacks. -This is used to calculate the fields section size in constant time.

 

guint32 ref_func;

String pointing to a function which can be called to increase -the reference count for an instance of this object type.

 

guint32 unref_func;

String pointing to a function which can be called to decrease -the reference count for an instance of this object type.

 

guint32 set_value_func;

String pointing to a function which can be called to -convert a pointer of this object to a GValue

 

guint32 get_value_func;

String pointing to a function which can be called to -convert extract a pointer to this object from a GValue

 

guint32 reserved3;

Reserved for future use.

 

guint32 reserved4;

Reserved for future use.

 

guint16 interfaces[];

An array of indices of directory entries for the implemented -interfaces.

 
-
-
-
-
-

InterfaceBlob

-
typedef struct {
-  guint16 blob_type;
-  guint16 deprecated   : 1;
-  guint16 reserved     :15;
-  guint32 name;
-
-  guint32 gtype_name;
-  guint32 gtype_init;
-  guint16 gtype_struct;
-
-  guint16 n_prerequisites;
-  guint16 n_properties;
-  guint16 n_methods;
-  guint16 n_signals;
-  guint16 n_vfuncs;
-  guint16 n_constants;
-
-  guint16 padding;
-
-  guint32 reserved2;
-  guint32 reserved3;
-
-  guint16 prerequisites[];
-} InterfaceBlob;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint16 blob_type;

TODO

 

guint16 deprecated : 1;

TODO

 

guint16 reserved :15;

Reserved for future use.

 

guint32 name;

TODO

 

guint32 gtype_name;

TODO

 

guint32 gtype_init;

TODO

 

guint16 gtype_struct;

Name of the interface "class" C structure

 

guint16 n_prerequisites;

Number of prerequisites

 

guint16 n_properties;

Number of properties

 

guint16 n_methods;

Number of methods

 

guint16 n_signals;

Number of signals

 

guint16 n_vfuncs;

Number of virtual functions

 

guint16 n_constants;

The lengths of the arrays. Up to 16bits of padding may be -inserted between the arrays to ensure that they start on a 32bit -boundary.

 

guint16 padding;

TODO

 

guint32 reserved2;

Reserved for future use.

 

guint32 reserved3;

Reserved for future use.

 

guint16 prerequisites[];

An array of indices of directory entries for required -interfaces.

 
-
-
-
-
-

ConstantBlob

-
typedef struct {
-  guint16        blob_type;
-  guint16        deprecated   : 1;
-  guint16        reserved     :15;
-  guint32        name;
-
-  SimpleTypeBlob type;
-
-  guint32        size;
-  guint32        offset;
-
-  guint32        reserved2;
-} ConstantBlob;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint16 blob_type;

TODO

 

guint16 deprecated : 1;

TODO

 

guint16 reserved :15;

Reserved for future use.

 

guint32 name;

TODO

 

SimpleTypeBlob type;

The type of the value. In most cases this should be a numeric type -or string.

 

guint32 size;

The size of the value in bytes.

 

guint32 offset;

The offset of the value in the typelib.

 

guint32 reserved2;

Reserved for future use.

 
-
-
-
-
-

AttributeBlob

-
typedef struct {
-  guint32 offset;
-  guint32 name;
-  guint32 value;
-} AttributeBlob;
-
-

TODO

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

guint32 offset;

The offset of the typelib entry to which this attribute refers. -Attributes are kept sorted by offset, so that the attributes of an -entry can be found by a binary search.

 

guint32 name;

The name of the attribute, a string.

 

guint32 value;

The value of the attribute (also a string)

 
-
-
-
-
-

enum GITypelibError

-

A error set while validating the GITypelib

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_TYPELIB_ERROR_INVALID

-

the typelib is invalid

-
 

G_TYPELIB_ERROR_INVALID_HEADER

-

the typelib header is invalid

-
 

G_TYPELIB_ERROR_INVALID_DIRECTORY

-

the typelib directory is invalid

-
 

G_TYPELIB_ERROR_INVALID_ENTRY

-

a typelib entry is invalid

-
 

G_TYPELIB_ERROR_INVALID_BLOB

-

a typelib blob is invalid

-
 
-
-
-
-
-

G_TYPELIB_ERROR

-
#define G_TYPELIB_ERROR (g_typelib_error_quark ())
-
-

TODO

-
-
-
-

GITypelibHashBuilder

-
typedef struct _GITypelibHashBuilder GITypelibHashBuilder;
-

TODO

-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GIUnionInfo.html gobject-introspection-1.64.1/docs/reference/html/gi-GIUnionInfo.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GIUnionInfo.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GIUnionInfo.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,507 +0,0 @@ - - - - -GIUnionInfo: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIUnionInfo

-

GIUnionInfo — Struct representing a union.

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gint - -g_union_info_get_n_fields () -
-GIFieldInfo * - -g_union_info_get_field () -
-gint - -g_union_info_get_n_methods () -
-GIFunctionInfo * - -g_union_info_get_method () -
-gboolean - -g_union_info_is_discriminated () -
-gint - -g_union_info_get_discriminator_offset () -
-GITypeInfo * - -g_union_info_get_discriminator_type () -
-GIConstantInfo * - -g_union_info_get_discriminator () -
-GIFunctionInfo * - -g_union_info_find_method () -
-gsize - -g_union_info_get_size () -
-gsize - -g_union_info_get_alignment () -
-
-
-

Types and Values

-
---- - - - - -
typedefGIUnionInfo
-
-
-

Description

-

GIUnionInfo represents a union type.

-

A union has methods and fields. Unions can optionally have a -discriminator, which is a field deciding what type of real union -fields is valid for specified instance.

-
-

Struct hierarchy

-
-  GIBaseInfo
-   +----GIRegisteredTypeInfo
-         +----GIUnionInfo
-
-
-
-
-

Functions

-
-

g_union_info_get_n_fields ()

-
gint
-g_union_info_get_n_fields (GIUnionInfo *info);
-

Obtain the number of fields this union has.

-
-

Parameters

-
----- - - - - - -

info

a GIUnionInfo

 
-
-
-

Returns

-

number of fields

-
-
-
-
-

g_union_info_get_field ()

-
GIFieldInfo *
-g_union_info_get_field (GIUnionInfo *info,
-                        gint n);
-

Obtain the type information for field with specified index.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIUnionInfo

 

n

a field index

 
-
-
-

Returns

-

the GIFieldInfo, free it with g_base_info_unref() -when done.

-

[transfer full]

-
-
-
-
-

g_union_info_get_n_methods ()

-
gint
-g_union_info_get_n_methods (GIUnionInfo *info);
-

Obtain the number of methods this union has.

-
-

Parameters

-
----- - - - - - -

info

a GIUnionInfo

 
-
-
-

Returns

-

number of methods

-
-
-
-
-

g_union_info_get_method ()

-
GIFunctionInfo *
-g_union_info_get_method (GIUnionInfo *info,
-                         gint n);
-

Obtain the type information for method with specified index.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIUnionInfo

 

n

a method index

 
-
-
-

Returns

-

the GIFunctionInfo, free it with g_base_info_unref() -when done.

-

[transfer full]

-
-
-
-
-

g_union_info_is_discriminated ()

-
gboolean
-g_union_info_is_discriminated (GIUnionInfo *info);
-

Return true if this union contains discriminator field.

-
-

Parameters

-
----- - - - - - -

info

a GIUnionInfo

 
-
-
-

Returns

-

TRUE if this is a discriminated union, FALSE otherwise

-
-
-
-
-

g_union_info_get_discriminator_offset ()

-
gint
-g_union_info_get_discriminator_offset (GIUnionInfo *info);
-

Returns offset of the discriminator field in the structure.

-
-

Parameters

-
----- - - - - - -

info

a GIUnionInfo

 
-
-
-

Returns

-

offset in bytes of the discriminator

-
-
-
-
-

g_union_info_get_discriminator_type ()

-
GITypeInfo *
-g_union_info_get_discriminator_type (GIUnionInfo *info);
-

Obtain the type information of the union discriminator.

-
-

Parameters

-
----- - - - - - -

info

a GIUnionInfo

 
-
-
-

Returns

-

the GITypeInfo, free it with g_base_info_unref() -when done.

-

[transfer full]

-
-
-
-
-

g_union_info_get_discriminator ()

-
GIConstantInfo *
-g_union_info_get_discriminator (GIUnionInfo *info,
-                                gint n);
-

Obtain discriminator value assigned for n-th union field, i.e. n-th -union field is the active one if discriminator contains this -constant.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIUnionInfo

 

n

a union field index

 
-
-
-

Returns

-

the GIConstantInfo, free it with g_base_info_unref() -when done.

-

[transfer full]

-
-
-
-
-

g_union_info_find_method ()

-
GIFunctionInfo *
-g_union_info_find_method (GIUnionInfo *info,
-                          const gchar *name);
-

Obtain the type information for method named name -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GIUnionInfo

 

name

a method name

 
-
-
-

Returns

-

the GIFunctionInfo, free it with g_base_info_unref() -when done.

-

[transfer full]

-
-
-
-
-

g_union_info_get_size ()

-
gsize
-g_union_info_get_size (GIUnionInfo *info);
-

Obtain the total size of the union.

-
-

Parameters

-
----- - - - - - -

info

a GIUnionInfo

 
-
-
-

Returns

-

size of the union in bytes

-
-
-
-
-

g_union_info_get_alignment ()

-
gsize
-g_union_info_get_alignment (GIUnionInfo *info);
-

Obtain the required alignment of the union.

-
-

Parameters

-
----- - - - - - -

info

a GIUnionInfo

 
-
-
-

Returns

-

required alignment in bytes

-
-
-
-
-

Types and Values

-
-

GIUnionInfo

-
typedef GIBaseInfo GIUnionInfo;
-
-

Represents a union.

-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GIValueInfo.html gobject-introspection-1.64.1/docs/reference/html/gi-GIValueInfo.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GIValueInfo.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GIValueInfo.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ - - - - -GIValueInfo: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIValueInfo

-

GIValueInfo — Struct representing a value

-
-
-

Types and Values

-
---- - - - - -
typedefGIValueInfo
-
-
-

Description

-

GIValueInfo represents a value.

-
-

Struct hierarchy

-
-  GIBaseInfo
-   +----GIValueInfo
-
-
-
-
-

Functions

-

-
-
-

Types and Values

-
-

GIValueInfo

-
typedef GIBaseInfo GIValueInfo;
-
-

Represents a enum value of a GIEnumInfo.

-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-GIVFuncInfo.html gobject-introspection-1.64.1/docs/reference/html/gi-GIVFuncInfo.html --- gobject-introspection-1.56.1/docs/reference/html/gi-GIVFuncInfo.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-GIVFuncInfo.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,429 +0,0 @@ - - - - -GIVFuncInfo: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIVFuncInfo

-

GIVFuncInfo — Struct representing a virtual function

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GIVFuncInfoFlags - -g_vfunc_info_get_flags () -
-gint - -g_vfunc_info_get_offset () -
-GISignalInfo * - -g_vfunc_info_get_signal () -
-GIFunctionInfo * - -g_vfunc_info_get_invoker () -
-gpointer - -g_vfunc_info_get_address () -
-gboolean - -g_vfunc_info_invoke () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
typedefGIVFuncInfo
enumGIVFuncInfoFlags
-
-
-

Description

-

GIVfuncInfo represents a virtual function. A property belongs to -either a GIObjectInfo or a GIInterfaceInfo.

-
-

Struct hierarchy

-
-  GIBaseInfo
-   +----GICallableInfo
-         +----GIFunctionInfo
-         +----GISignalInfo
-         +----GIVFuncInfo
-
-
-
-
-

Functions

-
-

g_vfunc_info_get_flags ()

-
GIVFuncInfoFlags
-g_vfunc_info_get_flags (GIVFuncInfo *info);
-

Obtain the flags for this virtual function info. See GIVFuncInfoFlags for -more information about possible flag values.

-
-

Parameters

-
----- - - - - - -

info

a GIVFuncInfo

 
-
-
-

Returns

-

the flags

-
-
-
-
-

g_vfunc_info_get_offset ()

-
gint
-g_vfunc_info_get_offset (GIVFuncInfo *info);
-

Obtain the offset of the function pointer in the class struct. The value -0xFFFF indicates that the struct offset is unknown.

-
-

Parameters

-
----- - - - - - -

info

a GIVFuncInfo

 
-
-
-

Returns

-

the struct offset or 0xFFFF if it's unknown

-
-
-
-
-

g_vfunc_info_get_signal ()

-
GISignalInfo *
-g_vfunc_info_get_signal (GIVFuncInfo *info);
-

Obtain the signal for the virtual function if one is set. -The signal comes from the object or interface to which -this virtual function belongs.

-
-

Parameters

-
----- - - - - - -

info

a GIVFuncInfo

 
-
-
-

Returns

-

the signal or NULL if none set.

-

[transfer full]

-
-
-
-
-

g_vfunc_info_get_invoker ()

-
GIFunctionInfo *
-g_vfunc_info_get_invoker (GIVFuncInfo *info);
-

If this virtual function has an associated invoker method, this -method will return it. An invoker method is a C entry point.

-

Not all virtuals will have invokers.

-
-

Parameters

-
----- - - - - - -

info

a GIVFuncInfo

 
-
-
-

Returns

-

the GIVFuncInfo or NULL. Free it with -g_base_info_unref() when done.

-

[transfer full]

-
-
-
-
-

g_vfunc_info_get_address ()

-
gpointer
-g_vfunc_info_get_address (GIVFuncInfo *info,
-                          GType implementor_gtype,
-                          GError **error);
-

This method will look up where inside the type struct of implementor_gtype - -is the implementation for info -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

info

a GIVFuncInfo

 

implementor_gtype

GType implementing this virtual function

 

error

return location for a GError

 
-
-
-

Returns

-

address to a function or NULL if an error happened

-
-
-
-
-

g_vfunc_info_invoke ()

-
gboolean
-g_vfunc_info_invoke (GIVFuncInfo *info,
-                     GType implementor,
-                     const GIArgument *in_args,
-                     int n_in_args,
-                     const GIArgument *out_args,
-                     int n_out_args,
-                     GIArgument *return_value,
-                     GError **error);
-

Invokes the function described in info - with the given -arguments. Note that inout parameters must appear in both -argument lists.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

info

a GIVFuncInfo describing the virtual function to invoke

 

implementor

GType of the type that implements this virtual function

 

in_args

an array of GIArguments, one for each in -parameter of info -. If there are no in parameter, in_args -can be NULL.

[array length=n_in_args]

n_in_args

the length of the in_args -array

 

out_args

an array of GIArguments, one for each out -parameter of info -. If there are no out parameters, out_args -may be NULL.

[array length=n_out_args]

n_out_args

the length of the out_args -array

 

return_value

return location for the return value of the -function. If the function returns void, return_value -may be -NULL

 

error

return location for detailed error information, or NULL

 
-
-
-

Returns

-

TRUE if the function has been invoked, FALSE if an -error occurred.

-
-
-
-
-

Types and Values

-
-

GIVFuncInfo

-
typedef GIBaseInfo GIVFuncInfo;
-
-

Represents a virtual function.

-
-
-
-

enum GIVFuncInfoFlags

-

Flags of a GIVFuncInfo struct.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

GI_VFUNC_MUST_CHAIN_UP

-

chains up to the parent type

-
 

GI_VFUNC_MUST_OVERRIDE

-

overrides

-
 

GI_VFUNC_MUST_NOT_OVERRIDE

-

does not override

-
 

GI_VFUNC_THROWS

-

Includes a GError

-
 
-
-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi.html gobject-introspection-1.64.1/docs/reference/html/gi.html --- gobject-introspection-1.56.1/docs/reference/html/gi.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,118 +0,0 @@ - - - - -Part II. API Reference: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-

-Part II. API Reference

-
-

Table of Contents

-
-
GIRepository
-
-
-GIRepository — GObject Introspection repository manager -
-
-Struct hierarchy — Struct hierarchy description for GIBaseInfo and all its sub structs -
-
-common types — TODO -
-
-GIBaseInfo — Base struct for all GITypelib structs -
-
-GICallableInfo — Struct representing a callable -
-
-GIFunctionInfo — Struct representing a function -
-
-GICallbackInfo — Struct representing a callback -
-
-GISignalInfo — Struct representing a signal -
-
-GIVFuncInfo — Struct representing a virtual function -
-
-GIRegisteredTypeInfo — Struct representing a struct with a GType -
-
-GIEnumInfo — Structs representing an enumeration and its values -
-
-GIStructInfo — Struct representing a C structure -
-
-GIUnionInfo — Struct representing a union. -
-
-GIObjectInfo — Struct representing a GObject -
-
-GIInterfaceInfo — Struct representing a GInterface -
-
-GIArgInfo — Struct representing an argument -
-
-GIConstantInfo — Struct representing a constant -
-
-GIFieldInfo — Struct representing a struct or union field -
-
-GIPropertyInfo — Struct representing a property -
-
-GITypeInfo — Struct representing a type -
-
-GIValueInfo — Struct representing a value -
-
-
GITypelib
-
-
-gitypelib — TODO -
-
-GITypelib — Layout and accessors for typelib -
-
-
TODO
-
-
-girffi — TODO -
-
-The GIR XML format — The GIR XML format -
-
-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-programming.html gobject-introspection-1.64.1/docs/reference/html/gi-programming.html --- gobject-introspection-1.56.1/docs/reference/html/gi-programming.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-programming.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ - - - - -Writing introspected libraries: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Writing introspected libraries

-

Writing introspected libraries — General considerations when writing introspected libraries

-
-
-

TODO

-

- ... -

-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/GIRepository.html gobject-introspection-1.64.1/docs/reference/html/GIRepository.html --- gobject-introspection-1.56.1/docs/reference/html/GIRepository.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/GIRepository.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,1336 +0,0 @@ - - - - -GIRepository: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIRepository

-

GIRepository — GObject Introspection repository manager

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GIRepository * - -g_irepository_get_default () -
-gchar ** - -g_irepository_get_dependencies () -
-gchar ** - -g_irepository_get_immediate_dependencies () -
-gchar ** - -g_irepository_get_loaded_namespaces () -
-gint - -g_irepository_get_n_infos () -
-GIBaseInfo * - -g_irepository_get_info () -
-GOptionGroup * - -g_irepository_get_option_group () -
-GList * - -g_irepository_enumerate_versions () -
-void - -g_irepository_prepend_library_path () -
-void - -g_irepository_prepend_search_path () -
-GSList * - -g_irepository_get_search_path () -
const char * - -g_irepository_load_typelib () -
const gchar * - -g_irepository_get_typelib_path () -
-gboolean - -g_irepository_is_registered () -
-GITypelib * - -g_irepository_require () -
-GITypelib * - -g_irepository_require_private () -
const gchar * - -g_irepository_get_c_prefix () -
const gchar * - -g_irepository_get_shared_library () -
const gchar * - -g_irepository_get_version () -
-GIBaseInfo * - -g_irepository_find_by_gtype () -
-GIEnumInfo * - -g_irepository_find_by_error_domain () -
-GIBaseInfo * - -g_irepository_find_by_name () -
-gboolean - -g_irepository_dump () -
-void - -gi_cclosure_marshal_generic () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
structGIRepository
enumGIRepositoryLoadFlags
#defineG_IREPOSITORY_ERROR
enumGIRepositoryError
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GIRepository
-
-
-
-

Includes

-
#include <girepository.h>
-
-
-
-

Description

-

GIRepository is used to manage repositories of namespaces. Namespaces -are represented on disk by type libraries (.typelib files).

-

### Discovery of type libraries

-

GIRepository will typically look for a girepository-1.0 directory -under the library directory used when compiling gobject-introspection.

-

It is possible to control the search paths programmatically, using -g_irepository_prepend_search_path(). It is also possible to modify -the search paths by using the GI_TYPELIB_PATH environment variable. -The environment variable takes precedence over the default search path -and the g_irepository_prepend_search_path() calls.

-
-
-

Functions

-
-

g_irepository_get_default ()

-
GIRepository *
-g_irepository_get_default (void);
-

Returns the singleton process-global default GIRepository. It is -not currently supported to have multiple repositories in a -particular process, but this function is provided in the unlikely -eventuality that it would become possible, and as a convenience for -higher level language bindings to conform to the GObject method -call conventions.

-

All methods on GIRepository also accept NULL as an instance -parameter to mean this default repository, which is usually more -convenient for C.

-
-

Returns

-

The global singleton GIRepository.

-

[transfer none]

-
-
-
-
-

g_irepository_get_dependencies ()

-
gchar **
-g_irepository_get_dependencies (GIRepository *repository,
-                                const gchar *namespace_);
-

Return an array of all (transitive) versioned dependencies for -namespace_ -. Returned strings are of the form

-namespace-version. -

Note: namespace_ - must have already been loaded using a function -such as g_irepository_require() before calling this function.

-

To get only the immediate dependencies for namespace_ -, use -g_irepository_get_immediate_dependencies().

-
-

Parameters

-
----- - - - - - - - - - - - - -

repository

A GIRepository or NULL for the singleton -process-global default GIRepository.

[allow-none]

namespace_

Namespace of interest

 
-
-
-

Returns

-

Zero-terminated string array of all versioned -dependencies.

-

[transfer full]

-
-
-
-
-

g_irepository_get_immediate_dependencies ()

-
gchar **
-g_irepository_get_immediate_dependencies
-                               (GIRepository *repository,
-                                const gchar *namespace_);
-

Return an array of the immediate versioned dependencies for namespace_ -. -Returned strings are of the form namespace-version.

-

Note: namespace_ - must have already been loaded using a function -such as g_irepository_require() before calling this function.

-

To get the transitive closure of dependencies for namespace_ -, use -g_irepository_get_dependencies().

-
-

Parameters

-
----- - - - - - - - - - - - - -

repository

A GIRepository or NULL for the singleton -process-global default GIRepository.

[nullable]

namespace_

Namespace of interest

 
-
-
-

Returns

-

Zero-terminated string array of immediate versioned -dependencies.

-

[transfer full]

-
-

Since: 1.44

-
-
-
-

g_irepository_get_loaded_namespaces ()

-
gchar **
-g_irepository_get_loaded_namespaces (GIRepository *repository);
-

Return the list of currently loaded namespaces.

-
-

Parameters

-
----- - - - - - -

repository

A GIRepository or NULL for the singleton -process-global default GIRepository.

[allow-none]
-
-
-

Returns

-

List of namespaces.

-

[element-type utf8][transfer full]

-
-
-
-
-

g_irepository_get_n_infos ()

-
gint
-g_irepository_get_n_infos (GIRepository *repository,
-                           const gchar *namespace_);
-

This function returns the number of metadata entries in -given namespace namespace_ -. The namespace must have -already been loaded before calling this function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

repository

A GIRepository or NULL for the singleton -process-global default GIRepository.

[allow-none]

namespace_

Namespace to inspect

 
-
-
-

Returns

-

number of metadata entries

-
-
-
-
-

g_irepository_get_info ()

-
GIBaseInfo *
-g_irepository_get_info (GIRepository *repository,
-                        const gchar *namespace_,
-                        gint index);
-

This function returns a particular metadata entry in the -given namespace namespace_ -. The namespace must have -already been loaded before calling this function. -See g_irepository_get_n_infos() to find the maximum number of -entries.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

repository

A GIRepository or NULL for the singleton -process-global default GIRepository.

[allow-none]

namespace_

Namespace to inspect

 

index

0-based offset into namespace metadata for entry

 
-
-
-

Returns

-

GIBaseInfo containing metadata.

-

[transfer full]

-
-
-
-
-

g_irepository_get_option_group ()

-
GOptionGroup *
-g_irepository_get_option_group (void);
-

Obtain the option group for girepository, it's used -by the dumper and for programs that wants to provide -introspection information

-
-

Returns

-

the option group.

-

[transfer full]

-
-
-
-
-

g_irepository_enumerate_versions ()

-
GList *
-g_irepository_enumerate_versions (GIRepository *repository,
-                                  const gchar *namespace_);
-

Obtain an unordered list of versions (either currently loaded or -available) for namespace_ - in this repository -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

repository

A GIRepository or NULL for the singleton -process-global default GIRepository.

[allow-none]

namespace_

GI namespace, e.g. "Gtk"

 
-
-
-

Returns

-

the array of versions.

-

[element-type utf8][transfer full]

-
-
-
-
-

g_irepository_prepend_library_path ()

-
void
-g_irepository_prepend_library_path (const char *directory);
-

Prepends directory - to the search path that is used to -search shared libraries referenced by imported namespaces. -Multiple calls to this function all contribute to the final -list of paths. -The list of paths is unique and shared for all GIRepository -instances across the process, but it doesn't affect namespaces -imported before the call.

-

If the library is not found in the directories configured -in this way, loading will fall back to the system library -path (ie. LD_LIBRARY_PATH and DT_RPATH in ELF systems). -See the documentation of your dynamic linker for full details.

-
-

Parameters

-
----- - - - - - -

directory

a single directory to scan for shared libraries.

[type filename]
-
-

Since: 1.35.8

-
-
-
-

g_irepository_prepend_search_path ()

-
void
-g_irepository_prepend_search_path (const char *directory);
-

Prepends directory - to the typelib search path.

-

See also: g_irepository_get_search_path().

-
-

Parameters

-
----- - - - - - -

directory

directory name to prepend to the typelib -search path.

[type filename]
-
-
-
-
-

g_irepository_get_search_path ()

-
GSList *
-g_irepository_get_search_path (void);
-

Returns the current search path GIRepository will use when loading -typelib files. The list is internal to GIRespository and should not -be freed, nor should its string elements.

-
-

Returns

-

GSList of strings.

-

[element-type filename][transfer none]

-
-
-
-
-

g_irepository_load_typelib ()

-
const char *
-g_irepository_load_typelib (GIRepository *repository,
-                            GITypelib *typelib,
-                            GIRepositoryLoadFlags flags,
-                            GError **error);
-

TODO

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

repository

A GIRepository or NULL for the singleton -process-global default GIRepository.

[allow-none]

typelib

TODO

 

flags

TODO

 

error

TODO

 
-
-
-
-
-

g_irepository_get_typelib_path ()

-
const gchar *
-g_irepository_get_typelib_path (GIRepository *repository,
-                                const gchar *namespace_);
-

If namespace namespace_ - is loaded, return the full path to the -.typelib file it was loaded from. If the typelib for -namespace namespace_ - was included in a shared library, return -the special string "<builtin>".

-
-

Parameters

-
----- - - - - - - - - - - - - -

repository

A GIRepository or NULL for the singleton -process-global default GIRepository.

[allow-none]

namespace_

GI namespace to use, e.g. "Gtk"

 
-
-
-

Returns

-

Filesystem path (or $lt;builtin$gt;) if successful, NULL if namespace is not loaded

-
-
-
-
-

g_irepository_is_registered ()

-
gboolean
-g_irepository_is_registered (GIRepository *repository,
-                             const gchar *namespace_,
-                             const gchar *version);
-

Check whether a particular namespace (and optionally, a specific -version thereof) is currently loaded. This function is likely to -only be useful in unusual circumstances; in order to act upon -metadata in the namespace, you should call g_irepository_require() -instead which will ensure the namespace is loaded, and return as -quickly as this function will if it has already been loaded.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

repository

A GIRepository or NULL for the singleton -process-global default GIRepository.

[allow-none]

namespace_

Namespace of interest

 

version

Required version, may be NULL for latest.

[allow-none]
-
-
-

Returns

-

TRUE if namespace-version is loaded, FALSE otherwise

-
-
-
-
-

g_irepository_require ()

-
GITypelib *
-g_irepository_require (GIRepository *repository,
-                       const gchar *namespace_,
-                       const gchar *version,
-                       GIRepositoryLoadFlags flags,
-                       GError **error);
-

Force the namespace namespace_ - to be loaded if it isn't already. -If namespace_ - is not loaded, this function will search for a -".typelib" file using the repository search path. In addition, a -version version - of namespace may be specified. If version - is -not specified, the latest will be used.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

repository

A GIRepository or NULL for the singleton -process-global default GIRepository.

[allow-none]

namespace_

GI namespace to use, e.g. "Gtk"

 

version

Version of namespace, may be NULL for latest.

[allow-none]

flags

Set of GIRepositoryLoadFlags, may be 0

 

error

a GError.

 
-
-
-

Returns

-

a pointer to the GITypelib if successful, NULL otherwise.

-

[transfer none]

-
-
-
-
-

g_irepository_require_private ()

-
GITypelib *
-g_irepository_require_private (GIRepository *repository,
-                               const gchar *typelib_dir,
-                               const gchar *namespace_,
-                               const gchar *version,
-                               GIRepositoryLoadFlags flags,
-                               GError **error);
-

Force the namespace namespace_ - to be loaded if it isn't already. -If namespace_ - is not loaded, this function will search for a -".typelib" file within the private directory only. In addition, a -version version - of namespace should be specified. If version - is -not specified, the latest will be used.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

repository

A GIRepository or NULL for the singleton -process-global default GIRepository.

[allow-none]

typelib_dir

Private directory where to find the requested typelib

 

namespace_

GI namespace to use, e.g. "Gtk"

 

version

Version of namespace, may be NULL for latest.

[allow-none]

flags

Set of GIRepositoryLoadFlags, may be 0

 

error

a GError.

 
-
-
-

Returns

-

a pointer to the GITypelib if successful, NULL otherwise.

-

[transfer none]

-
-
-
-
-

g_irepository_get_c_prefix ()

-
const gchar *
-g_irepository_get_c_prefix (GIRepository *repository,
-                            const gchar *namespace_);
-

This function returns the "C prefix", or the C level namespace -associated with the given introspection namespace. Each C symbol -starts with this prefix, as well each GType in the library.

-

Note: The namespace must have already been loaded using a function -such as g_irepository_require() before calling this function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

repository

A GIRepository or NULL for the singleton -process-global default GIRepository.

[allow-none]

namespace_

Namespace to inspect

 
-
-
-

Returns

-

C namespace prefix, or NULL if none associated

-
-
-
-
-

g_irepository_get_shared_library ()

-
const gchar *
-g_irepository_get_shared_library (GIRepository *repository,
-                                  const gchar *namespace_);
-

This function returns a comma-separated list of paths to the -shared C libraries associated with the given namespace namespace_ -. -There may be no shared library path associated, in which case this -function will return NULL.

-

Note: The namespace must have already been loaded using a function -such as g_irepository_require() before calling this function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

repository

A GIRepository or NULL for the singleton -process-global default GIRepository.

[allow-none]

namespace_

Namespace to inspect

 
-
-
-

Returns

-

Comma-separated list of paths to shared libraries, -or NULL if none are associated

-
-
-
-
-

g_irepository_get_version ()

-
const gchar *
-g_irepository_get_version (GIRepository *repository,
-                           const gchar *namespace_);
-

This function returns the loaded version associated with the given -namespace namespace_ -.

-

Note: The namespace must have already been loaded using a function -such as g_irepository_require() before calling this function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

repository

A GIRepository or NULL for the singleton -process-global default GIRepository.

[allow-none]

namespace_

Namespace to inspect

 
-
-
-

Returns

-

Loaded version

-
-
-
-
-

g_irepository_find_by_gtype ()

-
GIBaseInfo *
-g_irepository_find_by_gtype (GIRepository *repository,
-                             GType gtype);
-

Searches all loaded namespaces for a particular GType. Note that -in order to locate the metadata, the namespace corresponding to -the type must first have been loaded. There is currently no -mechanism for determining the namespace which corresponds to an -arbitrary GType - thus, this function will operate most reliably -when you know the GType to originate from be from a loaded namespace.

-
-

Parameters

-
----- - - - - - - - - - - - - -

repository

A GIRepository or NULL for the singleton -process-global default GIRepository.

[allow-none]

gtype

GType to search for

 
-
-
-

Returns

-

GIBaseInfo representing metadata about type -, or NULL.

-

[transfer full]

-
-
-
-
-

g_irepository_find_by_error_domain ()

-
GIEnumInfo *
-g_irepository_find_by_error_domain (GIRepository *repository,
-                                    GQuark domain);
-

Searches for the enum type corresponding to the given GError -domain. Before calling this function for a particular namespace, -you must call g_irepository_require() once to load the namespace, or -otherwise ensure the namespace has already been loaded.

-
-

Parameters

-
----- - - - - - - - - - - - - -

repository

A GIRepository or NULL for the singleton -process-global default GIRepository.

[allow-none]

domain

a GError domain

 
-
-
-

Returns

-

GIEnumInfo representing metadata about domain -'s -enum type, or NULL.

-

[transfer full]

-
-

Since: 1.29.17

-
-
-
-

g_irepository_find_by_name ()

-
GIBaseInfo *
-g_irepository_find_by_name (GIRepository *repository,
-                            const gchar *namespace_,
-                            const gchar *name);
-

Searches for a particular entry in a namespace. Before calling -this function for a particular namespace, you must call -g_irepository_require() once to load the namespace, or otherwise -ensure the namespace has already been loaded.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

repository

A GIRepository or NULL for the singleton -process-global default GIRepository.

[allow-none]

namespace_

Namespace which will be searched

 

name

Entry name to find

 
-
-
-

Returns

-

GIBaseInfo representing metadata about name -, or NULL.

-

[transfer full]

-
-
-
-
-

g_irepository_dump ()

-
gboolean
-g_irepository_dump (const char *arg,
-                    GError **error);
-

Argument specified is a comma-separated pair of filenames; i.e. of -the form "input.txt,output.xml". The input file should be a -UTF-8 Unix-line-ending text file, with each line containing either -"get-type:" followed by the name of a GType _get_type function, or -"error-quark:" followed by the name of an error quark function. No -extra whitespace is allowed.

-

The output file should already exist, but be empty. This function will -overwrite its contents.

-
-

Parameters

-
----- - - - - - - - - - - - - -

arg

Comma-separated pair of input and output filenames

 

error

a GError

 
-
-
-

Returns

-

TRUE on success, FALSE on error

-
-
-
-
-

gi_cclosure_marshal_generic ()

-
void
-gi_cclosure_marshal_generic (GClosure *closure,
-                             GValue *return_gvalue,
-                             guint n_param_values,
-                             const GValue *param_values,
-                             gpointer invocation_hint,
-                             gpointer marshal_data);
-

TODO

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

TODO

 

return_gvalue

TODO

 

n_param_values

TODO

 

param_values

TODO

 

invocation_hint

TODO

 

marshal_data

TODO

 
-
-
-
-
-

Types and Values

-
-

struct GIRepository

-
struct GIRepository;
-

The GIRepository structure contains private data and should only be -accessed using the provided API.

-
-
-
-

enum GIRepositoryLoadFlags

-

Flags that control how a typelib is loaded.

-
-

Members

-
----- - - - - - -

G_IREPOSITORY_LOAD_FLAG_LAZY

-

Lazily load the typelib.

-
 
-
-
-
-
-

G_IREPOSITORY_ERROR

-
#define G_IREPOSITORY_ERROR (g_irepository_error_quark ())
-
-

Error domain for GIRepository. Errors in this domain will be from the -GIRepositoryError enumeration. See GError for more information on -error domains.

-
-
-
-

enum GIRepositoryError

-

An error code used with G_IREPOSITORY_ERROR in a GError returned -from a GIRepository routine.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_IREPOSITORY_ERROR_TYPELIB_NOT_FOUND

-

the typelib could not be found.

-
 

G_IREPOSITORY_ERROR_NAMESPACE_MISMATCH

-

the namespace does not match the - requested namespace.

-
 

G_IREPOSITORY_ERROR_NAMESPACE_VERSION_CONFLICT

-

the version of the - typelib does not match the requested version.

-
 

G_IREPOSITORY_ERROR_LIBRARY_NOT_FOUND

-

the library used by the typelib - could not be found.

-
 
-
-
-
-
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-struct-hierarchy.html gobject-introspection-1.64.1/docs/reference/html/gi-struct-hierarchy.html --- gobject-introspection-1.56.1/docs/reference/html/gi-struct-hierarchy.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-struct-hierarchy.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ - - - - -Struct hierarchy: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Struct hierarchy

-

Struct hierarchy — Struct hierarchy description for GIBaseInfo and all its sub structs

-
- -
- - - \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/reference/html/gi-typelib.html gobject-introspection-1.64.1/docs/reference/html/gi-typelib.html --- gobject-introspection-1.56.1/docs/reference/html/gi-typelib.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/gi-typelib.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ - - - - -GITypelib: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-

-GITypelib

-
-
-gitypelib — TODO -
-
-GITypelib — Layout and accessors for typelib -
-
-
- - - \ No newline at end of file Binary files /tmp/tmptadxxyd4/U3ww6Hytev/gobject-introspection-1.56.1/docs/reference/html/home.png and /tmp/tmptadxxyd4/ZnA7Rh73cP/gobject-introspection-1.64.1/docs/reference/html/home.png differ diff -Nru gobject-introspection-1.56.1/docs/reference/html/index.html gobject-introspection-1.64.1/docs/reference/html/index.html --- gobject-introspection-1.56.1/docs/reference/html/index.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/index.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,136 +0,0 @@ - - - - -GObject Introspection Reference Manual: GObject Introspection Reference Manual - - - - - - - -
-
-
-
-

- This document is for GObject Introspection version 1.56.1 -. - The latest version of this documentation can be found on-line at - http://developer.gnome.org/gi/unstable/. -

-
-
-
-
-
I. GObject-Introspection Overview
-
-
-Compiling the GObject Introspection package — How to compile GObject Introspection itself -
-
-Writing introspected libraries — General considerations when writing introspected libraries -
-
-
II. API Reference
-
-
GIRepository
-
-
-GIRepository — GObject Introspection repository manager -
-
-Struct hierarchy — Struct hierarchy description for GIBaseInfo and all its sub structs -
-
-common types — TODO -
-
-GIBaseInfo — Base struct for all GITypelib structs -
-
-GICallableInfo — Struct representing a callable -
-
-GIFunctionInfo — Struct representing a function -
-
-GICallbackInfo — Struct representing a callback -
-
-GISignalInfo — Struct representing a signal -
-
-GIVFuncInfo — Struct representing a virtual function -
-
-GIRegisteredTypeInfo — Struct representing a struct with a GType -
-
-GIEnumInfo — Structs representing an enumeration and its values -
-
-GIStructInfo — Struct representing a C structure -
-
-GIUnionInfo — Struct representing a union. -
-
-GIObjectInfo — Struct representing a GObject -
-
-GIInterfaceInfo — Struct representing a GInterface -
-
-GIArgInfo — Struct representing an argument -
-
-GIConstantInfo — Struct representing a constant -
-
-GIFieldInfo — Struct representing a struct or union field -
-
-GIPropertyInfo — Struct representing a property -
-
-GITypeInfo — Struct representing a type -
-
-GIValueInfo — Struct representing a value -
-
-
GITypelib
-
-
-gitypelib — TODO -
-
-GITypelib — Layout and accessors for typelib -
-
-
TODO
-
-
-girffi — TODO -
-
-The GIR XML format — The GIR XML format -
-
-
-
Index
-
Index of deprecated symbols
-
Index of new symbols in 1.29.0
-
Index of new symbols in 1.29.17
-
Index of new symbols in 1.30.1
-
Index of new symbols in 1.34
-
Index of new symbols in 1.35.8
-
Annotation Glossary
-
-
- - - \ No newline at end of file Binary files /tmp/tmptadxxyd4/U3ww6Hytev/gobject-introspection-1.56.1/docs/reference/html/left-insensitive.png and /tmp/tmptadxxyd4/ZnA7Rh73cP/gobject-introspection-1.64.1/docs/reference/html/left-insensitive.png differ Binary files /tmp/tmptadxxyd4/U3ww6Hytev/gobject-introspection-1.56.1/docs/reference/html/left.png and /tmp/tmptadxxyd4/ZnA7Rh73cP/gobject-introspection-1.64.1/docs/reference/html/left.png differ diff -Nru gobject-introspection-1.56.1/docs/reference/html/overview.html gobject-introspection-1.64.1/docs/reference/html/overview.html --- gobject-introspection-1.56.1/docs/reference/html/overview.html 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/overview.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,62 +0,0 @@ - - - - -Part I. GObject-Introspection Overview: GObject Introspection Reference Manual - - - - - - - - - - - - - - - - -
-

-Part I. GObject-Introspection Overview

-
-

Table of Contents

-
-
-Compiling the GObject Introspection package — How to compile GObject Introspection itself -
-
-Writing introspected libraries — General considerations when writing introspected libraries -
-
-
-

- GObject-Introspection is striving to provide a middleware layer between - (GObject based) C libraries and language bindings. The primary goal of - this project is to minimize duplicated effort in language binding - projects by providing shared metadata files on bound C libraries. - Language bindings can read these metadata files at runtime to learn - how to interface with a bound C library. -

-

- The GObject-Introspection package contains of a few different parts: -

-
    -
  • The GIR XML format - an XML format describing the exported C API including documentation

  • -
  • The GTypelib format - a binary format optimized for fast disk access and low memory usage

  • -
  • g-ir-scanner - parses C source code and gtk-doc comments and generates GIR XML files

  • -
  • g-ir-compiler - compiles GIR XML files into typelibs

  • -
  • libgirepository - library to access typelib from C

  • -
-

-

-

The following illustration shows how the different components fit together:

- -
- - - \ No newline at end of file Binary files /tmp/tmptadxxyd4/U3ww6Hytev/gobject-introspection-1.56.1/docs/reference/html/overview.png and /tmp/tmptadxxyd4/ZnA7Rh73cP/gobject-introspection-1.64.1/docs/reference/html/overview.png differ Binary files /tmp/tmptadxxyd4/U3ww6Hytev/gobject-introspection-1.56.1/docs/reference/html/right-insensitive.png and /tmp/tmptadxxyd4/ZnA7Rh73cP/gobject-introspection-1.64.1/docs/reference/html/right-insensitive.png differ Binary files /tmp/tmptadxxyd4/U3ww6Hytev/gobject-introspection-1.56.1/docs/reference/html/right.png and /tmp/tmptadxxyd4/ZnA7Rh73cP/gobject-introspection-1.64.1/docs/reference/html/right.png differ diff -Nru gobject-introspection-1.56.1/docs/reference/html/style.css gobject-introspection-1.64.1/docs/reference/html/style.css --- gobject-introspection-1.56.1/docs/reference/html/style.css 2018-04-09 06:16:46.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/html/style.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,483 +0,0 @@ -body -{ - font-family: cantarell, sans-serif; -} -.synopsis, .classsynopsis -{ - /* tango:aluminium 1/2 */ - background: #eeeeec; - background: rgba(238, 238, 236, 0.5); - border: solid 1px rgb(238, 238, 236); - padding: 0.5em; -} -.programlisting -{ - /* tango:sky blue 0/1 */ - /* fallback for no rgba support */ - background: #e6f3ff; - border: solid 1px #729fcf; - background: rgba(114, 159, 207, 0.1); - border: solid 1px rgba(114, 159, 207, 0.2); - padding: 0.5em; -} -.variablelist -{ - padding: 4px; - margin-left: 3em; -} -.variablelist td:first-child -{ - vertical-align: top; -} - -span.nowrap { - white-space: nowrap; -} - -div.gallery-float -{ - float: left; - padding: 10px; -} -div.gallery-float img -{ - border-style: none; -} -div.gallery-spacer -{ - clear: both; -} - -a, a:visited -{ - text-decoration: none; - /* tango:sky blue 2 */ - color: #3465a4; -} -a:hover -{ - text-decoration: underline; - /* tango:sky blue 1 */ - color: #729fcf; -} - -div.informaltable table -{ - border-collapse: separate; - border-spacing: 1em 0.3em; - border: none; -} - -div.informaltable table td, div.informaltable table th -{ - vertical-align: top; -} - -.function_type, -.variable_type, -.property_type, -.signal_type, -.parameter_name, -.struct_member_name, -.union_member_name, -.define_keyword, -.datatype_keyword, -.typedef_keyword -{ - text-align: right; -} - -/* dim non-primary columns */ -.c_punctuation, -.function_type, -.variable_type, -.property_type, -.signal_type, -.define_keyword, -.datatype_keyword, -.typedef_keyword, -.property_flags, -.signal_flags, -.parameter_annotations, -.enum_member_annotations, -.struct_member_annotations, -.union_member_annotations -{ - color: #888a85; -} - -.function_type a, -.function_type a:visited, -.function_type a:hover, -.property_type a, -.property_type a:visited, -.property_type a:hover, -.signal_type a, -.signal_type a:visited, -.signal_type a:hover, -.signal_flags a, -.signal_flags a:visited, -.signal_flags a:hover -{ - color: #729fcf; -} - -td p -{ - margin: 0.25em; -} - -div.table table -{ - border-collapse: collapse; - border-spacing: 0px; - /* tango:aluminium 3 */ - border: solid 1px #babdb6; -} - -div.table table td, div.table table th -{ - /* tango:aluminium 3 */ - border: solid 1px #babdb6; - padding: 3px; - vertical-align: top; -} - -div.table table th -{ - /* tango:aluminium 2 */ - background-color: #d3d7cf; -} - -h4 -{ - color: #555753; - margin-top: 1em; - margin-bottom: 1em; -} - -hr -{ - /* tango:aluminium 1 */ - color: #d3d7cf; - background: #d3d7cf; - border: none 0px; - height: 1px; - clear: both; - margin: 2.0em 0em 2.0em 0em; -} - -dl.toc dt -{ - padding-bottom: 0.25em; -} - -dl.toc > dt -{ - padding-top: 0.25em; - padding-bottom: 0.25em; - font-weight: bold; -} - -dl.toc > dl -{ - padding-bottom: 0.5em; -} - -.parameter -{ - font-style: normal; -} - -.footer -{ - padding-top: 3.5em; - /* tango:aluminium 3 */ - color: #babdb6; - text-align: center; - font-size: 80%; -} - -.informalfigure, -.figure -{ - margin: 1em; -} - -.informalexample, -.example -{ - margin-top: 1em; - margin-bottom: 1em; -} - -.warning -{ - /* tango:orange 0/1 */ - background: #ffeed9; - background: rgba(252, 175, 62, 0.1); - border-color: #ffb04f; - border-color: rgba(252, 175, 62, 0.2); -} -.note -{ - /* tango:chameleon 0/0.5 */ - background: #d8ffb2; - background: rgba(138, 226, 52, 0.1); - border-color: #abf562; - border-color: rgba(138, 226, 52, 0.2); -} -div.blockquote -{ - border-color: #eeeeec; -} -.note, .warning, div.blockquote -{ - padding: 0.5em; - border-width: 1px; - border-style: solid; - margin: 2em; -} -.note p, .warning p -{ - margin: 0; -} - -div.warning h3.title, -div.note h3.title -{ - display: none; -} - -p + div.section -{ - margin-top: 1em; -} - -div.refnamediv, -div.refsynopsisdiv, -div.refsect1, -div.refsect2, -div.toc, -div.section -{ - margin-bottom: 1em; -} - -/* blob links */ -h2 .extralinks, h3 .extralinks -{ - float: right; - /* tango:aluminium 3 */ - color: #babdb6; - font-size: 80%; - font-weight: normal; -} - -.lineart -{ - color: #d3d7cf; - font-weight: normal; -} - -.annotation -{ - /* tango:aluminium 5 */ - color: #555753; - font-weight: normal; -} - -.structfield -{ - font-style: normal; - font-weight: normal; -} - -acronym,abbr -{ - border-bottom: 1px dotted gray; -} - -/* code listings */ - -.listing_code .programlisting .normal, -.listing_code .programlisting .normal a, -.listing_code .programlisting .number, -.listing_code .programlisting .cbracket, -.listing_code .programlisting .symbol { color: #555753; } -.listing_code .programlisting .comment, -.listing_code .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */ -.listing_code .programlisting .function, -.listing_code .programlisting .function a, -.listing_code .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */ -.listing_code .programlisting .string { color: #ad7fa8; } /* tango: plum */ -.listing_code .programlisting .keyword, -.listing_code .programlisting .usertype, -.listing_code .programlisting .type, -.listing_code .programlisting .type a { color: #4e9a06; } /* tango: chameleon 3 */ - -.listing_frame { - /* tango:sky blue 1 */ - border: solid 1px #729fcf; - border: solid 1px rgba(114, 159, 207, 0.2); - padding: 0px; -} - -.listing_lines, .listing_code { - margin-top: 0px; - margin-bottom: 0px; - padding: 0.5em; -} -.listing_lines { - /* tango:sky blue 0.5 */ - background: #a6c5e3; - background: rgba(114, 159, 207, 0.2); - /* tango:aluminium 6 */ - color: #2e3436; -} -.listing_code { - /* tango:sky blue 0 */ - background: #e6f3ff; - background: rgba(114, 159, 207, 0.1); -} -.listing_code .programlisting { - /* override from previous */ - border: none 0px; - padding: 0px; - background: none; -} -.listing_lines pre, .listing_code pre { - margin: 0px; -} - -@media screen { - /* these have a as a first child, but since there are no parent selectors - * we can't use that. */ - a.footnote - { - position: relative; - top: 0em ! important; - } - /* this is needed so that the local anchors are displayed below the naviagtion */ - div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] - { - display: inline-block; - position: relative; - top:-5em; - } - /* this seems to be a bug in the xsl style sheets when generating indexes */ - div.index div.index - { - top: 0em; - } - /* make space for the fixed navigation bar and add space at the bottom so that - * link targets appear somewhat close to top - */ - body - { - padding-top: 2.5em; - padding-bottom: 500px; - max-width: 60em; - } - p - { - max-width: 60em; - } - /* style and size the navigation bar */ - table.navigation#top - { - position: fixed; - background: #e2e2e2; - border-bottom: solid 1px #babdb6; - border-spacing: 5px; - margin-top: 0; - margin-bottom: 0; - top: 0; - left: 0; - z-index: 10; - } - table.navigation#top td - { - padding-left: 6px; - padding-right: 6px; - } - .navigation a, .navigation a:visited - { - /* tango:sky blue 3 */ - color: #204a87; - } - .navigation a:hover - { - /* tango:sky blue 2 */ - color: #3465a4; - } - td.shortcuts - { - /* tango:sky blue 2 */ - color: #3465a4; - font-size: 80%; - white-space: nowrap; - } - td.shortcuts .dim - { - color: #babdb6; - } - .navigation .title - { - font-size: 80%; - max-width: none; - margin: 0px; - font-weight: normal; - } -} -@media screen and (min-width: 60em) { - /* screen larger than 60em */ - body { margin: auto; } -} -@media screen and (max-width: 60em) { - /* screen less than 60em */ - #nav_hierarchy { display: none; } - #nav_interfaces { display: none; } - #nav_prerequisites { display: none; } - #nav_derived_interfaces { display: none; } - #nav_implementations { display: none; } - #nav_child_properties { display: none; } - #nav_style_properties { display: none; } - #nav_index { display: none; } - #nav_glossary { display: none; } - .gallery_image { display: none; } - .property_flags { display: none; } - .signal_flags { display: none; } - .parameter_annotations { display: none; } - .enum_member_annotations { display: none; } - .struct_member_annotations { display: none; } - .union_member_annotations { display: none; } - /* now that a column is hidden, optimize space */ - col.parameters_name { width: auto; } - col.parameters_description { width: auto; } - col.struct_members_name { width: auto; } - col.struct_members_description { width: auto; } - col.enum_members_name { width: auto; } - col.enum_members_description { width: auto; } - col.union_members_name { width: auto; } - col.union_members_description { width: auto; } - .listing_lines { display: none; } -} -@media print { - table.navigation { - visibility: collapse; - display: none; - } - div.titlepage table.navigation { - visibility: visible; - display: table; - background: #e2e2e2; - border: solid 1px #babdb6; - margin-top: 0; - margin-bottom: 0; - top: 0; - left: 0; - height: 3em; - } -} - Binary files /tmp/tmptadxxyd4/U3ww6Hytev/gobject-introspection-1.56.1/docs/reference/html/up-insensitive.png and /tmp/tmptadxxyd4/ZnA7Rh73cP/gobject-introspection-1.64.1/docs/reference/html/up-insensitive.png differ Binary files /tmp/tmptadxxyd4/U3ww6Hytev/gobject-introspection-1.56.1/docs/reference/html/up.png and /tmp/tmptadxxyd4/ZnA7Rh73cP/gobject-introspection-1.64.1/docs/reference/html/up.png differ Binary files /tmp/tmptadxxyd4/U3ww6Hytev/gobject-introspection-1.56.1/docs/reference/images/overview.png and /tmp/tmptadxxyd4/ZnA7Rh73cP/gobject-introspection-1.64.1/docs/reference/images/overview.png differ diff -Nru gobject-introspection-1.56.1/docs/reference/Makefile.am gobject-introspection-1.64.1/docs/reference/Makefile.am --- gobject-introspection-1.56.1/docs/reference/Makefile.am 2018-02-12 11:22:54.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,121 +0,0 @@ -AUTOMAKE_OPTIONS = 1.6 - -# The name of the module, e.g. 'glib'. -DOC_MODULE=gi - -# Uncomment for versioned docs and specify the version of the module, e.g. '2'. -#DOC_MODULE_VERSION=2 - -# The top-level XML file (SGML in the past). You can change this if you want to. -DOC_MAIN_SGML_FILE=gi-docs.xml - -# Directories containing the source code. -# gtk-doc will search all .c and .h files beneath these paths -# for inline comments documenting functions and macros. -# e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk -DOC_SOURCE_DIR=$(top_srcdir)/girepository - -# Extra options to pass to gtkdoc-scangobj. Not normally needed. -SCANGOBJ_OPTIONS= - -# Extra options to supply to gtkdoc-scan. -# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" -SCAN_OPTIONS=--rebuild-types - -# Extra options to supply to gtkdoc-mkdb. -# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml -MKDB_OPTIONS=--xml-mode --output-format=xml --name-space=g --ignore-files=cmph - -# Extra options to supply to gtkdoc-mktmpl -# e.g. MKTMPL_OPTIONS=--only-section-tmpl -MKTMPL_OPTIONS= - -# Extra options to supply to gtkdoc-mkhtml -MKHTML_OPTIONS= - -# Extra options to supply to gtkdoc-fixref. Not normally needed. -# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html -FIXXREF_OPTIONS= - -# Used for dependencies. The docs will be rebuilt if any of these change. -# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h -# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c -HFILE_GLOB=$(top_srcdir)/girepository/*.h -CFILE_GLOB=$(top_srcdir)/girepository/*.c - -# Extra header to include when scanning, which are not under DOC_SOURCE_DIR -# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h -EXTRA_HFILES= - -# Header files or dirs to ignore when scanning. Use base file/dir names -# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code -IGNORE_HFILES= \ - cmph \ - girnode.h \ - girparser.h \ - girwriter.h \ - girmodule.h \ - girepository-private.h - -# Images to copy into HTML directory. -# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png -HTML_IMAGES= \ - images/overview.png - -# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). -# e.g. content_files=running.sgml building.sgml changes-2.0.sgml -content_files= \ - overview-building.xml \ - overview-programming.xml \ - gi-gir-reference.xml \ - gi-struct-hierarchy.xml \ - version.xml - -# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded -# These files must be listed here *and* in content_files -# e.g. expand_content_files=running.sgml -# -# Set to $(content_files) for simplicity, so we can always -# simply , even for manually -# written .xml files... -expand_content_files=$(content_files) - -# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. -# Only needed if you are using gtkdoc-scangobj to dynamically query widget -# signals and properties. -# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) -# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) -GTKDOC_CFLAGS= \ - -I$(top_srcdir) \ - $(GIREPO_CFLAGS) - -GTKDOC_LIBS= \ - $(top_builddir)/libgirepository-1.0.la \ - $(top_builddir)/libgirepository-internals.la \ - $(GIREPO_LIBS) - -# Other files to distribute -# e.g. EXTRA_DIST += version.xml.in -include $(top_srcdir)/gtk-doc.make # generated by autogen.sh - -# Other files to distribute -EXTRA_DIST += version.xml.in - -# Files not to distribute -# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types -# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt -#DISTCLEANFILES += - -if ENABLE_GTK_DOC -TESTS_ENVIRONMENT = \ - DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ - SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) -# Comment this out if you want 'make check' to test you doc status -# and run some sanity checks -## Note: Uncoment this when we start depending on GTK-Doc 1.20 -## which solves https://bugzilla.gnome.org/show_bug.cgi?id=701638 -##TESTS = $(GTKDOC_CHECK) -endif - -gi-docs-clean: clean - cd $(srcdir) && rm -rf xml html diff -Nru gobject-introspection-1.56.1/docs/reference/Makefile.in gobject-introspection-1.64.1/docs/reference/Makefile.in --- gobject-introspection-1.56.1/docs/reference/Makefile.in 2018-04-09 06:15:36.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,922 +0,0 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2017 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -*- mode: makefile -*- -# -# gtk-doc.make - make rules for gtk-doc -# Copyright (C) 2003 James Henstridge -# 2004-2007 Damon Chaplin -# 2007-2017 Stefan Sauer -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -#################################### -# Everything below here is generic # -#################################### -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = docs/reference -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/python.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = version.xml -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/version.xml.in \ - $(top_srcdir)/gtk-doc.make -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CAIRO_CFLAGS = @CAIRO_CFLAGS@ -CAIRO_GIR_PACKAGE = @CAIRO_GIR_PACKAGE@ -CAIRO_LIBS = @CAIRO_LIBS@ -CAIRO_SHARED_LIBRARY = @CAIRO_SHARED_LIBRARY@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXPANDED_BINDIR = @EXPANDED_BINDIR@ -EXPANDED_DATADIR = @EXPANDED_DATADIR@ -EXPANDED_LIBDIR = @EXPANDED_LIBDIR@ -EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@ -EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@ -EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@ -EXTRA_LINK_FLAGS = @EXTRA_LINK_FLAGS@ -FFI_CFLAGS = @FFI_CFLAGS@ -FFI_LIBS = @FFI_LIBS@ -FFI_PC_CFLAGS = @FFI_PC_CFLAGS@ -FFI_PC_LIBS = @FFI_PC_LIBS@ -FFI_PC_PACKAGES = @FFI_PC_PACKAGES@ -FGREP = @FGREP@ -GIO_CFLAGS = @GIO_CFLAGS@ -GIO_LIBS = @GIO_LIBS@ -GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ -GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ -GIREPO_CFLAGS = @GIREPO_CFLAGS@ -GIREPO_LIBS = @GIREPO_LIBS@ -GIR_DIR = @GIR_DIR@ -GIR_SUFFIX = @GIR_SUFFIX@ -GI_HIDDEN_VISIBILITY_CFLAGS = @GI_HIDDEN_VISIBILITY_CFLAGS@ -GI_VERSION = @GI_VERSION@ -GLIBSRC = @GLIBSRC@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ -GMODULE_CFLAGS = @GMODULE_CFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CFLAGS = @GOBJECT_CFLAGS@ -GOBJECT_INTROSPECTION_LIBDIR = @GOBJECT_INTROSPECTION_LIBDIR@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTKDOC_CHECK = @GTKDOC_CHECK@ -GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ -GTKDOC_MKPDF = @GTKDOC_MKPDF@ -GTKDOC_REBASE = @GTKDOC_REBASE@ -HTML_DIR = @HTML_DIR@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -POW_LIB = @POW_LIB@ -PYTHON = @PYTHON@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_INCLUDES = @PYTHON_INCLUDES@ -PYTHON_LIBS = @PYTHON_LIBS@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SCANNER_CFLAGS = @SCANNER_CFLAGS@ -SCANNER_LIBS = @SCANNER_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -YACC = @YACC@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pyexecdir = @pyexecdir@ -pythondir = @pythondir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = 1.6 - -# The name of the module, e.g. 'glib'. -DOC_MODULE = gi - -# Uncomment for versioned docs and specify the version of the module, e.g. '2'. -#DOC_MODULE_VERSION=2 - -# The top-level XML file (SGML in the past). You can change this if you want to. -DOC_MAIN_SGML_FILE = gi-docs.xml - -# Directories containing the source code. -# gtk-doc will search all .c and .h files beneath these paths -# for inline comments documenting functions and macros. -# e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk -DOC_SOURCE_DIR = $(top_srcdir)/girepository - -# Extra options to pass to gtkdoc-scangobj. Not normally needed. -SCANGOBJ_OPTIONS = - -# Extra options to supply to gtkdoc-scan. -# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" -SCAN_OPTIONS = --rebuild-types - -# Extra options to supply to gtkdoc-mkdb. -# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml -MKDB_OPTIONS = --xml-mode --output-format=xml --name-space=g --ignore-files=cmph - -# Extra options to supply to gtkdoc-mktmpl -# e.g. MKTMPL_OPTIONS=--only-section-tmpl -MKTMPL_OPTIONS = - -# Extra options to supply to gtkdoc-mkhtml -MKHTML_OPTIONS = - -# Extra options to supply to gtkdoc-fixref. Not normally needed. -# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html -FIXXREF_OPTIONS = - -# Used for dependencies. The docs will be rebuilt if any of these change. -# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h -# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c -HFILE_GLOB = $(top_srcdir)/girepository/*.h -CFILE_GLOB = $(top_srcdir)/girepository/*.c - -# Extra header to include when scanning, which are not under DOC_SOURCE_DIR -# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h -EXTRA_HFILES = - -# Header files or dirs to ignore when scanning. Use base file/dir names -# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code -IGNORE_HFILES = \ - cmph \ - girnode.h \ - girparser.h \ - girwriter.h \ - girmodule.h \ - girepository-private.h - - -# Images to copy into HTML directory. -# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png -HTML_IMAGES = \ - images/overview.png - - -# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). -# e.g. content_files=running.sgml building.sgml changes-2.0.sgml -content_files = \ - overview-building.xml \ - overview-programming.xml \ - gi-gir-reference.xml \ - gi-struct-hierarchy.xml \ - version.xml - - -# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded -# These files must be listed here *and* in content_files -# e.g. expand_content_files=running.sgml -# -# Set to $(content_files) for simplicity, so we can always -# simply , even for manually -# written .xml files... -expand_content_files = $(content_files) - -# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. -# Only needed if you are using gtkdoc-scangobj to dynamically query widget -# signals and properties. -# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) -# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) -GTKDOC_CFLAGS = \ - -I$(top_srcdir) \ - $(GIREPO_CFLAGS) - -GTKDOC_LIBS = \ - $(top_builddir)/libgirepository-1.0.la \ - $(top_builddir)/libgirepository-internals.la \ - $(GIREPO_LIBS) - -@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = -@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute - -# We set GPATH here; this gives us semantics for GNU make -# which are more like other make's VPATH, when it comes to -# whether a source that is a target of one rule is then -# searched for in VPATH/GPATH. -# -GPATH = $(srcdir) -TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) -SETUP_FILES = \ - $(content_files) \ - $(expand_content_files) \ - $(DOC_MAIN_SGML_FILE) \ - $(DOC_MODULE)-sections.txt \ - $(DOC_MODULE)-overrides.txt - - -# Other files to distribute -# e.g. EXTRA_DIST += version.xml.in - -# Other files to distribute -EXTRA_DIST = $(HTML_IMAGES) $(SETUP_FILES) version.xml.in -DOC_STAMPS = setup-build.stamp scan-build.stamp sgml-build.stamp \ - html-build.stamp pdf-build.stamp \ - sgml.stamp html.stamp pdf.stamp - -SCANOBJ_FILES = \ - $(DOC_MODULE).args \ - $(DOC_MODULE).hierarchy \ - $(DOC_MODULE).interfaces \ - $(DOC_MODULE).prerequisites \ - $(DOC_MODULE).signals - -REPORT_FILES = \ - $(DOC_MODULE)-undocumented.txt \ - $(DOC_MODULE)-undeclared.txt \ - $(DOC_MODULE)-unused.txt - -CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test -@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = -@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp -@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = -@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp - -#### setup #### -GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_@AM_V@) -GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_@AM_DEFAULT_V@) -GTK_DOC_V_SETUP_0 = @echo " DOC Preparing build"; - -#### scan #### -GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_@AM_V@) -GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_@AM_DEFAULT_V@) -GTK_DOC_V_SCAN_0 = @echo " DOC Scanning header files"; -GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_@AM_V@) -GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_@AM_DEFAULT_V@) -GTK_DOC_V_INTROSPECT_0 = @echo " DOC Introspecting gobjects"; - -#### xml #### -GTK_DOC_V_XML = $(GTK_DOC_V_XML_@AM_V@) -GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_@AM_DEFAULT_V@) -GTK_DOC_V_XML_0 = @echo " DOC Building XML"; - -#### html #### -GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_@AM_V@) -GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_@AM_DEFAULT_V@) -GTK_DOC_V_HTML_0 = @echo " DOC Building HTML"; -GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_@AM_V@) -GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_@AM_DEFAULT_V@) -GTK_DOC_V_XREF_0 = @echo " DOC Fixing cross-references"; - -#### pdf #### -GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_@AM_V@) -GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_@AM_DEFAULT_V@) -GTK_DOC_V_PDF_0 = @echo " DOC Building PDF"; - -# Files not to distribute -# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types -# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt -#DISTCLEANFILES += -@ENABLE_GTK_DOC_TRUE@TESTS_ENVIRONMENT = \ -@ENABLE_GTK_DOC_TRUE@ DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ -@ENABLE_GTK_DOC_TRUE@ SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/reference/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign docs/reference/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; -$(top_srcdir)/gtk-doc.make $(am__empty): - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -version.xml: $(top_builddir)/config.status $(srcdir)/version.xml.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am -check: check-am -@ENABLE_GTK_DOC_FALSE@all-local: -all-am: Makefile all-local -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-local mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-local - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-data-local - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic \ - maintainer-clean-local - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-local - -.MAKE: install-am install-strip - -.PHONY: all all-am all-local check check-am clean clean-generic \ - clean-libtool clean-local cscopelist-am ctags-am dist-hook \ - distclean distclean-generic distclean-libtool distclean-local \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-data-local \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - maintainer-clean-local mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ - uninstall-am uninstall-local - -.PRECIOUS: Makefile - - -gtkdoc-check.test: Makefile - $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ - echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ - chmod +x $@ - -all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) -.PHONY: all-gtk-doc - -@ENABLE_GTK_DOC_TRUE@all-local: all-gtk-doc - -docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) - -$(REPORT_FILES): sgml-build.stamp - -setup-build.stamp: - -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ - if test "x$$files" != "x" ; then \ - for file in $$files ; do \ - destdir=`dirname $(abs_builddir)/$$file`; \ - test -d "$$destdir" || mkdir -p "$$destdir"; \ - test -f $(abs_srcdir)/$$file && \ - cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ - done; \ - fi; \ - fi - $(AM_V_at)touch setup-build.stamp - -scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) - $(GTK_DOC_V_SCAN)_source_dir='' ; \ - for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) - $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ - scanobj_options=""; \ - gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$$?" = "0"; then \ - if test "x$(V)" = "x1"; then \ - scanobj_options="--verbose"; \ - fi; \ - fi; \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ - gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ - else \ - for i in $(SCANOBJ_FILES) ; do \ - test -f $$i || touch $$i ; \ - done \ - fi - $(AM_V_at)touch scan-build.stamp - -$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp - @true - -sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent - $(GTK_DOC_V_XML)_source_dir='' ; \ - for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) - $(AM_V_at)touch sgml-build.stamp - -sgml.stamp: sgml-build.stamp - @true - -$(DOC_MAIN_SGML_FILE): sgml-build.stamp - @true - -xml/gtkdocentities.ent: Makefile - $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ - echo ""; \ - echo ""; \ - echo ""; \ - echo ""; \ - echo ""; \ - echo ""; \ - echo ""; \ - ) > $@ - -html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) - $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \ - mkhtml_options=""; \ - gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$$?" = "0"; then \ - if test "x$(V)" = "x1"; then \ - mkhtml_options="$$mkhtml_options --verbose"; \ - fi; \ - fi; \ - gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ - if test "$$?" = "0"; then \ - mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ - fi; \ - cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) - -@test "x$(HTML_IMAGES)" = "x" || \ - for file in $(HTML_IMAGES) ; do \ - test -f $(abs_srcdir)/$$file && cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ - test -f $(abs_builddir)/$$file && cp $(abs_builddir)/$$file $(abs_builddir)/html; \ - done; - $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) - $(AM_V_at)touch html-build.stamp - -pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) - $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ - mkpdf_options=""; \ - gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$$?" = "0"; then \ - if test "x$(V)" = "x1"; then \ - mkpdf_options="$$mkpdf_options --verbose"; \ - fi; \ - fi; \ - if test "x$(HTML_IMAGES)" != "x"; then \ - for img in $(HTML_IMAGES); do \ - part=`dirname $$img`; \ - echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ - if test $$? != 0; then \ - mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ - fi; \ - done; \ - fi; \ - gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) - $(AM_V_at)touch pdf-build.stamp - -############## - -clean-local: - @rm -f *~ *.bak - @rm -rf .libs - @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ - rm -f $(DOC_MODULE).types; \ - fi - @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \ - rm -f $(DOC_MODULE)-sections.txt; \ - fi - -distclean-local: - @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ - $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt - @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ - fi - -maintainer-clean-local: - @rm -rf xml html - -install-data-local: - @installfiles=`echo $(builddir)/html/*`; \ - if test "$$installfiles" = '$(builddir)/html/*'; \ - then echo 1>&2 'Nothing to install' ; \ - else \ - if test -n "$(DOC_MODULE_VERSION)"; then \ - installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ - else \ - installdir="$(DESTDIR)$(TARGET_DIR)"; \ - fi; \ - $(mkinstalldirs) $${installdir} ; \ - for i in $$installfiles; do \ - echo ' $(INSTALL_DATA) '$$i ; \ - $(INSTALL_DATA) $$i $${installdir}; \ - done; \ - if test -n "$(DOC_MODULE_VERSION)"; then \ - mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ - $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ - fi; \ - $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ - fi - -uninstall-local: - @if test -n "$(DOC_MODULE_VERSION)"; then \ - installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ - else \ - installdir="$(DESTDIR)$(TARGET_DIR)"; \ - fi; \ - rm -rf $${installdir} - -# -# Require gtk-doc when making dist -# -@HAVE_GTK_DOC_TRUE@dist-check-gtkdoc: docs -@HAVE_GTK_DOC_FALSE@dist-check-gtkdoc: -@HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc is needed to run 'make dist'. ***" -@HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc was not found when 'configure' ran. ***" -@HAVE_GTK_DOC_FALSE@ @echo "*** please install gtk-doc and rerun 'configure'. ***" -@HAVE_GTK_DOC_FALSE@ @false - -dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local - @mkdir $(distdir)/html - @cp ./html/* $(distdir)/html - @-cp ./$(DOC_MODULE).pdf $(distdir)/ - @-cp ./$(DOC_MODULE).types $(distdir)/ - @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ - @cd $(distdir) && rm -f $(DISTCLEANFILES) - @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html - -.PHONY : dist-hook-local docs -# Comment this out if you want 'make check' to test you doc status -# and run some sanity checks - -gi-docs-clean: clean - cd $(srcdir) && rm -rf xml html - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru gobject-introspection-1.56.1/docs/reference/meson.build gobject-introspection-1.64.1/docs/reference/meson.build --- gobject-introspection-1.56.1/docs/reference/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/meson.build 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,37 @@ +gnome = import('gnome') + +version_conf = configuration_data() +version_conf.set('GI_VERSION', meson.project_version()) + +version_xml = configure_file( + input: 'version.xml.in', + output: 'version.xml', + configuration: version_conf, +) + +ignore_headers = [ + 'cmph', + 'girnode.h', + 'girparser.h', + 'girwriter.h', + 'girmodule.h', + 'girepository-private.h', +] + +gnome.gtkdoc('gi', + main_xml: 'gi-docs.xml', + dependencies: girepo_dep, + src_dir: 'girepository', + content_files: [ + 'gi-struct-hierarchy.xml', + ], + scan_args: [ + '--rebuild-types', + '--ignore-headers=' + ' '.join(ignore_headers), + ], + mkdb_args: [ + '--name-space=g', + '--ignore-files=cmph', + ], + install: true, +) diff -Nru gobject-introspection-1.56.1/docs/reference/overview-building.xml gobject-introspection-1.64.1/docs/reference/overview-building.xml --- gobject-introspection-1.56.1/docs/reference/overview-building.xml 2014-08-04 14:37:07.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/overview-building.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,189 +0,0 @@ - - - - - Compiling the GObject Introspection package - - - - Compiling the GObject Introspection Package - How to compile GObject Introspection itself - - - - Building on UNIX - - On UNIX, GObject Introspection uses the standard GNU build system, - using autoconf for package - configuration and resolving portability issues, - automake for building makefiles - that comply with the GNU Coding Standards, and - libtool for building shared - libraries on multiple platforms. The normal sequence for - compiling and installing the GObject Introspection package is thus: - - - ./configure - make - make install - - - - - The standard options provided by GNU - autoconf may be passed to the - configure script. Please see the - autoconf documentation or run - ./configure --help for information about - the standard options. - - - - - Dependencies - - Before you can compile GObject Introspection, you need to have - various other tools and libraries installed on your - system. The tools needed during the build process (as - differentiated from the basic build tools mentioned - before are: - - - - - pkg-config - is a tool for tracking the compilation flags needed for - libraries that are used by the GObjecct Introspection. (For each - library, a small .pc text file is - installed in a standard location that contains the compilation - flags needed for that library along with version number - information.) - - - - - The GObject-Introspection makefiles will mostly work with different - versions of make, however, there tends to be a - few incompatibilities, so the GObject-Introspection team recommends - installing GNU - make if you don't already have it on your system - and using it. (It may be called gmake - rather than make.) - - - - - GObject-Introspection depends on a number of libraries and tools - maintained under the umbrella of the GNOME project: - - - - - The GLib library provides core non-graphical functionality - such as high level data types, Unicode manipulation, and - an object and type system to C programs. It is available - from the GNOME - FTP site or - here. - - - - - TODO: GTK-Doc - - - - - External dependencies - - - Python - - - - - GObject Introspection has an option dependency on the - libffi library. When available, - ... - - - - - - Cairo - is a graphics library that supports vector graphics and image - compositing. When available, GObject Introspection uses - Cairo in its unit tests. - - - - - - - - Extra Configuration Options - - - In addition to the normal options, the - configure script in the GObject Introspection - package supports these additional arguments: - - - - <systemitem>--disable-Bsymbolic</systemitem> and - <systemitem>--enable-Bsymbolic</systemitem> - - - By default, the GObject Introspection package uses the - -Bsymbolic-functions linker flag to avoid intra-library - PLT jumps. A side-effect of this is that it is no longer - possible to override internal uses of GObject Introspection - functions with LD_PRELOAD. Therefore, it may - make sense to turn this feature off in some situations. - The option allows - to do that. - - - - - <systemitem>--disable-gtk-doc</systemitem> and - <systemitem>--enable-gtk-doc</systemitem> - - - By default the configure script will try - to auto-detect whether the - gtk-doc package is installed. - If it is, then it will use it to extract and build the - documentation for the GObject Introspection package. These options - can be used to explicitly control whether - gtk-doc should be - used or not. If it is not used, the distributed, - pre-generated HTML files will be installed instead of - building them on your machine. - - - - - <systemitem>--disable-doctool</systemitem> and - <systemitem>--enable-doctool</systemitem> - - - TODO - - - - - <systemitem>--with-python</systemitem> - - - Allows specifying the Python interpreter to use, either as an - absolute path, or as a program name. GObject Introspection can - be built with Python 2 (at least version 2.6) but does not yet - support Python 3. - - - - - diff -Nru gobject-introspection-1.56.1/docs/reference/overview-programming.xml gobject-introspection-1.64.1/docs/reference/overview-programming.xml --- gobject-introspection-1.56.1/docs/reference/overview-programming.xml 2014-08-04 14:37:07.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/overview-programming.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ - - - - - Writing introspected libraries - - - - Writing introspected libraries - General considerations when writing introspected libraries - - - - TODO - - ... - - - - diff -Nru gobject-introspection-1.56.1/docs/reference/version.xml gobject-introspection-1.64.1/docs/reference/version.xml --- gobject-introspection-1.56.1/docs/reference/version.xml 2018-04-09 06:15:44.000000000 +0000 +++ gobject-introspection-1.64.1/docs/reference/version.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -1.56.1 diff -Nru gobject-introspection-1.56.1/docs/release-checklist.txt gobject-introspection-1.64.1/docs/release-checklist.txt --- gobject-introspection-1.56.1/docs/release-checklist.txt 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/release-checklist.txt 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,9 @@ +Check bugzilla +Run all tests +Commit +make distcheck +make release-tag +make upload-release +Send release announcement +Bump version number: + configure.ac diff -Nru gobject-introspection-1.56.1/docs/website/annotations/giannotations.rst gobject-introspection-1.64.1/docs/website/annotations/giannotations.rst --- gobject-introspection-1.56.1/docs/website/annotations/giannotations.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/annotations/giannotations.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,790 @@ +GObject-Introspection annotations +--------------------------------- + +Symbol visibility +~~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + :widths: 1 1 10 1 + + * - Annotation + - Applies to + - Description + - Since + * - ``(skip)`` + - identifier + - Omit the symbol from the introspected output. + - :commit:`v0.6.4 <7549c8053d0229a12d9196cc8abae54a01a555d0>` + :bzbug:`556628` + * - + - paremeters, return value + - Indicate that the parameter or return value is only useful in C and + should be skipped. + - :commit:`v1.29.0 <9c6797e0478b5025c3f2f37b1331c1328cf34f4d>` + :bzbug:`649657` + * - ``(rename-to SYMBOL)`` + - identifier + - Rename the original symbol's name to ``SYMBOL``. If ``SYMBOL`` resolves + to a symbol name that is already used, the original binding for that + name is removed. + - :commit:`v0.6.3 <23e6fa6993c046de032598127ea48d4a7ee00935>` + :bzbug:`556475` + + +Memory and lifecycle management +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + :widths: 1 1 10 1 + + * - Annotation + - Applies to + - Description + - Since + * - ``(transfer MODE)`` + - identifier (only properties) + - Transfer ownership for the property, (see below) + - :commit:`v0.9.0 <22ae017ffd3052c0b81822b2ca6e41626b76b9c4>` + :bzbug:`620484` + * - + - parameters, return value + - Transfer mode for the parameter or return value (see below). + - v0.5.0 unknown + +Transfer modes: + +* ``none``: the recipient does not own the value +* ``container``: the recipient owns the container, but not the elements. + (Only meaningful for container types.) +* ``full``: the recipient owns the entire value. For a refcounted type, + this means the recipient owns a ref on the value. For a container type, + this means the recipient owns both container and elements. +* ``floating``: alias for none, can be used for floating objects. + +``container`` is usually a pointer to a list or hash table, eg GList, GSList, +GHashTable etc. + +``elements`` is what is contained inside the list: integers, strings, GObjects +etc. + + +Support for GObject objects +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + :widths: 1 1 10 1 + + * - Annotation + - Applies to + - Description + - Since + * - ``(constructor)`` + - identifier + - The annotated symbol should not become available as a static methods + but as a constructor. + - :commit:`v0.10.2 <2c36790c>` + :bzbug:`561264` + * - ``(method)`` + - identifier + - This function is a method. + - :commit:`v0.10.2 <09bca85d>` + :bzbug:`639945` + * - ``(virtual SLOT)`` + - identifier + - This function is the invoker for a virtual method. + - :commit:`v0.6.3 ` + :bzbug:`557383` + + +Support for GObject closures +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + :widths: 1 1 10 1 + + * - Annotation + - Applies to + - Description + - Since + * - ``(destroy)`` + - parameters + - The parameter is a "``destroy_data``" for callbacks. + - :commit:`v0.6.3 ` + :bzbug:`574284` + * - ``(destroy DESTROY)`` + - parameters + - The parameter is a "``destroy_data``" for callbacks, the + ``DESTROY`` option points to a paramter name other than + ``destroy_data``. + - + * - ``(closure)`` + - parameters + - The parameter is a "``user_data``" for callbacks. + Many bindings can pass ``NULL`` here. + - + * - ``(closure CLOSURE)`` + - parameters + - The parameter is a "``user_data``" for callbacks, the ``CLOSURE`` option + points to a different parameter that is the actual callback. + - + + +Support for non-GObject fundamental objects +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + :widths: 1 1 10 1 + + * - Annotation + - Applies to + - Description + - Since + * - ``(ref-func FUNC)`` + - identifier + - ``FUNC`` is the function used to ref a struct, must be a GTypeInstance + - :commit:`v0.9.2 <1e9822c7>` + :bzbug:`568913` + * - ``(unref-func FUNC)`` + - identifier + - ``FUNC`` is the function used to unref a struct, must be a GTypeInstance + - + * - ``(get-value-func FUNC)`` + - identifier + - ``FUNC`` is the function used to convert a struct from a GValue, + must be a GTypeInstance + - + * - ``(set-value-func FUNC)`` + - identifier + - ``FUNC`` is the function used to convert from a struct to a GValue, + must be a GTypeInstance + - + + +Type signature +~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + :widths: 1 1 10 1 + + * - Annotation + - Applies to + - Description + - Since + * - ``(nullable)`` + - parameters, return value + - Indicates that ``NULL`` may be a valid value for a parameter + (in, out, inout), or return value (though note that return values which + are only ``NULL`` when throwing an error should not be annotated as + ``(nullable)``). + - :commit:`1.42 <1459ff3e>` + :bzbug:`660879` + * - ``(not nullable)`` + - parameters, return value + - Indicates that ``NULL`` is not a valid value for a parameter + (in, out, inout), or return value. + - :commit:`1.48 <10cb665f>` + :bzbug:`729660` + * - ``(optional)`` + - parameters + - For ``(out)`` or ``(inout)`` parameters, signifies that the caller + can pass ``NULL`` to ignore this output parameter. + - :commit:`1.42 <1459ff3e>` + :bzbug:`660879` + * - ``(in)`` + - parameters + - In parameter. + - v0.5.0 + unknown + * - ``(out)`` + - parameters + - Out parameter (automatically determine allocation). + - v0.5.0 + unknown + * - ``(out caller-allocates)`` + - parameters + - Out parameter, where the calling code must allocate storage. + - :commit:`v0.6.13 <5589687a>` + :bzbug:`604749` + * - ``(out callee-allocates)`` + - parameters + - Out parameter, where the receiving function must allocate storage. + - + * - ``(inout)`` + - parameters + - In/out parameter. + - v0.5.0 + unknown + * - ``(type TYPE)`` + - identifier + - Override the default type, used for properties + - :commit:`v0.6.2 <6de1b296>` + :bzbug:`546739` + * - + - parameters, return value + - override the parsed C type with given type + - + * - ``(array)`` + - parameters, return value + - Arrays. + - v0.5.0 + unknown + * - ``(array fixed-size=N)`` + - parameters, return value + - array of fixed length N + - v0.5.0 + unknown + * - ``(array length=PARAM)`` + - parameters, return value + - array, fetch the length from parameter PARAM + - v0.5.0 + unknown + * - ``(array zero-terminated=1)`` + - parameters, return value + - array which is NULL terminated + - :commit:`v0.6.0 ` + :bzbug:`557786` + * - ``(element-type TYPE)`` + - parameters, return value + - Specify the type of the element inside a container. + Can be used in combination with (array). + - v0.5.0 + unknown + * - ``(element-type KTYPE VTYPE)`` + - parameters, return value + - Specify the types of the keys and values in a dictionary-like container + (eg, ``GHashTable``). + - v0.5.0 + unknown + * - ``(foreign)`` + - identifier + - The annotated symbol is a foreign struct, meaning it is not available + in a g-i supported library. + - :commit:`v0.6.12 <1edeccd2>` + :bzbug:`619450` + * - ``(scope TYPE)`` + - parameters + - The parameter is a callback, the ``TYPE`` option indicates the lifetime + of the call. It is mainly used by language bindings wanting to know when + the resources required to do the call (for instance ffi closures) can be + freed. + - :commit:`v0.6.2 ` + :bzbug:`556489` + +Scope types: + +* ``call`` (default) - Only valid for the duration of the call. + Can be called multiple times during the call. +* ``async`` - Only valid for the duration of the first callback invocation. + Can only be called once. +* ``notified`` - valid until the GDestroyNotify argument is called. + Can be called multiple times before the GDestroyNotify is called. + +An example of a function using the ``call`` scope is ``g_slist_foreach()``. +For ``async`` there is ``g_file_read_async()`` and for notified +``g_idle_add_full()``. + +Default Annotations: To avoid having the developers annotate everything the +introspection framework is providing sane default annotation values for a +couple of situations: + +* ``(in)`` parameters: ``(transfer none)`` +* ``(inout)`` and ``(out)`` parameters: ``(transfer full)`` + + * if ``(caller allocates)`` is set: ``(transfer none)`` + +* ``gchar*`` means ``(type utf8)`` +* return values: ``(transfer full)`` + + * ``gchar*`` means ``(type utf8) (transfer full)`` + * ``const gchar*`` means ``(type utf8) (transfer none)`` + * ``GObject*`` defaults to ``(transfer full)`` + + +Data annotations +~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + :widths: 1 1 10 1 + + * - Annotation + - Applies to + - Description + - Since + * - ``(value VALUE)`` + - identifier + - Used to override constants for defined values, + VALUE contains the evaluated value + - v0.5.0 + unknown + * - ``(attributes my.key=val my.key2)`` + - identifier, parameters, return value + - Attributes are free-form "key=value" annotations. When present, at least + one key has to be specified. Assigning values to keys is optional. + - :commit:`v0.9.0 <11cfe386>` + :bzbug:`571548` + + +Deprecated GObject-Introspection annotations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + :widths: 1 10 1 + + * - Annotation + - Description + - Since + * - ``(null-ok)`` + - Replaced by ``(allow-none)`` + - :commit:`v0.6.0 ` + :bzbug:`557405` + * - ``(in-out)`` + - Replaced by ``(inout)`` + - :commit:`1.39.0 ` + :bzbug:`688897` + * - ``(allow-none)`` + - Replaced by ``(nullable)`` and ``(optional)`` + - :commit:`1.42 <1459ff3e>` + :bzbug:`660879` + + +Possible future GObject-Introspection annotations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +These proposed additions are currently being discussed and in various stages +of development. + +.. list-table:: + :header-rows: 1 + :widths: 1 1 10 1 + + * - Annotation + - Applies to + - Description + - Since + * - ``(default VALUE)`` + - parameters + - Default value for a parameter. + - :bzbug:`558620` + * - ``(error-domains DOM1 DOM2)`` + - parameters + - Typed errors, similar to ``throws`` in Java. + - unknown + + +Default Basic Types +------------------- + +Basic types: + +* gpointer: pointer to anything +* gboolean:boolean +* gint[8,16,32,64]: integer +* guint[8,16,32,64]: unsigned integer +* glong: long +* gulong: unsigned long +* GType: a gtype +* gfloat: float +* gdouble: double +* utf8: string encoded in UTF-8, not containing any embedded nuls +* filename: filename string (see below) +* guint8 array: binary data + +Filename type: + +The filename type represents an utf-8 string on Windows and a zero terminated +guint8 array on Unix. It should be used for filenames, environment variables +and process arguments. + + +Reference to Object Instances +----------------------------- + +Instances: + +* Object: a GObject instance +* Gtk.Button: a Gtk.Button instance + + +Examples +-------- + +Transfer +~~~~~~~~ + +:: + + /** + * mylib_get_constant1: + * + * Returns: (transfer full): a constant, free when you used it + */ + gchar * + mylib_get_constant1 (void) + { + return g_strdup("a constant"); + } + +:: + + /** + * mylib_get_constant2: + * + * Returns: (transfer none): another constant + */ + const gchar * + mylib_get_string2 (void) + { + return "another constant"; + } + +:: + + /** + * mylib_get_string_list1: + * + * Returns: (element-type utf8) (transfer full): list of constants, + * free the list with g_slist_free and the elements with g_free when done. + */ + GSList * + mylib_get_string_list1 (void) + { + GSList *l = NULL; + l = g_slist_append (l, g_strdup ("foo")); + l = g_slist_append (l, g_strdup ("bar")); + return l; + } + +:: + + /** + * mylib_get_string_list2: + * + * Returns: (element-type utf8) (transfer container): list of constants + * free the list with g_slist_free when done. + */ + GSList * + mylib_get_string_list2 (void) + { + GSList *l = NULL; + l = g_slist_append (l, "foo"); + l = g_slist_append (l, "bar"); + return l; + } + + +Array length +~~~~~~~~~~~~ + +:: + + /** + * gtk_list_store_set_column_types: + * @store: a #GtkListStore + * @n_columns: Length of @types + * @types: (array length=n_columns): List of types + */ + void + gtk_list_store_set_column_types (GtkListStore *list_store, + gint n_columns, + GType *types); + + +Nullable parameters +~~~~~~~~~~~~~~~~~~~ + +A number of things are nullable by convention, which means that you do not +have to add a ``(nullable)`` annotation to your code for them to be marked as +nullable in a GIR file. If you need to mark a parameter or return value as not +nullable, use ``(not nullable)`` to override the convention. Conventionally, +the following are automatically nullable: + +* ``(closure)`` parameters and their corresponding user data parameters +* ``gpointer`` parameters and return types, unless also annotated with + ``(type)`` + +:: + + /** + * gtk_link_button_new_with_label: + * @uri: A URI + * @label: (nullable): A piece of text or NULL + */ + GtkWidget * + gtk_link_button_new_with_label (const gchar *uri, + const gchar *label); + +:: + + /** + * g_source_add_unix_fd: + * @source: a #GSource + * @fd: the fd to monitor + * @events: an event mask + * + * Returns: (not nullable): an opaque tag + */ + gpointer + g_source_add_unix_fd (GSource *source, + gint fd, + GIOCondition events); + + /** + * g_source_remove_unix_fd: + * @source: a #GSource + * @tag: (not nullable): the tag from g_source_add_unix_fd() + */ + void + g_source_remove_unix_fd (GSource *source, + gpointer tag); + + +G(S)List contained types +~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + /** + * gtk_container_get_children: + * @container: A #GtkContainer + * + * Returns: (element-type Gtk.Widget) (transfer container): List of #GtkWidget + */ + GList* + gtk_container_get_children (GtkContainer *container); + +:: + + /** + * FooBar:alist: (type GSList(NiceObj)) + * + * This property is a GSList of NiceObj GOjects. + */ + g_object_class_install_property (object_class, + FOO_BAR_PROP_ALIST, + g_param_spec_pointer ("alist", + "Alist", + "A list of nice objects", + G_PARAM_READWRITE)); + + +Direction +~~~~~~~~~ + +:: + + /** + * gtk_widget_get_size_request: + * @width: (out): Int to store width in + * @height: (out): Int to store height in + */ + + +Out parameters +~~~~~~~~~~~~~~ + +This is a callee-allocates example; the (out) annotation automatically infers +this from the fact that there's a double indirection on a structure parameter. + + +:: + + typedef struct _FooSubObj FooSubObj + + /** + * foo_obj_get_sub_obj: + * @obj: A #FooObj + * @subobj: (out): A #FooSubObj + * + * Get a sub object. + */ + void + foo_obj_get_sub_obj (FooObj *obj, + FooSubObj **subobj) + { + *subobj = foo_sub_object_new (); + } + +This is a caller-allocates example; the (out) annotation automatically infers +this from the fact that there's only a single indirection on a structure +parameter. + +:: + + typedef struct _FooIter FooIter; + + /** + * foo_obj_get_iter: + * @obj: A #FooObj + * @iter: (out): An iterator, will be initialized + * + * Get an iterator. + */ + void + foo_obj_get_iter (FooObj *obj, + FooIter *iter) + { + iter->state = 0; + } + +An example which demonstrates an (optional) parameter: an (out) parameter +where the caller can pass NULL if they don’t want to receive the (out) value. + +:: + + /** + * g_file_get_contents: + * @filename: name of a file to read contents from, in the GLib file name encoding + * @contents: (out): location to store an allocated string, use g_free() to free the returned string + * @length: (out) (optional): location to store length in bytes of the contents, or NULL + * @error: return location for a GError, or NULL + * + * [...] + * + * Returns: TRUE on success, FALSE if an error occurred + */ + gboolean g_file_get_contents (const gchar *filename, + gchar **contents, + gsize *length, + GError **error); + + /* this is valid because length has (optional) */ + g_file_get_contents ("/etc/motd", &motd, NULL, &error); // VALID + /* but this is not valid, according to those annotations */ + g_file_get_contents ("/etc/motd", NULL, NULL, &error); // NOT VALID + + +g_hash_table_iter_next() demonstrates the difference between (nullable) and +(optional) for (out) parameters. For an (out) parameter, (optional) indicates +that NULL may be passed by the caller to indicate they don’t want to receive +the (out) value. (nullable) indicates that NULL may be passed out by the +callee as the returned value. + +:: + + /** + * g_hash_table_iter_next: + * @iter: an initialized #GHashTableIter + * @key: (out) (optional): a location to store the key + * @value: (out) (optional) (nullable): a location to store the value + * + * [...] + * + * Returns: %FALSE if the end of the #GHashTable has been reached. + */ + gboolean + g_hash_table_iter_next (GHashTableIter *iter, + gpointer *key, + gpointer *value); + + /* this is valid because value and key have (optional) */ + g_hash_table_iter_next (iter, NULL, NULL); + + gpointer key, value; + g_hash_table_iter_next (iter, &key, &value); + + if (value == NULL) + /* this is valid because value has (nullable) */ + if (key == NULL) + /* this is NOT VALID because key does not have (nullable) */ + + +Rename to +~~~~~~~~~ + +Rename to is an advisory annotation. It's not required to fulfill the advisory +when generating or making a language binding. The way it is currently +implemented, if you rename a function to a name already in use, it will remove +the other binding. This is useful to eliminate unwanted/deprecated functions +from the binding. + +Another (currently unimplemented) use for the rename annotation would be +overloading; for example, overloading of constructors or, like in this +example, overloading a method to be both an asynchronous and a synchronous one +(depending on the amount and what kind of parameters). + +:: + + /** + * my_type_perform_async: (rename-to my_type_perform) + * @self: The this ptr + * @data: data + * @callback: callback when async operation finished + * @user_data: user_data for @callback + * + * Asynchronously perform + **/ + void + my_type_perform_async (MyType *self, gpointer data, + GFunc callback, + gpointer user_data); + + /** + * my_type_perform: + * @self: The this ptr + * @data: data + * + * Perform + **/ + void + my_type_perform (MyType *self, gpointer data); + +In a language supporting method overloading, because we advised to rename to +perform, and because we have another perform already, this could be bound like +this: + +:: + + class MyType { + public void perform (Pointer data) { } + public void perform (Pointer data, GFunc callback, Pointer user_data) { } + } + +However, currently the generated gir/typelib will only contain information +about my_type_perform_async, which will shadow (ie, remove) the binding of +my_type_perform. + + +Attributes +~~~~~~~~~~ + +Attributes are arbitrary key/value pairs that can be attached to almost any +item including classes, methods, signals, properties, parameters and return +values. These attributes appear in both the .gir and the .typelib files. +Attributes can serve as a mechanism for software higher in the toolchain. +Attributes are name-spaced using dot as a separator. At least one dot must +appear in the key name. + +:: + + /** + * my_frobnicator_poke_path: (attributes gdbus.method PokePath) + * @frobnicator: A #MyFrobnicator + * @object_path: (gdbus.signature o): An object path. + * + * Manipulate an object path. + * + * Returns: (gdbus.signature o): A new object path. Free with g_free(). + */ + gchar * + my_frobnicator_poke_path (MyFrobnicator *frobnicator, + const gchar *object_path) + + +Constants +~~~~~~~~~ + +:: + + /** + * MY_CONSTANT: (value 100) + * A constant. + */ + #define MY_CONSTANT 10 * 10 diff -Nru gobject-introspection-1.56.1/docs/website/annotations/gtkdoc.rst gobject-introspection-1.64.1/docs/website/annotations/gtkdoc.rst --- gobject-introspection-1.56.1/docs/website/annotations/gtkdoc.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/annotations/gtkdoc.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,170 @@ +===================== +GTK-Doc Format Primer +===================== + +GObject-Introspection annotations are built on top of GTK-Doc comment +blocks. These are plain old C comment blocks, but formatted in a special +way. Each GTK-Doc comment block starts with a ``/**`` on its own line +end ends with ``*/``, again on its own line. + +The basic format of a GTK-Doc comment block looks like this: + +:: + + /** + * identifier_name: (annotations) + * @parameter_name: (annotations): description + * + * symbol description + * + * tag_name: (annotations): description + */ + +As we can see, a GTK-Doc comment block can be broken down into a couple of +parts. Each part is built out of one or more fields, separated by a ``:`` +character. Each part has to start on its own line. Fields cannot span multiple +lines except the various ``description`` fields. + +The order in which parts are written is important. For example, putting a +``tag`` part before the ``symbol description`` part is invalid as it would +result in the symbol description to be mistaken for the tag description. + +In the above example we have: + +* the start of a GTK-Doc comment block on line 1 +* the identifier part on line 2 +* a parameter part on line 3 +* the symbol description on line 5 +* a tag part on line 7 +* the end of the comment block on line 8 + +identifier part +~~~~~~~~~~~~~~~ + +:: + + /** + * identifier_name: (annotations) + * ... + */ + +The identifier part is required as it identifies the symbol you want to +annotate. It is always written on the line immediately following the start of +your GTK-Doc comment block (``/**``). + +The ``identifier`` part is constructed from: + +* a required ``identifier_name`` field + + * different kinds of symbols that can be documented and annotated are + described in the GTK-Doc manual. + +* an optional ``annotations`` field + +parameter part +~~~~~~~~~~~~~~ + +:: + + /** + * ... + * @parameter_name: (annotations): description + * ... + */ + +The ``parameter`` part is optional. This means that there can be 0 or more +parameters, depending on the symbol you are annotating. + +``parameter`` parts are constructed from: + +* a required ``parameter_name`` which starts with a ``@`` character + + * this name should correspond with the parameter name of you function's + signature. + +* an optional ``annotations`` field +* a required description field (can be "empty") + + * can contain a single paragraph (multiple lines but no empty lines) of + text. + +Note that multiple ``parameter`` parts are never separated by an empty line. + +symbol description part +~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + /** + * ... + * + * symbol description + * ... + */ + +The ``symbol description`` part is optional. When present, it must always be +preceded with an empty line. It can contain multiple paragraphs (multiple +lines and empty lines) describing what the function, property, signal, enum or +constant does. + +tag part +~~~~~~~~ + +:: + + /** + * ... + * tag_name: (annotations)||value: description + * ... + */ + +The ``tag`` part is optional. There can be 0 or more tags, depending on the +symbol you are annotating. + +``tag`` parts are constructed from: + +* a required ``tag_name`` + + * There are only four valid tags: ``Returns``, ``Since``, ``Deprecated``, + and ``Stability``. + +* an optional ``annotations`` field (``Returns``) + **OR** + an optional ``value`` field (``Since``, ``Deprecated``, and ``Stability``) +* a required description field (can be "empty") + + * can contain multiple paragraphs (multiple lines and empty lines) of text. + +``tag`` parts can safely be preceded or followed by an empty line. + +Tags taking an optional ``value`` field accept the following values: + +.. list-table:: + :header-rows: 1 + :widths: 1 1 10 + + * - Tag + - Value field + - Description + * - ``Since`` + - ``VERSION`` + - This symbol was added in version ``VERSION``. + * - ``Deprecated`` + - ``VERSION`` + - This symbol has been deprecated since version ``VERSION``. + * - ``Stability`` + - ``Stable``, ``Unstable``, or ``Private`` + - An informal description of the stability level of this symbol. + + +GTK-Doc support +--------------- + +If GTK-Doc doesn't seem to understand your introspection annotations, you may +need to do two things: + +#. make sure you are running GTK-Doc >= v1.12 (also try latest version from + git) +#. add ```` + to your master GTK-Doc document; e.g. see the end of `tester-docs.xml + `__ diff -Nru gobject-introspection-1.56.1/docs/website/annotations/index.rst gobject-introspection-1.64.1/docs/website/annotations/index.rst --- gobject-introspection-1.56.1/docs/website/annotations/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/annotations/index.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,10 @@ +=========== +Annotations +=========== + +.. toctree:: + :titlesonly: + :maxdepth: 1 + + gtkdoc + giannotations diff -Nru gobject-introspection-1.56.1/docs/website/architecture.rst gobject-introspection-1.64.1/docs/website/architecture.rst --- gobject-introspection-1.56.1/docs/website/architecture.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/architecture.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,64 @@ +============ +Architecture +============ + +.. figure:: images/architecture.svg + :align: center + + +:: + + BUILD TIME: + + +-----------------------------------------------------------+ + | foo.c | + | foo.h | + | | + | Library sources, with type annotations | + +-----------------------------------------------------------+ + | | + gcc g-ir-scanner + | | + | V + | +------------------------+ + | | Foo.gir | + | | | + | | .gir | + | | | + | | XML file | + | | | + | | Invocation information | + | | Required .gir files | + | | API docs | + | | | + | +------------------------+ + | | + | g-ir-compiler + | | + DEPLOYMENT TIME: | + | | + V V + +-----------------------------+ +---------------------------+ + | libfoo.so | | Foo.typelib | + | | | | + | | | Binary version of the | + | ELF file | | invocation info and | + | | | required .typelib files | + | Machine code, plus | +---------------------------+ + | dynamic linkage information | A + | (DWARF debug data, etc) | | + +-----------------------------+ | + A | + | +---------------------------+ + | | libgirepository.so | + +-----------+ | | + | libffi.so | | Can read typelibs and | + | |<-------+------>| present them in a | + +-----------+ | | libffi-based way | + | | | + | +---------------------------+ + | + | + +----------------------------+ + | Specific language bindings | + +----------------------------+ diff -Nru gobject-introspection-1.56.1/docs/website/buildsystems/autotoolsintegration.rst gobject-introspection-1.64.1/docs/website/buildsystems/autotoolsintegration.rst --- gobject-introspection-1.56.1/docs/website/buildsystems/autotoolsintegration.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/buildsystems/autotoolsintegration.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,122 @@ +===================== +Autotools Integration +===================== + +The gobject-introspection package provides the following two macros for use in +your configure.ac file: + +GOBJECT_INTROSPECTION_CHECK([version]) + This macro adds a ``--enable-introspection=yes|no|auto`` configure + option which defaults to ``auto``. + + * ``auto`` - Will set ``HAVE_INTROSPECTION`` if gobject-introspection is available + and the version requirement is satisfied. + * ``yes`` - Will error out if gobject-introspection is missing or the version + requirement is not satisfied. ``HAVE_INTROSPECTION`` will always be true. + * ``no`` - Will never error out and ``HAVE_INTROSPECTION`` will always be false. + +GOBJECT_INTROSPECTION_REQUIRE([version]) + This macro does not add a configure option and behaves as if + ``--enable-introspection=yes``. + + +Example +------- + +You'll need to adapt this for the library you're adding introspection support +to. + +* configure.ac (or configure.in if no .ac file is used) + + .. code-block:: none + + GOBJECT_INTROSPECTION_CHECK([1.40.0]) + +* Makefile.am + + .. code-block:: none + + DISTCHECK_CONFIGURE_FLAGS = --enable-introspection + + or just add to the existing DISTCHECK_CONFIGURE_FLAGS + +* foo/Makefile.am - must be near the end (after CLEANFILES has been set) + + .. code-block:: none + + -include $(INTROSPECTION_MAKEFILE) + INTROSPECTION_GIRS = + INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all + INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) + + if HAVE_INTROSPECTION + introspection_sources = $(libfoo_1_0_la_SOURCES) + + Foo-1.0.gir: libfoo-1.0.la + Foo_1_0_gir_INCLUDES = GObject-2.0 + Foo_1_0_gir_CFLAGS = $(INCLUDES) + Foo_1_0_gir_LIBS = libfoo-1.0.la + Foo_1_0_gir_FILES = $(introspection_sources) + INTROSPECTION_GIRS += Foo-1.0.gir + + girdir = $(datadir)/gir-1.0 + gir_DATA = $(INTROSPECTION_GIRS) + + typelibdir = $(libdir)/girepository-1.0 + typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) + + CLEANFILES += $(gir_DATA) $(typelib_DATA) + endif + + You can also check out a complete example at + https://gitlab.gnome.org/GNOME/gtk/blob/c0ba041c73214f82d2c32b2ca1fa8f3c388c6170/gtk/Makefile.am#L1571 + + +Makefile variable documentation +------------------------------- + +``INTROSPECTION_GIRS`` is the entry point, you should list all the gir files +you want to build there in the XXX-Y.gir format where X is the name of the gir +(for example Gtk) and Y is the version (for example 2.0). + +If output is Gtk-3.0.gir then you should name the variables like +``Gtk_3_0_gir_NAMESPACE``, ``Gtk_3_0_gir_VERSION`` etc. + +* Required variables: + + * ``FILES`` - C sources and headers which should be scanned + +* One of these variables are required: + + * ``LIBS`` - Library where the symbol represented in the gir can be found + * ``PROGRAM`` - Program where the symbol represented in the gir can be found + +* Optional variables, commonly used: + + * ``INCLUDES`` - Gir files to include without the .gir suffix, for instance + GLib-2.0, Gtk-3.0. This is needed for all libraries which you depend on + that provides introspection information. + * ``SCANNERFLAGS`` - Flags to pass in to the scanner, see g-ir-scanner(1) + for a list + * ``PACKAGES`` - list of pkg-config names which cflags are required to parse + the headers of this gir. Note that ``INCLUDES`` will already fetch the + packages and thus the cflags for all dependencies. + * ``EXPORT_PACKAGES`` - List of pkg-config names which are provided by this + Gir. + * ``CFLAGS`` - Flags to pass in to the parser when scanning headers. + Normally ``INCLUDES`` and ``PACKAGES`` will fetch the cflags for all + dependencies. This is normally used for project specific CFLAGS. + * ``LDFLAGS`` - Linker flags used by the scanner. Normally ``INCLUDES`` and + ``PACKAGES`` will fetch the ldflags for all dependencies. This is normally + used for project-specific LDFLAGS (for instance if you're building several + libraries and typelibs). + +* Optional variables, seldomly used: + + * ``NAMESPACE`` - Namespace of the gir, first letter capital, rest should be + lower case, for instance: 'Gtk', 'Clutter', 'ClutterGtk'. If not present + the namespace will be fetched from the gir filename, the part before the + first dash. For 'Gtk-3.0', namespace will be 'Gtk'. + * ``VERSION`` - Version of the gir, if not present, will be fetched from gir + filename, the part after the first dash. For 'Gtk-3.0', version will be + '3.0'. diff -Nru gobject-introspection-1.56.1/docs/website/buildsystems/index.rst gobject-introspection-1.64.1/docs/website/buildsystems/index.rst --- gobject-introspection-1.56.1/docs/website/buildsystems/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/buildsystems/index.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,10 @@ +======================== +Build System Integration +======================== + +.. toctree:: + :titlesonly: + :maxdepth: 1 + + meson + autotoolsintegration diff -Nru gobject-introspection-1.56.1/docs/website/buildsystems/meson.rst gobject-introspection-1.64.1/docs/website/buildsystems/meson.rst --- gobject-introspection-1.56.1/docs/website/buildsystems/meson.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/buildsystems/meson.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,49 @@ +================= +Meson Integration +================= + +Support for generating GObject introspection data is included in Meson +directly and accessible through the ``gnome.generate_gir()`` function. See +the `meson documentation +`__ for details. + +For some real examples, see the meson build definitions of various GNOME +modules: + +Pango: + https://gitlab.gnome.org/GNOME/pango/blob/master/pango/meson.build + + .. code-block:: python + + pango_gir = gnome.generate_gir( + libpango, + sources: pango_sources + pango_headers + [ pango_enum_h ], + namespace: 'Pango', + nsversion: pango_api_version, + identifier_prefix: 'Pango', + symbol_prefix: 'pango', + export_packages: 'pango', + includes: [ 'GObject-2.0', 'cairo-1.0', ], + header: 'pango/pango.h', + install: true, + extra_args: gir_args, + ) + +json-glib: + https://gitlab.gnome.org/GNOME/json-glib/blob/master/json-glib/meson.build + + .. code-block:: python + + json_glib_gir = gnome.generate_gir( + json_lib, + sources: source_c + source_h + json_glib_enums + [ json_version_h ], + namespace: 'Json', + nsversion: json_api_version, + identifier_prefix: 'Json', + symbol_prefix: 'json', + export_packages: json_api_name, + includes: [ 'GObject-2.0', 'Gio-2.0', ], + header: 'json-glib/json-glib.h', + install: true, + extra_args: gir_args, + ) diff -Nru gobject-introspection-1.56.1/docs/website/build_test.rst gobject-introspection-1.64.1/docs/website/build_test.rst --- gobject-introspection-1.56.1/docs/website/build_test.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/build_test.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,68 @@ +Build & Test +============ + +Clone gobject-introspection with git: + +.. code:: shell + + git clone https://gitlab.gnome.org/GNOME/gobject-introspection.git + cd gobject-introspection + + +Autotools +--------- + +Build: + .. code:: shell + + ./autogen.sh + # To see the build options run "./configure --help" + make + +Test: + .. code:: shell + + make check # run tests + make check.quality # run code quality checks + + +Meson +----- + +Build: + .. code:: shell + + meson _build + cd _build + # To see the build options run "meson configure" + ninja _build + +Test: + .. code:: shell + + meson test # run tests + flake8 .. # run code quality checks + + +Dependencies +------------ + +gobject-introspection depends on a row of other packages, either strictly, +optionally or only for testing. The following installation instructions should +over all cases for some common Distributions. + +Debian/Ubuntu: + .. code:: shell + + sudo apt install pkg-config python3-dev flex bison libglib2.0-dev \ + autoconf-archive libcairo2-dev libffi-dev python3-mako \ + python3-markdown python3-distutils meson build-essential \ + gtk-doc-tools + +Fedora: + .. code:: shell + + sudo dnf install pkg-config flex bison cairo-devel + cairo-gobject-devel autoconf-archive python3-mako gcc automake \ + autoconf python3-markdown meson libffi-devel python3-devel \ + python3 gtk-doc diff -Nru gobject-introspection-1.56.1/docs/website/changelog.rst gobject-introspection-1.64.1/docs/website/changelog.rst --- gobject-introspection-1.56.1/docs/website/changelog.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/changelog.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,11 @@ +Changelog +========= + +Versions with an odd minor version are unstable releases (e.g. 1.57.x) while +versions with even minor version are stable releases (e.g. 1.58.x). This list +is sorted by release date. + +For more details see the GIT log: +https://gitlab.gnome.org/GNOME/gobject-introspection + +.. include:: ../../NEWS diff -Nru gobject-introspection-1.56.1/docs/website/conf.py gobject-introspection-1.64.1/docs/website/conf.py --- gobject-introspection-1.56.1/docs/website/conf.py 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/conf.py 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- + +extensions = [ + 'sphinx.ext.extlinks', +] +source_suffix = '.rst' +master_doc = 'index' +exclude_patterns = ['_build'] + +html_theme = 'sphinx_rtd_theme' +html_show_copyright = False +project = "GObject Introspection" +html_title = project + +html_theme_options = { + "display_version": False, +} + +html_static_path = [ + "extra.css", +] + +html_context = { + 'extra_css_files': [ + '_static/extra.css', + ], +} + +extlinks = { + 'bzbug': ('https://bugzilla.gnome.org/show_bug.cgi?id=%s', 'bz#'), + 'commit': ('https://gitlab.gnome.org/GNOME/gobject-introspection/commit/%s', ''), + 'issue': ('https://gitlab.gnome.org/GNOME/gobject-introspection/issues/%s', '#'), + 'mr': ( + 'https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/%s', '!'), + 'user': ('https://gitlab.gnome.org/%s', ''), +} diff -Nru gobject-introspection-1.56.1/docs/website/extra.css gobject-introspection-1.64.1/docs/website/extra.css --- gobject-introspection-1.56.1/docs/website/extra.css 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/extra.css 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,49 @@ +h1, h2, .rst-content .toctree-wrapper p.caption, h3, h4, h5, h6, legend { + font-family: inherit; +} + +.wy-nav-content a:visited { + color: #3091d1; +} + +.wy-side-nav-search { + background-color: initial; +} + +.wy-nav-side, .wy-nav-top { + background-color: #272525; +} + +.rst-content tt.literal, .rst-content tt.literal, .rst-content code.literal { + color: #272525; +} + +.wy-side-nav-search input[type="text"] { + border-color: transparent; +} + +.wy-nav-content { + margin: initial; +} + +.rst-content div[role=navigation], footer { + font-size: 0.85em; + color: #999; +} + +.rst-content div[role=navigation] hr { + margin-top: 6px; +} + +footer hr { + margin-bottom: 6px; +} + +.rst-footer-buttons { + display: none; +} + +table td, table th { + white-space: normal !important; + line-height: 20px; +} diff -Nru gobject-introspection-1.56.1/docs/website/.gitignore gobject-introspection-1.64.1/docs/website/.gitignore --- gobject-introspection-1.56.1/docs/website/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/.gitignore 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1 @@ +_build diff -Nru gobject-introspection-1.56.1/docs/website/goals.rst gobject-introspection-1.64.1/docs/website/goals.rst --- gobject-introspection-1.56.1/docs/website/goals.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/goals.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,72 @@ +===== +Goals +===== + +The introspection project has two major goals, and a variety of more minor +ones. + + +Two level applications - C and +------------------------------------------------------ + +It makes sense to build many kinds of applications using (at least) two +different levels and languages — one for the low level elements, interfacing +with the OS and/or the hardware; and one for the high level application logic. +C is good for graphics, multimedia, and lower level systems work. However, +writing complex software in C is difficult and error-prone. A managed runtime +such as `JavaScript `__, Python, Perl, +Java, Lua, .NET, Scheme etc. makes a lot of sense for non-fast-path +application logic such as configuration, layout, dialogs, etc. + + +.. note:: + + To achieve this goal you need to write your code using GObject convention. + For more information about that, see the `GObject tutorial + `__ + +Thus, one of the major goals of the GObject introspection project is to be a +convenient bridge between these two worlds, and allow you to choose the right +tool for the job, rather than being limited inside one or the other. With the +introspection project, you can write for example a ClutterActor or GtkWidget +subclass in C, and then without any additional work use that class inside the +high level language of your choice. + + +Sharing binding infrastructure work, and making the platform even more binding-friendly +--------------------------------------------------------------------------------------- + +Historically in GNOME, the core platform has been relatively binding-friendly, +but there are several details not captured in the C+GObject layer that +bindings have needed. For example, reference counting semantics and the item +type inside GList's. Up until now various language bindings such as Python, +Mono, java-gnome etc. had duplicated copies of hand-maintained metadata, and +this led to a situation where bindings tended to lag behind until these manual +fixups were done, or were simply wrong, and your application would crash when +calling a more obscure function. + +The introspection project solves this by putting all of the metadata inside +the GObject library itself, using annotations in the comments. This will lead +to less duplicate work from binding authors, and a more reliable experience +for binding consumers. + +Additionally, because the introspection build process will occur inside the +GObject libraries themselves, a goal is to encourage GObject authors to +consider shaping their APIs to be more binding friendly from the start, rather +than as an afterthought. + + +Additional goals and uses +------------------------- + +* API verification - Sometimes the API of a library in our stack changes by + accident. Usually by a less experienced developer making a change without + realizing it will break applications. Introspecting the available API in + each release of the library and comparing it to the last one makes it easy + to see what changed +* Documentation tools - The tools written inside of the GObjectIntrospection + can easily be reused to improve that problem. Essentially; replacing + gtk-doc. We want to document what we export so it makes sense to glue this + together with API verification mentioned above +* UI Designer infrastructure +* Serialization/RPC/DBus diff -Nru gobject-introspection-1.56.1/docs/website/images/architecture.svg gobject-introspection-1.64.1/docs/website/images/architecture.svg --- gobject-introspection-1.56.1/docs/website/images/architecture.svg 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/images/architecture.svg 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,120 @@ + + + + GObject Introspection Architecture + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + GObject Introspection Architecture + 2012-02-13 + + + Antono Vasiljev + + + + + http://creativecommons.org/licenses/by-sa/3.0/ + + + English + + + GObject + GLib + GTK + Bindings + + + + + http://antono.info/ + + + + + + + + + + + + + foo.c + + libfoo.so + + + Foo.gir + + g-ir-scanner + gcc + + g-ir-compiler + Foo.typelib + bindings + libgirrepository.so + + libffi.so + + + + Deployment + Consumption + Development + + foo.vala + + valac + + + \ No newline at end of file diff -Nru gobject-introspection-1.56.1/docs/website/images/overview.svg gobject-introspection-1.64.1/docs/website/images/overview.svg --- gobject-introspection-1.56.1/docs/website/images/overview.svg 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/images/overview.svg 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,540 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + Introspected GType's + + + Sources .c + + + + Headers .h + + + + + GIR - XML format withintrospectable metadataa language binding needfunction,class,enum,docstrings, struct fieldsetc + g-ir-scanner(1) + g-ir-compiler(1) + + + + + + Typelib - binaryformat for fastdisk-access andlow memory + + Build time + Runtime +   +   + How a language binding uses introspection + How a library enables introspection + + Typelib - mmap()shared betweenprocesses + + + libgirepository + + + + libffi + + + + + dlopen:ed library + + + + diff -Nru gobject-introspection-1.56.1/docs/website/index.rst gobject-introspection-1.64.1/docs/website/index.rst --- gobject-introspection-1.56.1/docs/website/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/index.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,73 @@ +===================== +GObject Introspection +===================== + +.. title:: Overview + +.. toctree:: + :hidden: + :titlesonly: + :maxdepth: 1 + + changelog + goals + architecture + users + build_test + writingbindableapis + buildsystems/index + annotations/index + writingbindings/index + tools/index + +GObject introspection is a middleware layer between C libraries (using +GObject) and language bindings. The C library can be scanned at compile time +and generate metadata files, in addition to the actual native C library. Then +language bindings can read this metadata and automatically provide bindings to +call into the C library. + +.. figure:: images/overview.svg + :width: 85% + :align: center + +The GI project consists of: + +* an XML format called GIR containing introspection information in a machine parseable format +* a Python package to create and parse the GIR format +* a scanner to generate GIR format from C source and headers +* a typelib similar to xpcom/msole which stores the information on disk in a binary format +* a compiler to compile the typelib from a xml format (and vice versa) +* C library to read the typelib, :doc:`writingbindings/libgirepository`. + + +Getting the code +---------------- + +The latest stable release is available from +https://download.gnome.org/sources/gobject-introspection + +GObject Introspection is stored in git and can be fetched: + +.. code-block:: text + + git clone https://gitlab.gnome.org/GNOME/gobject-introspection.git + +You can browse the repository online `here `__. + + +Reporting bugs +-------------- + +For a list of existing bugs and feature requests, see the `issues page +`__. You can also +`open an issue +`__. + + +Contact +------- + +For questions or additional information, please use: + +* Mailing list: gtk-devel-list@gnome.org +* IRC: #introspection on irc.gnome.org diff -Nru gobject-introspection-1.56.1/docs/website/Makefile gobject-introspection-1.64.1/docs/website/Makefile --- gobject-introspection-1.56.1/docs/website/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/Makefile 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,10 @@ +all: _build + +_build: Makefile *.rst images/*.svg */*.rst conf.py ../../NEWS + python3 -m sphinx -b html . _build + +linkcheck: + python3 -m sphinx -b linkcheck -n . _build + +clean: + rm -Rf _build diff -Nru gobject-introspection-1.56.1/docs/website/tools/g-ir-compiler.rst gobject-introspection-1.64.1/docs/website/tools/g-ir-compiler.rst --- gobject-introspection-1.56.1/docs/website/tools/g-ir-compiler.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/tools/g-ir-compiler.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,71 @@ +============= +g-ir-compiler +============= + +---------------- +Typelib compiler +---------------- + +:Manual section: 1 + + +SYNOPSIS +======== + +**g-ir-compiler** [OPTION...] GIRFILE + + +DESCRIPTION +=========== + +g-ir-compiler converts one or more GIR files into one or more typelib. The +output will be written to standard output unless the ``--output`` is +specified. + + +OPTIONS +======= + +--help + Show help options + +--output=FILENAME + Save the resulting output in FILENAME. + +--verbose + Show verbose messages + +--debug + Show debug messages + +--includedir=DIRECTORY + Adds a directory which will be used to find includes inside the GIR format. + +--module=MODULE + FIXME + +--shared-library=FILENAME + Specifies the shared library where the symbols in the typelib can be + found. The name of the library should not contain the ending shared + library suffix. + +--version + Show program's version number and exit + + +BUGS +==== + +Report bugs at https://gitlab.gnome.org/GNOME/gobject-introspection/issues + + +HOMEPAGE and CONTACT +==================== + +http://live.gnome.org/GObjectIntrospection + + +AUTHORS +======= + +Mattias Clasen diff -Nru gobject-introspection-1.56.1/docs/website/tools/g-ir-generate.rst gobject-introspection-1.64.1/docs/website/tools/g-ir-generate.rst --- gobject-introspection-1.56.1/docs/website/tools/g-ir-generate.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/tools/g-ir-generate.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,57 @@ +============= +g-ir-generate +============= + +----------------- +Typelib generator +----------------- + +:Manual section: 1 + + +SYNOPSIS +======== + +**g-ir-generate** [OPTION...] FILES... + + +DESCRIPTION +=========== + +g-ir-generate is an GIR generator, using the repository API. It generates GIR +files from a raw typelib or in a shared library (``--shlib``). The output will +be written to standard output unless the ``--output`` is specified. + + +OPTIONS +======= + +--help + Show help options + +--shlib=FILENAME + The shared library to read the symbols from. + +--output=FILENAME + Save the resulting output in FILENAME. + +--version + Show program's version number and exit + + +BUGS +==== + +Report bugs at https://gitlab.gnome.org/GNOME/gobject-introspection/issues + + +HOMEPAGE and CONTACT +==================== + +http://live.gnome.org/GObjectIntrospection + + +AUTHORS +======= + +Mattias Clasen diff -Nru gobject-introspection-1.56.1/docs/website/tools/g-ir-scanner.rst gobject-introspection-1.64.1/docs/website/tools/g-ir-scanner.rst --- gobject-introspection-1.56.1/docs/website/tools/g-ir-scanner.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/tools/g-ir-scanner.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,175 @@ +============ +g-ir-scanner +============ + +---------------------------------------------- +Extracting C metadata from sources and headers +---------------------------------------------- + +:Manual section: 1 + + +SYNOPSIS +======== + +**g-ir-scanner** [OPTION...] FILES... + + +DESCRIPTION +=========== + +g-ir-scanner is a tool which generates GIR XML files by parsing headers and +introspecting GObject based libraries. It is usually invoked during the normal +build step for a project and the information is saved to disk and later +installed, so that language bindings and other applications can use it. Header +files and source files are passed in as arguments on the command line. The +suffix determines whether a file be treated as a source file (.c) or a header +file (.h). Currently only C based libraries are supported by the scanner. + + +OPTIONS +======= + +--help + Show help options + +--quiet + If passed, do not print details of normal operation. + +--warn-all + Display warnings for public API which is not introspectable. + +--warn-error + Make warnings be fatal errors. + +--format=FORMAT + This parameters decides which the resulting format will be used. The + default value is gir. + +--include=NAME + Add the specified introspection dependency to the scanned namespace. + NAME is of the form NAMESPACE-VERSION, like Gtk-3.0. + +--include-uninstalled=PATH + Add the specified introspection dependency to the scanned namespace. + This differs from ``--include`` in that it takes a file path, and does not + process the pkg-config dependencies (since they may not be installed yet). + +--add-include-path=PATH + Add a directory to the path which the scanner uses to find GIR files. Can + be used multiple times to specify multiple directories + +-i, --library=LIBRARY + Specifies a library that will be introspected. This means that the + \*_get_type() functions in it will be called for GObject data types. The + name of the library should not contain the leading lib prefix nor the + ending shared library suffix. + +-L, --library-path=PATH + Include this directory when searching for a library. This option can be + specified multiple times to include more than one directory to look for + libraries in. + +-Idirectory + Include this directory in the list of directories to be searched for + header files. You need to pass to the scanner all the directories you'd + normally pass to the compiler when using the specified source files. + +--c-include=C_INCLUDES + Headers which should be included in C programs. This option can be + specified multiple times to include more than one header. + +-n, --namespace=NAME + The namespace name. This name should be capitalized, eg the first letter + should be upper case. Examples: Gtk, Clutter, WebKit. + +--no-libtool + Disable usage of libtool for compiling stub introspection binary. Use this + if your build system does not require libtool. + +--libtool + Full path to libtool executable. Typically used for Automake systems. + +--nsversion=VERSION + The namespace version. For instance 1.0. This is usually the platform + version, eg 2.0 for Gtk+, not 2.12.7. + +-p, --program=PROGRAM + Specifies a binary that will be introspected. This means that the + \*_get_type() functions in it will be called for GObject data types. The + binary must be modified to take a ``--introspect-dump=`` option, and to pass + the argument to this function to g_irepository_dump. + +--program-arg=ARG + Additional argument to pass to program for introspection. + +--identifier-prefix=PREFIX + This option may be specified multiple times. Each one gives a prefix that + will be stripped from all C identifiers. If none specified, the namespace + will be used. Eg, an identifier prefix of Foo will export the identifier + typdef struct _FooBar FooBar; as Foo.Bar. + +--symbol-prefix=PREFIX + This option may be specified multiple times. Each one gives a + prefix that will be stripped from all C symbols. Eg, an symbol + prefix of foo will export the symbol foo_bar_do_something as + Foo.Bar.do_something. + +--accept-unprefixed + If specified, the scanner will accept identifiers and symbols which do not + match the namespace prefix. Try to avoid using this if possible. + +--output=FILENAME + Name of the file to output. Normally namespace + format extension. Eg, + GLib-2.0.gir. + +--pkg=PACKAGE + List of pkg-config packages to get compiler and linker flags from. This + option can be specified multiple times to include flags from several + pkg-config packages. + +--pkg-export=PACKAGE + List of pkg-config packages that are provided by the generated gir. This + option can be specified multiple times if the gir provides more packages. + If not specified, the packages specified with ``--pkg=`` will be used. + +--verbose + Be verbose, include some debugging information. + + +ENVIRONMENT VARIABLES +===================== + +The g-ir-scanner uses the ``XDG_DATA_DIRS`` variable to check for dirs, the +girs are located in ``XDG_DATA_DIRS/gir-1.0``. It is normally set on a +distribution so you shouldn't need to set it yourself. + +The variable ``GI_SCANNER_DISABLE_CACHE`` ensures that the scanner will not +write cache data to ``$HOME``. + +The variable ``GI_SCANNER_DEBUG`` can be used to debug issues in the +build-system that involve g-ir-scanner. When it is set to ``save-temps``, then +g-ir-scanner will not remove temporary files and directories after it +terminates. + +The variable ``GI_HOST_OS`` can be used to control the OS name on the host +that runs the scanner. It has the same semantics as the Python ``os.name`` +property. + + +BUGS +==== + +Report bugs at https://gitlab.gnome.org/GNOME/gobject-introspection/issues + + +HOMEPAGE and CONTACT +==================== + +http://live.gnome.org/GObjectIntrospection + + +AUTHORS +======= + +Johan Dahlin diff -Nru gobject-introspection-1.56.1/docs/website/tools/index.rst gobject-introspection-1.64.1/docs/website/tools/index.rst --- gobject-introspection-1.56.1/docs/website/tools/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/tools/index.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,21 @@ +================== +Command Line Tools +================== + +.. toctree:: + :hidden: + :titlesonly: + :maxdepth: 1 + + g-ir-compiler + g-ir-generate + g-ir-scanner + +:doc:`g-ir-compiler` + Typelib compiler + +:doc:`g-ir-generate` + Typelib generator + +:doc:`g-ir-scanner` + Extracting C metadata from sources and headers diff -Nru gobject-introspection-1.56.1/docs/website/tools/Makefile gobject-introspection-1.64.1/docs/website/tools/Makefile --- gobject-introspection-1.56.1/docs/website/tools/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/tools/Makefile 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,11 @@ +# update man pages + +all: ../../g-ir-compiler.1 ../../g-ir-generate.1 ../../g-ir-scanner.1 + +../../%.1:%.rst + rst2man $< > $@ + +.PHONY: clean + +clean: + rm -f ../../g-ir-compiler.1 ../../g-ir-generate.1 ../../g-ir-scanner.1 diff -Nru gobject-introspection-1.56.1/docs/website/users.rst gobject-introspection-1.64.1/docs/website/users.rst --- gobject-introspection-1.56.1/docs/website/users.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/users.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,55 @@ +===== +Users +===== + +Bindings based on GObject-Introspection +--------------------------------------- + +* `Vala `__ - Compiler for the GObject type system (compile time) +* `Genie `__ - Genie Language (compile time) +* `PyGObject `__ - Python bindings (runtime) +* `pygir-ctypes `__ - Pure Python GObject Introspection Repository (GIR) wrapper using ctypes (runtime) +* `pgi `__ - Pure Python GObject Introspection Bindings (runtime) +* `GTK2-Perl/Introspection `__ - Perl bindings (runtime) +* `JGIR `__ - Java/JVM bindings (compile time, using typelib) +* `GJS `__ - Javascript (spidermonkey) bindings (runtime) +* `Seed `__ - Javascript (JSCore, WebKit JS engine) bindings (runtime) +* `sbank `__ - Scheme binding for gobject-introspection (runtime) +* `GObjectIntrospection/GObjectConsume `__ - Qt bindings (compile time) +* `GirFFI `__ - Ruby bindings (runtime) +* `Ruby-GNOME `__ - Ruby bindings (runtime) +* `lgob `__ - Lua bindings (compile time?) +* `guile-gir `__ - Guile bindings (runtime) +* `factor-gir `__ - Factor bindings (runtime) +* `lgi `__ - Lua bindings (runtime) +* `GObject for PHP `__ +* `cl-gir `__ GIR for Common Lisp (work in progress) +* `GNU Smalltalk `__ - A branch of GNU Smalltalk which adds GObject Introspection bindings. +* `node-gir `__ - Node.js bindings to the girepository +* `go-gir-generator `__ - Go bindings (compile time) (Forked from `gogobject `__ which is unmaintained) +* `haskell-gi `__ - a Haskell binding for the GIRepository C library, and a Haskell code generator built upon it. It is very much a work in progress. +* `cl-gobject-introspection `__ - A bridge between Common Lisp and GObject. +* `ocaml-gir `__ - An automatic binding generator for gtk-related libraries +* `gir2pascal `__ - gir2pascal is a program to convert gir files into into pascal files +* `PLGI `__ - Prolog bindings (runtime) +* `hbgi `__ - Harbour bindings for GObject Introspection (runtime) +* `cppgir `__ - C++ bindings (compile time, using typelib) + +Projects using GObject Introspection +------------------------------------ + + * `Folks `__ - the Gnome contact aggregator + * `GnomeShell `__ - prototyping the future gnome shell + * `Midgard2 `__ - language bindings to the Midgard content repository + * `libpeas `__ - library providing a generic plugin framework + * `telepathy-glib `__ - GLib bindings for Telepathy + * `gir2xmi `__ - UML model generator for GObject-Introspection Gir files. + * `playerctl `__ - a library and cli for controlling media players that implement the MPRIS DBus interface + * `i3ipc-glib `__ - a library for extensions to the i3 window manager + * `gabi `__ - a C/typelib ABI cross-validator + +Projects that could use GObject-Introspection +--------------------------------------------- + + * `Mono GAPI `__ could replace its gapi2-parser by using GOject-Introspection. + * `gtkmm `__ could use GObject-Introspection in its `gmmproc `__ to generate C++ library bindings diff -Nru gobject-introspection-1.56.1/docs/website/writingbindableapis.rst gobject-introspection-1.64.1/docs/website/writingbindableapis.rst --- gobject-introspection-1.56.1/docs/website/writingbindableapis.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/writingbindableapis.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,163 @@ +===================== +Writing Bindable APIs +===================== + +Things to avoid +--------------- + +Structures with custom memory management +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Avoid creating C structures with custom memory management unless they are +registered as a `boxed type +`__. +If you don't register them as a boxed type bindings will fall back to +simple memory copying, which might not be what you want. + +Also consider using a full `GObject +`__ +as that allows bindings to better integrate those objects with the binding +language, like for example preserve user defined state across language +boundaries. + +Example to avoid: + +.. code-block:: c + + struct _GstMiniObject { + GTypeInstance instance; + /*< public >*/ /* with COW */ + gint refcount; + guint flags; + + +Functionality only accessible through a C macro +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The scanner does not support C macros as API. Solution - add a function +accessor rather than a macro. This also has the side effect of making +debugging in C code easier. + +Example: + +.. code-block:: c + + #define GTK_WIDGET_FLAGS(wid) (GTK_OBJECT_FLAGS (wid)) + + GtkWidgetFlags gtk_widget_get_flags (GtkWidget *widget); /* Actually, see http://bugzilla.gnome.org/show_bug.cgi?id=69872 */ + + +Direct C structure access for objects +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Having GObjects also have fields can be difficult to bind. Create accessor +functions. + +Example: + +.. code-block:: c + + struct _SoupMessage { + GObject parent; + + /*< public >*/ + const char *method; + + guint status_code; + ... + } + + const char * soup_message_get_method (SoupMessage *message); /* Or use a GObject property */ + + +va_list +~~~~~~~ + +Using varargs can be convenient for C, but they are difficult to bind. +Solution: Keep the C function for the convenience of C programmers, but add an +another function which takes an array (either zero terminated or with a length +parameter). + +**Good** example: + +.. code-block:: c + + GtkListStore *gtk_list_store_new (gint n_columns, + ...); + GtkListStore *gtk_list_store_newv (gint n_columns, + GType *types); + +You can also expose the array variant under the name of the varargs variant +using the ``rename-to`` annotation: +``gtk_list_store_newv: (rename-to gtk_list_store_new)`` + + +Multiple out parameters +~~~~~~~~~~~~~~~~~~~~~~~ + +Multiple out parameters are supported by introspection, but not all languages +have an obvious mapping for multiple out values. A boxed structure could serve +as an alternative. + +Example to think about (here, there could be a boxed ``struct GtkCoordinate { +gint x; gint y; }`` structure). + +.. code-block:: c + + void gtk_widget_get_pointer (GtkWidget *widget, + gint *x, + gint *y); + + +Arrays +~~~~~~ + +For reference types, zero-terminated arrays are the easiest to work with. +Arrays of primitive type such as "int" will require length metadata. + + +Callbacks +~~~~~~~~~ + +Callbacks are hard to support for introspection bindings because of their +complex life-cycle. Try to avoid having more than one callback in the same +function, and consider using GClosure when you need more. + + +Using a different name for error domain quarks from the enum name +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Error domain quarks should always be named in the form +__error_quark() for an error enum called +Error. Example to avoid: + +.. code-block:: c + + typedef enum FooBarError { + FOO_BAR_ERROR_MOO, + FOO_BAR_ERROR_BLEAT + }; + + GQuark foo_bar_errors_quark(); + + +Custom code in constructors +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Creating an object via ``foo_bar_new()`` shouldn't execute any code +differently than creating the same object via ``g_object_new()``, since many +bindings (and also GtkBuilder/Glade) create objects using ``g_object_new()``. +That is, don't do this: + +.. code-block:: c + + FooBar * + foo_bar_new (void) + { + FooBar *retval = FOO_BAR (g_object_new (FOO_TYPE_BAR, NULL)); + retval->priv->some_variable = 5; /* Don't do this! */ + return retval; + } + +Instead, put initialization code in the ``foo_bar_init()`` function or the +``foo_bar_constructed()`` virtual function. diff -Nru gobject-introspection-1.56.1/docs/website/writingbindings/guidelines.rst gobject-introspection-1.64.1/docs/website/writingbindings/guidelines.rst --- gobject-introspection-1.56.1/docs/website/writingbindings/guidelines.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/writingbindings/guidelines.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,45 @@ +========== +Guidelines +========== + +This page is intended as a guide describing the process of writing a language +binding for the GObject Introspection framework. + +* Decide if you want to make a language binding which is implementation + agnostic or implementation specific. Some languages such as Python have + libraries which are available across implementations. The Python module + ``ctypes`` is a binding for the libffi language binding, which is + implemented in a couple of different Python implementations. It's usually + easier to target a specific interpreter or compiler implementation so if you + unsure, write a specific one. + +* For interpreted language implementations, construct the language binding on + top of the :doc:`libgirepository` library instead of writing a code generator. + It'll make it easier for developers to use your language binding as they + will be able to read the typelibs in runtime without having an extra + intermediate step to generate the language specific metadata. The + libgirepository library can also be used for bindings based upon code + generators as an optimization, its a lot faster to read metadata from the + typelib than it is to extract the metadata from the GIR XML files. + +* Use the Everything library in your unittests, aim at testing all functions + there. Do testing as early as possible in the development of the binding, as + the code is likely to be more complex than you anticipate. + +* Use the same coding style as your language. If libraries for your language + normally uses underscores do that as well. For instance, Java bindings + should have a method on it's GtkButton wrapper called ``setLabel`` and not + ``set_label``. + +* If there are existing GObject bindings, reuse them for improved + compatibility. It's a nice feature being able to use static bindings and + introspected bindings together. The Perl & Python bindings does that. + +* Try to stay close to the C language semantics, for instance + GObject should be mapped to a class and gtk_button_set_label to a method of + that class: + + * java: ``button.setLabel("foo")`` + * javascript/python/vala: ``button.set_label("foo")`` + * perl: ``$button->set_label("foo")`` + * scheme: ``(send button (set-label "foo"))`` diff -Nru gobject-introspection-1.56.1/docs/website/writingbindings/index.rst gobject-introspection-1.64.1/docs/website/writingbindings/index.rst --- gobject-introspection-1.56.1/docs/website/writingbindings/index.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/writingbindings/index.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,10 @@ +================ +Writing Bindings +================ + +.. toctree:: + :titlesonly: + :maxdepth: 1 + + guidelines + libgirepository diff -Nru gobject-introspection-1.56.1/docs/website/writingbindings/libgirepository.rst gobject-introspection-1.64.1/docs/website/writingbindings/libgirepository.rst --- gobject-introspection-1.56.1/docs/website/writingbindings/libgirepository.rst 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/docs/website/writingbindings/libgirepository.rst 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,16 @@ +=============== +libgirepository +=============== + +libgirepository is a C library which provides a C API for accessing the +typelib data and for interacting with the corresponding GObject based +libraries. + +For more information about libgirepository see the `API documentation +`__. + +The following example shows how to call the ``g_assertion_message()`` function +from libglib-2.0: + +.. literalinclude:: ../../../examples/girepository/glib-print.c + :language: c diff -Nru gobject-introspection-1.56.1/examples/girepository/glib-print.c gobject-introspection-1.64.1/examples/girepository/glib-print.c --- gobject-introspection-1.56.1/examples/girepository/glib-print.c 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/examples/girepository/glib-print.c 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,48 @@ +#include + +int +main (void) +{ + GIRepository *repository; + GError *error = NULL; + GIBaseInfo *base_info; + GIArgument in_args[5]; + GIArgument retval; + + repository = g_irepository_get_default (); + g_irepository_require (repository, "GLib", "2.0", 0, &error); + if (error) + { + g_error ("ERROR: %s\n", error->message); + return 1; + } + + base_info = g_irepository_find_by_name (repository, "GLib", "assertion_message"); + if (!base_info) + { + g_error ("ERROR: %s\n", "Could not find GLib.warn_message"); + return 1; + } + + in_args[0].v_pointer = (gpointer)"domain"; + in_args[1].v_pointer = (gpointer)"glib-print.c"; + in_args[2].v_int = 42; + in_args[3].v_pointer = (gpointer)"main"; + in_args[4].v_pointer = (gpointer)"hello world"; + + if (!g_function_info_invoke ((GIFunctionInfo *) base_info, + (const GIArgument *) &in_args, + 5, + NULL, + 0, + &retval, + &error)) + { + g_error ("ERROR: %s\n", error->message); + return 1; + } + + g_base_info_unref (base_info); + + return 0; +} diff -Nru gobject-introspection-1.56.1/examples/girepository/meson.build gobject-introspection-1.64.1/examples/girepository/meson.build --- gobject-introspection-1.56.1/examples/girepository/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/examples/girepository/meson.build 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,7 @@ +project('girepository-sample', 'c') + +girepo_dep = dependency('gobject-introspection-1.0') + +executable('glib-print', 'glib-print.c', + dependencies: girepo_dep, +) diff -Nru gobject-introspection-1.56.1/examples/glib-print.c gobject-introspection-1.64.1/examples/glib-print.c --- gobject-introspection-1.56.1/examples/glib-print.c 2018-03-10 20:26:54.000000000 +0000 +++ gobject-introspection-1.64.1/examples/glib-print.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -#include - -int -main (void) -{ - GIRepository *repository; - GError *error = NULL; - GIBaseInfo *base_info; - GIArgument in_args[5]; - GIArgument retval; - - repository = g_irepository_get_default (); - g_irepository_require (repository, "GLib", "2.0", 0, &error); - if (error) - { - g_error ("ERROR: %s\n", error->message); - return 1; - } - - base_info = g_irepository_find_by_name (repository, "GLib", "assertion_message"); - if (!base_info) - { - g_error ("ERROR: %s\n", "Could not find GLib.warn_message"); - return 1; - } - - in_args[0].v_pointer = "domain"; - in_args[1].v_pointer = "glib-print.c"; - in_args[2].v_int = 42; - in_args[3].v_pointer = "main"; - in_args[4].v_pointer = "hello world"; - - if (!g_function_info_invoke ((GIFunctionInfo *) base_info, - (const GIArgument *) &in_args, - 5, - NULL, - 0, - &retval, - &error)) - { - g_error ("ERROR: %s\n", error->message); - return 1; - } - - g_base_info_unref (base_info); - - return 0; -} diff -Nru gobject-introspection-1.56.1/examples/library/autogen.sh gobject-introspection-1.64.1/examples/library/autogen.sh --- gobject-introspection-1.56.1/examples/library/autogen.sh 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/examples/library/autogen.sh 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,38 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. +test -n "$srcdir" || srcdir=$(dirname "$0") +test -n "$srcdir" || srcdir=. + +olddir=$(pwd) + +cd $srcdir + +(test -f configure.ac) || { + echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***" + exit 1 +} + +# shellcheck disable=SC2016 +PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac) + +if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then + echo "*** WARNING: I am going to run 'configure' with no arguments." >&2 + echo "*** If you wish to pass any to it, please specify them on the" >&2 + echo "*** '$0' command line." >&2 + echo "" >&2 +fi + +autoreconf --verbose --force --install || exit 1 + +cd "$olddir" +if [ "$NOCONFIGURE" = "" ]; then + $srcdir/configure "$@" || exit 1 + + if [ "$1" = "--help" ]; then + exit 0 + else + echo "Now type 'make' to compile $PKG_NAME" || exit 1 + fi +else + echo "Skipping configure process." +fi diff -Nru gobject-introspection-1.56.1/examples/library/configure.ac gobject-introspection-1.64.1/examples/library/configure.ac --- gobject-introspection-1.56.1/examples/library/configure.ac 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/examples/library/configure.ac 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,14 @@ +AC_PREREQ([2.63]) +AC_INIT([gi-sample-autotools], [0.0.1]) + +AM_INIT_AUTOMAKE([1.11 no-define foreign]) +AM_SILENT_RULES([yes]) + +LT_PREREQ([2.2]) +LT_INIT([disable-static]) + +PKG_CHECK_MODULES(GISAMPLE, [gobject-2.0]) +GOBJECT_INTROSPECTION_CHECK([1.30.0]) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff -Nru gobject-introspection-1.56.1/examples/library/gi-sample.c gobject-introspection-1.64.1/examples/library/gi-sample.c --- gobject-introspection-1.56.1/examples/library/gi-sample.c 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/examples/library/gi-sample.c 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,117 @@ +#include "gi-sample.h" + +struct _GISampleThing +{ + GObject parent_instance; + + gchar *msg; +}; + +G_DEFINE_TYPE (GISampleThing, gi_sample_thing, G_TYPE_OBJECT) + +enum { + PROP_0, + PROP_MSG, + LAST_PROP +}; + +static GParamSpec *gParamSpecs [LAST_PROP]; + +/** + * gi_sample_thing_new: + * + * Allocates a new #GISampleThing. + * + * Returns: (transfer full): a #GISampleThing. + */ +GISampleThing * +gi_sample_thing_new (void) +{ + return g_object_new (GI_TYPE_SAMPLE_THING, NULL); +} + +static void +gi_sample_thing_finalize (GObject *object) +{ + GISampleThing *self = (GISampleThing *)object; + + g_clear_pointer (&self->msg, g_free); + + G_OBJECT_CLASS (gi_sample_thing_parent_class)->finalize (object); +} + +static void +gi_sample_thing_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + GISampleThing *self = GI_SAMPLE_THING (object); + + switch (prop_id) + { + case PROP_MSG: + g_value_set_string (value, self->msg); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +gi_sample_thing_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + GISampleThing *self = GI_SAMPLE_THING (object); + + switch (prop_id) + { + case PROP_MSG: + self->msg = g_value_dup_string (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +gi_sample_thing_class_init (GISampleThingClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = gi_sample_thing_finalize; + object_class->get_property = gi_sample_thing_get_property; + object_class->set_property = gi_sample_thing_set_property; + + gParamSpecs [PROP_MSG] = + g_param_spec_string ("message", + "Message", + "The message to print.", + NULL, + (G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS)); + + g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs); +} + +static void +gi_sample_thing_init (GISampleThing *self) +{ +} + +/** + * gi_sample_thing_print_message: + * @self: a #GISampleThing. + * + * Prints the message. + */ +void +gi_sample_thing_print_message (GISampleThing *self) +{ + g_return_if_fail (GI_IS_SAMPLE_THING (self)); + + g_print ("Message: %s\n", self->msg); +} diff -Nru gobject-introspection-1.56.1/examples/library/gi-sample.h gobject-introspection-1.64.1/examples/library/gi-sample.h --- gobject-introspection-1.56.1/examples/library/gi-sample.h 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/examples/library/gi-sample.h 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,17 @@ +#ifndef GI_SAMPLE_H +#define GI_SAMPLE_H + +#include + +G_BEGIN_DECLS + +#define GI_TYPE_SAMPLE_THING (gi_sample_thing_get_type()) + +G_DECLARE_FINAL_TYPE (GISampleThing, gi_sample_thing, GI, SAMPLE_THING, GObject) + +GISampleThing *gi_sample_thing_new (void); +void gi_sample_thing_print_message (GISampleThing *self); + +G_END_DECLS + +#endif /* GI_SAMPLE_H */ diff -Nru gobject-introspection-1.56.1/examples/library/Makefile.am gobject-introspection-1.64.1/examples/library/Makefile.am --- gobject-introspection-1.56.1/examples/library/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/examples/library/Makefile.am 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,40 @@ +source_h = \ + gi-sample.h \ + $(NULL) + +source_c = \ + gi-sample.c \ + $(NULL) + +lib_LTLIBRARIES = +lib_LTLIBRARIES += libgi-sample.la + +libgi_sample_la_CFLAGS = $(GISAMPLE_CFLAGS) +libgi_sample_la_LIBADD = $(GISAMPLE_LIBS) +libgi_sample_la_SOURCES = $(source_c) $(source_h) +libgi_sample_la_LDFLAGS = -export-dynamic + +-include $(INTROSPECTION_MAKEFILE) + +DISTCHECK_CONFIGURE_FLAGS = --enable-introspection + +INTROSPECTION_GIRS = GISample-1.0.gir + +GISample-1.0.gir: libgi-sample.la + +GISample_1_0_gir_NAMESPACE = GISample +GISample_1_0_gir_VERSION = 1.0 +GISample_1_0_gir_LIBS = libgi-sample.la +GISample_1_0_gir_FILES = $(source_c) $(source_h) +GISample_1_0_gir_CFLAGS = -I$(top_srcdir) -I$(top_builddir) $(GISAMPLE_CFLAGS) +GISample_1_0_gir_INCLUDES = GObject-2.0 +GISample_1_0_gir_SCANNERFLAGS = --warn-all --symbol-prefix=gi_sample + +girdir = $(datadir)/gir-1.0 +dist_gir_DATA = GISample-1.0.gir + +typelibsdir = $(libdir)/girepository-1.0/ +typelibs_DATA = GISample-1.0.typelib + +CLEANFILES = +CLEANFILES += $(dist_gir_DATA) $(typelibs_DATA) diff -Nru gobject-introspection-1.56.1/examples/library/meson.build gobject-introspection-1.64.1/examples/library/meson.build --- gobject-introspection-1.56.1/examples/library/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/examples/library/meson.build 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,24 @@ +project('gi-sample-meson', 'c') + +libsources = ['gi-sample.c', 'gi-sample.h'] + +gnome = import('gnome') +gobj_dep = dependency('gobject-2.0') + +girlib = shared_library( + 'gi-sample', + sources : libsources, + dependencies : [gobj_dep], + install : true +) + +gnome.generate_gir( + girlib, + sources : libsources, + nsversion : '1.0', + namespace : 'GISample', + symbol_prefix : 'gi_sample', + identifier_prefix : 'GISample', + includes : ['GObject-2.0'], + install : true, +) diff -Nru gobject-introspection-1.56.1/.flake8 gobject-introspection-1.64.1/.flake8 --- gobject-introspection-1.56.1/.flake8 1970-01-01 00:00:00.000000000 +0000 +++ gobject-introspection-1.64.1/.flake8 2020-04-05 14:08:04.682724700 +0000 @@ -0,0 +1,4 @@ +[flake8] +ignore=E127,E402,E501,E731,E128,W503,E741,W504 +exclude=misc,subprojects +builtins=DATADIR,GIRDIR diff -Nru gobject-introspection-1.56.1/gir/cairo-1.0.gir.in gobject-introspection-1.64.1/gir/cairo-1.0.gir.in --- gobject-introspection-1.56.1/gir/cairo-1.0.gir.in 2018-04-09 06:09:02.000000000 +0000 +++ gobject-introspection-1.64.1/gir/cairo-1.0.gir.in 2020-04-05 14:08:04.686724700 +0000 @@ -3,9 +3,10 @@ xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0"> - + + + + + + + + + + + + + + + + diff -Nru gobject-introspection-1.56.1/gir/gio-2.0.c gobject-introspection-1.64.1/gir/gio-2.0.c --- gobject-introspection-1.56.1/gir/gio-2.0.c 2018-04-09 06:09:02.000000000 +0000 +++ gobject-introspection-1.64.1/gir/gio-2.0.c 2020-04-05 14:08:04.690724800 +0000 @@ -353,6 +353,21 @@ /** + * GApplication::name-lost: + * @application: the application + * + * The ::name-lost signal is emitted only on the registered primary instance + * when a new instance has taken over. This can only happen if the application + * is using the %G_APPLICATION_ALLOW_REPLACEMENT flag. + * + * The default handler for this signal calls g_application_quit(). + * + * Returns: %TRUE if the signal has been handled + * Since: 2.60 + */ + + +/** * GApplication::open: * @application: the application * @files: (array length=n_files) (element-type GFile): an array of #GFiles @@ -429,10 +444,11 @@ * If this function returns %TRUE, registration will proceed; otherwise * registration will abort. Since: 2.34 * @dbus_unregister: invoked locally during unregistration, if the application - * is using its D-Bus backend. Use this to undo anything done by the - * @dbus_register vfunc. Since: 2.34 + * is using its D-Bus backend. Use this to undo anything done by + * the @dbus_register vfunc. Since: 2.34 * @handle_local_options: invoked locally after the parsing of the commandline * options has occurred. Since: 2.40 + * @name_lost: invoked when another instance is taking over the name. Since: 2.60 * * Virtual function table for #GApplication. * @@ -973,7 +989,7 @@ * @manager: The #GDBusObjectManagerClient emitting the signal. * @object_proxy: The #GDBusObjectProxy on which an interface has properties that are changing. * @interface_proxy: The #GDBusProxy that has properties that are changing. - * @changed_properties: A #GVariant containing the properties that changed. + * @changed_properties: A #GVariant containing the properties that changed (type: `a{sv}`). * @invalidated_properties: (array zero-terminated=1) (element-type utf8): A %NULL terminated * array of properties that were invalidated. * @@ -1170,7 +1186,7 @@ /** * GDBusProxy::g-properties-changed: * @proxy: The #GDBusProxy emitting the signal. - * @changed_properties: A #GVariant containing the properties that changed + * @changed_properties: A #GVariant containing the properties that changed (type: `a{sv}`) * @invalidated_properties: A %NULL terminated array of properties that was invalidated * * Emitted when one or more D-Bus properties on @proxy changes. The @@ -1470,6 +1486,9 @@ * * #GDesktopAppInfoLookup is an opaque data structure and can only be accessed * using the following functions. + * + * Deprecated: 2.28: The #GDesktopAppInfoLookup interface is deprecated and + * unused by GIO. */ @@ -1612,8 +1631,8 @@ * let the user decide whether or not to accept the certificate, you * would have to return %FALSE from the signal handler on the first * attempt, and then after the connection attempt returns a - * %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if - * the user decides to accept the certificate, remember that fact, + * %G_TLS_ERROR_BAD_CERTIFICATE, you can interact with the user, and + * if the user decides to accept the certificate, remember that fact, * create a new connection, and return %TRUE from the signal handler * the next time. * @@ -1630,6 +1649,17 @@ /** + * GDtlsConnection:advertised-protocols: + * + * The list of application-layer protocols that the connection + * advertises that it is willing to speak. See + * g_dtls_connection_set_advertised_protocols(). + * + * Since: 2.60 + */ + + +/** * GDtlsConnection:base-socket: * * The #GDatagramBased that the connection wraps. Note that this may be any @@ -1672,6 +1702,16 @@ /** + * GDtlsConnection:negotiated-protocol: + * + * The application-layer protocol negotiated during the TLS + * handshake. See g_dtls_connection_get_negotiated_protocol(). + * + * Since: 2.60 + */ + + +/** * GDtlsConnection:peer-certificate: * * The connection's peer's certificate, after the TLS handshake has @@ -1707,6 +1747,7 @@ * g_dtls_connection_set_rehandshake_mode(). * * Since: 2.48 + * Deprecated: 2.60: The rehandshake mode is ignored. */ @@ -1956,6 +1997,45 @@ /** + * GKeyfileSettingsBackend:default-dir: + * + * The directory where the system defaults and locks are located. + * + * Defaults to `/etc/glib-2.0/settings`. + */ + + +/** + * GKeyfileSettingsBackend:filename: + * + * The location where the settings are stored on disk. + * + * Defaults to `$XDG_CONFIG_HOME/glib-2.0/settings/keyfile`. + */ + + +/** + * GKeyfileSettingsBackend:root-group: + * + * If @root_group is non-%NULL then it specifies the name of the keyfile + * group used for keys that are written directly below the root path. + * + * Defaults to NULL. + */ + + +/** + * GKeyfileSettingsBackend:root-path: + * + * All settings read to or written from the backend must fall under the + * path given in @root_path (which must start and end with a slash and + * not contain two consecutive slashes). @root_path may be "/". + * + * Defaults to "/". + */ + + +/** * GListModel: * * #GListModel is an opaque data structure and can only be accessed @@ -1970,9 +2050,12 @@ * @removed: the number of items removed * @added: the number of items added * - * This signal is emitted whenever items were added or removed to - * @list. At @position, @removed items were removed and @added items - * were added in their place. + * This signal is emitted whenever items were added to or removed + * from @list. At @position, @removed items were removed and @added + * items were added in their place. + * + * Note: If @removed != @added, the positions of all later items + * in the model change. * * Since: 2.44 */ @@ -2026,6 +2109,42 @@ /** + * GMemoryMonitor: + * + * #GMemoryMonitor monitors system memory and indicates when + * the system is low on memory. + * + * Since: 2.64 + */ + + +/** + * GMemoryMonitor::low-memory-warning: + * @monitor: a #GMemoryMonitor + * @level: the #GMemoryMonitorWarningLevel warning level + * + * Emitted when the system is running low on free memory. The signal + * handler should then take the appropriate action depending on the + * warning level. See the #GMemoryMonitorWarningLevel documentation for + * details. + * + * Since: 2.64 + */ + + +/** + * GMemoryMonitorInterface: + * @g_iface: The parent interface. + * @low_memory_warning: the virtual function pointer for the + * #GMemoryMonitor::low-memory-warning signal. + * + * The virtual function table for #GMemoryMonitor. + * + * Since: 2.64 + */ + + +/** * GMemoryOutputStream:data: * * Pointer to buffer where data will be written. @@ -2315,6 +2434,29 @@ /** + * GMountOperation:is-tcrypt-hidden-volume: + * + * Whether the device to be unlocked is a TCRYPT hidden volume. + * See [the VeraCrypt documentation](https://www.veracrypt.fr/en/Hidden%20Volume.html). + * + * Since: 2.58 + */ + + +/** + * GMountOperation:is-tcrypt-system-volume: + * + * Whether the device to be unlocked is a TCRYPT system volume. + * In this context, a system volume is a volume with a bootloader + * and operating system installed. This is only supported for Windows + * operating systems. For further documentation, see + * [the VeraCrypt documentation](https://www.veracrypt.fr/en/System%20Encryption.html). + * + * Since: 2.58 + */ + + +/** * GMountOperation:password: * * The password that is used for authentication when carrying out @@ -2330,6 +2472,16 @@ /** + * GMountOperation:pim: + * + * The VeraCrypt PIM value, when unlocking a VeraCrypt volume. See + * [the VeraCrypt documentation](https://www.veracrypt.fr/en/Personal%20Iterations%20Multiplier%20(PIM).html). + * + * Since: 2.58 + */ + + +/** * GMountOperation:username: * * The user name that is used for authentication when carrying out @@ -2340,7 +2492,7 @@ /** * GNativeSocketAddress: * - * An socket address, corresponding to a general struct + * A socket address, corresponding to a general struct * sockadd address of a type not otherwise handled by glib. */ @@ -2471,13 +2623,6 @@ /** - * GOsxAppInfo: - * - * Information about an installed application from a NSBundle. - */ - - -/** * GPermission: * * #GPermission is an opaque data structure and can only be accessed @@ -2918,12 +3063,14 @@ /** * GSimpleAction::activate: * @simple: the #GSimpleAction - * @parameter: (nullable): the parameter to the activation + * @parameter: (nullable): the parameter to the activation, or %NULL if it has + * no parameter * * Indicates that the action was just activated. * - * @parameter will always be of the expected type. In the event that - * an incorrect type was given, no signal will be emitted. + * @parameter will always be of the expected type, i.e. the parameter type + * specified when the action was created. If an incorrect type is given when + * activating the action, this signal is not emitted. * * Since GLib 2.40, if no handler is connected to this signal then the * default behaviour for boolean-stated actions with a %NULL parameter @@ -2945,8 +3092,10 @@ * Indicates that the action just received a request to change its * state. * - * @value will always be of the correct state type. In the event that - * an incorrect type was given, no signal will be emitted. + * @value will always be of the correct state type, i.e. the type of the + * initial state passed to g_simple_action_new_stateful(). If an incorrect + * type is given when requesting to change the state, this signal is not + * emitted. * * If no handler is connected to this signal then the default * behaviour is to call g_simple_action_set_state() to set the state @@ -3563,20 +3712,11 @@ /** * GTlsClientConnection:use-ssl3: * - * If %TRUE, forces the connection to use a fallback version of TLS - * or SSL, rather than trying to negotiate the best version of TLS - * to use. This can be used when talking to servers that don't - * implement version negotiation correctly and therefore refuse to - * handshake at all with a modern TLS handshake. - * - * Despite the property name, the fallback version is usually not - * SSL 3.0, because SSL 3.0 is generally disabled by the #GTlsBackend. - * #GTlsClientConnection will use the next-highest available version - * as the fallback version. + * SSL 3.0 is no longer supported. See + * g_tls_client_connection_set_use_ssl3() for details. * * Since: 2.28 - * Deprecated: 2.56: SSL 3.0 is insecure, and this property does not - * generally enable or disable it, despite its name. + * Deprecated: 2.56: SSL 3.0 is insecure. */ @@ -3633,8 +3773,8 @@ * let the user decide whether or not to accept the certificate, you * would have to return %FALSE from the signal handler on the first * attempt, and then after the connection attempt returns a - * %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if - * the user decides to accept the certificate, remember that fact, + * %G_TLS_ERROR_BAD_CERTIFICATE, you can interact with the user, and + * if the user decides to accept the certificate, remember that fact, * create a new connection, and return %TRUE from the signal handler * the next time. * @@ -3651,6 +3791,17 @@ /** + * GTlsConnection:advertised-protocols: + * + * The list of application-layer protocols that the connection + * advertises that it is willing to speak. See + * g_tls_connection_set_advertised_protocols(). + * + * Since: 2.60 + */ + + +/** * GTlsConnection:base-io-stream: * * The #GIOStream that the connection wraps. The connection holds a reference @@ -3696,6 +3847,16 @@ /** + * GTlsConnection:negotiated-protocol: + * + * The application-layer protocol negotiated during the TLS + * handshake. See g_tls_connection_get_negotiated_protocol(). + * + * Since: 2.60 + */ + + +/** * GTlsConnection:peer-certificate: * * The connection's peer's certificate, after the TLS handshake has @@ -3731,6 +3892,7 @@ * g_tls_connection_set_rehandshake_mode(). * * Since: 2.28 + * Deprecated: 2.60: The rehandshake mode is ignored. */ @@ -4204,462 +4366,6 @@ /** - * GXdpDocuments: - * - * Abstract interface type for the D-Bus interface org.freedesktop.portal.Documents. - */ - - -/** - * GXdpDocuments::handle-add: - * @object: A #GXdpDocuments. - * @invocation: A #GDBusMethodInvocation. - * @fd_list: (allow-none): A #GUnixFDList or %NULL. - * @arg_o_path_fd: Argument passed by remote caller. - * @arg_reuse_existing: Argument passed by remote caller. - * @arg_persistent: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the Add() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gxdp_documents_complete_add() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * GXdpDocuments::handle-add-full: - * @object: A #GXdpDocuments. - * @invocation: A #GDBusMethodInvocation. - * @fd_list: (allow-none): A #GUnixFDList or %NULL. - * @arg_o_path_fds: Argument passed by remote caller. - * @arg_flags: Argument passed by remote caller. - * @arg_app_id: Argument passed by remote caller. - * @arg_permissions: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the AddFull() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gxdp_documents_complete_add_full() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * GXdpDocuments::handle-add-named: - * @object: A #GXdpDocuments. - * @invocation: A #GDBusMethodInvocation. - * @fd_list: (allow-none): A #GUnixFDList or %NULL. - * @arg_o_path_parent_fd: Argument passed by remote caller. - * @arg_filename: Argument passed by remote caller. - * @arg_reuse_existing: Argument passed by remote caller. - * @arg_persistent: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the AddNamed() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gxdp_documents_complete_add_named() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * GXdpDocuments::handle-delete: - * @object: A #GXdpDocuments. - * @invocation: A #GDBusMethodInvocation. - * @arg_doc_id: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the Delete() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gxdp_documents_complete_delete() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * GXdpDocuments::handle-get-mount-point: - * @object: A #GXdpDocuments. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the GetMountPoint() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gxdp_documents_complete_get_mount_point() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * GXdpDocuments::handle-grant-permissions: - * @object: A #GXdpDocuments. - * @invocation: A #GDBusMethodInvocation. - * @arg_doc_id: Argument passed by remote caller. - * @arg_app_id: Argument passed by remote caller. - * @arg_permissions: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the GrantPermissions() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gxdp_documents_complete_grant_permissions() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * GXdpDocuments::handle-info: - * @object: A #GXdpDocuments. - * @invocation: A #GDBusMethodInvocation. - * @arg_doc_id: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the Info() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gxdp_documents_complete_info() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * GXdpDocuments::handle-list: - * @object: A #GXdpDocuments. - * @invocation: A #GDBusMethodInvocation. - * @arg_app_id: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the List() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gxdp_documents_complete_list() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * GXdpDocuments::handle-lookup: - * @object: A #GXdpDocuments. - * @invocation: A #GDBusMethodInvocation. - * @arg_filename: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the Lookup() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gxdp_documents_complete_lookup() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * GXdpDocuments::handle-revoke-permissions: - * @object: A #GXdpDocuments. - * @invocation: A #GDBusMethodInvocation. - * @arg_doc_id: Argument passed by remote caller. - * @arg_app_id: Argument passed by remote caller. - * @arg_permissions: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the RevokePermissions() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gxdp_documents_complete_revoke_permissions() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * GXdpDocuments:version: - * - * Represents the D-Bus property "version". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - - -/** - * GXdpDocumentsIface: - * @parent_iface: The parent interface. - * @handle_add: Handler for the #GXdpDocuments::handle-add signal. - * @handle_add_full: Handler for the #GXdpDocuments::handle-add-full signal. - * @handle_add_named: Handler for the #GXdpDocuments::handle-add-named signal. - * @handle_delete: Handler for the #GXdpDocuments::handle-delete signal. - * @handle_get_mount_point: Handler for the #GXdpDocuments::handle-get-mount-point signal. - * @handle_grant_permissions: Handler for the #GXdpDocuments::handle-grant-permissions signal. - * @handle_info: Handler for the #GXdpDocuments::handle-info signal. - * @handle_list: Handler for the #GXdpDocuments::handle-list signal. - * @handle_lookup: Handler for the #GXdpDocuments::handle-lookup signal. - * @handle_revoke_permissions: Handler for the #GXdpDocuments::handle-revoke-permissions signal. - * @get_version: Getter for the #GXdpDocuments:version property. - * - * Virtual table for the D-Bus interface org.freedesktop.portal.Documents. - */ - - -/** - * GXdpDocumentsProxy: - * - * The #GXdpDocumentsProxy structure contains only private data and should only be accessed using the provided API. - */ - - -/** - * GXdpDocumentsProxyClass: - * @parent_class: The parent class. - * - * Class structure for #GXdpDocumentsProxy. - */ - - -/** - * GXdpDocumentsSkeleton: - * - * The #GXdpDocumentsSkeleton structure contains only private data and should only be accessed using the provided API. - */ - - -/** - * GXdpDocumentsSkeletonClass: - * @parent_class: The parent class. - * - * Class structure for #GXdpDocumentsSkeleton. - */ - - -/** - * GXdpNetworkMonitor: - * - * Abstract interface type for the D-Bus interface org.freedesktop.portal.NetworkMonitor. - */ - - -/** - * GXdpNetworkMonitor::changed: - * @object: A #GXdpNetworkMonitor. - * @arg_available: Argument. - * - * On the client-side, this signal is emitted whenever the D-Bus signal "changed" is received. - * - * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. - */ - - -/** - * GXdpNetworkMonitor:available: - * - * Represents the D-Bus property "available". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - - -/** - * GXdpNetworkMonitor:connectivity: - * - * Represents the D-Bus property "connectivity". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - - -/** - * GXdpNetworkMonitor:metered: - * - * Represents the D-Bus property "metered". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - - -/** - * GXdpNetworkMonitorIface: - * @parent_iface: The parent interface. - * @get_available: Getter for the #GXdpNetworkMonitor:available property. - * @get_connectivity: Getter for the #GXdpNetworkMonitor:connectivity property. - * @get_metered: Getter for the #GXdpNetworkMonitor:metered property. - * @changed: Handler for the #GXdpNetworkMonitor::changed signal. - * - * Virtual table for the D-Bus interface org.freedesktop.portal.NetworkMonitor. - */ - - -/** - * GXdpNetworkMonitorProxy: - * - * The #GXdpNetworkMonitorProxy structure contains only private data and should only be accessed using the provided API. - */ - - -/** - * GXdpNetworkMonitorProxyClass: - * @parent_class: The parent class. - * - * Class structure for #GXdpNetworkMonitorProxy. - */ - - -/** - * GXdpNetworkMonitorSkeleton: - * - * The #GXdpNetworkMonitorSkeleton structure contains only private data and should only be accessed using the provided API. - */ - - -/** - * GXdpNetworkMonitorSkeletonClass: - * @parent_class: The parent class. - * - * Class structure for #GXdpNetworkMonitorSkeleton. - */ - - -/** - * GXdpOpenURI: - * - * Abstract interface type for the D-Bus interface org.freedesktop.portal.OpenURI. - */ - - -/** - * GXdpOpenURI::handle-open-file: - * @object: A #GXdpOpenURI. - * @invocation: A #GDBusMethodInvocation. - * @fd_list: (allow-none): A #GUnixFDList or %NULL. - * @arg_parent_window: Argument passed by remote caller. - * @arg_fd: Argument passed by remote caller. - * @arg_options: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the OpenFile() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gxdp_open_uri_complete_open_file() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * GXdpOpenURI::handle-open-uri: - * @object: A #GXdpOpenURI. - * @invocation: A #GDBusMethodInvocation. - * @arg_parent_window: Argument passed by remote caller. - * @arg_uri: Argument passed by remote caller. - * @arg_options: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the OpenURI() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gxdp_open_uri_complete_open_uri() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * GXdpOpenURI:version: - * - * Represents the D-Bus property "version". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - - -/** - * GXdpOpenURIIface: - * @parent_iface: The parent interface. - * @handle_open_file: Handler for the #GXdpOpenURI::handle-open-file signal. - * @handle_open_uri: Handler for the #GXdpOpenURI::handle-open-uri signal. - * @get_version: Getter for the #GXdpOpenURI:version property. - * - * Virtual table for the D-Bus interface org.freedesktop.portal.OpenURI. - */ - - -/** - * GXdpOpenURIProxy: - * - * The #GXdpOpenURIProxy structure contains only private data and should only be accessed using the provided API. - */ - - -/** - * GXdpOpenURIProxyClass: - * @parent_class: The parent class. - * - * Class structure for #GXdpOpenURIProxy. - */ - - -/** - * GXdpOpenURISkeleton: - * - * The #GXdpOpenURISkeleton structure contains only private data and should only be accessed using the provided API. - */ - - -/** - * GXdpOpenURISkeletonClass: - * @parent_class: The parent class. - * - * Class structure for #GXdpOpenURISkeleton. - */ - - -/** - * GXdpProxyResolver: - * - * Abstract interface type for the D-Bus interface org.freedesktop.portal.ProxyResolver. - */ - - -/** - * GXdpProxyResolver::handle-lookup: - * @object: A #GXdpProxyResolver. - * @invocation: A #GDBusMethodInvocation. - * @arg_uri: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the Lookup() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gxdp_proxy_resolver_complete_lookup() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * GXdpProxyResolverIface: - * @parent_iface: The parent interface. - * @handle_lookup: Handler for the #GXdpProxyResolver::handle-lookup signal. - * - * Virtual table for the D-Bus interface org.freedesktop.portal.ProxyResolver. - */ - - -/** - * GXdpProxyResolverProxy: - * - * The #GXdpProxyResolverProxy structure contains only private data and should only be accessed using the provided API. - */ - - -/** - * GXdpProxyResolverProxyClass: - * @parent_class: The parent class. - * - * Class structure for #GXdpProxyResolverProxy. - */ - - -/** - * GXdpProxyResolverSkeleton: - * - * The #GXdpProxyResolverSkeleton structure contains only private data and should only be accessed using the provided API. - */ - - -/** - * GXdpProxyResolverSkeletonClass: - * @parent_class: The parent class. - * - * Class structure for #GXdpProxyResolverSkeleton. - */ - - -/** * GZlibCompressor: * * Zlib decompression @@ -4731,51 +4437,6 @@ /** - * SECTION:GXdpDocuments - * @title: GXdpDocuments - * @short_description: Generated C code for the org.freedesktop.portal.Documents D-Bus interface - * - * This section contains code for working with the org.freedesktop.portal.Documents D-Bus interface in C. - */ - - -/** - * SECTION:GXdpNetworkMonitor - * @title: GXdpNetworkMonitor - * @short_description: Generated C code for the org.freedesktop.portal.NetworkMonitor D-Bus interface - * - * This section contains code for working with the org.freedesktop.portal.NetworkMonitor D-Bus interface in C. - */ - - -/** - * SECTION:GXdpOpenURI - * @title: GXdpOpenURI - * @short_description: Generated C code for the org.freedesktop.portal.OpenURI D-Bus interface - * - * This section contains code for working with the org.freedesktop.portal.OpenURI D-Bus interface in C. - */ - - -/** - * SECTION:GXdpProxyResolver - * @title: GXdpProxyResolver - * @short_description: Generated C code for the org.freedesktop.portal.ProxyResolver D-Bus interface - * - * This section contains code for working with the org.freedesktop.portal.ProxyResolver D-Bus interface in C. - */ - - -/** - * SECTION:_GFreedesktopDBus - * @title: _GFreedesktopDBus - * @short_description: Generated C code for the org.freedesktop.DBus D-Bus interface - * - * This section contains code for working with the org.freedesktop.DBus D-Bus interface in C. - */ - - -/** * SECTION:extensionpoints * @short_description: Extension Points * @include: gio.h @@ -4976,7 +4637,7 @@ * As of GLib 2.20, URIs will always be converted to POSIX paths * (using g_file_get_path()) when using g_app_info_launch() even if * the application requested an URI and not a POSIX path. For example - * for an desktop-file based application with Exec key `totem + * for a desktop-file based application with Exec key `totem * %U` and a single URI, `sftp://foo/file.avi`, then * `/home/user/.gvfs/sftp on foo/file.avi` will be passed. This will * only work if a set of suitable GIO extensions (such as gvfs 2.26 @@ -5134,7 +4795,7 @@ * initialization for all of these in a single place. * * Regardless of which of these entry points is used to start the - * application, GApplication passes some "platform data from the + * application, GApplication passes some ‘platform data’ from the * launching instance to the primary instance, in the form of a * #GVariant dictionary mapping strings to variants. To use platform * data, override the @before_emit or @after_emit virtual functions @@ -5621,13 +5282,13 @@ * * A content type is a platform specific string that defines the type * of a file. On UNIX it is a - * [mime type](http://www.wikipedia.org/wiki/Internet_media_type) - * like "text/plain" or "image/png". - * On Win32 it is an extension string like ".doc", ".txt" or a perceived - * string like "audio". Such strings can be looked up in the registry at - * HKEY_CLASSES_ROOT. - * On OSX it is a [Uniform Type Identifier](https://en.wikipedia.org/wiki/Uniform_Type_Identifier) - * such as "com.apple.application". + * [MIME type](http://www.wikipedia.org/wiki/Internet_media_type) + * like `text/plain` or `image/png`. + * On Win32 it is an extension string like `.doc`, `.txt` or a perceived + * string like `audio`. Such strings can be looked up in the registry at + * `HKEY_CLASSES_ROOT`. + * On macOS it is a [Uniform Type Identifier](https://en.wikipedia.org/wiki/Uniform_Type_Identifier) + * such as `com.apple.application`. */ @@ -5835,11 +5496,37 @@ * signals you are interested in. Note that new signals may be added * in the future * - * ## Controlling Authentication # {#auth-observer} + * ## Controlling Authentication Mechanisms + * + * By default, a #GDBusServer or server-side #GDBusConnection will allow + * any authentication mechanism to be used. If you only + * want to allow D-Bus connections with the `EXTERNAL` mechanism, + * which makes use of credentials passing and is the recommended + * mechanism for modern Unix platforms such as Linux and the BSD family, + * you would use a signal handler like this: + * + * |[ + * static gboolean + * on_allow_mechanism (GDBusAuthObserver *observer, + * const gchar *mechanism, + * gpointer user_data) + * { + * if (g_strcmp0 (mechanism, "EXTERNAL") == 0) + * { + * return TRUE; + * } + * + * return FALSE; + * } + * ]| + * + * ## Controlling Authorization # {#auth-observer} * - * For example, if you only want to allow D-Bus connections from - * processes owned by the same uid as the server, you would use a - * signal handler like the following: + * By default, a #GDBusServer or server-side #GDBusConnection will accept + * connections from any successfully authenticated user (but not from + * anonymous connections using the `ANONYMOUS` mechanism). If you only + * want to allow D-Bus connections from processes owned by the same uid + * as the server, you would use a signal handler like the following: * * |[ * static gboolean @@ -5874,7 +5561,7 @@ * The #GDBusConnection type is used for D-Bus connections to remote * peers such as a message buses. It is a low-level API that offers a * lot of flexibility. For instance, it lets you establish a connection - * over any transport that can by represented as an #GIOStream. + * over any transport that can by represented as a #GIOStream. * * This class is rarely used directly in D-Bus clients. If you are writing * a D-Bus client, it is often easier to use the g_bus_own_name(), @@ -6282,8 +5969,7 @@ * well-known name, the property cache is flushed when the name owner * vanishes and reloaded when a name owner appears. * - * If a #GDBusProxy is used for a well-known name, the owner of the - * name is tracked and can be read from + * The unique name owner of the proxy's name is tracked and can be read from * #GDBusProxy:g-name-owner. Connect to the #GObject::notify signal to * get notified of changes. Additionally, only signals and property * changes emitted from the current name owner are considered and @@ -6328,6 +6014,11 @@ * * An example of peer-to-peer communication with G-DBus can be found * in [gdbus-example-peer.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-peer.c). + * + * Note that a minimal #GDBusServer will accept connections from any + * peer. In many use-cases it will be necessary to add a #GDBusAuthObserver + * that only accepts connections that have successfully authenticated + * as the same user that is running the #GDBusServer. */ @@ -7210,6 +6901,55 @@ /** + * SECTION:gmemorymonitor + * @title: GMemoryMonitor + * @short_description: Memory usage monitor + * @include: gio/gio.h + * + * #GMemoryMonitor will monitor system memory and suggest to the application + * when to free memory so as to leave more room for other applications. + * It is implemented on Linux using the [Low Memory Monitor](https://gitlab.freedesktop.org/hadess/low-memory-monitor/) + * ([API documentation](https://hadess.pages.freedesktop.org/low-memory-monitor/)). + * + * There is also an implementation for use inside Flatpak sandboxes. + * + * Possible actions to take when the signal is received are: + * - Free caches + * - Save files that haven't been looked at in a while to disk, ready to be reopened when needed + * - Run a garbage collection cycle + * - Try and compress fragmented allocations + * - Exit on idle if the process has no reason to stay around + * + * See #GMemoryMonitorWarningLevel for details on the various warning levels. + * + * |[ + * static void + * warning_cb (GMemoryMonitor *m, GMemoryMonitorWarningLevel level) + * { + * g_debug ("Warning level: %d", level); + * if (warning_level > G_MEMORY_MONITOR_WARNING_LEVEL_LOW) + * drop_caches (); + * } + * + * static GMemoryMonitor * + * monitor_low_memory (void) + * { + * GMemoryMonitor *m; + * m = g_memory_monitor_dup_default (); + * g_signal_connect (G_OBJECT (m), "low-memory-warning", + * G_CALLBACK (warning_cb), NULL); + * return m; + * } + * ]| + * + * Don't forget to disconnect the #GMemoryMonitor::low-memory-warning + * signal, and unref the #GMemoryMonitor itself when exiting. + * + * Since: 2.64 + */ + + +/** * SECTION:gmemoryoutputstream * @short_description: Streaming output operations on memory chunks * @include: gio/gio.h @@ -7427,6 +7167,12 @@ * #GtkMountOperation. If no user interaction is desired (for example * when automounting filesystems at login time), usually %NULL can be * passed, see each method taking a #GMountOperation for details. + * + * The term ‘TCRYPT’ is used to mean ‘compatible with TrueCrypt and VeraCrypt’. + * [TrueCrypt](https://en.wikipedia.org/wiki/TrueCrypt) is a discontinued system for + * encrypting file containers, partitions or whole disks, typically used with Windows. + * [VeraCrypt](https://www.veracrypt.fr/) is a maintained fork of TrueCrypt with various + * improvements and auditing fixes. */ @@ -7435,7 +7181,7 @@ * @short_description: Native GSocketAddress * @include: gio/gio.h * - * An socket address of some unknown native type. + * A socket address of some unknown native type. */ @@ -7448,7 +7194,11 @@ * then attempt to connect to that host, handling the possibility of * multiple IP addresses and multiple address families. * - * See #GSocketConnectable for and example of using the connectable + * The enumeration results of resolved addresses *may* be cached as long + * as this object is kept alive which may have unexpected results if + * alive for too long. + * + * See #GSocketConnectable for an example of using the connectable * interface. */ @@ -7506,7 +7256,7 @@ * address families. * * See #GSrvTarget for more information about SRV records, and see - * #GSocketConnectable for and example of using the connectable + * #GSocketConnectable for an example of using the connectable * interface. */ @@ -7543,18 +7293,6 @@ /** - * SECTION:gosxappinfo - * @title: GOsxAppInfo - * @short_description: Application information from NSBundles - * @include: gio/gosxappinfo.h - * - * #GOsxAppInfo is an implementation of #GAppInfo based on NSBundle information. - * - * Note that `` is unique to OSX. - */ - - -/** * SECTION:goutputstream * @short_description: Base class for implementing streaming output * @include: gio/gio.h @@ -7726,6 +7464,23 @@ /** + * SECTION:gproxyaddressenumerator + * @short_description: Proxy wrapper enumerator for socket addresses + * @include: gio/gio.h + * + * #GProxyAddressEnumerator is a wrapper around #GSocketAddressEnumerator which + * takes the #GSocketAddress instances returned by the #GSocketAddressEnumerator + * and wraps them in #GProxyAddress instances, using the given + * #GProxyAddressEnumerator:proxy-resolver. + * + * This enumerator will be returned (for example, by + * g_socket_connectable_enumerate()) as appropriate when a proxy is configured; + * there should be no need to manually wrap a #GSocketAddressEnumerator instance + * with one. + */ + + +/** * SECTION:gproxyresolver * @short_description: Asynchronous and cancellable network proxy resolver * @include: gio/gio.h @@ -7823,7 +7578,7 @@ * * `to-pixdata` which will use the gdk-pixbuf-pixdata command to convert * images to the GdkPixdata format, which allows you to create pixbufs directly using the data inside - * the resource file, rather than an (uncompressed) copy if it. For this, the gdk-pixbuf-pixdata + * the resource file, rather than an (uncompressed) copy of it. For this, the gdk-pixbuf-pixdata * program must be in the PATH, or the `GDK_PIXBUF_PIXDATA` environment variable must be * set to the full path to the gdk-pixbuf-pixdata executable; otherwise the resource compiler will * abort. @@ -7896,7 +7651,7 @@ * When debugging a program or testing a change to an installed version, it is often useful to be able to * replace resources in the program or library, without recompiling, for debugging or quick hacking and testing * purposes. Since GLib 2.50, it is possible to use the `G_RESOURCE_OVERLAYS` environment variable to selectively overlay - * resources with replacements from the filesystem. It is a colon-separated list of substitutions to perform + * resources with replacements from the filesystem. It is a %G_SEARCHPATH_SEPARATOR-separated list of substitutions to perform * during resource lookups. * * A substitution has the form @@ -7936,7 +7691,7 @@ * fixed-size. * * #GSeekable on fixed-sized streams is approximately the same as POSIX - * lseek() on a block device (for example: attmepting to seek past the + * lseek() on a block device (for example: attempting to seek past the * end of the device is an error). Fixed streams typically cannot be * truncated. * @@ -8072,6 +7827,11 @@ * (20,30) * * + * + * "" + * Empty strings have to be provided in GVariant form + * + * * * * ]| @@ -8697,6 +8457,28 @@ /** + * SECTION:gsocketaddressenumerator + * @short_description: Enumerator for socket addresses + * @include: gio/gio.h + * + * #GSocketAddressEnumerator is an enumerator type for #GSocketAddress + * instances. It is returned by enumeration functions such as + * g_socket_connectable_enumerate(), which returns a #GSocketAddressEnumerator + * to list each #GSocketAddress which could be used to connect to that + * #GSocketConnectable. + * + * Enumeration is typically a blocking operation, so the asynchronous methods + * g_socket_address_enumerator_next_async() and + * g_socket_address_enumerator_next_finish() should be used where possible. + * + * Each #GSocketAddressEnumerator can only be enumerated once. Once + * g_socket_address_enumerator_next() has returned %NULL (and no error), further + * enumeration with that #GSocketAddressEnumerator is not possible, and it can + * be unreffed. + */ + + +/** * SECTION:gsocketclient * @short_description: Helper for connecting to a network service * @include: gio/gio.h @@ -8855,9 +8637,16 @@ * of server sockets and helps you accept sockets from any of the * socket, either sync or async. * + * Add addresses and ports to listen on using g_socket_listener_add_address() + * and g_socket_listener_add_inet_port(). These will be listened on until + * g_socket_listener_close() is called. Dropping your final reference to the + * #GSocketListener will not cause g_socket_listener_close() to be called + * implicitly, as some references to the #GSocketListener may be held + * internally. + * * If you want to implement a network server, also look at #GSocketService - * and #GThreadedSocketService which are subclass of #GSocketListener - * that makes this even easier. + * and #GThreadedSocketService which are subclasses of #GSocketListener + * that make this even easier. * * Since: 2.22 */ @@ -9033,7 +8822,7 @@ * where it was created (waiting until the next iteration of the main * loop first, if necessary). The caller will pass the #GTask back to * the operation's finish function (as a #GAsyncResult), and you can - * can use g_task_propagate_pointer() or the like to extract the + * use g_task_propagate_pointer() or the like to extract the * return value. * * Here is an example for using GTask as a GAsyncResult: @@ -9763,10 +9552,13 @@ * @short_description: TLS database type * @include: gio/gio.h * - * #GTlsDatabase is used to lookup certificates and other information + * #GTlsDatabase is used to look up certificates and other information * from a certificate or key store. It is an abstract base class which * TLS library specific subtypes override. * + * A #GTlsDatabase may be accessed from multiple threads by the TLS backend. + * All implementations are required to be fully thread-safe. + * * Most common client applications will not directly interact with * #GTlsDatabase. It is used internally by #GTlsConnection. * @@ -9890,7 +9682,7 @@ * descriptors that it contains, closing them when finalized. * * It may be wrapped in a #GUnixFDMessage and sent over a #GSocket in - * the %G_SOCKET_ADDRESS_UNIX family by using g_socket_send_message() + * the %G_SOCKET_FAMILY_UNIX family by using g_socket_send_message() * and received using g_socket_receive_message(). * * Note that `` belongs to the UNIX-specific GIO @@ -9909,7 +9701,7 @@ * This #GSocketControlMessage contains a #GUnixFDList. * It may be sent using g_socket_send_message() and received using * g_socket_receive_message() over UNIX sockets (ie: sockets in the - * %G_SOCKET_ADDRESS_UNIX family). The file descriptors are copied + * %G_SOCKET_FAMILY_UNIX family). The file descriptors are copied * between processes by the kernel. * * For an easier way to send and receive file descriptors over @@ -10023,10 +9815,10 @@ * for credentials. * * The callback will be fired when the operation has resolved (either - * with success or failure), and a #GAsyncReady structure will be + * with success or failure), and a #GAsyncResult instance will be * passed to the callback. That callback should then call * g_volume_mount_finish() with the #GVolume instance and the - * #GAsyncReady data to see if the operation was completed + * #GAsyncResult data to see if the operation was completed * successfully. If an @error is present when g_volume_mount_finish() * is called, then it will be filled with any error information. * @@ -10039,7 +9831,7 @@ * different kinds of identifiers, such as Hal UDIs, filesystem labels, * traditional Unix devices (e.g. `/dev/sda2`), UUIDs. GIO uses predefined * strings as names for the different kinds of identifiers: - * #G_VOLUME_IDENTIFIER_KIND_HAL_UDI, #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. + * #G_VOLUME_IDENTIFIER_KIND_UUID, #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. * Use g_volume_get_identifier() to obtain an identifier for a volume. * * @@ -10065,6 +9857,9 @@ * [thread-default-context aware][g-main-context-push-thread-default], * and so should not be used other than from the main thread, with no * thread-default-context active. + * + * In order to receive updates about volumes and mounts monitored through GVFS, + * a main loop must be running. */ @@ -10160,431 +9955,96 @@ /** - * _GFreedesktopDBus: + * _g_dbus_initialize: + * + * Does various one-time init things such as * - * Abstract interface type for the D-Bus interface org.freedesktop.DBus. + * - registering the G_DBUS_ERROR error domain + * - parses the G_DBUS_DEBUG environment variable */ /** - * _GFreedesktopDBus::handle-add-match: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_rule: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the AddMatch() D-Bus method. + * _g_file_attribute_value_as_string: + * @attr: a #GFileAttributeValue. * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_add_match() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * Converts a #GFileAttributeValue to a string for display. + * The returned string should be freed when no longer needed. * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + * Returns: a string from the @attr, %NULL on error, or "" + * if @attr is of type %G_FILE_ATTRIBUTE_TYPE_INVALID. */ /** - * _GFreedesktopDBus::handle-get-connection-selinux-security-context: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_name: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the GetConnectionSELinuxSecurityContext() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_get_connection_selinux_security_context() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * _g_file_attribute_value_clear: + * @attr: a #GFileAttributeValue. * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + * Clears the value of @attr and sets its type to + * %G_FILE_ATTRIBUTE_TYPE_INVALID. */ /** - * _GFreedesktopDBus::handle-get-connection-unix-process-id: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_name: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the GetConnectionUnixProcessID() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_get_connection_unix_process_id() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * _g_file_attribute_value_free: + * @attr: a #GFileAttributeValue. * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + * Frees the memory used by @attr. */ /** - * _GFreedesktopDBus::handle-get-connection-unix-user: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_name: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the GetConnectionUnixUser() D-Bus method. + * _g_file_attribute_value_get_boolean: + * @attr: a #GFileAttributeValue. * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_get_connection_unix_user() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * Gets the boolean value from a file attribute value. If the value is not the + * right type then %FALSE will be returned. * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + * Returns: the boolean value contained within the attribute, or %FALSE. */ /** - * _GFreedesktopDBus::handle-get-id: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the GetId() D-Bus method. + * _g_file_attribute_value_get_byte_string: + * @attr: a #GFileAttributeValue. * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_get_id() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * Gets the byte string from a file attribute value. If the value is not the + * right type then %NULL will be returned. * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + * Returns: the byte string contained within the attribute or %NULL. */ /** - * _GFreedesktopDBus::handle-get-name-owner: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_name: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the GetNameOwner() D-Bus method. + * _g_file_attribute_value_get_int32: + * @attr: a #GFileAttributeValue. * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_get_name_owner() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * Gets the signed 32-bit integer from a file attribute value. If the value + * is not the right type then 0 will be returned. * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + * Returns: the signed 32-bit integer from the attribute, or 0. */ /** - * _GFreedesktopDBus::handle-hello: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the Hello() D-Bus method. + * _g_file_attribute_value_get_int64: + * @attr: a #GFileAttributeValue. * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_hello() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * Gets the signed 64-bit integer from a file attribute value. If the value + * is not the right type then 0 will be returned. * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + * Returns: the signed 64-bit integer from the attribute, or 0. */ /** - * _GFreedesktopDBus::handle-list-activatable-names: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the ListActivatableNames() D-Bus method. + * _g_file_attribute_value_get_object: + * @attr: a #GFileAttributeValue. * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_list_activatable_names() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * Gets the GObject from a file attribute value. If the value + * is not the right type then %NULL will be returned. * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-list-names: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the ListNames() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_list_names() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-list-queued-owners: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_name: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the ListQueuedOwners() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_list_queued_owners() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-name-has-owner: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_name: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the NameHasOwner() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_name_has_owner() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-release-name: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_name: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the ReleaseName() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_release_name() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-reload-config: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the ReloadConfig() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_reload_config() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-remove-match: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_rule: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the RemoveMatch() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_remove_match() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-request-name: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_name: Argument passed by remote caller. - * @arg_flags: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the RequestName() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_request_name() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-start-service-by-name: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_name: Argument passed by remote caller. - * @arg_flags: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the StartServiceByName() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_start_service_by_name() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::handle-update-activation-environment: - * @object: A #_GFreedesktopDBus. - * @invocation: A #GDBusMethodInvocation. - * @arg_environment: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the UpdateActivationEnvironment() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call _g_freedesktop_dbus_complete_update_activation_environment() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - - -/** - * _GFreedesktopDBus::name-acquired: - * @object: A #_GFreedesktopDBus. - * @arg_name: Argument. - * - * On the client-side, this signal is emitted whenever the D-Bus signal "NameAcquired" is received. - * - * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. - */ - - -/** - * _GFreedesktopDBus::name-lost: - * @object: A #_GFreedesktopDBus. - * @arg_name: Argument. - * - * On the client-side, this signal is emitted whenever the D-Bus signal "NameLost" is received. - * - * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. - */ - - -/** - * _GFreedesktopDBus::name-owner-changed: - * @object: A #_GFreedesktopDBus. - * @arg_name: Argument. - * @arg_old_owner: Argument. - * @arg_new_owner: Argument. - * - * On the client-side, this signal is emitted whenever the D-Bus signal "NameOwnerChanged" is received. - * - * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. - */ - - -/** - * _GFreedesktopDBusIface: - * @parent_iface: The parent interface. - * @handle_add_match: Handler for the #_GFreedesktopDBus::handle-add-match signal. - * @handle_get_connection_selinux_security_context: Handler for the #_GFreedesktopDBus::handle-get-connection-selinux-security-context signal. - * @handle_get_connection_unix_process_id: Handler for the #_GFreedesktopDBus::handle-get-connection-unix-process-id signal. - * @handle_get_connection_unix_user: Handler for the #_GFreedesktopDBus::handle-get-connection-unix-user signal. - * @handle_get_id: Handler for the #_GFreedesktopDBus::handle-get-id signal. - * @handle_get_name_owner: Handler for the #_GFreedesktopDBus::handle-get-name-owner signal. - * @handle_hello: Handler for the #_GFreedesktopDBus::handle-hello signal. - * @handle_list_activatable_names: Handler for the #_GFreedesktopDBus::handle-list-activatable-names signal. - * @handle_list_names: Handler for the #_GFreedesktopDBus::handle-list-names signal. - * @handle_list_queued_owners: Handler for the #_GFreedesktopDBus::handle-list-queued-owners signal. - * @handle_name_has_owner: Handler for the #_GFreedesktopDBus::handle-name-has-owner signal. - * @handle_release_name: Handler for the #_GFreedesktopDBus::handle-release-name signal. - * @handle_reload_config: Handler for the #_GFreedesktopDBus::handle-reload-config signal. - * @handle_remove_match: Handler for the #_GFreedesktopDBus::handle-remove-match signal. - * @handle_request_name: Handler for the #_GFreedesktopDBus::handle-request-name signal. - * @handle_start_service_by_name: Handler for the #_GFreedesktopDBus::handle-start-service-by-name signal. - * @handle_update_activation_environment: Handler for the #_GFreedesktopDBus::handle-update-activation-environment signal. - * @name_acquired: Handler for the #_GFreedesktopDBus::name-acquired signal. - * @name_lost: Handler for the #_GFreedesktopDBus::name-lost signal. - * @name_owner_changed: Handler for the #_GFreedesktopDBus::name-owner-changed signal. - * - * Virtual table for the D-Bus interface org.freedesktop.DBus. - */ - - -/** - * _GFreedesktopDBusProxy: - * - * The #_GFreedesktopDBusProxy structure contains only private data and should only be accessed using the provided API. - */ - - -/** - * _GFreedesktopDBusProxyClass: - * @parent_class: The parent class. - * - * Class structure for #_GFreedesktopDBusProxy. - */ - - -/** - * _GFreedesktopDBusSkeleton: - * - * The #_GFreedesktopDBusSkeleton structure contains only private data and should only be accessed using the provided API. - */ - - -/** - * _GFreedesktopDBusSkeletonClass: - * @parent_class: The parent class. - * - * Class structure for #_GFreedesktopDBusSkeleton. - */ - - -/** - * _g_dbus_initialize: - * - * Does various one-time init things such as - * - * - registering the G_DBUS_ERROR error domain - * - parses the G_DBUS_DEBUG environment variable - */ - - -/** - * _g_file_attribute_value_as_string: - * @attr: a #GFileAttributeValue. - * - * Converts a #GFileAttributeValue to a string for display. - * The returned string should be freed when no longer needed. - * - * Returns: a string from the @attr, %NULL on error, or "" - * if @attr is of type %G_FILE_ATTRIBUTE_TYPE_INVALID. - */ - - -/** - * _g_file_attribute_value_clear: - * @attr: a #GFileAttributeValue. - * - * Clears the value of @attr and sets its type to - * %G_FILE_ATTRIBUTE_TYPE_INVALID. - */ - - -/** - * _g_file_attribute_value_free: - * @attr: a #GFileAttributeValue. - * - * Frees the memory used by @attr. - */ - - -/** - * _g_file_attribute_value_get_boolean: - * @attr: a #GFileAttributeValue. - * - * Gets the boolean value from a file attribute value. If the value is not the - * right type then %FALSE will be returned. - * - * Returns: the boolean value contained within the attribute, or %FALSE. - */ - - -/** - * _g_file_attribute_value_get_byte_string: - * @attr: a #GFileAttributeValue. - * - * Gets the byte string from a file attribute value. If the value is not the - * right type then %NULL will be returned. - * - * Returns: the byte string contained within the attribute or %NULL. - */ - - -/** - * _g_file_attribute_value_get_int32: - * @attr: a #GFileAttributeValue. - * - * Gets the signed 32-bit integer from a file attribute value. If the value - * is not the right type then 0 will be returned. - * - * Returns: the signed 32-bit integer from the attribute, or 0. - */ - - -/** - * _g_file_attribute_value_get_int64: - * @attr: a #GFileAttributeValue. - * - * Gets the signed 64-bit integer from a file attribute value. If the value - * is not the right type then 0 will be returned. - * - * Returns: the signed 64-bit integer from the attribute, or 0. - */ - - -/** - * _g_file_attribute_value_get_object: - * @attr: a #GFileAttributeValue. - * - * Gets the GObject from a file attribute value. If the value - * is not the right type then %NULL will be returned. - * - * Returns: the GObject from the attribute, or %NULL. + * Returns: the GObject from the attribute, or %NULL. */ @@ -10704,8659 +10164,8591 @@ /** - * _g_freedesktop_dbus_call_add_match: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_rule: Argument to pass with the method invocation. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * _g_io_module_extract_name: + * @filename: filename of a GIOModule * - * Asynchronously invokes the AddMatch() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_add_match_finish() to get the result of the operation. + * Extract the plugin name from its filename. It removes optional "lib" or + * "libgio" prefix, and removes everything after the first dot. For example: + * "libgiognutls.so" -> "gnutls". * - * See _g_freedesktop_dbus_call_add_match_sync() for the synchronous, blocking version of this method. + * Returns: (transfer full): the module's name */ /** - * _g_freedesktop_dbus_call_add_match_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_add_match(). - * @error: Return location for error or %NULL. + * _g_io_module_get_default: + * @extension_point: the name of an extension point + * @envvar: (nullable): the name of an environment variable to + * override the default implementation. + * @verify_func: (nullable): a function to call to verify that + * a given implementation is usable in the current environment. * - * Finishes an operation started with _g_freedesktop_dbus_call_add_match(). + * Retrieves the default object implementing @extension_point. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_add_match_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_rule: Argument to pass with the method invocation. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * If @envvar is not %NULL, and the environment variable with that + * name is set, then the implementation it specifies will be tried + * first. After that, or if @envvar is not set, all other + * implementations will be tried in order of decreasing priority. * - * Synchronously invokes the AddMatch() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * If an extension point implementation implements #GInitable, then + * that implementation will only be used if it initializes + * successfully. Otherwise, if @verify_func is not %NULL, then it will + * be called on each candidate implementation after construction, to + * check if it is actually usable or not. * - * See _g_freedesktop_dbus_call_add_match() for the asynchronous version of this method. + * The result is cached after it is generated the first time, and + * the function is thread-safe. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: (transfer none): an object implementing + * @extension_point, or %NULL if there are no usable + * implementations. */ /** - * _g_freedesktop_dbus_call_get_connection_selinux_security_context: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * _g_io_module_get_default_type: + * @extension_point: the name of an extension point + * @envvar: (nullable): the name of an environment variable to + * override the default implementation. + * @is_supported_offset: a vtable offset, or zero * - * Asynchronously invokes the GetConnectionSELinuxSecurityContext() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_get_connection_selinux_security_context_finish() to get the result of the operation. + * Retrieves the default class implementing @extension_point. * - * See _g_freedesktop_dbus_call_get_connection_selinux_security_context_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_get_connection_selinux_security_context_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_security_context: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_get_connection_selinux_security_context(). - * @error: Return location for error or %NULL. + * If @envvar is not %NULL, and the environment variable with that + * name is set, then the implementation it specifies will be tried + * first. After that, or if @envvar is not set, all other + * implementations will be tried in order of decreasing priority. + * + * If @is_supported_offset is non-zero, then it is the offset into the + * class vtable at which there is a function that takes no arguments and + * returns a boolean. This function will be called on each candidate + * implementation to check if it is actually usable or not. * - * Finishes an operation started with _g_freedesktop_dbus_call_get_connection_selinux_security_context(). + * The result is cached after it is generated the first time, and + * the function is thread-safe. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: (transfer none): the type to instantiate to implement + * @extension_point, or %G_TYPE_INVALID if there are no usable + * implementations. */ /** - * _g_freedesktop_dbus_call_get_connection_selinux_security_context_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @out_security_context: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the GetConnectionSELinuxSecurityContext() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * _g_poll_file_monitor_new: + * @file: a #GFile. * - * See _g_freedesktop_dbus_call_get_connection_selinux_security_context() for the asynchronous version of this method. + * Polls @file for changes. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: a new #GFileMonitor for the given #GFile. */ /** - * _g_freedesktop_dbus_call_get_connection_unix_process_id: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_action_activate: + * @action: a #GAction + * @parameter: (nullable): the parameter to the activation * - * Asynchronously invokes the GetConnectionUnixProcessID() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_get_connection_unix_process_id_finish() to get the result of the operation. + * Activates the action. * - * See _g_freedesktop_dbus_call_get_connection_unix_process_id_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_get_connection_unix_process_id_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_pid: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_get_connection_unix_process_id(). - * @error: Return location for error or %NULL. + * @parameter must be the correct type of parameter for the action (ie: + * the parameter type given at construction time). If the parameter + * type was %NULL then @parameter must also be %NULL. * - * Finishes an operation started with _g_freedesktop_dbus_call_get_connection_unix_process_id(). + * If the @parameter GVariant is floating, it is consumed. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_get_connection_unix_process_id_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @out_pid: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * g_action_change_state: + * @action: a #GAction + * @value: the new state + * + * Request for the state of @action to be changed to @value. + * + * The action must be stateful and @value must be of the correct type. + * See g_action_get_state_type(). * - * Synchronously invokes the GetConnectionUnixProcessID() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * This call merely requests a change. The action may refuse to change + * its state or may change its state to something other than @value. + * See g_action_get_state_hint(). * - * See _g_freedesktop_dbus_call_get_connection_unix_process_id() for the asynchronous version of this method. + * If the @value GVariant is floating, it is consumed. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Since: 2.30 */ /** - * _g_freedesktop_dbus_call_get_connection_unix_user: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_action_get_enabled: + * @action: a #GAction + * + * Checks if @action is currently enabled. * - * Asynchronously invokes the GetConnectionUnixUser() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_get_connection_unix_user_finish() to get the result of the operation. + * An action must be enabled in order to be activated or in order to + * have its state changed from outside callers. * - * See _g_freedesktop_dbus_call_get_connection_unix_user_sync() for the synchronous, blocking version of this method. + * Returns: whether the action is enabled + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_get_connection_unix_user_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_uid: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_get_connection_unix_user(). - * @error: Return location for error or %NULL. + * g_action_get_name: + * @action: a #GAction * - * Finishes an operation started with _g_freedesktop_dbus_call_get_connection_unix_user(). + * Queries the name of @action. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: the name of the action + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_get_connection_unix_user_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @out_uid: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * g_action_get_parameter_type: + * @action: a #GAction + * + * Queries the type of the parameter that must be given when activating + * @action. * - * Synchronously invokes the GetConnectionUnixUser() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * When activating the action using g_action_activate(), the #GVariant + * given to that function must be of the type returned by this function. * - * See _g_freedesktop_dbus_call_get_connection_unix_user() for the asynchronous version of this method. + * In the case that this function returns %NULL, you must not give any + * #GVariant, but %NULL instead. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: (nullable): the parameter type + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_get_id: - * @proxy: A #_GFreedesktopDBusProxy. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_action_get_state: + * @action: a #GAction * - * Asynchronously invokes the GetId() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_get_id_finish() to get the result of the operation. + * Queries the current state of @action. * - * See _g_freedesktop_dbus_call_get_id_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_get_id_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_unique_id: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_get_id(). - * @error: Return location for error or %NULL. + * If the action is not stateful then %NULL will be returned. If the + * action is stateful then the type of the return value is the type + * given by g_action_get_state_type(). * - * Finishes an operation started with _g_freedesktop_dbus_call_get_id(). + * The return value (if non-%NULL) should be freed with + * g_variant_unref() when it is no longer required. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: (transfer full): the current state of the action + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_get_id_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_unique_id: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * g_action_get_state_hint: + * @action: a #GAction * - * Synchronously invokes the GetId() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * Requests a hint about the valid range of values for the state of + * @action. * - * See _g_freedesktop_dbus_call_get_id() for the asynchronous version of this method. + * If %NULL is returned it either means that the action is not stateful + * or that there is no hint about the valid range of values for the + * state of the action. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_get_name_owner: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * If a #GVariant array is returned then each item in the array is a + * possible value for the state. If a #GVariant pair (ie: two-tuple) is + * returned then the tuple specifies the inclusive lower and upper bound + * of valid values for the state. + * + * In any case, the information is merely a hint. It may be possible to + * have a state value outside of the hinted range and setting a value + * within the range may fail. * - * Asynchronously invokes the GetNameOwner() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_get_name_owner_finish() to get the result of the operation. + * The return value (if non-%NULL) should be freed with + * g_variant_unref() when it is no longer required. * - * See _g_freedesktop_dbus_call_get_name_owner_sync() for the synchronous, blocking version of this method. + * Returns: (nullable) (transfer full): the state range hint + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_get_name_owner_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_unique_name: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_get_name_owner(). - * @error: Return location for error or %NULL. + * g_action_get_state_type: + * @action: a #GAction + * + * Queries the type of the state of @action. + * + * If the action is stateful (e.g. created with + * g_simple_action_new_stateful()) then this function returns the + * #GVariantType of the state. This is the type of the initial value + * given as the state. All calls to g_action_change_state() must give a + * #GVariant of this type and g_action_get_state() will return a + * #GVariant of the same type. * - * Finishes an operation started with _g_freedesktop_dbus_call_get_name_owner(). + * If the action is not stateful (e.g. created with g_simple_action_new()) + * then this function will return %NULL. In that case, g_action_get_state() + * will return %NULL and you must not call g_action_change_state(). * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: (nullable): the state type, if the action is stateful + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_get_name_owner_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @out_unique_name: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * g_action_group_action_added: + * @action_group: a #GActionGroup + * @action_name: the name of an action in the group * - * Synchronously invokes the GetNameOwner() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * Emits the #GActionGroup::action-added signal on @action_group. * - * See _g_freedesktop_dbus_call_get_name_owner() for the asynchronous version of this method. + * This function should only be called by #GActionGroup implementations. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_hello: - * @proxy: A #_GFreedesktopDBusProxy. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_action_group_action_enabled_changed: + * @action_group: a #GActionGroup + * @action_name: the name of an action in the group + * @enabled: whether or not the action is now enabled + * + * Emits the #GActionGroup::action-enabled-changed signal on @action_group. * - * Asynchronously invokes the Hello() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_hello_finish() to get the result of the operation. + * This function should only be called by #GActionGroup implementations. * - * See _g_freedesktop_dbus_call_hello_sync() for the synchronous, blocking version of this method. + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_hello_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_assigned_name: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_hello(). - * @error: Return location for error or %NULL. + * g_action_group_action_removed: + * @action_group: a #GActionGroup + * @action_name: the name of an action in the group + * + * Emits the #GActionGroup::action-removed signal on @action_group. * - * Finishes an operation started with _g_freedesktop_dbus_call_hello(). + * This function should only be called by #GActionGroup implementations. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_hello_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_assigned_name: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * g_action_group_action_state_changed: + * @action_group: a #GActionGroup + * @action_name: the name of an action in the group + * @state: the new state of the named action * - * Synchronously invokes the Hello() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * Emits the #GActionGroup::action-state-changed signal on @action_group. * - * See _g_freedesktop_dbus_call_hello() for the asynchronous version of this method. + * This function should only be called by #GActionGroup implementations. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_list_activatable_names: - * @proxy: A #_GFreedesktopDBusProxy. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_action_group_activate_action: + * @action_group: a #GActionGroup + * @action_name: the name of the action to activate + * @parameter: (nullable): parameters to the activation + * + * Activate the named action within @action_group. * - * Asynchronously invokes the ListActivatableNames() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_list_activatable_names_finish() to get the result of the operation. + * If the action is expecting a parameter, then the correct type of + * parameter must be given as @parameter. If the action is expecting no + * parameters then @parameter must be %NULL. See + * g_action_group_get_action_parameter_type(). * - * See _g_freedesktop_dbus_call_list_activatable_names_sync() for the synchronous, blocking version of this method. + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_list_activatable_names_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_activatable_names: (out) (array zero-terminated=1): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_list_activatable_names(). - * @error: Return location for error or %NULL. + * g_action_group_change_action_state: + * @action_group: a #GActionGroup + * @action_name: the name of the action to request the change on + * @value: the new state * - * Finishes an operation started with _g_freedesktop_dbus_call_list_activatable_names(). + * Request for the state of the named action within @action_group to be + * changed to @value. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_list_activatable_names_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_activatable_names: (out) (array zero-terminated=1): Return location for return parameter or %NULL to ignore. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * The action must be stateful and @value must be of the correct type. + * See g_action_group_get_action_state_type(). * - * Synchronously invokes the ListActivatableNames() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * This call merely requests a change. The action may refuse to change + * its state or may change its state to something other than @value. + * See g_action_group_get_action_state_hint(). * - * See _g_freedesktop_dbus_call_list_activatable_names() for the asynchronous version of this method. + * If the @value GVariant is floating, it is consumed. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_list_names: - * @proxy: A #_GFreedesktopDBusProxy. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_action_group_get_action_enabled: + * @action_group: a #GActionGroup + * @action_name: the name of the action to query + * + * Checks if the named action within @action_group is currently enabled. * - * Asynchronously invokes the ListNames() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_list_names_finish() to get the result of the operation. + * An action must be enabled in order to be activated or in order to + * have its state changed from outside callers. * - * See _g_freedesktop_dbus_call_list_names_sync() for the synchronous, blocking version of this method. + * Returns: whether or not the action is currently enabled + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_list_names_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_names: (out) (array zero-terminated=1): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_list_names(). - * @error: Return location for error or %NULL. + * g_action_group_get_action_parameter_type: + * @action_group: a #GActionGroup + * @action_name: the name of the action to query * - * Finishes an operation started with _g_freedesktop_dbus_call_list_names(). + * Queries the type of the parameter that must be given when activating + * the named action within @action_group. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_list_names_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_names: (out) (array zero-terminated=1): Return location for return parameter or %NULL to ignore. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * When activating the action using g_action_group_activate_action(), + * the #GVariant given to that function must be of the type returned + * by this function. * - * Synchronously invokes the ListNames() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * In the case that this function returns %NULL, you must not give any + * #GVariant, but %NULL instead. * - * See _g_freedesktop_dbus_call_list_names() for the asynchronous version of this method. + * The parameter type of a particular action will never change but it is + * possible for an action to be removed and for a new action to be added + * with the same name but a different parameter type. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: (nullable): the parameter type + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_list_queued_owners: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_action_group_get_action_state: + * @action_group: a #GActionGroup + * @action_name: the name of the action to query + * + * Queries the current state of the named action within @action_group. + * + * If the action is not stateful then %NULL will be returned. If the + * action is stateful then the type of the return value is the type + * given by g_action_group_get_action_state_type(). * - * Asynchronously invokes the ListQueuedOwners() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_list_queued_owners_finish() to get the result of the operation. + * The return value (if non-%NULL) should be freed with + * g_variant_unref() when it is no longer required. * - * See _g_freedesktop_dbus_call_list_queued_owners_sync() for the synchronous, blocking version of this method. + * Returns: (nullable) (transfer full): the current state of the action + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_list_queued_owners_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_queued_owners: (out) (array zero-terminated=1): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_list_queued_owners(). - * @error: Return location for error or %NULL. + * g_action_group_get_action_state_hint: + * @action_group: a #GActionGroup + * @action_name: the name of the action to query * - * Finishes an operation started with _g_freedesktop_dbus_call_list_queued_owners(). + * Requests a hint about the valid range of values for the state of the + * named action within @action_group. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_list_queued_owners_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @out_queued_owners: (out) (array zero-terminated=1): Return location for return parameter or %NULL to ignore. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * If %NULL is returned it either means that the action is not stateful + * or that there is no hint about the valid range of values for the + * state of the action. + * + * If a #GVariant array is returned then each item in the array is a + * possible value for the state. If a #GVariant pair (ie: two-tuple) is + * returned then the tuple specifies the inclusive lower and upper bound + * of valid values for the state. * - * Synchronously invokes the ListQueuedOwners() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * In any case, the information is merely a hint. It may be possible to + * have a state value outside of the hinted range and setting a value + * within the range may fail. * - * See _g_freedesktop_dbus_call_list_queued_owners() for the asynchronous version of this method. + * The return value (if non-%NULL) should be freed with + * g_variant_unref() when it is no longer required. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: (nullable) (transfer full): the state range hint + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_name_has_owner: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_action_group_get_action_state_type: + * @action_group: a #GActionGroup + * @action_name: the name of the action to query * - * Asynchronously invokes the NameHasOwner() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_name_has_owner_finish() to get the result of the operation. + * Queries the type of the state of the named action within + * @action_group. + * + * If the action is stateful then this function returns the + * #GVariantType of the state. All calls to + * g_action_group_change_action_state() must give a #GVariant of this + * type and g_action_group_get_action_state() will return a #GVariant + * of the same type. + * + * If the action is not stateful then this function will return %NULL. + * In that case, g_action_group_get_action_state() will return %NULL + * and you must not call g_action_group_change_action_state(). + * + * The state type of a particular action will never change but it is + * possible for an action to be removed and for a new action to be added + * with the same name but a different state type. * - * See _g_freedesktop_dbus_call_name_has_owner_sync() for the synchronous, blocking version of this method. + * Returns: (nullable): the state type, if the action is stateful + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_name_has_owner_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_has_owner: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_name_has_owner(). - * @error: Return location for error or %NULL. + * g_action_group_has_action: + * @action_group: a #GActionGroup + * @action_name: the name of the action to check for * - * Finishes an operation started with _g_freedesktop_dbus_call_name_has_owner(). + * Checks if the named action exists within @action_group. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: whether the named action exists + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_name_has_owner_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @out_has_owner: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * g_action_group_list_actions: + * @action_group: a #GActionGroup * - * Synchronously invokes the NameHasOwner() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * Lists the actions contained within @action_group. * - * See _g_freedesktop_dbus_call_name_has_owner() for the asynchronous version of this method. + * The caller is responsible for freeing the list with g_strfreev() when + * it is no longer required. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: (transfer full): a %NULL-terminated array of the names of the + * actions in the group + * Since: 2.28 */ /** - * _g_freedesktop_dbus_call_release_name: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_action_group_query_action: + * @action_group: a #GActionGroup + * @action_name: the name of an action in the group + * @enabled: (out): if the action is presently enabled + * @parameter_type: (out) (optional): the parameter type, or %NULL if none needed + * @state_type: (out) (optional): the state type, or %NULL if stateless + * @state_hint: (out) (optional): the state hint, or %NULL if none + * @state: (out) (optional): the current state, or %NULL if stateless * - * Asynchronously invokes the ReleaseName() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_release_name_finish() to get the result of the operation. + * Queries all aspects of the named action within an @action_group. * - * See _g_freedesktop_dbus_call_release_name_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_release_name_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_value: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_release_name(). - * @error: Return location for error or %NULL. + * This function acquires the information available from + * g_action_group_has_action(), g_action_group_get_action_enabled(), + * g_action_group_get_action_parameter_type(), + * g_action_group_get_action_state_type(), + * g_action_group_get_action_state_hint() and + * g_action_group_get_action_state() with a single function call. * - * Finishes an operation started with _g_freedesktop_dbus_call_release_name(). + * This provides two main benefits. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_release_name_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @out_value: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * The first is the improvement in efficiency that comes with not having + * to perform repeated lookups of the action in order to discover + * different things about it. The second is that implementing + * #GActionGroup can now be done by only overriding this one virtual + * function. * - * Synchronously invokes the ReleaseName() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * The interface provides a default implementation of this function that + * calls the individual functions, as required, to fetch the + * information. The interface also provides default implementations of + * those functions that call this function. All implementations, + * therefore, must override either this function or all of the others. * - * See _g_freedesktop_dbus_call_release_name() for the asynchronous version of this method. + * If the action exists, %TRUE is returned and any of the requested + * fields (as indicated by having a non-%NULL reference passed in) are + * filled. If the action doesn't exist, %FALSE is returned and the + * fields may or may not have been modified. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: %TRUE if the action exists, else %FALSE + * Since: 2.32 */ /** - * _g_freedesktop_dbus_call_reload_config: - * @proxy: A #_GFreedesktopDBusProxy. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_action_map_add_action: + * @action_map: a #GActionMap + * @action: a #GAction * - * Asynchronously invokes the ReloadConfig() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_reload_config_finish() to get the result of the operation. + * Adds an action to the @action_map. * - * See _g_freedesktop_dbus_call_reload_config_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_reload_config_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_reload_config(). - * @error: Return location for error or %NULL. + * If the action map already contains an action with the same name + * as @action then the old action is dropped from the action map. * - * Finishes an operation started with _g_freedesktop_dbus_call_reload_config(). + * The action map takes its own reference on @action. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Since: 2.32 */ /** - * _g_freedesktop_dbus_call_reload_config_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * g_action_map_add_action_entries: + * @action_map: a #GActionMap + * @entries: (array length=n_entries) (element-type GActionEntry): a pointer to + * the first item in an array of #GActionEntry structs + * @n_entries: the length of @entries, or -1 if @entries is %NULL-terminated + * @user_data: the user data for signal connections * - * Synchronously invokes the ReloadConfig() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * A convenience function for creating multiple #GSimpleAction instances + * and adding them to a #GActionMap. * - * See _g_freedesktop_dbus_call_reload_config() for the asynchronous version of this method. + * Each action is constructed as per one #GActionEntry. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_remove_match: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_rule: Argument to pass with the method invocation. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * |[ + * static void + * activate_quit (GSimpleAction *simple, + * GVariant *parameter, + * gpointer user_data) + * { + * exit (0); + * } * - * Asynchronously invokes the RemoveMatch() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_remove_match_finish() to get the result of the operation. + * static void + * activate_print_string (GSimpleAction *simple, + * GVariant *parameter, + * gpointer user_data) + * { + * g_print ("%s\n", g_variant_get_string (parameter, NULL)); + * } * - * See _g_freedesktop_dbus_call_remove_match_sync() for the synchronous, blocking version of this method. - */ - - -/** - * _g_freedesktop_dbus_call_remove_match_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_remove_match(). - * @error: Return location for error or %NULL. + * static GActionGroup * + * create_action_group (void) + * { + * const GActionEntry entries[] = { + * { "quit", activate_quit }, + * { "print-string", activate_print_string, "s" } + * }; + * GSimpleActionGroup *group; * - * Finishes an operation started with _g_freedesktop_dbus_call_remove_match(). + * group = g_simple_action_group_new (); + * g_action_map_add_action_entries (G_ACTION_MAP (group), entries, G_N_ELEMENTS (entries), NULL); + * + * return G_ACTION_GROUP (group); + * } + * ]| * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Since: 2.32 */ /** - * _g_freedesktop_dbus_call_remove_match_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_rule: Argument to pass with the method invocation. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * g_action_map_lookup_action: + * @action_map: a #GActionMap + * @action_name: the name of an action * - * Synchronously invokes the RemoveMatch() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * Looks up the action with the name @action_name in @action_map. * - * See _g_freedesktop_dbus_call_remove_match() for the asynchronous version of this method. + * If no such action exists, returns %NULL. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: (transfer none): a #GAction, or %NULL + * Since: 2.32 */ /** - * _g_freedesktop_dbus_call_request_name: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @arg_flags: Argument to pass with the method invocation. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_action_map_remove_action: + * @action_map: a #GActionMap + * @action_name: the name of the action + * + * Removes the named action from the action map. * - * Asynchronously invokes the RequestName() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_request_name_finish() to get the result of the operation. + * If no action of this name is in the map then nothing happens. * - * See _g_freedesktop_dbus_call_request_name_sync() for the synchronous, blocking version of this method. + * Since: 2.32 */ /** - * _g_freedesktop_dbus_call_request_name_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_value: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_request_name(). - * @error: Return location for error or %NULL. + * g_action_name_is_valid: + * @action_name: a potential action name + * + * Checks if @action_name is valid. + * + * @action_name is valid if it consists only of alphanumeric characters, + * plus '-' and '.'. The empty string is not a valid action name. * - * Finishes an operation started with _g_freedesktop_dbus_call_request_name(). + * It is an error to call this function with a non-utf8 @action_name. + * @action_name must not be %NULL. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: %TRUE if @action_name is valid + * Since: 2.38 */ /** - * _g_freedesktop_dbus_call_request_name_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @arg_flags: Argument to pass with the method invocation. - * @out_value: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * g_action_parse_detailed_name: + * @detailed_name: a detailed action name + * @action_name: (out): the action name + * @target_value: (out): the target value, or %NULL for no target + * @error: a pointer to a %NULL #GError, or %NULL * - * Synchronously invokes the RequestName() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * Parses a detailed action name into its separate name and target + * components. * - * See _g_freedesktop_dbus_call_request_name() for the asynchronous version of this method. + * Detailed action names can have three formats. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_start_service_by_name: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @arg_flags: Argument to pass with the method invocation. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * The first format is used to represent an action name with no target + * value and consists of just an action name containing no whitespace + * nor the characters ':', '(' or ')'. For example: "app.action". + * + * The second format is used to represent an action with a target value + * that is a non-empty string consisting only of alphanumerics, plus '-' + * and '.'. In that case, the action name and target value are + * separated by a double colon ("::"). For example: + * "app.action::target". * - * Asynchronously invokes the StartServiceByName() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_start_service_by_name_finish() to get the result of the operation. + * The third format is used to represent an action with any type of + * target value, including strings. The target value follows the action + * name, surrounded in parens. For example: "app.action(42)". The + * target value is parsed using g_variant_parse(). If a tuple-typed + * value is desired, it must be specified in the same way, resulting in + * two sets of parens, for example: "app.action((1,2,3))". A string + * target can be specified this way as well: "app.action('target')". + * For strings, this third format must be used if * target value is + * empty or contains characters other than alphanumerics, '-' and '.'. * - * See _g_freedesktop_dbus_call_start_service_by_name_sync() for the synchronous, blocking version of this method. + * Returns: %TRUE if successful, else %FALSE with @error set + * Since: 2.38 */ /** - * _g_freedesktop_dbus_call_start_service_by_name_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @out_value: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_start_service_by_name(). - * @error: Return location for error or %NULL. + * g_action_print_detailed_name: + * @action_name: a valid action name + * @target_value: (nullable): a #GVariant target value, or %NULL * - * Finishes an operation started with _g_freedesktop_dbus_call_start_service_by_name(). + * Formats a detailed action name from @action_name and @target_value. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * _g_freedesktop_dbus_call_start_service_by_name_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_name: Argument to pass with the method invocation. - * @arg_flags: Argument to pass with the method invocation. - * @out_value: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * It is an error to call this function with an invalid action name. * - * Synchronously invokes the StartServiceByName() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * This function is the opposite of g_action_parse_detailed_name(). + * It will produce a string that can be parsed back to the @action_name + * and @target_value by that function. * - * See _g_freedesktop_dbus_call_start_service_by_name() for the asynchronous version of this method. + * See that function for the types of strings that will be printed by + * this function. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: a detailed format string + * Since: 2.38 */ /** - * _g_freedesktop_dbus_call_update_activation_environment: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_environment: Argument to pass with the method invocation. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_app_info_add_supports_type: + * @appinfo: a #GAppInfo. + * @content_type: a string. + * @error: a #GError. * - * Asynchronously invokes the UpdateActivationEnvironment() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_call_update_activation_environment_finish() to get the result of the operation. + * Adds a content type to the application information to indicate the + * application is capable of opening files with the given content type. * - * See _g_freedesktop_dbus_call_update_activation_environment_sync() for the synchronous, blocking version of this method. + * Returns: %TRUE on success, %FALSE on error. */ /** - * _g_freedesktop_dbus_call_update_activation_environment_finish: - * @proxy: A #_GFreedesktopDBusProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_call_update_activation_environment(). - * @error: Return location for error or %NULL. + * g_app_info_can_delete: + * @appinfo: a #GAppInfo * - * Finishes an operation started with _g_freedesktop_dbus_call_update_activation_environment(). + * Obtains the information whether the #GAppInfo can be deleted. + * See g_app_info_delete(). * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: %TRUE if @appinfo can be deleted + * Since: 2.20 */ /** - * _g_freedesktop_dbus_call_update_activation_environment_sync: - * @proxy: A #_GFreedesktopDBusProxy. - * @arg_environment: Argument to pass with the method invocation. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the UpdateActivationEnvironment() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * g_app_info_can_remove_supports_type: + * @appinfo: a #GAppInfo. * - * See _g_freedesktop_dbus_call_update_activation_environment() for the asynchronous version of this method. + * Checks if a supported content type can be removed from an application. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: %TRUE if it is possible to remove supported + * content types from a given @appinfo, %FALSE if not. */ /** - * _g_freedesktop_dbus_complete_add_match: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. + * g_app_info_create_from_commandline: + * @commandline: (type filename): the commandline to use + * @application_name: (nullable): the application name, or %NULL to use @commandline + * @flags: flags that can specify details of the created #GAppInfo + * @error: a #GError location to store the error occurring, %NULL to ignore. + * + * Creates a new #GAppInfo from the given information. * - * Helper function used in service implementations to finish handling invocations of the AddMatch() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Note that for @commandline, the quoting rules of the Exec key of the + * [freedesktop.org Desktop Entry Specification](http://freedesktop.org/Standards/desktop-entry-spec) + * are applied. For example, if the @commandline contains + * percent-encoded URIs, the percent-character must be doubled in order to prevent it from + * being swallowed by Exec key unquoting. See the specification for exact quoting rules. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: (transfer full): new #GAppInfo for given command. */ /** - * _g_freedesktop_dbus_complete_get_connection_selinux_security_context: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @security_context: Parameter to return. + * g_app_info_delete: (virtual do_delete) + * @appinfo: a #GAppInfo * - * Helper function used in service implementations to finish handling invocations of the GetConnectionSELinuxSecurityContext() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Tries to delete a #GAppInfo. + * + * On some platforms, there may be a difference between user-defined + * #GAppInfos which can be deleted, and system-wide ones which cannot. + * See g_app_info_can_delete(). * - * This method will free @invocation, you cannot use it afterwards. + * Returns: %TRUE if @appinfo has been deleted + * Since: 2.20 */ /** - * _g_freedesktop_dbus_complete_get_connection_unix_process_id: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @pid: Parameter to return. + * g_app_info_dup: + * @appinfo: a #GAppInfo. * - * Helper function used in service implementations to finish handling invocations of the GetConnectionUnixProcessID() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Creates a duplicate of a #GAppInfo. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: (transfer full): a duplicate of @appinfo. */ /** - * _g_freedesktop_dbus_complete_get_connection_unix_user: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @uid: Parameter to return. + * g_app_info_equal: + * @appinfo1: the first #GAppInfo. + * @appinfo2: the second #GAppInfo. * - * Helper function used in service implementations to finish handling invocations of the GetConnectionUnixUser() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Checks if two #GAppInfos are equal. + * + * Note that the check may not compare each individual + * field, and only does an identity check. In case detecting changes in the + * contents is needed, program code must additionally compare relevant fields. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise. */ /** - * _g_freedesktop_dbus_complete_get_id: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unique_id: Parameter to return. + * g_app_info_get_all: * - * Helper function used in service implementations to finish handling invocations of the GetId() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets a list of all of the applications currently registered + * on this system. + * + * For desktop files, this includes applications that have + * `NoDisplay=true` set or are excluded from display by means + * of `OnlyShowIn` or `NotShowIn`. See g_app_info_should_show(). + * The returned list does not include applications which have + * the `Hidden` key set. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: (element-type GAppInfo) (transfer full): a newly allocated #GList of references to #GAppInfos. */ /** - * _g_freedesktop_dbus_complete_get_name_owner: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unique_name: Parameter to return. + * g_app_info_get_all_for_type: + * @content_type: the content type to find a #GAppInfo for * - * Helper function used in service implementations to finish handling invocations of the GetNameOwner() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets a list of all #GAppInfos for a given content type, + * including the recommended and fallback #GAppInfos. See + * g_app_info_get_recommended_for_type() and + * g_app_info_get_fallback_for_type(). * - * This method will free @invocation, you cannot use it afterwards. + * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos + * for given @content_type or %NULL on error. */ /** - * _g_freedesktop_dbus_complete_hello: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @assigned_name: Parameter to return. + * g_app_info_get_commandline: + * @appinfo: a #GAppInfo * - * Helper function used in service implementations to finish handling invocations of the Hello() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets the commandline with which the application will be + * started. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: (type filename): a string containing the @appinfo's commandline, + * or %NULL if this information is not available + * Since: 2.20 */ /** - * _g_freedesktop_dbus_complete_list_activatable_names: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @activatable_names: Parameter to return. + * g_app_info_get_default_for_type: + * @content_type: the content type to find a #GAppInfo for + * @must_support_uris: if %TRUE, the #GAppInfo is expected to + * support URIs * - * Helper function used in service implementations to finish handling invocations of the ListActivatableNames() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets the default #GAppInfo for a given content type. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: (transfer full): #GAppInfo for given @content_type or + * %NULL on error. */ /** - * _g_freedesktop_dbus_complete_list_names: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @names: Parameter to return. + * g_app_info_get_default_for_uri_scheme: + * @uri_scheme: a string containing a URI scheme. * - * Helper function used in service implementations to finish handling invocations of the ListNames() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets the default application for handling URIs with + * the given URI scheme. A URI scheme is the initial part + * of the URI, up to but not including the ':', e.g. "http", + * "ftp" or "sip". * - * This method will free @invocation, you cannot use it afterwards. + * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error. */ /** - * _g_freedesktop_dbus_complete_list_queued_owners: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @queued_owners: Parameter to return. + * g_app_info_get_description: + * @appinfo: a #GAppInfo. * - * Helper function used in service implementations to finish handling invocations of the ListQueuedOwners() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets a human-readable description of an installed application. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: a string containing a description of the + * application @appinfo, or %NULL if none. */ /** - * _g_freedesktop_dbus_complete_name_has_owner: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @has_owner: Parameter to return. + * g_app_info_get_display_name: + * @appinfo: a #GAppInfo. * - * Helper function used in service implementations to finish handling invocations of the NameHasOwner() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets the display name of the application. The display name is often more + * descriptive to the user than the name itself. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: the display name of the application for @appinfo, or the name if + * no display name is available. + * Since: 2.24 */ /** - * _g_freedesktop_dbus_complete_release_name: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @value: Parameter to return. + * g_app_info_get_executable: + * @appinfo: a #GAppInfo * - * Helper function used in service implementations to finish handling invocations of the ReleaseName() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets the executable's name for the installed application. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: (type filename): a string containing the @appinfo's application + * binaries name */ /** - * _g_freedesktop_dbus_complete_reload_config: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. + * g_app_info_get_fallback_for_type: + * @content_type: the content type to find a #GAppInfo for * - * Helper function used in service implementations to finish handling invocations of the ReloadConfig() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets a list of fallback #GAppInfos for a given content type, i.e. + * those applications which claim to support the given content type + * by MIME type subclassing and not directly. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos + * for given @content_type or %NULL on error. + * Since: 2.28 */ /** - * _g_freedesktop_dbus_complete_remove_match: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. + * g_app_info_get_icon: + * @appinfo: a #GAppInfo. * - * Helper function used in service implementations to finish handling invocations of the RemoveMatch() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets the icon for the application. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: (transfer none): the default #GIcon for @appinfo or %NULL + * if there is no default icon. */ /** - * _g_freedesktop_dbus_complete_request_name: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @value: Parameter to return. + * g_app_info_get_id: + * @appinfo: a #GAppInfo. * - * Helper function used in service implementations to finish handling invocations of the RequestName() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets the ID of an application. An id is a string that + * identifies the application. The exact format of the id is + * platform dependent. For instance, on Unix this is the + * desktop file id from the xdg menu specification. * - * This method will free @invocation, you cannot use it afterwards. + * Note that the returned ID may be %NULL, depending on how + * the @appinfo has been constructed. + * + * Returns: a string containing the application's ID. */ /** - * _g_freedesktop_dbus_complete_start_service_by_name: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @value: Parameter to return. + * g_app_info_get_name: + * @appinfo: a #GAppInfo. * - * Helper function used in service implementations to finish handling invocations of the StartServiceByName() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets the installed name of the application. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: the name of the application for @appinfo. */ /** - * _g_freedesktop_dbus_complete_update_activation_environment: - * @object: A #_GFreedesktopDBus. - * @invocation: (transfer full): A #GDBusMethodInvocation. + * g_app_info_get_recommended_for_type: + * @content_type: the content type to find a #GAppInfo for * - * Helper function used in service implementations to finish handling invocations of the UpdateActivationEnvironment() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets a list of recommended #GAppInfos for a given content type, i.e. + * those applications which claim to support the given content type exactly, + * and not by MIME type subclassing. + * Note that the first application of the list is the last used one, i.e. + * the last one for which g_app_info_set_as_last_used_for_type() has been + * called. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos + * for given @content_type or %NULL on error. + * Since: 2.28 */ /** - * _g_freedesktop_dbus_emit_name_acquired: - * @object: A #_GFreedesktopDBus. - * @arg_name: Argument to pass with the signal. + * g_app_info_get_supported_types: + * @appinfo: a #GAppInfo that can handle files + * + * Retrieves the list of content types that @app_info claims to support. + * If this information is not provided by the environment, this function + * will return %NULL. + * This function does not take in consideration associations added with + * g_app_info_add_supports_type(), but only those exported directly by + * the application. * - * Emits the "NameAcquired" D-Bus signal. + * Returns: (transfer none) (array zero-terminated=1) (element-type utf8): + * a list of content types. + * Since: 2.34 */ /** - * _g_freedesktop_dbus_emit_name_lost: - * @object: A #_GFreedesktopDBus. - * @arg_name: Argument to pass with the signal. + * g_app_info_launch: + * @appinfo: a #GAppInfo + * @files: (nullable) (element-type GFile): a #GList of #GFile objects + * @context: (nullable): a #GAppLaunchContext or %NULL + * @error: a #GError + * + * Launches the application. Passes @files to the launched application + * as arguments, using the optional @context to get information + * about the details of the launcher (like what screen it is on). + * On error, @error will be set accordingly. + * + * To launch the application without arguments pass a %NULL @files list. + * + * Note that even if the launch is successful the application launched + * can fail to start if it runs into problems during startup. There is + * no way to detect this. + * + * Some URIs can be changed when passed through a GFile (for instance + * unsupported URIs with strange formats like mailto:), so if you have + * a textual URI you want to pass in as argument, consider using + * g_app_info_launch_uris() instead. + * + * The launched application inherits the environment of the launching + * process, but it can be modified with g_app_launch_context_setenv() + * and g_app_launch_context_unsetenv(). + * + * On UNIX, this function sets the `GIO_LAUNCHED_DESKTOP_FILE` + * environment variable with the path of the launched desktop file and + * `GIO_LAUNCHED_DESKTOP_FILE_PID` to the process id of the launched + * process. This can be used to ignore `GIO_LAUNCHED_DESKTOP_FILE`, + * should it be inherited by further processes. The `DISPLAY` and + * `DESKTOP_STARTUP_ID` environment variables are also set, based + * on information provided in @context. * - * Emits the "NameLost" D-Bus signal. + * Returns: %TRUE on successful launch, %FALSE otherwise. */ /** - * _g_freedesktop_dbus_emit_name_owner_changed: - * @object: A #_GFreedesktopDBus. - * @arg_name: Argument to pass with the signal. - * @arg_old_owner: Argument to pass with the signal. - * @arg_new_owner: Argument to pass with the signal. + * g_app_info_launch_default_for_uri: + * @uri: the uri to show + * @context: (nullable): an optional #GAppLaunchContext + * @error: (nullable): return location for an error, or %NULL + * + * Utility function that launches the default application + * registered to handle the specified uri. Synchronous I/O + * is done on the uri to detect the type of the file if + * required. * - * Emits the "NameOwnerChanged" D-Bus signal. + * The D-Bus–activated applications don't have to be started if your application + * terminates too soon after this function. To prevent this, use + * g_app_info_launch_default_for_uri_async() instead. + * + * Returns: %TRUE on success, %FALSE on error. */ /** - * _g_freedesktop_dbus_interface_info: + * g_app_info_launch_default_for_uri_async: + * @uri: the uri to show + * @context: (nullable): an optional #GAppLaunchContext + * @cancellable: (nullable): a #GCancellable + * @callback: (nullable): a #GAsyncReadyCallback to call when the request is done + * @user_data: (nullable): data to pass to @callback + * + * Async version of g_app_info_launch_default_for_uri(). + * + * This version is useful if you are interested in receiving + * error information in the case where the application is + * sandboxed and the portal may present an application chooser + * dialog to the user. * - * Gets a machine-readable description of the org.freedesktop.DBus D-Bus interface. + * This is also useful if you want to be sure that the D-Bus–activated + * applications are really started before termination and if you are interested + * in receiving error information from their activation. * - * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. + * Since: 2.50 */ /** - * _g_freedesktop_dbus_override_properties: - * @klass: The class structure for a #GObject derived class. - * @property_id_begin: The property id to assign to the first overridden property. + * g_app_info_launch_default_for_uri_finish: + * @result: a #GAsyncResult + * @error: (nullable): return location for an error, or %NULL * - * Overrides all #GObject properties in the #_GFreedesktopDBus interface for a concrete class. - * The properties are overridden in the order they are defined. + * Finishes an asynchronous launch-default-for-uri operation. * - * Returns: The last property id. + * Returns: %TRUE if the launch was successful, %FALSE if @error is set + * Since: 2.50 */ /** - * _g_freedesktop_dbus_proxy_new: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. + * g_app_info_launch_uris: + * @appinfo: a #GAppInfo + * @uris: (nullable) (element-type utf8): a #GList containing URIs to launch. + * @context: (nullable): a #GAppLaunchContext or %NULL + * @error: a #GError + * + * Launches the application. This passes the @uris to the launched application + * as arguments, using the optional @context to get information + * about the details of the launcher (like what screen it is on). + * On error, @error will be set accordingly. * - * Asynchronously creates a proxy for the D-Bus interface org.freedesktop.DBus. See g_dbus_proxy_new() for more details. + * To launch the application without arguments pass a %NULL @uris list. * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_proxy_new_finish() to get the result of the operation. + * Note that even if the launch is successful the application launched + * can fail to start if it runs into problems during startup. There is + * no way to detect this. * - * See _g_freedesktop_dbus_proxy_new_sync() for the synchronous, blocking version of this constructor. + * Returns: %TRUE on successful launch, %FALSE otherwise. */ /** - * _g_freedesktop_dbus_proxy_new_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_proxy_new(). - * @error: Return location for error or %NULL + * g_app_info_launch_uris_async: + * @appinfo: a #GAppInfo + * @uris: (nullable) (element-type utf8): a #GList containing URIs to launch. + * @context: (nullable): a #GAppLaunchContext or %NULL + * @cancellable: (nullable): a #GCancellable + * @callback: (nullable): a #GAsyncReadyCallback to call when the request is done + * @user_data: (nullable): data to pass to @callback + * + * Async version of g_app_info_launch_uris(). * - * Finishes an operation started with _g_freedesktop_dbus_proxy_new(). + * The @callback is invoked immediately after the application launch, but it + * waits for activation in case of D-Bus–activated applications and also provides + * extended error information for sandboxed applications, see notes for + * g_app_info_launch_default_for_uri_async(). * - * Returns: (transfer full) (type _GFreedesktopDBusProxy): The constructed proxy object or %NULL if @error is set. + * Since: 2.60 */ /** - * _g_freedesktop_dbus_proxy_new_for_bus: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. - * - * Like _g_freedesktop_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection. + * g_app_info_launch_uris_finish: + * @appinfo: a #GAppInfo + * @result: a #GAsyncResult + * @error: (nullable): a #GError * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call _g_freedesktop_dbus_proxy_new_for_bus_finish() to get the result of the operation. + * Finishes a g_app_info_launch_uris_async() operation. * - * See _g_freedesktop_dbus_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. + * Returns: %TRUE on successful launch, %FALSE otherwise. + * Since: 2.60 */ /** - * _g_freedesktop_dbus_proxy_new_for_bus_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to _g_freedesktop_dbus_proxy_new_for_bus(). - * @error: Return location for error or %NULL + * g_app_info_monitor_get: + * + * Gets the #GAppInfoMonitor for the current thread-default main + * context. + * + * The #GAppInfoMonitor will emit a "changed" signal in the + * thread-default main context whenever the list of installed + * applications (as reported by g_app_info_get_all()) may have changed. * - * Finishes an operation started with _g_freedesktop_dbus_proxy_new_for_bus(). + * You must only call g_object_unref() on the return value from under + * the same main context as you created it. * - * Returns: (transfer full) (type _GFreedesktopDBusProxy): The constructed proxy object or %NULL if @error is set. + * Returns: (transfer full): a reference to a #GAppInfoMonitor + * Since: 2.40 */ /** - * _g_freedesktop_dbus_proxy_new_for_bus_sync: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL - * - * Like _g_freedesktop_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. - * - * The calling thread is blocked until a reply is received. + * g_app_info_remove_supports_type: + * @appinfo: a #GAppInfo. + * @content_type: a string. + * @error: a #GError. * - * See _g_freedesktop_dbus_proxy_new_for_bus() for the asynchronous version of this constructor. + * Removes a supported type from an application, if possible. * - * Returns: (transfer full) (type _GFreedesktopDBusProxy): The constructed proxy object or %NULL if @error is set. + * Returns: %TRUE on success, %FALSE on error. */ /** - * _g_freedesktop_dbus_proxy_new_sync: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL + * g_app_info_reset_type_associations: + * @content_type: a content type * - * Synchronously creates a proxy for the D-Bus interface org.freedesktop.DBus. See g_dbus_proxy_new_sync() for more details. + * Removes all changes to the type associations done by + * g_app_info_set_as_default_for_type(), + * g_app_info_set_as_default_for_extension(), + * g_app_info_add_supports_type() or + * g_app_info_remove_supports_type(). * - * The calling thread is blocked until a reply is received. + * Since: 2.20 + */ + + +/** + * g_app_info_set_as_default_for_extension: + * @appinfo: a #GAppInfo. + * @extension: (type filename): a string containing the file extension + * (without the dot). + * @error: a #GError. * - * See _g_freedesktop_dbus_proxy_new() for the asynchronous version of this constructor. + * Sets the application as the default handler for the given file extension. * - * Returns: (transfer full) (type _GFreedesktopDBusProxy): The constructed proxy object or %NULL if @error is set. + * Returns: %TRUE on success, %FALSE on error. */ /** - * _g_freedesktop_dbus_skeleton_new: + * g_app_info_set_as_default_for_type: + * @appinfo: a #GAppInfo. + * @content_type: the content type. + * @error: a #GError. * - * Creates a skeleton object for the D-Bus interface org.freedesktop.DBus. + * Sets the application as the default handler for a given type. * - * Returns: (transfer full) (type _GFreedesktopDBusSkeleton): The skeleton object. + * Returns: %TRUE on success, %FALSE on error. */ /** - * _g_io_module_extract_name: - * @filename: filename of a GIOModule + * g_app_info_set_as_last_used_for_type: + * @appinfo: a #GAppInfo. + * @content_type: the content type. + * @error: a #GError. * - * Extract the plugin name from its filename. It removes optional "lib" or - * "libgio" prefix, and removes everything after the first dot. For example: - * "libgiognutls.so" -> "gnutls". + * Sets the application as the last used application for a given type. + * This will make the application appear as first in the list returned + * by g_app_info_get_recommended_for_type(), regardless of the default + * application for that content type. * - * Returns: (transfer full): the module's name + * Returns: %TRUE on success, %FALSE on error. */ /** - * _g_io_module_get_default: - * @extension_point: the name of an extension point - * @envvar: (nullable): the name of an environment variable to - * override the default implementation. - * @verify_func: (nullable): a function to call to verify that - * a given implementation is usable in the current environment. - * - * Retrieves the default object implementing @extension_point. + * g_app_info_should_show: + * @appinfo: a #GAppInfo. * - * If @envvar is not %NULL, and the environment variable with that - * name is set, then the implementation it specifies will be tried - * first. After that, or if @envvar is not set, all other - * implementations will be tried in order of decreasing priority. + * Checks if the application info should be shown in menus that + * list available applications. * - * If an extension point implementation implements #GInitable, then - * that implementation will only be used if it initializes - * successfully. Otherwise, if @verify_func is not %NULL, then it will - * be called on each candidate implementation after construction, to - * check if it is actually usable or not. + * Returns: %TRUE if the @appinfo should be shown, %FALSE otherwise. + */ + + +/** + * g_app_info_supports_files: + * @appinfo: a #GAppInfo. * - * The result is cached after it is generated the first time, and - * the function is thread-safe. + * Checks if the application accepts files as arguments. * - * Returns: (transfer none): an object implementing - * @extension_point, or %NULL if there are no usable - * implementations. + * Returns: %TRUE if the @appinfo supports files. */ /** - * _g_io_module_get_default_type: - * @extension_point: the name of an extension point - * @envvar: (nullable): the name of an environment variable to - * override the default implementation. - * @is_supported_offset: a vtable offset, or zero - * - * Retrieves the default class implementing @extension_point. + * g_app_info_supports_uris: + * @appinfo: a #GAppInfo. * - * If @envvar is not %NULL, and the environment variable with that - * name is set, then the implementation it specifies will be tried - * first. After that, or if @envvar is not set, all other - * implementations will be tried in order of decreasing priority. + * Checks if the application supports reading files and directories from URIs. * - * If @is_supported_offset is non-zero, then it is the offset into the - * class vtable at which there is a function that takes no arguments and - * returns a boolean. This function will be called on each candidate - * implementation to check if it is actually usable or not. + * Returns: %TRUE if the @appinfo supports URIs. + */ + + +/** + * g_app_launch_context_get_display: + * @context: a #GAppLaunchContext + * @info: a #GAppInfo + * @files: (element-type GFile): a #GList of #GFile objects * - * The result is cached after it is generated the first time, and - * the function is thread-safe. + * Gets the display string for the @context. This is used to ensure new + * applications are started on the same display as the launching + * application, by setting the `DISPLAY` environment variable. * - * Returns: (transfer none): an object implementing - * @extension_point, or %NULL if there are no usable - * implementations. + * Returns: a display string for the display. */ /** - * _g_poll_file_monitor_new: - * @file: a #GFile. + * g_app_launch_context_get_environment: + * @context: a #GAppLaunchContext * - * Polls @file for changes. + * Gets the complete environment variable list to be passed to + * the child process when @context is used to launch an application. + * This is a %NULL-terminated array of strings, where each string has + * the form `KEY=VALUE`. * - * Returns: a new #GFileMonitor for the given #GFile. + * Returns: (array zero-terminated=1) (element-type filename) (transfer full): + * the child's environment + * Since: 2.32 */ /** - * g_action_activate: - * @action: a #GAction - * @parameter: (nullable): the parameter to the activation - * - * Activates the action. + * g_app_launch_context_get_startup_notify_id: + * @context: a #GAppLaunchContext + * @info: a #GAppInfo + * @files: (element-type GFile): a #GList of of #GFile objects * - * @parameter must be the correct type of parameter for the action (ie: - * the parameter type given at construction time). If the parameter - * type was %NULL then @parameter must also be %NULL. + * Initiates startup notification for the application and returns the + * `DESKTOP_STARTUP_ID` for the launched operation, if supported. * - * If the @parameter GVariant is floating, it is consumed. + * Startup notification IDs are defined in the + * [FreeDesktop.Org Startup Notifications standard](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt). * - * Since: 2.28 + * Returns: a startup notification ID for the application, or %NULL if + * not supported. */ /** - * g_action_change_state: - * @action: a #GAction - * @value: the new state - * - * Request for the state of @action to be changed to @value. - * - * The action must be stateful and @value must be of the correct type. - * See g_action_get_state_type(). + * g_app_launch_context_launch_failed: + * @context: a #GAppLaunchContext. + * @startup_notify_id: the startup notification id that was returned by g_app_launch_context_get_startup_notify_id(). * - * This call merely requests a change. The action may refuse to change - * its state or may change its state to something other than @value. - * See g_action_get_state_hint(). + * Called when an application has failed to launch, so that it can cancel + * the application startup notification started in g_app_launch_context_get_startup_notify_id(). + */ + + +/** + * g_app_launch_context_new: * - * If the @value GVariant is floating, it is consumed. + * Creates a new application launch context. This is not normally used, + * instead you instantiate a subclass of this, such as #GdkAppLaunchContext. * - * Since: 2.30 + * Returns: a #GAppLaunchContext. */ /** - * g_action_get_enabled: - * @action: a #GAction - * - * Checks if @action is currently enabled. + * g_app_launch_context_setenv: + * @context: a #GAppLaunchContext + * @variable: (type filename): the environment variable to set + * @value: (type filename): the value for to set the variable to. * - * An action must be enabled in order to be activated or in order to - * have its state changed from outside callers. + * Arranges for @variable to be set to @value in the child's + * environment when @context is used to launch an application. * - * Returns: whether the action is enabled - * Since: 2.28 + * Since: 2.32 */ /** - * g_action_get_name: - * @action: a #GAction + * g_app_launch_context_unsetenv: + * @context: a #GAppLaunchContext + * @variable: (type filename): the environment variable to remove * - * Queries the name of @action. + * Arranges for @variable to be unset in the child's environment + * when @context is used to launch an application. * - * Returns: the name of the action - * Since: 2.28 + * Since: 2.32 */ /** - * g_action_get_parameter_type: - * @action: a #GAction + * g_application_activate: + * @application: a #GApplication * - * Queries the type of the parameter that must be given when activating - * @action. + * Activates the application. * - * When activating the action using g_action_activate(), the #GVariant - * given to that function must be of the type returned by this function. + * In essence, this results in the #GApplication::activate signal being + * emitted in the primary instance. * - * In the case that this function returns %NULL, you must not give any - * #GVariant, but %NULL instead. + * The application must be registered before calling this function. * - * Returns: (nullable): the parameter type * Since: 2.28 */ /** - * g_action_get_state: - * @action: a #GAction + * g_application_add_main_option: + * @application: the #GApplication + * @long_name: the long name of an option used to specify it in a commandline + * @short_name: the short name of an option + * @flags: flags from #GOptionFlags + * @arg: the type of the option, as a #GOptionArg + * @description: the description for the option in `--help` output + * @arg_description: (nullable): the placeholder to use for the extra argument + * parsed by the option in `--help` output * - * Queries the current state of @action. + * Add an option to be handled by @application. * - * If the action is not stateful then %NULL will be returned. If the - * action is stateful then the type of the return value is the type - * given by g_action_get_state_type(). + * Calling this function is the equivalent of calling + * g_application_add_main_option_entries() with a single #GOptionEntry + * that has its arg_data member set to %NULL. * - * The return value (if non-%NULL) should be freed with - * g_variant_unref() when it is no longer required. + * The parsed arguments will be packed into a #GVariantDict which + * is passed to #GApplication::handle-local-options. If + * %G_APPLICATION_HANDLES_COMMAND_LINE is set, then it will also + * be sent to the primary instance. See + * g_application_add_main_option_entries() for more details. * - * Returns: (transfer full): the current state of the action - * Since: 2.28 + * See #GOptionEntry for more documentation of the arguments. + * + * Since: 2.42 */ /** - * g_action_get_state_hint: - * @action: a #GAction + * g_application_add_main_option_entries: + * @application: a #GApplication + * @entries: (array zero-terminated=1) (element-type GOptionEntry): a + * %NULL-terminated list of #GOptionEntrys * - * Requests a hint about the valid range of values for the state of - * @action. + * Adds main option entries to be handled by @application. * - * If %NULL is returned it either means that the action is not stateful - * or that there is no hint about the valid range of values for the - * state of the action. + * This function is comparable to g_option_context_add_main_entries(). * - * If a #GVariant array is returned then each item in the array is a - * possible value for the state. If a #GVariant pair (ie: two-tuple) is - * returned then the tuple specifies the inclusive lower and upper bound - * of valid values for the state. + * After the commandline arguments are parsed, the + * #GApplication::handle-local-options signal will be emitted. At this + * point, the application can inspect the values pointed to by @arg_data + * in the given #GOptionEntrys. * - * In any case, the information is merely a hint. It may be possible to - * have a state value outside of the hinted range and setting a value - * within the range may fail. + * Unlike #GOptionContext, #GApplication supports giving a %NULL + * @arg_data for a non-callback #GOptionEntry. This results in the + * argument in question being packed into a #GVariantDict which is also + * passed to #GApplication::handle-local-options, where it can be + * inspected and modified. If %G_APPLICATION_HANDLES_COMMAND_LINE is + * set, then the resulting dictionary is sent to the primary instance, + * where g_application_command_line_get_options_dict() will return it. + * This "packing" is done according to the type of the argument -- + * booleans for normal flags, strings for strings, bytestrings for + * filenames, etc. The packing only occurs if the flag is given (ie: we + * do not pack a "false" #GVariant in the case that a flag is missing). * - * The return value (if non-%NULL) should be freed with - * g_variant_unref() when it is no longer required. + * In general, it is recommended that all commandline arguments are + * parsed locally. The options dictionary should then be used to + * transmit the result of the parsing to the primary instance, where + * g_variant_dict_lookup() can be used. For local options, it is + * possible to either use @arg_data in the usual way, or to consult (and + * potentially remove) the option from the options dictionary. * - * Returns: (nullable) (transfer full): the state range hint - * Since: 2.28 + * This function is new in GLib 2.40. Before then, the only real choice + * was to send all of the commandline arguments (options and all) to the + * primary instance for handling. #GApplication ignored them completely + * on the local side. Calling this function "opts in" to the new + * behaviour, and in particular, means that unrecognised options will be + * treated as errors. Unrecognised options have never been ignored when + * %G_APPLICATION_HANDLES_COMMAND_LINE is unset. + * + * If #GApplication::handle-local-options needs to see the list of + * filenames, then the use of %G_OPTION_REMAINING is recommended. If + * @arg_data is %NULL then %G_OPTION_REMAINING can be used as a key into + * the options dictionary. If you do use %G_OPTION_REMAINING then you + * need to handle these arguments for yourself because once they are + * consumed, they will no longer be visible to the default handling + * (which treats them as filenames to be opened). + * + * It is important to use the proper GVariant format when retrieving + * the options with g_variant_dict_lookup(): + * - for %G_OPTION_ARG_NONE, use `b` + * - for %G_OPTION_ARG_STRING, use `&s` + * - for %G_OPTION_ARG_INT, use `i` + * - for %G_OPTION_ARG_INT64, use `x` + * - for %G_OPTION_ARG_DOUBLE, use `d` + * - for %G_OPTION_ARG_FILENAME, use `^&ay` + * - for %G_OPTION_ARG_STRING_ARRAY, use `^a&s` + * - for %G_OPTION_ARG_FILENAME_ARRAY, use `^a&ay` + * + * Since: 2.40 */ /** - * g_action_get_state_type: - * @action: a #GAction + * g_application_add_option_group: + * @application: the #GApplication + * @group: (transfer full): a #GOptionGroup * - * Queries the type of the state of @action. + * Adds a #GOptionGroup to the commandline handling of @application. * - * If the action is stateful (e.g. created with - * g_simple_action_new_stateful()) then this function returns the - * #GVariantType of the state. This is the type of the initial value - * given as the state. All calls to g_action_change_state() must give a - * #GVariant of this type and g_action_get_state() will return a - * #GVariant of the same type. + * This function is comparable to g_option_context_add_group(). * - * If the action is not stateful (e.g. created with g_simple_action_new()) - * then this function will return %NULL. In that case, g_action_get_state() - * will return %NULL and you must not call g_action_change_state(). + * Unlike g_application_add_main_option_entries(), this function does + * not deal with %NULL @arg_data and never transmits options to the + * primary instance. * - * Returns: (nullable): the state type, if the action is stateful - * Since: 2.28 + * The reason for that is because, by the time the options arrive at the + * primary instance, it is typically too late to do anything with them. + * Taking the GTK option group as an example: GTK will already have been + * initialised by the time the #GApplication::command-line handler runs. + * In the case that this is not the first-running instance of the + * application, the existing instance may already have been running for + * a very long time. + * + * This means that the options from #GOptionGroup are only really usable + * in the case that the instance of the application being run is the + * first instance. Passing options like `--display=` or `--gdk-debug=` + * on future runs will have no effect on the existing primary instance. + * + * Calling this function will cause the options in the supplied option + * group to be parsed, but it does not cause you to be "opted in" to the + * new functionality whereby unrecognised options are rejected even if + * %G_APPLICATION_HANDLES_COMMAND_LINE was given. + * + * Since: 2.40 */ /** - * g_action_group_action_added: - * @action_group: a #GActionGroup - * @action_name: the name of an action in the group + * g_application_bind_busy_property: + * @application: a #GApplication + * @object: (type GObject.Object): a #GObject + * @property: the name of a boolean property of @object * - * Emits the #GActionGroup::action-added signal on @action_group. + * Marks @application as busy (see g_application_mark_busy()) while + * @property on @object is %TRUE. * - * This function should only be called by #GActionGroup implementations. + * The binding holds a reference to @application while it is active, but + * not to @object. Instead, the binding is destroyed when @object is + * finalized. * - * Since: 2.28 + * Since: 2.44 */ /** - * g_action_group_action_enabled_changed: - * @action_group: a #GActionGroup - * @action_name: the name of an action in the group - * @enabled: whether or not the action is now enabled + * g_application_command_line_create_file_for_arg: + * @cmdline: a #GApplicationCommandLine + * @arg: (type filename): an argument from @cmdline * - * Emits the #GActionGroup::action-enabled-changed signal on @action_group. + * Creates a #GFile corresponding to a filename that was given as part + * of the invocation of @cmdline. * - * This function should only be called by #GActionGroup implementations. + * This differs from g_file_new_for_commandline_arg() in that it + * resolves relative pathnames using the current working directory of + * the invoking process rather than the local process. * - * Since: 2.28 + * Returns: (transfer full): a new #GFile + * Since: 2.36 */ /** - * g_action_group_action_removed: - * @action_group: a #GActionGroup - * @action_name: the name of an action in the group + * g_application_command_line_get_arguments: + * @cmdline: a #GApplicationCommandLine + * @argc: (out) (optional): the length of the arguments array, or %NULL * - * Emits the #GActionGroup::action-removed signal on @action_group. + * Gets the list of arguments that was passed on the command line. * - * This function should only be called by #GActionGroup implementations. + * The strings in the array may contain non-UTF-8 data on UNIX (such as + * filenames or arguments given in the system locale) but are always in + * UTF-8 on Windows. + * + * If you wish to use the return value with #GOptionContext, you must + * use g_option_context_parse_strv(). + * + * The return value is %NULL-terminated and should be freed using + * g_strfreev(). * + * Returns: (array length=argc) (element-type filename) (transfer full): + * the string array containing the arguments (the argv) * Since: 2.28 */ /** - * g_action_group_action_state_changed: - * @action_group: a #GActionGroup - * @action_name: the name of an action in the group - * @state: the new state of the named action + * g_application_command_line_get_cwd: + * @cmdline: a #GApplicationCommandLine * - * Emits the #GActionGroup::action-state-changed signal on @action_group. + * Gets the working directory of the command line invocation. + * The string may contain non-utf8 data. * - * This function should only be called by #GActionGroup implementations. + * It is possible that the remote application did not send a working + * directory, so this may be %NULL. + * + * The return value should not be modified or freed and is valid for as + * long as @cmdline exists. * + * Returns: (nullable) (type filename): the current directory, or %NULL * Since: 2.28 */ /** - * g_action_group_activate_action: - * @action_group: a #GActionGroup - * @action_name: the name of the action to activate - * @parameter: (nullable): parameters to the activation + * g_application_command_line_get_environ: + * @cmdline: a #GApplicationCommandLine * - * Activate the named action within @action_group. + * Gets the contents of the 'environ' variable of the command line + * invocation, as would be returned by g_get_environ(), ie as a + * %NULL-terminated list of strings in the form 'NAME=VALUE'. + * The strings may contain non-utf8 data. * - * If the action is expecting a parameter, then the correct type of - * parameter must be given as @parameter. If the action is expecting no - * parameters then @parameter must be %NULL. See - * g_action_group_get_action_parameter_type(). + * The remote application usually does not send an environment. Use + * %G_APPLICATION_SEND_ENVIRONMENT to affect that. Even with this flag + * set it is possible that the environment is still not available (due + * to invocation messages from other applications). + * + * The return value should not be modified or freed and is valid for as + * long as @cmdline exists. + * + * See g_application_command_line_getenv() if you are only interested + * in the value of a single environment variable. * + * Returns: (array zero-terminated=1) (element-type filename) (transfer none): + * the environment strings, or %NULL if they were not sent * Since: 2.28 */ /** - * g_action_group_change_action_state: - * @action_group: a #GActionGroup - * @action_name: the name of the action to request the change on - * @value: the new state - * - * Request for the state of the named action within @action_group to be - * changed to @value. - * - * The action must be stateful and @value must be of the correct type. - * See g_action_group_get_action_state_type(). - * - * This call merely requests a change. The action may refuse to change - * its state or may change its state to something other than @value. - * See g_action_group_get_action_state_hint(). + * g_application_command_line_get_exit_status: + * @cmdline: a #GApplicationCommandLine * - * If the @value GVariant is floating, it is consumed. + * Gets the exit status of @cmdline. See + * g_application_command_line_set_exit_status() for more information. * + * Returns: the exit status * Since: 2.28 */ /** - * g_action_group_get_action_enabled: - * @action_group: a #GActionGroup - * @action_name: the name of the action to query - * - * Checks if the named action within @action_group is currently enabled. + * g_application_command_line_get_is_remote: + * @cmdline: a #GApplicationCommandLine * - * An action must be enabled in order to be activated or in order to - * have its state changed from outside callers. + * Determines if @cmdline represents a remote invocation. * - * Returns: whether or not the action is currently enabled + * Returns: %TRUE if the invocation was remote * Since: 2.28 */ /** - * g_action_group_get_action_parameter_type: - * @action_group: a #GActionGroup - * @action_name: the name of the action to query - * - * Queries the type of the parameter that must be given when activating - * the named action within @action_group. + * g_application_command_line_get_options_dict: + * @cmdline: a #GApplicationCommandLine * - * When activating the action using g_action_group_activate_action(), - * the #GVariant given to that function must be of the type returned - * by this function. + * Gets the options there were passed to g_application_command_line(). * - * In the case that this function returns %NULL, you must not give any - * #GVariant, but %NULL instead. + * If you did not override local_command_line() then these are the same + * options that were parsed according to the #GOptionEntrys added to the + * application with g_application_add_main_option_entries() and possibly + * modified from your GApplication::handle-local-options handler. * - * The parameter type of a particular action will never change but it is - * possible for an action to be removed and for a new action to be added - * with the same name but a different parameter type. + * If no options were sent then an empty dictionary is returned so that + * you don't need to check for %NULL. * - * Returns: (nullable): the parameter type - * Since: 2.28 + * Returns: (transfer none): a #GVariantDict with the options + * Since: 2.40 */ /** - * g_action_group_get_action_state: - * @action_group: a #GActionGroup - * @action_name: the name of the action to query + * g_application_command_line_get_platform_data: + * @cmdline: #GApplicationCommandLine * - * Queries the current state of the named action within @action_group. + * Gets the platform data associated with the invocation of @cmdline. * - * If the action is not stateful then %NULL will be returned. If the - * action is stateful then the type of the return value is the type - * given by g_action_group_get_action_state_type(). + * This is a #GVariant dictionary containing information about the + * context in which the invocation occurred. It typically contains + * information like the current working directory and the startup + * notification ID. * - * The return value (if non-%NULL) should be freed with - * g_variant_unref() when it is no longer required. + * For local invocation, it will be %NULL. * - * Returns: (nullable): the current state of the action + * Returns: (nullable): the platform data, or %NULL * Since: 2.28 */ /** - * g_action_group_get_action_state_hint: - * @action_group: a #GActionGroup - * @action_name: the name of the action to query - * - * Requests a hint about the valid range of values for the state of the - * named action within @action_group. - * - * If %NULL is returned it either means that the action is not stateful - * or that there is no hint about the valid range of values for the - * state of the action. + * g_application_command_line_get_stdin: + * @cmdline: a #GApplicationCommandLine * - * If a #GVariant array is returned then each item in the array is a - * possible value for the state. If a #GVariant pair (ie: two-tuple) is - * returned then the tuple specifies the inclusive lower and upper bound - * of valid values for the state. + * Gets the stdin of the invoking process. * - * In any case, the information is merely a hint. It may be possible to - * have a state value outside of the hinted range and setting a value - * within the range may fail. + * The #GInputStream can be used to read data passed to the standard + * input of the invoking process. + * This doesn't work on all platforms. Presently, it is only available + * on UNIX when using a DBus daemon capable of passing file descriptors. + * If stdin is not available then %NULL will be returned. In the + * future, support may be expanded to other platforms. * - * The return value (if non-%NULL) should be freed with - * g_variant_unref() when it is no longer required. + * You must only call this function once per commandline invocation. * - * Returns: (nullable) (transfer full): the state range hint - * Since: 2.28 + * Returns: (transfer full): a #GInputStream for stdin + * Since: 2.34 */ /** - * g_action_group_get_action_state_type: - * @action_group: a #GActionGroup - * @action_name: the name of the action to query - * - * Queries the type of the state of the named action within - * @action_group. + * g_application_command_line_getenv: + * @cmdline: a #GApplicationCommandLine + * @name: (type filename): the environment variable to get * - * If the action is stateful then this function returns the - * #GVariantType of the state. All calls to - * g_action_group_change_action_state() must give a #GVariant of this - * type and g_action_group_get_action_state() will return a #GVariant - * of the same type. + * Gets the value of a particular environment variable of the command + * line invocation, as would be returned by g_getenv(). The strings may + * contain non-utf8 data. * - * If the action is not stateful then this function will return %NULL. - * In that case, g_action_group_get_action_state() will return %NULL - * and you must not call g_action_group_change_action_state(). + * The remote application usually does not send an environment. Use + * %G_APPLICATION_SEND_ENVIRONMENT to affect that. Even with this flag + * set it is possible that the environment is still not available (due + * to invocation messages from other applications). * - * The state type of a particular action will never change but it is - * possible for an action to be removed and for a new action to be added - * with the same name but a different state type. + * The return value should not be modified or freed and is valid for as + * long as @cmdline exists. * - * Returns: (nullable): the state type, if the action is stateful + * Returns: the value of the variable, or %NULL if unset or unsent * Since: 2.28 */ /** - * g_action_group_has_action: - * @action_group: a #GActionGroup - * @action_name: the name of the action to check for + * g_application_command_line_print: + * @cmdline: a #GApplicationCommandLine + * @format: a printf-style format string + * @...: arguments, as per @format * - * Checks if the named action exists within @action_group. + * Formats a message and prints it using the stdout print handler in the + * invoking process. + * + * If @cmdline is a local invocation then this is exactly equivalent to + * g_print(). If @cmdline is remote then this is equivalent to calling + * g_print() in the invoking process. * - * Returns: whether the named action exists * Since: 2.28 */ /** - * g_action_group_list_actions: - * @action_group: a #GActionGroup + * g_application_command_line_printerr: + * @cmdline: a #GApplicationCommandLine + * @format: a printf-style format string + * @...: arguments, as per @format * - * Lists the actions contained within @action_group. + * Formats a message and prints it using the stderr print handler in the + * invoking process. * - * The caller is responsible for freeing the list with g_strfreev() when - * it is no longer required. + * If @cmdline is a local invocation then this is exactly equivalent to + * g_printerr(). If @cmdline is remote then this is equivalent to + * calling g_printerr() in the invoking process. * - * Returns: (transfer full): a %NULL-terminated array of the names of the - * actions in the group * Since: 2.28 */ /** - * g_action_group_query_action: - * @action_group: a #GActionGroup - * @action_name: the name of an action in the group - * @enabled: (out): if the action is presently enabled - * @parameter_type: (out) (optional): the parameter type, or %NULL if none needed - * @state_type: (out) (optional): the state type, or %NULL if stateless - * @state_hint: (out) (optional): the state hint, or %NULL if none - * @state: (out) (optional): the current state, or %NULL if stateless - * - * Queries all aspects of the named action within an @action_group. - * - * This function acquires the information available from - * g_action_group_has_action(), g_action_group_get_action_enabled(), - * g_action_group_get_action_parameter_type(), - * g_action_group_get_action_state_type(), - * g_action_group_get_action_state_hint() and - * g_action_group_get_action_state() with a single function call. + * g_application_command_line_set_exit_status: + * @cmdline: a #GApplicationCommandLine + * @exit_status: the exit status * - * This provides two main benefits. + * Sets the exit status that will be used when the invoking process + * exits. * - * The first is the improvement in efficiency that comes with not having - * to perform repeated lookups of the action in order to discover - * different things about it. The second is that implementing - * #GActionGroup can now be done by only overriding this one virtual - * function. + * The return value of the #GApplication::command-line signal is + * passed to this function when the handler returns. This is the usual + * way of setting the exit status. * - * The interface provides a default implementation of this function that - * calls the individual functions, as required, to fetch the - * information. The interface also provides default implementations of - * those functions that call this function. All implementations, - * therefore, must override either this function or all of the others. + * In the event that you want the remote invocation to continue running + * and want to decide on the exit status in the future, you can use this + * call. For the case of a remote invocation, the remote process will + * typically exit when the last reference is dropped on @cmdline. The + * exit status of the remote process will be equal to the last value + * that was set with this function. * - * If the action exists, %TRUE is returned and any of the requested - * fields (as indicated by having a non-%NULL reference passed in) are - * filled. If the action doesn't exist, %FALSE is returned and the - * fields may or may not have been modified. + * In the case that the commandline invocation is local, the situation + * is slightly more complicated. If the commandline invocation results + * in the mainloop running (ie: because the use-count of the application + * increased to a non-zero value) then the application is considered to + * have been 'successful' in a certain sense, and the exit status is + * always zero. If the application use count is zero, though, the exit + * status of the local #GApplicationCommandLine is used. * - * Returns: %TRUE if the action exists, else %FALSE - * Since: 2.32 + * Since: 2.28 */ /** - * g_action_map_add_action: - * @action_map: a #GActionMap - * @action: a #GAction - * - * Adds an action to the @action_map. - * - * If the action map already contains an action with the same name - * as @action then the old action is dropped from the action map. + * g_application_get_application_id: + * @application: a #GApplication * - * The action map takes its own reference on @action. + * Gets the unique identifier for @application. * - * Since: 2.32 + * Returns: the identifier for @application, owned by @application + * Since: 2.28 */ /** - * g_action_map_add_action_entries: - * @action_map: a #GActionMap - * @entries: (array length=n_entries) (element-type GActionEntry): a pointer to - * the first item in an array of #GActionEntry structs - * @n_entries: the length of @entries, or -1 if @entries is %NULL-terminated - * @user_data: the user data for signal connections - * - * A convenience function for creating multiple #GSimpleAction instances - * and adding them to a #GActionMap. - * - * Each action is constructed as per one #GActionEntry. - * - * |[ - * static void - * activate_quit (GSimpleAction *simple, - * GVariant *parameter, - * gpointer user_data) - * { - * exit (0); - * } + * g_application_get_dbus_connection: + * @application: a #GApplication * - * static void - * activate_print_string (GSimpleAction *simple, - * GVariant *parameter, - * gpointer user_data) - * { - * g_print ("%s\n", g_variant_get_string (parameter, NULL)); - * } + * Gets the #GDBusConnection being used by the application, or %NULL. * - * static GActionGroup * - * create_action_group (void) - * { - * const GActionEntry entries[] = { - * { "quit", activate_quit }, - * { "print-string", activate_print_string, "s" } - * }; - * GSimpleActionGroup *group; + * If #GApplication is using its D-Bus backend then this function will + * return the #GDBusConnection being used for uniqueness and + * communication with the desktop environment and other instances of the + * application. * - * group = g_simple_action_group_new (); - * g_action_map_add_action_entries (G_ACTION_MAP (group), entries, G_N_ELEMENTS (entries), NULL); + * If #GApplication is not using D-Bus then this function will return + * %NULL. This includes the situation where the D-Bus backend would + * normally be in use but we were unable to connect to the bus. * - * return G_ACTION_GROUP (group); - * } - * ]| + * This function must not be called before the application has been + * registered. See g_application_get_is_registered(). * - * Since: 2.32 + * Returns: (transfer none): a #GDBusConnection, or %NULL + * Since: 2.34 */ /** - * g_action_map_lookup_action: - * @action_map: a #GActionMap - * @action_name: the name of an action - * - * Looks up the action with the name @action_name in @action_map. + * g_application_get_dbus_object_path: + * @application: a #GApplication * - * If no such action exists, returns %NULL. + * Gets the D-Bus object path being used by the application, or %NULL. * - * Returns: (transfer none): a #GAction, or %NULL - * Since: 2.32 - */ - - -/** - * g_action_map_remove_action: - * @action_map: a #GActionMap - * @action_name: the name of the action + * If #GApplication is using its D-Bus backend then this function will + * return the D-Bus object path that #GApplication is using. If the + * application is the primary instance then there is an object published + * at this path. If the application is not the primary instance then + * the result of this function is undefined. * - * Removes the named action from the action map. + * If #GApplication is not using D-Bus then this function will return + * %NULL. This includes the situation where the D-Bus backend would + * normally be in use but we were unable to connect to the bus. * - * If no action of this name is in the map then nothing happens. + * This function must not be called before the application has been + * registered. See g_application_get_is_registered(). * - * Since: 2.32 + * Returns: the object path, or %NULL + * Since: 2.34 */ /** - * g_action_name_is_valid: - * @action_name: an potential action name + * g_application_get_default: * - * Checks if @action_name is valid. + * Returns the default #GApplication instance for this process. * - * @action_name is valid if it consists only of alphanumeric characters, - * plus '-' and '.'. The empty string is not a valid action name. + * Normally there is only one #GApplication per process and it becomes + * the default when it is created. You can exercise more control over + * this by using g_application_set_default(). * - * It is an error to call this function with a non-utf8 @action_name. - * @action_name must not be %NULL. + * If there is no default application then %NULL is returned. * - * Returns: %TRUE if @action_name is valid - * Since: 2.38 + * Returns: (transfer none): the default application for this process, or %NULL + * Since: 2.32 */ /** - * g_action_parse_detailed_name: - * @detailed_name: a detailed action name - * @action_name: (out): the action name - * @target_value: (out): the target value, or %NULL for no target - * @error: a pointer to a %NULL #GError, or %NULL - * - * Parses a detailed action name into its separate name and target - * components. - * - * Detailed action names can have three formats. - * - * The first format is used to represent an action name with no target - * value and consists of just an action name containing no whitespace - * nor the characters ':', '(' or ')'. For example: "app.action". + * g_application_get_flags: + * @application: a #GApplication * - * The second format is used to represent an action with a target value - * that is a non-empty string consisting only of alphanumerics, plus '-' - * and '.'. In that case, the action name and target value are - * separated by a double colon ("::"). For example: - * "app.action::target". + * Gets the flags for @application. * - * The third format is used to represent an action with any type of - * target value, including strings. The target value follows the action - * name, surrounded in parens. For example: "app.action(42)". The - * target value is parsed using g_variant_parse(). If a tuple-typed - * value is desired, it must be specified in the same way, resulting in - * two sets of parens, for example: "app.action((1,2,3))". A string - * target can be specified this way as well: "app.action('target')". - * For strings, this third format must be used if * target value is - * empty or contains characters other than alphanumerics, '-' and '.'. + * See #GApplicationFlags. * - * Returns: %TRUE if successful, else %FALSE with @error set - * Since: 2.38 + * Returns: the flags for @application + * Since: 2.28 */ /** - * g_action_print_detailed_name: - * @action_name: a valid action name - * @target_value: (nullable): a #GVariant target value, or %NULL - * - * Formats a detailed action name from @action_name and @target_value. - * - * It is an error to call this function with an invalid action name. + * g_application_get_inactivity_timeout: + * @application: a #GApplication * - * This function is the opposite of g_action_parse_detailed_name(). - * It will produce a string that can be parsed back to the @action_name - * and @target_value by that function. + * Gets the current inactivity timeout for the application. * - * See that function for the types of strings that will be printed by - * this function. + * This is the amount of time (in milliseconds) after the last call to + * g_application_release() before the application stops running. * - * Returns: a detailed format string - * Since: 2.38 + * Returns: the timeout, in milliseconds + * Since: 2.28 */ /** - * g_app_info_add_supports_type: - * @appinfo: a #GAppInfo. - * @content_type: a string. - * @error: a #GError. + * g_application_get_is_busy: + * @application: a #GApplication * - * Adds a content type to the application information to indicate the - * application is capable of opening files with the given content type. + * Gets the application's current busy state, as set through + * g_application_mark_busy() or g_application_bind_busy_property(). * - * Returns: %TRUE on success, %FALSE on error. + * Returns: %TRUE if @application is currenty marked as busy + * Since: 2.44 */ /** - * g_app_info_can_delete: - * @appinfo: a #GAppInfo - * - * Obtains the information whether the #GAppInfo can be deleted. - * See g_app_info_delete(). + * g_application_get_is_registered: + * @application: a #GApplication * - * Returns: %TRUE if @appinfo can be deleted - * Since: 2.20 - */ - - -/** - * g_app_info_can_remove_supports_type: - * @appinfo: a #GAppInfo. + * Checks if @application is registered. * - * Checks if a supported content type can be removed from an application. + * An application is registered if g_application_register() has been + * successfully called. * - * Returns: %TRUE if it is possible to remove supported - * content types from a given @appinfo, %FALSE if not. + * Returns: %TRUE if @application is registered + * Since: 2.28 */ /** - * g_app_info_create_from_commandline: - * @commandline: (type filename): the commandline to use - * @application_name: (nullable): the application name, or %NULL to use @commandline - * @flags: flags that can specify details of the created #GAppInfo - * @error: a #GError location to store the error occurring, %NULL to ignore. + * g_application_get_is_remote: + * @application: a #GApplication * - * Creates a new #GAppInfo from the given information. + * Checks if @application is remote. * - * Note that for @commandline, the quoting rules of the Exec key of the - * [freedesktop.org Desktop Entry Specification](http://freedesktop.org/Standards/desktop-entry-spec) - * are applied. For example, if the @commandline contains - * percent-encoded URIs, the percent-character must be doubled in order to prevent it from - * being swallowed by Exec key unquoting. See the specification for exact quoting rules. + * If @application is remote then it means that another instance of + * application already exists (the 'primary' instance). Calls to + * perform actions on @application will result in the actions being + * performed by the primary instance. * - * Returns: (transfer full): new #GAppInfo for given command. + * The value of this property cannot be accessed before + * g_application_register() has been called. See + * g_application_get_is_registered(). + * + * Returns: %TRUE if @application is remote + * Since: 2.28 */ /** - * g_app_info_delete: (virtual do_delete) - * @appinfo: a #GAppInfo + * g_application_get_resource_base_path: + * @application: a #GApplication * - * Tries to delete a #GAppInfo. + * Gets the resource base path of @application. * - * On some platforms, there may be a difference between user-defined - * #GAppInfos which can be deleted, and system-wide ones which cannot. - * See g_app_info_can_delete(). + * See g_application_set_resource_base_path() for more information. * - * Returns: %TRUE if @appinfo has been deleted - * Since: 2.20 + * Returns: (nullable): the base resource path, if one is set + * Since: 2.42 */ /** - * g_app_info_dup: - * @appinfo: a #GAppInfo. + * g_application_hold: + * @application: a #GApplication * - * Creates a duplicate of a #GAppInfo. + * Increases the use count of @application. * - * Returns: (transfer full): a duplicate of @appinfo. + * Use this function to indicate that the application has a reason to + * continue to run. For example, g_application_hold() is called by GTK+ + * when a toplevel window is on the screen. + * + * To cancel the hold, call g_application_release(). */ /** - * g_app_info_equal: - * @appinfo1: the first #GAppInfo. - * @appinfo2: the second #GAppInfo. + * g_application_id_is_valid: + * @application_id: a potential application identifier * - * Checks if two #GAppInfos are equal. + * Checks if @application_id is a valid application identifier. * - * Note that the check may not compare each individual - * field, and only does an identity check. In case detecting changes in the - * contents is needed, program code must additionally compare relevant fields. + * A valid ID is required for calls to g_application_new() and + * g_application_set_application_id(). * - * Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise. - */ - - -/** - * g_app_info_get_all: + * Application identifiers follow the same format as + * [D-Bus well-known bus names](https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus). + * For convenience, the restrictions on application identifiers are + * reproduced here: * - * Gets a list of all of the applications currently registered - * on this system. + * - Application identifiers are composed of 1 or more elements separated by a + * period (`.`) character. All elements must contain at least one character. * - * For desktop files, this includes applications that have - * `NoDisplay=true` set or are excluded from display by means - * of `OnlyShowIn` or `NotShowIn`. See g_app_info_should_show(). - * The returned list does not include applications which have - * the `Hidden` key set. + * - Each element must only contain the ASCII characters `[A-Z][a-z][0-9]_-`, + * with `-` discouraged in new application identifiers. Each element must not + * begin with a digit. * - * Returns: (element-type GAppInfo) (transfer full): a newly allocated #GList of references to #GAppInfos. - */ - - -/** - * g_app_info_get_all_for_type: - * @content_type: the content type to find a #GAppInfo for + * - Application identifiers must contain at least one `.` (period) character + * (and thus at least two elements). * - * Gets a list of all #GAppInfos for a given content type, - * including the recommended and fallback #GAppInfos. See - * g_app_info_get_recommended_for_type() and - * g_app_info_get_fallback_for_type(). + * - Application identifiers must not begin with a `.` (period) character. * - * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos - * for given @content_type or %NULL on error. - */ - - -/** - * g_app_info_get_commandline: - * @appinfo: a #GAppInfo + * - Application identifiers must not exceed 255 characters. * - * Gets the commandline with which the application will be - * started. + * Note that the hyphen (`-`) character is allowed in application identifiers, + * but is problematic or not allowed in various specifications and APIs that + * refer to D-Bus, such as + * [Flatpak application IDs](http://docs.flatpak.org/en/latest/introduction.html#identifiers), + * the + * [`DBusActivatable` interface in the Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#dbus), + * and the convention that an application's "main" interface and object path + * resemble its application identifier and bus name. To avoid situations that + * require special-case handling, it is recommended that new application + * identifiers consistently replace hyphens with underscores. * - * Returns: (type filename): a string containing the @appinfo's commandline, - * or %NULL if this information is not available - * Since: 2.20 - */ - - -/** - * g_app_info_get_default_for_type: - * @content_type: the content type to find a #GAppInfo for - * @must_support_uris: if %TRUE, the #GAppInfo is expected to - * support URIs + * Like D-Bus interface names, application identifiers should start with the + * reversed DNS domain name of the author of the interface (in lower-case), and + * it is conventional for the rest of the application identifier to consist of + * words run together, with initial capital letters. * - * Gets the default #GAppInfo for a given content type. + * As with D-Bus interface names, if the author's DNS domain name contains + * hyphen/minus characters they should be replaced by underscores, and if it + * contains leading digits they should be escaped by prepending an underscore. + * For example, if the owner of 7-zip.org used an application identifier for an + * archiving application, it might be named `org._7_zip.Archiver`. * - * Returns: (transfer full): #GAppInfo for given @content_type or - * %NULL on error. + * Returns: %TRUE if @application_id is valid */ /** - * g_app_info_get_default_for_uri_scheme: - * @uri_scheme: a string containing a URI scheme. + * g_application_mark_busy: + * @application: a #GApplication * - * Gets the default application for handling URIs with - * the given URI scheme. A URI scheme is the initial part - * of the URI, up to but not including the ':', e.g. "http", - * "ftp" or "sip". + * Increases the busy count of @application. * - * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error. - */ - - -/** - * g_app_info_get_description: - * @appinfo: a #GAppInfo. + * Use this function to indicate that the application is busy, for instance + * while a long running operation is pending. * - * Gets a human-readable description of an installed application. + * The busy state will be exposed to other processes, so a session shell will + * use that information to indicate the state to the user (e.g. with a + * spinner). * - * Returns: a string containing a description of the - * application @appinfo, or %NULL if none. + * To cancel the busy indication, use g_application_unmark_busy(). + * + * Since: 2.38 */ /** - * g_app_info_get_display_name: - * @appinfo: a #GAppInfo. + * g_application_new: + * @application_id: (nullable): the application id + * @flags: the application flags * - * Gets the display name of the application. The display name is often more - * descriptive to the user than the name itself. + * Creates a new #GApplication instance. * - * Returns: the display name of the application for @appinfo, or the name if - * no display name is available. - * Since: 2.24 - */ - - -/** - * g_app_info_get_executable: - * @appinfo: a #GAppInfo + * If non-%NULL, the application id must be valid. See + * g_application_id_is_valid(). * - * Gets the executable's name for the installed application. + * If no application ID is given then some features of #GApplication + * (most notably application uniqueness) will be disabled. * - * Returns: (type filename): a string containing the @appinfo's application - * binaries name + * Returns: a new #GApplication instance */ /** - * g_app_info_get_fallback_for_type: - * @content_type: the content type to find a #GAppInfo for + * g_application_open: + * @application: a #GApplication + * @files: (array length=n_files): an array of #GFiles to open + * @n_files: the length of the @files array + * @hint: a hint (or ""), but never %NULL * - * Gets a list of fallback #GAppInfos for a given content type, i.e. - * those applications which claim to support the given content type - * by MIME type subclassing and not directly. + * Opens the given files. + * + * In essence, this results in the #GApplication::open signal being emitted + * in the primary instance. + * + * @n_files must be greater than zero. + * + * @hint is simply passed through to the ::open signal. It is + * intended to be used by applications that have multiple modes for + * opening files (eg: "view" vs "edit", etc). Unless you have a need + * for this functionality, you should use "". + * + * The application must be registered before calling this function + * and it must have the %G_APPLICATION_HANDLES_OPEN flag set. * - * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos - * for given @content_type or %NULL on error. * Since: 2.28 */ /** - * g_app_info_get_icon: - * @appinfo: a #GAppInfo. + * g_application_quit: + * @application: a #GApplication * - * Gets the icon for the application. + * Immediately quits the application. * - * Returns: (transfer none): the default #GIcon for @appinfo or %NULL - * if there is no default icon. - */ - - -/** - * g_app_info_get_id: - * @appinfo: a #GAppInfo. + * Upon return to the mainloop, g_application_run() will return, + * calling only the 'shutdown' function before doing so. * - * Gets the ID of an application. An id is a string that - * identifies the application. The exact format of the id is - * platform dependent. For instance, on Unix this is the - * desktop file id from the xdg menu specification. + * The hold count is ignored. + * Take care if your code has called g_application_hold() on the application and + * is therefore still expecting it to exist. + * (Note that you may have called g_application_hold() indirectly, for example + * through gtk_application_add_window().) * - * Note that the returned ID may be %NULL, depending on how - * the @appinfo has been constructed. + * The result of calling g_application_run() again after it returns is + * unspecified. * - * Returns: a string containing the application's ID. + * Since: 2.32 */ /** - * g_app_info_get_name: - * @appinfo: a #GAppInfo. + * g_application_register: + * @application: a #GApplication + * @cancellable: (nullable): a #GCancellable, or %NULL + * @error: a pointer to a NULL #GError, or %NULL * - * Gets the installed name of the application. + * Attempts registration of the application. * - * Returns: the name of the application for @appinfo. + * This is the point at which the application discovers if it is the + * primary instance or merely acting as a remote for an already-existing + * primary instance. This is implemented by attempting to acquire the + * application identifier as a unique bus name on the session bus using + * GDBus. + * + * If there is no application ID or if %G_APPLICATION_NON_UNIQUE was + * given, then this process will always become the primary instance. + * + * Due to the internal architecture of GDBus, method calls can be + * dispatched at any time (even if a main loop is not running). For + * this reason, you must ensure that any object paths that you wish to + * register are registered before calling this function. + * + * If the application has already been registered then %TRUE is + * returned with no work performed. + * + * The #GApplication::startup signal is emitted if registration succeeds + * and @application is the primary instance (including the non-unique + * case). + * + * In the event of an error (such as @cancellable being cancelled, or a + * failure to connect to the session bus), %FALSE is returned and @error + * is set appropriately. + * + * Note: the return value of this function is not an indicator that this + * instance is or is not the primary instance of the application. See + * g_application_get_is_remote() for that. + * + * Returns: %TRUE if registration succeeded + * Since: 2.28 */ /** - * g_app_info_get_recommended_for_type: - * @content_type: the content type to find a #GAppInfo for + * g_application_release: + * @application: a #GApplication * - * Gets a list of recommended #GAppInfos for a given content type, i.e. - * those applications which claim to support the given content type exactly, - * and not by MIME type subclassing. - * Note that the first application of the list is the last used one, i.e. - * the last one for which g_app_info_set_as_last_used_for_type() has been - * called. + * Decrease the use count of @application. * - * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos - * for given @content_type or %NULL on error. - * Since: 2.28 + * When the use count reaches zero, the application will stop running. + * + * Never call this function except to cancel the effect of a previous + * call to g_application_hold(). */ /** - * g_app_info_get_supported_types: - * @appinfo: a #GAppInfo that can handle files + * g_application_run: + * @application: a #GApplication + * @argc: the argc from main() (or 0 if @argv is %NULL) + * @argv: (array length=argc) (element-type filename) (nullable): + * the argv from main(), or %NULL * - * Retrieves the list of content types that @app_info claims to support. - * If this information is not provided by the environment, this function - * will return %NULL. - * This function does not take in consideration associations added with - * g_app_info_add_supports_type(), but only those exported directly by - * the application. + * Runs the application. * - * Returns: (transfer none) (array zero-terminated=1) (element-type utf8): - * a list of content types. - * Since: 2.34 + * This function is intended to be run from main() and its return value + * is intended to be returned by main(). Although you are expected to pass + * the @argc, @argv parameters from main() to this function, it is possible + * to pass %NULL if @argv is not available or commandline handling is not + * required. Note that on Windows, @argc and @argv are ignored, and + * g_win32_get_command_line() is called internally (for proper support + * of Unicode commandline arguments). + * + * #GApplication will attempt to parse the commandline arguments. You + * can add commandline flags to the list of recognised options by way of + * g_application_add_main_option_entries(). After this, the + * #GApplication::handle-local-options signal is emitted, from which the + * application can inspect the values of its #GOptionEntrys. + * + * #GApplication::handle-local-options is a good place to handle options + * such as `--version`, where an immediate reply from the local process is + * desired (instead of communicating with an already-running instance). + * A #GApplication::handle-local-options handler can stop further processing + * by returning a non-negative value, which then becomes the exit status of + * the process. + * + * What happens next depends on the flags: if + * %G_APPLICATION_HANDLES_COMMAND_LINE was specified then the remaining + * commandline arguments are sent to the primary instance, where a + * #GApplication::command-line signal is emitted. Otherwise, the + * remaining commandline arguments are assumed to be a list of files. + * If there are no files listed, the application is activated via the + * #GApplication::activate signal. If there are one or more files, and + * %G_APPLICATION_HANDLES_OPEN was specified then the files are opened + * via the #GApplication::open signal. + * + * If you are interested in doing more complicated local handling of the + * commandline then you should implement your own #GApplication subclass + * and override local_command_line(). In this case, you most likely want + * to return %TRUE from your local_command_line() implementation to + * suppress the default handling. See + * [gapplication-example-cmdline2.c][gapplication-example-cmdline2] + * for an example. + * + * If, after the above is done, the use count of the application is zero + * then the exit status is returned immediately. If the use count is + * non-zero then the default main context is iterated until the use count + * falls to zero, at which point 0 is returned. + * + * If the %G_APPLICATION_IS_SERVICE flag is set, then the service will + * run for as much as 10 seconds with a use count of zero while waiting + * for the message that caused the activation to arrive. After that, + * if the use count falls to zero the application will exit immediately, + * except in the case that g_application_set_inactivity_timeout() is in + * use. + * + * This function sets the prgname (g_set_prgname()), if not already set, + * to the basename of argv[0]. + * + * Much like g_main_loop_run(), this function will acquire the main context + * for the duration that the application is running. + * + * Since 2.40, applications that are not explicitly flagged as services + * or launchers (ie: neither %G_APPLICATION_IS_SERVICE or + * %G_APPLICATION_IS_LAUNCHER are given as flags) will check (from the + * default handler for local_command_line) if "--gapplication-service" + * was given in the command line. If this flag is present then normal + * commandline processing is interrupted and the + * %G_APPLICATION_IS_SERVICE flag is set. This provides a "compromise" + * solution whereby running an application directly from the commandline + * will invoke it in the normal way (which can be useful for debugging) + * while still allowing applications to be D-Bus activated in service + * mode. The D-Bus service file should invoke the executable with + * "--gapplication-service" as the sole commandline argument. This + * approach is suitable for use by most graphical applications but + * should not be used from applications like editors that need precise + * control over when processes invoked via the commandline will exit and + * what their exit status will be. + * + * Returns: the exit status + * Since: 2.28 */ /** - * g_app_info_launch: - * @appinfo: a #GAppInfo - * @files: (nullable) (element-type GFile): a #GList of #GFile objects - * @context: (nullable): a #GAppLaunchContext or %NULL - * @error: a #GError + * g_application_send_notification: + * @application: a #GApplication + * @id: (nullable): id of the notification, or %NULL + * @notification: the #GNotification to send * - * Launches the application. Passes @files to the launched application - * as arguments, using the optional @context to get information - * about the details of the launcher (like what screen it is on). - * On error, @error will be set accordingly. + * Sends a notification on behalf of @application to the desktop shell. + * There is no guarantee that the notification is displayed immediately, + * or even at all. * - * To launch the application without arguments pass a %NULL @files list. + * Notifications may persist after the application exits. It will be + * D-Bus-activated when the notification or one of its actions is + * activated. * - * Note that even if the launch is successful the application launched - * can fail to start if it runs into problems during startup. There is - * no way to detect this. + * Modifying @notification after this call has no effect. However, the + * object can be reused for a later call to this function. * - * Some URIs can be changed when passed through a GFile (for instance - * unsupported URIs with strange formats like mailto:), so if you have - * a textual URI you want to pass in as argument, consider using - * g_app_info_launch_uris() instead. + * @id may be any string that uniquely identifies the event for the + * application. It does not need to be in any special format. For + * example, "new-message" might be appropriate for a notification about + * new messages. * - * The launched application inherits the environment of the launching - * process, but it can be modified with g_app_launch_context_setenv() - * and g_app_launch_context_unsetenv(). + * If a previous notification was sent with the same @id, it will be + * replaced with @notification and shown again as if it was a new + * notification. This works even for notifications sent from a previous + * execution of the application, as long as @id is the same string. * - * On UNIX, this function sets the `GIO_LAUNCHED_DESKTOP_FILE` - * environment variable with the path of the launched desktop file and - * `GIO_LAUNCHED_DESKTOP_FILE_PID` to the process id of the launched - * process. This can be used to ignore `GIO_LAUNCHED_DESKTOP_FILE`, - * should it be inherited by further processes. The `DISPLAY` and - * `DESKTOP_STARTUP_ID` environment variables are also set, based - * on information provided in @context. + * @id may be %NULL, but it is impossible to replace or withdraw + * notifications without an id. * - * Returns: %TRUE on successful launch, %FALSE otherwise. + * If @notification is no longer relevant, it can be withdrawn with + * g_application_withdraw_notification(). + * + * Since: 2.40 */ /** - * g_app_info_launch_default_for_uri: - * @uri: the uri to show - * @context: (nullable): an optional #GAppLaunchContext - * @error: (nullable): return location for an error, or %NULL + * g_application_set_action_group: + * @application: a #GApplication + * @action_group: (nullable): a #GActionGroup, or %NULL * - * Utility function that launches the default application - * registered to handle the specified uri. Synchronous I/O - * is done on the uri to detect the type of the file if - * required. + * This used to be how actions were associated with a #GApplication. + * Now there is #GActionMap for that. * - * Returns: %TRUE on success, %FALSE on error. + * Since: 2.28 + * Deprecated: 2.32: Use the #GActionMap interface instead. Never ever + * mix use of this API with use of #GActionMap on the same @application + * or things will go very badly wrong. This function is known to + * introduce buggy behaviour (ie: signals not emitted on changes to the + * action group), so you should really use #GActionMap instead. */ /** - * g_app_info_launch_default_for_uri_async: - * @uri: the uri to show - * @context: (nullable): an optional #GAppLaunchContext - * @cancellable: (nullable): a #GCancellable - * @callback: (nullable): a #GASyncReadyCallback to call when the request is done - * @user_data: (nullable): data to pass to @callback + * g_application_set_application_id: + * @application: a #GApplication + * @application_id: (nullable): the identifier for @application * - * Async version of g_app_info_launch_default_for_uri(). + * Sets the unique identifier for @application. * - * This version is useful if you are interested in receiving - * error information in the case where the application is - * sandboxed and the portal may present an application chooser - * dialog to the user. + * The application id can only be modified if @application has not yet + * been registered. * - * Since: 2.50 + * If non-%NULL, the application id must be valid. See + * g_application_id_is_valid(). + * + * Since: 2.28 */ /** - * g_app_info_launch_default_for_uri_finish: - * @result: a #GAsyncResult - * @error: (nullable): return location for an error, or %NULL + * g_application_set_default: + * @application: (nullable): the application to set as default, or %NULL * - * Finishes an asynchronous launch-default-for-uri operation. + * Sets or unsets the default application for the process, as returned + * by g_application_get_default(). * - * Returns: %TRUE if the launch was successful, %FALSE if @error is set - * Since: 2.50 + * This function does not take its own reference on @application. If + * @application is destroyed then the default application will revert + * back to %NULL. + * + * Since: 2.32 */ /** - * g_app_info_launch_uris: - * @appinfo: a #GAppInfo - * @uris: (nullable) (element-type utf8): a #GList containing URIs to launch. - * @context: (nullable): a #GAppLaunchContext or %NULL - * @error: a #GError + * g_application_set_flags: + * @application: a #GApplication + * @flags: the flags for @application * - * Launches the application. This passes the @uris to the launched application - * as arguments, using the optional @context to get information - * about the details of the launcher (like what screen it is on). - * On error, @error will be set accordingly. + * Sets the flags for @application. * - * To launch the application without arguments pass a %NULL @uris list. + * The flags can only be modified if @application has not yet been + * registered. * - * Note that even if the launch is successful the application launched - * can fail to start if it runs into problems during startup. There is - * no way to detect this. + * See #GApplicationFlags. * - * Returns: %TRUE on successful launch, %FALSE otherwise. + * Since: 2.28 */ /** - * g_app_info_monitor_get: + * g_application_set_inactivity_timeout: + * @application: a #GApplication + * @inactivity_timeout: the timeout, in milliseconds * - * Gets the #GAppInfoMonitor for the current thread-default main - * context. + * Sets the current inactivity timeout for the application. * - * The #GAppInfoMonitor will emit a "changed" signal in the - * thread-default main context whenever the list of installed - * applications (as reported by g_app_info_get_all()) may have changed. + * This is the amount of time (in milliseconds) after the last call to + * g_application_release() before the application stops running. * - * You must only call g_object_unref() on the return value from under - * the same main context as you created it. + * This call has no side effects of its own. The value set here is only + * used for next time g_application_release() drops the use count to + * zero. Any timeouts currently in progress are not impacted. * - * Returns: (transfer full): a reference to a #GAppInfoMonitor - * Since: 2.40 + * Since: 2.28 */ /** - * g_app_info_remove_supports_type: - * @appinfo: a #GAppInfo. - * @content_type: a string. - * @error: a #GError. + * g_application_set_option_context_description: + * @application: the #GApplication + * @description: (nullable): a string to be shown in `--help` output + * after the list of options, or %NULL * - * Removes a supported type from an application, if possible. + * Adds a description to the @application option context. * - * Returns: %TRUE on success, %FALSE on error. + * See g_option_context_set_description() for more information. + * + * Since: 2.56 */ /** - * g_app_info_reset_type_associations: - * @content_type: a content type + * g_application_set_option_context_parameter_string: + * @application: the #GApplication + * @parameter_string: (nullable): a string which is displayed + * in the first line of `--help` output, after the usage summary `programname [OPTION...]`. * - * Removes all changes to the type associations done by - * g_app_info_set_as_default_for_type(), - * g_app_info_set_as_default_for_extension(), - * g_app_info_add_supports_type() or - * g_app_info_remove_supports_type(). + * Sets the parameter string to be used by the commandline handling of @application. * - * Since: 2.20 - */ - - -/** - * g_app_info_set_as_default_for_extension: - * @appinfo: a #GAppInfo. - * @extension: (type filename): a string containing the file extension - * (without the dot). - * @error: a #GError. + * This function registers the argument to be passed to g_option_context_new() + * when the internal #GOptionContext of @application is created. * - * Sets the application as the default handler for the given file extension. + * See g_option_context_new() for more information about @parameter_string. * - * Returns: %TRUE on success, %FALSE on error. + * Since: 2.56 */ /** - * g_app_info_set_as_default_for_type: - * @appinfo: a #GAppInfo. - * @content_type: the content type. - * @error: a #GError. + * g_application_set_option_context_summary: + * @application: the #GApplication + * @summary: (nullable): a string to be shown in `--help` output + * before the list of options, or %NULL * - * Sets the application as the default handler for a given type. + * Adds a summary to the @application option context. * - * Returns: %TRUE on success, %FALSE on error. + * See g_option_context_set_summary() for more information. + * + * Since: 2.56 */ /** - * g_app_info_set_as_last_used_for_type: - * @appinfo: a #GAppInfo. - * @content_type: the content type. - * @error: a #GError. + * g_application_set_resource_base_path: + * @application: a #GApplication + * @resource_path: (nullable): the resource path to use * - * Sets the application as the last used application for a given type. - * This will make the application appear as first in the list returned - * by g_app_info_get_recommended_for_type(), regardless of the default - * application for that content type. + * Sets (or unsets) the base resource path of @application. * - * Returns: %TRUE on success, %FALSE on error. + * The path is used to automatically load various [application + * resources][gresource] such as menu layouts and action descriptions. + * The various types of resources will be found at fixed names relative + * to the given base path. + * + * By default, the resource base path is determined from the application + * ID by prefixing '/' and replacing each '.' with '/'. This is done at + * the time that the #GApplication object is constructed. Changes to + * the application ID after that point will not have an impact on the + * resource base path. + * + * As an example, if the application has an ID of "org.example.app" then + * the default resource base path will be "/org/example/app". If this + * is a #GtkApplication (and you have not manually changed the path) + * then Gtk will then search for the menus of the application at + * "/org/example/app/gtk/menus.ui". + * + * See #GResource for more information about adding resources to your + * application. + * + * You can disable automatic resource loading functionality by setting + * the path to %NULL. + * + * Changing the resource base path once the application is running is + * not recommended. The point at which the resource path is consulted + * for forming paths for various purposes is unspecified. When writing + * a sub-class of #GApplication you should either set the + * #GApplication:resource-base-path property at construction time, or call + * this function during the instance initialization. Alternatively, you + * can call this function in the #GApplicationClass.startup virtual function, + * before chaining up to the parent implementation. + * + * Since: 2.42 */ /** - * g_app_info_should_show: - * @appinfo: a #GAppInfo. + * g_application_unbind_busy_property: + * @application: a #GApplication + * @object: (type GObject.Object): a #GObject + * @property: the name of a boolean property of @object * - * Checks if the application info should be shown in menus that - * list available applications. + * Destroys a binding between @property and the busy state of + * @application that was previously created with + * g_application_bind_busy_property(). * - * Returns: %TRUE if the @appinfo should be shown, %FALSE otherwise. + * Since: 2.44 */ /** - * g_app_info_supports_files: - * @appinfo: a #GAppInfo. + * g_application_unmark_busy: + * @application: a #GApplication * - * Checks if the application accepts files as arguments. + * Decreases the busy count of @application. * - * Returns: %TRUE if the @appinfo supports files. + * When the busy count reaches zero, the new state will be propagated + * to other processes. + * + * This function must only be called to cancel the effect of a previous + * call to g_application_mark_busy(). + * + * Since: 2.38 */ /** - * g_app_info_supports_uris: - * @appinfo: a #GAppInfo. + * g_application_withdraw_notification: + * @application: a #GApplication + * @id: id of a previously sent notification * - * Checks if the application supports reading files and directories from URIs. + * Withdraws a notification that was sent with + * g_application_send_notification(). * - * Returns: %TRUE if the @appinfo supports URIs. + * This call does nothing if a notification with @id doesn't exist or + * the notification was never sent. + * + * This function works even for notifications sent in previous + * executions of this application, as long @id is the same as it was for + * the sent notification. + * + * Note that notifications are dismissed when the user clicks on one + * of the buttons in a notification or triggers its default action, so + * there is no need to explicitly withdraw the notification in that case. + * + * Since: 2.40 */ /** - * g_app_launch_context_get_display: - * @context: a #GAppLaunchContext - * @info: a #GAppInfo - * @files: (element-type GFile): a #GList of #GFile objects + * g_async_initable_init_async: + * @initable: a #GAsyncInitable. + * @io_priority: the [I/O priority][io-priority] of the operation + * @cancellable: optional #GCancellable object, %NULL to ignore. + * @callback: a #GAsyncReadyCallback to call when the request is satisfied + * @user_data: the data to pass to callback function * - * Gets the display string for the @context. This is used to ensure new - * applications are started on the same display as the launching - * application, by setting the `DISPLAY` environment variable. + * Starts asynchronous initialization of the object implementing the + * interface. This must be done before any real use of the object after + * initial construction. If the object also implements #GInitable you can + * optionally call g_initable_init() instead. * - * Returns: a display string for the display. + * This method is intended for language bindings. If writing in C, + * g_async_initable_new_async() should typically be used instead. + * + * When the initialization is finished, @callback will be called. You can + * then call g_async_initable_init_finish() to get the result of the + * initialization. + * + * Implementations may also support cancellation. If @cancellable is not + * %NULL, then initialization can be cancelled by triggering the cancellable + * object from another thread. If the operation was cancelled, the error + * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and + * the object doesn't support cancellable initialization, the error + * %G_IO_ERROR_NOT_SUPPORTED will be returned. + * + * As with #GInitable, if the object is not initialized, or initialization + * returns with an error, then all operations on the object except + * g_object_ref() and g_object_unref() are considered to be invalid, and + * have undefined behaviour. They will often fail with g_critical() or + * g_warning(), but this must not be relied on. + * + * Callers should not assume that a class which implements #GAsyncInitable can + * be initialized multiple times; for more information, see g_initable_init(). + * If a class explicitly supports being initialized multiple times, + * implementation requires yielding all subsequent calls to init_async() on the + * results of the first call. + * + * For classes that also support the #GInitable interface, the default + * implementation of this method will run the g_initable_init() function + * in a thread, so if you want to support asynchronous initialization via + * threads, just implement the #GAsyncInitable interface without overriding + * any interface methods. + * + * Since: 2.22 */ /** - * g_app_launch_context_get_environment: - * @context: a #GAppLaunchContext + * g_async_initable_init_finish: + * @initable: a #GAsyncInitable. + * @res: a #GAsyncResult. + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. * - * Gets the complete environment variable list to be passed to - * the child process when @context is used to launch an application. - * This is a %NULL-terminated array of strings, where each string has - * the form `KEY=VALUE`. + * Finishes asynchronous initialization and returns the result. + * See g_async_initable_init_async(). * - * Returns: (array zero-terminated=1) (element-type filename) (transfer full): - * the child's environment - * Since: 2.32 + * Returns: %TRUE if successful. If an error has occurred, this function + * will return %FALSE and set @error appropriately if present. + * Since: 2.22 */ /** - * g_app_launch_context_get_startup_notify_id: - * @context: a #GAppLaunchContext - * @info: a #GAppInfo - * @files: (element-type GFile): a #GList of of #GFile objects + * g_async_initable_new_async: + * @object_type: a #GType supporting #GAsyncInitable. + * @io_priority: the [I/O priority][io-priority] of the operation + * @cancellable: optional #GCancellable object, %NULL to ignore. + * @callback: a #GAsyncReadyCallback to call when the initialization is + * finished + * @user_data: the data to pass to callback function + * @first_property_name: (nullable): the name of the first property, or %NULL if no + * properties + * @...: the value of the first property, followed by other property + * value pairs, and ended by %NULL. * - * Initiates startup notification for the application and returns the - * `DESKTOP_STARTUP_ID` for the launched operation, if supported. + * Helper function for constructing #GAsyncInitable object. This is + * similar to g_object_new() but also initializes the object asynchronously. * - * Startup notification IDs are defined in the - * [FreeDesktop.Org Startup Notifications standard](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt"). + * When the initialization is finished, @callback will be called. You can + * then call g_async_initable_new_finish() to get the new object and check + * for any errors. * - * Returns: a startup notification ID for the application, or %NULL if - * not supported. + * Since: 2.22 */ /** - * g_app_launch_context_launch_failed: - * @context: a #GAppLaunchContext. - * @startup_notify_id: the startup notification id that was returned by g_app_launch_context_get_startup_notify_id(). + * g_async_initable_new_finish: + * @initable: the #GAsyncInitable from the callback + * @res: the #GAsyncResult from the callback + * @error: return location for errors, or %NULL to ignore * - * Called when an application has failed to launch, so that it can cancel - * the application startup notification started in g_app_launch_context_get_startup_notify_id(). + * Finishes the async construction for the various g_async_initable_new + * calls, returning the created object or %NULL on error. + * + * Returns: (type GObject.Object) (transfer full): a newly created #GObject, + * or %NULL on error. Free with g_object_unref(). + * Since: 2.22 */ /** - * g_app_launch_context_new: + * g_async_initable_new_valist_async: + * @object_type: a #GType supporting #GAsyncInitable. + * @first_property_name: the name of the first property, followed by + * the value, and other property value pairs, and ended by %NULL. + * @var_args: The var args list generated from @first_property_name. + * @io_priority: the [I/O priority][io-priority] of the operation + * @cancellable: optional #GCancellable object, %NULL to ignore. + * @callback: a #GAsyncReadyCallback to call when the initialization is + * finished + * @user_data: the data to pass to callback function * - * Creates a new application launch context. This is not normally used, - * instead you instantiate a subclass of this, such as #GdkAppLaunchContext. + * Helper function for constructing #GAsyncInitable object. This is + * similar to g_object_new_valist() but also initializes the object + * asynchronously. * - * Returns: a #GAppLaunchContext. + * When the initialization is finished, @callback will be called. You can + * then call g_async_initable_new_finish() to get the new object and check + * for any errors. + * + * Since: 2.22 */ /** - * g_app_launch_context_setenv: - * @context: a #GAppLaunchContext - * @variable: (type filename): the environment variable to set - * @value: (type filename): the value for to set the variable to. + * g_async_initable_newv_async: + * @object_type: a #GType supporting #GAsyncInitable. + * @n_parameters: the number of parameters in @parameters + * @parameters: the parameters to use to construct the object + * @io_priority: the [I/O priority][io-priority] of the operation + * @cancellable: optional #GCancellable object, %NULL to ignore. + * @callback: a #GAsyncReadyCallback to call when the initialization is + * finished + * @user_data: the data to pass to callback function * - * Arranges for @variable to be set to @value in the child's - * environment when @context is used to launch an application. + * Helper function for constructing #GAsyncInitable object. This is + * similar to g_object_newv() but also initializes the object asynchronously. * - * Since: 2.32 + * When the initialization is finished, @callback will be called. You can + * then call g_async_initable_new_finish() to get the new object and check + * for any errors. + * + * Since: 2.22 + * Deprecated: 2.54: Use g_object_new_with_properties() and + * g_async_initable_init_async() instead. See #GParameter for more information. */ /** - * g_app_launch_context_unsetenv: - * @context: a #GAppLaunchContext - * @variable: (type filename): the environment variable to remove + * g_async_result_get_source_object: + * @res: a #GAsyncResult * - * Arranges for @variable to be unset in the child's environment - * when @context is used to launch an application. + * Gets the source object from a #GAsyncResult. * - * Since: 2.32 + * Returns: (transfer full) (nullable): a new reference to the source + * object for the @res, or %NULL if there is none. */ /** - * g_application_activate: - * @application: a #GApplication - * - * Activates the application. - * - * In essence, this results in the #GApplication::activate signal being - * emitted in the primary instance. + * g_async_result_get_user_data: + * @res: a #GAsyncResult. * - * The application must be registered before calling this function. + * Gets the user data from a #GAsyncResult. * - * Since: 2.28 + * Returns: (transfer full): the user data for @res. */ /** - * g_application_add_main_option: - * @application: the #GApplication - * @long_name: the long name of an option used to specify it in a commandline - * @short_name: the short name of an option - * @flags: flags from #GOptionFlags - * @arg: the type of the option, as a #GOptionArg - * @description: the description for the option in `--help` output - * @arg_description: (nullable): the placeholder to use for the extra argument - * parsed by the option in `--help` output + * g_async_result_is_tagged: + * @res: a #GAsyncResult + * @source_tag: an application-defined tag * - * Add an option to be handled by @application. + * Checks if @res has the given @source_tag (generally a function + * pointer indicating the function @res was created by). * - * Calling this function is the equivalent of calling - * g_application_add_main_option_entries() with a single #GOptionEntry - * that has its arg_data member set to %NULL. + * Returns: %TRUE if @res has the indicated @source_tag, %FALSE if + * not. + * Since: 2.34 + */ + + +/** + * g_async_result_legacy_propagate_error: + * @res: a #GAsyncResult + * @error: (out): a location to propagate the error to. * - * The parsed arguments will be packed into a #GVariantDict which - * is passed to #GApplication::handle-local-options. If - * %G_APPLICATION_HANDLES_COMMAND_LINE is set, then it will also - * be sent to the primary instance. See - * g_application_add_main_option_entries() for more details. + * If @res is a #GSimpleAsyncResult, this is equivalent to + * g_simple_async_result_propagate_error(). Otherwise it returns + * %FALSE. * - * See #GOptionEntry for more documentation of the arguments. + * This can be used for legacy error handling in async *_finish() + * wrapper functions that traditionally handled #GSimpleAsyncResult + * error returns themselves rather than calling into the virtual method. + * This should not be used in new code; #GAsyncResult errors that are + * set by virtual methods should also be extracted by virtual methods, + * to enable subclasses to chain up correctly. * - * Since: 2.42 + * Returns: %TRUE if @error is has been filled in with an error from + * @res, %FALSE if not. + * Since: 2.34 */ /** - * g_application_add_main_option_entries: - * @application: a #GApplication - * @entries: (array zero-terminated=1) (element-type GOptionEntry): a - * %NULL-terminated list of #GOptionEntrys - * - * Adds main option entries to be handled by @application. + * g_buffered_input_stream_fill: + * @stream: a #GBufferedInputStream + * @count: the number of bytes that will be read from the stream + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore + * @error: location to store the error occurring, or %NULL to ignore * - * This function is comparable to g_option_context_add_main_entries(). + * Tries to read @count bytes from the stream into the buffer. + * Will block during this read. * - * After the commandline arguments are parsed, the - * #GApplication::handle-local-options signal will be emitted. At this - * point, the application can inspect the values pointed to by @arg_data - * in the given #GOptionEntrys. + * If @count is zero, returns zero and does nothing. A value of @count + * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error. * - * Unlike #GOptionContext, #GApplication supports giving a %NULL - * @arg_data for a non-callback #GOptionEntry. This results in the - * argument in question being packed into a #GVariantDict which is also - * passed to #GApplication::handle-local-options, where it can be - * inspected and modified. If %G_APPLICATION_HANDLES_COMMAND_LINE is - * set, then the resulting dictionary is sent to the primary instance, - * where g_application_command_line_get_options_dict() will return it. - * This "packing" is done according to the type of the argument -- - * booleans for normal flags, strings for strings, bytestrings for - * filenames, etc. The packing only occurs if the flag is given (ie: we - * do not pack a "false" #GVariant in the case that a flag is missing). + * On success, the number of bytes read into the buffer is returned. + * It is not an error if this is not the same as the requested size, as it + * can happen e.g. near the end of a file. Zero is returned on end of file + * (or if @count is zero), but never otherwise. * - * In general, it is recommended that all commandline arguments are - * parsed locally. The options dictionary should then be used to - * transmit the result of the parsing to the primary instance, where - * g_variant_dict_lookup() can be used. For local options, it is - * possible to either use @arg_data in the usual way, or to consult (and - * potentially remove) the option from the options dictionary. + * If @count is -1 then the attempted read size is equal to the number of + * bytes that are required to fill the buffer. * - * This function is new in GLib 2.40. Before then, the only real choice - * was to send all of the commandline arguments (options and all) to the - * primary instance for handling. #GApplication ignored them completely - * on the local side. Calling this function "opts in" to the new - * behaviour, and in particular, means that unrecognised options will be - * treated as errors. Unrecognised options have never been ignored when - * %G_APPLICATION_HANDLES_COMMAND_LINE is unset. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an + * operation was partially finished when the operation was cancelled the + * partial result will be returned, without an error. * - * If #GApplication::handle-local-options needs to see the list of - * filenames, then the use of %G_OPTION_REMAINING is recommended. If - * @arg_data is %NULL then %G_OPTION_REMAINING can be used as a key into - * the options dictionary. If you do use %G_OPTION_REMAINING then you - * need to handle these arguments for yourself because once they are - * consumed, they will no longer be visible to the default handling - * (which treats them as filenames to be opened). + * On error -1 is returned and @error is set accordingly. * - * It is important to use the proper GVariant format when retrieving - * the options with g_variant_dict_lookup(): - * - for %G_OPTION_ARG_NONE, use b - * - for %G_OPTION_ARG_STRING, use &s - * - for %G_OPTION_ARG_INT, use i - * - for %G_OPTION_ARG_INT64, use x - * - for %G_OPTION_ARG_DOUBLE, use d - * - for %G_OPTION_ARG_FILENAME, use ^ay - * - for %G_OPTION_ARG_STRING_ARRAY, use &as - * - for %G_OPTION_ARG_FILENAME_ARRAY, use ^aay + * For the asynchronous, non-blocking, version of this function, see + * g_buffered_input_stream_fill_async(). * - * Since: 2.40 + * Returns: the number of bytes read into @stream's buffer, up to @count, + * or -1 on error. */ /** - * g_application_add_option_group: - * @application: the #GApplication - * @group: (transfer full): a #GOptionGroup - * - * Adds a #GOptionGroup to the commandline handling of @application. + * g_buffered_input_stream_fill_async: + * @stream: a #GBufferedInputStream + * @count: the number of bytes that will be read from the stream + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): optional #GCancellable object + * @callback: (scope async): a #GAsyncReadyCallback + * @user_data: (closure): a #gpointer * - * This function is comparable to g_option_context_add_group(). + * Reads data into @stream's buffer asynchronously, up to @count size. + * @io_priority can be used to prioritize reads. For the synchronous + * version of this function, see g_buffered_input_stream_fill(). * - * Unlike g_application_add_main_option_entries(), this function does - * not deal with %NULL @arg_data and never transmits options to the - * primary instance. + * If @count is -1 then the attempted read size is equal to the number + * of bytes that are required to fill the buffer. + */ + + +/** + * g_buffered_input_stream_fill_finish: + * @stream: a #GBufferedInputStream + * @result: a #GAsyncResult + * @error: a #GError * - * The reason for that is because, by the time the options arrive at the - * primary instance, it is typically too late to do anything with them. - * Taking the GTK option group as an example: GTK will already have been - * initialised by the time the #GApplication::command-line handler runs. - * In the case that this is not the first-running instance of the - * application, the existing instance may already have been running for - * a very long time. + * Finishes an asynchronous read. * - * This means that the options from #GOptionGroup are only really usable - * in the case that the instance of the application being run is the - * first instance. Passing options like `--display=` or `--gdk-debug=` - * on future runs will have no effect on the existing primary instance. + * Returns: a #gssize of the read stream, or `-1` on an error. + */ + + +/** + * g_buffered_input_stream_get_available: + * @stream: #GBufferedInputStream * - * Calling this function will cause the options in the supplied option - * group to be parsed, but it does not cause you to be "opted in" to the - * new functionality whereby unrecognised options are rejected even if - * %G_APPLICATION_HANDLES_COMMAND_LINE was given. + * Gets the size of the available data within the stream. * - * Since: 2.40 + * Returns: size of the available stream. */ /** - * g_application_bind_busy_property: - * @application: a #GApplication - * @object: (type GObject.Object): a #GObject - * @property: the name of a boolean property of @object - * - * Marks @application as busy (see g_application_mark_busy()) while - * @property on @object is %TRUE. + * g_buffered_input_stream_get_buffer_size: + * @stream: a #GBufferedInputStream * - * The binding holds a reference to @application while it is active, but - * not to @object. Instead, the binding is destroyed when @object is - * finalized. + * Gets the size of the input buffer. * - * Since: 2.44 + * Returns: the current buffer size. */ /** - * g_application_command_line_create_file_for_arg: - * @cmdline: a #GApplicationCommandLine - * @arg: (type filename): an argument from @cmdline - * - * Creates a #GFile corresponding to a filename that was given as part - * of the invocation of @cmdline. + * g_buffered_input_stream_new: + * @base_stream: a #GInputStream * - * This differs from g_file_new_for_commandline_arg() in that it - * resolves relative pathnames using the current working directory of - * the invoking process rather than the local process. + * Creates a new #GInputStream from the given @base_stream, with + * a buffer set to the default size (4 kilobytes). * - * Returns: (transfer full): a new #GFile - * Since: 2.36 + * Returns: a #GInputStream for the given @base_stream. */ /** - * g_application_command_line_get_arguments: - * @cmdline: a #GApplicationCommandLine - * @argc: (out) (optional): the length of the arguments array, or %NULL + * g_buffered_input_stream_new_sized: + * @base_stream: a #GInputStream + * @size: a #gsize * - * Gets the list of arguments that was passed on the command line. - * - * The strings in the array may contain non-UTF-8 data on UNIX (such as - * filenames or arguments given in the system locale) but are always in - * UTF-8 on Windows. - * - * If you wish to use the return value with #GOptionContext, you must - * use g_option_context_parse_strv(). - * - * The return value is %NULL-terminated and should be freed using - * g_strfreev(). + * Creates a new #GBufferedInputStream from the given @base_stream, + * with a buffer set to @size. * - * Returns: (array length=argc) (element-type filename) (transfer full): - * the string array containing the arguments (the argv) - * Since: 2.28 + * Returns: a #GInputStream. */ /** - * g_application_command_line_get_cwd: - * @cmdline: a #GApplicationCommandLine - * - * Gets the working directory of the command line invocation. - * The string may contain non-utf8 data. - * - * It is possible that the remote application did not send a working - * directory, so this may be %NULL. + * g_buffered_input_stream_peek: + * @stream: a #GBufferedInputStream + * @buffer: (array length=count) (element-type guint8): a pointer to + * an allocated chunk of memory + * @offset: a #gsize + * @count: a #gsize * - * The return value should not be modified or freed and is valid for as - * long as @cmdline exists. + * Peeks in the buffer, copying data of size @count into @buffer, + * offset @offset bytes. * - * Returns: (nullable) (type filename): the current directory, or %NULL - * Since: 2.28 + * Returns: a #gsize of the number of bytes peeked, or -1 on error. */ /** - * g_application_command_line_get_environ: - * @cmdline: a #GApplicationCommandLine - * - * Gets the contents of the 'environ' variable of the command line - * invocation, as would be returned by g_get_environ(), ie as a - * %NULL-terminated list of strings in the form 'NAME=VALUE'. - * The strings may contain non-utf8 data. - * - * The remote application usually does not send an environment. Use - * %G_APPLICATION_SEND_ENVIRONMENT to affect that. Even with this flag - * set it is possible that the environment is still not available (due - * to invocation messages from other applications). - * - * The return value should not be modified or freed and is valid for as - * long as @cmdline exists. + * g_buffered_input_stream_peek_buffer: + * @stream: a #GBufferedInputStream + * @count: (out): a #gsize to get the number of bytes available in the buffer * - * See g_application_command_line_getenv() if you are only interested - * in the value of a single environment variable. + * Returns the buffer with the currently available bytes. The returned + * buffer must not be modified and will become invalid when reading from + * the stream or filling the buffer. * - * Returns: (array zero-terminated=1) (element-type filename) (transfer none): - * the environment strings, or %NULL if they were not sent - * Since: 2.28 + * Returns: (array length=count) (element-type guint8) (transfer none): + * read-only buffer */ /** - * g_application_command_line_get_exit_status: - * @cmdline: a #GApplicationCommandLine + * g_buffered_input_stream_read_byte: + * @stream: a #GBufferedInputStream + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore + * @error: location to store the error occurring, or %NULL to ignore * - * Gets the exit status of @cmdline. See - * g_application_command_line_set_exit_status() for more information. + * Tries to read a single byte from the stream or the buffer. Will block + * during this read. * - * Returns: the exit status - * Since: 2.28 + * On success, the byte read from the stream is returned. On end of stream + * -1 is returned but it's not an exceptional error and @error is not set. + * + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an + * operation was partially finished when the operation was cancelled the + * partial result will be returned, without an error. + * + * On error -1 is returned and @error is set accordingly. + * + * Returns: the byte read from the @stream, or -1 on end of stream or error. */ /** - * g_application_command_line_get_is_remote: - * @cmdline: a #GApplicationCommandLine - * - * Determines if @cmdline represents a remote invocation. + * g_buffered_input_stream_set_buffer_size: + * @stream: a #GBufferedInputStream + * @size: a #gsize * - * Returns: %TRUE if the invocation was remote - * Since: 2.28 + * Sets the size of the internal buffer of @stream to @size, or to the + * size of the contents of the buffer. The buffer can never be resized + * smaller than its current contents. */ /** - * g_application_command_line_get_options_dict: - * @cmdline: a #GApplicationCommandLine - * - * Gets the options there were passed to g_application_command_line(). - * - * If you did not override local_command_line() then these are the same - * options that were parsed according to the #GOptionEntrys added to the - * application with g_application_add_main_option_entries() and possibly - * modified from your GApplication::handle-local-options handler. + * g_buffered_output_stream_get_auto_grow: + * @stream: a #GBufferedOutputStream. * - * If no options were sent then an empty dictionary is returned so that - * you don't need to check for %NULL. + * Checks if the buffer automatically grows as data is added. * - * Returns: (transfer none): a #GVariantDict with the options - * Since: 2.40 + * Returns: %TRUE if the @stream's buffer automatically grows, + * %FALSE otherwise. */ /** - * g_application_command_line_get_platform_data: - * @cmdline: #GApplicationCommandLine - * - * Gets the platform data associated with the invocation of @cmdline. - * - * This is a #GVariant dictionary containing information about the - * context in which the invocation occurred. It typically contains - * information like the current working directory and the startup - * notification ID. + * g_buffered_output_stream_get_buffer_size: + * @stream: a #GBufferedOutputStream. * - * For local invocation, it will be %NULL. + * Gets the size of the buffer in the @stream. * - * Returns: (nullable): the platform data, or %NULL - * Since: 2.28 + * Returns: the current size of the buffer. */ /** - * g_application_command_line_get_stdin: - * @cmdline: a #GApplicationCommandLine - * - * Gets the stdin of the invoking process. - * - * The #GInputStream can be used to read data passed to the standard - * input of the invoking process. - * This doesn't work on all platforms. Presently, it is only available - * on UNIX when using a DBus daemon capable of passing file descriptors. - * If stdin is not available then %NULL will be returned. In the - * future, support may be expanded to other platforms. + * g_buffered_output_stream_new: + * @base_stream: a #GOutputStream. * - * You must only call this function once per commandline invocation. + * Creates a new buffered output stream for a base stream. * - * Returns: (transfer full): a #GInputStream for stdin - * Since: 2.34 + * Returns: a #GOutputStream for the given @base_stream. */ /** - * g_application_command_line_getenv: - * @cmdline: a #GApplicationCommandLine - * @name: (type filename): the environment variable to get - * - * Gets the value of a particular environment variable of the command - * line invocation, as would be returned by g_getenv(). The strings may - * contain non-utf8 data. - * - * The remote application usually does not send an environment. Use - * %G_APPLICATION_SEND_ENVIRONMENT to affect that. Even with this flag - * set it is possible that the environment is still not available (due - * to invocation messages from other applications). + * g_buffered_output_stream_new_sized: + * @base_stream: a #GOutputStream. + * @size: a #gsize. * - * The return value should not be modified or freed and is valid for as - * long as @cmdline exists. + * Creates a new buffered output stream with a given buffer size. * - * Returns: the value of the variable, or %NULL if unset or unsent - * Since: 2.28 + * Returns: a #GOutputStream with an internal buffer set to @size. */ /** - * g_application_command_line_print: - * @cmdline: a #GApplicationCommandLine - * @format: a printf-style format string - * @...: arguments, as per @format - * - * Formats a message and prints it using the stdout print handler in the - * invoking process. - * - * If @cmdline is a local invocation then this is exactly equivalent to - * g_print(). If @cmdline is remote then this is equivalent to calling - * g_print() in the invoking process. + * g_buffered_output_stream_set_auto_grow: + * @stream: a #GBufferedOutputStream. + * @auto_grow: a #gboolean. * - * Since: 2.28 + * Sets whether or not the @stream's buffer should automatically grow. + * If @auto_grow is true, then each write will just make the buffer + * larger, and you must manually flush the buffer to actually write out + * the data to the underlying stream. */ /** - * g_application_command_line_printerr: - * @cmdline: a #GApplicationCommandLine - * @format: a printf-style format string - * @...: arguments, as per @format - * - * Formats a message and prints it using the stderr print handler in the - * invoking process. - * - * If @cmdline is a local invocation then this is exactly equivalent to - * g_printerr(). If @cmdline is remote then this is equivalent to - * calling g_printerr() in the invoking process. + * g_buffered_output_stream_set_buffer_size: + * @stream: a #GBufferedOutputStream. + * @size: a #gsize. * - * Since: 2.28 + * Sets the size of the internal buffer to @size. */ /** - * g_application_command_line_set_exit_status: - * @cmdline: a #GApplicationCommandLine - * @exit_status: the exit status - * - * Sets the exit status that will be used when the invoking process - * exits. + * g_bus_get: + * @bus_type: a #GBusType + * @cancellable: (nullable): a #GCancellable or %NULL + * @callback: a #GAsyncReadyCallback to call when the request is satisfied + * @user_data: the data to pass to @callback * - * The return value of the #GApplication::command-line signal is - * passed to this function when the handler returns. This is the usual - * way of setting the exit status. + * Asynchronously connects to the message bus specified by @bus_type. * - * In the event that you want the remote invocation to continue running - * and want to decide on the exit status in the future, you can use this - * call. For the case of a remote invocation, the remote process will - * typically exit when the last reference is dropped on @cmdline. The - * exit status of the remote process will be equal to the last value - * that was set with this function. + * When the operation is finished, @callback will be invoked. You can + * then call g_bus_get_finish() to get the result of the operation. * - * In the case that the commandline invocation is local, the situation - * is slightly more complicated. If the commandline invocation results - * in the mainloop running (ie: because the use-count of the application - * increased to a non-zero value) then the application is considered to - * have been 'successful' in a certain sense, and the exit status is - * always zero. If the application use count is zero, though, the exit - * status of the local #GApplicationCommandLine is used. + * This is an asynchronous failable function. See g_bus_get_sync() for + * the synchronous version. * - * Since: 2.28 + * Since: 2.26 */ /** - * g_application_get_application_id: - * @application: a #GApplication + * g_bus_get_finish: + * @res: a #GAsyncResult obtained from the #GAsyncReadyCallback passed + * to g_bus_get() + * @error: return location for error or %NULL * - * Gets the unique identifier for @application. + * Finishes an operation started with g_bus_get(). * - * Returns: the identifier for @application, owned by @application - * Since: 2.28 + * The returned object is a singleton, that is, shared with other + * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the + * event that you need a private message bus connection, use + * g_dbus_address_get_for_bus_sync() and + * g_dbus_connection_new_for_address(). + * + * Note that the returned #GDBusConnection object will (usually) have + * the #GDBusConnection:exit-on-close property set to %TRUE. + * + * Returns: (transfer full): a #GDBusConnection or %NULL if @error is set. + * Free with g_object_unref(). + * Since: 2.26 */ /** - * g_application_get_dbus_connection: - * @application: a #GApplication + * g_bus_get_sync: + * @bus_type: a #GBusType + * @cancellable: (nullable): a #GCancellable or %NULL + * @error: return location for error or %NULL * - * Gets the #GDBusConnection being used by the application, or %NULL. + * Synchronously connects to the message bus specified by @bus_type. + * Note that the returned object may shared with other callers, + * e.g. if two separate parts of a process calls this function with + * the same @bus_type, they will share the same object. * - * If #GApplication is using its D-Bus backend then this function will - * return the #GDBusConnection being used for uniqueness and - * communication with the desktop environment and other instances of the - * application. + * This is a synchronous failable function. See g_bus_get() and + * g_bus_get_finish() for the asynchronous version. * - * If #GApplication is not using D-Bus then this function will return - * %NULL. This includes the situation where the D-Bus backend would - * normally be in use but we were unable to connect to the bus. + * The returned object is a singleton, that is, shared with other + * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the + * event that you need a private message bus connection, use + * g_dbus_address_get_for_bus_sync() and + * g_dbus_connection_new_for_address(). * - * This function must not be called before the application has been - * registered. See g_application_get_is_registered(). + * Note that the returned #GDBusConnection object will (usually) have + * the #GDBusConnection:exit-on-close property set to %TRUE. * - * Returns: (transfer none): a #GDBusConnection, or %NULL - * Since: 2.34 + * Returns: (transfer full): a #GDBusConnection or %NULL if @error is set. + * Free with g_object_unref(). + * Since: 2.26 */ /** - * g_application_get_dbus_object_path: - * @application: a #GApplication + * g_bus_own_name: + * @bus_type: the type of bus to own a name on + * @name: the well-known name to own + * @flags: a set of flags from the #GBusNameOwnerFlags enumeration + * @bus_acquired_handler: (nullable): handler to invoke when connected to the bus of type @bus_type or %NULL + * @name_acquired_handler: (nullable): handler to invoke when @name is acquired or %NULL + * @name_lost_handler: (nullable): handler to invoke when @name is lost or %NULL + * @user_data: user data to pass to handlers + * @user_data_free_func: (nullable): function for freeing @user_data or %NULL * - * Gets the D-Bus object path being used by the application, or %NULL. + * Starts acquiring @name on the bus specified by @bus_type and calls + * @name_acquired_handler and @name_lost_handler when the name is + * acquired respectively lost. Callbacks will be invoked in the + * [thread-default main context][g-main-context-push-thread-default] + * of the thread you are calling this function from. * - * If #GApplication is using its D-Bus backend then this function will - * return the D-Bus object path that #GApplication is using. If the - * application is the primary instance then there is an object published - * at this path. If the application is not the primary instance then - * the result of this function is undefined. + * You are guaranteed that one of the @name_acquired_handler and @name_lost_handler + * callbacks will be invoked after calling this function - there are three + * possible cases: * - * If #GApplication is not using D-Bus then this function will return - * %NULL. This includes the situation where the D-Bus backend would - * normally be in use but we were unable to connect to the bus. + * - @name_lost_handler with a %NULL connection (if a connection to the bus + * can't be made). * - * This function must not be called before the application has been - * registered. See g_application_get_is_registered(). + * - @bus_acquired_handler then @name_lost_handler (if the name can't be + * obtained) * - * Returns: the object path, or %NULL - * Since: 2.34 - */ - - -/** - * g_application_get_default: + * - @bus_acquired_handler then @name_acquired_handler (if the name was + * obtained). * - * Returns the default #GApplication instance for this process. + * When you are done owning the name, just call g_bus_unown_name() + * with the owner id this function returns. * - * Normally there is only one #GApplication per process and it becomes - * the default when it is created. You can exercise more control over - * this by using g_application_set_default(). + * If the name is acquired or lost (for example another application + * could acquire the name if you allow replacement or the application + * currently owning the name exits), the handlers are also invoked. + * If the #GDBusConnection that is used for attempting to own the name + * closes, then @name_lost_handler is invoked since it is no longer + * possible for other processes to access the process. * - * If there is no default application then %NULL is returned. + * You cannot use g_bus_own_name() several times for the same name (unless + * interleaved with calls to g_bus_unown_name()) - only the first call + * will work. * - * Returns: (transfer none): the default application for this process, or %NULL - * Since: 2.32 - */ - - -/** - * g_application_get_flags: - * @application: a #GApplication + * Another guarantee is that invocations of @name_acquired_handler + * and @name_lost_handler are guaranteed to alternate; that + * is, if @name_acquired_handler is invoked then you are + * guaranteed that the next time one of the handlers is invoked, it + * will be @name_lost_handler. The reverse is also true. * - * Gets the flags for @application. + * If you plan on exporting objects (using e.g. + * g_dbus_connection_register_object()), note that it is generally too late + * to export the objects in @name_acquired_handler. Instead, you can do this + * in @bus_acquired_handler since you are guaranteed that this will run + * before @name is requested from the bus. * - * See #GApplicationFlags. + * This behavior makes it very simple to write applications that wants + * to [own names][gdbus-owning-names] and export objects. + * Simply register objects to be exported in @bus_acquired_handler and + * unregister the objects (if any) in @name_lost_handler. * - * Returns: the flags for @application - * Since: 2.28 + * Returns: an identifier (never 0) that can be used with + * g_bus_unown_name() to stop owning the name. + * Since: 2.26 */ /** - * g_application_get_inactivity_timeout: - * @application: a #GApplication - * - * Gets the current inactivity timeout for the application. + * g_bus_own_name_on_connection: + * @connection: a #GDBusConnection + * @name: the well-known name to own + * @flags: a set of flags from the #GBusNameOwnerFlags enumeration + * @name_acquired_handler: (nullable): handler to invoke when @name is acquired or %NULL + * @name_lost_handler: (nullable): handler to invoke when @name is lost or %NULL + * @user_data: user data to pass to handlers + * @user_data_free_func: (nullable): function for freeing @user_data or %NULL * - * This is the amount of time (in milliseconds) after the last call to - * g_application_release() before the application stops running. + * Like g_bus_own_name() but takes a #GDBusConnection instead of a + * #GBusType. * - * Returns: the timeout, in milliseconds - * Since: 2.28 + * Returns: an identifier (never 0) that can be used with + * g_bus_unown_name() to stop owning the name + * Since: 2.26 */ /** - * g_application_get_is_busy: - * @application: a #GApplication + * g_bus_own_name_on_connection_with_closures: (rename-to g_bus_own_name_on_connection) + * @connection: a #GDBusConnection + * @name: the well-known name to own + * @flags: a set of flags from the #GBusNameOwnerFlags enumeration + * @name_acquired_closure: (nullable): #GClosure to invoke when @name is + * acquired or %NULL + * @name_lost_closure: (nullable): #GClosure to invoke when @name is lost + * or %NULL * - * Gets the application's current busy state, as set through - * g_application_mark_busy() or g_application_bind_busy_property(). + * Version of g_bus_own_name_on_connection() using closures instead of + * callbacks for easier binding in other languages. * - * Returns: %TRUE if @application is currenty marked as busy - * Since: 2.44 + * Returns: an identifier (never 0) that can be used with + * g_bus_unown_name() to stop owning the name. + * Since: 2.26 */ /** - * g_application_get_is_registered: - * @application: a #GApplication - * - * Checks if @application is registered. + * g_bus_own_name_with_closures: (rename-to g_bus_own_name) + * @bus_type: the type of bus to own a name on + * @name: the well-known name to own + * @flags: a set of flags from the #GBusNameOwnerFlags enumeration + * @bus_acquired_closure: (nullable): #GClosure to invoke when connected to + * the bus of type @bus_type or %NULL + * @name_acquired_closure: (nullable): #GClosure to invoke when @name is + * acquired or %NULL + * @name_lost_closure: (nullable): #GClosure to invoke when @name is lost or + * %NULL * - * An application is registered if g_application_register() has been - * successfully called. + * Version of g_bus_own_name() using closures instead of callbacks for + * easier binding in other languages. * - * Returns: %TRUE if @application is registered - * Since: 2.28 + * Returns: an identifier (never 0) that can be used with + * g_bus_unown_name() to stop owning the name. + * Since: 2.26 */ /** - * g_application_get_is_remote: - * @application: a #GApplication - * - * Checks if @application is remote. + * g_bus_unown_name: + * @owner_id: an identifier obtained from g_bus_own_name() * - * If @application is remote then it means that another instance of - * application already exists (the 'primary' instance). Calls to - * perform actions on @application will result in the actions being - * performed by the primary instance. + * Stops owning a name. * - * The value of this property cannot be accessed before - * g_application_register() has been called. See - * g_application_get_is_registered(). + * Note that there may still be D-Bus traffic to process (relating to owning + * and unowning the name) in the current thread-default #GMainContext after + * this function has returned. You should continue to iterate the #GMainContext + * until the #GDestroyNotify function passed to g_bus_own_name() is called, in + * order to avoid memory leaks through callbacks queued on the #GMainContext + * after it’s stopped being iterated. * - * Returns: %TRUE if @application is remote - * Since: 2.28 + * Since: 2.26 */ /** - * g_application_get_resource_base_path: - * @application: a #GApplication + * g_bus_unwatch_name: + * @watcher_id: An identifier obtained from g_bus_watch_name() * - * Gets the resource base path of @application. + * Stops watching a name. * - * See g_application_set_resource_base_path() for more information. + * Note that there may still be D-Bus traffic to process (relating to watching + * and unwatching the name) in the current thread-default #GMainContext after + * this function has returned. You should continue to iterate the #GMainContext + * until the #GDestroyNotify function passed to g_bus_watch_name() is called, in + * order to avoid memory leaks through callbacks queued on the #GMainContext + * after it’s stopped being iterated. * - * Returns: (nullable): the base resource path, if one is set - * Since: 2.42 + * Since: 2.26 */ /** - * g_application_hold: - * @application: a #GApplication - * - * Increases the use count of @application. - * - * Use this function to indicate that the application has a reason to - * continue to run. For example, g_application_hold() is called by GTK+ - * when a toplevel window is on the screen. + * g_bus_watch_name: + * @bus_type: The type of bus to watch a name on. + * @name: The name (well-known or unique) to watch. + * @flags: Flags from the #GBusNameWatcherFlags enumeration. + * @name_appeared_handler: (nullable): Handler to invoke when @name is known to exist or %NULL. + * @name_vanished_handler: (nullable): Handler to invoke when @name is known to not exist or %NULL. + * @user_data: User data to pass to handlers. + * @user_data_free_func: (nullable): Function for freeing @user_data or %NULL. * - * To cancel the hold, call g_application_release(). - */ - - -/** - * g_application_id_is_valid: - * @application_id: a potential application identifier + * Starts watching @name on the bus specified by @bus_type and calls + * @name_appeared_handler and @name_vanished_handler when the name is + * known to have an owner respectively known to lose its + * owner. Callbacks will be invoked in the + * [thread-default main context][g-main-context-push-thread-default] + * of the thread you are calling this function from. * - * Checks if @application_id is a valid application identifier. + * You are guaranteed that one of the handlers will be invoked after + * calling this function. When you are done watching the name, just + * call g_bus_unwatch_name() with the watcher id this function + * returns. * - * A valid ID is required for calls to g_application_new() and - * g_application_set_application_id(). + * If the name vanishes or appears (for example the application owning + * the name could restart), the handlers are also invoked. If the + * #GDBusConnection that is used for watching the name disconnects, then + * @name_vanished_handler is invoked since it is no longer + * possible to access the name. * - * Application identifiers follow the same format as - * [D-Bus well-known bus names](https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus). - * For convenience, the restrictions on application identifiers are - * reproduced here: - * - * - Application identifiers are composed of 1 or more elements separated by a - * period (`.`) character. All elements must contain at least one character. + * Another guarantee is that invocations of @name_appeared_handler + * and @name_vanished_handler are guaranteed to alternate; that + * is, if @name_appeared_handler is invoked then you are + * guaranteed that the next time one of the handlers is invoked, it + * will be @name_vanished_handler. The reverse is also true. * - * - Each element must only contain the ASCII characters `[A-Z][a-z][0-9]_-`, - * with `-` discouraged in new application identifiers. Each element must not - * begin with a digit. + * This behavior makes it very simple to write applications that want + * to take action when a certain [name exists][gdbus-watching-names]. + * Basically, the application should create object proxies in + * @name_appeared_handler and destroy them again (if any) in + * @name_vanished_handler. * - * - Application identifiers must contain at least one `.` (period) character - * (and thus at least two elements). + * Returns: An identifier (never 0) that can be used with + * g_bus_unwatch_name() to stop watching the name. + * Since: 2.26 + */ + + +/** + * g_bus_watch_name_on_connection: + * @connection: A #GDBusConnection. + * @name: The name (well-known or unique) to watch. + * @flags: Flags from the #GBusNameWatcherFlags enumeration. + * @name_appeared_handler: (nullable): Handler to invoke when @name is known to exist or %NULL. + * @name_vanished_handler: (nullable): Handler to invoke when @name is known to not exist or %NULL. + * @user_data: User data to pass to handlers. + * @user_data_free_func: (nullable): Function for freeing @user_data or %NULL. * - * - Application identifiers must not begin with a `.` (period) character. + * Like g_bus_watch_name() but takes a #GDBusConnection instead of a + * #GBusType. * - * - Application identifiers must not exceed 255 characters. + * Returns: An identifier (never 0) that can be used with + * g_bus_unwatch_name() to stop watching the name. + * Since: 2.26 + */ + + +/** + * g_bus_watch_name_on_connection_with_closures: (rename-to g_bus_watch_name_on_connection) + * @connection: A #GDBusConnection. + * @name: The name (well-known or unique) to watch. + * @flags: Flags from the #GBusNameWatcherFlags enumeration. + * @name_appeared_closure: (nullable): #GClosure to invoke when @name is known + * to exist or %NULL. + * @name_vanished_closure: (nullable): #GClosure to invoke when @name is known + * to not exist or %NULL. * - * Note that the hyphen (`-`) character is allowed in application identifiers, - * but is problematic or not allowed in various specifications and APIs that - * refer to D-Bus, such as - * [Flatpak application IDs](http://docs.flatpak.org/en/latest/introduction.html#identifiers), - * the - * [`DBusActivatable` interface in the Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#dbus), - * and the convention that an application's "main" interface and object path - * resemble its application identifier and bus name. To avoid situations that - * require special-case handling, it is recommended that new application - * identifiers consistently replace hyphens with underscores. + * Version of g_bus_watch_name_on_connection() using closures instead of callbacks for + * easier binding in other languages. * - * Like D-Bus interface names, application identifiers should start with the - * reversed DNS domain name of the author of the interface (in lower-case), and - * it is conventional for the rest of the application identifier to consist of - * words run together, with initial capital letters. + * Returns: An identifier (never 0) that can be used with + * g_bus_unwatch_name() to stop watching the name. + * Since: 2.26 + */ + + +/** + * g_bus_watch_name_with_closures: (rename-to g_bus_watch_name) + * @bus_type: The type of bus to watch a name on. + * @name: The name (well-known or unique) to watch. + * @flags: Flags from the #GBusNameWatcherFlags enumeration. + * @name_appeared_closure: (nullable): #GClosure to invoke when @name is known + * to exist or %NULL. + * @name_vanished_closure: (nullable): #GClosure to invoke when @name is known + * to not exist or %NULL. * - * As with D-Bus interface names, if the author's DNS domain name contains - * hyphen/minus characters they should be replaced by underscores, and if it - * contains leading digits they should be escaped by prepending an underscore. - * For example, if the owner of 7-zip.org used an application identifier for an - * archiving application, it might be named `org._7_zip.Archiver`. + * Version of g_bus_watch_name() using closures instead of callbacks for + * easier binding in other languages. * - * Returns: %TRUE if @application_id is valid + * Returns: An identifier (never 0) that can be used with + * g_bus_unwatch_name() to stop watching the name. + * Since: 2.26 */ /** - * g_application_mark_busy: - * @application: a #GApplication - * - * Increases the busy count of @application. + * g_bytes_icon_get_bytes: + * @icon: a #GIcon. * - * Use this function to indicate that the application is busy, for instance - * while a long running operation is pending. + * Gets the #GBytes associated with the given @icon. * - * The busy state will be exposed to other processes, so a session shell will - * use that information to indicate the state to the user (e.g. with a - * spinner). + * Returns: (transfer none): a #GBytes, or %NULL. + * Since: 2.38 + */ + + +/** + * g_bytes_icon_new: + * @bytes: a #GBytes. * - * To cancel the busy indication, use g_application_unmark_busy(). + * Creates a new icon for a bytes. * + * Returns: (transfer full) (type GBytesIcon): a #GIcon for the given + * @bytes, or %NULL on error. * Since: 2.38 */ /** - * g_application_new: - * @application_id: (nullable): the application id - * @flags: the application flags + * g_cancellable_cancel: + * @cancellable: (nullable): a #GCancellable object. * - * Creates a new #GApplication instance. + * Will set @cancellable to cancelled, and will emit the + * #GCancellable::cancelled signal. (However, see the warning about + * race conditions in the documentation for that signal if you are + * planning to connect to it.) * - * If non-%NULL, the application id must be valid. See - * g_application_id_is_valid(). + * This function is thread-safe. In other words, you can safely call + * it from a thread other than the one running the operation that was + * passed the @cancellable. * - * If no application ID is given then some features of #GApplication - * (most notably application uniqueness) will be disabled. + * If @cancellable is %NULL, this function returns immediately for convenience. * - * Returns: a new #GApplication instance + * The convention within GIO is that cancelling an asynchronous + * operation causes it to complete asynchronously. That is, if you + * cancel the operation from the same thread in which it is running, + * then the operation's #GAsyncReadyCallback will not be invoked until + * the application returns to the main loop. */ /** - * g_application_open: - * @application: a #GApplication - * @files: (array length=n_files): an array of #GFiles to open - * @n_files: the length of the @files array - * @hint: a hint (or ""), but never %NULL + * g_cancellable_connect: + * @cancellable: A #GCancellable. + * @callback: The #GCallback to connect. + * @data: Data to pass to @callback. + * @data_destroy_func: (nullable): Free function for @data or %NULL. * - * Opens the given files. + * Convenience function to connect to the #GCancellable::cancelled + * signal. Also handles the race condition that may happen + * if the cancellable is cancelled right before connecting. * - * In essence, this results in the #GApplication::open signal being emitted - * in the primary instance. + * @callback is called at most once, either directly at the + * time of the connect if @cancellable is already cancelled, + * or when @cancellable is cancelled in some thread. * - * @n_files must be greater than zero. + * @data_destroy_func will be called when the handler is + * disconnected, or immediately if the cancellable is already + * cancelled. * - * @hint is simply passed through to the ::open signal. It is - * intended to be used by applications that have multiple modes for - * opening files (eg: "view" vs "edit", etc). Unless you have a need - * for this functionality, you should use "". + * See #GCancellable::cancelled for details on how to use this. * - * The application must be registered before calling this function - * and it must have the %G_APPLICATION_HANDLES_OPEN flag set. + * Since GLib 2.40, the lock protecting @cancellable is not held when + * @callback is invoked. This lifts a restriction in place for + * earlier GLib versions which now makes it easier to write cleanup + * code that unconditionally invokes e.g. g_cancellable_cancel(). * - * Since: 2.28 + * Returns: The id of the signal handler or 0 if @cancellable has already + * been cancelled. + * Since: 2.22 */ /** - * g_application_quit: - * @application: a #GApplication - * - * Immediately quits the application. + * g_cancellable_disconnect: + * @cancellable: (nullable): A #GCancellable or %NULL. + * @handler_id: Handler id of the handler to be disconnected, or `0`. * - * Upon return to the mainloop, g_application_run() will return, - * calling only the 'shutdown' function before doing so. + * Disconnects a handler from a cancellable instance similar to + * g_signal_handler_disconnect(). Additionally, in the event that a + * signal handler is currently running, this call will block until the + * handler has finished. Calling this function from a + * #GCancellable::cancelled signal handler will therefore result in a + * deadlock. * - * The hold count is ignored. - * Take care if your code has called g_application_hold() on the application and - * is therefore still expecting it to exist. - * (Note that you may have called g_application_hold() indirectly, for example - * through gtk_application_add_window().) + * This avoids a race condition where a thread cancels at the + * same time as the cancellable operation is finished and the + * signal handler is removed. See #GCancellable::cancelled for + * details on how to use this. * - * The result of calling g_application_run() again after it returns is - * unspecified. + * If @cancellable is %NULL or @handler_id is `0` this function does + * nothing. * - * Since: 2.32 + * Since: 2.22 */ /** - * g_application_register: - * @application: a #GApplication - * @cancellable: (nullable): a #GCancellable, or %NULL - * @error: a pointer to a NULL #GError, or %NULL - * - * Attempts registration of the application. - * - * This is the point at which the application discovers if it is the - * primary instance or merely acting as a remote for an already-existing - * primary instance. This is implemented by attempting to acquire the - * application identifier as a unique bus name on the session bus using - * GDBus. + * g_cancellable_get_current: * - * If there is no application ID or if %G_APPLICATION_NON_UNIQUE was - * given, then this process will always become the primary instance. + * Gets the top cancellable from the stack. * - * Due to the internal architecture of GDBus, method calls can be - * dispatched at any time (even if a main loop is not running). For - * this reason, you must ensure that any object paths that you wish to - * register are registered before calling this function. + * Returns: (nullable) (transfer none): a #GCancellable from the top + * of the stack, or %NULL if the stack is empty. + */ + + +/** + * g_cancellable_get_fd: + * @cancellable: a #GCancellable. * - * If the application has already been registered then %TRUE is - * returned with no work performed. + * Gets the file descriptor for a cancellable job. This can be used to + * implement cancellable operations on Unix systems. The returned fd will + * turn readable when @cancellable is cancelled. * - * The #GApplication::startup signal is emitted if registration succeeds - * and @application is the primary instance (including the non-unique - * case). + * You are not supposed to read from the fd yourself, just check for + * readable status. Reading to unset the readable status is done + * with g_cancellable_reset(). * - * In the event of an error (such as @cancellable being cancelled, or a - * failure to connect to the session bus), %FALSE is returned and @error - * is set appropriately. + * After a successful return from this function, you should use + * g_cancellable_release_fd() to free up resources allocated for + * the returned file descriptor. * - * Note: the return value of this function is not an indicator that this - * instance is or is not the primary instance of the application. See - * g_application_get_is_remote() for that. + * See also g_cancellable_make_pollfd(). * - * Returns: %TRUE if registration succeeded - * Since: 2.28 + * Returns: A valid file descriptor. `-1` if the file descriptor + * is not supported, or on errors. */ /** - * g_application_release: - * @application: a #GApplication - * - * Decrease the use count of @application. + * g_cancellable_is_cancelled: + * @cancellable: (nullable): a #GCancellable or %NULL * - * When the use count reaches zero, the application will stop running. + * Checks if a cancellable job has been cancelled. * - * Never call this function except to cancel the effect of a previous - * call to g_application_hold(). + * Returns: %TRUE if @cancellable is cancelled, + * FALSE if called with %NULL or if item is not cancelled. */ /** - * g_application_run: - * @application: a #GApplication - * @argc: the argc from main() (or 0 if @argv is %NULL) - * @argv: (array length=argc) (element-type filename) (nullable): - * the argv from main(), or %NULL - * - * Runs the application. - * - * This function is intended to be run from main() and its return value - * is intended to be returned by main(). Although you are expected to pass - * the @argc, @argv parameters from main() to this function, it is possible - * to pass %NULL if @argv is not available or commandline handling is not - * required. Note that on Windows, @argc and @argv are ignored, and - * g_win32_get_command_line() is called internally (for proper support - * of Unicode commandline arguments). - * - * #GApplication will attempt to parse the commandline arguments. You - * can add commandline flags to the list of recognised options by way of - * g_application_add_main_option_entries(). After this, the - * #GApplication::handle-local-options signal is emitted, from which the - * application can inspect the values of its #GOptionEntrys. - * - * #GApplication::handle-local-options is a good place to handle options - * such as `--version`, where an immediate reply from the local process is - * desired (instead of communicating with an already-running instance). - * A #GApplication::handle-local-options handler can stop further processing - * by returning a non-negative value, which then becomes the exit status of - * the process. - * - * What happens next depends on the flags: if - * %G_APPLICATION_HANDLES_COMMAND_LINE was specified then the remaining - * commandline arguments are sent to the primary instance, where a - * #GApplication::command-line signal is emitted. Otherwise, the - * remaining commandline arguments are assumed to be a list of files. - * If there are no files listed, the application is activated via the - * #GApplication::activate signal. If there are one or more files, and - * %G_APPLICATION_HANDLES_OPEN was specified then the files are opened - * via the #GApplication::open signal. - * - * If you are interested in doing more complicated local handling of the - * commandline then you should implement your own #GApplication subclass - * and override local_command_line(). In this case, you most likely want - * to return %TRUE from your local_command_line() implementation to - * suppress the default handling. See - * [gapplication-example-cmdline2.c][gapplication-example-cmdline2] - * for an example. - * - * If, after the above is done, the use count of the application is zero - * then the exit status is returned immediately. If the use count is - * non-zero then the default main context is iterated until the use count - * falls to zero, at which point 0 is returned. + * g_cancellable_make_pollfd: + * @cancellable: (nullable): a #GCancellable or %NULL + * @pollfd: a pointer to a #GPollFD * - * If the %G_APPLICATION_IS_SERVICE flag is set, then the service will - * run for as much as 10 seconds with a use count of zero while waiting - * for the message that caused the activation to arrive. After that, - * if the use count falls to zero the application will exit immediately, - * except in the case that g_application_set_inactivity_timeout() is in - * use. + * Creates a #GPollFD corresponding to @cancellable; this can be passed + * to g_poll() and used to poll for cancellation. This is useful both + * for unix systems without a native poll and for portability to + * windows. * - * This function sets the prgname (g_set_prgname()), if not already set, - * to the basename of argv[0]. + * When this function returns %TRUE, you should use + * g_cancellable_release_fd() to free up resources allocated for the + * @pollfd. After a %FALSE return, do not call g_cancellable_release_fd(). * - * Much like g_main_loop_run(), this function will acquire the main context - * for the duration that the application is running. + * If this function returns %FALSE, either no @cancellable was given or + * resource limits prevent this function from allocating the necessary + * structures for polling. (On Linux, you will likely have reached + * the maximum number of file descriptors.) The suggested way to handle + * these cases is to ignore the @cancellable. * - * Since 2.40, applications that are not explicitly flagged as services - * or launchers (ie: neither %G_APPLICATION_IS_SERVICE or - * %G_APPLICATION_IS_LAUNCHER are given as flags) will check (from the - * default handler for local_command_line) if "--gapplication-service" - * was given in the command line. If this flag is present then normal - * commandline processing is interrupted and the - * %G_APPLICATION_IS_SERVICE flag is set. This provides a "compromise" - * solution whereby running an application directly from the commandline - * will invoke it in the normal way (which can be useful for debugging) - * while still allowing applications to be D-Bus activated in service - * mode. The D-Bus service file should invoke the executable with - * "--gapplication-service" as the sole commandline argument. This - * approach is suitable for use by most graphical applications but - * should not be used from applications like editors that need precise - * control over when processes invoked via the commandline will exit and - * what their exit status will be. + * You are not supposed to read from the fd yourself, just check for + * readable status. Reading to unset the readable status is done + * with g_cancellable_reset(). * - * Returns: the exit status - * Since: 2.28 + * Returns: %TRUE if @pollfd was successfully initialized, %FALSE on + * failure to prepare the cancellable. + * Since: 2.22 */ /** - * g_application_send_notification: - * @application: a #GApplication - * @id: (nullable): id of the notification, or %NULL - * @notification: the #GNotification to send - * - * Sends a notification on behalf of @application to the desktop shell. - * There is no guarantee that the notification is displayed immediately, - * or even at all. - * - * Notifications may persist after the application exits. It will be - * D-Bus-activated when the notification or one of its actions is - * activated. - * - * Modifying @notification after this call has no effect. However, the - * object can be reused for a later call to this function. - * - * @id may be any string that uniquely identifies the event for the - * application. It does not need to be in any special format. For - * example, "new-message" might be appropriate for a notification about - * new messages. + * g_cancellable_new: * - * If a previous notification was sent with the same @id, it will be - * replaced with @notification and shown again as if it was a new - * notification. This works even for notifications sent from a previous - * execution of the application, as long as @id is the same string. + * Creates a new #GCancellable object. * - * @id may be %NULL, but it is impossible to replace or withdraw - * notifications without an id. + * Applications that want to start one or more operations + * that should be cancellable should create a #GCancellable + * and pass it to the operations. * - * If @notification is no longer relevant, it can be withdrawn with - * g_application_withdraw_notification(). + * One #GCancellable can be used in multiple consecutive + * operations or in multiple concurrent operations. * - * Since: 2.40 + * Returns: a #GCancellable. */ /** - * g_application_set_action_group: - * @application: a #GApplication - * @action_group: (nullable): a #GActionGroup, or %NULL - * - * This used to be how actions were associated with a #GApplication. - * Now there is #GActionMap for that. + * g_cancellable_pop_current: + * @cancellable: a #GCancellable object * - * Since: 2.28 - * Deprecated: 2.32: Use the #GActionMap interface instead. Never ever - * mix use of this API with use of #GActionMap on the same @application - * or things will go very badly wrong. This function is known to - * introduce buggy behaviour (ie: signals not emitted on changes to the - * action group), so you should really use #GActionMap instead. + * Pops @cancellable off the cancellable stack (verifying that @cancellable + * is on the top of the stack). */ /** - * g_application_set_application_id: - * @application: a #GApplication - * @application_id: (nullable): the identifier for @application - * - * Sets the unique identifier for @application. + * g_cancellable_push_current: + * @cancellable: a #GCancellable object * - * The application id can only be modified if @application has not yet - * been registered. + * Pushes @cancellable onto the cancellable stack. The current + * cancellable can then be received using g_cancellable_get_current(). * - * If non-%NULL, the application id must be valid. See - * g_application_id_is_valid(). + * This is useful when implementing cancellable operations in + * code that does not allow you to pass down the cancellable object. * - * Since: 2.28 + * This is typically called automatically by e.g. #GFile operations, + * so you rarely have to call this yourself. */ /** - * g_application_set_default: - * @application: (nullable): the application to set as default, or %NULL + * g_cancellable_release_fd: + * @cancellable: a #GCancellable * - * Sets or unsets the default application for the process, as returned - * by g_application_get_default(). + * Releases a resources previously allocated by g_cancellable_get_fd() + * or g_cancellable_make_pollfd(). * - * This function does not take its own reference on @application. If - * @application is destroyed then the default application will revert - * back to %NULL. + * For compatibility reasons with older releases, calling this function + * is not strictly required, the resources will be automatically freed + * when the @cancellable is finalized. However, the @cancellable will + * block scarce file descriptors until it is finalized if this function + * is not called. This can cause the application to run out of file + * descriptors when many #GCancellables are used at the same time. * - * Since: 2.32 + * Since: 2.22 */ /** - * g_application_set_flags: - * @application: a #GApplication - * @flags: the flags for @application + * g_cancellable_reset: + * @cancellable: a #GCancellable object. * - * Sets the flags for @application. + * Resets @cancellable to its uncancelled state. * - * The flags can only be modified if @application has not yet been - * registered. + * If cancellable is currently in use by any cancellable operation + * then the behavior of this function is undefined. * - * See #GApplicationFlags. + * Note that it is generally not a good idea to reuse an existing + * cancellable for more operations after it has been cancelled once, + * as this function might tempt you to do. The recommended practice + * is to drop the reference to a cancellable after cancelling it, + * and let it die with the outstanding async operations. You should + * create a fresh cancellable for further async operations. + */ + + +/** + * g_cancellable_set_error_if_cancelled: + * @cancellable: (nullable): a #GCancellable or %NULL + * @error: #GError to append error state to * - * Since: 2.28 + * If the @cancellable is cancelled, sets the error to notify + * that the operation was cancelled. + * + * Returns: %TRUE if @cancellable was cancelled, %FALSE if it was not */ /** - * g_application_set_inactivity_timeout: - * @application: a #GApplication - * @inactivity_timeout: the timeout, in milliseconds + * g_cancellable_source_new: + * @cancellable: (nullable): a #GCancellable, or %NULL * - * Sets the current inactivity timeout for the application. + * Creates a source that triggers if @cancellable is cancelled and + * calls its callback of type #GCancellableSourceFunc. This is + * primarily useful for attaching to another (non-cancellable) source + * with g_source_add_child_source() to add cancellability to it. * - * This is the amount of time (in milliseconds) after the last call to - * g_application_release() before the application stops running. + * For convenience, you can call this with a %NULL #GCancellable, + * in which case the source will never trigger. * - * This call has no side effects of its own. The value set here is only - * used for next time g_application_release() drops the use count to - * zero. Any timeouts currently in progress are not impacted. + * The new #GSource will hold a reference to the #GCancellable. * + * Returns: (transfer full): the new #GSource. * Since: 2.28 */ /** - * g_application_set_option_context_description: - * @application: the #GApplication - * @description: (nullable): a string to be shown in `--help` output - * after the list of options, or %NULL - * - * Adds a description to the @application option context. - * - * See g_option_context_set_description() for more information. - * - * Since: 2.56 - */ - - -/** - * g_application_set_option_context_parameter_string: - * @application: the #GApplication - * @parameter_string: (nullable): a string which is displayed - * in the first line of `--help` output, after the usage summary `programname [OPTION...]`. - * - * Sets the parameter string to be used by the commandline handling of @application. - * - * This function registers the argument to be passed to g_option_context_new() - * when the internal #GOptionContext of @application is created. + * g_charset_converter_get_num_fallbacks: + * @converter: a #GCharsetConverter * - * See g_option_context_new() for more information about @parameter_string. + * Gets the number of fallbacks that @converter has applied so far. * - * Since: 2.56 + * Returns: the number of fallbacks that @converter has applied + * Since: 2.24 */ /** - * g_application_set_option_context_summary: - * @application: the #GApplication - * @summary: (nullable): a string to be shown in `--help` output - * before the list of options, or %NULL - * - * Adds a summary to the @application option context. + * g_charset_converter_get_use_fallback: + * @converter: a #GCharsetConverter * - * See g_option_context_set_summary() for more information. + * Gets the #GCharsetConverter:use-fallback property. * - * Since: 2.56 + * Returns: %TRUE if fallbacks are used by @converter + * Since: 2.24 */ /** - * g_application_set_resource_base_path: - * @application: a #GApplication - * @resource_path: (nullable): the resource path to use - * - * Sets (or unsets) the base resource path of @application. - * - * The path is used to automatically load various [application - * resources][gresource] such as menu layouts and action descriptions. - * The various types of resources will be found at fixed names relative - * to the given base path. - * - * By default, the resource base path is determined from the application - * ID by prefixing '/' and replacing each '.' with '/'. This is done at - * the time that the #GApplication object is constructed. Changes to - * the application ID after that point will not have an impact on the - * resource base path. - * - * As an example, if the application has an ID of "org.example.app" then - * the default resource base path will be "/org/example/app". If this - * is a #GtkApplication (and you have not manually changed the path) - * then Gtk will then search for the menus of the application at - * "/org/example/app/gtk/menus.ui". - * - * See #GResource for more information about adding resources to your - * application. - * - * You can disable automatic resource loading functionality by setting - * the path to %NULL. + * g_charset_converter_new: + * @to_charset: destination charset + * @from_charset: source charset + * @error: #GError for error reporting, or %NULL to ignore. * - * Changing the resource base path once the application is running is - * not recommended. The point at which the resource path is consulted - * for forming paths for various purposes is unspecified. When writing - * a sub-class of #GApplication you should either set the - * #GApplication:resource-base-path property at construction time, or call - * this function during the instance initialization. Alternatively, you - * can call this function in the #GApplicationClass.startup virtual function, - * before chaining up to the parent implementation. + * Creates a new #GCharsetConverter. * - * Since: 2.42 + * Returns: a new #GCharsetConverter or %NULL on error. + * Since: 2.24 */ /** - * g_application_unbind_busy_property: - * @application: a #GApplication - * @object: (type GObject.Object): a #GObject - * @property: the name of a boolean property of @object + * g_charset_converter_set_use_fallback: + * @converter: a #GCharsetConverter + * @use_fallback: %TRUE to use fallbacks * - * Destroys a binding between @property and the busy state of - * @application that was previously created with - * g_application_bind_busy_property(). + * Sets the #GCharsetConverter:use-fallback property. * - * Since: 2.44 + * Since: 2.24 */ /** - * g_application_unmark_busy: - * @application: a #GApplication - * - * Decreases the busy count of @application. - * - * When the busy count reaches zero, the new state will be propagated - * to other processes. + * g_content_type_can_be_executable: + * @type: a content type string * - * This function must only be called to cancel the effect of a previous - * call to g_application_mark_busy(). + * Checks if a content type can be executable. Note that for instance + * things like text files can be executables (i.e. scripts and batch files). * - * Since: 2.38 + * Returns: %TRUE if the file type corresponds to a type that + * can be executable, %FALSE otherwise. */ /** - * g_application_withdraw_notification: - * @application: a #GApplication - * @id: id of a previously sent notification - * - * Withdraws a notification that was sent with - * g_application_send_notification(). - * - * This call does nothing if a notification with @id doesn't exist or - * the notification was never sent. - * - * This function works even for notifications sent in previous - * executions of this application, as long @id is the same as it was for - * the sent notification. + * g_content_type_equals: + * @type1: a content type string + * @type2: a content type string * - * Note that notifications are dismissed when the user clicks on one - * of the buttons in a notification or triggers its default action, so - * there is no need to explicitly withdraw the notification in that case. + * Compares two content types for equality. * - * Since: 2.40 + * Returns: %TRUE if the two strings are identical or equivalent, + * %FALSE otherwise. */ /** - * g_async_initable_init_async: - * @initable: a #GAsyncInitable. - * @io_priority: the [I/O priority][io-priority] of the operation - * @cancellable: optional #GCancellable object, %NULL to ignore. - * @callback: a #GAsyncReadyCallback to call when the request is satisfied - * @user_data: the data to pass to callback function - * - * Starts asynchronous initialization of the object implementing the - * interface. This must be done before any real use of the object after - * initial construction. If the object also implements #GInitable you can - * optionally call g_initable_init() instead. - * - * This method is intended for language bindings. If writing in C, - * g_async_initable_new_async() should typically be used instead. - * - * When the initialization is finished, @callback will be called. You can - * then call g_async_initable_init_finish() to get the result of the - * initialization. - * - * Implementations may also support cancellation. If @cancellable is not - * %NULL, then initialization can be cancelled by triggering the cancellable - * object from another thread. If the operation was cancelled, the error - * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and - * the object doesn't support cancellable initialization, the error - * %G_IO_ERROR_NOT_SUPPORTED will be returned. - * - * As with #GInitable, if the object is not initialized, or initialization - * returns with an error, then all operations on the object except - * g_object_ref() and g_object_unref() are considered to be invalid, and - * have undefined behaviour. They will often fail with g_critical() or - * g_warning(), but this must not be relied on. - * - * Callers should not assume that a class which implements #GAsyncInitable can - * be initialized multiple times; for more information, see g_initable_init(). - * If a class explicitly supports being initialized multiple times, - * implementation requires yielding all subsequent calls to init_async() on the - * results of the first call. + * g_content_type_from_mime_type: + * @mime_type: a mime type string * - * For classes that also support the #GInitable interface, the default - * implementation of this method will run the g_initable_init() function - * in a thread, so if you want to support asynchronous initialization via - * threads, just implement the #GAsyncInitable interface without overriding - * any interface methods. + * Tries to find a content type based on the mime type name. * - * Since: 2.22 + * Returns: (nullable): Newly allocated string with content type or + * %NULL. Free with g_free() + * Since: 2.18 */ /** - * g_async_initable_init_finish: - * @initable: a #GAsyncInitable. - * @res: a #GAsyncResult. - * @error: a #GError location to store the error occurring, or %NULL to - * ignore. + * g_content_type_get_description: + * @type: a content type string * - * Finishes asynchronous initialization and returns the result. - * See g_async_initable_init_async(). + * Gets the human readable description of the content type. * - * Returns: %TRUE if successful. If an error has occurred, this function - * will return %FALSE and set @error appropriately if present. - * Since: 2.22 + * Returns: a short description of the content type @type. Free the + * returned string with g_free() */ /** - * g_async_initable_new_async: - * @object_type: a #GType supporting #GAsyncInitable. - * @io_priority: the [I/O priority][io-priority] of the operation - * @cancellable: optional #GCancellable object, %NULL to ignore. - * @callback: a #GAsyncReadyCallback to call when the initialization is - * finished - * @user_data: the data to pass to callback function - * @first_property_name: (nullable): the name of the first property, or %NULL if no - * properties - * @...: the value of the first property, followed by other property - * value pairs, and ended by %NULL. + * g_content_type_get_generic_icon_name: + * @type: a content type string * - * Helper function for constructing #GAsyncInitable object. This is - * similar to g_object_new() but also initializes the object asynchronously. + * Gets the generic icon name for a content type. * - * When the initialization is finished, @callback will be called. You can - * then call g_async_initable_new_finish() to get the new object and check - * for any errors. + * See the + * [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) + * specification for more on the generic icon name. * - * Since: 2.22 + * Returns: (nullable): the registered generic icon name for the given @type, + * or %NULL if unknown. Free with g_free() + * Since: 2.34 */ /** - * g_async_initable_new_finish: - * @initable: the #GAsyncInitable from the callback - * @res: the #GAsyncResult from the callback - * @error: return location for errors, or %NULL to ignore + * g_content_type_get_icon: + * @type: a content type string * - * Finishes the async construction for the various g_async_initable_new - * calls, returning the created object or %NULL on error. + * Gets the icon for a content type. * - * Returns: (type GObject.Object) (transfer full): a newly created #GObject, - * or %NULL on error. Free with g_object_unref(). - * Since: 2.22 + * Returns: (transfer full): #GIcon corresponding to the content type. Free the returned + * object with g_object_unref() */ /** - * g_async_initable_new_valist_async: - * @object_type: a #GType supporting #GAsyncInitable. - * @first_property_name: the name of the first property, followed by - * the value, and other property value pairs, and ended by %NULL. - * @var_args: The var args list generated from @first_property_name. - * @io_priority: the [I/O priority][io-priority] of the operation - * @cancellable: optional #GCancellable object, %NULL to ignore. - * @callback: a #GAsyncReadyCallback to call when the initialization is - * finished - * @user_data: the data to pass to callback function - * - * Helper function for constructing #GAsyncInitable object. This is - * similar to g_object_new_valist() but also initializes the object - * asynchronously. + * g_content_type_get_mime_dirs: * - * When the initialization is finished, @callback will be called. You can - * then call g_async_initable_new_finish() to get the new object and check - * for any errors. + * Get the list of directories which MIME data is loaded from. See + * g_content_type_set_mime_dirs() for details. * - * Since: 2.22 + * Returns: (transfer none) (array zero-terminated=1): %NULL-terminated list of + * directories to load MIME data from, including any `mime/` subdirectory, + * and with the first directory to try listed first + * Since: 2.60 */ /** - * g_async_initable_newv_async: - * @object_type: a #GType supporting #GAsyncInitable. - * @n_parameters: the number of parameters in @parameters - * @parameters: the parameters to use to construct the object - * @io_priority: the [I/O priority][io-priority] of the operation - * @cancellable: optional #GCancellable object, %NULL to ignore. - * @callback: a #GAsyncReadyCallback to call when the initialization is - * finished - * @user_data: the data to pass to callback function - * - * Helper function for constructing #GAsyncInitable object. This is - * similar to g_object_newv() but also initializes the object asynchronously. + * g_content_type_get_mime_type: + * @type: a content type string * - * When the initialization is finished, @callback will be called. You can - * then call g_async_initable_new_finish() to get the new object and check - * for any errors. + * Gets the mime type for the content type, if one is registered. * - * Since: 2.22 - * Deprecated: 2.54: Use g_object_new_with_properties() and - * g_async_initable_init_async() instead. See #GParameter for more information. + * Returns: (nullable) (transfer full): the registered mime type for the + * given @type, or %NULL if unknown; free with g_free(). */ /** - * g_async_result_get_source_object: - * @res: a #GAsyncResult + * g_content_type_get_symbolic_icon: + * @type: a content type string * - * Gets the source object from a #GAsyncResult. + * Gets the symbolic icon for a content type. * - * Returns: (transfer full) (nullable): a new reference to the source - * object for the @res, or %NULL if there is none. + * Returns: (transfer full): symbolic #GIcon corresponding to the content type. + * Free the returned object with g_object_unref() + * Since: 2.34 */ /** - * g_async_result_get_user_data: - * @res: a #GAsyncResult. + * g_content_type_guess: + * @filename: (nullable): a string, or %NULL + * @data: (nullable) (array length=data_size): a stream of data, or %NULL + * @data_size: the size of @data + * @result_uncertain: (out) (optional): return location for the certainty + * of the result, or %NULL * - * Gets the user data from a #GAsyncResult. + * Guesses the content type based on example data. If the function is + * uncertain, @result_uncertain will be set to %TRUE. Either @filename + * or @data may be %NULL, in which case the guess will be based solely + * on the other argument. * - * Returns: (transfer full): the user data for @res. + * Returns: a string indicating a guessed content type for the + * given data. Free with g_free() */ /** - * g_async_result_is_tagged: - * @res: a #GAsyncResult - * @source_tag: an application-defined tag - * - * Checks if @res has the given @source_tag (generally a function - * pointer indicating the function @res was created by). + * g_content_type_guess_for_tree: + * @root: the root of the tree to guess a type for * - * Returns: %TRUE if @res has the indicated @source_tag, %FALSE if - * not. - * Since: 2.34 - */ - - -/** - * g_async_result_legacy_propagate_error: - * @res: a #GAsyncResult - * @error: (out): a location to propagate the error to. + * Tries to guess the type of the tree with root @root, by + * looking at the files it contains. The result is an array + * of content types, with the best guess coming first. * - * If @res is a #GSimpleAsyncResult, this is equivalent to - * g_simple_async_result_propagate_error(). Otherwise it returns - * %FALSE. + * The types returned all have the form x-content/foo, e.g. + * x-content/audio-cdda (for audio CDs) or x-content/image-dcf + * (for a camera memory card). See the + * [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) + * specification for more on x-content types. * - * This can be used for legacy error handling in async *_finish() - * wrapper functions that traditionally handled #GSimpleAsyncResult - * error returns themselves rather than calling into the virtual method. - * This should not be used in new code; #GAsyncResult errors that are - * set by virtual methods should also be extracted by virtual methods, - * to enable subclasses to chain up correctly. + * This function is useful in the implementation of + * g_mount_guess_content_type(). * - * Returns: %TRUE if @error is has been filled in with an error from - * @res, %FALSE if not. - * Since: 2.34 + * Returns: (transfer full) (array zero-terminated=1): an %NULL-terminated + * array of zero or more content types. Free with g_strfreev() + * Since: 2.18 */ /** - * g_buffered_input_stream_fill: - * @stream: a #GBufferedInputStream - * @count: the number of bytes that will be read from the stream - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore - * @error: location to store the error occurring, or %NULL to ignore - * - * Tries to read @count bytes from the stream into the buffer. - * Will block during this read. - * - * If @count is zero, returns zero and does nothing. A value of @count - * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error. - * - * On success, the number of bytes read into the buffer is returned. - * It is not an error if this is not the same as the requested size, as it - * can happen e.g. near the end of a file. Zero is returned on end of file - * (or if @count is zero), but never otherwise. - * - * If @count is -1 then the attempted read size is equal to the number of - * bytes that are required to fill the buffer. - * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an - * operation was partially finished when the operation was cancelled the - * partial result will be returned, without an error. - * - * On error -1 is returned and @error is set accordingly. + * g_content_type_is_a: + * @type: a content type string + * @supertype: a content type string * - * For the asynchronous, non-blocking, version of this function, see - * g_buffered_input_stream_fill_async(). + * Determines if @type is a subset of @supertype. * - * Returns: the number of bytes read into @stream's buffer, up to @count, - * or -1 on error. + * Returns: %TRUE if @type is a kind of @supertype, + * %FALSE otherwise. */ /** - * g_buffered_input_stream_fill_async: - * @stream: a #GBufferedInputStream - * @count: the number of bytes that will be read from the stream - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object - * @callback: (scope async): a #GAsyncReadyCallback - * @user_data: (closure): a #gpointer + * g_content_type_is_mime_type: + * @type: a content type string + * @mime_type: a mime type string * - * Reads data into @stream's buffer asynchronously, up to @count size. - * @io_priority can be used to prioritize reads. For the synchronous - * version of this function, see g_buffered_input_stream_fill(). + * Determines if @type is a subset of @mime_type. + * Convenience wrapper around g_content_type_is_a(). * - * If @count is -1 then the attempted read size is equal to the number - * of bytes that are required to fill the buffer. + * Returns: %TRUE if @type is a kind of @mime_type, + * %FALSE otherwise. + * Since: 2.52 */ /** - * g_buffered_input_stream_fill_finish: - * @stream: a #GBufferedInputStream - * @result: a #GAsyncResult - * @error: a #GError + * g_content_type_is_unknown: + * @type: a content type string * - * Finishes an asynchronous read. + * Checks if the content type is the generic "unknown" type. + * On UNIX this is the "application/octet-stream" mimetype, + * while on win32 it is "*" and on OSX it is a dynamic type + * or octet-stream. * - * Returns: a #gssize of the read stream, or `-1` on an error. + * Returns: %TRUE if the type is the unknown type. */ /** - * g_buffered_input_stream_get_available: - * @stream: #GBufferedInputStream + * g_content_type_set_mime_dirs: + * @dirs: (array zero-terminated=1) (nullable): %NULL-terminated list of + * directories to load MIME data from, including any `mime/` subdirectory, + * and with the first directory to try listed first + * + * Set the list of directories used by GIO to load the MIME database. + * If @dirs is %NULL, the directories used are the default: + * + * - the `mime` subdirectory of the directory in `$XDG_DATA_HOME` + * - the `mime` subdirectory of every directory in `$XDG_DATA_DIRS` + * + * This function is intended to be used when writing tests that depend on + * information stored in the MIME database, in order to control the data. + * + * Typically, in case your tests use %G_TEST_OPTION_ISOLATE_DIRS, but they + * depend on the system’s MIME database, you should call this function + * with @dirs set to %NULL before calling g_test_init(), for instance: * - * Gets the size of the available data within the stream. + * |[ + * // Load MIME data from the system + * g_content_type_set_mime_dirs (NULL); + * // Isolate the environment + * g_test_init (&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL); * - * Returns: size of the available stream. - */ - - -/** - * g_buffered_input_stream_get_buffer_size: - * @stream: a #GBufferedInputStream + * … * - * Gets the size of the input buffer. + * return g_test_run (); + * ]| * - * Returns: the current buffer size. + * Since: 2.60 */ /** - * g_buffered_input_stream_new: - * @base_stream: a #GInputStream + * g_content_types_get_registered: * - * Creates a new #GInputStream from the given @base_stream, with - * a buffer set to the default size (4 kilobytes). + * Gets a list of strings containing all the registered content types + * known to the system. The list and its data should be freed using + * `g_list_free_full (list, g_free)`. * - * Returns: a #GInputStream for the given @base_stream. + * Returns: (element-type utf8) (transfer full): list of the registered + * content types */ /** - * g_buffered_input_stream_new_sized: - * @base_stream: a #GInputStream - * @size: a #gsize + * g_converter_convert: + * @converter: a #GConverter. + * @inbuf: (array length=inbuf_size) (element-type guint8): the buffer + * containing the data to convert. + * @inbuf_size: the number of bytes in @inbuf + * @outbuf: (element-type guint8) (array length=outbuf_size): a buffer to write + * converted data in. + * @outbuf_size: the number of bytes in @outbuf, must be at least one + * @flags: a #GConverterFlags controlling the conversion details + * @bytes_read: (out): will be set to the number of bytes read from @inbuf on success + * @bytes_written: (out): will be set to the number of bytes written to @outbuf on success + * @error: location to store the error occurring, or %NULL to ignore * - * Creates a new #GBufferedInputStream from the given @base_stream, - * with a buffer set to @size. + * This is the main operation used when converting data. It is to be called + * multiple times in a loop, and each time it will do some work, i.e. + * producing some output (in @outbuf) or consuming some input (from @inbuf) or + * both. If its not possible to do any work an error is returned. * - * Returns: a #GInputStream. - */ - - -/** - * g_buffered_input_stream_peek: - * @stream: a #GBufferedInputStream - * @buffer: (array length=count) (element-type guint8): a pointer to - * an allocated chunk of memory - * @offset: a #gsize - * @count: a #gsize + * Note that a single call may not consume all input (or any input at all). + * Also a call may produce output even if given no input, due to state stored + * in the converter producing output. * - * Peeks in the buffer, copying data of size @count into @buffer, - * offset @offset bytes. + * If any data was either produced or consumed, and then an error happens, then + * only the successful conversion is reported and the error is returned on the + * next call. * - * Returns: a #gsize of the number of bytes peeked, or -1 on error. - */ - - -/** - * g_buffered_input_stream_peek_buffer: - * @stream: a #GBufferedInputStream - * @count: (out): a #gsize to get the number of bytes available in the buffer + * A full conversion loop involves calling this method repeatedly, each time + * giving it new input and space output space. When there is no more input + * data after the data in @inbuf, the flag %G_CONVERTER_INPUT_AT_END must be set. + * The loop will be (unless some error happens) returning %G_CONVERTER_CONVERTED + * each time until all data is consumed and all output is produced, then + * %G_CONVERTER_FINISHED is returned instead. Note, that %G_CONVERTER_FINISHED + * may be returned even if %G_CONVERTER_INPUT_AT_END is not set, for instance + * in a decompression converter where the end of data is detectable from the + * data (and there might even be other data after the end of the compressed data). * - * Returns the buffer with the currently available bytes. The returned - * buffer must not be modified and will become invalid when reading from - * the stream or filling the buffer. + * When some data has successfully been converted @bytes_read and is set to + * the number of bytes read from @inbuf, and @bytes_written is set to indicate + * how many bytes was written to @outbuf. If there are more data to output + * or consume (i.e. unless the %G_CONVERTER_INPUT_AT_END is specified) then + * %G_CONVERTER_CONVERTED is returned, and if no more data is to be output + * then %G_CONVERTER_FINISHED is returned. * - * Returns: (array length=count) (element-type guint8) (transfer none): - * read-only buffer - */ - - -/** - * g_buffered_input_stream_read_byte: - * @stream: a #GBufferedInputStream - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore - * @error: location to store the error occurring, or %NULL to ignore + * On error %G_CONVERTER_ERROR is returned and @error is set accordingly. + * Some errors need special handling: * - * Tries to read a single byte from the stream or the buffer. Will block - * during this read. + * %G_IO_ERROR_NO_SPACE is returned if there is not enough space + * to write the resulting converted data, the application should + * call the function again with a larger @outbuf to continue. * - * On success, the byte read from the stream is returned. On end of stream - * -1 is returned but it's not an exceptional error and @error is not set. + * %G_IO_ERROR_PARTIAL_INPUT is returned if there is not enough + * input to fully determine what the conversion should produce, + * and the %G_CONVERTER_INPUT_AT_END flag is not set. This happens for + * example with an incomplete multibyte sequence when converting text, + * or when a regexp matches up to the end of the input (and may match + * further input). It may also happen when @inbuf_size is zero and + * there is no more data to produce. * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an - * operation was partially finished when the operation was cancelled the - * partial result will be returned, without an error. + * When this happens the application should read more input and then + * call the function again. If further input shows that there is no + * more data call the function again with the same data but with + * the %G_CONVERTER_INPUT_AT_END flag set. This may cause the conversion + * to finish as e.g. in the regexp match case (or, to fail again with + * %G_IO_ERROR_PARTIAL_INPUT in e.g. a charset conversion where the + * input is actually partial). * - * On error -1 is returned and @error is set accordingly. + * After g_converter_convert() has returned %G_CONVERTER_FINISHED the + * converter object is in an invalid state where its not allowed + * to call g_converter_convert() anymore. At this time you can only + * free the object or call g_converter_reset() to reset it to the + * initial state. * - * Returns: the byte read from the @stream, or -1 on end of stream or error. - */ - - -/** - * g_buffered_input_stream_set_buffer_size: - * @stream: a #GBufferedInputStream - * @size: a #gsize + * If the flag %G_CONVERTER_FLUSH is set then conversion is modified + * to try to write out all internal state to the output. The application + * has to call the function multiple times with the flag set, and when + * the available input has been consumed and all internal state has + * been produced then %G_CONVERTER_FLUSHED (or %G_CONVERTER_FINISHED if + * really at the end) is returned instead of %G_CONVERTER_CONVERTED. + * This is somewhat similar to what happens at the end of the input stream, + * but done in the middle of the data. * - * Sets the size of the internal buffer of @stream to @size, or to the - * size of the contents of the buffer. The buffer can never be resized - * smaller than its current contents. - */ - - -/** - * g_buffered_output_stream_get_auto_grow: - * @stream: a #GBufferedOutputStream. + * This has different meanings for different conversions. For instance + * in a compression converter it would mean that we flush all the + * compression state into output such that if you uncompress the + * compressed data you get back all the input data. Doing this may + * make the final file larger due to padding though. Another example + * is a regexp conversion, where if you at the end of the flushed data + * have a match, but there is also a potential longer match. In the + * non-flushed case we would ask for more input, but when flushing we + * treat this as the end of input and do the match. * - * Checks if the buffer automatically grows as data is added. + * Flushing is not always possible (like if a charset converter flushes + * at a partial multibyte sequence). Converters are supposed to try + * to produce as much output as possible and then return an error + * (typically %G_IO_ERROR_PARTIAL_INPUT). * - * Returns: %TRUE if the @stream's buffer automatically grows, - * %FALSE otherwise. + * Returns: a #GConverterResult, %G_CONVERTER_ERROR on error. + * Since: 2.24 */ /** - * g_buffered_output_stream_get_buffer_size: - * @stream: a #GBufferedOutputStream. + * g_converter_input_stream_get_converter: + * @converter_stream: a #GConverterInputStream * - * Gets the size of the buffer in the @stream. + * Gets the #GConverter that is used by @converter_stream. * - * Returns: the current size of the buffer. + * Returns: (transfer none): the converter of the converter input stream + * Since: 2.24 */ /** - * g_buffered_output_stream_new: - * @base_stream: a #GOutputStream. + * g_converter_input_stream_new: + * @base_stream: a #GInputStream + * @converter: a #GConverter * - * Creates a new buffered output stream for a base stream. + * Creates a new converter input stream for the @base_stream. * - * Returns: a #GOutputStream for the given @base_stream. + * Returns: a new #GInputStream. */ /** - * g_buffered_output_stream_new_sized: - * @base_stream: a #GOutputStream. - * @size: a #gsize. + * g_converter_output_stream_get_converter: + * @converter_stream: a #GConverterOutputStream * - * Creates a new buffered output stream with a given buffer size. + * Gets the #GConverter that is used by @converter_stream. * - * Returns: a #GOutputStream with an internal buffer set to @size. + * Returns: (transfer none): the converter of the converter output stream + * Since: 2.24 */ /** - * g_buffered_output_stream_set_auto_grow: - * @stream: a #GBufferedOutputStream. - * @auto_grow: a #gboolean. + * g_converter_output_stream_new: + * @base_stream: a #GOutputStream + * @converter: a #GConverter * - * Sets whether or not the @stream's buffer should automatically grow. - * If @auto_grow is true, then each write will just make the buffer - * larger, and you must manually flush the buffer to actually write out - * the data to the underlying stream. + * Creates a new converter output stream for the @base_stream. + * + * Returns: a new #GOutputStream. */ /** - * g_buffered_output_stream_set_buffer_size: - * @stream: a #GBufferedOutputStream. - * @size: a #gsize. + * g_converter_reset: + * @converter: a #GConverter. * - * Sets the size of the internal buffer to @size. + * Resets all internal state in the converter, making it behave + * as if it was just created. If the converter has any internal + * state that would produce output then that output is lost. + * + * Since: 2.24 */ /** - * g_bus_get: - * @bus_type: a #GBusType - * @cancellable: (nullable): a #GCancellable or %NULL - * @callback: a #GAsyncReadyCallback to call when the request is satisfied - * @user_data: the data to pass to @callback - * - * Asynchronously connects to the message bus specified by @bus_type. + * g_credentials_get_native: (skip) + * @credentials: A #GCredentials. + * @native_type: The type of native credentials to get. * - * When the operation is finished, @callback will be invoked. You can - * then call g_bus_get_finish() to get the result of the operation. + * Gets a pointer to native credentials of type @native_type from + * @credentials. * - * This is a asynchronous failable function. See g_bus_get_sync() for - * the synchronous version. + * It is a programming error (which will cause a warning to be + * logged) to use this method if there is no #GCredentials support for + * the OS or if @native_type isn't supported by the OS. * + * Returns: The pointer to native credentials or %NULL if the + * operation there is no #GCredentials support for the OS or if + * @native_type isn't supported by the OS. Do not free the returned + * data, it is owned by @credentials. * Since: 2.26 */ /** - * g_bus_get_finish: - * @res: a #GAsyncResult obtained from the #GAsyncReadyCallback passed - * to g_bus_get() - * @error: return location for error or %NULL - * - * Finishes an operation started with g_bus_get(). + * g_credentials_get_unix_pid: + * @credentials: A #GCredentials + * @error: Return location for error or %NULL. * - * The returned object is a singleton, that is, shared with other - * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the - * event that you need a private message bus connection, use - * g_dbus_address_get_for_bus_sync() and - * g_dbus_connection_new_for_address(). + * Tries to get the UNIX process identifier from @credentials. This + * method is only available on UNIX platforms. * - * Note that the returned #GDBusConnection object will (usually) have - * the #GDBusConnection:exit-on-close property set to %TRUE. + * This operation can fail if #GCredentials is not supported on the + * OS or if the native credentials type does not contain information + * about the UNIX process ID. * - * Returns: (transfer full): a #GDBusConnection or %NULL if @error is set. - * Free with g_object_unref(). - * Since: 2.26 + * Returns: The UNIX process ID, or -1 if @error is set. + * Since: 2.36 */ /** - * g_bus_get_sync: - * @bus_type: a #GBusType - * @cancellable: (nullable): a #GCancellable or %NULL - * @error: return location for error or %NULL - * - * Synchronously connects to the message bus specified by @bus_type. - * Note that the returned object may shared with other callers, - * e.g. if two separate parts of a process calls this function with - * the same @bus_type, they will share the same object. - * - * This is a synchronous failable function. See g_bus_get() and - * g_bus_get_finish() for the asynchronous version. + * g_credentials_get_unix_user: + * @credentials: A #GCredentials + * @error: Return location for error or %NULL. * - * The returned object is a singleton, that is, shared with other - * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the - * event that you need a private message bus connection, use - * g_dbus_address_get_for_bus_sync() and - * g_dbus_connection_new_for_address(). + * Tries to get the UNIX user identifier from @credentials. This + * method is only available on UNIX platforms. * - * Note that the returned #GDBusConnection object will (usually) have - * the #GDBusConnection:exit-on-close property set to %TRUE. + * This operation can fail if #GCredentials is not supported on the + * OS or if the native credentials type does not contain information + * about the UNIX user. * - * Returns: (transfer full): a #GDBusConnection or %NULL if @error is set. - * Free with g_object_unref(). + * Returns: The UNIX user identifier or -1 if @error is set. * Since: 2.26 */ /** - * g_bus_own_name: - * @bus_type: the type of bus to own a name on - * @name: the well-known name to own - * @flags: a set of flags from the #GBusNameOwnerFlags enumeration - * @bus_acquired_handler: (nullable): handler to invoke when connected to the bus of type @bus_type or %NULL - * @name_acquired_handler: (nullable): handler to invoke when @name is acquired or %NULL - * @name_lost_handler: (nullable): handler to invoke when @name is lost or %NULL - * @user_data: user data to pass to handlers - * @user_data_free_func: (nullable): function for freeing @user_data or %NULL - * - * Starts acquiring @name on the bus specified by @bus_type and calls - * @name_acquired_handler and @name_lost_handler when the name is - * acquired respectively lost. Callbacks will be invoked in the - * [thread-default main context][g-main-context-push-thread-default] - * of the thread you are calling this function from. - * - * You are guaranteed that one of the @name_acquired_handler and @name_lost_handler - * callbacks will be invoked after calling this function - there are three - * possible cases: - * - * - @name_lost_handler with a %NULL connection (if a connection to the bus - * can't be made). - * - * - @bus_acquired_handler then @name_lost_handler (if the name can't be - * obtained) - * - * - @bus_acquired_handler then @name_acquired_handler (if the name was - * obtained). - * - * When you are done owning the name, just call g_bus_unown_name() - * with the owner id this function returns. - * - * If the name is acquired or lost (for example another application - * could acquire the name if you allow replacement or the application - * currently owning the name exits), the handlers are also invoked. - * If the #GDBusConnection that is used for attempting to own the name - * closes, then @name_lost_handler is invoked since it is no longer - * possible for other processes to access the process. - * - * You cannot use g_bus_own_name() several times for the same name (unless - * interleaved with calls to g_bus_unown_name()) - only the first call - * will work. - * - * Another guarantee is that invocations of @name_acquired_handler - * and @name_lost_handler are guaranteed to alternate; that - * is, if @name_acquired_handler is invoked then you are - * guaranteed that the next time one of the handlers is invoked, it - * will be @name_lost_handler. The reverse is also true. + * g_credentials_is_same_user: + * @credentials: A #GCredentials. + * @other_credentials: A #GCredentials. + * @error: Return location for error or %NULL. * - * If you plan on exporting objects (using e.g. - * g_dbus_connection_register_object()), note that it is generally too late - * to export the objects in @name_acquired_handler. Instead, you can do this - * in @bus_acquired_handler since you are guaranteed that this will run - * before @name is requested from the bus. + * Checks if @credentials and @other_credentials is the same user. * - * This behavior makes it very simple to write applications that wants - * to [own names][gdbus-owning-names] and export objects. - * Simply register objects to be exported in @bus_acquired_handler and - * unregister the objects (if any) in @name_lost_handler. + * This operation can fail if #GCredentials is not supported on the + * the OS. * - * Returns: an identifier (never 0) that an be used with - * g_bus_unown_name() to stop owning the name. + * Returns: %TRUE if @credentials and @other_credentials has the same + * user, %FALSE otherwise or if @error is set. * Since: 2.26 */ /** - * g_bus_own_name_on_connection: - * @connection: a #GDBusConnection - * @name: the well-known name to own - * @flags: a set of flags from the #GBusNameOwnerFlags enumeration - * @name_acquired_handler: (nullable): handler to invoke when @name is acquired or %NULL - * @name_lost_handler: (nullable): handler to invoke when @name is lost or %NULL - * @user_data: user data to pass to handlers - * @user_data_free_func: (nullable): function for freeing @user_data or %NULL + * g_credentials_new: * - * Like g_bus_own_name() but takes a #GDBusConnection instead of a - * #GBusType. + * Creates a new #GCredentials object with credentials matching the + * the current process. * - * Returns: an identifier (never 0) that an be used with - * g_bus_unown_name() to stop owning the name + * Returns: A #GCredentials. Free with g_object_unref(). * Since: 2.26 */ /** - * g_bus_own_name_on_connection_with_closures: (rename-to g_bus_own_name_on_connection) - * @connection: a #GDBusConnection - * @name: the well-known name to own - * @flags: a set of flags from the #GBusNameOwnerFlags enumeration - * @name_acquired_closure: (nullable): #GClosure to invoke when @name is - * acquired or %NULL - * @name_lost_closure: (nullable): #GClosure to invoke when @name is lost - * or %NULL + * g_credentials_set_native: + * @credentials: A #GCredentials. + * @native_type: The type of native credentials to set. + * @native: (not nullable): A pointer to native credentials. * - * Version of g_bus_own_name_on_connection() using closures instead of - * callbacks for easier binding in other languages. + * Copies the native credentials of type @native_type from @native + * into @credentials. + * + * It is a programming error (which will cause a warning to be + * logged) to use this method if there is no #GCredentials support for + * the OS or if @native_type isn't supported by the OS. * - * Returns: an identifier (never 0) that an be used with - * g_bus_unown_name() to stop owning the name. * Since: 2.26 */ /** - * g_bus_own_name_with_closures: (rename-to g_bus_own_name) - * @bus_type: the type of bus to own a name on - * @name: the well-known name to own - * @flags: a set of flags from the #GBusNameOwnerFlags enumeration - * @bus_acquired_closure: (nullable): #GClosure to invoke when connected to - * the bus of type @bus_type or %NULL - * @name_acquired_closure: (nullable): #GClosure to invoke when @name is - * acquired or %NULL - * @name_lost_closure: (nullable): #GClosure to invoke when @name is lost or - * %NULL + * g_credentials_set_unix_user: + * @credentials: A #GCredentials. + * @uid: The UNIX user identifier to set. + * @error: Return location for error or %NULL. * - * Version of g_bus_own_name() using closures instead of callbacks for - * easier binding in other languages. + * Tries to set the UNIX user identifier on @credentials. This method + * is only available on UNIX platforms. * - * Returns: an identifier (never 0) that an be used with - * g_bus_unown_name() to stop owning the name. + * This operation can fail if #GCredentials is not supported on the + * OS or if the native credentials type does not contain information + * about the UNIX user. It can also fail if the OS does not allow the + * use of "spoofed" credentials. + * + * Returns: %TRUE if @uid was set, %FALSE if error is set. * Since: 2.26 */ /** - * g_bus_unown_name: - * @owner_id: an identifier obtained from g_bus_own_name() + * g_credentials_to_string: + * @credentials: A #GCredentials object. * - * Stops owning a name. + * Creates a human-readable textual representation of @credentials + * that can be used in logging and debug messages. The format of the + * returned string may change in future GLib release. * + * Returns: A string that should be freed with g_free(). * Since: 2.26 */ /** - * g_bus_unwatch_name: - * @watcher_id: An identifier obtained from g_bus_watch_name() + * g_data_input_stream_get_byte_order: + * @stream: a given #GDataInputStream. * - * Stops watching a name. + * Gets the byte order for the data input stream. * - * Since: 2.26 + * Returns: the @stream's current #GDataStreamByteOrder. */ /** - * g_bus_watch_name: - * @bus_type: The type of bus to watch a name on. - * @name: The name (well-known or unique) to watch. - * @flags: Flags from the #GBusNameWatcherFlags enumeration. - * @name_appeared_handler: (nullable): Handler to invoke when @name is known to exist or %NULL. - * @name_vanished_handler: (nullable): Handler to invoke when @name is known to not exist or %NULL. - * @user_data: User data to pass to handlers. - * @user_data_free_func: (nullable): Function for freeing @user_data or %NULL. - * - * Starts watching @name on the bus specified by @bus_type and calls - * @name_appeared_handler and @name_vanished_handler when the name is - * known to have a owner respectively known to lose its - * owner. Callbacks will be invoked in the - * [thread-default main context][g-main-context-push-thread-default] - * of the thread you are calling this function from. - * - * You are guaranteed that one of the handlers will be invoked after - * calling this function. When you are done watching the name, just - * call g_bus_unwatch_name() with the watcher id this function - * returns. - * - * If the name vanishes or appears (for example the application owning - * the name could restart), the handlers are also invoked. If the - * #GDBusConnection that is used for watching the name disconnects, then - * @name_vanished_handler is invoked since it is no longer - * possible to access the name. - * - * Another guarantee is that invocations of @name_appeared_handler - * and @name_vanished_handler are guaranteed to alternate; that - * is, if @name_appeared_handler is invoked then you are - * guaranteed that the next time one of the handlers is invoked, it - * will be @name_vanished_handler. The reverse is also true. + * g_data_input_stream_get_newline_type: + * @stream: a given #GDataInputStream. * - * This behavior makes it very simple to write applications that want - * to take action when a certain [name exists][gdbus-watching-names]. - * Basically, the application should create object proxies in - * @name_appeared_handler and destroy them again (if any) in - * @name_vanished_handler. + * Gets the current newline type for the @stream. * - * Returns: An identifier (never 0) that an be used with - * g_bus_unwatch_name() to stop watching the name. - * Since: 2.26 + * Returns: #GDataStreamNewlineType for the given @stream. */ /** - * g_bus_watch_name_on_connection: - * @connection: A #GDBusConnection. - * @name: The name (well-known or unique) to watch. - * @flags: Flags from the #GBusNameWatcherFlags enumeration. - * @name_appeared_handler: (nullable): Handler to invoke when @name is known to exist or %NULL. - * @name_vanished_handler: (nullable): Handler to invoke when @name is known to not exist or %NULL. - * @user_data: User data to pass to handlers. - * @user_data_free_func: (nullable): Function for freeing @user_data or %NULL. + * g_data_input_stream_new: + * @base_stream: a #GInputStream. * - * Like g_bus_watch_name() but takes a #GDBusConnection instead of a - * #GBusType. + * Creates a new data input stream for the @base_stream. * - * Returns: An identifier (never 0) that an be used with - * g_bus_unwatch_name() to stop watching the name. - * Since: 2.26 + * Returns: a new #GDataInputStream. */ /** - * g_bus_watch_name_on_connection_with_closures: (rename-to g_bus_watch_name_on_connection) - * @connection: A #GDBusConnection. - * @name: The name (well-known or unique) to watch. - * @flags: Flags from the #GBusNameWatcherFlags enumeration. - * @name_appeared_closure: (nullable): #GClosure to invoke when @name is known - * to exist or %NULL. - * @name_vanished_closure: (nullable): #GClosure to invoke when @name is known - * to not exist or %NULL. + * g_data_input_stream_read_byte: + * @stream: a given #GDataInputStream. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: #GError for error reporting. * - * Version of g_bus_watch_name_on_connection() using closures instead of callbacks for - * easier binding in other languages. + * Reads an unsigned 8-bit/1-byte value from @stream. * - * Returns: An identifier (never 0) that an be used with - * g_bus_unwatch_name() to stop watching the name. - * Since: 2.26 + * Returns: an unsigned 8-bit/1-byte value read from the @stream or `0` + * if an error occurred. */ /** - * g_bus_watch_name_with_closures: (rename-to g_bus_watch_name) - * @bus_type: The type of bus to watch a name on. - * @name: The name (well-known or unique) to watch. - * @flags: Flags from the #GBusNameWatcherFlags enumeration. - * @name_appeared_closure: (nullable): #GClosure to invoke when @name is known - * to exist or %NULL. - * @name_vanished_closure: (nullable): #GClosure to invoke when @name is known - * to not exist or %NULL. + * g_data_input_stream_read_int16: + * @stream: a given #GDataInputStream. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: #GError for error reporting. * - * Version of g_bus_watch_name() using closures instead of callbacks for - * easier binding in other languages. + * Reads a 16-bit/2-byte value from @stream. * - * Returns: An identifier (never 0) that an be used with - * g_bus_unwatch_name() to stop watching the name. - * Since: 2.26 + * In order to get the correct byte order for this read operation, + * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order(). + * + * Returns: a signed 16-bit/2-byte value read from @stream or `0` if + * an error occurred. */ /** - * g_bytes_icon_get_bytes: - * @icon: a #GIcon. + * g_data_input_stream_read_int32: + * @stream: a given #GDataInputStream. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: #GError for error reporting. * - * Gets the #GBytes associated with the given @icon. + * Reads a signed 32-bit/4-byte value from @stream. * - * Returns: (transfer none): a #GBytes, or %NULL. - * Since: 2.38 - */ - - -/** - * g_bytes_icon_new: - * @bytes: a #GBytes. + * In order to get the correct byte order for this read operation, + * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order(). * - * Creates a new icon for a bytes. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * Returns: (transfer full) (type GBytesIcon): a #GIcon for the given - * @bytes, or %NULL on error. - * Since: 2.38 + * Returns: a signed 32-bit/4-byte value read from the @stream or `0` if + * an error occurred. */ /** - * g_cancellable_cancel: - * @cancellable: (nullable): a #GCancellable object. + * g_data_input_stream_read_int64: + * @stream: a given #GDataInputStream. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: #GError for error reporting. * - * Will set @cancellable to cancelled, and will emit the - * #GCancellable::cancelled signal. (However, see the warning about - * race conditions in the documentation for that signal if you are - * planning to connect to it.) + * Reads a 64-bit/8-byte value from @stream. * - * This function is thread-safe. In other words, you can safely call - * it from a thread other than the one running the operation that was - * passed the @cancellable. + * In order to get the correct byte order for this read operation, + * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order(). * - * If @cancellable is %NULL, this function returns immediately for convenience. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * The convention within GIO is that cancelling an asynchronous - * operation causes it to complete asynchronously. That is, if you - * cancel the operation from the same thread in which it is running, - * then the operation's #GAsyncReadyCallback will not be invoked until - * the application returns to the main loop. + * Returns: a signed 64-bit/8-byte value read from @stream or `0` if + * an error occurred. */ /** - * g_cancellable_connect: - * @cancellable: A #GCancellable. - * @callback: The #GCallback to connect. - * @data: Data to pass to @callback. - * @data_destroy_func: (nullable): Free function for @data or %NULL. - * - * Convenience function to connect to the #GCancellable::cancelled - * signal. Also handles the race condition that may happen - * if the cancellable is cancelled right before connecting. - * - * @callback is called at most once, either directly at the - * time of the connect if @cancellable is already cancelled, - * or when @cancellable is cancelled in some thread. - * - * @data_destroy_func will be called when the handler is - * disconnected, or immediately if the cancellable is already - * cancelled. + * g_data_input_stream_read_line: + * @stream: a given #GDataInputStream. + * @length: (out) (optional): a #gsize to get the length of the data read in. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: #GError for error reporting. * - * See #GCancellable::cancelled for details on how to use this. + * Reads a line from the data input stream. Note that no encoding + * checks or conversion is performed; the input is not guaranteed to + * be UTF-8, and may in fact have embedded NUL characters. * - * Since GLib 2.40, the lock protecting @cancellable is not held when - * @callback is invoked. This lifts a restriction in place for - * earlier GLib versions which now makes it easier to write cleanup - * code that unconditionally invokes e.g. g_cancellable_cancel(). + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * Returns: The id of the signal handler or 0 if @cancellable has already - * been cancelled. - * Since: 2.22 + * Returns: (nullable) (transfer full) (array zero-terminated=1) (element-type guint8): + * a NUL terminated byte array with the line that was read in + * (without the newlines). Set @length to a #gsize to get the length + * of the read line. On an error, it will return %NULL and @error + * will be set. If there's no content to read, it will still return + * %NULL, but @error won't be set. */ /** - * g_cancellable_disconnect: - * @cancellable: (nullable): A #GCancellable or %NULL. - * @handler_id: Handler id of the handler to be disconnected, or `0`. - * - * Disconnects a handler from a cancellable instance similar to - * g_signal_handler_disconnect(). Additionally, in the event that a - * signal handler is currently running, this call will block until the - * handler has finished. Calling this function from a - * #GCancellable::cancelled signal handler will therefore result in a - * deadlock. + * g_data_input_stream_read_line_async: + * @stream: a given #GDataInputStream. + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (scope async): callback to call when the request is satisfied. + * @user_data: (closure): the data to pass to callback function. * - * This avoids a race condition where a thread cancels at the - * same time as the cancellable operation is finished and the - * signal handler is removed. See #GCancellable::cancelled for - * details on how to use this. + * The asynchronous version of g_data_input_stream_read_line(). It is + * an error to have two outstanding calls to this function. * - * If @cancellable is %NULL or @handler_id is `0` this function does - * nothing. + * When the operation is finished, @callback will be called. You + * can then call g_data_input_stream_read_line_finish() to get + * the result of the operation. * - * Since: 2.22 + * Since: 2.20 */ /** - * g_cancellable_get_current: + * g_data_input_stream_read_line_finish: + * @stream: a given #GDataInputStream. + * @result: the #GAsyncResult that was provided to the callback. + * @length: (out) (optional): a #gsize to get the length of the data read in. + * @error: #GError for error reporting. * - * Gets the top cancellable from the stack. + * Finish an asynchronous call started by + * g_data_input_stream_read_line_async(). Note the warning about + * string encoding in g_data_input_stream_read_line() applies here as + * well. * - * Returns: (nullable) (transfer none): a #GCancellable from the top - * of the stack, or %NULL if the stack is empty. + * Returns: (nullable) (transfer full) (array zero-terminated=1) (element-type guint8): + * a NUL-terminated byte array with the line that was read in + * (without the newlines). Set @length to a #gsize to get the length + * of the read line. On an error, it will return %NULL and @error + * will be set. If there's no content to read, it will still return + * %NULL, but @error won't be set. + * Since: 2.20 */ /** - * g_cancellable_get_fd: - * @cancellable: a #GCancellable. - * - * Gets the file descriptor for a cancellable job. This can be used to - * implement cancellable operations on Unix systems. The returned fd will - * turn readable when @cancellable is cancelled. - * - * You are not supposed to read from the fd yourself, just check for - * readable status. Reading to unset the readable status is done - * with g_cancellable_reset(). - * - * After a successful return from this function, you should use - * g_cancellable_release_fd() to free up resources allocated for - * the returned file descriptor. + * g_data_input_stream_read_line_finish_utf8: + * @stream: a given #GDataInputStream. + * @result: the #GAsyncResult that was provided to the callback. + * @length: (out) (optional): a #gsize to get the length of the data read in. + * @error: #GError for error reporting. * - * See also g_cancellable_make_pollfd(). + * Finish an asynchronous call started by + * g_data_input_stream_read_line_async(). * - * Returns: A valid file descriptor. %-1 if the file descriptor - * is not supported, or on errors. + * Returns: (nullable) (transfer full): a string with the line that + * was read in (without the newlines). Set @length to a #gsize to + * get the length of the read line. On an error, it will return + * %NULL and @error will be set. For UTF-8 conversion errors, the set + * error domain is %G_CONVERT_ERROR. If there's no content to read, + * it will still return %NULL, but @error won't be set. + * Since: 2.30 */ /** - * g_cancellable_is_cancelled: - * @cancellable: (nullable): a #GCancellable or %NULL + * g_data_input_stream_read_line_utf8: + * @stream: a given #GDataInputStream. + * @length: (out) (optional): a #gsize to get the length of the data read in. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: #GError for error reporting. * - * Checks if a cancellable job has been cancelled. + * Reads a UTF-8 encoded line from the data input stream. * - * Returns: %TRUE if @cancellable is cancelled, - * FALSE if called with %NULL or if item is not cancelled. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * + * Returns: (nullable) (transfer full): a NUL terminated UTF-8 string + * with the line that was read in (without the newlines). Set + * @length to a #gsize to get the length of the read line. On an + * error, it will return %NULL and @error will be set. For UTF-8 + * conversion errors, the set error domain is %G_CONVERT_ERROR. If + * there's no content to read, it will still return %NULL, but @error + * won't be set. + * Since: 2.30 */ /** - * g_cancellable_make_pollfd: - * @cancellable: (nullable): a #GCancellable or %NULL - * @pollfd: a pointer to a #GPollFD - * - * Creates a #GPollFD corresponding to @cancellable; this can be passed - * to g_poll() and used to poll for cancellation. This is useful both - * for unix systems without a native poll and for portability to - * windows. - * - * When this function returns %TRUE, you should use - * g_cancellable_release_fd() to free up resources allocated for the - * @pollfd. After a %FALSE return, do not call g_cancellable_release_fd(). + * g_data_input_stream_read_uint16: + * @stream: a given #GDataInputStream. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: #GError for error reporting. * - * If this function returns %FALSE, either no @cancellable was given or - * resource limits prevent this function from allocating the necessary - * structures for polling. (On Linux, you will likely have reached - * the maximum number of file descriptors.) The suggested way to handle - * these cases is to ignore the @cancellable. + * Reads an unsigned 16-bit/2-byte value from @stream. * - * You are not supposed to read from the fd yourself, just check for - * readable status. Reading to unset the readable status is done - * with g_cancellable_reset(). + * In order to get the correct byte order for this read operation, + * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order(). * - * Returns: %TRUE if @pollfd was successfully initialized, %FALSE on - * failure to prepare the cancellable. - * Since: 2.22 + * Returns: an unsigned 16-bit/2-byte value read from the @stream or `0` if + * an error occurred. */ /** - * g_cancellable_new: + * g_data_input_stream_read_uint32: + * @stream: a given #GDataInputStream. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: #GError for error reporting. * - * Creates a new #GCancellable object. + * Reads an unsigned 32-bit/4-byte value from @stream. * - * Applications that want to start one or more operations - * that should be cancellable should create a #GCancellable - * and pass it to the operations. + * In order to get the correct byte order for this read operation, + * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order(). * - * One #GCancellable can be used in multiple consecutive - * operations or in multiple concurrent operations. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * Returns: a #GCancellable. + * Returns: an unsigned 32-bit/4-byte value read from the @stream or `0` if + * an error occurred. */ /** - * g_cancellable_pop_current: - * @cancellable: a #GCancellable object + * g_data_input_stream_read_uint64: + * @stream: a given #GDataInputStream. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: #GError for error reporting. * - * Pops @cancellable off the cancellable stack (verifying that @cancellable - * is on the top of the stack). - */ - - -/** - * g_cancellable_push_current: - * @cancellable: a #GCancellable object + * Reads an unsigned 64-bit/8-byte value from @stream. * - * Pushes @cancellable onto the cancellable stack. The current - * cancellable can then be received using g_cancellable_get_current(). + * In order to get the correct byte order for this read operation, + * see g_data_input_stream_get_byte_order(). * - * This is useful when implementing cancellable operations in - * code that does not allow you to pass down the cancellable object. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * This is typically called automatically by e.g. #GFile operations, - * so you rarely have to call this yourself. + * Returns: an unsigned 64-bit/8-byte read from @stream or `0` if + * an error occurred. */ /** - * g_cancellable_release_fd: - * @cancellable: a #GCancellable + * g_data_input_stream_read_until: + * @stream: a given #GDataInputStream. + * @stop_chars: characters to terminate the read. + * @length: (out) (optional): a #gsize to get the length of the data read in. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: #GError for error reporting. * - * Releases a resources previously allocated by g_cancellable_get_fd() - * or g_cancellable_make_pollfd(). + * Reads a string from the data input stream, up to the first + * occurrence of any of the stop characters. * - * For compatibility reasons with older releases, calling this function - * is not strictly required, the resources will be automatically freed - * when the @cancellable is finalized. However, the @cancellable will - * block scarce file descriptors until it is finalized if this function - * is not called. This can cause the application to run out of file - * descriptors when many #GCancellables are used at the same time. + * Note that, in contrast to g_data_input_stream_read_until_async(), + * this function consumes the stop character that it finds. * - * Since: 2.22 + * Don't use this function in new code. Its functionality is + * inconsistent with g_data_input_stream_read_until_async(). Both + * functions will be marked as deprecated in a future release. Use + * g_data_input_stream_read_upto() instead, but note that that function + * does not consume the stop character. + * + * Returns: (transfer full): a string with the data that was read + * before encountering any of the stop characters. Set @length to + * a #gsize to get the length of the string. This function will + * return %NULL on an error. + * Deprecated: 2.56: Use g_data_input_stream_read_upto() instead, which has more + * consistent behaviour regarding the stop character. */ /** - * g_cancellable_reset: - * @cancellable: a #GCancellable object. + * g_data_input_stream_read_until_async: + * @stream: a given #GDataInputStream. + * @stop_chars: characters to terminate the read. + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (scope async): callback to call when the request is satisfied. + * @user_data: (closure): the data to pass to callback function. * - * Resets @cancellable to its uncancelled state. + * The asynchronous version of g_data_input_stream_read_until(). + * It is an error to have two outstanding calls to this function. * - * If cancellable is currently in use by any cancellable operation - * then the behavior of this function is undefined. + * Note that, in contrast to g_data_input_stream_read_until(), + * this function does not consume the stop character that it finds. You + * must read it for yourself. * - * Note that it is generally not a good idea to reuse an existing - * cancellable for more operations after it has been cancelled once, - * as this function might tempt you to do. The recommended practice - * is to drop the reference to a cancellable after cancelling it, - * and let it die with the outstanding async operations. You should - * create a fresh cancellable for further async operations. + * When the operation is finished, @callback will be called. You + * can then call g_data_input_stream_read_until_finish() to get + * the result of the operation. + * + * Don't use this function in new code. Its functionality is + * inconsistent with g_data_input_stream_read_until(). Both functions + * will be marked as deprecated in a future release. Use + * g_data_input_stream_read_upto_async() instead. + * + * Since: 2.20 + * Deprecated: 2.56: Use g_data_input_stream_read_upto_async() instead, which + * has more consistent behaviour regarding the stop character. */ /** - * g_cancellable_set_error_if_cancelled: - * @cancellable: (nullable): a #GCancellable or %NULL - * @error: #GError to append error state to + * g_data_input_stream_read_until_finish: + * @stream: a given #GDataInputStream. + * @result: the #GAsyncResult that was provided to the callback. + * @length: (out) (optional): a #gsize to get the length of the data read in. + * @error: #GError for error reporting. * - * If the @cancellable is cancelled, sets the error to notify - * that the operation was cancelled. + * Finish an asynchronous call started by + * g_data_input_stream_read_until_async(). * - * Returns: %TRUE if @cancellable was cancelled, %FALSE if it was not + * Since: 2.20 + * Returns: (transfer full): a string with the data that was read + * before encountering any of the stop characters. Set @length to + * a #gsize to get the length of the string. This function will + * return %NULL on an error. + * Deprecated: 2.56: Use g_data_input_stream_read_upto_finish() instead, which + * has more consistent behaviour regarding the stop character. */ /** - * g_cancellable_source_new: (skip) - * @cancellable: (nullable): a #GCancellable, or %NULL + * g_data_input_stream_read_upto: + * @stream: a #GDataInputStream + * @stop_chars: characters to terminate the read + * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is + * nul-terminated + * @length: (out) (optional): a #gsize to get the length of the data read in + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore + * @error: #GError for error reporting * - * Creates a source that triggers if @cancellable is cancelled and - * calls its callback of type #GCancellableSourceFunc. This is - * primarily useful for attaching to another (non-cancellable) source - * with g_source_add_child_source() to add cancellability to it. + * Reads a string from the data input stream, up to the first + * occurrence of any of the stop characters. * - * For convenience, you can call this with a %NULL #GCancellable, - * in which case the source will never trigger. + * In contrast to g_data_input_stream_read_until(), this function + * does not consume the stop character. You have to use + * g_data_input_stream_read_byte() to get it before calling + * g_data_input_stream_read_upto() again. * - * The new #GSource will hold a reference to the #GCancellable. + * Note that @stop_chars may contain '\0' if @stop_chars_len is + * specified. * - * Returns: (transfer full): the new #GSource. - * Since: 2.28 + * The returned string will always be nul-terminated on success. + * + * Returns: (transfer full): a string with the data that was read + * before encountering any of the stop characters. Set @length to + * a #gsize to get the length of the string. This function will + * return %NULL on an error + * Since: 2.26 */ /** - * g_charset_converter_get_num_fallbacks: - * @converter: a #GCharsetConverter + * g_data_input_stream_read_upto_async: + * @stream: a #GDataInputStream + * @stop_chars: characters to terminate the read + * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is + * nul-terminated + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore + * @callback: (scope async): callback to call when the request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Gets the number of fallbacks that @converter has applied so far. + * The asynchronous version of g_data_input_stream_read_upto(). + * It is an error to have two outstanding calls to this function. * - * Returns: the number of fallbacks that @converter has applied - * Since: 2.24 + * In contrast to g_data_input_stream_read_until(), this function + * does not consume the stop character. You have to use + * g_data_input_stream_read_byte() to get it before calling + * g_data_input_stream_read_upto() again. + * + * Note that @stop_chars may contain '\0' if @stop_chars_len is + * specified. + * + * When the operation is finished, @callback will be called. You + * can then call g_data_input_stream_read_upto_finish() to get + * the result of the operation. + * + * Since: 2.26 */ /** - * g_charset_converter_get_use_fallback: - * @converter: a #GCharsetConverter + * g_data_input_stream_read_upto_finish: + * @stream: a #GDataInputStream + * @result: the #GAsyncResult that was provided to the callback + * @length: (out) (optional): a #gsize to get the length of the data read in + * @error: #GError for error reporting * - * Gets the #GCharsetConverter:use-fallback property. + * Finish an asynchronous call started by + * g_data_input_stream_read_upto_async(). * - * Returns: %TRUE if fallbacks are used by @converter + * Note that this function does not consume the stop character. You + * have to use g_data_input_stream_read_byte() to get it before calling + * g_data_input_stream_read_upto_async() again. + * + * The returned string will always be nul-terminated on success. + * + * Returns: (transfer full): a string with the data that was read + * before encountering any of the stop characters. Set @length to + * a #gsize to get the length of the string. This function will + * return %NULL on an error. * Since: 2.24 */ /** - * g_charset_converter_new: - * @to_charset: destination charset - * @from_charset: source charset - * @error: #GError for error reporting, or %NULL to ignore. - * - * Creates a new #GCharsetConverter. + * g_data_input_stream_set_byte_order: + * @stream: a given #GDataInputStream. + * @order: a #GDataStreamByteOrder to set. * - * Returns: a new #GCharsetConverter or %NULL on error. - * Since: 2.24 + * This function sets the byte order for the given @stream. All subsequent + * reads from the @stream will be read in the given @order. */ /** - * g_charset_converter_set_use_fallback: - * @converter: a #GCharsetConverter - * @use_fallback: %TRUE to use fallbacks + * g_data_input_stream_set_newline_type: + * @stream: a #GDataInputStream. + * @type: the type of new line return as #GDataStreamNewlineType. * - * Sets the #GCharsetConverter:use-fallback property. + * Sets the newline type for the @stream. * - * Since: 2.24 + * Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a read + * chunk ends in "CR" we must read an additional byte to know if this is "CR" or + * "CR LF", and this might block if there is no more data available. */ /** - * g_content_type_can_be_executable: - * @type: a content type string + * g_data_output_stream_get_byte_order: + * @stream: a #GDataOutputStream. * - * Checks if a content type can be executable. Note that for instance - * things like text files can be executables (i.e. scripts and batch files). + * Gets the byte order for the stream. * - * Returns: %TRUE if the file type corresponds to a type that - * can be executable, %FALSE otherwise. + * Returns: the #GDataStreamByteOrder for the @stream. */ /** - * g_content_type_equals: - * @type1: a content type string - * @type2: a content type string + * g_data_output_stream_new: + * @base_stream: a #GOutputStream. * - * Compares two content types for equality. + * Creates a new data output stream for @base_stream. * - * Returns: %TRUE if the two strings are identical or equivalent, - * %FALSE otherwise. + * Returns: #GDataOutputStream. */ /** - * g_content_type_from_mime_type: - * @mime_type: a mime type string + * g_data_output_stream_put_byte: + * @stream: a #GDataOutputStream. + * @data: a #guchar. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: a #GError, %NULL to ignore. * - * Tries to find a content type based on the mime type name. + * Puts a byte into the output stream. * - * Returns: (nullable): Newly allocated string with content type or - * %NULL. Free with g_free() - * Since: 2.18 + * Returns: %TRUE if @data was successfully added to the @stream. */ /** - * g_content_type_get_description: - * @type: a content type string + * g_data_output_stream_put_int16: + * @stream: a #GDataOutputStream. + * @data: a #gint16. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: a #GError, %NULL to ignore. * - * Gets the human readable description of the content type. + * Puts a signed 16-bit integer into the output stream. * - * Returns: a short description of the content type @type. Free the - * returned string with g_free() + * Returns: %TRUE if @data was successfully added to the @stream. */ /** - * g_content_type_get_generic_icon_name: - * @type: a content type string - * - * Gets the generic icon name for a content type. + * g_data_output_stream_put_int32: + * @stream: a #GDataOutputStream. + * @data: a #gint32. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: a #GError, %NULL to ignore. * - * See the - * [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) - * specification for more on the generic icon name. + * Puts a signed 32-bit integer into the output stream. * - * Returns: (nullable): the registered generic icon name for the given @type, - * or %NULL if unknown. Free with g_free() - * Since: 2.34 + * Returns: %TRUE if @data was successfully added to the @stream. */ /** - * g_content_type_get_icon: - * @type: a content type string + * g_data_output_stream_put_int64: + * @stream: a #GDataOutputStream. + * @data: a #gint64. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: a #GError, %NULL to ignore. * - * Gets the icon for a content type. + * Puts a signed 64-bit integer into the stream. * - * Returns: (transfer full): #GIcon corresponding to the content type. Free the returned - * object with g_object_unref() + * Returns: %TRUE if @data was successfully added to the @stream. */ /** - * g_content_type_get_mime_type: - * @type: a content type string + * g_data_output_stream_put_string: + * @stream: a #GDataOutputStream. + * @str: a string. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: a #GError, %NULL to ignore. * - * Gets the mime type for the content type, if one is registered. + * Puts a string into the output stream. * - * Returns: (nullable): the registered mime type for the given @type, - * or %NULL if unknown. + * Returns: %TRUE if @string was successfully added to the @stream. */ /** - * g_content_type_get_symbolic_icon: - * @type: a content type string + * g_data_output_stream_put_uint16: + * @stream: a #GDataOutputStream. + * @data: a #guint16. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: a #GError, %NULL to ignore. * - * Gets the symbolic icon for a content type. + * Puts an unsigned 16-bit integer into the output stream. * - * Returns: (transfer full): symbolic #GIcon corresponding to the content type. - * Free the returned object with g_object_unref() - * Since: 2.34 + * Returns: %TRUE if @data was successfully added to the @stream. */ /** - * g_content_type_guess: - * @filename: (nullable): a string, or %NULL - * @data: (nullable) (array length=data_size): a stream of data, or %NULL - * @data_size: the size of @data - * @result_uncertain: (out) (optional): return location for the certainty - * of the result, or %NULL + * g_data_output_stream_put_uint32: + * @stream: a #GDataOutputStream. + * @data: a #guint32. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: a #GError, %NULL to ignore. * - * Guesses the content type based on example data. If the function is - * uncertain, @result_uncertain will be set to %TRUE. Either @filename - * or @data may be %NULL, in which case the guess will be based solely - * on the other argument. + * Puts an unsigned 32-bit integer into the stream. * - * Returns: a string indicating a guessed content type for the - * given data. Free with g_free() + * Returns: %TRUE if @data was successfully added to the @stream. */ /** - * g_content_type_guess_for_tree: - * @root: the root of the tree to guess a type for - * - * Tries to guess the type of the tree with root @root, by - * looking at the files it contains. The result is an array - * of content types, with the best guess coming first. - * - * The types returned all have the form x-content/foo, e.g. - * x-content/audio-cdda (for audio CDs) or x-content/image-dcf - * (for a camera memory card). See the - * [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) - * specification for more on x-content types. + * g_data_output_stream_put_uint64: + * @stream: a #GDataOutputStream. + * @data: a #guint64. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: a #GError, %NULL to ignore. * - * This function is useful in the implementation of - * g_mount_guess_content_type(). + * Puts an unsigned 64-bit integer into the stream. * - * Returns: (transfer full) (array zero-terminated=1): an %NULL-terminated - * array of zero or more content types. Free with g_strfreev() - * Since: 2.18 + * Returns: %TRUE if @data was successfully added to the @stream. */ /** - * g_content_type_is_a: - * @type: a content type string - * @supertype: a content type string - * - * Determines if @type is a subset of @supertype. + * g_data_output_stream_set_byte_order: + * @stream: a #GDataOutputStream. + * @order: a %GDataStreamByteOrder. * - * Returns: %TRUE if @type is a kind of @supertype, - * %FALSE otherwise. + * Sets the byte order of the data output stream to @order. */ /** - * g_content_type_is_mime_type: - * @type: a content type string - * @mime_type: a mime type string + * g_datagram_based_condition_check: + * @datagram_based: a #GDatagramBased + * @condition: a #GIOCondition mask to check * - * Determines if @type is a subset of @mime_type. - * Convenience wrapper around g_content_type_is_a(). + * Checks on the readiness of @datagram_based to perform operations. The + * operations specified in @condition are checked for and masked against the + * currently-satisfied conditions on @datagram_based. The result is returned. * - * Returns: %TRUE if @type is a kind of @mime_type, - * %FALSE otherwise. - * Since: 2.52 + * %G_IO_IN will be set in the return value if data is available to read with + * g_datagram_based_receive_messages(), or if the connection is closed remotely + * (EOS); and if the datagram_based has not been closed locally using some + * implementation-specific method (such as g_socket_close() or + * g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket). + * + * If the connection is shut down or closed (by calling g_socket_close() or + * g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket, for + * example), all calls to this function will return %G_IO_ERROR_CLOSED. + * + * %G_IO_OUT will be set if it is expected that at least one byte can be sent + * using g_datagram_based_send_messages() without blocking. It will not be set + * if the datagram_based has been closed locally. + * + * %G_IO_HUP will be set if the connection has been closed locally. + * + * %G_IO_ERR will be set if there was an asynchronous error in transmitting data + * previously enqueued using g_datagram_based_send_messages(). + * + * Note that on Windows, it is possible for an operation to return + * %G_IO_ERROR_WOULD_BLOCK even immediately after + * g_datagram_based_condition_check() has claimed that the #GDatagramBased is + * ready for writing. Rather than calling g_datagram_based_condition_check() and + * then writing to the #GDatagramBased if it succeeds, it is generally better to + * simply try writing right away, and try again later if the initial attempt + * returns %G_IO_ERROR_WOULD_BLOCK. + * + * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition; these + * conditions will always be set in the output if they are true. Apart from + * these flags, the output is guaranteed to be masked by @condition. + * + * This call never blocks. + * + * Returns: the #GIOCondition mask of the current state + * Since: 2.48 */ /** - * g_content_type_is_unknown: - * @type: a content type string + * g_datagram_based_condition_wait: + * @datagram_based: a #GDatagramBased + * @condition: a #GIOCondition mask to wait for + * @timeout: the maximum time (in microseconds) to wait, 0 to not block, or -1 + * to block indefinitely + * @cancellable: (nullable): a #GCancellable + * @error: return location for a #GError * - * Checks if the content type is the generic "unknown" type. - * On UNIX this is the "application/octet-stream" mimetype, - * while on win32 it is "*" and on OSX it is a dynamic type - * or octet-stream. + * Waits for up to @timeout microseconds for condition to become true on + * @datagram_based. If the condition is met, %TRUE is returned. * - * Returns: %TRUE if the type is the unknown type. + * If @cancellable is cancelled before the condition is met, or if @timeout is + * reached before the condition is met, then %FALSE is returned and @error is + * set appropriately (%G_IO_ERROR_CANCELLED or %G_IO_ERROR_TIMED_OUT). + * + * Returns: %TRUE if the condition was met, %FALSE otherwise + * Since: 2.48 */ /** - * g_content_types_get_registered: + * g_datagram_based_create_source: + * @datagram_based: a #GDatagramBased + * @condition: a #GIOCondition mask to monitor + * @cancellable: (nullable): a #GCancellable * - * Gets a list of strings containing all the registered content types - * known to the system. The list and its data should be freed using - * g_list_free_full (list, g_free). + * Creates a #GSource that can be attached to a #GMainContext to monitor for + * the availability of the specified @condition on the #GDatagramBased. The + * #GSource keeps a reference to the @datagram_based. * - * Returns: (element-type utf8) (transfer full): list of the registered - * content types + * The callback on the source is of the #GDatagramBasedSourceFunc type. + * + * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition; these + * conditions will always be reported in the callback if they are true. + * + * If non-%NULL, @cancellable can be used to cancel the source, which will + * cause the source to trigger, reporting the current condition (which is + * likely 0 unless cancellation happened at the same time as a condition + * change). You can check for this in the callback using + * g_cancellable_is_cancelled(). + * + * Returns: (transfer full): a newly allocated #GSource + * Since: 2.48 */ /** - * g_converter_convert: - * @converter: a #GConverter. - * @inbuf: (array length=inbuf_size) (element-type guint8): the buffer - * containing the data to convert. - * @inbuf_size: the number of bytes in @inbuf - * @outbuf: (element-type guint8) (array length=outbuf_size): a buffer to write - * converted data in. - * @outbuf_size: the number of bytes in @outbuf, must be at least one - * @flags: a #GConverterFlags controlling the conversion details - * @bytes_read: (out): will be set to the number of bytes read from @inbuf on success - * @bytes_written: (out): will be set to the number of bytes written to @outbuf on success - * @error: location to store the error occurring, or %NULL to ignore - * - * This is the main operation used when converting data. It is to be called - * multiple times in a loop, and each time it will do some work, i.e. - * producing some output (in @outbuf) or consuming some input (from @inbuf) or - * both. If its not possible to do any work an error is returned. - * - * Note that a single call may not consume all input (or any input at all). - * Also a call may produce output even if given no input, due to state stored - * in the converter producing output. + * g_datagram_based_receive_messages: + * @datagram_based: a #GDatagramBased + * @messages: (array length=num_messages): an array of #GInputMessage structs + * @num_messages: the number of elements in @messages + * @flags: an int containing #GSocketMsgFlags flags for the overall operation + * @timeout: the maximum time (in microseconds) to wait, 0 to not block, or -1 + * to block indefinitely + * @cancellable: (nullable): a %GCancellable + * @error: return location for a #GError * - * If any data was either produced or consumed, and then an error happens, then - * only the successful conversion is reported and the error is returned on the - * next call. + * Receive one or more data messages from @datagram_based in one go. * - * A full conversion loop involves calling this method repeatedly, each time - * giving it new input and space output space. When there is no more input - * data after the data in @inbuf, the flag %G_CONVERTER_INPUT_AT_END must be set. - * The loop will be (unless some error happens) returning %G_CONVERTER_CONVERTED - * each time until all data is consumed and all output is produced, then - * %G_CONVERTER_FINISHED is returned instead. Note, that %G_CONVERTER_FINISHED - * may be returned even if %G_CONVERTER_INPUT_AT_END is not set, for instance - * in a decompression converter where the end of data is detectable from the - * data (and there might even be other data after the end of the compressed data). + * @messages must point to an array of #GInputMessage structs and + * @num_messages must be the length of this array. Each #GInputMessage + * contains a pointer to an array of #GInputVector structs describing the + * buffers that the data received in each message will be written to. * - * When some data has successfully been converted @bytes_read and is set to - * the number of bytes read from @inbuf, and @bytes_written is set to indicate - * how many bytes was written to @outbuf. If there are more data to output - * or consume (i.e. unless the %G_CONVERTER_INPUT_AT_END is specified) then - * %G_CONVERTER_CONVERTED is returned, and if no more data is to be output - * then %G_CONVERTER_FINISHED is returned. + * @flags modify how all messages are received. The commonly available + * arguments for this are available in the #GSocketMsgFlags enum, but the + * values there are the same as the system values, and the flags + * are passed in as-is, so you can pass in system-specific flags too. These + * flags affect the overall receive operation. Flags affecting individual + * messages are returned in #GInputMessage.flags. * - * On error %G_CONVERTER_ERROR is returned and @error is set accordingly. - * Some errors need special handling: + * The other members of #GInputMessage are treated as described in its + * documentation. * - * %G_IO_ERROR_NO_SPACE is returned if there is not enough space - * to write the resulting converted data, the application should - * call the function again with a larger @outbuf to continue. + * If @timeout is negative the call will block until @num_messages have been + * received, the connection is closed remotely (EOS), @cancellable is cancelled, + * or an error occurs. * - * %G_IO_ERROR_PARTIAL_INPUT is returned if there is not enough - * input to fully determine what the conversion should produce, - * and the %G_CONVERTER_INPUT_AT_END flag is not set. This happens for - * example with an incomplete multibyte sequence when converting text, - * or when a regexp matches up to the end of the input (and may match - * further input). It may also happen when @inbuf_size is zero and - * there is no more data to produce. + * If @timeout is 0 the call will return up to @num_messages without blocking, + * or %G_IO_ERROR_WOULD_BLOCK if no messages are queued in the operating system + * to be received. * - * When this happens the application should read more input and then - * call the function again. If further input shows that there is no - * more data call the function again with the same data but with - * the %G_CONVERTER_INPUT_AT_END flag set. This may cause the conversion - * to finish as e.g. in the regexp match case (or, to fail again with - * %G_IO_ERROR_PARTIAL_INPUT in e.g. a charset conversion where the - * input is actually partial). + * If @timeout is positive the call will block on the same conditions as if + * @timeout were negative. If the timeout is reached + * before any messages are received, %G_IO_ERROR_TIMED_OUT is returned, + * otherwise it will return the number of messages received before timing out. + * (Note: This is effectively the behaviour of `MSG_WAITFORONE` with + * recvmmsg().) * - * After g_converter_convert() has returned %G_CONVERTER_FINISHED the - * converter object is in an invalid state where its not allowed - * to call g_converter_convert() anymore. At this time you can only - * free the object or call g_converter_reset() to reset it to the - * initial state. + * To be notified when messages are available, wait for the %G_IO_IN condition. + * Note though that you may still receive %G_IO_ERROR_WOULD_BLOCK from + * g_datagram_based_receive_messages() even if you were previously notified of a + * %G_IO_IN condition. * - * If the flag %G_CONVERTER_FLUSH is set then conversion is modified - * to try to write out all internal state to the output. The application - * has to call the function multiple times with the flag set, and when - * the available input has been consumed and all internal state has - * been produced then %G_CONVERTER_FLUSHED (or %G_CONVERTER_FINISHED if - * really at the end) is returned instead of %G_CONVERTER_CONVERTED. - * This is somewhat similar to what happens at the end of the input stream, - * but done in the middle of the data. + * If the remote peer closes the connection, any messages queued in the + * underlying receive buffer will be returned, and subsequent calls to + * g_datagram_based_receive_messages() will return 0 (with no error set). * - * This has different meanings for different conversions. For instance - * in a compression converter it would mean that we flush all the - * compression state into output such that if you uncompress the - * compressed data you get back all the input data. Doing this may - * make the final file larger due to padding though. Another example - * is a regexp conversion, where if you at the end of the flushed data - * have a match, but there is also a potential longer match. In the - * non-flushed case we would ask for more input, but when flushing we - * treat this as the end of input and do the match. + * If the connection is shut down or closed (by calling g_socket_close() or + * g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket, for + * example), all calls to this function will return %G_IO_ERROR_CLOSED. * - * Flushing is not always possible (like if a charset converter flushes - * at a partial multibyte sequence). Converters are supposed to try - * to produce as much output as possible and then return an error - * (typically %G_IO_ERROR_PARTIAL_INPUT). + * On error -1 is returned and @error is set accordingly. An error will only + * be returned if zero messages could be received; otherwise the number of + * messages successfully received before the error will be returned. If + * @cancellable is cancelled, %G_IO_ERROR_CANCELLED is returned as with any + * other error. * - * Returns: a #GConverterResult, %G_CONVERTER_ERROR on error. - * Since: 2.24 + * Returns: number of messages received, or -1 on error. Note that the number + * of messages received may be smaller than @num_messages if @timeout is + * zero or positive, if the peer closed the connection, or if @num_messages + * was larger than `UIO_MAXIOV` (1024), in which case the caller may re-try + * to receive the remaining messages. + * Since: 2.48 */ /** - * g_converter_input_stream_get_converter: - * @converter_stream: a #GConverterInputStream + * g_datagram_based_send_messages: + * @datagram_based: a #GDatagramBased + * @messages: (array length=num_messages): an array of #GOutputMessage structs + * @num_messages: the number of elements in @messages + * @flags: an int containing #GSocketMsgFlags flags + * @timeout: the maximum time (in microseconds) to wait, 0 to not block, or -1 + * to block indefinitely + * @cancellable: (nullable): a %GCancellable + * @error: return location for a #GError * - * Gets the #GConverter that is used by @converter_stream. + * Send one or more data messages from @datagram_based in one go. * - * Returns: (transfer none): the converter of the converter input stream - * Since: 2.24 - */ - - -/** - * g_converter_input_stream_new: - * @base_stream: a #GInputStream - * @converter: a #GConverter + * @messages must point to an array of #GOutputMessage structs and + * @num_messages must be the length of this array. Each #GOutputMessage + * contains an address to send the data to, and a pointer to an array of + * #GOutputVector structs to describe the buffers that the data to be sent + * for each message will be gathered from. * - * Creates a new converter input stream for the @base_stream. + * @flags modify how the message is sent. The commonly available arguments + * for this are available in the #GSocketMsgFlags enum, but the + * values there are the same as the system values, and the flags + * are passed in as-is, so you can pass in system-specific flags too. * - * Returns: a new #GInputStream. - */ - - -/** - * g_converter_output_stream_get_converter: - * @converter_stream: a #GConverterOutputStream + * The other members of #GOutputMessage are treated as described in its + * documentation. * - * Gets the #GConverter that is used by @converter_stream. + * If @timeout is negative the call will block until @num_messages have been + * sent, @cancellable is cancelled, or an error occurs. * - * Returns: (transfer none): the converter of the converter output stream - * Since: 2.24 + * If @timeout is 0 the call will send up to @num_messages without blocking, + * or will return %G_IO_ERROR_WOULD_BLOCK if there is no space to send messages. + * + * If @timeout is positive the call will block on the same conditions as if + * @timeout were negative. If the timeout is reached before any messages are + * sent, %G_IO_ERROR_TIMED_OUT is returned, otherwise it will return the number + * of messages sent before timing out. + * + * To be notified when messages can be sent, wait for the %G_IO_OUT condition. + * Note though that you may still receive %G_IO_ERROR_WOULD_BLOCK from + * g_datagram_based_send_messages() even if you were previously notified of a + * %G_IO_OUT condition. (On Windows in particular, this is very common due to + * the way the underlying APIs work.) + * + * If the connection is shut down or closed (by calling g_socket_close() or + * g_socket_shutdown() with @shutdown_write set, if it’s a #GSocket, for + * example), all calls to this function will return %G_IO_ERROR_CLOSED. + * + * On error -1 is returned and @error is set accordingly. An error will only + * be returned if zero messages could be sent; otherwise the number of messages + * successfully sent before the error will be returned. If @cancellable is + * cancelled, %G_IO_ERROR_CANCELLED is returned as with any other error. + * + * Returns: number of messages sent, or -1 on error. Note that the number of + * messages sent may be smaller than @num_messages if @timeout is zero + * or positive, or if @num_messages was larger than `UIO_MAXIOV` (1024), in + * which case the caller may re-try to send the remaining messages. + * Since: 2.48 */ /** - * g_converter_output_stream_new: - * @base_stream: a #GOutputStream - * @converter: a #GConverter + * g_dbus_action_group_get: + * @connection: A #GDBusConnection + * @bus_name: (nullable): the bus name which exports the action + * group or %NULL if @connection is not a message bus connection + * @object_path: the object path at which the action group is exported * - * Creates a new converter output stream for the @base_stream. + * Obtains a #GDBusActionGroup for the action group which is exported at + * the given @bus_name and @object_path. * - * Returns: a new #GOutputStream. + * The thread default main context is taken at the time of this call. + * All signals on the menu model (and any linked models) are reported + * with respect to this context. All calls on the returned menu model + * (and linked models) must also originate from this same context, with + * the thread default main context unchanged. + * + * This call is non-blocking. The returned action group may or may not + * already be filled in. The correct thing to do is connect the signals + * for the action group to monitor for changes and then to call + * g_action_group_list_actions() to get the initial list. + * + * Returns: (transfer full): a #GDBusActionGroup + * Since: 2.32 */ /** - * g_converter_reset: - * @converter: a #GConverter. + * g_dbus_address_escape_value: + * @string: an unescaped string to be included in a D-Bus address + * as the value in a key-value pair * - * Resets all internal state in the converter, making it behave - * as if it was just created. If the converter has any internal - * state that would produce output then that output is lost. + * Escape @string so it can appear in a D-Bus address as the value + * part of a key-value pair. * - * Since: 2.24 + * For instance, if @string is `/run/bus-for-:0`, + * this function would return `/run/bus-for-%3A0`, + * which could be used in a D-Bus address like + * `unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0`. + * + * Returns: (transfer full): a copy of @string with all + * non-optionally-escaped bytes escaped + * Since: 2.36 */ /** - * g_credentials_get_native: (skip) - * @credentials: A #GCredentials. - * @native_type: The type of native credentials to get. + * g_dbus_address_get_for_bus_sync: + * @bus_type: a #GBusType + * @cancellable: (nullable): a #GCancellable or %NULL + * @error: return location for error or %NULL * - * Gets a pointer to native credentials of type @native_type from - * @credentials. + * Synchronously looks up the D-Bus address for the well-known message + * bus instance specified by @bus_type. This may involve using various + * platform specific mechanisms. * - * It is a programming error (which will cause an warning to be - * logged) to use this method if there is no #GCredentials support for - * the OS or if @native_type isn't supported by the OS. + * The returned address will be in the + * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). * - * Returns: The pointer to native credentials or %NULL if the - * operation there is no #GCredentials support for the OS or if - * @native_type isn't supported by the OS. Do not free the returned - * data, it is owned by @credentials. + * Returns: (transfer full): a valid D-Bus address string for @bus_type or + * %NULL if @error is set * Since: 2.26 */ /** - * g_credentials_get_unix_pid: - * @credentials: A #GCredentials - * @error: Return location for error or %NULL. + * g_dbus_address_get_stream: + * @address: A valid D-Bus address. + * @cancellable: (nullable): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: Data to pass to @callback. * - * Tries to get the UNIX process identifier from @credentials. This - * method is only available on UNIX platforms. + * Asynchronously connects to an endpoint specified by @address and + * sets up the connection so it is in a state to run the client-side + * of the D-Bus authentication conversation. @address must be in the + * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). * - * This operation can fail if #GCredentials is not supported on the - * OS or if the native credentials type does not contain information - * about the UNIX process ID. + * When the operation is finished, @callback will be invoked. You can + * then call g_dbus_address_get_stream_finish() to get the result of + * the operation. * - * Returns: The UNIX process ID, or -1 if @error is set. - * Since: 2.36 + * This is an asynchronous failable function. See + * g_dbus_address_get_stream_sync() for the synchronous version. + * + * Since: 2.26 */ /** - * g_credentials_get_unix_user: - * @credentials: A #GCredentials + * g_dbus_address_get_stream_finish: + * @res: A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream(). + * @out_guid: (optional) (out): %NULL or return location to store the GUID extracted from @address, if any. * @error: Return location for error or %NULL. * - * Tries to get the UNIX user identifier from @credentials. This - * method is only available on UNIX platforms. - * - * This operation can fail if #GCredentials is not supported on the - * OS or if the native credentials type does not contain information - * about the UNIX user. + * Finishes an operation started with g_dbus_address_get_stream(). * - * Returns: The UNIX user identifier or -1 if @error is set. + * Returns: (transfer full): A #GIOStream or %NULL if @error is set. * Since: 2.26 */ /** - * g_credentials_is_same_user: - * @credentials: A #GCredentials. - * @other_credentials: A #GCredentials. + * g_dbus_address_get_stream_sync: + * @address: A valid D-Bus address. + * @out_guid: (optional) (out): %NULL or return location to store the GUID extracted from @address, if any. + * @cancellable: (nullable): A #GCancellable or %NULL. * @error: Return location for error or %NULL. * - * Checks if @credentials and @other_credentials is the same user. + * Synchronously connects to an endpoint specified by @address and + * sets up the connection so it is in a state to run the client-side + * of the D-Bus authentication conversation. @address must be in the + * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). * - * This operation can fail if #GCredentials is not supported on the - * the OS. + * This is a synchronous failable function. See + * g_dbus_address_get_stream() for the asynchronous version. * - * Returns: %TRUE if @credentials and @other_credentials has the same - * user, %FALSE otherwise or if @error is set. + * Returns: (transfer full): A #GIOStream or %NULL if @error is set. * Since: 2.26 */ /** - * g_credentials_new: + * g_dbus_annotation_info_lookup: + * @annotations: (array zero-terminated=1) (nullable): A %NULL-terminated array of annotations or %NULL. + * @name: The name of the annotation to look up. * - * Creates a new #GCredentials object with credentials matching the - * the current process. + * Looks up the value of an annotation. * - * Returns: A #GCredentials. Free with g_object_unref(). + * The cost of this function is O(n) in number of annotations. + * + * Returns: The value or %NULL if not found. Do not free, it is owned by @annotations. * Since: 2.26 */ /** - * g_credentials_set_native: - * @credentials: A #GCredentials. - * @native_type: The type of native credentials to set. - * @native: (not nullable): A pointer to native credentials. - * - * Copies the native credentials of type @native_type from @native - * into @credentials. + * g_dbus_annotation_info_ref: + * @info: A #GDBusNodeInfo * - * It is a programming error (which will cause an warning to be - * logged) to use this method if there is no #GCredentials support for - * the OS or if @native_type isn't supported by the OS. + * If @info is statically allocated does nothing. Otherwise increases + * the reference count. * + * Returns: The same @info. * Since: 2.26 */ /** - * g_credentials_set_unix_user: - * @credentials: A #GCredentials. - * @uid: The UNIX user identifier to set. - * @error: Return location for error or %NULL. - * - * Tries to set the UNIX user identifier on @credentials. This method - * is only available on UNIX platforms. + * g_dbus_annotation_info_unref: + * @info: A #GDBusAnnotationInfo. * - * This operation can fail if #GCredentials is not supported on the - * OS or if the native credentials type does not contain information - * about the UNIX user. It can also fail if the OS does not allow the - * use of "spoofed" credentials. + * If @info is statically allocated, does nothing. Otherwise decreases + * the reference count of @info. When its reference count drops to 0, + * the memory used is freed. * - * Returns: %TRUE if @uid was set, %FALSE if error is set. * Since: 2.26 */ /** - * g_credentials_to_string: - * @credentials: A #GCredentials object. + * g_dbus_arg_info_ref: + * @info: A #GDBusArgInfo * - * Creates a human-readable textual representation of @credentials - * that can be used in logging and debug messages. The format of the - * returned string may change in future GLib release. + * If @info is statically allocated does nothing. Otherwise increases + * the reference count. * - * Returns: A string that should be freed with g_free(). + * Returns: The same @info. * Since: 2.26 */ /** - * g_data_input_stream_get_byte_order: - * @stream: a given #GDataInputStream. + * g_dbus_arg_info_unref: + * @info: A #GDBusArgInfo. * - * Gets the byte order for the data input stream. + * If @info is statically allocated, does nothing. Otherwise decreases + * the reference count of @info. When its reference count drops to 0, + * the memory used is freed. * - * Returns: the @stream's current #GDataStreamByteOrder. + * Since: 2.26 */ /** - * g_data_input_stream_get_newline_type: - * @stream: a given #GDataInputStream. + * g_dbus_auth_observer_allow_mechanism: + * @observer: A #GDBusAuthObserver. + * @mechanism: The name of the mechanism, e.g. `DBUS_COOKIE_SHA1`. * - * Gets the current newline type for the @stream. + * Emits the #GDBusAuthObserver::allow-mechanism signal on @observer. * - * Returns: #GDataStreamNewlineType for the given @stream. + * Returns: %TRUE if @mechanism can be used to authenticate the other peer, %FALSE if not. + * Since: 2.34 */ /** - * g_data_input_stream_new: - * @base_stream: a #GInputStream. + * g_dbus_auth_observer_authorize_authenticated_peer: + * @observer: A #GDBusAuthObserver. + * @stream: A #GIOStream for the #GDBusConnection. + * @credentials: (nullable): Credentials received from the peer or %NULL. * - * Creates a new data input stream for the @base_stream. + * Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer. * - * Returns: a new #GDataInputStream. + * Returns: %TRUE if the peer is authorized, %FALSE if not. + * Since: 2.26 */ /** - * g_data_input_stream_read_byte: - * @stream: a given #GDataInputStream. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: #GError for error reporting. + * g_dbus_auth_observer_new: * - * Reads an unsigned 8-bit/1-byte value from @stream. + * Creates a new #GDBusAuthObserver object. * - * Returns: an unsigned 8-bit/1-byte value read from the @stream or %0 - * if an error occurred. + * Returns: A #GDBusAuthObserver. Free with g_object_unref(). + * Since: 2.26 */ /** - * g_data_input_stream_read_int16: - * @stream: a given #GDataInputStream. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: #GError for error reporting. + * g_dbus_connection_add_filter: + * @connection: a #GDBusConnection + * @filter_function: a filter function + * @user_data: user data to pass to @filter_function + * @user_data_free_func: function to free @user_data with when filter + * is removed or %NULL * - * Reads a 16-bit/2-byte value from @stream. + * Adds a message filter. Filters are handlers that are run on all + * incoming and outgoing messages, prior to standard dispatch. Filters + * are run in the order that they were added. The same handler can be + * added as a filter more than once, in which case it will be run more + * than once. Filters added during a filter callback won't be run on + * the message being processed. Filter functions are allowed to modify + * and even drop messages. * - * In order to get the correct byte order for this read operation, - * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order(). + * Note that filters are run in a dedicated message handling thread so + * they can't block and, generally, can't do anything but signal a + * worker thread. Also note that filters are rarely needed - use API + * such as g_dbus_connection_send_message_with_reply(), + * g_dbus_connection_signal_subscribe() or g_dbus_connection_call() instead. * - * Returns: a signed 16-bit/2-byte value read from @stream or %0 if - * an error occurred. + * If a filter consumes an incoming message the message is not + * dispatched anywhere else - not even the standard dispatch machinery + * (that API such as g_dbus_connection_signal_subscribe() and + * g_dbus_connection_send_message_with_reply() relies on) will see the + * message. Similarly, if a filter consumes an outgoing message, the + * message will not be sent to the other peer. + * + * If @user_data_free_func is non-%NULL, it will be called (in the + * thread-default main context of the thread you are calling this + * method from) at some point after @user_data is no longer + * needed. (It is not guaranteed to be called synchronously when the + * filter is removed, and may be called after @connection has been + * destroyed.) + * + * Returns: a filter identifier that can be used with + * g_dbus_connection_remove_filter() + * Since: 2.26 */ /** - * g_data_input_stream_read_int32: - * @stream: a given #GDataInputStream. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: #GError for error reporting. - * - * Reads a signed 32-bit/4-byte value from @stream. + * g_dbus_connection_call: + * @connection: a #GDBusConnection + * @bus_name: (nullable): a unique or well-known bus name or %NULL if + * @connection is not a message bus connection + * @object_path: path of remote object + * @interface_name: D-Bus interface to invoke method on + * @method_name: the name of the method to invoke + * @parameters: (nullable): a #GVariant tuple with parameters for the method + * or %NULL if not passing parameters + * @reply_type: (nullable): the expected type of the reply (which will be a + * tuple), or %NULL + * @flags: flags from the #GDBusCallFlags enumeration + * @timeout_msec: the timeout in milliseconds, -1 to use the default + * timeout or %G_MAXINT for no timeout + * @cancellable: (nullable): a #GCancellable or %NULL + * @callback: (nullable): a #GAsyncReadyCallback to call when the request + * is satisfied or %NULL if you don't care about the result of the + * method invocation + * @user_data: the data to pass to @callback * - * In order to get the correct byte order for this read operation, - * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order(). + * Asynchronously invokes the @method_name method on the + * @interface_name D-Bus interface on the remote object at + * @object_path owned by @bus_name. * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * If @connection is closed then the operation will fail with + * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will + * fail with %G_IO_ERROR_CANCELLED. If @parameters contains a value + * not compatible with the D-Bus protocol, the operation fails with + * %G_IO_ERROR_INVALID_ARGUMENT. * - * Returns: a signed 32-bit/4-byte value read from the @stream or %0 if - * an error occurred. - */ - - -/** - * g_data_input_stream_read_int64: - * @stream: a given #GDataInputStream. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: #GError for error reporting. + * If @reply_type is non-%NULL then the reply will be checked for having this type and an + * error will be raised if it does not match. Said another way, if you give a @reply_type + * then any non-%NULL return value will be of this type. Unless it’s + * %G_VARIANT_TYPE_UNIT, the @reply_type will be a tuple containing one or more + * values. * - * Reads a 64-bit/8-byte value from @stream. + * If the @parameters #GVariant is floating, it is consumed. This allows + * convenient 'inline' use of g_variant_new(), e.g.: + * |[ + * g_dbus_connection_call (connection, + * "org.freedesktop.StringThings", + * "/org/freedesktop/StringThings", + * "org.freedesktop.StringThings", + * "TwoStrings", + * g_variant_new ("(ss)", + * "Thing One", + * "Thing Two"), + * NULL, + * G_DBUS_CALL_FLAGS_NONE, + * -1, + * NULL, + * (GAsyncReadyCallback) two_strings_done, + * NULL); + * ]| * - * In order to get the correct byte order for this read operation, - * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order(). + * This is an asynchronous method. When the operation is finished, + * @callback will be invoked in the + * [thread-default main context][g-main-context-push-thread-default] + * of the thread you are calling this method from. You can then call + * g_dbus_connection_call_finish() to get the result of the operation. + * See g_dbus_connection_call_sync() for the synchronous version of this + * function. * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * If @callback is %NULL then the D-Bus method call message will be sent with + * the %G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag set. * - * Returns: a signed 64-bit/8-byte value read from @stream or %0 if - * an error occurred. + * Since: 2.26 */ /** - * g_data_input_stream_read_line: - * @stream: a given #GDataInputStream. - * @length: (out) (optional): a #gsize to get the length of the data read in. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: #GError for error reporting. - * - * Reads a line from the data input stream. Note that no encoding - * checks or conversion is performed; the input is not guaranteed to - * be UTF-8, and may in fact have embedded NUL characters. + * g_dbus_connection_call_finish: + * @connection: a #GDBusConnection + * @res: a #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call() + * @error: return location for error or %NULL * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * Finishes an operation started with g_dbus_connection_call(). * - * Returns: (nullable) (transfer full) (array zero-terminated=1) (element-type guint8): - * a NUL terminated byte array with the line that was read in - * (without the newlines). Set @length to a #gsize to get the length - * of the read line. On an error, it will return %NULL and @error - * will be set. If there's no content to read, it will still return - * %NULL, but @error won't be set. + * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with + * return values. Free with g_variant_unref(). + * Since: 2.26 */ /** - * g_data_input_stream_read_line_async: - * @stream: a given #GDataInputStream. - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (scope async): callback to call when the request is satisfied. - * @user_data: (closure): the data to pass to callback function. + * g_dbus_connection_call_sync: + * @connection: a #GDBusConnection + * @bus_name: (nullable): a unique or well-known bus name or %NULL if + * @connection is not a message bus connection + * @object_path: path of remote object + * @interface_name: D-Bus interface to invoke method on + * @method_name: the name of the method to invoke + * @parameters: (nullable): a #GVariant tuple with parameters for the method + * or %NULL if not passing parameters + * @reply_type: (nullable): the expected type of the reply, or %NULL + * @flags: flags from the #GDBusCallFlags enumeration + * @timeout_msec: the timeout in milliseconds, -1 to use the default + * timeout or %G_MAXINT for no timeout + * @cancellable: (nullable): a #GCancellable or %NULL + * @error: return location for error or %NULL * - * The asynchronous version of g_data_input_stream_read_line(). It is - * an error to have two outstanding calls to this function. + * Synchronously invokes the @method_name method on the + * @interface_name D-Bus interface on the remote object at + * @object_path owned by @bus_name. * - * When the operation is finished, @callback will be called. You - * can then call g_data_input_stream_read_line_finish() to get - * the result of the operation. + * If @connection is closed then the operation will fail with + * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the + * operation will fail with %G_IO_ERROR_CANCELLED. If @parameters + * contains a value not compatible with the D-Bus protocol, the operation + * fails with %G_IO_ERROR_INVALID_ARGUMENT. * - * Since: 2.20 + * If @reply_type is non-%NULL then the reply will be checked for having + * this type and an error will be raised if it does not match. Said + * another way, if you give a @reply_type then any non-%NULL return + * value will be of this type. + * + * If the @parameters #GVariant is floating, it is consumed. + * This allows convenient 'inline' use of g_variant_new(), e.g.: + * |[ + * g_dbus_connection_call_sync (connection, + * "org.freedesktop.StringThings", + * "/org/freedesktop/StringThings", + * "org.freedesktop.StringThings", + * "TwoStrings", + * g_variant_new ("(ss)", + * "Thing One", + * "Thing Two"), + * NULL, + * G_DBUS_CALL_FLAGS_NONE, + * -1, + * NULL, + * &error); + * ]| + * + * The calling thread is blocked until a reply is received. See + * g_dbus_connection_call() for the asynchronous version of + * this method. + * + * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with + * return values. Free with g_variant_unref(). + * Since: 2.26 */ /** - * g_data_input_stream_read_line_finish: - * @stream: a given #GDataInputStream. - * @result: the #GAsyncResult that was provided to the callback. - * @length: (out) (optional): a #gsize to get the length of the data read in. - * @error: #GError for error reporting. + * g_dbus_connection_call_with_unix_fd_list: + * @connection: a #GDBusConnection + * @bus_name: (nullable): a unique or well-known bus name or %NULL if + * @connection is not a message bus connection + * @object_path: path of remote object + * @interface_name: D-Bus interface to invoke method on + * @method_name: the name of the method to invoke + * @parameters: (nullable): a #GVariant tuple with parameters for the method + * or %NULL if not passing parameters + * @reply_type: (nullable): the expected type of the reply, or %NULL + * @flags: flags from the #GDBusCallFlags enumeration + * @timeout_msec: the timeout in milliseconds, -1 to use the default + * timeout or %G_MAXINT for no timeout + * @fd_list: (nullable): a #GUnixFDList or %NULL + * @cancellable: (nullable): a #GCancellable or %NULL + * @callback: (nullable): a #GAsyncReadyCallback to call when the request is + * satisfied or %NULL if you don't * care about the result of the + * method invocation + * @user_data: The data to pass to @callback. * - * Finish an asynchronous call started by - * g_data_input_stream_read_line_async(). Note the warning about - * string encoding in g_data_input_stream_read_line() applies here as - * well. + * Like g_dbus_connection_call() but also takes a #GUnixFDList object. * - * Returns: (nullable) (transfer full) (array zero-terminated=1) (element-type guint8): - * a NUL-terminated byte array with the line that was read in - * (without the newlines). Set @length to a #gsize to get the length - * of the read line. On an error, it will return %NULL and @error - * will be set. If there's no content to read, it will still return - * %NULL, but @error won't be set. - * Since: 2.20 + * This method is only available on UNIX. + * + * Since: 2.30 */ /** - * g_data_input_stream_read_line_finish_utf8: - * @stream: a given #GDataInputStream. - * @result: the #GAsyncResult that was provided to the callback. - * @length: (out) (optional): a #gsize to get the length of the data read in. - * @error: #GError for error reporting. + * g_dbus_connection_call_with_unix_fd_list_finish: + * @connection: a #GDBusConnection + * @out_fd_list: (out) (optional): return location for a #GUnixFDList or %NULL + * @res: a #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * g_dbus_connection_call_with_unix_fd_list() + * @error: return location for error or %NULL * - * Finish an asynchronous call started by - * g_data_input_stream_read_line_async(). + * Finishes an operation started with g_dbus_connection_call_with_unix_fd_list(). * - * Returns: (nullable) (transfer full): a string with the line that - * was read in (without the newlines). Set @length to a #gsize to - * get the length of the read line. On an error, it will return - * %NULL and @error will be set. For UTF-8 conversion errors, the set - * error domain is %G_CONVERT_ERROR. If there's no content to read, - * it will still return %NULL, but @error won't be set. + * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with + * return values. Free with g_variant_unref(). * Since: 2.30 */ /** - * g_data_input_stream_read_line_utf8: - * @stream: a given #GDataInputStream. - * @length: (out) (optional): a #gsize to get the length of the data read in. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: #GError for error reporting. + * g_dbus_connection_call_with_unix_fd_list_sync: + * @connection: a #GDBusConnection + * @bus_name: (nullable): a unique or well-known bus name or %NULL + * if @connection is not a message bus connection + * @object_path: path of remote object + * @interface_name: D-Bus interface to invoke method on + * @method_name: the name of the method to invoke + * @parameters: (nullable): a #GVariant tuple with parameters for + * the method or %NULL if not passing parameters + * @reply_type: (nullable): the expected type of the reply, or %NULL + * @flags: flags from the #GDBusCallFlags enumeration + * @timeout_msec: the timeout in milliseconds, -1 to use the default + * timeout or %G_MAXINT for no timeout + * @fd_list: (nullable): a #GUnixFDList or %NULL + * @out_fd_list: (out) (optional): return location for a #GUnixFDList or %NULL + * @cancellable: (nullable): a #GCancellable or %NULL + * @error: return location for error or %NULL * - * Reads a UTF-8 encoded line from the data input stream. + * Like g_dbus_connection_call_sync() but also takes and returns #GUnixFDList objects. * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * This method is only available on UNIX. * - * Returns: (nullable) (transfer full): a NUL terminated UTF-8 string - * with the line that was read in (without the newlines). Set - * @length to a #gsize to get the length of the read line. On an - * error, it will return %NULL and @error will be set. For UTF-8 - * conversion errors, the set error domain is %G_CONVERT_ERROR. If - * there's no content to read, it will still return %NULL, but @error - * won't be set. + * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with + * return values. Free with g_variant_unref(). * Since: 2.30 */ /** - * g_data_input_stream_read_uint16: - * @stream: a given #GDataInputStream. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: #GError for error reporting. + * g_dbus_connection_close: + * @connection: a #GDBusConnection + * @cancellable: (nullable): a #GCancellable or %NULL + * @callback: (nullable): a #GAsyncReadyCallback to call when the request is + * satisfied or %NULL if you don't care about the result + * @user_data: The data to pass to @callback * - * Reads an unsigned 16-bit/2-byte value from @stream. + * Closes @connection. Note that this never causes the process to + * exit (this might only happen if the other end of a shared message + * bus connection disconnects, see #GDBusConnection:exit-on-close). * - * In order to get the correct byte order for this read operation, - * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order(). + * Once the connection is closed, operations such as sending a message + * will return with the error %G_IO_ERROR_CLOSED. Closing a connection + * will not automatically flush the connection so queued messages may + * be lost. Use g_dbus_connection_flush() if you need such guarantees. * - * Returns: an unsigned 16-bit/2-byte value read from the @stream or %0 if - * an error occurred. + * If @connection is already closed, this method fails with + * %G_IO_ERROR_CLOSED. + * + * When @connection has been closed, the #GDBusConnection::closed + * signal is emitted in the + * [thread-default main context][g-main-context-push-thread-default] + * of the thread that @connection was constructed in. + * + * This is an asynchronous method. When the operation is finished, + * @callback will be invoked in the + * [thread-default main context][g-main-context-push-thread-default] + * of the thread you are calling this method from. You can + * then call g_dbus_connection_close_finish() to get the result of the + * operation. See g_dbus_connection_close_sync() for the synchronous + * version. + * + * Since: 2.26 */ /** - * g_data_input_stream_read_uint32: - * @stream: a given #GDataInputStream. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: #GError for error reporting. - * - * Reads an unsigned 32-bit/4-byte value from @stream. - * - * In order to get the correct byte order for this read operation, - * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order(). + * g_dbus_connection_close_finish: + * @connection: a #GDBusConnection + * @res: a #GAsyncResult obtained from the #GAsyncReadyCallback passed + * to g_dbus_connection_close() + * @error: return location for error or %NULL * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * Finishes an operation started with g_dbus_connection_close(). * - * Returns: an unsigned 32-bit/4-byte value read from the @stream or %0 if - * an error occurred. + * Returns: %TRUE if the operation succeeded, %FALSE if @error is set + * Since: 2.26 */ /** - * g_data_input_stream_read_uint64: - * @stream: a given #GDataInputStream. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: #GError for error reporting. - * - * Reads an unsigned 64-bit/8-byte value from @stream. - * - * In order to get the correct byte order for this read operation, - * see g_data_input_stream_get_byte_order(). + * g_dbus_connection_close_sync: + * @connection: a #GDBusConnection + * @cancellable: (nullable): a #GCancellable or %NULL + * @error: return location for error or %NULL * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * Synchronously closes @connection. The calling thread is blocked + * until this is done. See g_dbus_connection_close() for the + * asynchronous version of this method and more details about what it + * does. * - * Returns: an unsigned 64-bit/8-byte read from @stream or %0 if - * an error occurred. + * Returns: %TRUE if the operation succeeded, %FALSE if @error is set + * Since: 2.26 */ /** - * g_data_input_stream_read_until: - * @stream: a given #GDataInputStream. - * @stop_chars: characters to terminate the read. - * @length: (out) (optional): a #gsize to get the length of the data read in. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: #GError for error reporting. + * g_dbus_connection_emit_signal: + * @connection: a #GDBusConnection + * @destination_bus_name: (nullable): the unique bus name for the destination + * for the signal or %NULL to emit to all listeners + * @object_path: path of remote object + * @interface_name: D-Bus interface to emit a signal on + * @signal_name: the name of the signal to emit + * @parameters: (nullable): a #GVariant tuple with parameters for the signal + * or %NULL if not passing parameters + * @error: Return location for error or %NULL * - * Reads a string from the data input stream, up to the first - * occurrence of any of the stop characters. + * Emits a signal. * - * Note that, in contrast to g_data_input_stream_read_until_async(), - * this function consumes the stop character that it finds. + * If the parameters GVariant is floating, it is consumed. * - * Don't use this function in new code. Its functionality is - * inconsistent with g_data_input_stream_read_until_async(). Both - * functions will be marked as deprecated in a future release. Use - * g_data_input_stream_read_upto() instead, but note that that function - * does not consume the stop character. + * This can only fail if @parameters is not compatible with the D-Bus protocol + * (%G_IO_ERROR_INVALID_ARGUMENT), or if @connection has been closed + * (%G_IO_ERROR_CLOSED). * - * Returns: (transfer full): a string with the data that was read - * before encountering any of the stop characters. Set @length to - * a #gsize to get the length of the string. This function will - * return %NULL on an error. - * Deprecated: 2.56: Use g_data_input_stream_read_upto() instead, which has more - * consistent behaviour regarding the stop character. + * Returns: %TRUE unless @error is set + * Since: 2.26 */ /** - * g_data_input_stream_read_until_async: - * @stream: a given #GDataInputStream. - * @stop_chars: characters to terminate the read. - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (scope async): callback to call when the request is satisfied. - * @user_data: (closure): the data to pass to callback function. - * - * The asynchronous version of g_data_input_stream_read_until(). - * It is an error to have two outstanding calls to this function. + * g_dbus_connection_export_action_group: + * @connection: a #GDBusConnection + * @object_path: a D-Bus object path + * @action_group: a #GActionGroup + * @error: a pointer to a %NULL #GError, or %NULL * - * Note that, in contrast to g_data_input_stream_read_until(), - * this function does not consume the stop character that it finds. You - * must read it for yourself. + * Exports @action_group on @connection at @object_path. * - * When the operation is finished, @callback will be called. You - * can then call g_data_input_stream_read_until_finish() to get - * the result of the operation. + * The implemented D-Bus API should be considered private. It is + * subject to change in the future. * - * Don't use this function in new code. Its functionality is - * inconsistent with g_data_input_stream_read_until(). Both functions - * will be marked as deprecated in a future release. Use - * g_data_input_stream_read_upto_async() instead. + * A given object path can only have one action group exported on it. + * If this constraint is violated, the export will fail and 0 will be + * returned (with @error set accordingly). * - * Since: 2.20 - * Deprecated: 2.56: Use g_data_input_stream_read_upto_async() instead, which - * has more consistent behaviour regarding the stop character. - */ - - -/** - * g_data_input_stream_read_until_finish: - * @stream: a given #GDataInputStream. - * @result: the #GAsyncResult that was provided to the callback. - * @length: (out) (optional): a #gsize to get the length of the data read in. - * @error: #GError for error reporting. + * You can unexport the action group using + * g_dbus_connection_unexport_action_group() with the return value of + * this function. * - * Finish an asynchronous call started by - * g_data_input_stream_read_until_async(). + * The thread default main context is taken at the time of this call. + * All incoming action activations and state change requests are + * reported from this context. Any changes on the action group that + * cause it to emit signals must also come from this same context. + * Since incoming action activations and state change requests are + * rather likely to cause changes on the action group, this effectively + * limits a given action group to being exported from only one main + * context. * - * Since: 2.20 - * Returns: (transfer full): a string with the data that was read - * before encountering any of the stop characters. Set @length to - * a #gsize to get the length of the string. This function will - * return %NULL on an error. - * Deprecated: 2.56: Use g_data_input_stream_read_upto_finish() instead, which - * has more consistent behaviour regarding the stop character. + * Returns: the ID of the export (never zero), or 0 in case of failure + * Since: 2.32 */ /** - * g_data_input_stream_read_upto: - * @stream: a #GDataInputStream - * @stop_chars: characters to terminate the read - * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is - * nul-terminated - * @length: (out) (optional): a #gsize to get the length of the data read in - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore - * @error: #GError for error reporting + * g_dbus_connection_export_menu_model: + * @connection: a #GDBusConnection + * @object_path: a D-Bus object path + * @menu: a #GMenuModel + * @error: return location for an error, or %NULL * - * Reads a string from the data input stream, up to the first - * occurrence of any of the stop characters. + * Exports @menu on @connection at @object_path. * - * In contrast to g_data_input_stream_read_until(), this function - * does not consume the stop character. You have to use - * g_data_input_stream_read_byte() to get it before calling - * g_data_input_stream_read_upto() again. + * The implemented D-Bus API should be considered private. + * It is subject to change in the future. * - * Note that @stop_chars may contain '\0' if @stop_chars_len is - * specified. + * An object path can only have one menu model exported on it. If this + * constraint is violated, the export will fail and 0 will be + * returned (with @error set accordingly). * - * The returned string will always be nul-terminated on success. + * You can unexport the menu model using + * g_dbus_connection_unexport_menu_model() with the return value of + * this function. * - * Returns: (transfer full): a string with the data that was read - * before encountering any of the stop characters. Set @length to - * a #gsize to get the length of the string. This function will - * return %NULL on an error - * Since: 2.26 + * Returns: the ID of the export (never zero), or 0 in case of failure + * Since: 2.32 */ /** - * g_data_input_stream_read_upto_async: - * @stream: a #GDataInputStream - * @stop_chars: characters to terminate the read - * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is - * nul-terminated - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore - * @callback: (scope async): callback to call when the request is satisfied - * @user_data: (closure): the data to pass to callback function - * - * The asynchronous version of g_data_input_stream_read_upto(). - * It is an error to have two outstanding calls to this function. - * - * In contrast to g_data_input_stream_read_until(), this function - * does not consume the stop character. You have to use - * g_data_input_stream_read_byte() to get it before calling - * g_data_input_stream_read_upto() again. + * g_dbus_connection_flush: + * @connection: a #GDBusConnection + * @cancellable: (nullable): a #GCancellable or %NULL + * @callback: (nullable): a #GAsyncReadyCallback to call when the + * request is satisfied or %NULL if you don't care about the result + * @user_data: The data to pass to @callback * - * Note that @stop_chars may contain '\0' if @stop_chars_len is - * specified. + * Asynchronously flushes @connection, that is, writes all queued + * outgoing message to the transport and then flushes the transport + * (using g_output_stream_flush_async()). This is useful in programs + * that wants to emit a D-Bus signal and then exit immediately. Without + * flushing the connection, there is no guaranteed that the message has + * been sent to the networking buffers in the OS kernel. * - * When the operation is finished, @callback will be called. You - * can then call g_data_input_stream_read_upto_finish() to get - * the result of the operation. + * This is an asynchronous method. When the operation is finished, + * @callback will be invoked in the + * [thread-default main context][g-main-context-push-thread-default] + * of the thread you are calling this method from. You can + * then call g_dbus_connection_flush_finish() to get the result of the + * operation. See g_dbus_connection_flush_sync() for the synchronous + * version. * * Since: 2.26 */ /** - * g_data_input_stream_read_upto_finish: - * @stream: a #GDataInputStream - * @result: the #GAsyncResult that was provided to the callback - * @length: (out) (optional): a #gsize to get the length of the data read in - * @error: #GError for error reporting - * - * Finish an asynchronous call started by - * g_data_input_stream_read_upto_async(). - * - * Note that this function does not consume the stop character. You - * have to use g_data_input_stream_read_byte() to get it before calling - * g_data_input_stream_read_upto_async() again. + * g_dbus_connection_flush_finish: + * @connection: a #GDBusConnection + * @res: a #GAsyncResult obtained from the #GAsyncReadyCallback passed + * to g_dbus_connection_flush() + * @error: return location for error or %NULL * - * The returned string will always be nul-terminated on success. + * Finishes an operation started with g_dbus_connection_flush(). * - * Returns: (transfer full): a string with the data that was read - * before encountering any of the stop characters. Set @length to - * a #gsize to get the length of the string. This function will - * return %NULL on an error. - * Since: 2.24 + * Returns: %TRUE if the operation succeeded, %FALSE if @error is set + * Since: 2.26 */ /** - * g_data_input_stream_set_byte_order: - * @stream: a given #GDataInputStream. - * @order: a #GDataStreamByteOrder to set. + * g_dbus_connection_flush_sync: + * @connection: a #GDBusConnection + * @cancellable: (nullable): a #GCancellable or %NULL + * @error: return location for error or %NULL * - * This function sets the byte order for the given @stream. All subsequent - * reads from the @stream will be read in the given @order. + * Synchronously flushes @connection. The calling thread is blocked + * until this is done. See g_dbus_connection_flush() for the + * asynchronous version of this method and more details about what it + * does. + * + * Returns: %TRUE if the operation succeeded, %FALSE if @error is set + * Since: 2.26 */ /** - * g_data_input_stream_set_newline_type: - * @stream: a #GDataInputStream. - * @type: the type of new line return as #GDataStreamNewlineType. + * g_dbus_connection_get_capabilities: + * @connection: a #GDBusConnection * - * Sets the newline type for the @stream. + * Gets the capabilities negotiated with the remote peer * - * Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a read - * chunk ends in "CR" we must read an additional byte to know if this is "CR" or - * "CR LF", and this might block if there is no more data available. + * Returns: zero or more flags from the #GDBusCapabilityFlags enumeration + * Since: 2.26 */ /** - * g_data_output_stream_get_byte_order: - * @stream: a #GDataOutputStream. + * g_dbus_connection_get_exit_on_close: + * @connection: a #GDBusConnection * - * Gets the byte order for the stream. + * Gets whether the process is terminated when @connection is + * closed by the remote peer. See + * #GDBusConnection:exit-on-close for more details. * - * Returns: the #GDataStreamByteOrder for the @stream. + * Returns: whether the process is terminated when @connection is + * closed by the remote peer + * Since: 2.26 */ /** - * g_data_output_stream_new: - * @base_stream: a #GOutputStream. + * g_dbus_connection_get_flags: + * @connection: a #GDBusConnection * - * Creates a new data output stream for @base_stream. + * Gets the flags used to construct this connection * - * Returns: #GDataOutputStream. + * Returns: zero or more flags from the #GDBusConnectionFlags enumeration + * Since: 2.60 */ /** - * g_data_output_stream_put_byte: - * @stream: a #GDataOutputStream. - * @data: a #guchar. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: a #GError, %NULL to ignore. + * g_dbus_connection_get_guid: + * @connection: a #GDBusConnection * - * Puts a byte into the output stream. + * The GUID of the peer performing the role of server when + * authenticating. See #GDBusConnection:guid for more details. * - * Returns: %TRUE if @data was successfully added to the @stream. + * Returns: The GUID. Do not free this string, it is owned by + * @connection. + * Since: 2.26 */ /** - * g_data_output_stream_put_int16: - * @stream: a #GDataOutputStream. - * @data: a #gint16. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: a #GError, %NULL to ignore. + * g_dbus_connection_get_last_serial: + * @connection: a #GDBusConnection * - * Puts a signed 16-bit integer into the output stream. + * Retrieves the last serial number assigned to a #GDBusMessage on + * the current thread. This includes messages sent via both low-level + * API such as g_dbus_connection_send_message() as well as + * high-level API such as g_dbus_connection_emit_signal(), + * g_dbus_connection_call() or g_dbus_proxy_call(). * - * Returns: %TRUE if @data was successfully added to the @stream. + * Returns: the last used serial or zero when no message has been sent + * within the current thread + * Since: 2.34 */ /** - * g_data_output_stream_put_int32: - * @stream: a #GDataOutputStream. - * @data: a #gint32. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: a #GError, %NULL to ignore. + * g_dbus_connection_get_peer_credentials: + * @connection: a #GDBusConnection * - * Puts a signed 32-bit integer into the output stream. + * Gets the credentials of the authenticated peer. This will always + * return %NULL unless @connection acted as a server + * (e.g. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER was passed) + * when set up and the client passed credentials as part of the + * authentication process. * - * Returns: %TRUE if @data was successfully added to the @stream. + * In a message bus setup, the message bus is always the server and + * each application is a client. So this method will always return + * %NULL for message bus clients. + * + * Returns: (transfer none) (nullable): a #GCredentials or %NULL if not + * available. Do not free this object, it is owned by @connection. + * Since: 2.26 */ /** - * g_data_output_stream_put_int64: - * @stream: a #GDataOutputStream. - * @data: a #gint64. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: a #GError, %NULL to ignore. + * g_dbus_connection_get_stream: + * @connection: a #GDBusConnection * - * Puts a signed 64-bit integer into the stream. + * Gets the underlying stream used for IO. * - * Returns: %TRUE if @data was successfully added to the @stream. + * While the #GDBusConnection is active, it will interact with this + * stream from a worker thread, so it is not safe to interact with + * the stream directly. + * + * Returns: (transfer none): the stream used for IO + * Since: 2.26 */ /** - * g_data_output_stream_put_string: - * @stream: a #GDataOutputStream. - * @str: a string. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: a #GError, %NULL to ignore. + * g_dbus_connection_get_unique_name: + * @connection: a #GDBusConnection * - * Puts a string into the output stream. + * Gets the unique name of @connection as assigned by the message + * bus. This can also be used to figure out if @connection is a + * message bus connection. * - * Returns: %TRUE if @string was successfully added to the @stream. + * Returns: (nullable): the unique name or %NULL if @connection is not a message + * bus connection. Do not free this string, it is owned by + * @connection. + * Since: 2.26 */ /** - * g_data_output_stream_put_uint16: - * @stream: a #GDataOutputStream. - * @data: a #guint16. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: a #GError, %NULL to ignore. + * g_dbus_connection_is_closed: + * @connection: a #GDBusConnection * - * Puts an unsigned 16-bit integer into the output stream. + * Gets whether @connection is closed. * - * Returns: %TRUE if @data was successfully added to the @stream. + * Returns: %TRUE if the connection is closed, %FALSE otherwise + * Since: 2.26 */ /** - * g_data_output_stream_put_uint32: - * @stream: a #GDataOutputStream. - * @data: a #guint32. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: a #GError, %NULL to ignore. + * g_dbus_connection_new: + * @stream: a #GIOStream + * @guid: (nullable): the GUID to use if authenticating as a server or %NULL + * @flags: flags describing how to make the connection + * @observer: (nullable): a #GDBusAuthObserver or %NULL + * @cancellable: (nullable): a #GCancellable or %NULL + * @callback: a #GAsyncReadyCallback to call when the request is satisfied + * @user_data: the data to pass to @callback * - * Puts an unsigned 32-bit integer into the stream. + * Asynchronously sets up a D-Bus connection for exchanging D-Bus messages + * with the end represented by @stream. * - * Returns: %TRUE if @data was successfully added to the @stream. - */ - - -/** - * g_data_output_stream_put_uint64: - * @stream: a #GDataOutputStream. - * @data: a #guint64. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: a #GError, %NULL to ignore. + * If @stream is a #GSocketConnection, then the corresponding #GSocket + * will be put into non-blocking mode. * - * Puts an unsigned 64-bit integer into the stream. + * The D-Bus connection will interact with @stream from a worker thread. + * As a result, the caller should not interact with @stream after this + * method has been called, except by calling g_object_unref() on it. * - * Returns: %TRUE if @data was successfully added to the @stream. + * If @observer is not %NULL it may be used to control the + * authentication process. + * + * When the operation is finished, @callback will be invoked. You can + * then call g_dbus_connection_new_finish() to get the result of the + * operation. + * + * This is an asynchronous failable constructor. See + * g_dbus_connection_new_sync() for the synchronous + * version. + * + * Since: 2.26 */ /** - * g_data_output_stream_set_byte_order: - * @stream: a #GDataOutputStream. - * @order: a %GDataStreamByteOrder. + * g_dbus_connection_new_finish: + * @res: a #GAsyncResult obtained from the #GAsyncReadyCallback + * passed to g_dbus_connection_new(). + * @error: return location for error or %NULL * - * Sets the byte order of the data output stream to @order. + * Finishes an operation started with g_dbus_connection_new(). + * + * Returns: a #GDBusConnection or %NULL if @error is set. Free + * with g_object_unref(). + * Since: 2.26 */ /** - * g_datagram_based_condition_check: - * @datagram_based: a #GDatagramBased - * @condition: a #GIOCondition mask to check - * - * Checks on the readiness of @datagram_based to perform operations. The - * operations specified in @condition are checked for and masked against the - * currently-satisfied conditions on @datagram_based. The result is returned. - * - * %G_IO_IN will be set in the return value if data is available to read with - * g_datagram_based_receive_messages(), or if the connection is closed remotely - * (EOS); and if the datagram_based has not been closed locally using some - * implementation-specific method (such as g_socket_close() or - * g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket). - * - * If the connection is shut down or closed (by calling g_socket_close() or - * g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket, for - * example), all calls to this function will return %G_IO_ERROR_CLOSED. - * - * %G_IO_OUT will be set if it is expected that at least one byte can be sent - * using g_datagram_based_send_messages() without blocking. It will not be set - * if the datagram_based has been closed locally. + * g_dbus_connection_new_for_address: + * @address: a D-Bus address + * @flags: flags describing how to make the connection + * @observer: (nullable): a #GDBusAuthObserver or %NULL + * @cancellable: (nullable): a #GCancellable or %NULL + * @callback: a #GAsyncReadyCallback to call when the request is satisfied + * @user_data: the data to pass to @callback * - * %G_IO_HUP will be set if the connection has been closed locally. + * Asynchronously connects and sets up a D-Bus client connection for + * exchanging D-Bus messages with an endpoint specified by @address + * which must be in the + * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). * - * %G_IO_ERR will be set if there was an asynchronous error in transmitting data - * previously enqueued using g_datagram_based_send_messages(). + * This constructor can only be used to initiate client-side + * connections - use g_dbus_connection_new() if you need to act as the + * server. In particular, @flags cannot contain the + * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or + * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags. * - * Note that on Windows, it is possible for an operation to return - * %G_IO_ERROR_WOULD_BLOCK even immediately after - * g_datagram_based_condition_check() has claimed that the #GDatagramBased is - * ready for writing. Rather than calling g_datagram_based_condition_check() and - * then writing to the #GDatagramBased if it succeeds, it is generally better to - * simply try writing right away, and try again later if the initial attempt - * returns %G_IO_ERROR_WOULD_BLOCK. + * When the operation is finished, @callback will be invoked. You can + * then call g_dbus_connection_new_for_address_finish() to get the result of + * the operation. * - * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition; these - * conditions will always be set in the output if they are true. Apart from - * these flags, the output is guaranteed to be masked by @condition. + * If @observer is not %NULL it may be used to control the + * authentication process. * - * This call never blocks. + * This is an asynchronous failable constructor. See + * g_dbus_connection_new_for_address_sync() for the synchronous + * version. * - * Returns: the #GIOCondition mask of the current state - * Since: 2.48 + * Since: 2.26 */ /** - * g_datagram_based_condition_wait: - * @datagram_based: a #GDatagramBased - * @condition: a #GIOCondition mask to wait for - * @timeout: the maximum time (in microseconds) to wait, 0 to not block, or -1 - * to block indefinitely - * @cancellable: (nullable): a #GCancellable - * @error: return location for a #GError - * - * Waits for up to @timeout microseconds for condition to become true on - * @datagram_based. If the condition is met, %TRUE is returned. + * g_dbus_connection_new_for_address_finish: + * @res: a #GAsyncResult obtained from the #GAsyncReadyCallback passed + * to g_dbus_connection_new() + * @error: return location for error or %NULL * - * If @cancellable is cancelled before the condition is met, or if @timeout is - * reached before the condition is met, then %FALSE is returned and @error is - * set appropriately (%G_IO_ERROR_CANCELLED or %G_IO_ERROR_TIMED_OUT). + * Finishes an operation started with g_dbus_connection_new_for_address(). * - * Returns: %TRUE if the condition was met, %FALSE otherwise - * Since: 2.48 + * Returns: a #GDBusConnection or %NULL if @error is set. Free with + * g_object_unref(). + * Since: 2.26 */ /** - * g_datagram_based_create_source: - * @datagram_based: a #GDatagramBased - * @condition: a #GIOCondition mask to monitor - * @cancellable: (nullable): a #GCancellable + * g_dbus_connection_new_for_address_sync: + * @address: a D-Bus address + * @flags: flags describing how to make the connection + * @observer: (nullable): a #GDBusAuthObserver or %NULL + * @cancellable: (nullable): a #GCancellable or %NULL + * @error: return location for error or %NULL * - * Creates a #GSource that can be attached to a #GMainContext to monitor for - * the availability of the specified @condition on the #GDatagramBased. The - * #GSource keeps a reference to the @datagram_based. + * Synchronously connects and sets up a D-Bus client connection for + * exchanging D-Bus messages with an endpoint specified by @address + * which must be in the + * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). * - * The callback on the source is of the #GDatagramBasedSourceFunc type. + * This constructor can only be used to initiate client-side + * connections - use g_dbus_connection_new_sync() if you need to act + * as the server. In particular, @flags cannot contain the + * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or + * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags. * - * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition; these - * conditions will always be reported in the callback if they are true. + * This is a synchronous failable constructor. See + * g_dbus_connection_new_for_address() for the asynchronous version. * - * If non-%NULL, @cancellable can be used to cancel the source, which will - * cause the source to trigger, reporting the current condition (which is - * likely 0 unless cancellation happened at the same time as a condition - * change). You can check for this in the callback using - * g_cancellable_is_cancelled(). + * If @observer is not %NULL it may be used to control the + * authentication process. * - * Returns: (transfer full): a newly allocated #GSource - * Since: 2.48 + * Returns: a #GDBusConnection or %NULL if @error is set. Free with + * g_object_unref(). + * Since: 2.26 */ /** - * g_datagram_based_receive_messages: - * @datagram_based: a #GDatagramBased - * @messages: (array length=num_messages): an array of #GInputMessage structs - * @num_messages: the number of elements in @messages - * @flags: an int containing #GSocketMsgFlags flags for the overall operation - * @timeout: the maximum time (in microseconds) to wait, 0 to not block, or -1 - * to block indefinitely - * @cancellable: (nullable): a %GCancellable - * @error: return location for a #GError + * g_dbus_connection_new_sync: + * @stream: a #GIOStream + * @guid: (nullable): the GUID to use if authenticating as a server or %NULL + * @flags: flags describing how to make the connection + * @observer: (nullable): a #GDBusAuthObserver or %NULL + * @cancellable: (nullable): a #GCancellable or %NULL + * @error: return location for error or %NULL * - * Receive one or more data messages from @datagram_based in one go. + * Synchronously sets up a D-Bus connection for exchanging D-Bus messages + * with the end represented by @stream. * - * @messages must point to an array of #GInputMessage structs and - * @num_messages must be the length of this array. Each #GInputMessage - * contains a pointer to an array of #GInputVector structs describing the - * buffers that the data received in each message will be written to. + * If @stream is a #GSocketConnection, then the corresponding #GSocket + * will be put into non-blocking mode. * - * @flags modify how all messages are received. The commonly available - * arguments for this are available in the #GSocketMsgFlags enum, but the - * values there are the same as the system values, and the flags - * are passed in as-is, so you can pass in system-specific flags too. These - * flags affect the overall receive operation. Flags affecting individual - * messages are returned in #GInputMessage.flags. - * - * The other members of #GInputMessage are treated as described in its - * documentation. - * - * If @timeout is negative the call will block until @num_messages have been - * received, the connection is closed remotely (EOS), @cancellable is cancelled, - * or an error occurs. - * - * If @timeout is 0 the call will return up to @num_messages without blocking, - * or %G_IO_ERROR_WOULD_BLOCK if no messages are queued in the operating system - * to be received. - * - * If @timeout is positive the call will block on the same conditions as if - * @timeout were negative. If the timeout is reached - * before any messages are received, %G_IO_ERROR_TIMED_OUT is returned, - * otherwise it will return the number of messages received before timing out. - * (Note: This is effectively the behaviour of `MSG_WAITFORONE` with - * recvmmsg().) - * - * To be notified when messages are available, wait for the %G_IO_IN condition. - * Note though that you may still receive %G_IO_ERROR_WOULD_BLOCK from - * g_datagram_based_receive_messages() even if you were previously notified of a - * %G_IO_IN condition. - * - * If the remote peer closes the connection, any messages queued in the - * underlying receive buffer will be returned, and subsequent calls to - * g_datagram_based_receive_messages() will return 0 (with no error set). + * The D-Bus connection will interact with @stream from a worker thread. + * As a result, the caller should not interact with @stream after this + * method has been called, except by calling g_object_unref() on it. * - * If the connection is shut down or closed (by calling g_socket_close() or - * g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket, for - * example), all calls to this function will return %G_IO_ERROR_CLOSED. + * If @observer is not %NULL it may be used to control the + * authentication process. * - * On error -1 is returned and @error is set accordingly. An error will only - * be returned if zero messages could be received; otherwise the number of - * messages successfully received before the error will be returned. If - * @cancellable is cancelled, %G_IO_ERROR_CANCELLED is returned as with any - * other error. + * This is a synchronous failable constructor. See + * g_dbus_connection_new() for the asynchronous version. * - * Returns: number of messages received, or -1 on error. Note that the number - * of messages received may be smaller than @num_messages if @timeout is - * zero or positive, if the peer closed the connection, or if @num_messages - * was larger than `UIO_MAXIOV` (1024), in which case the caller may re-try - * to receive the remaining messages. - * Since: 2.48 + * Returns: a #GDBusConnection or %NULL if @error is set. Free with g_object_unref(). + * Since: 2.26 */ /** - * g_datagram_based_send_messages: - * @datagram_based: a #GDatagramBased - * @messages: (array length=num_messages): an array of #GOutputMessage structs - * @num_messages: the number of elements in @messages - * @flags: an int containing #GSocketMsgFlags flags - * @timeout: the maximum time (in microseconds) to wait, 0 to not block, or -1 - * to block indefinitely - * @cancellable: (nullable): a %GCancellable - * @error: return location for a #GError - * - * Send one or more data messages from @datagram_based in one go. + * g_dbus_connection_register_object: + * @connection: a #GDBusConnection + * @object_path: the object path to register at + * @interface_info: introspection data for the interface + * @vtable: (nullable): a #GDBusInterfaceVTable to call into or %NULL + * @user_data: (nullable): data to pass to functions in @vtable + * @user_data_free_func: function to call when the object path is unregistered + * @error: return location for error or %NULL * - * @messages must point to an array of #GOutputMessage structs and - * @num_messages must be the length of this array. Each #GOutputMessage - * contains an address to send the data to, and a pointer to an array of - * #GOutputVector structs to describe the buffers that the data to be sent - * for each message will be gathered from. + * Registers callbacks for exported objects at @object_path with the + * D-Bus interface that is described in @interface_info. * - * @flags modify how the message is sent. The commonly available arguments - * for this are available in the #GSocketMsgFlags enum, but the - * values there are the same as the system values, and the flags - * are passed in as-is, so you can pass in system-specific flags too. + * Calls to functions in @vtable (and @user_data_free_func) will happen + * in the + * [thread-default main context][g-main-context-push-thread-default] + * of the thread you are calling this method from. * - * The other members of #GOutputMessage are treated as described in its - * documentation. + * Note that all #GVariant values passed to functions in @vtable will match + * the signature given in @interface_info - if a remote caller passes + * incorrect values, the `org.freedesktop.DBus.Error.InvalidArgs` + * is returned to the remote caller. * - * If @timeout is negative the call will block until @num_messages have been - * sent, @cancellable is cancelled, or an error occurs. + * Additionally, if the remote caller attempts to invoke methods or + * access properties not mentioned in @interface_info the + * `org.freedesktop.DBus.Error.UnknownMethod` resp. + * `org.freedesktop.DBus.Error.InvalidArgs` errors + * are returned to the caller. * - * If @timeout is 0 the call will send up to @num_messages without blocking, - * or will return %G_IO_ERROR_WOULD_BLOCK if there is no space to send messages. + * It is considered a programming error if the + * #GDBusInterfaceGetPropertyFunc function in @vtable returns a + * #GVariant of incorrect type. * - * If @timeout is positive the call will block on the same conditions as if - * @timeout were negative. If the timeout is reached before any messages are - * sent, %G_IO_ERROR_TIMED_OUT is returned, otherwise it will return the number - * of messages sent before timing out. + * If an existing callback is already registered at @object_path and + * @interface_name, then @error is set to #G_IO_ERROR_EXISTS. * - * To be notified when messages can be sent, wait for the %G_IO_OUT condition. - * Note though that you may still receive %G_IO_ERROR_WOULD_BLOCK from - * g_datagram_based_send_messages() even if you were previously notified of a - * %G_IO_OUT condition. (On Windows in particular, this is very common due to - * the way the underlying APIs work.) + * GDBus automatically implements the standard D-Bus interfaces + * org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable + * and org.freedesktop.Peer, so you don't have to implement those for the + * objects you export. You can implement org.freedesktop.DBus.Properties + * yourself, e.g. to handle getting and setting of properties asynchronously. * - * If the connection is shut down or closed (by calling g_socket_close() or - * g_socket_shutdown() with @shutdown_write set, if it’s a #GSocket, for - * example), all calls to this function will return %G_IO_ERROR_CLOSED. + * Note that the reference count on @interface_info will be + * incremented by 1 (unless allocated statically, e.g. if the + * reference count is -1, see g_dbus_interface_info_ref()) for as long + * as the object is exported. Also note that @vtable will be copied. * - * On error -1 is returned and @error is set accordingly. An error will only - * be returned if zero messages could be sent; otherwise the number of messages - * successfully sent before the error will be returned. If @cancellable is - * cancelled, %G_IO_ERROR_CANCELLED is returned as with any other error. + * See this [server][gdbus-server] for an example of how to use this method. * - * Returns: number of messages sent, or -1 on error. Note that the number of - * messages sent may be smaller than @num_messages if @timeout is zero - * or positive, or if @num_messages was larger than `UIO_MAXIOV` (1024), in - * which case the caller may re-try to send the remaining messages. - * Since: 2.48 + * Returns: 0 if @error is set, otherwise a registration id (never 0) + * that can be used with g_dbus_connection_unregister_object() + * Since: 2.26 */ /** - * g_dbus_action_group_get: - * @connection: A #GDBusConnection - * @bus_name: (nullable): the bus name which exports the action - * group or %NULL if @connection is not a message bus connection - * @object_path: the object path at which the action group is exported - * - * Obtains a #GDBusActionGroup for the action group which is exported at - * the given @bus_name and @object_path. - * - * The thread default main context is taken at the time of this call. - * All signals on the menu model (and any linked models) are reported - * with respect to this context. All calls on the returned menu model - * (and linked models) must also originate from this same context, with - * the thread default main context unchanged. + * g_dbus_connection_register_object_with_closures: (rename-to g_dbus_connection_register_object) + * @connection: A #GDBusConnection. + * @object_path: The object path to register at. + * @interface_info: Introspection data for the interface. + * @method_call_closure: (nullable): #GClosure for handling incoming method calls. + * @get_property_closure: (nullable): #GClosure for getting a property. + * @set_property_closure: (nullable): #GClosure for setting a property. + * @error: Return location for error or %NULL. * - * This call is non-blocking. The returned action group may or may not - * already be filled in. The correct thing to do is connect the signals - * for the action group to monitor for changes and then to call - * g_action_group_list_actions() to get the initial list. + * Version of g_dbus_connection_register_object() using closures instead of a + * #GDBusInterfaceVTable for easier binding in other languages. * - * Returns: (transfer full): a #GDBusActionGroup - * Since: 2.32 + * Returns: 0 if @error is set, otherwise a registration id (never 0) + * that can be used with g_dbus_connection_unregister_object() . + * Since: 2.46 */ /** - * g_dbus_address_escape_value: - * @string: an unescaped string to be included in a D-Bus address - * as the value in a key-value pair + * g_dbus_connection_register_subtree: + * @connection: a #GDBusConnection + * @object_path: the object path to register the subtree at + * @vtable: a #GDBusSubtreeVTable to enumerate, introspect and + * dispatch nodes in the subtree + * @flags: flags used to fine tune the behavior of the subtree + * @user_data: data to pass to functions in @vtable + * @user_data_free_func: function to call when the subtree is unregistered + * @error: return location for error or %NULL * - * Escape @string so it can appear in a D-Bus address as the value - * part of a key-value pair. + * Registers a whole subtree of dynamic objects. * - * For instance, if @string is `/run/bus-for-:0`, - * this function would return `/run/bus-for-%3A0`, - * which could be used in a D-Bus address like - * `unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0`. + * The @enumerate and @introspection functions in @vtable are used to + * convey, to remote callers, what nodes exist in the subtree rooted + * by @object_path. * - * Returns: (transfer full): a copy of @string with all - * non-optionally-escaped bytes escaped - * Since: 2.36 + * When handling remote calls into any node in the subtree, first the + * @enumerate function is used to check if the node exists. If the node exists + * or the #G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set + * the @introspection function is used to check if the node supports the + * requested method. If so, the @dispatch function is used to determine + * where to dispatch the call. The collected #GDBusInterfaceVTable and + * #gpointer will be used to call into the interface vtable for processing + * the request. + * + * All calls into user-provided code will be invoked in the + * [thread-default main context][g-main-context-push-thread-default] + * of the thread you are calling this method from. + * + * If an existing subtree is already registered at @object_path or + * then @error is set to #G_IO_ERROR_EXISTS. + * + * Note that it is valid to register regular objects (using + * g_dbus_connection_register_object()) in a subtree registered with + * g_dbus_connection_register_subtree() - if so, the subtree handler + * is tried as the last resort. One way to think about a subtree + * handler is to consider it a fallback handler for object paths not + * registered via g_dbus_connection_register_object() or other bindings. + * + * Note that @vtable will be copied so you cannot change it after + * registration. + * + * See this [server][gdbus-subtree-server] for an example of how to use + * this method. + * + * Returns: 0 if @error is set, otherwise a subtree registration id (never 0) + * that can be used with g_dbus_connection_unregister_subtree() . + * Since: 2.26 */ /** - * g_dbus_address_get_for_bus_sync: - * @bus_type: a #GBusType - * @cancellable: (nullable): a #GCancellable or %NULL - * @error: return location for error or %NULL + * g_dbus_connection_remove_filter: + * @connection: a #GDBusConnection + * @filter_id: an identifier obtained from g_dbus_connection_add_filter() * - * Synchronously looks up the D-Bus address for the well-known message - * bus instance specified by @bus_type. This may involve using various - * platform specific mechanisms. + * Removes a filter. * - * The returned address will be in the - * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). + * Note that since filters run in a different thread, there is a race + * condition where it is possible that the filter will be running even + * after calling g_dbus_connection_remove_filter(), so you cannot just + * free data that the filter might be using. Instead, you should pass + * a #GDestroyNotify to g_dbus_connection_add_filter(), which will be + * called when it is guaranteed that the data is no longer needed. * - * Returns: a valid D-Bus address string for @bus_type or %NULL if - * @error is set * Since: 2.26 */ /** - * g_dbus_address_get_stream: - * @address: A valid D-Bus address. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: Data to pass to @callback. + * g_dbus_connection_send_message: + * @connection: a #GDBusConnection + * @message: a #GDBusMessage + * @flags: flags affecting how the message is sent + * @out_serial: (out) (optional): return location for serial number assigned + * to @message when sending it or %NULL + * @error: Return location for error or %NULL * - * Asynchronously connects to an endpoint specified by @address and - * sets up the connection so it is in a state to run the client-side - * of the D-Bus authentication conversation. @address must be in the - * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). + * Asynchronously sends @message to the peer represented by @connection. * - * When the operation is finished, @callback will be invoked. You can - * then call g_dbus_address_get_stream_finish() to get the result of - * the operation. + * Unless @flags contain the + * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number + * will be assigned by @connection and set on @message via + * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the + * serial number used will be written to this location prior to + * submitting the message to the underlying transport. * - * This is an asynchronous failable function. See - * g_dbus_address_get_stream_sync() for the synchronous version. + * If @connection is closed then the operation will fail with + * %G_IO_ERROR_CLOSED. If @message is not well-formed, + * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT. + * + * See this [server][gdbus-server] and [client][gdbus-unix-fd-client] + * for an example of how to use this low-level API to send and receive + * UNIX file descriptors. + * + * Note that @message must be unlocked, unless @flags contain the + * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag. * + * Returns: %TRUE if the message was well-formed and queued for + * transmission, %FALSE if @error is set * Since: 2.26 */ /** - * g_dbus_address_get_stream_finish: - * @res: A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream(). - * @out_guid: (optional) (out): %NULL or return location to store the GUID extracted from @address, if any. - * @error: Return location for error or %NULL. + * g_dbus_connection_send_message_with_reply: + * @connection: a #GDBusConnection + * @message: a #GDBusMessage + * @flags: flags affecting how the message is sent + * @timeout_msec: the timeout in milliseconds, -1 to use the default + * timeout or %G_MAXINT for no timeout + * @out_serial: (out) (optional): return location for serial number assigned + * to @message when sending it or %NULL + * @cancellable: (nullable): a #GCancellable or %NULL + * @callback: (nullable): a #GAsyncReadyCallback to call when the request + * is satisfied or %NULL if you don't care about the result + * @user_data: The data to pass to @callback * - * Finishes an operation started with g_dbus_address_get_stream(). + * Asynchronously sends @message to the peer represented by @connection. + * + * Unless @flags contain the + * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number + * will be assigned by @connection and set on @message via + * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the + * serial number used will be written to this location prior to + * submitting the message to the underlying transport. + * + * If @connection is closed then the operation will fail with + * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will + * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed, + * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT. + * + * This is an asynchronous method. When the operation is finished, @callback + * will be invoked in the + * [thread-default main context][g-main-context-push-thread-default] + * of the thread you are calling this method from. You can then call + * g_dbus_connection_send_message_with_reply_finish() to get the result of the operation. + * See g_dbus_connection_send_message_with_reply_sync() for the synchronous version. + * + * Note that @message must be unlocked, unless @flags contain the + * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag. + * + * See this [server][gdbus-server] and [client][gdbus-unix-fd-client] + * for an example of how to use this low-level API to send and receive + * UNIX file descriptors. * - * Returns: (transfer full): A #GIOStream or %NULL if @error is set. * Since: 2.26 */ /** - * g_dbus_address_get_stream_sync: - * @address: A valid D-Bus address. - * @out_guid: (optional) (out): %NULL or return location to store the GUID extracted from @address, if any. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * g_dbus_connection_send_message_with_reply_finish: + * @connection: a #GDBusConnection + * @res: a #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * g_dbus_connection_send_message_with_reply() + * @error: teturn location for error or %NULL * - * Synchronously connects to an endpoint specified by @address and - * sets up the connection so it is in a state to run the client-side - * of the D-Bus authentication conversation. @address must be in the - * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). + * Finishes an operation started with g_dbus_connection_send_message_with_reply(). * - * This is a synchronous failable function. See - * g_dbus_address_get_stream() for the asynchronous version. + * Note that @error is only set if a local in-process error + * occurred. That is to say that the returned #GDBusMessage object may + * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use + * g_dbus_message_to_gerror() to transcode this to a #GError. * - * Returns: (transfer full): A #GIOStream or %NULL if @error is set. + * See this [server][gdbus-server] and [client][gdbus-unix-fd-client] + * for an example of how to use this low-level API to send and receive + * UNIX file descriptors. + * + * Returns: (transfer full): a locked #GDBusMessage or %NULL if @error is set * Since: 2.26 */ /** - * g_dbus_annotation_info_lookup: - * @annotations: (array zero-terminated=1) (nullable): A %NULL-terminated array of annotations or %NULL. - * @name: The name of the annotation to look up. + * g_dbus_connection_send_message_with_reply_sync: + * @connection: a #GDBusConnection + * @message: a #GDBusMessage + * @flags: flags affecting how the message is sent. + * @timeout_msec: the timeout in milliseconds, -1 to use the default + * timeout or %G_MAXINT for no timeout + * @out_serial: (out) (optional): return location for serial number + * assigned to @message when sending it or %NULL + * @cancellable: (nullable): a #GCancellable or %NULL + * @error: return location for error or %NULL * - * Looks up the value of an annotation. + * Synchronously sends @message to the peer represented by @connection + * and blocks the calling thread until a reply is received or the + * timeout is reached. See g_dbus_connection_send_message_with_reply() + * for the asynchronous version of this method. * - * The cost of this function is O(n) in number of annotations. + * Unless @flags contain the + * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number + * will be assigned by @connection and set on @message via + * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the + * serial number used will be written to this location prior to + * submitting the message to the underlying transport. * - * Returns: The value or %NULL if not found. Do not free, it is owned by @annotations. + * If @connection is closed then the operation will fail with + * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will + * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed, + * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT. + * + * Note that @error is only set if a local in-process error + * occurred. That is to say that the returned #GDBusMessage object may + * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use + * g_dbus_message_to_gerror() to transcode this to a #GError. + * + * See this [server][gdbus-server] and [client][gdbus-unix-fd-client] + * for an example of how to use this low-level API to send and receive + * UNIX file descriptors. + * + * Note that @message must be unlocked, unless @flags contain the + * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag. + * + * Returns: (transfer full): a locked #GDBusMessage that is the reply + * to @message or %NULL if @error is set * Since: 2.26 */ /** - * g_dbus_annotation_info_ref: - * @info: A #GDBusNodeInfo + * g_dbus_connection_set_exit_on_close: + * @connection: a #GDBusConnection + * @exit_on_close: whether the process should be terminated + * when @connection is closed by the remote peer * - * If @info is statically allocated does nothing. Otherwise increases - * the reference count. + * Sets whether the process should be terminated when @connection is + * closed by the remote peer. See #GDBusConnection:exit-on-close for + * more details. + * + * Note that this function should be used with care. Most modern UNIX + * desktops tie the notion of a user session with the session bus, and expect + * all of a user's applications to quit when their bus connection goes away. + * If you are setting @exit_on_close to %FALSE for the shared session + * bus connection, you should make sure that your application exits + * when the user session ends. * - * Returns: The same @info. * Since: 2.26 */ /** - * g_dbus_annotation_info_unref: - * @info: A #GDBusAnnotationInfo. + * g_dbus_connection_signal_subscribe: + * @connection: a #GDBusConnection + * @sender: (nullable): sender name to match on (unique or well-known name) + * or %NULL to listen from all senders + * @interface_name: (nullable): D-Bus interface name to match on or %NULL to + * match on all interfaces + * @member: (nullable): D-Bus signal name to match on or %NULL to match on + * all signals + * @object_path: (nullable): object path to match on or %NULL to match on + * all object paths + * @arg0: (nullable): contents of first string argument to match on or %NULL + * to match on all kinds of arguments + * @flags: #GDBusSignalFlags describing how arg0 is used in subscribing to the + * signal + * @callback: callback to invoke when there is a signal matching the requested data + * @user_data: user data to pass to @callback + * @user_data_free_func: (nullable): function to free @user_data with when + * subscription is removed or %NULL * - * If @info is statically allocated, does nothing. Otherwise decreases - * the reference count of @info. When its reference count drops to 0, - * the memory used is freed. + * Subscribes to signals on @connection and invokes @callback with a whenever + * the signal is received. Note that @callback will be invoked in the + * [thread-default main context][g-main-context-push-thread-default] + * of the thread you are calling this method from. * + * If @connection is not a message bus connection, @sender must be + * %NULL. + * + * If @sender is a well-known name note that @callback is invoked with + * the unique name for the owner of @sender, not the well-known name + * as one would expect. This is because the message bus rewrites the + * name. As such, to avoid certain race conditions, users should be + * tracking the name owner of the well-known name and use that when + * processing the received signal. + * + * If one of %G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE or + * %G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH are given, @arg0 is + * interpreted as part of a namespace or path. The first argument + * of a signal is matched against that part as specified by D-Bus. + * + * If @user_data_free_func is non-%NULL, it will be called (in the + * thread-default main context of the thread you are calling this + * method from) at some point after @user_data is no longer + * needed. (It is not guaranteed to be called synchronously when the + * signal is unsubscribed from, and may be called after @connection + * has been destroyed.) + * + * As @callback is potentially invoked in a different thread from where it’s + * emitted, it’s possible for this to happen after + * g_dbus_connection_signal_unsubscribe() has been called in another thread. + * Due to this, @user_data should have a strong reference which is freed with + * @user_data_free_func, rather than pointing to data whose lifecycle is tied + * to the signal subscription. For example, if a #GObject is used to store the + * subscription ID from g_dbus_connection_signal_subscribe(), a strong reference + * to that #GObject must be passed to @user_data, and g_object_unref() passed to + * @user_data_free_func. You are responsible for breaking the resulting + * reference count cycle by explicitly unsubscribing from the signal when + * dropping the last external reference to the #GObject. Alternatively, a weak + * reference may be used. + * + * It is guaranteed that if you unsubscribe from a signal using + * g_dbus_connection_signal_unsubscribe() from the same thread which made the + * corresponding g_dbus_connection_signal_subscribe() call, @callback will not + * be invoked after g_dbus_connection_signal_unsubscribe() returns. + * + * The returned subscription identifier is an opaque value which is guaranteed + * to never be zero. + * + * This function can never fail. + * + * Returns: a subscription identifier that can be used with g_dbus_connection_signal_unsubscribe() * Since: 2.26 */ /** - * g_dbus_arg_info_ref: - * @info: A #GDBusArgInfo + * g_dbus_connection_signal_unsubscribe: + * @connection: a #GDBusConnection + * @subscription_id: a subscription id obtained from + * g_dbus_connection_signal_subscribe() * - * If @info is statically allocated does nothing. Otherwise increases - * the reference count. + * Unsubscribes from signals. + * + * Note that there may still be D-Bus traffic to process (relating to this + * signal subscription) in the current thread-default #GMainContext after this + * function has returned. You should continue to iterate the #GMainContext + * until the #GDestroyNotify function passed to + * g_dbus_connection_signal_subscribe() is called, in order to avoid memory + * leaks through callbacks queued on the #GMainContext after it’s stopped being + * iterated. * - * Returns: The same @info. * Since: 2.26 */ /** - * g_dbus_arg_info_unref: - * @info: A #GDBusArgInfo. + * g_dbus_connection_start_message_processing: + * @connection: a #GDBusConnection * - * If @info is statically allocated, does nothing. Otherwise decreases - * the reference count of @info. When its reference count drops to 0, - * the memory used is freed. + * If @connection was created with + * %G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING, this method + * starts processing messages. Does nothing on if @connection wasn't + * created with this flag or if the method has already been called. * * Since: 2.26 */ /** - * g_dbus_auth_observer_allow_mechanism: - * @observer: A #GDBusAuthObserver. - * @mechanism: The name of the mechanism, e.g. `DBUS_COOKIE_SHA1`. + * g_dbus_connection_unexport_action_group: + * @connection: a #GDBusConnection + * @export_id: the ID from g_dbus_connection_export_action_group() * - * Emits the #GDBusAuthObserver::allow-mechanism signal on @observer. + * Reverses the effect of a previous call to + * g_dbus_connection_export_action_group(). * - * Returns: %TRUE if @mechanism can be used to authenticate the other peer, %FALSE if not. - * Since: 2.34 + * It is an error to call this function with an ID that wasn't returned + * from g_dbus_connection_export_action_group() or to call it with the + * same ID more than once. + * + * Since: 2.32 */ /** - * g_dbus_auth_observer_authorize_authenticated_peer: - * @observer: A #GDBusAuthObserver. - * @stream: A #GIOStream for the #GDBusConnection. - * @credentials: (nullable): Credentials received from the peer or %NULL. + * g_dbus_connection_unexport_menu_model: + * @connection: a #GDBusConnection + * @export_id: the ID from g_dbus_connection_export_menu_model() * - * Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer. + * Reverses the effect of a previous call to + * g_dbus_connection_export_menu_model(). * - * Returns: %TRUE if the peer is authorized, %FALSE if not. - * Since: 2.26 + * It is an error to call this function with an ID that wasn't returned + * from g_dbus_connection_export_menu_model() or to call it with the + * same ID more than once. + * + * Since: 2.32 */ /** - * g_dbus_auth_observer_new: + * g_dbus_connection_unregister_object: + * @connection: a #GDBusConnection + * @registration_id: a registration id obtained from + * g_dbus_connection_register_object() * - * Creates a new #GDBusAuthObserver object. + * Unregisters an object. * - * Returns: A #GDBusAuthObserver. Free with g_object_unref(). + * Returns: %TRUE if the object was unregistered, %FALSE otherwise * Since: 2.26 */ /** - * g_dbus_connection_add_filter: + * g_dbus_connection_unregister_subtree: * @connection: a #GDBusConnection - * @filter_function: a filter function - * @user_data: user data to pass to @filter_function - * @user_data_free_func: function to free @user_data with when filter - * is removed or %NULL - * - * Adds a message filter. Filters are handlers that are run on all - * incoming and outgoing messages, prior to standard dispatch. Filters - * are run in the order that they were added. The same handler can be - * added as a filter more than once, in which case it will be run more - * than once. Filters added during a filter callback won't be run on - * the message being processed. Filter functions are allowed to modify - * and even drop messages. - * - * Note that filters are run in a dedicated message handling thread so - * they can't block and, generally, can't do anything but signal a - * worker thread. Also note that filters are rarely needed - use API - * such as g_dbus_connection_send_message_with_reply(), - * g_dbus_connection_signal_subscribe() or g_dbus_connection_call() instead. - * - * If a filter consumes an incoming message the message is not - * dispatched anywhere else - not even the standard dispatch machinery - * (that API such as g_dbus_connection_signal_subscribe() and - * g_dbus_connection_send_message_with_reply() relies on) will see the - * message. Similary, if a filter consumes an outgoing message, the - * message will not be sent to the other peer. + * @registration_id: a subtree registration id obtained from + * g_dbus_connection_register_subtree() * - * If @user_data_free_func is non-%NULL, it will be called (in the - * thread-default main context of the thread you are calling this - * method from) at some point after @user_data is no longer - * needed. (It is not guaranteed to be called synchronously when the - * filter is removed, and may be called after @connection has been - * destroyed.) + * Unregisters a subtree. * - * Returns: a filter identifier that can be used with - * g_dbus_connection_remove_filter() + * Returns: %TRUE if the subtree was unregistered, %FALSE otherwise * Since: 2.26 */ /** - * g_dbus_connection_call: - * @connection: a #GDBusConnection - * @bus_name: (nullable): a unique or well-known bus name or %NULL if - * @connection is not a message bus connection - * @object_path: path of remote object - * @interface_name: D-Bus interface to invoke method on - * @method_name: the name of the method to invoke - * @parameters: (nullable): a #GVariant tuple with parameters for the method - * or %NULL if not passing parameters - * @reply_type: (nullable): the expected type of the reply (which will be a - * tuple), or %NULL - * @flags: flags from the #GDBusCallFlags enumeration - * @timeout_msec: the timeout in milliseconds, -1 to use the default - * timeout or %G_MAXINT for no timeout - * @cancellable: (nullable): a #GCancellable or %NULL - * @callback: (nullable): a #GAsyncReadyCallback to call when the request - * is satisfied or %NULL if you don't care about the result of the - * method invocation - * @user_data: the data to pass to @callback + * g_dbus_error_encode_gerror: + * @error: A #GError. * - * Asynchronously invokes the @method_name method on the - * @interface_name D-Bus interface on the remote object at - * @object_path owned by @bus_name. + * Creates a D-Bus error name to use for @error. If @error matches + * a registered error (cf. g_dbus_error_register_error()), the corresponding + * D-Bus error name will be returned. * - * If @connection is closed then the operation will fail with - * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will - * fail with %G_IO_ERROR_CANCELLED. If @parameters contains a value - * not compatible with the D-Bus protocol, the operation fails with - * %G_IO_ERROR_INVALID_ARGUMENT. + * Otherwise the a name of the form + * `org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE` + * will be used. This allows other GDBus applications to map the error + * on the wire back to a #GError using g_dbus_error_new_for_dbus_error(). * - * If @reply_type is non-%NULL then the reply will be checked for having this type and an - * error will be raised if it does not match. Said another way, if you give a @reply_type - * then any non-%NULL return value will be of this type. Unless it’s - * %G_VARIANT_TYPE_UNIT, the @reply_type will be a tuple containing one or more - * values. + * This function is typically only used in object mappings to put a + * #GError on the wire. Regular applications should not use it. * - * If the @parameters #GVariant is floating, it is consumed. This allows - * convenient 'inline' use of g_variant_new(), e.g.: - * |[ - * g_dbus_connection_call (connection, - * "org.freedesktop.StringThings", - * "/org/freedesktop/StringThings", - * "org.freedesktop.StringThings", - * "TwoStrings", - * g_variant_new ("(ss)", - * "Thing One", - * "Thing Two"), - * NULL, - * G_DBUS_CALL_FLAGS_NONE, - * -1, - * NULL, - * (GAsyncReadyCallback) two_strings_done, - * NULL); - * ]| + * Returns: A D-Bus error name (never %NULL). Free with g_free(). + * Since: 2.26 + */ + + +/** + * g_dbus_error_get_remote_error: + * @error: a #GError * - * This is an asynchronous method. When the operation is finished, - * @callback will be invoked in the - * [thread-default main context][g-main-context-push-thread-default] - * of the thread you are calling this method from. You can then call - * g_dbus_connection_call_finish() to get the result of the operation. - * See g_dbus_connection_call_sync() for the synchronous version of this - * function. + * Gets the D-Bus error name used for @error, if any. * - * If @callback is %NULL then the D-Bus method call message will be sent with - * the %G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag set. + * This function is guaranteed to return a D-Bus error name for all + * #GErrors returned from functions handling remote method calls + * (e.g. g_dbus_connection_call_finish()) unless + * g_dbus_error_strip_remote_error() has been used on @error. * + * Returns: an allocated string or %NULL if the D-Bus error name + * could not be found. Free with g_free(). * Since: 2.26 */ /** - * g_dbus_connection_call_finish: - * @connection: a #GDBusConnection - * @res: a #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call() - * @error: return location for error or %NULL + * g_dbus_error_is_remote_error: + * @error: A #GError. * - * Finishes an operation started with g_dbus_connection_call(). + * Checks if @error represents an error received via D-Bus from a remote peer. If so, + * use g_dbus_error_get_remote_error() to get the name of the error. * - * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with - * return values. Free with g_variant_unref(). + * Returns: %TRUE if @error represents an error from a remote peer, + * %FALSE otherwise. * Since: 2.26 */ /** - * g_dbus_connection_call_sync: - * @connection: a #GDBusConnection - * @bus_name: (nullable): a unique or well-known bus name or %NULL if - * @connection is not a message bus connection - * @object_path: path of remote object - * @interface_name: D-Bus interface to invoke method on - * @method_name: the name of the method to invoke - * @parameters: (nullable): a #GVariant tuple with parameters for the method - * or %NULL if not passing parameters - * @reply_type: (nullable): the expected type of the reply, or %NULL - * @flags: flags from the #GDBusCallFlags enumeration - * @timeout_msec: the timeout in milliseconds, -1 to use the default - * timeout or %G_MAXINT for no timeout - * @cancellable: (nullable): a #GCancellable or %NULL - * @error: return location for error or %NULL + * g_dbus_error_new_for_dbus_error: + * @dbus_error_name: D-Bus error name. + * @dbus_error_message: D-Bus error message. * - * Synchronously invokes the @method_name method on the - * @interface_name D-Bus interface on the remote object at - * @object_path owned by @bus_name. + * Creates a #GError based on the contents of @dbus_error_name and + * @dbus_error_message. * - * If @connection is closed then the operation will fail with - * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the - * operation will fail with %G_IO_ERROR_CANCELLED. If @parameters - * contains a value not compatible with the D-Bus protocol, the operation - * fails with %G_IO_ERROR_INVALID_ARGUMENT. + * Errors registered with g_dbus_error_register_error() will be looked + * up using @dbus_error_name and if a match is found, the error domain + * and code is used. Applications can use g_dbus_error_get_remote_error() + * to recover @dbus_error_name. * - * If @reply_type is non-%NULL then the reply will be checked for having - * this type and an error will be raised if it does not match. Said - * another way, if you give a @reply_type then any non-%NULL return - * value will be of this type. + * If a match against a registered error is not found and the D-Bus + * error name is in a form as returned by g_dbus_error_encode_gerror() + * the error domain and code encoded in the name is used to + * create the #GError. Also, @dbus_error_name is added to the error message + * such that it can be recovered with g_dbus_error_get_remote_error(). * - * If the @parameters #GVariant is floating, it is consumed. - * This allows convenient 'inline' use of g_variant_new(), e.g.: - * |[ - * g_dbus_connection_call_sync (connection, - * "org.freedesktop.StringThings", - * "/org/freedesktop/StringThings", - * "org.freedesktop.StringThings", - * "TwoStrings", - * g_variant_new ("(ss)", - * "Thing One", - * "Thing Two"), - * NULL, - * G_DBUS_CALL_FLAGS_NONE, - * -1, - * NULL, - * &error); - * ]| + * Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR + * in the #G_IO_ERROR error domain is returned. Also, @dbus_error_name is + * added to the error message such that it can be recovered with + * g_dbus_error_get_remote_error(). * - * The calling thread is blocked until a reply is received. See - * g_dbus_connection_call() for the asynchronous version of - * this method. + * In all three cases, @dbus_error_name can always be recovered from the + * returned #GError using the g_dbus_error_get_remote_error() function + * (unless g_dbus_error_strip_remote_error() hasn't been used on the returned error). * - * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with - * return values. Free with g_variant_unref(). + * This function is typically only used in object mappings to prepare + * #GError instances for applications. Regular applications should not use + * it. + * + * Returns: An allocated #GError. Free with g_error_free(). * Since: 2.26 */ /** - * g_dbus_connection_call_with_unix_fd_list: - * @connection: a #GDBusConnection - * @bus_name: (nullable): a unique or well-known bus name or %NULL if - * @connection is not a message bus connection - * @object_path: path of remote object - * @interface_name: D-Bus interface to invoke method on - * @method_name: the name of the method to invoke - * @parameters: (nullable): a #GVariant tuple with parameters for the method - * or %NULL if not passing parameters - * @reply_type: (nullable): the expected type of the reply, or %NULL - * @flags: flags from the #GDBusCallFlags enumeration - * @timeout_msec: the timeout in milliseconds, -1 to use the default - * timeout or %G_MAXINT for no timeout - * @fd_list: (nullable): a #GUnixFDList or %NULL - * @cancellable: (nullable): a #GCancellable or %NULL - * @callback: (nullable): a #GAsyncReadyCallback to call when the request is - * satisfied or %NULL if you don't * care about the result of the - * method invocation - * @user_data: The data to pass to @callback. + * g_dbus_error_register_error: + * @error_domain: A #GQuark for an error domain. + * @error_code: An error code. + * @dbus_error_name: A D-Bus error name. * - * Like g_dbus_connection_call() but also takes a #GUnixFDList object. + * Creates an association to map between @dbus_error_name and + * #GErrors specified by @error_domain and @error_code. * - * This method is only available on UNIX. + * This is typically done in the routine that returns the #GQuark for + * an error domain. * - * Since: 2.30 + * Returns: %TRUE if the association was created, %FALSE if it already + * exists. + * Since: 2.26 */ /** - * g_dbus_connection_call_with_unix_fd_list_finish: - * @connection: a #GDBusConnection - * @out_fd_list: (out) (optional): return location for a #GUnixFDList or %NULL - * @res: a #GAsyncResult obtained from the #GAsyncReadyCallback passed to - * g_dbus_connection_call_with_unix_fd_list() - * @error: return location for error or %NULL + * g_dbus_error_register_error_domain: + * @error_domain_quark_name: The error domain name. + * @quark_volatile: A pointer where to store the #GQuark. + * @entries: (array length=num_entries): A pointer to @num_entries #GDBusErrorEntry struct items. + * @num_entries: Number of items to register. * - * Finishes an operation started with g_dbus_connection_call_with_unix_fd_list(). + * Helper function for associating a #GError error domain with D-Bus error names. * - * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with - * return values. Free with g_variant_unref(). - * Since: 2.30 + * Since: 2.26 */ /** - * g_dbus_connection_call_with_unix_fd_list_sync: - * @connection: a #GDBusConnection - * @bus_name: (nullable): a unique or well-known bus name or %NULL - * if @connection is not a message bus connection - * @object_path: path of remote object - * @interface_name: D-Bus interface to invoke method on - * @method_name: the name of the method to invoke - * @parameters: (nullable): a #GVariant tuple with parameters for - * the method or %NULL if not passing parameters - * @reply_type: (nullable): the expected type of the reply, or %NULL - * @flags: flags from the #GDBusCallFlags enumeration - * @timeout_msec: the timeout in milliseconds, -1 to use the default - * timeout or %G_MAXINT for no timeout - * @fd_list: (nullable): a #GUnixFDList or %NULL - * @out_fd_list: (out) (optional): return location for a #GUnixFDList or %NULL - * @cancellable: (nullable): a #GCancellable or %NULL - * @error: return location for error or %NULL - * - * Like g_dbus_connection_call_sync() but also takes and returns #GUnixFDList objects. + * g_dbus_error_set_dbus_error: + * @error: A pointer to a #GError or %NULL. + * @dbus_error_name: D-Bus error name. + * @dbus_error_message: D-Bus error message. + * @format: (nullable): printf()-style format to prepend to @dbus_error_message or %NULL. + * @...: Arguments for @format. * - * This method is only available on UNIX. + * Does nothing if @error is %NULL. Otherwise sets *@error to + * a new #GError created with g_dbus_error_new_for_dbus_error() + * with @dbus_error_message prepend with @format (unless %NULL). * - * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with - * return values. Free with g_variant_unref(). - * Since: 2.30 + * Since: 2.26 */ /** - * g_dbus_connection_close: - * @connection: a #GDBusConnection - * @cancellable: (nullable): a #GCancellable or %NULL - * @callback: (nullable): a #GAsyncReadyCallback to call when the request is - * satisfied or %NULL if you don't care about the result - * @user_data: The data to pass to @callback - * - * Closes @connection. Note that this never causes the process to - * exit (this might only happen if the other end of a shared message - * bus connection disconnects, see #GDBusConnection:exit-on-close). - * - * Once the connection is closed, operations such as sending a message - * will return with the error %G_IO_ERROR_CLOSED. Closing a connection - * will not automatically flush the connection so queued messages may - * be lost. Use g_dbus_connection_flush() if you need such guarantees. - * - * If @connection is already closed, this method fails with - * %G_IO_ERROR_CLOSED. - * - * When @connection has been closed, the #GDBusConnection::closed - * signal is emitted in the - * [thread-default main context][g-main-context-push-thread-default] - * of the thread that @connection was constructed in. + * g_dbus_error_set_dbus_error_valist: + * @error: A pointer to a #GError or %NULL. + * @dbus_error_name: D-Bus error name. + * @dbus_error_message: D-Bus error message. + * @format: (nullable): printf()-style format to prepend to @dbus_error_message or %NULL. + * @var_args: Arguments for @format. * - * This is an asynchronous method. When the operation is finished, - * @callback will be invoked in the - * [thread-default main context][g-main-context-push-thread-default] - * of the thread you are calling this method from. You can - * then call g_dbus_connection_close_finish() to get the result of the - * operation. See g_dbus_connection_close_sync() for the synchronous - * version. + * Like g_dbus_error_set_dbus_error() but intended for language bindings. * * Since: 2.26 */ /** - * g_dbus_connection_close_finish: - * @connection: a #GDBusConnection - * @res: a #GAsyncResult obtained from the #GAsyncReadyCallback passed - * to g_dbus_connection_close() - * @error: return location for error or %NULL + * g_dbus_error_strip_remote_error: + * @error: A #GError. * - * Finishes an operation started with g_dbus_connection_close(). + * Looks for extra information in the error message used to recover + * the D-Bus error name and strips it if found. If stripped, the + * message field in @error will correspond exactly to what was + * received on the wire. * - * Returns: %TRUE if the operation succeeded, %FALSE if @error is set + * This is typically used when presenting errors to the end user. + * + * Returns: %TRUE if information was stripped, %FALSE otherwise. * Since: 2.26 */ /** - * g_dbus_connection_close_sync: - * @connection: a #GDBusConnection - * @cancellable: (nullable): a #GCancellable or %NULL - * @error: return location for error or %NULL + * g_dbus_error_unregister_error: + * @error_domain: A #GQuark for an error domain. + * @error_code: An error code. + * @dbus_error_name: A D-Bus error name. * - * Synchronously closees @connection. The calling thread is blocked - * until this is done. See g_dbus_connection_close() for the - * asynchronous version of this method and more details about what it - * does. + * Destroys an association previously set up with g_dbus_error_register_error(). * - * Returns: %TRUE if the operation succeeded, %FALSE if @error is set + * Returns: %TRUE if the association was destroyed, %FALSE if it wasn't found. * Since: 2.26 */ /** - * g_dbus_connection_emit_signal: - * @connection: a #GDBusConnection - * @destination_bus_name: (nullable): the unique bus name for the destination - * for the signal or %NULL to emit to all listeners - * @object_path: path of remote object - * @interface_name: D-Bus interface to emit a signal on - * @signal_name: the name of the signal to emit - * @parameters: (nullable): a #GVariant tuple with parameters for the signal - * or %NULL if not passing parameters - * @error: Return location for error or %NULL - * - * Emits a signal. + * g_dbus_generate_guid: * - * If the parameters GVariant is floating, it is consumed. + * Generate a D-Bus GUID that can be used with + * e.g. g_dbus_connection_new(). * - * This can only fail if @parameters is not compatible with the D-Bus protocol - * (%G_IO_ERROR_INVALID_ARGUMENT), or if @connection has been closed - * (%G_IO_ERROR_CLOSED). + * See the D-Bus specification regarding what strings are valid D-Bus + * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant). * - * Returns: %TRUE unless @error is set + * Returns: A valid D-Bus GUID. Free with g_free(). * Since: 2.26 */ /** - * g_dbus_connection_export_action_group: - * @connection: a #GDBusConnection - * @object_path: a D-Bus object path - * @action_group: a #GActionGroup - * @error: a pointer to a %NULL #GError, or %NULL + * g_dbus_gvalue_to_gvariant: + * @gvalue: A #GValue to convert to a #GVariant + * @type: A #GVariantType * - * Exports @action_group on @connection at @object_path. + * Converts a #GValue to a #GVariant of the type indicated by the @type + * parameter. * - * The implemented D-Bus API should be considered private. It is - * subject to change in the future. + * The conversion is using the following rules: * - * A given object path can only have one action group exported on it. - * If this constraint is violated, the export will fail and 0 will be - * returned (with @error set accordingly). + * - #G_TYPE_STRING: 's', 'o', 'g' or 'ay' + * - #G_TYPE_STRV: 'as', 'ao' or 'aay' + * - #G_TYPE_BOOLEAN: 'b' + * - #G_TYPE_UCHAR: 'y' + * - #G_TYPE_INT: 'i', 'n' + * - #G_TYPE_UINT: 'u', 'q' + * - #G_TYPE_INT64 'x' + * - #G_TYPE_UINT64: 't' + * - #G_TYPE_DOUBLE: 'd' + * - #G_TYPE_VARIANT: Any #GVariantType * - * You can unexport the action group using - * g_dbus_connection_unexport_action_group() with the return value of - * this function. + * This can fail if e.g. @gvalue is of type #G_TYPE_STRING and @type + * is ['i'][G-VARIANT-TYPE-INT32:CAPS]. It will also fail for any #GType + * (including e.g. #G_TYPE_OBJECT and #G_TYPE_BOXED derived-types) not + * in the table above. * - * The thread default main context is taken at the time of this call. - * All incoming action activations and state change requests are - * reported from this context. Any changes on the action group that - * cause it to emit signals must also come from this same context. - * Since incoming action activations and state change requests are - * rather likely to cause changes on the action group, this effectively - * limits a given action group to being exported from only one main - * context. + * Note that if @gvalue is of type #G_TYPE_VARIANT and its value is + * %NULL, the empty #GVariant instance (never %NULL) for @type is + * returned (e.g. 0 for scalar types, the empty string for string types, + * '/' for object path types, the empty array for any array type and so on). * - * Returns: the ID of the export (never zero), or 0 in case of failure - * Since: 2.32 + * See the g_dbus_gvariant_to_gvalue() function for how to convert a + * #GVariant to a #GValue. + * + * Returns: A #GVariant (never floating) of #GVariantType @type holding + * the data from @gvalue or %NULL in case of failure. Free with + * g_variant_unref(). + * Since: 2.30 */ /** - * g_dbus_connection_export_menu_model: - * @connection: a #GDBusConnection - * @object_path: a D-Bus object path - * @menu: a #GMenuModel - * @error: return location for an error, or %NULL + * g_dbus_gvariant_to_gvalue: + * @value: A #GVariant. + * @out_gvalue: (out): Return location pointing to a zero-filled (uninitialized) #GValue. * - * Exports @menu on @connection at @object_path. + * Converts a #GVariant to a #GValue. If @value is floating, it is consumed. * - * The implemented D-Bus API should be considered private. - * It is subject to change in the future. + * The rules specified in the g_dbus_gvalue_to_gvariant() function are + * used - this function is essentially its reverse form. So, a #GVariant + * containing any basic or string array type will be converted to a #GValue + * containing a basic value or string array. Any other #GVariant (handle, + * variant, tuple, dict entry) will be converted to a #GValue containing that + * #GVariant. * - * An object path can only have one menu model exported on it. If this - * constraint is violated, the export will fail and 0 will be - * returned (with @error set accordingly). + * The conversion never fails - a valid #GValue is always returned in + * @out_gvalue. * - * You can unexport the menu model using - * g_dbus_connection_unexport_menu_model() with the return value of - * this function. + * Since: 2.30 + */ + + +/** + * g_dbus_interface_dup_object: (rename-to g_dbus_interface_get_object) + * @interface_: An exported D-Bus interface. * - * Returns: the ID of the export (never zero), or 0 in case of failure + * Gets the #GDBusObject that @interface_ belongs to, if any. + * + * Returns: (transfer full): A #GDBusObject or %NULL. The returned + * reference should be freed with g_object_unref(). * Since: 2.32 */ /** - * g_dbus_connection_flush: - * @connection: a #GDBusConnection - * @cancellable: (nullable): a #GCancellable or %NULL - * @callback: (nullable): a #GAsyncReadyCallback to call when the - * request is satisfied or %NULL if you don't care about the result - * @user_data: The data to pass to @callback + * g_dbus_interface_get_info: + * @interface_: An exported D-Bus interface. * - * Asynchronously flushes @connection, that is, writes all queued - * outgoing message to the transport and then flushes the transport - * (using g_output_stream_flush_async()). This is useful in programs - * that wants to emit a D-Bus signal and then exit immediately. Without - * flushing the connection, there is no guaranteed that the message has - * been sent to the networking buffers in the OS kernel. - * - * This is an asynchronous method. When the operation is finished, - * @callback will be invoked in the - * [thread-default main context][g-main-context-push-thread-default] - * of the thread you are calling this method from. You can - * then call g_dbus_connection_flush_finish() to get the result of the - * operation. See g_dbus_connection_flush_sync() for the synchronous - * version. + * Gets D-Bus introspection information for the D-Bus interface + * implemented by @interface_. * - * Since: 2.26 + * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. + * Since: 2.30 */ /** - * g_dbus_connection_flush_finish: - * @connection: a #GDBusConnection - * @res: a #GAsyncResult obtained from the #GAsyncReadyCallback passed - * to g_dbus_connection_flush() - * @error: return location for error or %NULL + * g_dbus_interface_get_object: (skip) + * @interface_: An exported D-Bus interface * - * Finishes an operation started with g_dbus_connection_flush(). + * Gets the #GDBusObject that @interface_ belongs to, if any. * - * Returns: %TRUE if the operation succeeded, %FALSE if @error is set - * Since: 2.26 + * It is not safe to use the returned object if @interface_ or + * the returned object is being used from other threads. See + * g_dbus_interface_dup_object() for a thread-safe alternative. + * + * Returns: (transfer none): A #GDBusObject or %NULL. The returned + * reference belongs to @interface_ and should not be freed. + * Since: 2.30 */ /** - * g_dbus_connection_flush_sync: - * @connection: a #GDBusConnection - * @cancellable: (nullable): a #GCancellable or %NULL - * @error: return location for error or %NULL + * g_dbus_interface_info_cache_build: + * @info: A #GDBusInterfaceInfo. * - * Synchronously flushes @connection. The calling thread is blocked - * until this is done. See g_dbus_connection_flush() for the - * asynchronous version of this method and more details about what it - * does. + * Builds a lookup-cache to speed up + * g_dbus_interface_info_lookup_method(), + * g_dbus_interface_info_lookup_signal() and + * g_dbus_interface_info_lookup_property(). * - * Returns: %TRUE if the operation succeeded, %FALSE if @error is set - * Since: 2.26 + * If this has already been called with @info, the existing cache is + * used and its use count is increased. + * + * Note that @info cannot be modified until + * g_dbus_interface_info_cache_release() is called. + * + * Since: 2.30 */ /** - * g_dbus_connection_get_capabilities: - * @connection: a #GDBusConnection + * g_dbus_interface_info_cache_release: + * @info: A GDBusInterfaceInfo * - * Gets the capabilities negotiated with the remote peer + * Decrements the usage count for the cache for @info built by + * g_dbus_interface_info_cache_build() (if any) and frees the + * resources used by the cache if the usage count drops to zero. * - * Returns: zero or more flags from the #GDBusCapabilityFlags enumeration - * Since: 2.26 + * Since: 2.30 */ /** - * g_dbus_connection_get_exit_on_close: - * @connection: a #GDBusConnection + * g_dbus_interface_info_generate_xml: + * @info: A #GDBusNodeInfo + * @indent: Indentation level. + * @string_builder: A #GString to to append XML data to. * - * Gets whether the process is terminated when @connection is - * closed by the remote peer. See - * #GDBusConnection:exit-on-close for more details. + * Appends an XML representation of @info (and its children) to @string_builder. + * + * This function is typically used for generating introspection XML + * documents at run-time for handling the + * `org.freedesktop.DBus.Introspectable.Introspect` + * method. * - * Returns: whether the process is terminated when @connection is - * closed by the remote peer * Since: 2.26 */ /** - * g_dbus_connection_get_guid: - * @connection: a #GDBusConnection + * g_dbus_interface_info_lookup_method: + * @info: A #GDBusInterfaceInfo. + * @name: A D-Bus method name (typically in CamelCase) * - * The GUID of the peer performing the role of server when - * authenticating. See #GDBusConnection:guid for more details. + * Looks up information about a method. * - * Returns: The GUID. Do not free this string, it is owned by - * @connection. + * The cost of this function is O(n) in number of methods unless + * g_dbus_interface_info_cache_build() has been used on @info. + * + * Returns: (transfer none): A #GDBusMethodInfo or %NULL if not found. Do not free, it is owned by @info. * Since: 2.26 */ /** - * g_dbus_connection_get_last_serial: - * @connection: a #GDBusConnection + * g_dbus_interface_info_lookup_property: + * @info: A #GDBusInterfaceInfo. + * @name: A D-Bus property name (typically in CamelCase). * - * Retrieves the last serial number assigned to a #GDBusMessage on - * the current thread. This includes messages sent via both low-level - * API such as g_dbus_connection_send_message() as well as - * high-level API such as g_dbus_connection_emit_signal(), - * g_dbus_connection_call() or g_dbus_proxy_call(). + * Looks up information about a property. * - * Returns: the last used serial or zero when no message has been sent - * within the current thread - * Since: 2.34 + * The cost of this function is O(n) in number of properties unless + * g_dbus_interface_info_cache_build() has been used on @info. + * + * Returns: (transfer none): A #GDBusPropertyInfo or %NULL if not found. Do not free, it is owned by @info. + * Since: 2.26 */ /** - * g_dbus_connection_get_peer_credentials: - * @connection: a #GDBusConnection + * g_dbus_interface_info_lookup_signal: + * @info: A #GDBusInterfaceInfo. + * @name: A D-Bus signal name (typically in CamelCase) * - * Gets the credentials of the authenticated peer. This will always - * return %NULL unless @connection acted as a server - * (e.g. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER was passed) - * when set up and the client passed credentials as part of the - * authentication process. + * Looks up information about a signal. * - * In a message bus setup, the message bus is always the server and - * each application is a client. So this method will always return - * %NULL for message bus clients. + * The cost of this function is O(n) in number of signals unless + * g_dbus_interface_info_cache_build() has been used on @info. * - * Returns: (transfer none) (nullable): a #GCredentials or %NULL if not - * available. Do not free this object, it is owned by @connection. + * Returns: (transfer none): A #GDBusSignalInfo or %NULL if not found. Do not free, it is owned by @info. * Since: 2.26 */ /** - * g_dbus_connection_get_stream: - * @connection: a #GDBusConnection - * - * Gets the underlying stream used for IO. + * g_dbus_interface_info_ref: + * @info: A #GDBusInterfaceInfo * - * While the #GDBusConnection is active, it will interact with this - * stream from a worker thread, so it is not safe to interact with - * the stream directly. + * If @info is statically allocated does nothing. Otherwise increases + * the reference count. * - * Returns: (transfer none): the stream used for IO + * Returns: The same @info. * Since: 2.26 */ /** - * g_dbus_connection_get_unique_name: - * @connection: a #GDBusConnection + * g_dbus_interface_info_unref: + * @info: A #GDBusInterfaceInfo. * - * Gets the unique name of @connection as assigned by the message - * bus. This can also be used to figure out if @connection is a - * message bus connection. + * If @info is statically allocated, does nothing. Otherwise decreases + * the reference count of @info. When its reference count drops to 0, + * the memory used is freed. * - * Returns: the unique name or %NULL if @connection is not a message - * bus connection. Do not free this string, it is owned by - * @connection. * Since: 2.26 */ /** - * g_dbus_connection_is_closed: - * @connection: a #GDBusConnection + * g_dbus_interface_set_object: + * @interface_: An exported D-Bus interface. + * @object: (nullable): A #GDBusObject or %NULL. * - * Gets whether @connection is closed. + * Sets the #GDBusObject for @interface_ to @object. * - * Returns: %TRUE if the connection is closed, %FALSE otherwise - * Since: 2.26 + * Note that @interface_ will hold a weak reference to @object. + * + * Since: 2.30 */ /** - * g_dbus_connection_new: - * @stream: a #GIOStream - * @guid: (nullable): the GUID to use if a authenticating as a server or %NULL - * @flags: flags describing how to make the connection - * @observer: (nullable): a #GDBusAuthObserver or %NULL - * @cancellable: (nullable): a #GCancellable or %NULL - * @callback: a #GAsyncReadyCallback to call when the request is satisfied - * @user_data: the data to pass to @callback + * g_dbus_interface_skeleton_export: + * @interface_: The D-Bus interface to export. + * @connection: A #GDBusConnection to export @interface_ on. + * @object_path: The path to export the interface at. + * @error: Return location for error or %NULL. * - * Asynchronously sets up a D-Bus connection for exchanging D-Bus messages - * with the end represented by @stream. + * Exports @interface_ at @object_path on @connection. * - * If @stream is a #GSocketConnection, then the corresponding #GSocket - * will be put into non-blocking mode. + * This can be called multiple times to export the same @interface_ + * onto multiple connections however the @object_path provided must be + * the same for all connections. * - * The D-Bus connection will interact with @stream from a worker thread. - * As a result, the caller should not interact with @stream after this - * method has been called, except by calling g_object_unref() on it. + * Use g_dbus_interface_skeleton_unexport() to unexport the object. * - * If @observer is not %NULL it may be used to control the - * authentication process. + * Returns: %TRUE if the interface was exported on @connection, otherwise %FALSE with + * @error set. + * Since: 2.30 + */ + + +/** + * g_dbus_interface_skeleton_flush: + * @interface_: A #GDBusInterfaceSkeleton. * - * When the operation is finished, @callback will be invoked. You can - * then call g_dbus_connection_new_finish() to get the result of the - * operation. + * If @interface_ has outstanding changes, request for these changes to be + * emitted immediately. * - * This is a asynchronous failable constructor. See - * g_dbus_connection_new_sync() for the synchronous - * version. + * For example, an exported D-Bus interface may queue up property + * changes and emit the + * `org.freedesktop.DBus.Properties.PropertiesChanged` + * signal later (e.g. in an idle handler). This technique is useful + * for collapsing multiple property changes into one. * - * Since: 2.26 + * Since: 2.30 */ /** - * g_dbus_connection_new_finish: - * @res: a #GAsyncResult obtained from the #GAsyncReadyCallback - * passed to g_dbus_connection_new(). - * @error: return location for error or %NULL + * g_dbus_interface_skeleton_get_connection: + * @interface_: A #GDBusInterfaceSkeleton. * - * Finishes an operation started with g_dbus_connection_new(). + * Gets the first connection that @interface_ is exported on, if any. * - * Returns: a #GDBusConnection or %NULL if @error is set. Free - * with g_object_unref(). - * Since: 2.26 + * Returns: (transfer none): A #GDBusConnection or %NULL if @interface_ is + * not exported anywhere. Do not free, the object belongs to @interface_. + * Since: 2.30 */ /** - * g_dbus_connection_new_for_address: - * @address: a D-Bus address - * @flags: flags describing how to make the connection - * @observer: (nullable): a #GDBusAuthObserver or %NULL - * @cancellable: (nullable): a #GCancellable or %NULL - * @callback: a #GAsyncReadyCallback to call when the request is satisfied - * @user_data: the data to pass to @callback + * g_dbus_interface_skeleton_get_connections: + * @interface_: A #GDBusInterfaceSkeleton. * - * Asynchronously connects and sets up a D-Bus client connection for - * exchanging D-Bus messages with an endpoint specified by @address - * which must be in the - * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). + * Gets a list of the connections that @interface_ is exported on. * - * This constructor can only be used to initiate client-side - * connections - use g_dbus_connection_new() if you need to act as the - * server. In particular, @flags cannot contain the - * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or - * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags. + * Returns: (element-type GDBusConnection) (transfer full): A list of + * all the connections that @interface_ is exported on. The returned + * list should be freed with g_list_free() after each element has + * been freed with g_object_unref(). + * Since: 2.32 + */ + + +/** + * g_dbus_interface_skeleton_get_flags: + * @interface_: A #GDBusInterfaceSkeleton. * - * When the operation is finished, @callback will be invoked. You can - * then call g_dbus_connection_new_finish() to get the result of the - * operation. + * Gets the #GDBusInterfaceSkeletonFlags that describes what the behavior + * of @interface_ * - * If @observer is not %NULL it may be used to control the - * authentication process. + * Returns: One or more flags from the #GDBusInterfaceSkeletonFlags enumeration. + * Since: 2.30 + */ + + +/** + * g_dbus_interface_skeleton_get_info: + * @interface_: A #GDBusInterfaceSkeleton. * - * This is a asynchronous failable constructor. See - * g_dbus_connection_new_for_address_sync() for the synchronous - * version. + * Gets D-Bus introspection information for the D-Bus interface + * implemented by @interface_. * - * Since: 2.26 + * Returns: (transfer none): A #GDBusInterfaceInfo (never %NULL). Do not free. + * Since: 2.30 */ /** - * g_dbus_connection_new_for_address_finish: - * @res: a #GAsyncResult obtained from the #GAsyncReadyCallback passed - * to g_dbus_connection_new() - * @error: return location for error or %NULL + * g_dbus_interface_skeleton_get_object_path: + * @interface_: A #GDBusInterfaceSkeleton. * - * Finishes an operation started with g_dbus_connection_new_for_address(). + * Gets the object path that @interface_ is exported on, if any. * - * Returns: a #GDBusConnection or %NULL if @error is set. Free with - * g_object_unref(). - * Since: 2.26 + * Returns: A string owned by @interface_ or %NULL if @interface_ is not exported + * anywhere. Do not free, the string belongs to @interface_. + * Since: 2.30 */ /** - * g_dbus_connection_new_for_address_sync: - * @address: a D-Bus address - * @flags: flags describing how to make the connection - * @observer: (nullable): a #GDBusAuthObserver or %NULL - * @cancellable: (nullable): a #GCancellable or %NULL - * @error: return location for error or %NULL - * - * Synchronously connects and sets up a D-Bus client connection for - * exchanging D-Bus messages with an endpoint specified by @address - * which must be in the - * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). + * g_dbus_interface_skeleton_get_properties: + * @interface_: A #GDBusInterfaceSkeleton. * - * This constructor can only be used to initiate client-side - * connections - use g_dbus_connection_new_sync() if you need to act - * as the server. In particular, @flags cannot contain the - * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or - * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags. + * Gets all D-Bus properties for @interface_. * - * This is a synchronous failable constructor. See - * g_dbus_connection_new_for_address() for the asynchronous version. + * Returns: (transfer full): A #GVariant of type + * ['a{sv}'][G-VARIANT-TYPE-VARDICT:CAPS]. + * Free with g_variant_unref(). + * Since: 2.30 + */ + + +/** + * g_dbus_interface_skeleton_get_vtable: (skip) + * @interface_: A #GDBusInterfaceSkeleton. * - * If @observer is not %NULL it may be used to control the - * authentication process. + * Gets the interface vtable for the D-Bus interface implemented by + * @interface_. The returned function pointers should expect @interface_ + * itself to be passed as @user_data. * - * Returns: a #GDBusConnection or %NULL if @error is set. Free with - * g_object_unref(). - * Since: 2.26 + * Returns: A #GDBusInterfaceVTable (never %NULL). + * Since: 2.30 */ /** - * g_dbus_connection_new_sync: - * @stream: a #GIOStream - * @guid: (nullable): the GUID to use if a authenticating as a server or %NULL - * @flags: flags describing how to make the connection - * @observer: (nullable): a #GDBusAuthObserver or %NULL - * @cancellable: (nullable): a #GCancellable or %NULL - * @error: return location for error or %NULL + * g_dbus_interface_skeleton_has_connection: + * @interface_: A #GDBusInterfaceSkeleton. + * @connection: A #GDBusConnection. * - * Synchronously sets up a D-Bus connection for exchanging D-Bus messages - * with the end represented by @stream. + * Checks if @interface_ is exported on @connection. * - * If @stream is a #GSocketConnection, then the corresponding #GSocket - * will be put into non-blocking mode. + * Returns: %TRUE if @interface_ is exported on @connection, %FALSE otherwise. + * Since: 2.32 + */ + + +/** + * g_dbus_interface_skeleton_set_flags: + * @interface_: A #GDBusInterfaceSkeleton. + * @flags: Flags from the #GDBusInterfaceSkeletonFlags enumeration. * - * The D-Bus connection will interact with @stream from a worker thread. - * As a result, the caller should not interact with @stream after this - * method has been called, except by calling g_object_unref() on it. + * Sets flags describing what the behavior of @skeleton should be. * - * If @observer is not %NULL it may be used to control the - * authentication process. + * Since: 2.30 + */ + + +/** + * g_dbus_interface_skeleton_unexport: + * @interface_: A #GDBusInterfaceSkeleton. * - * This is a synchronous failable constructor. See - * g_dbus_connection_new() for the asynchronous version. + * Stops exporting @interface_ on all connections it is exported on. * - * Returns: a #GDBusConnection or %NULL if @error is set. Free with g_object_unref(). - * Since: 2.26 + * To unexport @interface_ from only a single connection, use + * g_dbus_interface_skeleton_unexport_from_connection() + * + * Since: 2.30 */ /** - * g_dbus_connection_register_object: - * @connection: a #GDBusConnection - * @object_path: the object path to register at - * @interface_info: introspection data for the interface - * @vtable: (nullable): a #GDBusInterfaceVTable to call into or %NULL - * @user_data: (nullable): data to pass to functions in @vtable - * @user_data_free_func: function to call when the object path is unregistered - * @error: return location for error or %NULL - * - * Registers callbacks for exported objects at @object_path with the - * D-Bus interface that is described in @interface_info. + * g_dbus_interface_skeleton_unexport_from_connection: + * @interface_: A #GDBusInterfaceSkeleton. + * @connection: A #GDBusConnection. * - * Calls to functions in @vtable (and @user_data_free_func) will happen - * in the - * [thread-default main context][g-main-context-push-thread-default] - * of the thread you are calling this method from. + * Stops exporting @interface_ on @connection. * - * Note that all #GVariant values passed to functions in @vtable will match - * the signature given in @interface_info - if a remote caller passes - * incorrect values, the `org.freedesktop.DBus.Error.InvalidArgs` - * is returned to the remote caller. + * To stop exporting on all connections the interface is exported on, + * use g_dbus_interface_skeleton_unexport(). * - * Additionally, if the remote caller attempts to invoke methods or - * access properties not mentioned in @interface_info the - * `org.freedesktop.DBus.Error.UnknownMethod` resp. - * `org.freedesktop.DBus.Error.InvalidArgs` errors - * are returned to the caller. + * Since: 2.32 + */ + + +/** + * g_dbus_is_address: + * @string: A string. * - * It is considered a programming error if the - * #GDBusInterfaceGetPropertyFunc function in @vtable returns a - * #GVariant of incorrect type. + * Checks if @string is a + * [D-Bus address](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). * - * If an existing callback is already registered at @object_path and - * @interface_name, then @error is set to #G_IO_ERROR_EXISTS. + * This doesn't check if @string is actually supported by #GDBusServer + * or #GDBusConnection - use g_dbus_is_supported_address() to do more + * checks. * - * GDBus automatically implements the standard D-Bus interfaces - * org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable - * and org.freedesktop.Peer, so you don't have to implement those for the - * objects you export. You can implement org.freedesktop.DBus.Properties - * yourself, e.g. to handle getting and setting of properties asynchronously. + * Returns: %TRUE if @string is a valid D-Bus address, %FALSE otherwise. + * Since: 2.26 + */ + + +/** + * g_dbus_is_guid: + * @string: The string to check. * - * Note that the reference count on @interface_info will be - * incremented by 1 (unless allocated statically, e.g. if the - * reference count is -1, see g_dbus_interface_info_ref()) for as long - * as the object is exported. Also note that @vtable will be copied. + * Checks if @string is a D-Bus GUID. * - * See this [server][gdbus-server] for an example of how to use this method. + * See the D-Bus specification regarding what strings are valid D-Bus + * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant). * - * Returns: 0 if @error is set, otherwise a registration id (never 0) - * that can be used with g_dbus_connection_unregister_object() + * Returns: %TRUE if @string is a guid, %FALSE otherwise. * Since: 2.26 */ /** - * g_dbus_connection_register_object_with_closures: (rename-to g_dbus_connection_register_object) - * @connection: A #GDBusConnection. - * @object_path: The object path to register at. - * @interface_info: Introspection data for the interface. - * @method_call_closure: (nullable): #GClosure for handling incoming method calls. - * @get_property_closure: (nullable): #GClosure for getting a property. - * @set_property_closure: (nullable): #GClosure for setting a property. - * @error: Return location for error or %NULL. + * g_dbus_is_interface_name: + * @string: The string to check. * - * Version of g_dbus_connection_register_object() using closures instead of a - * #GDBusInterfaceVTable for easier binding in other languages. + * Checks if @string is a valid D-Bus interface name. * - * Returns: 0 if @error is set, otherwise a registration id (never 0) - * that can be used with g_dbus_connection_unregister_object() . - * Since: 2.46 + * Returns: %TRUE if valid, %FALSE otherwise. + * Since: 2.26 */ /** - * g_dbus_connection_register_subtree: - * @connection: a #GDBusConnection - * @object_path: the object path to register the subtree at - * @vtable: a #GDBusSubtreeVTable to enumerate, introspect and - * dispatch nodes in the subtree - * @flags: flags used to fine tune the behavior of the subtree - * @user_data: data to pass to functions in @vtable - * @user_data_free_func: function to call when the subtree is unregistered - * @error: return location for error or %NULL + * g_dbus_is_member_name: + * @string: The string to check. * - * Registers a whole subtree of dynamic objects. + * Checks if @string is a valid D-Bus member (e.g. signal or method) name. * - * The @enumerate and @introspection functions in @vtable are used to - * convey, to remote callers, what nodes exist in the subtree rooted - * by @object_path. + * Returns: %TRUE if valid, %FALSE otherwise. + * Since: 2.26 + */ + + +/** + * g_dbus_is_name: + * @string: The string to check. * - * When handling remote calls into any node in the subtree, first the - * @enumerate function is used to check if the node exists. If the node exists - * or the #G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set - * the @introspection function is used to check if the node supports the - * requested method. If so, the @dispatch function is used to determine - * where to dispatch the call. The collected #GDBusInterfaceVTable and - * #gpointer will be used to call into the interface vtable for processing - * the request. + * Checks if @string is a valid D-Bus bus name (either unique or well-known). * - * All calls into user-provided code will be invoked in the - * [thread-default main context][g-main-context-push-thread-default] - * of the thread you are calling this method from. - * - * If an existing subtree is already registered at @object_path or - * then @error is set to #G_IO_ERROR_EXISTS. - * - * Note that it is valid to register regular objects (using - * g_dbus_connection_register_object()) in a subtree registered with - * g_dbus_connection_register_subtree() - if so, the subtree handler - * is tried as the last resort. One way to think about a subtree - * handler is to consider it a fallback handler for object paths not - * registered via g_dbus_connection_register_object() or other bindings. - * - * Note that @vtable will be copied so you cannot change it after - * registration. - * - * See this [server][gdbus-subtree-server] for an example of how to use - * this method. - * - * Returns: 0 if @error is set, otherwise a subtree registration id (never 0) - * that can be used with g_dbus_connection_unregister_subtree() . + * Returns: %TRUE if valid, %FALSE otherwise. * Since: 2.26 */ /** - * g_dbus_connection_remove_filter: - * @connection: a #GDBusConnection - * @filter_id: an identifier obtained from g_dbus_connection_add_filter() - * - * Removes a filter. + * g_dbus_is_supported_address: + * @string: A string. + * @error: Return location for error or %NULL. * - * Note that since filters run in a different thread, there is a race - * condition where it is possible that the filter will be running even - * after calling g_dbus_connection_remove_filter(), so you cannot just - * free data that the filter might be using. Instead, you should pass - * a #GDestroyNotify to g_dbus_connection_add_filter(), which will be - * called when it is guaranteed that the data is no longer needed. + * Like g_dbus_is_address() but also checks if the library supports the + * transports in @string and that key/value pairs for each transport + * are valid. See the specification of the + * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). * + * Returns: %TRUE if @string is a valid D-Bus address that is + * supported by this library, %FALSE if @error is set. * Since: 2.26 */ /** - * g_dbus_connection_send_message: - * @connection: a #GDBusConnection - * @message: a #GDBusMessage - * @flags: flags affecting how the message is sent - * @out_serial: (out) (optional): return location for serial number assigned - * to @message when sending it or %NULL - * @error: Return location for error or %NULL - * - * Asynchronously sends @message to the peer represented by @connection. - * - * Unless @flags contain the - * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number - * will be assigned by @connection and set on @message via - * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the - * serial number used will be written to this location prior to - * submitting the message to the underlying transport. - * - * If @connection is closed then the operation will fail with - * %G_IO_ERROR_CLOSED. If @message is not well-formed, - * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT. - * - * See this [server][gdbus-server] and [client][gdbus-unix-fd-client] - * for an example of how to use this low-level API to send and receive - * UNIX file descriptors. + * g_dbus_is_unique_name: + * @string: The string to check. * - * Note that @message must be unlocked, unless @flags contain the - * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag. + * Checks if @string is a valid D-Bus unique bus name. * - * Returns: %TRUE if the message was well-formed and queued for - * transmission, %FALSE if @error is set + * Returns: %TRUE if valid, %FALSE otherwise. * Since: 2.26 */ /** - * g_dbus_connection_send_message_with_reply: + * g_dbus_menu_model_get: * @connection: a #GDBusConnection - * @message: a #GDBusMessage - * @flags: flags affecting how the message is sent - * @timeout_msec: the timeout in milliseconds, -1 to use the default - * timeout or %G_MAXINT for no timeout - * @out_serial: (out) (optional): return location for serial number assigned - * to @message when sending it or %NULL - * @cancellable: (nullable): a #GCancellable or %NULL - * @callback: (nullable): a #GAsyncReadyCallback to call when the request - * is satisfied or %NULL if you don't care about the result - * @user_data: The data to pass to @callback - * - * Asynchronously sends @message to the peer represented by @connection. - * - * Unless @flags contain the - * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number - * will be assigned by @connection and set on @message via - * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the - * serial number used will be written to this location prior to - * submitting the message to the underlying transport. + * @bus_name: (nullable): the bus name which exports the menu model + * or %NULL if @connection is not a message bus connection + * @object_path: the object path at which the menu model is exported * - * If @connection is closed then the operation will fail with - * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will - * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed, - * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT. + * Obtains a #GDBusMenuModel for the menu model which is exported + * at the given @bus_name and @object_path. * - * This is an asynchronous method. When the operation is finished, @callback - * will be invoked in the - * [thread-default main context][g-main-context-push-thread-default] - * of the thread you are calling this method from. You can then call - * g_dbus_connection_send_message_with_reply_finish() to get the result of the operation. - * See g_dbus_connection_send_message_with_reply_sync() for the synchronous version. + * The thread default main context is taken at the time of this call. + * All signals on the menu model (and any linked models) are reported + * with respect to this context. All calls on the returned menu model + * (and linked models) must also originate from this same context, with + * the thread default main context unchanged. * - * Note that @message must be unlocked, unless @flags contain the - * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag. + * Returns: (transfer full): a #GDBusMenuModel object. Free with + * g_object_unref(). + * Since: 2.32 + */ + + +/** + * g_dbus_message_bytes_needed: + * @blob: (array length=blob_len) (element-type guint8): A blob representing a binary D-Bus message. + * @blob_len: The length of @blob (must be at least 16). + * @error: Return location for error or %NULL. * - * See this [server][gdbus-server] and [client][gdbus-unix-fd-client] - * for an example of how to use this low-level API to send and receive - * UNIX file descriptors. + * Utility function to calculate how many bytes are needed to + * completely deserialize the D-Bus message stored at @blob. * + * Returns: Number of bytes needed or -1 if @error is set (e.g. if + * @blob contains invalid data or not enough data is available to + * determine the size). * Since: 2.26 */ /** - * g_dbus_connection_send_message_with_reply_finish: - * @connection: a #GDBusConnection - * @res: a #GAsyncResult obtained from the #GAsyncReadyCallback passed to - * g_dbus_connection_send_message_with_reply() - * @error: teturn location for error or %NULL - * - * Finishes an operation started with g_dbus_connection_send_message_with_reply(). + * g_dbus_message_copy: + * @message: A #GDBusMessage. + * @error: Return location for error or %NULL. * - * Note that @error is only set if a local in-process error - * occurred. That is to say that the returned #GDBusMessage object may - * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use - * g_dbus_message_to_gerror() to transcode this to a #GError. + * Copies @message. The copy is a deep copy and the returned + * #GDBusMessage is completely identical except that it is guaranteed + * to not be locked. * - * See this [server][gdbus-server] and [client][gdbus-unix-fd-client] - * for an example of how to use this low-level API to send and receive - * UNIX file descriptors. + * This operation can fail if e.g. @message contains file descriptors + * and the per-process or system-wide open files limit is reached. * - * Returns: (transfer full): a locked #GDBusMessage or %NULL if @error is set + * Returns: (transfer full): A new #GDBusMessage or %NULL if @error is set. + * Free with g_object_unref(). * Since: 2.26 */ /** - * g_dbus_connection_send_message_with_reply_sync: - * @connection: a #GDBusConnection - * @message: a #GDBusMessage - * @flags: flags affecting how the message is sent. - * @timeout_msec: the timeout in milliseconds, -1 to use the default - * timeout or %G_MAXINT for no timeout - * @out_serial: (out) (optional): return location for serial number - * assigned to @message when sending it or %NULL - * @cancellable: (nullable): a #GCancellable or %NULL - * @error: return location for error or %NULL - * - * Synchronously sends @message to the peer represented by @connection - * and blocks the calling thread until a reply is received or the - * timeout is reached. See g_dbus_connection_send_message_with_reply() - * for the asynchronous version of this method. - * - * Unless @flags contain the - * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number - * will be assigned by @connection and set on @message via - * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the - * serial number used will be written to this location prior to - * submitting the message to the underlying transport. - * - * If @connection is closed then the operation will fail with - * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will - * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed, - * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT. - * - * Note that @error is only set if a local in-process error - * occurred. That is to say that the returned #GDBusMessage object may - * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use - * g_dbus_message_to_gerror() to transcode this to a #GError. - * - * See this [server][gdbus-server] and [client][gdbus-unix-fd-client] - * for an example of how to use this low-level API to send and receive - * UNIX file descriptors. + * g_dbus_message_get_arg0: + * @message: A #GDBusMessage. * - * Note that @message must be unlocked, unless @flags contain the - * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag. + * Convenience to get the first item in the body of @message. * - * Returns: (transfer full): a locked #GDBusMessage that is the reply - * to @message or %NULL if @error is set + * Returns: The string item or %NULL if the first item in the body of + * @message is not a string. * Since: 2.26 */ /** - * g_dbus_connection_set_exit_on_close: - * @connection: a #GDBusConnection - * @exit_on_close: whether the process should be terminated - * when @connection is closed by the remote peer - * - * Sets whether the process should be terminated when @connection is - * closed by the remote peer. See #GDBusConnection:exit-on-close for - * more details. + * g_dbus_message_get_body: + * @message: A #GDBusMessage. * - * Note that this function should be used with care. Most modern UNIX - * desktops tie the notion of a user session the session bus, and expect - * all of a users applications to quit when their bus connection goes away. - * If you are setting @exit_on_close to %FALSE for the shared session - * bus connection, you should make sure that your application exits - * when the user session ends. + * Gets the body of a message. * + * Returns: (transfer none): A #GVariant or %NULL if the body is + * empty. Do not free, it is owned by @message. * Since: 2.26 */ /** - * g_dbus_connection_signal_subscribe: - * @connection: a #GDBusConnection - * @sender: (nullable): sender name to match on (unique or well-known name) - * or %NULL to listen from all senders - * @interface_name: (nullable): D-Bus interface name to match on or %NULL to - * match on all interfaces - * @member: (nullable): D-Bus signal name to match on or %NULL to match on - * all signals - * @object_path: (nullable): object path to match on or %NULL to match on - * all object paths - * @arg0: (nullable): contents of first string argument to match on or %NULL - * to match on all kinds of arguments - * @flags: #GDBusSignalFlags describing how arg0 is used in subscribing to the - * signal - * @callback: callback to invoke when there is a signal matching the requested data - * @user_data: user data to pass to @callback - * @user_data_free_func: (nullable): function to free @user_data with when - * subscription is removed or %NULL - * - * Subscribes to signals on @connection and invokes @callback with a whenever - * the signal is received. Note that @callback will be invoked in the - * [thread-default main context][g-main-context-push-thread-default] - * of the thread you are calling this method from. - * - * If @connection is not a message bus connection, @sender must be - * %NULL. + * g_dbus_message_get_byte_order: + * @message: A #GDBusMessage. * - * If @sender is a well-known name note that @callback is invoked with - * the unique name for the owner of @sender, not the well-known name - * as one would expect. This is because the message bus rewrites the - * name. As such, to avoid certain race conditions, users should be - * tracking the name owner of the well-known name and use that when - * processing the received signal. + * Gets the byte order of @message. * - * If one of %G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE or - * %G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH are given, @arg0 is - * interpreted as part of a namespace or path. The first argument - * of a signal is matched against that part as specified by D-Bus. + * Returns: The byte order. + */ + + +/** + * g_dbus_message_get_destination: + * @message: A #GDBusMessage. * - * If @user_data_free_func is non-%NULL, it will be called (in the - * thread-default main context of the thread you are calling this - * method from) at some point after @user_data is no longer - * needed. (It is not guaranteed to be called synchronously when the - * signal is unsubscribed from, and may be called after @connection - * has been destroyed.) + * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field. * - * Returns: a subscription identifier that can be used with g_dbus_connection_signal_unsubscribe() + * Returns: The value. * Since: 2.26 */ /** - * g_dbus_connection_signal_unsubscribe: - * @connection: a #GDBusConnection - * @subscription_id: a subscription id obtained from - * g_dbus_connection_signal_subscribe() + * g_dbus_message_get_error_name: + * @message: A #GDBusMessage. * - * Unsubscribes from signals. + * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field. * + * Returns: The value. * Since: 2.26 */ /** - * g_dbus_connection_start_message_processing: - * @connection: a #GDBusConnection + * g_dbus_message_get_flags: + * @message: A #GDBusMessage. * - * If @connection was created with - * %G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING, this method - * starts processing messages. Does nothing on if @connection wasn't - * created with this flag or if the method has already been called. + * Gets the flags for @message. * + * Returns: Flags that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together). * Since: 2.26 */ /** - * g_dbus_connection_unexport_action_group: - * @connection: a #GDBusConnection - * @export_id: the ID from g_dbus_connection_export_action_group() + * g_dbus_message_get_header: + * @message: A #GDBusMessage. + * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration) * - * Reverses the effect of a previous call to - * g_dbus_connection_export_action_group(). + * Gets a header field on @message. * - * It is an error to call this function with an ID that wasn't returned - * from g_dbus_connection_export_action_group() or to call it with the - * same ID more than once. + * The caller is responsible for checking the type of the returned #GVariant + * matches what is expected. * - * Since: 2.32 + * Returns: (transfer none) (nullable): A #GVariant with the value if the header was found, %NULL + * otherwise. Do not free, it is owned by @message. + * Since: 2.26 */ /** - * g_dbus_connection_unexport_menu_model: - * @connection: a #GDBusConnection - * @export_id: the ID from g_dbus_connection_export_menu_model() - * - * Reverses the effect of a previous call to - * g_dbus_connection_export_menu_model(). + * g_dbus_message_get_header_fields: + * @message: A #GDBusMessage. * - * It is an error to call this function with an ID that wasn't returned - * from g_dbus_connection_export_menu_model() or to call it with the - * same ID more than once. + * Gets an array of all header fields on @message that are set. * - * Since: 2.32 + * Returns: (array zero-terminated=1): An array of header fields + * terminated by %G_DBUS_MESSAGE_HEADER_FIELD_INVALID. Each element + * is a #guchar. Free with g_free(). + * Since: 2.26 */ /** - * g_dbus_connection_unregister_object: - * @connection: a #GDBusConnection - * @registration_id: a registration id obtained from - * g_dbus_connection_register_object() + * g_dbus_message_get_interface: + * @message: A #GDBusMessage. * - * Unregisters an object. + * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field. * - * Returns: %TRUE if the object was unregistered, %FALSE otherwise + * Returns: The value. * Since: 2.26 */ /** - * g_dbus_connection_unregister_subtree: - * @connection: a #GDBusConnection - * @registration_id: a subtree registration id obtained from - * g_dbus_connection_register_subtree() + * g_dbus_message_get_locked: + * @message: A #GDBusMessage. * - * Unregisters a subtree. + * Checks whether @message is locked. To monitor changes to this + * value, conncet to the #GObject::notify signal to listen for changes + * on the #GDBusMessage:locked property. * - * Returns: %TRUE if the subtree was unregistered, %FALSE otherwise + * Returns: %TRUE if @message is locked, %FALSE otherwise. * Since: 2.26 */ /** - * g_dbus_error_encode_gerror: - * @error: A #GError. - * - * Creates a D-Bus error name to use for @error. If @error matches - * a registered error (cf. g_dbus_error_register_error()), the corresponding - * D-Bus error name will be returned. - * - * Otherwise the a name of the form - * `org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE` - * will be used. This allows other GDBus applications to map the error - * on the wire back to a #GError using g_dbus_error_new_for_dbus_error(). + * g_dbus_message_get_member: + * @message: A #GDBusMessage. * - * This function is typically only used in object mappings to put a - * #GError on the wire. Regular applications should not use it. + * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field. * - * Returns: A D-Bus error name (never %NULL). Free with g_free(). + * Returns: The value. * Since: 2.26 */ /** - * g_dbus_error_get_remote_error: - * @error: a #GError - * - * Gets the D-Bus error name used for @error, if any. + * g_dbus_message_get_message_type: + * @message: A #GDBusMessage. * - * This function is guaranteed to return a D-Bus error name for all - * #GErrors returned from functions handling remote method calls - * (e.g. g_dbus_connection_call_finish()) unless - * g_dbus_error_strip_remote_error() has been used on @error. + * Gets the type of @message. * - * Returns: an allocated string or %NULL if the D-Bus error name - * could not be found. Free with g_free(). + * Returns: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration). * Since: 2.26 */ /** - * g_dbus_error_is_remote_error: - * @error: A #GError. + * g_dbus_message_get_num_unix_fds: + * @message: A #GDBusMessage. * - * Checks if @error represents an error received via D-Bus from a remote peer. If so, - * use g_dbus_error_get_remote_error() to get the name of the error. + * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field. * - * Returns: %TRUE if @error represents an error from a remote peer, - * %FALSE otherwise. + * Returns: The value. * Since: 2.26 */ /** - * g_dbus_error_new_for_dbus_error: - * @dbus_error_name: D-Bus error name. - * @dbus_error_message: D-Bus error message. - * - * Creates a #GError based on the contents of @dbus_error_name and - * @dbus_error_message. - * - * Errors registered with g_dbus_error_register_error() will be looked - * up using @dbus_error_name and if a match is found, the error domain - * and code is used. Applications can use g_dbus_error_get_remote_error() - * to recover @dbus_error_name. - * - * If a match against a registered error is not found and the D-Bus - * error name is in a form as returned by g_dbus_error_encode_gerror() - * the error domain and code encoded in the name is used to - * create the #GError. Also, @dbus_error_name is added to the error message - * such that it can be recovered with g_dbus_error_get_remote_error(). - * - * Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR - * in the #G_IO_ERROR error domain is returned. Also, @dbus_error_name is - * added to the error message such that it can be recovered with - * g_dbus_error_get_remote_error(). - * - * In all three cases, @dbus_error_name can always be recovered from the - * returned #GError using the g_dbus_error_get_remote_error() function - * (unless g_dbus_error_strip_remote_error() hasn't been used on the returned error). + * g_dbus_message_get_path: + * @message: A #GDBusMessage. * - * This function is typically only used in object mappings to prepare - * #GError instances for applications. Regular applications should not use - * it. + * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field. * - * Returns: An allocated #GError. Free with g_error_free(). + * Returns: The value. * Since: 2.26 */ /** - * g_dbus_error_register_error: - * @error_domain: A #GQuark for a error domain. - * @error_code: An error code. - * @dbus_error_name: A D-Bus error name. - * - * Creates an association to map between @dbus_error_name and - * #GErrors specified by @error_domain and @error_code. + * g_dbus_message_get_reply_serial: + * @message: A #GDBusMessage. * - * This is typically done in the routine that returns the #GQuark for - * an error domain. + * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field. * - * Returns: %TRUE if the association was created, %FALSE if it already - * exists. + * Returns: The value. * Since: 2.26 */ /** - * g_dbus_error_register_error_domain: - * @error_domain_quark_name: The error domain name. - * @quark_volatile: A pointer where to store the #GQuark. - * @entries: (array length=num_entries): A pointer to @num_entries #GDBusErrorEntry struct items. - * @num_entries: Number of items to register. + * g_dbus_message_get_sender: + * @message: A #GDBusMessage. * - * Helper function for associating a #GError error domain with D-Bus error names. + * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field. * + * Returns: The value. * Since: 2.26 */ /** - * g_dbus_error_set_dbus_error: - * @error: A pointer to a #GError or %NULL. - * @dbus_error_name: D-Bus error name. - * @dbus_error_message: D-Bus error message. - * @format: (nullable): printf()-style format to prepend to @dbus_error_message or %NULL. - * @...: Arguments for @format. + * g_dbus_message_get_serial: + * @message: A #GDBusMessage. * - * Does nothing if @error is %NULL. Otherwise sets *@error to - * a new #GError created with g_dbus_error_new_for_dbus_error() - * with @dbus_error_message prepend with @format (unless %NULL). + * Gets the serial for @message. * + * Returns: A #guint32. * Since: 2.26 */ /** - * g_dbus_error_set_dbus_error_valist: - * @error: A pointer to a #GError or %NULL. - * @dbus_error_name: D-Bus error name. - * @dbus_error_message: D-Bus error message. - * @format: (nullable): printf()-style format to prepend to @dbus_error_message or %NULL. - * @var_args: Arguments for @format. + * g_dbus_message_get_signature: + * @message: A #GDBusMessage. * - * Like g_dbus_error_set_dbus_error() but intended for language bindings. + * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field. * + * Returns: The value. * Since: 2.26 */ /** - * g_dbus_error_strip_remote_error: - * @error: A #GError. + * g_dbus_message_get_unix_fd_list: + * @message: A #GDBusMessage. * - * Looks for extra information in the error message used to recover - * the D-Bus error name and strips it if found. If stripped, the - * message field in @error will correspond exactly to what was - * received on the wire. + * Gets the UNIX file descriptors associated with @message, if any. * - * This is typically used when presenting errors to the end user. + * This method is only available on UNIX. * - * Returns: %TRUE if information was stripped, %FALSE otherwise. + * Returns: (transfer none): A #GUnixFDList or %NULL if no file descriptors are + * associated. Do not free, this object is owned by @message. * Since: 2.26 */ /** - * g_dbus_error_unregister_error: - * @error_domain: A #GQuark for a error domain. - * @error_code: An error code. - * @dbus_error_name: A D-Bus error name. + * g_dbus_message_lock: + * @message: A #GDBusMessage. * - * Destroys an association previously set up with g_dbus_error_register_error(). + * If @message is locked, does nothing. Otherwise locks the message. * - * Returns: %TRUE if the association was destroyed, %FALSE if it wasn't found. * Since: 2.26 */ /** - * g_dbus_generate_guid: - * - * Generate a D-Bus GUID that can be used with - * e.g. g_dbus_connection_new(). + * g_dbus_message_new: * - * See the D-Bus specification regarding what strings are valid D-Bus - * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant). + * Creates a new empty #GDBusMessage. * - * Returns: A valid D-Bus GUID. Free with g_free(). + * Returns: A #GDBusMessage. Free with g_object_unref(). * Since: 2.26 */ /** - * g_dbus_gvalue_to_gvariant: - * @gvalue: A #GValue to convert to a #GVariant - * @type: A #GVariantType - * - * Converts a #GValue to a #GVariant of the type indicated by the @type - * parameter. - * - * The conversion is using the following rules: - * - * - #G_TYPE_STRING: 's', 'o', 'g' or 'ay' - * - #G_TYPE_STRV: 'as', 'ao' or 'aay' - * - #G_TYPE_BOOLEAN: 'b' - * - #G_TYPE_UCHAR: 'y' - * - #G_TYPE_INT: 'i', 'n' - * - #G_TYPE_UINT: 'u', 'q' - * - #G_TYPE_INT64 'x' - * - #G_TYPE_UINT64: 't' - * - #G_TYPE_DOUBLE: 'd' - * - #G_TYPE_VARIANT: Any #GVariantType - * - * This can fail if e.g. @gvalue is of type #G_TYPE_STRING and @type - * is ['i'][G-VARIANT-TYPE-INT32:CAPS]. It will also fail for any #GType - * (including e.g. #G_TYPE_OBJECT and #G_TYPE_BOXED derived-types) not - * in the table above. + * g_dbus_message_new_from_blob: + * @blob: (array length=blob_len) (element-type guint8): A blob representing a binary D-Bus message. + * @blob_len: The length of @blob. + * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported. + * @error: Return location for error or %NULL. * - * Note that if @gvalue is of type #G_TYPE_VARIANT and its value is - * %NULL, the empty #GVariant instance (never %NULL) for @type is - * returned (e.g. 0 for scalar types, the empty string for string types, - * '/' for object path types, the empty array for any array type and so on). + * Creates a new #GDBusMessage from the data stored at @blob. The byte + * order that the message was in can be retrieved using + * g_dbus_message_get_byte_order(). * - * See the g_dbus_gvariant_to_gvalue() function for how to convert a - * #GVariant to a #GValue. + * If the @blob cannot be parsed, contains invalid fields, or contains invalid + * headers, %G_IO_ERROR_INVALID_ARGUMENT will be returned. * - * Returns: A #GVariant (never floating) of #GVariantType @type holding - * the data from @gvalue or %NULL in case of failure. Free with - * g_variant_unref(). - * Since: 2.30 + * Returns: A new #GDBusMessage or %NULL if @error is set. Free with + * g_object_unref(). + * Since: 2.26 */ /** - * g_dbus_gvariant_to_gvalue: - * @value: A #GVariant. - * @out_gvalue: (out): Return location pointing to a zero-filled (uninitialized) #GValue. - * - * Converts a #GVariant to a #GValue. If @value is floating, it is consumed. - * - * The rules specified in the g_dbus_gvalue_to_gvariant() function are - * used - this function is essentially its reverse form. So, a #GVariant - * containing any basic or string array type will be converted to a #GValue - * containing a basic value or string array. Any other #GVariant (handle, - * variant, tuple, dict entry) will be converted to a #GValue containing that - * #GVariant. + * g_dbus_message_new_method_call: + * @name: (nullable): A valid D-Bus name or %NULL. + * @path: A valid object path. + * @interface_: (nullable): A valid D-Bus interface name or %NULL. + * @method: A valid method name. * - * The conversion never fails - a valid #GValue is always returned in - * @out_gvalue. + * Creates a new #GDBusMessage for a method call. * - * Since: 2.30 + * Returns: A #GDBusMessage. Free with g_object_unref(). + * Since: 2.26 */ /** - * g_dbus_interface_dup_object: (rename-to g_dbus_interface_get_object) - * @interface_: An exported D-Bus interface. + * g_dbus_message_new_method_error: + * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to + * create a reply message to. + * @error_name: A valid D-Bus error name. + * @error_message_format: The D-Bus error message in a printf() format. + * @...: Arguments for @error_message_format. * - * Gets the #GDBusObject that @interface_ belongs to, if any. + * Creates a new #GDBusMessage that is an error reply to @method_call_message. * - * Returns: (transfer full): A #GDBusObject or %NULL. The returned - * reference should be freed with g_object_unref(). - * Since: 2.32 + * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref(). + * Since: 2.26 */ /** - * g_dbus_interface_get_info: - * @interface_: An exported D-Bus interface. + * g_dbus_message_new_method_error_literal: + * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to + * create a reply message to. + * @error_name: A valid D-Bus error name. + * @error_message: The D-Bus error message. * - * Gets D-Bus introspection information for the D-Bus interface - * implemented by @interface_. + * Creates a new #GDBusMessage that is an error reply to @method_call_message. * - * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. - * Since: 2.30 + * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref(). + * Since: 2.26 */ /** - * g_dbus_interface_get_object: (skip) - * @interface_: An exported D-Bus interface - * - * Gets the #GDBusObject that @interface_ belongs to, if any. + * g_dbus_message_new_method_error_valist: + * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to + * create a reply message to. + * @error_name: A valid D-Bus error name. + * @error_message_format: The D-Bus error message in a printf() format. + * @var_args: Arguments for @error_message_format. * - * It is not safe to use the returned object if @interface_ or - * the returned object is being used from other threads. See - * g_dbus_interface_dup_object() for a thread-safe alternative. + * Like g_dbus_message_new_method_error() but intended for language bindings. * - * Returns: (transfer none): A #GDBusObject or %NULL. The returned - * reference belongs to @interface_ and should not be freed. - * Since: 2.30 + * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref(). + * Since: 2.26 */ /** - * g_dbus_interface_info_cache_build: - * @info: A #GDBusInterfaceInfo. - * - * Builds a lookup-cache to speed up - * g_dbus_interface_info_lookup_method(), - * g_dbus_interface_info_lookup_signal() and - * g_dbus_interface_info_lookup_property(). - * - * If this has already been called with @info, the existing cache is - * used and its use count is increased. + * g_dbus_message_new_method_reply: + * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to + * create a reply message to. * - * Note that @info cannot be modified until - * g_dbus_interface_info_cache_release() is called. + * Creates a new #GDBusMessage that is a reply to @method_call_message. * - * Since: 2.30 + * Returns: (transfer full): #GDBusMessage. Free with g_object_unref(). + * Since: 2.26 */ /** - * g_dbus_interface_info_cache_release: - * @info: A GDBusInterfaceInfo + * g_dbus_message_new_signal: + * @path: A valid object path. + * @interface_: A valid D-Bus interface name. + * @signal: A valid signal name. * - * Decrements the usage count for the cache for @info built by - * g_dbus_interface_info_cache_build() (if any) and frees the - * resources used by the cache if the usage count drops to zero. + * Creates a new #GDBusMessage for a signal emission. * - * Since: 2.30 + * Returns: A #GDBusMessage. Free with g_object_unref(). + * Since: 2.26 */ /** - * g_dbus_interface_info_generate_xml: - * @info: A #GDBusNodeInfo + * g_dbus_message_print: (type method-return) + * @message: A #GDBusMessage. * @indent: Indentation level. - * @string_builder: A #GString to to append XML data to. * - * Appends an XML representation of @info (and its children) to @string_builder. + * Produces a human-readable multi-line description of @message. * - * This function is typically used for generating introspection XML - * documents at run-time for handling the - * `org.freedesktop.DBus.Introspectable.Introspect` - * method. + * The contents of the description has no ABI guarantees, the contents + * and formatting is subject to change at any time. Typical output + * looks something like this: + * |[ + * Flags: none + * Version: 0 + * Serial: 4 + * Headers: + * path -> objectpath '/org/gtk/GDBus/TestObject' + * interface -> 'org.gtk.GDBus.TestInterface' + * member -> 'GimmeStdout' + * destination -> ':1.146' + * Body: () + * UNIX File Descriptors: + * (none) + * ]| + * or + * |[ + * Flags: no-reply-expected + * Version: 0 + * Serial: 477 + * Headers: + * reply-serial -> uint32 4 + * destination -> ':1.159' + * sender -> ':1.146' + * num-unix-fds -> uint32 1 + * Body: () + * UNIX File Descriptors: + * fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635 + * ]| * + * Returns: A string that should be freed with g_free(). * Since: 2.26 */ /** - * g_dbus_interface_info_lookup_method: - * @info: A #GDBusInterfaceInfo. - * @name: A D-Bus method name (typically in CamelCase) + * g_dbus_message_set_body: + * @message: A #GDBusMessage. + * @body: Either %NULL or a #GVariant that is a tuple. * - * Looks up information about a method. + * Sets the body @message. As a side-effect the + * %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the + * type string of @body (or cleared if @body is %NULL). * - * The cost of this function is O(n) in number of methods unless - * g_dbus_interface_info_cache_build() has been used on @info. + * If @body is floating, @message assumes ownership of @body. * - * Returns: (transfer none): A #GDBusMethodInfo or %NULL if not found. Do not free, it is owned by @info. * Since: 2.26 */ /** - * g_dbus_interface_info_lookup_property: - * @info: A #GDBusInterfaceInfo. - * @name: A D-Bus property name (typically in CamelCase). - * - * Looks up information about a property. - * - * The cost of this function is O(n) in number of properties unless - * g_dbus_interface_info_cache_build() has been used on @info. + * g_dbus_message_set_byte_order: + * @message: A #GDBusMessage. + * @byte_order: The byte order. * - * Returns: (transfer none): A #GDBusPropertyInfo or %NULL if not found. Do not free, it is owned by @info. - * Since: 2.26 + * Sets the byte order of @message. */ /** - * g_dbus_interface_info_lookup_signal: - * @info: A #GDBusInterfaceInfo. - * @name: A D-Bus signal name (typically in CamelCase) - * - * Looks up information about a signal. + * g_dbus_message_set_destination: + * @message: A #GDBusMessage. + * @value: The value to set. * - * The cost of this function is O(n) in number of signals unless - * g_dbus_interface_info_cache_build() has been used on @info. + * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field. * - * Returns: (transfer none): A #GDBusSignalInfo or %NULL if not found. Do not free, it is owned by @info. * Since: 2.26 */ /** - * g_dbus_interface_info_ref: - * @info: A #GDBusInterfaceInfo + * g_dbus_message_set_error_name: + * @message: A #GDBusMessage. + * @value: The value to set. * - * If @info is statically allocated does nothing. Otherwise increases - * the reference count. + * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field. * - * Returns: The same @info. * Since: 2.26 */ /** - * g_dbus_interface_info_unref: - * @info: A #GDBusInterfaceInfo. + * g_dbus_message_set_flags: + * @message: A #GDBusMessage. + * @flags: Flags for @message that are set (typically values from the #GDBusMessageFlags + * enumeration bitwise ORed together). * - * If @info is statically allocated, does nothing. Otherwise decreases - * the reference count of @info. When its reference count drops to 0, - * the memory used is freed. + * Sets the flags to set on @message. * * Since: 2.26 */ /** - * g_dbus_interface_set_object: - * @interface_: An exported D-Bus interface. - * @object: (nullable): A #GDBusObject or %NULL. + * g_dbus_message_set_header: + * @message: A #GDBusMessage. + * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration) + * @value: (nullable): A #GVariant to set the header field or %NULL to clear the header field. * - * Sets the #GDBusObject for @interface_ to @object. + * Sets a header field on @message. * - * Note that @interface_ will hold a weak reference to @object. + * If @value is floating, @message assumes ownership of @value. * - * Since: 2.30 + * Since: 2.26 */ /** - * g_dbus_interface_skeleton_export: - * @interface_: The D-Bus interface to export. - * @connection: A #GDBusConnection to export @interface_ on. - * @object_path: The path to export the interface at. - * @error: Return location for error or %NULL. - * - * Exports @interface_ at @object_path on @connection. - * - * This can be called multiple times to export the same @interface_ - * onto multiple connections however the @object_path provided must be - * the same for all connections. + * g_dbus_message_set_interface: + * @message: A #GDBusMessage. + * @value: The value to set. * - * Use g_dbus_interface_skeleton_unexport() to unexport the object. + * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field. * - * Returns: %TRUE if the interface was exported on @connection, otherwise %FALSE with - * @error set. - * Since: 2.30 + * Since: 2.26 */ /** - * g_dbus_interface_skeleton_flush: - * @interface_: A #GDBusInterfaceSkeleton. - * - * If @interface_ has outstanding changes, request for these changes to be - * emitted immediately. + * g_dbus_message_set_member: + * @message: A #GDBusMessage. + * @value: The value to set. * - * For example, an exported D-Bus interface may queue up property - * changes and emit the - * `org.freedesktop.DBus.Properties.PropertiesChanged` - * signal later (e.g. in an idle handler). This technique is useful - * for collapsing multiple property changes into one. + * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field. * - * Since: 2.30 + * Since: 2.26 */ /** - * g_dbus_interface_skeleton_get_connection: - * @interface_: A #GDBusInterfaceSkeleton. + * g_dbus_message_set_message_type: + * @message: A #GDBusMessage. + * @type: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration). * - * Gets the first connection that @interface_ is exported on, if any. + * Sets @message to be of @type. * - * Returns: (transfer none): A #GDBusConnection or %NULL if @interface_ is - * not exported anywhere. Do not free, the object belongs to @interface_. - * Since: 2.30 + * Since: 2.26 */ /** - * g_dbus_interface_skeleton_get_connections: - * @interface_: A #GDBusInterfaceSkeleton. + * g_dbus_message_set_num_unix_fds: + * @message: A #GDBusMessage. + * @value: The value to set. * - * Gets a list of the connections that @interface_ is exported on. + * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field. * - * Returns: (element-type GDBusConnection) (transfer full): A list of - * all the connections that @interface_ is exported on. The returned - * list should be freed with g_list_free() after each element has - * been freed with g_object_unref(). - * Since: 2.32 + * Since: 2.26 */ /** - * g_dbus_interface_skeleton_get_flags: - * @interface_: A #GDBusInterfaceSkeleton. + * g_dbus_message_set_path: + * @message: A #GDBusMessage. + * @value: The value to set. * - * Gets the #GDBusInterfaceSkeletonFlags that describes what the behavior - * of @interface_ + * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field. * - * Returns: One or more flags from the #GDBusInterfaceSkeletonFlags enumeration. - * Since: 2.30 + * Since: 2.26 */ /** - * g_dbus_interface_skeleton_get_info: - * @interface_: A #GDBusInterfaceSkeleton. + * g_dbus_message_set_reply_serial: + * @message: A #GDBusMessage. + * @value: The value to set. * - * Gets D-Bus introspection information for the D-Bus interface - * implemented by @interface_. + * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field. * - * Returns: (transfer none): A #GDBusInterfaceInfo (never %NULL). Do not free. - * Since: 2.30 + * Since: 2.26 */ /** - * g_dbus_interface_skeleton_get_object_path: - * @interface_: A #GDBusInterfaceSkeleton. + * g_dbus_message_set_sender: + * @message: A #GDBusMessage. + * @value: The value to set. * - * Gets the object path that @interface_ is exported on, if any. + * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field. * - * Returns: A string owned by @interface_ or %NULL if @interface_ is not exported - * anywhere. Do not free, the string belongs to @interface_. - * Since: 2.30 + * Since: 2.26 */ /** - * g_dbus_interface_skeleton_get_properties: - * @interface_: A #GDBusInterfaceSkeleton. + * g_dbus_message_set_serial: + * @message: A #GDBusMessage. + * @serial: A #guint32. * - * Gets all D-Bus properties for @interface_. + * Sets the serial for @message. * - * Returns: (transfer full): A #GVariant of type - * ['a{sv}'][G-VARIANT-TYPE-VARDICT:CAPS]. - * Free with g_variant_unref(). - * Since: 2.30 + * Since: 2.26 */ /** - * g_dbus_interface_skeleton_get_vtable: (skip) - * @interface_: A #GDBusInterfaceSkeleton. + * g_dbus_message_set_signature: + * @message: A #GDBusMessage. + * @value: The value to set. * - * Gets the interface vtable for the D-Bus interface implemented by - * @interface_. The returned function pointers should expect @interface_ - * itself to be passed as @user_data. + * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field. * - * Returns: A #GDBusInterfaceVTable (never %NULL). - * Since: 2.30 + * Since: 2.26 */ /** - * g_dbus_interface_skeleton_has_connection: - * @interface_: A #GDBusInterfaceSkeleton. - * @connection: A #GDBusConnection. + * g_dbus_message_set_unix_fd_list: + * @message: A #GDBusMessage. + * @fd_list: (nullable): A #GUnixFDList or %NULL. * - * Checks if @interface_ is exported on @connection. + * Sets the UNIX file descriptors associated with @message. As a + * side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header + * field is set to the number of fds in @fd_list (or cleared if + * @fd_list is %NULL). * - * Returns: %TRUE if @interface_ is exported on @connection, %FALSE otherwise. - * Since: 2.32 + * This method is only available on UNIX. + * + * Since: 2.26 */ /** - * g_dbus_interface_skeleton_set_flags: - * @interface_: A #GDBusInterfaceSkeleton. - * @flags: Flags from the #GDBusInterfaceSkeletonFlags enumeration. + * g_dbus_message_to_blob: + * @message: A #GDBusMessage. + * @out_size: Return location for size of generated blob. + * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported. + * @error: Return location for error. * - * Sets flags describing what the behavior of @skeleton should be. + * Serializes @message to a blob. The byte order returned by + * g_dbus_message_get_byte_order() will be used. * - * Since: 2.30 + * Returns: (array length=out_size) (transfer full): A pointer to a + * valid binary D-Bus message of @out_size bytes generated by @message + * or %NULL if @error is set. Free with g_free(). + * Since: 2.26 */ /** - * g_dbus_interface_skeleton_unexport: - * @interface_: A #GDBusInterfaceSkeleton. + * g_dbus_message_to_gerror: + * @message: A #GDBusMessage. + * @error: The #GError to set. * - * Stops exporting @interface_ on all connections it is exported on. + * If @message is not of type %G_DBUS_MESSAGE_TYPE_ERROR does + * nothing and returns %FALSE. * - * To unexport @interface_ from only a single connection, use - * g_dbus_interface_skeleton_unexport_from_connection() + * Otherwise this method encodes the error in @message as a #GError + * using g_dbus_error_set_dbus_error() using the information in the + * %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as + * well as the first string item in @message's body. * - * Since: 2.30 + * Returns: %TRUE if @error was set, %FALSE otherwise. + * Since: 2.26 */ /** - * g_dbus_interface_skeleton_unexport_from_connection: - * @interface_: A #GDBusInterfaceSkeleton. - * @connection: A #GDBusConnection. - * - * Stops exporting @interface_ on @connection. + * g_dbus_method_info_ref: + * @info: A #GDBusMethodInfo * - * To stop exporting on all connections the interface is exported on, - * use g_dbus_interface_skeleton_unexport(). + * If @info is statically allocated does nothing. Otherwise increases + * the reference count. * - * Since: 2.32 + * Returns: The same @info. + * Since: 2.26 */ /** - * g_dbus_is_address: - * @string: A string. - * - * Checks if @string is a - * [D-Bus address](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). + * g_dbus_method_info_unref: + * @info: A #GDBusMethodInfo. * - * This doesn't check if @string is actually supported by #GDBusServer - * or #GDBusConnection - use g_dbus_is_supported_address() to do more - * checks. + * If @info is statically allocated, does nothing. Otherwise decreases + * the reference count of @info. When its reference count drops to 0, + * the memory used is freed. * - * Returns: %TRUE if @string is a valid D-Bus address, %FALSE otherwise. * Since: 2.26 */ /** - * g_dbus_is_guid: - * @string: The string to check. - * - * Checks if @string is a D-Bus GUID. + * g_dbus_method_invocation_get_connection: + * @invocation: A #GDBusMethodInvocation. * - * See the D-Bus specification regarding what strings are valid D-Bus - * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant). + * Gets the #GDBusConnection the method was invoked on. * - * Returns: %TRUE if @string is a guid, %FALSE otherwise. + * Returns: (transfer none): A #GDBusConnection. Do not free, it is owned by @invocation. * Since: 2.26 */ /** - * g_dbus_is_interface_name: - * @string: The string to check. + * g_dbus_method_invocation_get_interface_name: + * @invocation: A #GDBusMethodInvocation. * - * Checks if @string is a valid D-Bus interface name. + * Gets the name of the D-Bus interface the method was invoked on. * - * Returns: %TRUE if valid, %FALSE otherwise. + * If this method call is a property Get, Set or GetAll call that has + * been redirected to the method call handler then + * "org.freedesktop.DBus.Properties" will be returned. See + * #GDBusInterfaceVTable for more information. + * + * Returns: A string. Do not free, it is owned by @invocation. * Since: 2.26 */ /** - * g_dbus_is_member_name: - * @string: The string to check. + * g_dbus_method_invocation_get_message: + * @invocation: A #GDBusMethodInvocation. * - * Checks if @string is a valid D-Bus member (e.g. signal or method) name. + * Gets the #GDBusMessage for the method invocation. This is useful if + * you need to use low-level protocol features, such as UNIX file + * descriptor passing, that cannot be properly expressed in the + * #GVariant API. * - * Returns: %TRUE if valid, %FALSE otherwise. + * See this [server][gdbus-server] and [client][gdbus-unix-fd-client] + * for an example of how to use this low-level API to send and receive + * UNIX file descriptors. + * + * Returns: (transfer none): #GDBusMessage. Do not free, it is owned by @invocation. * Since: 2.26 */ /** - * g_dbus_is_name: - * @string: The string to check. + * g_dbus_method_invocation_get_method_info: + * @invocation: A #GDBusMethodInvocation. * - * Checks if @string is a valid D-Bus bus name (either unique or well-known). + * Gets information about the method call, if any. * - * Returns: %TRUE if valid, %FALSE otherwise. + * If this method invocation is a property Get, Set or GetAll call that + * has been redirected to the method call handler then %NULL will be + * returned. See g_dbus_method_invocation_get_property_info() and + * #GDBusInterfaceVTable for more information. + * + * Returns: A #GDBusMethodInfo or %NULL. Do not free, it is owned by @invocation. * Since: 2.26 */ /** - * g_dbus_is_supported_address: - * @string: A string. - * @error: Return location for error or %NULL. + * g_dbus_method_invocation_get_method_name: + * @invocation: A #GDBusMethodInvocation. * - * Like g_dbus_is_address() but also checks if the library supports the - * transports in @string and that key/value pairs for each transport - * are valid. See the specification of the - * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). + * Gets the name of the method that was invoked. * - * Returns: %TRUE if @string is a valid D-Bus address that is - * supported by this library, %FALSE if @error is set. + * Returns: A string. Do not free, it is owned by @invocation. * Since: 2.26 */ /** - * g_dbus_is_unique_name: - * @string: The string to check. + * g_dbus_method_invocation_get_object_path: + * @invocation: A #GDBusMethodInvocation. * - * Checks if @string is a valid D-Bus unique bus name. + * Gets the object path the method was invoked on. * - * Returns: %TRUE if valid, %FALSE otherwise. + * Returns: A string. Do not free, it is owned by @invocation. * Since: 2.26 */ /** - * g_dbus_menu_model_get: - * @connection: a #GDBusConnection - * @bus_name: (nullable): the bus name which exports the menu model - * or %NULL if @connection is not a message bus connection - * @object_path: the object path at which the menu model is exported - * - * Obtains a #GDBusMenuModel for the menu model which is exported - * at the given @bus_name and @object_path. + * g_dbus_method_invocation_get_parameters: + * @invocation: A #GDBusMethodInvocation. * - * The thread default main context is taken at the time of this call. - * All signals on the menu model (and any linked models) are reported - * with respect to this context. All calls on the returned menu model - * (and linked models) must also originate from this same context, with - * the thread default main context unchanged. + * Gets the parameters of the method invocation. If there are no input + * parameters then this will return a GVariant with 0 children rather than NULL. * - * Returns: (transfer full): a #GDBusMenuModel object. Free with - * g_object_unref(). - * Since: 2.32 + * Returns: (transfer none): A #GVariant tuple. Do not unref this because it is owned by @invocation. + * Since: 2.26 */ /** - * g_dbus_message_bytes_needed: - * @blob: (array length=blob_len) (element-type guint8): A blob represent a binary D-Bus message. - * @blob_len: The length of @blob (must be at least 16). - * @error: Return location for error or %NULL. + * g_dbus_method_invocation_get_property_info: + * @invocation: A #GDBusMethodInvocation * - * Utility function to calculate how many bytes are needed to - * completely deserialize the D-Bus message stored at @blob. + * Gets information about the property that this method call is for, if + * any. * - * Returns: Number of bytes needed or -1 if @error is set (e.g. if - * @blob contains invalid data or not enough data is available to - * determine the size). - * Since: 2.26 - */ - - -/** - * g_dbus_message_copy: - * @message: A #GDBusMessage. - * @error: Return location for error or %NULL. + * This will only be set in the case of an invocation in response to a + * property Get or Set call that has been directed to the method call + * handler for an object on account of its property_get() or + * property_set() vtable pointers being unset. * - * Copies @message. The copy is a deep copy and the returned - * #GDBusMessage is completely identical except that it is guaranteed - * to not be locked. + * See #GDBusInterfaceVTable for more information. * - * This operation can fail if e.g. @message contains file descriptors - * and the per-process or system-wide open files limit is reached. + * If the call was GetAll, %NULL will be returned. * - * Returns: (transfer full): A new #GDBusMessage or %NULL if @error is set. - * Free with g_object_unref(). - * Since: 2.26 + * Returns: (transfer none): a #GDBusPropertyInfo or %NULL + * Since: 2.38 */ /** - * g_dbus_message_get_arg0: - * @message: A #GDBusMessage. + * g_dbus_method_invocation_get_sender: + * @invocation: A #GDBusMethodInvocation. * - * Convenience to get the first item in the body of @message. + * Gets the bus name that invoked the method. * - * Returns: The string item or %NULL if the first item in the body of - * @message is not a string. + * Returns: A string. Do not free, it is owned by @invocation. * Since: 2.26 */ /** - * g_dbus_message_get_body: - * @message: A #GDBusMessage. + * g_dbus_method_invocation_get_user_data: (skip) + * @invocation: A #GDBusMethodInvocation. * - * Gets the body of a message. + * Gets the @user_data #gpointer passed to g_dbus_connection_register_object(). * - * Returns: (transfer none): A #GVariant or %NULL if the body is - * empty. Do not free, it is owned by @message. + * Returns: A #gpointer. * Since: 2.26 */ /** - * g_dbus_message_get_byte_order: - * @message: A #GDBusMessage. - * - * Gets the byte order of @message. + * g_dbus_method_invocation_return_dbus_error: + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @error_name: A valid D-Bus error name. + * @error_message: A valid D-Bus error message. * - * Returns: The byte order. - */ - - -/** - * g_dbus_message_get_destination: - * @message: A #GDBusMessage. + * Finishes handling a D-Bus method call by returning an error. * - * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field. + * This method will take ownership of @invocation. See + * #GDBusInterfaceVTable for more information about the ownership of + * @invocation. * - * Returns: The value. * Since: 2.26 */ /** - * g_dbus_message_get_error_name: - * @message: A #GDBusMessage. + * g_dbus_method_invocation_return_error: + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @domain: A #GQuark for the #GError error domain. + * @code: The error code. + * @format: printf()-style format. + * @...: Parameters for @format. * - * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field. + * Finishes handling a D-Bus method call by returning an error. * - * Returns: The value. - * Since: 2.26 - */ - - -/** - * g_dbus_message_get_flags: - * @message: A #GDBusMessage. + * See g_dbus_error_encode_gerror() for details about what error name + * will be returned on the wire. In a nutshell, if the given error is + * registered using g_dbus_error_register_error() the name given + * during registration is used. Otherwise, a name of the form + * `org.gtk.GDBus.UnmappedGError.Quark...` is used. This provides + * transparent mapping of #GError between applications using GDBus. * - * Gets the flags for @message. + * If you are writing an application intended to be portable, + * always register errors with g_dbus_error_register_error() + * or use g_dbus_method_invocation_return_dbus_error(). + * + * This method will take ownership of @invocation. See + * #GDBusInterfaceVTable for more information about the ownership of + * @invocation. + * + * Since 2.48, if the method call requested for a reply not to be sent + * then this call will free @invocation but otherwise do nothing (as per + * the recommendations of the D-Bus specification). * - * Returns: Flags that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together). * Since: 2.26 */ /** - * g_dbus_message_get_header: - * @message: A #GDBusMessage. - * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration) + * g_dbus_method_invocation_return_error_literal: + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @domain: A #GQuark for the #GError error domain. + * @code: The error code. + * @message: The error message. * - * Gets a header field on @message. + * Like g_dbus_method_invocation_return_error() but without printf()-style formatting. + * + * This method will take ownership of @invocation. See + * #GDBusInterfaceVTable for more information about the ownership of + * @invocation. * - * Returns: A #GVariant with the value if the header was found, %NULL - * otherwise. Do not free, it is owned by @message. * Since: 2.26 */ /** - * g_dbus_message_get_header_fields: - * @message: A #GDBusMessage. + * g_dbus_method_invocation_return_error_valist: + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @domain: A #GQuark for the #GError error domain. + * @code: The error code. + * @format: printf()-style format. + * @var_args: #va_list of parameters for @format. * - * Gets an array of all header fields on @message that are set. + * Like g_dbus_method_invocation_return_error() but intended for + * language bindings. + * + * This method will take ownership of @invocation. See + * #GDBusInterfaceVTable for more information about the ownership of + * @invocation. * - * Returns: (array zero-terminated=1): An array of header fields - * terminated by %G_DBUS_MESSAGE_HEADER_FIELD_INVALID. Each element - * is a #guchar. Free with g_free(). * Since: 2.26 */ /** - * g_dbus_message_get_interface: - * @message: A #GDBusMessage. + * g_dbus_method_invocation_return_gerror: + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @error: A #GError. * - * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field. + * Like g_dbus_method_invocation_return_error() but takes a #GError + * instead of the error domain, error code and message. + * + * This method will take ownership of @invocation. See + * #GDBusInterfaceVTable for more information about the ownership of + * @invocation. * - * Returns: The value. * Since: 2.26 */ /** - * g_dbus_message_get_locked: - * @message: A #GDBusMessage. + * g_dbus_method_invocation_return_value: + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @parameters: (nullable): A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters. * - * Checks whether @message is locked. To monitor changes to this - * value, conncet to the #GObject::notify signal to listen for changes - * on the #GDBusMessage:locked property. + * Finishes handling a D-Bus method call by returning @parameters. + * If the @parameters GVariant is floating, it is consumed. + * + * It is an error if @parameters is not of the right format: it must be a tuple + * containing the out-parameters of the D-Bus method. Even if the method has a + * single out-parameter, it must be contained in a tuple. If the method has no + * out-parameters, @parameters may be %NULL or an empty tuple. + * + * |[ + * GDBusMethodInvocation *invocation = some_invocation; + * g_autofree gchar *result_string = NULL; + * g_autoptr (GError) error = NULL; + * + * result_string = calculate_result (&error); + * + * if (error != NULL) + * g_dbus_method_invocation_return_gerror (invocation, error); + * else + * g_dbus_method_invocation_return_value (invocation, + * g_variant_new ("(s)", result_string)); + * + * // Do not free @invocation here; returning a value does that + * ]| + * + * This method will take ownership of @invocation. See + * #GDBusInterfaceVTable for more information about the ownership of + * @invocation. + * + * Since 2.48, if the method call requested for a reply not to be sent + * then this call will sink @parameters and free @invocation, but + * otherwise do nothing (as per the recommendations of the D-Bus + * specification). * - * Returns: %TRUE if @message is locked, %FALSE otherwise. * Since: 2.26 */ /** - * g_dbus_message_get_member: - * @message: A #GDBusMessage. + * g_dbus_method_invocation_return_value_with_unix_fd_list: + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @parameters: (nullable): A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters. + * @fd_list: (nullable): A #GUnixFDList or %NULL. * - * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field. + * Like g_dbus_method_invocation_return_value() but also takes a #GUnixFDList. * - * Returns: The value. - * Since: 2.26 + * This method is only available on UNIX. + * + * This method will take ownership of @invocation. See + * #GDBusInterfaceVTable for more information about the ownership of + * @invocation. + * + * Since: 2.30 */ /** - * g_dbus_message_get_message_type: - * @message: A #GDBusMessage. + * g_dbus_method_invocation_take_error: (skip) + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @error: (transfer full): A #GError. * - * Gets the type of @message. + * Like g_dbus_method_invocation_return_gerror() but takes ownership + * of @error so the caller does not need to free it. * - * Returns: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration). - * Since: 2.26 + * This method will take ownership of @invocation. See + * #GDBusInterfaceVTable for more information about the ownership of + * @invocation. + * + * Since: 2.30 */ /** - * g_dbus_message_get_num_unix_fds: - * @message: A #GDBusMessage. + * g_dbus_node_info_generate_xml: + * @info: A #GDBusNodeInfo. + * @indent: Indentation level. + * @string_builder: A #GString to to append XML data to. * - * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field. + * Appends an XML representation of @info (and its children) to @string_builder. + * + * This function is typically used for generating introspection XML documents at run-time for + * handling the `org.freedesktop.DBus.Introspectable.Introspect` method. * - * Returns: The value. * Since: 2.26 */ /** - * g_dbus_message_get_path: - * @message: A #GDBusMessage. + * g_dbus_node_info_lookup_interface: + * @info: A #GDBusNodeInfo. + * @name: A D-Bus interface name. * - * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field. + * Looks up information about an interface. * - * Returns: The value. + * The cost of this function is O(n) in number of interfaces. + * + * Returns: (transfer none): A #GDBusInterfaceInfo or %NULL if not found. Do not free, it is owned by @info. * Since: 2.26 */ /** - * g_dbus_message_get_reply_serial: - * @message: A #GDBusMessage. + * g_dbus_node_info_new_for_xml: + * @xml_data: Valid D-Bus introspection XML. + * @error: Return location for error. * - * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field. + * Parses @xml_data and returns a #GDBusNodeInfo representing the data. * - * Returns: The value. + * The introspection XML must contain exactly one top-level + * element. + * + * Note that this routine is using a + * [GMarkup][glib-Simple-XML-Subset-Parser.description]-based + * parser that only accepts a subset of valid XML documents. + * + * Returns: A #GDBusNodeInfo structure or %NULL if @error is set. Free + * with g_dbus_node_info_unref(). * Since: 2.26 */ /** - * g_dbus_message_get_sender: - * @message: A #GDBusMessage. + * g_dbus_node_info_ref: + * @info: A #GDBusNodeInfo * - * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field. + * If @info is statically allocated does nothing. Otherwise increases + * the reference count. * - * Returns: The value. + * Returns: The same @info. * Since: 2.26 */ /** - * g_dbus_message_get_serial: - * @message: A #GDBusMessage. + * g_dbus_node_info_unref: + * @info: A #GDBusNodeInfo. * - * Gets the serial for @message. + * If @info is statically allocated, does nothing. Otherwise decreases + * the reference count of @info. When its reference count drops to 0, + * the memory used is freed. * - * Returns: A #guint32. * Since: 2.26 */ /** - * g_dbus_message_get_signature: - * @message: A #GDBusMessage. + * g_dbus_object_get_interface: + * @object: A #GDBusObject. + * @interface_name: A D-Bus interface name. * - * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field. + * Gets the D-Bus interface with name @interface_name associated with + * @object, if any. * - * Returns: The value. - * Since: 2.26 + * Returns: (transfer full): %NULL if not found, otherwise a + * #GDBusInterface that must be freed with g_object_unref(). + * Since: 2.30 */ /** - * g_dbus_message_get_unix_fd_list: - * @message: A #GDBusMessage. - * - * Gets the UNIX file descriptors associated with @message, if any. + * g_dbus_object_get_interfaces: + * @object: A #GDBusObject. * - * This method is only available on UNIX. + * Gets the D-Bus interfaces associated with @object. * - * Returns: (transfer none): A #GUnixFDList or %NULL if no file descriptors are - * associated. Do not free, this object is owned by @message. - * Since: 2.26 + * Returns: (element-type GDBusInterface) (transfer full): A list of #GDBusInterface instances. + * The returned list must be freed by g_list_free() after each element has been freed + * with g_object_unref(). + * Since: 2.30 */ /** - * g_dbus_message_lock: - * @message: A #GDBusMessage. + * g_dbus_object_get_object_path: + * @object: A #GDBusObject. * - * If @message is locked, does nothing. Otherwise locks the message. + * Gets the object path for @object. * - * Since: 2.26 + * Returns: A string owned by @object. Do not free. + * Since: 2.30 */ /** - * g_dbus_message_new: + * g_dbus_object_manager_client_get_connection: + * @manager: A #GDBusObjectManagerClient * - * Creates a new empty #GDBusMessage. + * Gets the #GDBusConnection used by @manager. * - * Returns: A #GDBusMessage. Free with g_object_unref(). - * Since: 2.26 + * Returns: (transfer none): A #GDBusConnection object. Do not free, + * the object belongs to @manager. + * Since: 2.30 */ /** - * g_dbus_message_new_from_blob: - * @blob: (array length=blob_len) (element-type guint8): A blob represent a binary D-Bus message. - * @blob_len: The length of @blob. - * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported. - * @error: Return location for error or %NULL. + * g_dbus_object_manager_client_get_flags: + * @manager: A #GDBusObjectManagerClient * - * Creates a new #GDBusMessage from the data stored at @blob. The byte - * order that the message was in can be retrieved using - * g_dbus_message_get_byte_order(). + * Gets the flags that @manager was constructed with. * - * Returns: A new #GDBusMessage or %NULL if @error is set. Free with - * g_object_unref(). - * Since: 2.26 + * Returns: Zero of more flags from the #GDBusObjectManagerClientFlags + * enumeration. + * Since: 2.30 */ /** - * g_dbus_message_new_method_call: - * @name: (nullable): A valid D-Bus name or %NULL. - * @path: A valid object path. - * @interface_: (nullable): A valid D-Bus interface name or %NULL. - * @method: A valid method name. + * g_dbus_object_manager_client_get_name: + * @manager: A #GDBusObjectManagerClient * - * Creates a new #GDBusMessage for a method call. + * Gets the name that @manager is for, or %NULL if not a message bus + * connection. * - * Returns: A #GDBusMessage. Free with g_object_unref(). - * Since: 2.26 + * Returns: A unique or well-known name. Do not free, the string + * belongs to @manager. + * Since: 2.30 */ /** - * g_dbus_message_new_method_error: - * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to - * create a reply message to. - * @error_name: A valid D-Bus error name. - * @error_message_format: The D-Bus error message in a printf() format. - * @...: Arguments for @error_message_format. + * g_dbus_object_manager_client_get_name_owner: + * @manager: A #GDBusObjectManagerClient. * - * Creates a new #GDBusMessage that is an error reply to @method_call_message. + * The unique name that owns the name that @manager is for or %NULL if + * no-one currently owns that name. You can connect to the + * #GObject::notify signal to track changes to the + * #GDBusObjectManagerClient:name-owner property. * - * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref(). - * Since: 2.26 + * Returns: (nullable): The name owner or %NULL if no name owner + * exists. Free with g_free(). + * Since: 2.30 */ /** - * g_dbus_message_new_method_error_literal: - * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to - * create a reply message to. - * @error_name: A valid D-Bus error name. - * @error_message: The D-Bus error message. + * g_dbus_object_manager_client_new: + * @connection: A #GDBusConnection. + * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration. + * @name: The owner of the control object (unique or well-known name). + * @object_path: The object path of the control object. + * @get_proxy_type_func: (nullable): A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies. + * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func. + * @get_proxy_type_destroy_notify: (nullable): Free function for @get_proxy_type_user_data or %NULL. + * @cancellable: (nullable): A #GCancellable or %NULL + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: The data to pass to @callback. * - * Creates a new #GDBusMessage that is an error reply to @method_call_message. + * Asynchronously creates a new #GDBusObjectManagerClient object. * - * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref(). - * Since: 2.26 + * This is an asynchronous failable constructor. When the result is + * ready, @callback will be invoked in the + * [thread-default main context][g-main-context-push-thread-default] + * of the thread you are calling this method from. You can + * then call g_dbus_object_manager_client_new_finish() to get the result. See + * g_dbus_object_manager_client_new_sync() for the synchronous version. + * + * Since: 2.30 */ /** - * g_dbus_message_new_method_error_valist: - * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to - * create a reply message to. - * @error_name: A valid D-Bus error name. - * @error_message_format: The D-Bus error message in a printf() format. - * @var_args: Arguments for @error_message_format. + * g_dbus_object_manager_client_new_finish: + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_object_manager_client_new(). + * @error: Return location for error or %NULL. * - * Like g_dbus_message_new_method_error() but intended for language bindings. + * Finishes an operation started with g_dbus_object_manager_client_new(). * - * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref(). - * Since: 2.26 + * Returns: (transfer full) (type GDBusObjectManagerClient): A + * #GDBusObjectManagerClient object or %NULL if @error is set. Free + * with g_object_unref(). + * Since: 2.30 */ /** - * g_dbus_message_new_method_reply: - * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to - * create a reply message to. + * g_dbus_object_manager_client_new_for_bus: + * @bus_type: A #GBusType. + * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration. + * @name: The owner of the control object (unique or well-known name). + * @object_path: The object path of the control object. + * @get_proxy_type_func: (nullable): A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies. + * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func. + * @get_proxy_type_destroy_notify: (nullable): Free function for @get_proxy_type_user_data or %NULL. + * @cancellable: (nullable): A #GCancellable or %NULL + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: The data to pass to @callback. * - * Creates a new #GDBusMessage that is a reply to @method_call_message. + * Like g_dbus_object_manager_client_new() but takes a #GBusType instead of a + * #GDBusConnection. * - * Returns: (transfer full): #GDBusMessage. Free with g_object_unref(). - * Since: 2.26 + * This is an asynchronous failable constructor. When the result is + * ready, @callback will be invoked in the + * [thread-default main loop][g-main-context-push-thread-default] + * of the thread you are calling this method from. You can + * then call g_dbus_object_manager_client_new_for_bus_finish() to get the result. See + * g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version. + * + * Since: 2.30 */ /** - * g_dbus_message_new_signal: - * @path: A valid object path. - * @interface_: A valid D-Bus interface name. - * @signal: A valid signal name. + * g_dbus_object_manager_client_new_for_bus_finish: + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_object_manager_client_new_for_bus(). + * @error: Return location for error or %NULL. * - * Creates a new #GDBusMessage for a signal emission. + * Finishes an operation started with g_dbus_object_manager_client_new_for_bus(). * - * Returns: A #GDBusMessage. Free with g_object_unref(). - * Since: 2.26 + * Returns: (transfer full) (type GDBusObjectManagerClient): A + * #GDBusObjectManagerClient object or %NULL if @error is set. Free + * with g_object_unref(). + * Since: 2.30 */ /** - * g_dbus_message_print: (type method-return) - * @message: A #GDBusMessage. - * @indent: Indentation level. - * - * Produces a human-readable multi-line description of @message. - * - * The contents of the description has no ABI guarantees, the contents - * and formatting is subject to change at any time. Typical output - * looks something like this: - * |[ - * Flags: none - * Version: 0 - * Serial: 4 - * Headers: - * path -> objectpath '/org/gtk/GDBus/TestObject' - * interface -> 'org.gtk.GDBus.TestInterface' - * member -> 'GimmeStdout' - * destination -> ':1.146' - * Body: () - * UNIX File Descriptors: - * (none) - * ]| - * or - * |[ - * Flags: no-reply-expected - * Version: 0 - * Serial: 477 - * Headers: - * reply-serial -> uint32 4 - * destination -> ':1.159' - * sender -> ':1.146' - * num-unix-fds -> uint32 1 - * Body: () - * UNIX File Descriptors: - * fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635 - * ]| + * g_dbus_object_manager_client_new_for_bus_sync: + * @bus_type: A #GBusType. + * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration. + * @name: The owner of the control object (unique or well-known name). + * @object_path: The object path of the control object. + * @get_proxy_type_func: (nullable): A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies. + * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func. + * @get_proxy_type_destroy_notify: (nullable): Free function for @get_proxy_type_user_data or %NULL. + * @cancellable: (nullable): A #GCancellable or %NULL + * @error: Return location for error or %NULL. * - * Returns: A string that should be freed with g_free(). - * Since: 2.26 + * Like g_dbus_object_manager_client_new_sync() but takes a #GBusType instead + * of a #GDBusConnection. + * + * This is a synchronous failable constructor - the calling thread is + * blocked until a reply is received. See g_dbus_object_manager_client_new_for_bus() + * for the asynchronous version. + * + * Returns: (transfer full) (type GDBusObjectManagerClient): A + * #GDBusObjectManagerClient object or %NULL if @error is set. Free + * with g_object_unref(). + * Since: 2.30 */ /** - * g_dbus_message_set_body: - * @message: A #GDBusMessage. - * @body: Either %NULL or a #GVariant that is a tuple. + * g_dbus_object_manager_client_new_sync: + * @connection: A #GDBusConnection. + * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration. + * @name: (nullable): The owner of the control object (unique or well-known name), or %NULL when not using a message bus connection. + * @object_path: The object path of the control object. + * @get_proxy_type_func: (nullable): A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies. + * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func. + * @get_proxy_type_destroy_notify: (nullable): Free function for @get_proxy_type_user_data or %NULL. + * @cancellable: (nullable): A #GCancellable or %NULL + * @error: Return location for error or %NULL. * - * Sets the body @message. As a side-effect the - * %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the - * type string of @body (or cleared if @body is %NULL). + * Creates a new #GDBusObjectManagerClient object. * - * If @body is floating, @message assumes ownership of @body. + * This is a synchronous failable constructor - the calling thread is + * blocked until a reply is received. See g_dbus_object_manager_client_new() + * for the asynchronous version. * - * Since: 2.26 + * Returns: (transfer full) (type GDBusObjectManagerClient): A + * #GDBusObjectManagerClient object or %NULL if @error is set. Free + * with g_object_unref(). + * Since: 2.30 */ /** - * g_dbus_message_set_byte_order: - * @message: A #GDBusMessage. - * @byte_order: The byte order. + * g_dbus_object_manager_get_interface: + * @manager: A #GDBusObjectManager. + * @object_path: Object path to look up. + * @interface_name: D-Bus interface name to look up. * - * Sets the byte order of @message. + * Gets the interface proxy for @interface_name at @object_path, if + * any. + * + * Returns: (transfer full): A #GDBusInterface instance or %NULL. Free + * with g_object_unref(). + * Since: 2.30 */ /** - * g_dbus_message_set_destination: - * @message: A #GDBusMessage. - * @value: The value to set. + * g_dbus_object_manager_get_object: + * @manager: A #GDBusObjectManager. + * @object_path: Object path to look up. * - * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field. + * Gets the #GDBusObjectProxy at @object_path, if any. * - * Since: 2.26 + * Returns: (transfer full): A #GDBusObject or %NULL. Free with + * g_object_unref(). + * Since: 2.30 */ /** - * g_dbus_message_set_error_name: - * @message: A #GDBusMessage. - * @value: The value to set. + * g_dbus_object_manager_get_object_path: + * @manager: A #GDBusObjectManager. * - * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field. + * Gets the object path that @manager is for. * - * Since: 2.26 + * Returns: A string owned by @manager. Do not free. + * Since: 2.30 */ /** - * g_dbus_message_set_flags: - * @message: A #GDBusMessage. - * @flags: Flags for @message that are set (typically values from the #GDBusMessageFlags - * enumeration bitwise ORed together). + * g_dbus_object_manager_get_objects: + * @manager: A #GDBusObjectManager. * - * Sets the flags to set on @message. + * Gets all #GDBusObject objects known to @manager. * - * Since: 2.26 + * Returns: (transfer full) (element-type GDBusObject): A list of + * #GDBusObject objects. The returned list should be freed with + * g_list_free() after each element has been freed with + * g_object_unref(). + * Since: 2.30 */ /** - * g_dbus_message_set_header: - * @message: A #GDBusMessage. - * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration) - * @value: (nullable): A #GVariant to set the header field or %NULL to clear the header field. + * g_dbus_object_manager_server_export: + * @manager: A #GDBusObjectManagerServer. + * @object: A #GDBusObjectSkeleton. * - * Sets a header field on @message. + * Exports @object on @manager. * - * If @value is floating, @message assumes ownership of @value. + * If there is already a #GDBusObject exported at the object path, + * then the old object is removed. * - * Since: 2.26 + * The object path for @object must be in the hierarchy rooted by the + * object path for @manager. + * + * Note that @manager will take a reference on @object for as long as + * it is exported. + * + * Since: 2.30 */ /** - * g_dbus_message_set_interface: - * @message: A #GDBusMessage. - * @value: The value to set. + * g_dbus_object_manager_server_export_uniquely: + * @manager: A #GDBusObjectManagerServer. + * @object: An object. * - * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field. + * Like g_dbus_object_manager_server_export() but appends a string of + * the form _N (with N being a natural number) to @object's object path + * if an object with the given path already exists. As such, the + * #GDBusObjectProxy:g-object-path property of @object may be modified. * - * Since: 2.26 + * Since: 2.30 */ /** - * g_dbus_message_set_member: - * @message: A #GDBusMessage. - * @value: The value to set. + * g_dbus_object_manager_server_get_connection: + * @manager: A #GDBusObjectManagerServer * - * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field. + * Gets the #GDBusConnection used by @manager. * - * Since: 2.26 + * Returns: (transfer full): A #GDBusConnection object or %NULL if + * @manager isn't exported on a connection. The returned object should + * be freed with g_object_unref(). + * Since: 2.30 */ /** - * g_dbus_message_set_message_type: - * @message: A #GDBusMessage. - * @type: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration). + * g_dbus_object_manager_server_is_exported: + * @manager: A #GDBusObjectManagerServer. + * @object: An object. * - * Sets @message to be of @type. + * Returns whether @object is currently exported on @manager. * - * Since: 2.26 + * Returns: %TRUE if @object is exported + * Since: 2.34 */ /** - * g_dbus_message_set_num_unix_fds: - * @message: A #GDBusMessage. - * @value: The value to set. + * g_dbus_object_manager_server_new: + * @object_path: The object path to export the manager object at. * - * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field. + * Creates a new #GDBusObjectManagerServer object. * - * Since: 2.26 + * The returned server isn't yet exported on any connection. To do so, + * use g_dbus_object_manager_server_set_connection(). Normally you + * want to export all of your objects before doing so to avoid + * [InterfacesAdded](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager) + * signals being emitted. + * + * Returns: A #GDBusObjectManagerServer object. Free with g_object_unref(). + * Since: 2.30 */ /** - * g_dbus_message_set_path: - * @message: A #GDBusMessage. - * @value: The value to set. - * - * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field. + * g_dbus_object_manager_server_set_connection: + * @manager: A #GDBusObjectManagerServer. + * @connection: (nullable): A #GDBusConnection or %NULL. * - * Since: 2.26 + * Exports all objects managed by @manager on @connection. If + * @connection is %NULL, stops exporting objects. */ /** - * g_dbus_message_set_reply_serial: - * @message: A #GDBusMessage. - * @value: The value to set. + * g_dbus_object_manager_server_unexport: + * @manager: A #GDBusObjectManagerServer. + * @object_path: An object path. * - * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field. + * If @manager has an object at @path, removes the object. Otherwise + * does nothing. * - * Since: 2.26 + * Note that @object_path must be in the hierarchy rooted by the + * object path for @manager. + * + * Returns: %TRUE if object at @object_path was removed, %FALSE otherwise. + * Since: 2.30 */ /** - * g_dbus_message_set_sender: - * @message: A #GDBusMessage. - * @value: The value to set. + * g_dbus_object_proxy_get_connection: + * @proxy: a #GDBusObjectProxy * - * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field. + * Gets the connection that @proxy is for. * - * Since: 2.26 + * Returns: (transfer none): A #GDBusConnection. Do not free, the + * object is owned by @proxy. + * Since: 2.30 */ /** - * g_dbus_message_set_serial: - * @message: A #GDBusMessage. - * @serial: A #guint32. + * g_dbus_object_proxy_new: + * @connection: a #GDBusConnection + * @object_path: the object path * - * Sets the serial for @message. + * Creates a new #GDBusObjectProxy for the given connection and + * object path. * - * Since: 2.26 + * Returns: a new #GDBusObjectProxy + * Since: 2.30 */ /** - * g_dbus_message_set_signature: - * @message: A #GDBusMessage. - * @value: The value to set. + * g_dbus_object_skeleton_add_interface: + * @object: A #GDBusObjectSkeleton. + * @interface_: A #GDBusInterfaceSkeleton. * - * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field. + * Adds @interface_ to @object. * - * Since: 2.26 + * If @object already contains a #GDBusInterfaceSkeleton with the same + * interface name, it is removed before @interface_ is added. + * + * Note that @object takes its own reference on @interface_ and holds + * it until removed. + * + * Since: 2.30 */ /** - * g_dbus_message_set_unix_fd_list: - * @message: A #GDBusMessage. - * @fd_list: (nullable): A #GUnixFDList or %NULL. + * g_dbus_object_skeleton_flush: + * @object: A #GDBusObjectSkeleton. * - * Sets the UNIX file descriptors associated with @message. As a - * side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header - * field is set to the number of fds in @fd_list (or cleared if - * @fd_list is %NULL). + * This method simply calls g_dbus_interface_skeleton_flush() on all + * interfaces belonging to @object. See that method for when flushing + * is useful. * - * This method is only available on UNIX. + * Since: 2.30 + */ + + +/** + * g_dbus_object_skeleton_new: + * @object_path: An object path. * - * Since: 2.26 + * Creates a new #GDBusObjectSkeleton. + * + * Returns: A #GDBusObjectSkeleton. Free with g_object_unref(). + * Since: 2.30 */ /** - * g_dbus_message_to_blob: - * @message: A #GDBusMessage. - * @out_size: Return location for size of generated blob. - * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported. - * @error: Return location for error. + * g_dbus_object_skeleton_remove_interface: + * @object: A #GDBusObjectSkeleton. + * @interface_: A #GDBusInterfaceSkeleton. * - * Serializes @message to a blob. The byte order returned by - * g_dbus_message_get_byte_order() will be used. + * Removes @interface_ from @object. * - * Returns: (array length=out_size) (transfer full): A pointer to a - * valid binary D-Bus message of @out_size bytes generated by @message - * or %NULL if @error is set. Free with g_free(). - * Since: 2.26 + * Since: 2.30 */ /** - * g_dbus_message_to_gerror: - * @message: A #GDBusMessage. - * @error: The #GError to set. + * g_dbus_object_skeleton_remove_interface_by_name: + * @object: A #GDBusObjectSkeleton. + * @interface_name: A D-Bus interface name. * - * If @message is not of type %G_DBUS_MESSAGE_TYPE_ERROR does - * nothing and returns %FALSE. + * Removes the #GDBusInterface with @interface_name from @object. * - * Otherwise this method encodes the error in @message as a #GError - * using g_dbus_error_set_dbus_error() using the information in the - * %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as - * well as the first string item in @message's body. + * If no D-Bus interface of the given interface exists, this function + * does nothing. * - * Returns: %TRUE if @error was set, %FALSE otherwise. - * Since: 2.26 + * Since: 2.30 */ /** - * g_dbus_method_info_ref: - * @info: A #GDBusMethodInfo + * g_dbus_object_skeleton_set_object_path: + * @object: A #GDBusObjectSkeleton. + * @object_path: A valid D-Bus object path. + * + * Sets the object path for @object. + * + * Since: 2.30 + */ + + +/** + * g_dbus_property_info_ref: + * @info: A #GDBusPropertyInfo * * If @info is statically allocated does nothing. Otherwise increases * the reference count. @@ -19367,8 +18759,8 @@ /** - * g_dbus_method_info_unref: - * @info: A #GDBusMethodInfo. + * g_dbus_property_info_unref: + * @info: A #GDBusPropertyInfo. * * If @info is statically allocated, does nothing. Otherwise decreases * the reference count of @info. When its reference count drops to 0, @@ -19379,2944 +18771,3184 @@ /** - * g_dbus_method_invocation_get_connection: - * @invocation: A #GDBusMethodInvocation. + * g_dbus_proxy_call: + * @proxy: A #GDBusProxy. + * @method_name: Name of method to invoke. + * @parameters: (nullable): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters. + * @flags: Flags from the #GDBusCallFlags enumeration. + * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning + * "infinite") or -1 to use the proxy default timeout. + * @cancellable: (nullable): A #GCancellable or %NULL. + * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't + * care about the result of the method invocation. + * @user_data: The data to pass to @callback. * - * Gets the #GDBusConnection the method was invoked on. + * Asynchronously invokes the @method_name method on @proxy. * - * Returns: (transfer none): A #GDBusConnection. Do not free, it is owned by @invocation. - * Since: 2.26 - */ - - -/** - * g_dbus_method_invocation_get_interface_name: - * @invocation: A #GDBusMethodInvocation. + * If @method_name contains any dots, then @name is split into interface and + * method name parts. This allows using @proxy for invoking methods on + * other interfaces. * - * Gets the name of the D-Bus interface the method was invoked on. + * If the #GDBusConnection associated with @proxy is closed then + * the operation will fail with %G_IO_ERROR_CLOSED. If + * @cancellable is canceled, the operation will fail with + * %G_IO_ERROR_CANCELLED. If @parameters contains a value not + * compatible with the D-Bus protocol, the operation fails with + * %G_IO_ERROR_INVALID_ARGUMENT. * - * If this method call is a property Get, Set or GetAll call that has - * been redirected to the method call handler then - * "org.freedesktop.DBus.Properties" will be returned. See - * #GDBusInterfaceVTable for more information. + * If the @parameters #GVariant is floating, it is consumed. This allows + * convenient 'inline' use of g_variant_new(), e.g.: + * |[ + * g_dbus_proxy_call (proxy, + * "TwoStrings", + * g_variant_new ("(ss)", + * "Thing One", + * "Thing Two"), + * G_DBUS_CALL_FLAGS_NONE, + * -1, + * NULL, + * (GAsyncReadyCallback) two_strings_done, + * &data); + * ]| + * + * If @proxy has an expected interface (see + * #GDBusProxy:g-interface-info) and @method_name is referenced by it, + * then the return value is checked against the return type. + * + * This is an asynchronous method. When the operation is finished, + * @callback will be invoked in the + * [thread-default main context][g-main-context-push-thread-default] + * of the thread you are calling this method from. + * You can then call g_dbus_proxy_call_finish() to get the result of + * the operation. See g_dbus_proxy_call_sync() for the synchronous + * version of this method. + * + * If @callback is %NULL then the D-Bus method call message will be sent with + * the %G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag set. * - * Returns: A string. Do not free, it is owned by @invocation. * Since: 2.26 */ /** - * g_dbus_method_invocation_get_message: - * @invocation: A #GDBusMethodInvocation. - * - * Gets the #GDBusMessage for the method invocation. This is useful if - * you need to use low-level protocol features, such as UNIX file - * descriptor passing, that cannot be properly expressed in the - * #GVariant API. + * g_dbus_proxy_call_finish: + * @proxy: A #GDBusProxy. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call(). + * @error: Return location for error or %NULL. * - * See this [server][gdbus-server] and [client][gdbus-unix-fd-client] - * for an example of how to use this low-level API to send and receive - * UNIX file descriptors. + * Finishes an operation started with g_dbus_proxy_call(). * - * Returns: (transfer none): #GDBusMessage. Do not free, it is owned by @invocation. + * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with + * return values. Free with g_variant_unref(). * Since: 2.26 */ /** - * g_dbus_method_invocation_get_method_info: - * @invocation: A #GDBusMethodInvocation. + * g_dbus_proxy_call_sync: + * @proxy: A #GDBusProxy. + * @method_name: Name of method to invoke. + * @parameters: (nullable): A #GVariant tuple with parameters for the signal + * or %NULL if not passing parameters. + * @flags: Flags from the #GDBusCallFlags enumeration. + * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning + * "infinite") or -1 to use the proxy default timeout. + * @cancellable: (nullable): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. * - * Gets information about the method call, if any. + * Synchronously invokes the @method_name method on @proxy. * - * If this method invocation is a property Get, Set or GetAll call that - * has been redirected to the method call handler then %NULL will be - * returned. See g_dbus_method_invocation_get_property_info() and - * #GDBusInterfaceVTable for more information. + * If @method_name contains any dots, then @name is split into interface and + * method name parts. This allows using @proxy for invoking methods on + * other interfaces. * - * Returns: A #GDBusMethodInfo or %NULL. Do not free, it is owned by @invocation. + * If the #GDBusConnection associated with @proxy is disconnected then + * the operation will fail with %G_IO_ERROR_CLOSED. If + * @cancellable is canceled, the operation will fail with + * %G_IO_ERROR_CANCELLED. If @parameters contains a value not + * compatible with the D-Bus protocol, the operation fails with + * %G_IO_ERROR_INVALID_ARGUMENT. + * + * If the @parameters #GVariant is floating, it is consumed. This allows + * convenient 'inline' use of g_variant_new(), e.g.: + * |[ + * g_dbus_proxy_call_sync (proxy, + * "TwoStrings", + * g_variant_new ("(ss)", + * "Thing One", + * "Thing Two"), + * G_DBUS_CALL_FLAGS_NONE, + * -1, + * NULL, + * &error); + * ]| + * + * The calling thread is blocked until a reply is received. See + * g_dbus_proxy_call() for the asynchronous version of this + * method. + * + * If @proxy has an expected interface (see + * #GDBusProxy:g-interface-info) and @method_name is referenced by it, + * then the return value is checked against the return type. + * + * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with + * return values. Free with g_variant_unref(). * Since: 2.26 */ /** - * g_dbus_method_invocation_get_method_name: - * @invocation: A #GDBusMethodInvocation. + * g_dbus_proxy_call_with_unix_fd_list: + * @proxy: A #GDBusProxy. + * @method_name: Name of method to invoke. + * @parameters: (nullable): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters. + * @flags: Flags from the #GDBusCallFlags enumeration. + * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning + * "infinite") or -1 to use the proxy default timeout. + * @fd_list: (nullable): A #GUnixFDList or %NULL. + * @cancellable: (nullable): A #GCancellable or %NULL. + * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't + * care about the result of the method invocation. + * @user_data: The data to pass to @callback. * - * Gets the name of the method that was invoked. + * Like g_dbus_proxy_call() but also takes a #GUnixFDList object. * - * Returns: A string. Do not free, it is owned by @invocation. - * Since: 2.26 + * This method is only available on UNIX. + * + * Since: 2.30 */ /** - * g_dbus_method_invocation_get_object_path: - * @invocation: A #GDBusMethodInvocation. + * g_dbus_proxy_call_with_unix_fd_list_finish: + * @proxy: A #GDBusProxy. + * @out_fd_list: (out) (optional): Return location for a #GUnixFDList or %NULL. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call_with_unix_fd_list(). + * @error: Return location for error or %NULL. * - * Gets the object path the method was invoked on. + * Finishes an operation started with g_dbus_proxy_call_with_unix_fd_list(). * - * Returns: A string. Do not free, it is owned by @invocation. - * Since: 2.26 + * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with + * return values. Free with g_variant_unref(). + * Since: 2.30 */ /** - * g_dbus_method_invocation_get_parameters: - * @invocation: A #GDBusMethodInvocation. + * g_dbus_proxy_call_with_unix_fd_list_sync: + * @proxy: A #GDBusProxy. + * @method_name: Name of method to invoke. + * @parameters: (nullable): A #GVariant tuple with parameters for the signal + * or %NULL if not passing parameters. + * @flags: Flags from the #GDBusCallFlags enumeration. + * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning + * "infinite") or -1 to use the proxy default timeout. + * @fd_list: (nullable): A #GUnixFDList or %NULL. + * @out_fd_list: (out) (optional): Return location for a #GUnixFDList or %NULL. + * @cancellable: (nullable): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. * - * Gets the parameters of the method invocation. If there are no input - * parameters then this will return a GVariant with 0 children rather than NULL. + * Like g_dbus_proxy_call_sync() but also takes and returns #GUnixFDList objects. * - * Returns: (transfer none): A #GVariant tuple. Do not unref this because it is owned by @invocation. - * Since: 2.26 + * This method is only available on UNIX. + * + * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with + * return values. Free with g_variant_unref(). + * Since: 2.30 */ /** - * g_dbus_method_invocation_get_property_info: - * @invocation: A #GDBusMethodInvocation - * - * Gets information about the property that this method call is for, if - * any. - * - * This will only be set in the case of an invocation in response to a - * property Get or Set call that has been directed to the method call - * handler for an object on account of its property_get() or - * property_set() vtable pointers being unset. + * g_dbus_proxy_get_cached_property: + * @proxy: A #GDBusProxy. + * @property_name: Property name. * - * See #GDBusInterfaceVTable for more information. + * Looks up the value for a property from the cache. This call does no + * blocking IO. * - * If the call was GetAll, %NULL will be returned. + * If @proxy has an expected interface (see + * #GDBusProxy:g-interface-info) and @property_name is referenced by + * it, then @value is checked against the type of the property. * - * Returns: (transfer none): a #GDBusPropertyInfo or %NULL - * Since: 2.38 + * Returns: (transfer full) (nullable): A reference to the #GVariant instance + * that holds the value for @property_name or %NULL if the value is not in + * the cache. The returned reference must be freed with g_variant_unref(). + * Since: 2.26 */ /** - * g_dbus_method_invocation_get_sender: - * @invocation: A #GDBusMethodInvocation. + * g_dbus_proxy_get_cached_property_names: + * @proxy: A #GDBusProxy. * - * Gets the bus name that invoked the method. + * Gets the names of all cached properties on @proxy. * - * Returns: A string. Do not free, it is owned by @invocation. + * Returns: (transfer full) (nullable) (array zero-terminated=1): A + * %NULL-terminated array of strings or %NULL if + * @proxy has no cached properties. Free the returned array with + * g_strfreev(). * Since: 2.26 */ /** - * g_dbus_method_invocation_get_user_data: (skip) - * @invocation: A #GDBusMethodInvocation. + * g_dbus_proxy_get_connection: + * @proxy: A #GDBusProxy. * - * Gets the @user_data #gpointer passed to g_dbus_connection_register_object(). + * Gets the connection @proxy is for. * - * Returns: A #gpointer. + * Returns: (transfer none): A #GDBusConnection owned by @proxy. Do not free. * Since: 2.26 */ /** - * g_dbus_method_invocation_return_dbus_error: - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @error_name: A valid D-Bus error name. - * @error_message: A valid D-Bus error message. + * g_dbus_proxy_get_default_timeout: + * @proxy: A #GDBusProxy. * - * Finishes handling a D-Bus method call by returning an error. + * Gets the timeout to use if -1 (specifying default timeout) is + * passed as @timeout_msec in the g_dbus_proxy_call() and + * g_dbus_proxy_call_sync() functions. * - * This method will take ownership of @invocation. See - * #GDBusInterfaceVTable for more information about the ownership of - * @invocation. + * See the #GDBusProxy:g-default-timeout property for more details. * + * Returns: Timeout to use for @proxy. * Since: 2.26 */ /** - * g_dbus_method_invocation_return_error: - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @domain: A #GQuark for the #GError error domain. - * @code: The error code. - * @format: printf()-style format. - * @...: Parameters for @format. + * g_dbus_proxy_get_flags: + * @proxy: A #GDBusProxy. * - * Finishes handling a D-Bus method call by returning an error. + * Gets the flags that @proxy was constructed with. * - * See g_dbus_error_encode_gerror() for details about what error name - * will be returned on the wire. In a nutshell, if the given error is - * registered using g_dbus_error_register_error() the name given - * during registration is used. Otherwise, a name of the form - * `org.gtk.GDBus.UnmappedGError.Quark...` is used. This provides - * transparent mapping of #GError between applications using GDBus. + * Returns: Flags from the #GDBusProxyFlags enumeration. + * Since: 2.26 + */ + + +/** + * g_dbus_proxy_get_interface_info: + * @proxy: A #GDBusProxy * - * If you are writing an application intended to be portable, - * always register errors with g_dbus_error_register_error() - * or use g_dbus_method_invocation_return_dbus_error(). + * Returns the #GDBusInterfaceInfo, if any, specifying the interface + * that @proxy conforms to. See the #GDBusProxy:g-interface-info + * property for more details. * - * This method will take ownership of @invocation. See - * #GDBusInterfaceVTable for more information about the ownership of - * @invocation. + * Returns: (transfer none) (nullable): A #GDBusInterfaceInfo or %NULL. + * Do not unref the returned object, it is owned by @proxy. + * Since: 2.26 + */ + + +/** + * g_dbus_proxy_get_interface_name: + * @proxy: A #GDBusProxy. * - * Since 2.48, if the method call requested for a reply not to be sent - * then this call will free @invocation but otherwise do nothing (as per - * the recommendations of the D-Bus specification). + * Gets the D-Bus interface name @proxy is for. * + * Returns: A string owned by @proxy. Do not free. * Since: 2.26 */ /** - * g_dbus_method_invocation_return_error_literal: - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @domain: A #GQuark for the #GError error domain. - * @code: The error code. - * @message: The error message. - * - * Like g_dbus_method_invocation_return_error() but without printf()-style formatting. + * g_dbus_proxy_get_name: + * @proxy: A #GDBusProxy. * - * This method will take ownership of @invocation. See - * #GDBusInterfaceVTable for more information about the ownership of - * @invocation. + * Gets the name that @proxy was constructed for. * + * Returns: A string owned by @proxy. Do not free. * Since: 2.26 */ /** - * g_dbus_method_invocation_return_error_valist: - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @domain: A #GQuark for the #GError error domain. - * @code: The error code. - * @format: printf()-style format. - * @var_args: #va_list of parameters for @format. - * - * Like g_dbus_method_invocation_return_error() but intended for - * language bindings. + * g_dbus_proxy_get_name_owner: + * @proxy: A #GDBusProxy. * - * This method will take ownership of @invocation. See - * #GDBusInterfaceVTable for more information about the ownership of - * @invocation. + * The unique name that owns the name that @proxy is for or %NULL if + * no-one currently owns that name. You may connect to the + * #GObject::notify signal to track changes to the + * #GDBusProxy:g-name-owner property. * + * Returns: (transfer full) (nullable): The name owner or %NULL if no name + * owner exists. Free with g_free(). * Since: 2.26 */ /** - * g_dbus_method_invocation_return_gerror: - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @error: A #GError. - * - * Like g_dbus_method_invocation_return_error() but takes a #GError - * instead of the error domain, error code and message. + * g_dbus_proxy_get_object_path: + * @proxy: A #GDBusProxy. * - * This method will take ownership of @invocation. See - * #GDBusInterfaceVTable for more information about the ownership of - * @invocation. + * Gets the object path @proxy is for. * + * Returns: A string owned by @proxy. Do not free. * Since: 2.26 */ /** - * g_dbus_method_invocation_return_value: - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @parameters: (nullable): A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters. - * - * Finishes handling a D-Bus method call by returning @parameters. - * If the @parameters GVariant is floating, it is consumed. + * g_dbus_proxy_new: + * @connection: A #GDBusConnection. + * @flags: Flags used when constructing the proxy. + * @info: (nullable): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL. + * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @interface_name: A D-Bus interface name. + * @cancellable: (nullable): A #GCancellable or %NULL. + * @callback: Callback function to invoke when the proxy is ready. + * @user_data: User data to pass to @callback. * - * It is an error if @parameters is not of the right format: it must be a tuple - * containing the out-parameters of the D-Bus method. Even if the method has a - * single out-parameter, it must be contained in a tuple. If the method has no - * out-parameters, @parameters may be %NULL or an empty tuple. + * Creates a proxy for accessing @interface_name on the remote object + * at @object_path owned by @name at @connection and asynchronously + * loads D-Bus properties unless the + * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. Connect to + * the #GDBusProxy::g-properties-changed signal to get notified about + * property changes. * - * |[ - * GDBusMethodInvocation *invocation = some_invocation; - * g_autofree gchar *result_string = NULL; - * g_autoptr (GError) error = NULL; + * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up + * match rules for signals. Connect to the #GDBusProxy::g-signal signal + * to handle signals from the remote object. * - * result_string = calculate_result (&error); + * If both %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES and + * %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS are set, this constructor is + * guaranteed to complete immediately without blocking. * - * if (error != NULL) - * g_dbus_method_invocation_return_gerror (invocation, error); - * else - * g_dbus_method_invocation_return_value (invocation, - * g_variant_new ("(s)", result_string)); + * If @name is a well-known name and the + * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START and %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION + * flags aren't set and no name owner currently exists, the message bus + * will be requested to launch a name owner for the name. * - * // Do not free @invocation here; returning a value does that - * ]| + * This is a failable asynchronous constructor - when the proxy is + * ready, @callback will be invoked and you can use + * g_dbus_proxy_new_finish() to get the result. * - * This method will take ownership of @invocation. See - * #GDBusInterfaceVTable for more information about the ownership of - * @invocation. + * See g_dbus_proxy_new_sync() and for a synchronous version of this constructor. * - * Since 2.48, if the method call requested for a reply not to be sent - * then this call will sink @parameters and free @invocation, but - * otherwise do nothing (as per the recommendations of the D-Bus - * specification). + * #GDBusProxy is used in this [example][gdbus-wellknown-proxy]. * * Since: 2.26 */ /** - * g_dbus_method_invocation_return_value_with_unix_fd_list: - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @parameters: (nullable): A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters. - * @fd_list: (nullable): A #GUnixFDList or %NULL. - * - * Like g_dbus_method_invocation_return_value() but also takes a #GUnixFDList. - * - * This method is only available on UNIX. + * g_dbus_proxy_new_finish: + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new(). + * @error: Return location for error or %NULL. * - * This method will take ownership of @invocation. See - * #GDBusInterfaceVTable for more information about the ownership of - * @invocation. + * Finishes creating a #GDBusProxy. * - * Since: 2.30 + * Returns: (transfer full): A #GDBusProxy or %NULL if @error is set. + * Free with g_object_unref(). + * Since: 2.26 */ /** - * g_dbus_method_invocation_take_error: (skip) - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @error: (transfer full): A #GError. + * g_dbus_proxy_new_for_bus: + * @bus_type: A #GBusType. + * @flags: Flags used when constructing the proxy. + * @info: (nullable): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @interface_name: A D-Bus interface name. + * @cancellable: (nullable): A #GCancellable or %NULL. + * @callback: Callback function to invoke when the proxy is ready. + * @user_data: User data to pass to @callback. * - * Like g_dbus_method_invocation_return_gerror() but takes ownership - * of @error so the caller does not need to free it. + * Like g_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection. * - * This method will take ownership of @invocation. See - * #GDBusInterfaceVTable for more information about the ownership of - * @invocation. + * #GDBusProxy is used in this [example][gdbus-wellknown-proxy]. * - * Since: 2.30 + * Since: 2.26 */ /** - * g_dbus_node_info_generate_xml: - * @info: A #GDBusNodeInfo. - * @indent: Indentation level. - * @string_builder: A #GString to to append XML data to. - * - * Appends an XML representation of @info (and its children) to @string_builder. + * g_dbus_proxy_new_for_bus_finish: + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new_for_bus(). + * @error: Return location for error or %NULL. * - * This function is typically used for generating introspection XML documents at run-time for - * handling the `org.freedesktop.DBus.Introspectable.Introspect` method. + * Finishes creating a #GDBusProxy. * + * Returns: (transfer full): A #GDBusProxy or %NULL if @error is set. + * Free with g_object_unref(). * Since: 2.26 */ /** - * g_dbus_node_info_lookup_interface: - * @info: A #GDBusNodeInfo. - * @name: A D-Bus interface name. + * g_dbus_proxy_new_for_bus_sync: + * @bus_type: A #GBusType. + * @flags: Flags used when constructing the proxy. + * @info: (nullable): A #GDBusInterfaceInfo specifying the minimal interface + * that @proxy conforms to or %NULL. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @interface_name: A D-Bus interface name. + * @cancellable: (nullable): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. * - * Looks up information about an interface. + * Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. * - * The cost of this function is O(n) in number of interfaces. + * #GDBusProxy is used in this [example][gdbus-wellknown-proxy]. * - * Returns: (transfer none): A #GDBusInterfaceInfo or %NULL if not found. Do not free, it is owned by @info. + * Returns: (transfer full): A #GDBusProxy or %NULL if error is set. + * Free with g_object_unref(). * Since: 2.26 */ /** - * g_dbus_node_info_new_for_xml: - * @xml_data: Valid D-Bus introspection XML. - * @error: Return location for error. + * g_dbus_proxy_new_sync: + * @connection: A #GDBusConnection. + * @flags: Flags used when constructing the proxy. + * @info: (nullable): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL. + * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @interface_name: A D-Bus interface name. + * @cancellable: (nullable): A #GCancellable or %NULL. + * @error: (nullable): Return location for error or %NULL. * - * Parses @xml_data and returns a #GDBusNodeInfo representing the data. + * Creates a proxy for accessing @interface_name on the remote object + * at @object_path owned by @name at @connection and synchronously + * loads D-Bus properties unless the + * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. * - * The introspection XML must contain exactly one top-level - * element. + * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up + * match rules for signals. Connect to the #GDBusProxy::g-signal signal + * to handle signals from the remote object. * - * Note that this routine is using a - * [GMarkup][glib-Simple-XML-Subset-Parser.description]-based - * parser that only accepts a subset of valid XML documents. + * If both %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES and + * %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS are set, this constructor is + * guaranteed to return immediately without blocking. * - * Returns: A #GDBusNodeInfo structure or %NULL if @error is set. Free - * with g_dbus_node_info_unref(). + * If @name is a well-known name and the + * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START and %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION + * flags aren't set and no name owner currently exists, the message bus + * will be requested to launch a name owner for the name. + * + * This is a synchronous failable constructor. See g_dbus_proxy_new() + * and g_dbus_proxy_new_finish() for the asynchronous version. + * + * #GDBusProxy is used in this [example][gdbus-wellknown-proxy]. + * + * Returns: (transfer full): A #GDBusProxy or %NULL if error is set. + * Free with g_object_unref(). * Since: 2.26 */ /** - * g_dbus_node_info_ref: - * @info: A #GDBusNodeInfo + * g_dbus_proxy_set_cached_property: + * @proxy: A #GDBusProxy + * @property_name: Property name. + * @value: (nullable): Value for the property or %NULL to remove it from the cache. * - * If @info is statically allocated does nothing. Otherwise increases - * the reference count. + * If @value is not %NULL, sets the cached value for the property with + * name @property_name to the value in @value. + * + * If @value is %NULL, then the cached value is removed from the + * property cache. + * + * If @proxy has an expected interface (see + * #GDBusProxy:g-interface-info) and @property_name is referenced by + * it, then @value is checked against the type of the property. + * + * If the @value #GVariant is floating, it is consumed. This allows + * convenient 'inline' use of g_variant_new(), e.g. + * |[ + * g_dbus_proxy_set_cached_property (proxy, + * "SomeProperty", + * g_variant_new ("(si)", + * "A String", + * 42)); + * ]| + * + * Normally you will not need to use this method since @proxy + * is tracking changes using the + * `org.freedesktop.DBus.Properties.PropertiesChanged` + * D-Bus signal. However, for performance reasons an object may + * decide to not use this signal for some properties and instead + * use a proprietary out-of-band mechanism to transmit changes. + * + * As a concrete example, consider an object with a property + * `ChatroomParticipants` which is an array of strings. Instead of + * transmitting the same (long) array every time the property changes, + * it is more efficient to only transmit the delta using e.g. signals + * `ChatroomParticipantJoined(String name)` and + * `ChatroomParticipantParted(String name)`. * - * Returns: The same @info. * Since: 2.26 */ /** - * g_dbus_node_info_unref: - * @info: A #GDBusNodeInfo. + * g_dbus_proxy_set_default_timeout: + * @proxy: A #GDBusProxy. + * @timeout_msec: Timeout in milliseconds. * - * If @info is statically allocated, does nothing. Otherwise decreases - * the reference count of @info. When its reference count drops to 0, - * the memory used is freed. + * Sets the timeout to use if -1 (specifying default timeout) is + * passed as @timeout_msec in the g_dbus_proxy_call() and + * g_dbus_proxy_call_sync() functions. + * + * See the #GDBusProxy:g-default-timeout property for more details. * * Since: 2.26 */ /** - * g_dbus_object_get_interface: - * @object: A #GDBusObject. - * @interface_name: A D-Bus interface name. + * g_dbus_proxy_set_interface_info: + * @proxy: A #GDBusProxy + * @info: (transfer none) (nullable): Minimum interface this proxy conforms to + * or %NULL to unset. * - * Gets the D-Bus interface with name @interface_name associated with - * @object, if any. + * Ensure that interactions with @proxy conform to the given + * interface. See the #GDBusProxy:g-interface-info property for more + * details. * - * Returns: (transfer full): %NULL if not found, otherwise a - * #GDBusInterface that must be freed with g_object_unref(). - * Since: 2.30 + * Since: 2.26 */ /** - * g_dbus_object_get_interfaces: - * @object: A #GDBusObject. + * g_dbus_server_get_client_address: + * @server: A #GDBusServer. * - * Gets the D-Bus interfaces associated with @object. + * Gets a + * [D-Bus address](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses) + * string that can be used by clients to connect to @server. * - * Returns: (element-type GDBusInterface) (transfer full): A list of #GDBusInterface instances. - * The returned list must be freed by g_list_free() after each element has been freed - * with g_object_unref(). - * Since: 2.30 + * Returns: A D-Bus address string. Do not free, the string is owned + * by @server. + * Since: 2.26 */ /** - * g_dbus_object_get_object_path: - * @object: A #GDBusObject. + * g_dbus_server_get_flags: + * @server: A #GDBusServer. * - * Gets the object path for @object. + * Gets the flags for @server. * - * Returns: A string owned by @object. Do not free. - * Since: 2.30 + * Returns: A set of flags from the #GDBusServerFlags enumeration. + * Since: 2.26 */ /** - * g_dbus_object_manager_client_get_connection: - * @manager: A #GDBusObjectManagerClient + * g_dbus_server_get_guid: + * @server: A #GDBusServer. * - * Gets the #GDBusConnection used by @manager. + * Gets the GUID for @server. * - * Returns: (transfer none): A #GDBusConnection object. Do not free, - * the object belongs to @manager. - * Since: 2.30 + * Returns: A D-Bus GUID. Do not free this string, it is owned by @server. + * Since: 2.26 */ /** - * g_dbus_object_manager_client_get_flags: - * @manager: A #GDBusObjectManagerClient + * g_dbus_server_is_active: + * @server: A #GDBusServer. * - * Gets the flags that @manager was constructed with. + * Gets whether @server is active. * - * Returns: Zero of more flags from the #GDBusObjectManagerClientFlags - * enumeration. - * Since: 2.30 + * Returns: %TRUE if server is active, %FALSE otherwise. + * Since: 2.26 */ /** - * g_dbus_object_manager_client_get_name: - * @manager: A #GDBusObjectManagerClient + * g_dbus_server_new_sync: + * @address: A D-Bus address. + * @flags: Flags from the #GDBusServerFlags enumeration. + * @guid: A D-Bus GUID. + * @observer: (nullable): A #GDBusAuthObserver or %NULL. + * @cancellable: (nullable): A #GCancellable or %NULL. + * @error: Return location for server or %NULL. * - * Gets the name that @manager is for, or %NULL if not a message bus - * connection. + * Creates a new D-Bus server that listens on the first address in + * @address that works. * - * Returns: A unique or well-known name. Do not free, the string - * belongs to @manager. - * Since: 2.30 + * Once constructed, you can use g_dbus_server_get_client_address() to + * get a D-Bus address string that clients can use to connect. + * + * To have control over the available authentication mechanisms and + * the users that are authorized to connect, it is strongly recommended + * to provide a non-%NULL #GDBusAuthObserver. + * + * Connect to the #GDBusServer::new-connection signal to handle + * incoming connections. + * + * The returned #GDBusServer isn't active - you have to start it with + * g_dbus_server_start(). + * + * #GDBusServer is used in this [example][gdbus-peer-to-peer]. + * + * This is a synchronous failable constructor. There is currently no + * asynchronous version. + * + * Returns: A #GDBusServer or %NULL if @error is set. Free with + * g_object_unref(). + * Since: 2.26 */ /** - * g_dbus_object_manager_client_get_name_owner: - * @manager: A #GDBusObjectManagerClient. + * g_dbus_server_start: + * @server: A #GDBusServer. * - * The unique name that owns the name that @manager is for or %NULL if - * no-one currently owns that name. You can connect to the - * #GObject::notify signal to track changes to the - * #GDBusObjectManagerClient:name-owner property. + * Starts @server. * - * Returns: (nullable): The name owner or %NULL if no name owner - * exists. Free with g_free(). - * Since: 2.30 + * Since: 2.26 */ /** - * g_dbus_object_manager_client_new: - * @connection: A #GDBusConnection. - * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration. - * @name: The owner of the control object (unique or well-known name). - * @object_path: The object path of the control object. - * @get_proxy_type_func: (nullable): A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies. - * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func. - * @get_proxy_type_destroy_notify: (nullable): Free function for @get_proxy_type_user_data or %NULL. - * @cancellable: (nullable): A #GCancellable or %NULL - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: The data to pass to @callback. - * - * Asynchronously creates a new #GDBusObjectManagerClient object. + * g_dbus_server_stop: + * @server: A #GDBusServer. * - * This is an asynchronous failable constructor. When the result is - * ready, @callback will be invoked in the - * [thread-default main context][g-main-context-push-thread-default] - * of the thread you are calling this method from. You can - * then call g_dbus_object_manager_client_new_finish() to get the result. See - * g_dbus_object_manager_client_new_sync() for the synchronous version. + * Stops @server. * - * Since: 2.30 + * Since: 2.26 */ /** - * g_dbus_object_manager_client_new_finish: - * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_object_manager_client_new(). - * @error: Return location for error or %NULL. + * g_dbus_signal_info_ref: + * @info: A #GDBusSignalInfo * - * Finishes an operation started with g_dbus_object_manager_client_new(). + * If @info is statically allocated does nothing. Otherwise increases + * the reference count. * - * Returns: (transfer full) (type GDBusObjectManagerClient): A - * #GDBusObjectManagerClient object or %NULL if @error is set. Free - * with g_object_unref(). - * Since: 2.30 + * Returns: The same @info. + * Since: 2.26 */ /** - * g_dbus_object_manager_client_new_for_bus: - * @bus_type: A #GBusType. - * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration. - * @name: The owner of the control object (unique or well-known name). - * @object_path: The object path of the control object. - * @get_proxy_type_func: (nullable): A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies. - * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func. - * @get_proxy_type_destroy_notify: (nullable): Free function for @get_proxy_type_user_data or %NULL. - * @cancellable: (nullable): A #GCancellable or %NULL - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: The data to pass to @callback. - * - * Like g_dbus_object_manager_client_new() but takes a #GBusType instead of a - * #GDBusConnection. + * g_dbus_signal_info_unref: + * @info: A #GDBusSignalInfo. * - * This is an asynchronous failable constructor. When the result is - * ready, @callback will be invoked in the - * [thread-default main loop][g-main-context-push-thread-default] - * of the thread you are calling this method from. You can - * then call g_dbus_object_manager_client_new_for_bus_finish() to get the result. See - * g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version. + * If @info is statically allocated, does nothing. Otherwise decreases + * the reference count of @info. When its reference count drops to 0, + * the memory used is freed. * - * Since: 2.30 + * Since: 2.26 */ /** - * g_dbus_object_manager_client_new_for_bus_finish: - * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_object_manager_client_new_for_bus(). - * @error: Return location for error or %NULL. + * g_desktop_app_info_get_action_name: + * @info: a #GDesktopAppInfo + * @action_name: the name of the action as from + * g_desktop_app_info_list_actions() * - * Finishes an operation started with g_dbus_object_manager_client_new_for_bus(). + * Gets the user-visible display name of the "additional application + * action" specified by @action_name. * - * Returns: (transfer full) (type GDBusObjectManagerClient): A - * #GDBusObjectManagerClient object or %NULL if @error is set. Free - * with g_object_unref(). - * Since: 2.30 + * This corresponds to the "Name" key within the keyfile group for the + * action. + * + * Returns: (transfer full): the locale-specific action name + * Since: 2.38 */ /** - * g_dbus_object_manager_client_new_for_bus_sync: - * @bus_type: A #GBusType. - * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration. - * @name: The owner of the control object (unique or well-known name). - * @object_path: The object path of the control object. - * @get_proxy_type_func: (nullable): A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies. - * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func. - * @get_proxy_type_destroy_notify: (nullable): Free function for @get_proxy_type_user_data or %NULL. - * @cancellable: (nullable): A #GCancellable or %NULL - * @error: Return location for error or %NULL. + * g_desktop_app_info_get_boolean: + * @info: a #GDesktopAppInfo + * @key: the key to look up * - * Like g_dbus_object_manager_client_new_sync() but takes a #GBusType instead - * of a #GDBusConnection. + * Looks up a boolean value in the keyfile backing @info. * - * This is a synchronous failable constructor - the calling thread is - * blocked until a reply is received. See g_dbus_object_manager_client_new_for_bus() - * for the asynchronous version. + * The @key is looked up in the "Desktop Entry" group. * - * Returns: (transfer full) (type GDBusObjectManagerClient): A - * #GDBusObjectManagerClient object or %NULL if @error is set. Free - * with g_object_unref(). - * Since: 2.30 + * Returns: the boolean value, or %FALSE if the key + * is not found + * Since: 2.36 */ /** - * g_dbus_object_manager_client_new_sync: - * @connection: A #GDBusConnection. - * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration. - * @name: (nullable): The owner of the control object (unique or well-known name), or %NULL when not using a message bus connection. - * @object_path: The object path of the control object. - * @get_proxy_type_func: (nullable): A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies. - * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func. - * @get_proxy_type_destroy_notify: (nullable): Free function for @get_proxy_type_user_data or %NULL. - * @cancellable: (nullable): A #GCancellable or %NULL - * @error: Return location for error or %NULL. - * - * Creates a new #GDBusObjectManagerClient object. + * g_desktop_app_info_get_categories: + * @info: a #GDesktopAppInfo * - * This is a synchronous failable constructor - the calling thread is - * blocked until a reply is received. See g_dbus_object_manager_client_new() - * for the asynchronous version. + * Gets the categories from the desktop file. * - * Returns: (transfer full) (type GDBusObjectManagerClient): A - * #GDBusObjectManagerClient object or %NULL if @error is set. Free - * with g_object_unref(). - * Since: 2.30 + * Returns: The unparsed Categories key from the desktop file; + * i.e. no attempt is made to split it by ';' or validate it. */ /** - * g_dbus_object_manager_get_interface: - * @manager: A #GDBusObjectManager. - * @object_path: Object path to lookup. - * @interface_name: D-Bus interface name to lookup. + * g_desktop_app_info_get_filename: + * @info: a #GDesktopAppInfo * - * Gets the interface proxy for @interface_name at @object_path, if - * any. + * When @info was created from a known filename, return it. In some + * situations such as the #GDesktopAppInfo returned from + * g_desktop_app_info_new_from_keyfile(), this function will return %NULL. * - * Returns: (transfer full): A #GDBusInterface instance or %NULL. Free - * with g_object_unref(). - * Since: 2.30 + * Returns: (type filename): The full path to the file for @info, + * or %NULL if not known. + * Since: 2.24 */ /** - * g_dbus_object_manager_get_object: - * @manager: A #GDBusObjectManager. - * @object_path: Object path to lookup. + * g_desktop_app_info_get_generic_name: + * @info: a #GDesktopAppInfo * - * Gets the #GDBusObjectProxy at @object_path, if any. + * Gets the generic name from the destkop file. * - * Returns: (transfer full): A #GDBusObject or %NULL. Free with - * g_object_unref(). - * Since: 2.30 + * Returns: The value of the GenericName key */ /** - * g_dbus_object_manager_get_object_path: - * @manager: A #GDBusObjectManager. + * g_desktop_app_info_get_implementations: + * @interface: the name of the interface * - * Gets the object path that @manager is for. + * Gets all applications that implement @interface. * - * Returns: A string owned by @manager. Do not free. - * Since: 2.30 + * An application implements an interface if that interface is listed in + * the Implements= line of the desktop file of the application. + * + * Returns: (element-type GDesktopAppInfo) (transfer full): a list of #GDesktopAppInfo + * objects. + * Since: 2.42 */ /** - * g_dbus_object_manager_get_objects: - * @manager: A #GDBusObjectManager. + * g_desktop_app_info_get_is_hidden: + * @info: a #GDesktopAppInfo. * - * Gets all #GDBusObject objects known to @manager. + * A desktop file is hidden if the Hidden key in it is + * set to True. * - * Returns: (transfer full) (element-type GDBusObject): A list of - * #GDBusObject objects. The returned list should be freed with - * g_list_free() after each element has been freed with - * g_object_unref(). - * Since: 2.30 + * Returns: %TRUE if hidden, %FALSE otherwise. */ /** - * g_dbus_object_manager_server_export: - * @manager: A #GDBusObjectManagerServer. - * @object: A #GDBusObjectSkeleton. + * g_desktop_app_info_get_keywords: + * @info: a #GDesktopAppInfo * - * Exports @object on @manager. + * Gets the keywords from the desktop file. * - * If there is already a #GDBusObject exported at the object path, - * then the old object is removed. + * Returns: (transfer none): The value of the Keywords key + * Since: 2.32 + */ + + +/** + * g_desktop_app_info_get_locale_string: + * @info: a #GDesktopAppInfo + * @key: the key to look up * - * The object path for @object must be in the hierarchy rooted by the - * object path for @manager. + * Looks up a localized string value in the keyfile backing @info + * translated to the current locale. * - * Note that @manager will take a reference on @object for as long as - * it is exported. + * The @key is looked up in the "Desktop Entry" group. * - * Since: 2.30 + * Returns: (nullable): a newly allocated string, or %NULL if the key + * is not found + * Since: 2.56 */ /** - * g_dbus_object_manager_server_export_uniquely: - * @manager: A #GDBusObjectManagerServer. - * @object: An object. + * g_desktop_app_info_get_nodisplay: + * @info: a #GDesktopAppInfo * - * Like g_dbus_object_manager_server_export() but appends a string of - * the form _N (with N being a natural number) to @object's object path - * if an object with the given path already exists. As such, the - * #GDBusObjectProxy:g-object-path property of @object may be modified. + * Gets the value of the NoDisplay key, which helps determine if the + * application info should be shown in menus. See + * #G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY and g_app_info_should_show(). * + * Returns: The value of the NoDisplay key * Since: 2.30 */ /** - * g_dbus_object_manager_server_get_connection: - * @manager: A #GDBusObjectManagerServer + * g_desktop_app_info_get_show_in: + * @info: a #GDesktopAppInfo + * @desktop_env: (nullable): a string specifying a desktop name * - * Gets the #GDBusConnection used by @manager. + * Checks if the application info should be shown in menus that list available + * applications for a specific name of the desktop, based on the + * `OnlyShowIn` and `NotShowIn` keys. * - * Returns: (transfer full): A #GDBusConnection object or %NULL if - * @manager isn't exported on a connection. The returned object should - * be freed with g_object_unref(). + * @desktop_env should typically be given as %NULL, in which case the + * `XDG_CURRENT_DESKTOP` environment variable is consulted. If you want + * to override the default mechanism then you may specify @desktop_env, + * but this is not recommended. + * + * Note that g_app_info_should_show() for @info will include this check (with + * %NULL for @desktop_env) as well as additional checks. + * + * Returns: %TRUE if the @info should be shown in @desktop_env according to the + * `OnlyShowIn` and `NotShowIn` keys, %FALSE + * otherwise. * Since: 2.30 */ /** - * g_dbus_object_manager_server_is_exported: - * @manager: A #GDBusObjectManagerServer. - * @object: An object. + * g_desktop_app_info_get_startup_wm_class: + * @info: a #GDesktopAppInfo that supports startup notify * - * Returns whether @object is currently exported on @manager. + * Retrieves the StartupWMClass field from @info. This represents the + * WM_CLASS property of the main window of the application, if launched + * through @info. * - * Returns: %TRUE if @object is exported + * Returns: (transfer none): the startup WM class, or %NULL if none is set + * in the desktop file. * Since: 2.34 */ /** - * g_dbus_object_manager_server_new: - * @object_path: The object path to export the manager object at. + * g_desktop_app_info_get_string: + * @info: a #GDesktopAppInfo + * @key: the key to look up * - * Creates a new #GDBusObjectManagerServer object. + * Looks up a string value in the keyfile backing @info. * - * The returned server isn't yet exported on any connection. To do so, - * use g_dbus_object_manager_server_set_connection(). Normally you - * want to export all of your objects before doing so to avoid - * [InterfacesAdded](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager) - * signals being emitted. + * The @key is looked up in the "Desktop Entry" group. * - * Returns: A #GDBusObjectManagerServer object. Free with g_object_unref(). - * Since: 2.30 + * Returns: a newly allocated string, or %NULL if the key + * is not found + * Since: 2.36 */ /** - * g_dbus_object_manager_server_set_connection: - * @manager: A #GDBusObjectManagerServer. - * @connection: (nullable): A #GDBusConnection or %NULL. + * g_desktop_app_info_get_string_list: + * @info: a #GDesktopAppInfo + * @key: the key to look up + * @length: (out) (optional): return location for the number of returned strings, or %NULL * - * Exports all objects managed by @manager on @connection. If - * @connection is %NULL, stops exporting objects. + * Looks up a string list value in the keyfile backing @info. + * + * The @key is looked up in the "Desktop Entry" group. + * + * Returns: (array zero-terminated=1 length=length) (element-type utf8) (transfer full): + * a %NULL-terminated string array or %NULL if the specified + * key cannot be found. The array should be freed with g_strfreev(). + * Since: 2.60 */ /** - * g_dbus_object_manager_server_unexport: - * @manager: A #GDBusObjectManagerServer. - * @object_path: An object path. + * g_desktop_app_info_has_key: + * @info: a #GDesktopAppInfo + * @key: the key to look up * - * If @manager has an object at @path, removes the object. Otherwise - * does nothing. + * Returns whether @key exists in the "Desktop Entry" group + * of the keyfile backing @info. * - * Note that @object_path must be in the hierarchy rooted by the - * object path for @manager. + * Returns: %TRUE if the @key exists + * Since: 2.36 + */ + + +/** + * g_desktop_app_info_launch_action: + * @info: a #GDesktopAppInfo + * @action_name: the name of the action as from + * g_desktop_app_info_list_actions() + * @launch_context: (nullable): a #GAppLaunchContext * - * Returns: %TRUE if object at @object_path was removed, %FALSE otherwise. - * Since: 2.30 + * Activates the named application action. + * + * You may only call this function on action names that were + * returned from g_desktop_app_info_list_actions(). + * + * Note that if the main entry of the desktop file indicates that the + * application supports startup notification, and @launch_context is + * non-%NULL, then startup notification will be used when activating the + * action (and as such, invocation of the action on the receiving side + * must signal the end of startup notification when it is completed). + * This is the expected behaviour of applications declaring additional + * actions, as per the desktop file specification. + * + * As with g_app_info_launch() there is no way to detect failures that + * occur while using this function. + * + * Since: 2.38 */ /** - * g_dbus_object_proxy_get_connection: - * @proxy: a #GDBusObjectProxy + * g_desktop_app_info_launch_uris_as_manager: + * @appinfo: a #GDesktopAppInfo + * @uris: (element-type utf8): List of URIs + * @launch_context: (nullable): a #GAppLaunchContext + * @spawn_flags: #GSpawnFlags, used for each process + * @user_setup: (scope async) (nullable): a #GSpawnChildSetupFunc, used once + * for each process. + * @user_setup_data: (closure user_setup) (nullable): User data for @user_setup + * @pid_callback: (scope call) (nullable): Callback for child processes + * @pid_callback_data: (closure pid_callback) (nullable): User data for @callback + * @error: return location for a #GError, or %NULL * - * Gets the connection that @proxy is for. + * This function performs the equivalent of g_app_info_launch_uris(), + * but is intended primarily for operating system components that + * launch applications. Ordinary applications should use + * g_app_info_launch_uris(). * - * Returns: (transfer none): A #GDBusConnection. Do not free, the - * object is owned by @proxy. - * Since: 2.30 + * If the application is launched via GSpawn, then @spawn_flags, @user_setup + * and @user_setup_data are used for the call to g_spawn_async(). + * Additionally, @pid_callback (with @pid_callback_data) will be called to + * inform about the PID of the created process. See g_spawn_async_with_pipes() + * for information on certain parameter conditions that can enable an + * optimized posix_spawn() codepath to be used. + * + * If application launching occurs via some other mechanism (eg: D-Bus + * activation) then @spawn_flags, @user_setup, @user_setup_data, + * @pid_callback and @pid_callback_data are ignored. + * + * Returns: %TRUE on successful launch, %FALSE otherwise. */ /** - * g_dbus_object_proxy_new: - * @connection: a #GDBusConnection - * @object_path: the object path + * g_desktop_app_info_launch_uris_as_manager_with_fds: + * @appinfo: a #GDesktopAppInfo + * @uris: (element-type utf8): List of URIs + * @launch_context: (nullable): a #GAppLaunchContext + * @spawn_flags: #GSpawnFlags, used for each process + * @user_setup: (scope async) (nullable): a #GSpawnChildSetupFunc, used once + * for each process. + * @user_setup_data: (closure user_setup) (nullable): User data for @user_setup + * @pid_callback: (scope call) (nullable): Callback for child processes + * @pid_callback_data: (closure pid_callback) (nullable): User data for @callback + * @stdin_fd: file descriptor to use for child's stdin, or -1 + * @stdout_fd: file descriptor to use for child's stdout, or -1 + * @stderr_fd: file descriptor to use for child's stderr, or -1 + * @error: return location for a #GError, or %NULL * - * Creates a new #GDBusObjectProxy for the given connection and - * object path. + * Equivalent to g_desktop_app_info_launch_uris_as_manager() but allows + * you to pass in file descriptors for the stdin, stdout and stderr streams + * of the launched process. * - * Returns: a new #GDBusObjectProxy - * Since: 2.30 + * If application launching occurs via some non-spawn mechanism (e.g. D-Bus + * activation) then @stdin_fd, @stdout_fd and @stderr_fd are ignored. + * + * Returns: %TRUE on successful launch, %FALSE otherwise. + * Since: 2.58 */ /** - * g_dbus_object_skeleton_add_interface: - * @object: A #GDBusObjectSkeleton. - * @interface_: A #GDBusInterfaceSkeleton. + * g_desktop_app_info_list_actions: + * @info: a #GDesktopAppInfo * - * Adds @interface_ to @object. + * Returns the list of "additional application actions" supported on the + * desktop file, as per the desktop file specification. * - * If @object already contains a #GDBusInterfaceSkeleton with the same - * interface name, it is removed before @interface_ is added. + * As per the specification, this is the list of actions that are + * explicitly listed in the "Actions" key of the [Desktop Entry] group. * - * Note that @object takes its own reference on @interface_ and holds - * it until removed. + * Returns: (array zero-terminated=1) (element-type utf8) (transfer none): a list of strings, always non-%NULL + * Since: 2.38 + */ + + +/** + * g_desktop_app_info_lookup_get_default_for_uri_scheme: + * @lookup: a #GDesktopAppInfoLookup + * @uri_scheme: a string containing a URI scheme. * - * Since: 2.30 + * Gets the default application for launching applications + * using this URI scheme for a particular #GDesktopAppInfoLookup + * implementation. + * + * The #GDesktopAppInfoLookup interface and this function is used + * to implement g_app_info_get_default_for_uri_scheme() backends + * in a GIO module. There is no reason for applications to use it + * directly. Applications should use g_app_info_get_default_for_uri_scheme(). + * + * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error. + * Deprecated: 2.28: The #GDesktopAppInfoLookup interface is deprecated and + * unused by GIO. */ /** - * g_dbus_object_skeleton_flush: - * @object: A #GDBusObjectSkeleton. + * g_desktop_app_info_new: + * @desktop_id: the desktop file id * - * This method simply calls g_dbus_interface_skeleton_flush() on all - * interfaces belonging to @object. See that method for when flushing - * is useful. + * Creates a new #GDesktopAppInfo based on a desktop file id. * - * Since: 2.30 + * A desktop file id is the basename of the desktop file, including the + * .desktop extension. GIO is looking for a desktop file with this name + * in the `applications` subdirectories of the XDG + * data directories (i.e. the directories specified in the `XDG_DATA_HOME` + * and `XDG_DATA_DIRS` environment variables). GIO also supports the + * prefix-to-subdirectory mapping that is described in the + * [Menu Spec](http://standards.freedesktop.org/menu-spec/latest/) + * (i.e. a desktop id of kde-foo.desktop will match + * `/usr/share/applications/kde/foo.desktop`). + * + * Returns: (nullable): a new #GDesktopAppInfo, or %NULL if no desktop + * file with that id exists. */ /** - * g_dbus_object_skeleton_new: - * @object_path: An object path. + * g_desktop_app_info_new_from_filename: + * @filename: (type filename): the path of a desktop file, in the GLib + * filename encoding * - * Creates a new #GDBusObjectSkeleton. + * Creates a new #GDesktopAppInfo. * - * Returns: A #GDBusObjectSkeleton. Free with g_object_unref(). - * Since: 2.30 + * Returns: (nullable): a new #GDesktopAppInfo or %NULL on error. */ /** - * g_dbus_object_skeleton_remove_interface: - * @object: A #GDBusObjectSkeleton. - * @interface_: A #GDBusInterfaceSkeleton. + * g_desktop_app_info_new_from_keyfile: + * @key_file: an opened #GKeyFile * - * Removes @interface_ from @object. + * Creates a new #GDesktopAppInfo. * - * Since: 2.30 + * Returns: (nullable): a new #GDesktopAppInfo or %NULL on error. + * Since: 2.18 */ /** - * g_dbus_object_skeleton_remove_interface_by_name: - * @object: A #GDBusObjectSkeleton. - * @interface_name: A D-Bus interface name. + * g_desktop_app_info_search: + * @search_string: the search string to use * - * Removes the #GDBusInterface with @interface_name from @object. + * Searches desktop files for ones that match @search_string. * - * If no D-Bus interface of the given interface exists, this function - * does nothing. + * The return value is an array of strvs. Each strv contains a list of + * applications that matched @search_string with an equal score. The + * outer list is sorted by score so that the first strv contains the + * best-matching applications, and so on. + * The algorithm for determining matches is undefined and may change at + * any time. * - * Since: 2.30 + * Returns: (array zero-terminated=1) (element-type GStrv) (transfer full): a + * list of strvs. Free each item with g_strfreev() and free the outer + * list with g_free(). */ /** - * g_dbus_object_skeleton_set_object_path: - * @object: A #GDBusObjectSkeleton. - * @object_path: A valid D-Bus object path. + * g_desktop_app_info_set_desktop_env: + * @desktop_env: a string specifying what desktop this is * - * Sets the object path for @object. + * Sets the name of the desktop that the application is running in. + * This is used by g_app_info_should_show() and + * g_desktop_app_info_get_show_in() to evaluate the + * `OnlyShowIn` and `NotShowIn` + * desktop entry fields. * - * Since: 2.30 + * Should be called only once; subsequent calls are ignored. + * + * Deprecated: 2.42: do not use this API. Since 2.42 the value of the + * `XDG_CURRENT_DESKTOP` environment variable will be used. */ /** - * g_dbus_property_info_ref: - * @info: A #GDBusPropertyInfo + * g_drive_can_eject: + * @drive: a #GDrive. * - * If @info is statically allocated does nothing. Otherwise increases - * the reference count. + * Checks if a drive can be ejected. * - * Returns: The same @info. - * Since: 2.26 + * Returns: %TRUE if the @drive can be ejected, %FALSE otherwise. */ /** - * g_dbus_property_info_unref: - * @info: A #GDBusPropertyInfo. + * g_drive_can_poll_for_media: + * @drive: a #GDrive. * - * If @info is statically allocated, does nothing. Otherwise decreases - * the reference count of @info. When its reference count drops to 0, - * the memory used is freed. + * Checks if a drive can be polled for media changes. * - * Since: 2.26 + * Returns: %TRUE if the @drive can be polled for media changes, + * %FALSE otherwise. */ /** - * g_dbus_proxy_call: - * @proxy: A #GDBusProxy. - * @method_name: Name of method to invoke. - * @parameters: (nullable): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters. - * @flags: Flags from the #GDBusCallFlags enumeration. - * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning - * "infinite") or -1 to use the proxy default timeout. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't - * care about the result of the method invocation. - * @user_data: The data to pass to @callback. - * - * Asynchronously invokes the @method_name method on @proxy. - * - * If @method_name contains any dots, then @name is split into interface and - * method name parts. This allows using @proxy for invoking methods on - * other interfaces. - * - * If the #GDBusConnection associated with @proxy is closed then - * the operation will fail with %G_IO_ERROR_CLOSED. If - * @cancellable is canceled, the operation will fail with - * %G_IO_ERROR_CANCELLED. If @parameters contains a value not - * compatible with the D-Bus protocol, the operation fails with - * %G_IO_ERROR_INVALID_ARGUMENT. - * - * If the @parameters #GVariant is floating, it is consumed. This allows - * convenient 'inline' use of g_variant_new(), e.g.: - * |[ - * g_dbus_proxy_call (proxy, - * "TwoStrings", - * g_variant_new ("(ss)", - * "Thing One", - * "Thing Two"), - * G_DBUS_CALL_FLAGS_NONE, - * -1, - * NULL, - * (GAsyncReadyCallback) two_strings_done, - * &data); - * ]| - * - * If @proxy has an expected interface (see - * #GDBusProxy:g-interface-info) and @method_name is referenced by it, - * then the return value is checked against the return type. - * - * This is an asynchronous method. When the operation is finished, - * @callback will be invoked in the - * [thread-default main context][g-main-context-push-thread-default] - * of the thread you are calling this method from. - * You can then call g_dbus_proxy_call_finish() to get the result of - * the operation. See g_dbus_proxy_call_sync() for the synchronous - * version of this method. + * g_drive_can_start: + * @drive: a #GDrive. * - * If @callback is %NULL then the D-Bus method call message will be sent with - * the %G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag set. + * Checks if a drive can be started. * - * Since: 2.26 + * Returns: %TRUE if the @drive can be started, %FALSE otherwise. + * Since: 2.22 */ /** - * g_dbus_proxy_call_finish: - * @proxy: A #GDBusProxy. - * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call(). - * @error: Return location for error or %NULL. + * g_drive_can_start_degraded: + * @drive: a #GDrive. * - * Finishes an operation started with g_dbus_proxy_call(). + * Checks if a drive can be started degraded. * - * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with - * return values. Free with g_variant_unref(). - * Since: 2.26 + * Returns: %TRUE if the @drive can be started degraded, %FALSE otherwise. + * Since: 2.22 */ /** - * g_dbus_proxy_call_sync: - * @proxy: A #GDBusProxy. - * @method_name: Name of method to invoke. - * @parameters: (nullable): A #GVariant tuple with parameters for the signal - * or %NULL if not passing parameters. - * @flags: Flags from the #GDBusCallFlags enumeration. - * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning - * "infinite") or -1 to use the proxy default timeout. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * g_drive_can_stop: + * @drive: a #GDrive. * - * Synchronously invokes the @method_name method on @proxy. + * Checks if a drive can be stopped. * - * If @method_name contains any dots, then @name is split into interface and - * method name parts. This allows using @proxy for invoking methods on - * other interfaces. + * Returns: %TRUE if the @drive can be stopped, %FALSE otherwise. + * Since: 2.22 + */ + + +/** + * g_drive_eject: + * @drive: a #GDrive. + * @flags: flags affecting the unmount if required for eject + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (nullable): a #GAsyncReadyCallback, or %NULL. + * @user_data: user data to pass to @callback * - * If the #GDBusConnection associated with @proxy is disconnected then - * the operation will fail with %G_IO_ERROR_CLOSED. If - * @cancellable is canceled, the operation will fail with - * %G_IO_ERROR_CANCELLED. If @parameters contains a value not - * compatible with the D-Bus protocol, the operation fails with - * %G_IO_ERROR_INVALID_ARGUMENT. + * Asynchronously ejects a drive. * - * If the @parameters #GVariant is floating, it is consumed. This allows - * convenient 'inline' use of g_variant_new(), e.g.: - * |[ - * g_dbus_proxy_call_sync (proxy, - * "TwoStrings", - * g_variant_new ("(ss)", - * "Thing One", - * "Thing Two"), - * G_DBUS_CALL_FLAGS_NONE, - * -1, - * NULL, - * &error); - * ]| + * When the operation is finished, @callback will be called. + * You can then call g_drive_eject_finish() to obtain the + * result of the operation. * - * The calling thread is blocked until a reply is received. See - * g_dbus_proxy_call() for the asynchronous version of this - * method. + * Deprecated: 2.22: Use g_drive_eject_with_operation() instead. + */ + + +/** + * g_drive_eject_finish: + * @drive: a #GDrive. + * @result: a #GAsyncResult. + * @error: a #GError, or %NULL * - * If @proxy has an expected interface (see - * #GDBusProxy:g-interface-info) and @method_name is referenced by it, - * then the return value is checked against the return type. + * Finishes ejecting a drive. * - * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with - * return values. Free with g_variant_unref(). - * Since: 2.26 + * Returns: %TRUE if the drive has been ejected successfully, + * %FALSE otherwise. + * Deprecated: 2.22: Use g_drive_eject_with_operation_finish() instead. */ /** - * g_dbus_proxy_call_with_unix_fd_list: - * @proxy: A #GDBusProxy. - * @method_name: Name of method to invoke. - * @parameters: (nullable): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters. - * @flags: Flags from the #GDBusCallFlags enumeration. - * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning - * "infinite") or -1 to use the proxy default timeout. - * @fd_list: (nullable): A #GUnixFDList or %NULL. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: (nullable): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't - * care about the result of the method invocation. - * @user_data: The data to pass to @callback. - * - * Like g_dbus_proxy_call() but also takes a #GUnixFDList object. + * g_drive_eject_with_operation: + * @drive: a #GDrive. + * @flags: flags affecting the unmount if required for eject + * @mount_operation: (nullable): a #GMountOperation or %NULL to avoid + * user interaction. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (nullable): a #GAsyncReadyCallback, or %NULL. + * @user_data: user data passed to @callback. * - * This method is only available on UNIX. + * Ejects a drive. This is an asynchronous operation, and is + * finished by calling g_drive_eject_with_operation_finish() with the @drive + * and #GAsyncResult data returned in the @callback. * - * Since: 2.30 + * Since: 2.22 */ /** - * g_dbus_proxy_call_with_unix_fd_list_finish: - * @proxy: A #GDBusProxy. - * @out_fd_list: (out) (optional): Return location for a #GUnixFDList or %NULL. - * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call_with_unix_fd_list(). - * @error: Return location for error or %NULL. + * g_drive_eject_with_operation_finish: + * @drive: a #GDrive. + * @result: a #GAsyncResult. + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. * - * Finishes an operation started with g_dbus_proxy_call_with_unix_fd_list(). + * Finishes ejecting a drive. If any errors occurred during the operation, + * @error will be set to contain the errors and %FALSE will be returned. * - * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with - * return values. Free with g_variant_unref(). - * Since: 2.30 + * Returns: %TRUE if the drive was successfully ejected. %FALSE otherwise. + * Since: 2.22 */ /** - * g_dbus_proxy_call_with_unix_fd_list_sync: - * @proxy: A #GDBusProxy. - * @method_name: Name of method to invoke. - * @parameters: (nullable): A #GVariant tuple with parameters for the signal - * or %NULL if not passing parameters. - * @flags: Flags from the #GDBusCallFlags enumeration. - * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning - * "infinite") or -1 to use the proxy default timeout. - * @fd_list: (nullable): A #GUnixFDList or %NULL. - * @out_fd_list: (out) (optional): Return location for a #GUnixFDList or %NULL. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Like g_dbus_proxy_call_sync() but also takes and returns #GUnixFDList objects. + * g_drive_enumerate_identifiers: + * @drive: a #GDrive * - * This method is only available on UNIX. + * Gets the kinds of identifiers that @drive has. + * Use g_drive_get_identifier() to obtain the identifiers + * themselves. * - * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with - * return values. Free with g_variant_unref(). - * Since: 2.30 + * Returns: (transfer full) (array zero-terminated=1): a %NULL-terminated + * array of strings containing kinds of identifiers. Use g_strfreev() + * to free. */ /** - * g_dbus_proxy_get_cached_property: - * @proxy: A #GDBusProxy. - * @property_name: Property name. - * - * Looks up the value for a property from the cache. This call does no - * blocking IO. + * g_drive_get_icon: + * @drive: a #GDrive. * - * If @proxy has an expected interface (see - * #GDBusProxy:g-interface-info) and @property_name is referenced by - * it, then @value is checked against the type of the property. + * Gets the icon for @drive. * - * Returns: (transfer full) (nullable): A reference to the #GVariant instance - * that holds the value for @property_name or %NULL if the value is not in - * the cache. The returned reference must be freed with g_variant_unref(). - * Since: 2.26 + * Returns: (transfer full): #GIcon for the @drive. + * Free the returned object with g_object_unref(). */ /** - * g_dbus_proxy_get_cached_property_names: - * @proxy: A #GDBusProxy. + * g_drive_get_identifier: + * @drive: a #GDrive + * @kind: the kind of identifier to return * - * Gets the names of all cached properties on @proxy. + * Gets the identifier of the given kind for @drive. The only + * identifier currently available is + * #G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE. * - * Returns: (transfer full) (nullable) (array zero-terminated=1): A - * %NULL-terminated array of strings or %NULL if - * @proxy has no cached properties. Free the returned array with - * g_strfreev(). - * Since: 2.26 + * Returns: (nullable) (transfer full): a newly allocated string containing the + * requested identifier, or %NULL if the #GDrive + * doesn't have this kind of identifier. */ /** - * g_dbus_proxy_get_connection: - * @proxy: A #GDBusProxy. + * g_drive_get_name: + * @drive: a #GDrive. * - * Gets the connection @proxy is for. + * Gets the name of @drive. * - * Returns: (transfer none): A #GDBusConnection owned by @proxy. Do not free. - * Since: 2.26 + * Returns: a string containing @drive's name. The returned + * string should be freed when no longer needed. */ /** - * g_dbus_proxy_get_default_timeout: - * @proxy: A #GDBusProxy. - * - * Gets the timeout to use if -1 (specifying default timeout) is - * passed as @timeout_msec in the g_dbus_proxy_call() and - * g_dbus_proxy_call_sync() functions. + * g_drive_get_sort_key: + * @drive: A #GDrive. * - * See the #GDBusProxy:g-default-timeout property for more details. + * Gets the sort key for @drive, if any. * - * Returns: Timeout to use for @proxy. - * Since: 2.26 + * Returns: (nullable): Sorting key for @drive or %NULL if no such key is available. + * Since: 2.32 */ /** - * g_dbus_proxy_get_flags: - * @proxy: A #GDBusProxy. + * g_drive_get_start_stop_type: + * @drive: a #GDrive. * - * Gets the flags that @proxy was constructed with. + * Gets a hint about how a drive can be started/stopped. * - * Returns: Flags from the #GDBusProxyFlags enumeration. - * Since: 2.26 + * Returns: A value from the #GDriveStartStopType enumeration. + * Since: 2.22 */ /** - * g_dbus_proxy_get_interface_info: - * @proxy: A #GDBusProxy + * g_drive_get_symbolic_icon: + * @drive: a #GDrive. * - * Returns the #GDBusInterfaceInfo, if any, specifying the interface - * that @proxy conforms to. See the #GDBusProxy:g-interface-info - * property for more details. + * Gets the icon for @drive. * - * Returns: (transfer none) (nullable): A #GDBusInterfaceInfo or %NULL. - * Do not unref the returned object, it is owned by @proxy. - * Since: 2.26 + * Returns: (transfer full): symbolic #GIcon for the @drive. + * Free the returned object with g_object_unref(). + * Since: 2.34 */ /** - * g_dbus_proxy_get_interface_name: - * @proxy: A #GDBusProxy. + * g_drive_get_volumes: + * @drive: a #GDrive. * - * Gets the D-Bus interface name @proxy is for. + * Get a list of mountable volumes for @drive. * - * Returns: A string owned by @proxy. Do not free. - * Since: 2.26 + * The returned list should be freed with g_list_free(), after + * its elements have been unreffed with g_object_unref(). + * + * Returns: (element-type GVolume) (transfer full): #GList containing any #GVolume objects on the given @drive. */ /** - * g_dbus_proxy_get_name: - * @proxy: A #GDBusProxy. + * g_drive_has_media: + * @drive: a #GDrive. * - * Gets the name that @proxy was constructed for. + * Checks if the @drive has media. Note that the OS may not be polling + * the drive for media changes; see g_drive_is_media_check_automatic() + * for more details. * - * Returns: A string owned by @proxy. Do not free. - * Since: 2.26 + * Returns: %TRUE if @drive has media, %FALSE otherwise. */ /** - * g_dbus_proxy_get_name_owner: - * @proxy: A #GDBusProxy. + * g_drive_has_volumes: + * @drive: a #GDrive. * - * The unique name that owns the name that @proxy is for or %NULL if - * no-one currently owns that name. You may connect to the - * #GObject::notify signal to track changes to the - * #GDBusProxy:g-name-owner property. + * Check if @drive has any mountable volumes. * - * Returns: (transfer full) (nullable): The name owner or %NULL if no name - * owner exists. Free with g_free(). - * Since: 2.26 + * Returns: %TRUE if the @drive contains volumes, %FALSE otherwise. */ /** - * g_dbus_proxy_get_object_path: - * @proxy: A #GDBusProxy. + * g_drive_is_media_check_automatic: + * @drive: a #GDrive. * - * Gets the object path @proxy is for. + * Checks if @drive is capabable of automatically detecting media changes. * - * Returns: A string owned by @proxy. Do not free. - * Since: 2.26 + * Returns: %TRUE if the @drive is capabable of automatically detecting + * media changes, %FALSE otherwise. */ /** - * g_dbus_proxy_new: - * @connection: A #GDBusConnection. - * @flags: Flags used when constructing the proxy. - * @info: (nullable): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL. - * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @interface_name: A D-Bus interface name. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: Callback function to invoke when the proxy is ready. - * @user_data: User data to pass to @callback. - * - * Creates a proxy for accessing @interface_name on the remote object - * at @object_path owned by @name at @connection and asynchronously - * loads D-Bus properties unless the - * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. Connect to - * the #GDBusProxy::g-properties-changed signal to get notified about - * property changes. + * g_drive_is_media_removable: + * @drive: a #GDrive. * - * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up - * match rules for signals. Connect to the #GDBusProxy::g-signal signal - * to handle signals from the remote object. + * Checks if the @drive supports removable media. * - * If @name is a well-known name and the - * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START and %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION - * flags aren't set and no name owner currently exists, the message bus - * will be requested to launch a name owner for the name. + * Returns: %TRUE if @drive supports removable media, %FALSE otherwise. + */ + + +/** + * g_drive_is_removable: + * @drive: a #GDrive. * - * This is a failable asynchronous constructor - when the proxy is - * ready, @callback will be invoked and you can use - * g_dbus_proxy_new_finish() to get the result. + * Checks if the #GDrive and/or its media is considered removable by the user. + * See g_drive_is_media_removable(). * - * See g_dbus_proxy_new_sync() and for a synchronous version of this constructor. + * Returns: %TRUE if @drive and/or its media is considered removable, %FALSE otherwise. + * Since: 2.50 + */ + + +/** + * g_drive_poll_for_media: + * @drive: a #GDrive. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (nullable): a #GAsyncReadyCallback, or %NULL. + * @user_data: user data to pass to @callback * - * #GDBusProxy is used in this [example][gdbus-wellknown-proxy]. + * Asynchronously polls @drive to see if media has been inserted or removed. * - * Since: 2.26 + * When the operation is finished, @callback will be called. + * You can then call g_drive_poll_for_media_finish() to obtain the + * result of the operation. */ /** - * g_dbus_proxy_new_finish: - * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new(). - * @error: Return location for error or %NULL. + * g_drive_poll_for_media_finish: + * @drive: a #GDrive. + * @result: a #GAsyncResult. + * @error: a #GError, or %NULL * - * Finishes creating a #GDBusProxy. + * Finishes an operation started with g_drive_poll_for_media() on a drive. * - * Returns: (transfer full): A #GDBusProxy or %NULL if @error is set. - * Free with g_object_unref(). - * Since: 2.26 + * Returns: %TRUE if the drive has been poll_for_mediaed successfully, + * %FALSE otherwise. */ /** - * g_dbus_proxy_new_for_bus: - * @bus_type: A #GBusType. - * @flags: Flags used when constructing the proxy. - * @info: (nullable): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @interface_name: A D-Bus interface name. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @callback: Callback function to invoke when the proxy is ready. - * @user_data: User data to pass to @callback. + * g_drive_start: + * @drive: a #GDrive. + * @flags: flags affecting the start operation. + * @mount_operation: (nullable): a #GMountOperation or %NULL to avoid + * user interaction. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (nullable): a #GAsyncReadyCallback, or %NULL. + * @user_data: user data to pass to @callback * - * Like g_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection. + * Asynchronously starts a drive. * - * #GDBusProxy is used in this [example][gdbus-wellknown-proxy]. + * When the operation is finished, @callback will be called. + * You can then call g_drive_start_finish() to obtain the + * result of the operation. * - * Since: 2.26 + * Since: 2.22 */ /** - * g_dbus_proxy_new_for_bus_finish: - * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new_for_bus(). - * @error: Return location for error or %NULL. + * g_drive_start_finish: + * @drive: a #GDrive. + * @result: a #GAsyncResult. + * @error: a #GError, or %NULL * - * Finishes creating a #GDBusProxy. + * Finishes starting a drive. * - * Returns: (transfer full): A #GDBusProxy or %NULL if @error is set. - * Free with g_object_unref(). - * Since: 2.26 + * Returns: %TRUE if the drive has been started successfully, + * %FALSE otherwise. + * Since: 2.22 */ /** - * g_dbus_proxy_new_for_bus_sync: - * @bus_type: A #GBusType. - * @flags: Flags used when constructing the proxy. - * @info: (nullable): A #GDBusInterfaceInfo specifying the minimal interface - * that @proxy conforms to or %NULL. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @interface_name: A D-Bus interface name. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * g_drive_stop: + * @drive: a #GDrive. + * @flags: flags affecting the unmount if required for stopping. + * @mount_operation: (nullable): a #GMountOperation or %NULL to avoid + * user interaction. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (nullable): a #GAsyncReadyCallback, or %NULL. + * @user_data: user data to pass to @callback * - * Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. + * Asynchronously stops a drive. * - * #GDBusProxy is used in this [example][gdbus-wellknown-proxy]. + * When the operation is finished, @callback will be called. + * You can then call g_drive_stop_finish() to obtain the + * result of the operation. * - * Returns: (transfer full): A #GDBusProxy or %NULL if error is set. - * Free with g_object_unref(). - * Since: 2.26 + * Since: 2.22 */ /** - * g_dbus_proxy_new_sync: - * @connection: A #GDBusConnection. - * @flags: Flags used when constructing the proxy. - * @info: (nullable): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL. - * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @interface_name: A D-Bus interface name. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: (nullable): Return location for error or %NULL. - * - * Creates a proxy for accessing @interface_name on the remote object - * at @object_path owned by @name at @connection and synchronously - * loads D-Bus properties unless the - * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. - * - * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up - * match rules for signals. Connect to the #GDBusProxy::g-signal signal - * to handle signals from the remote object. - * - * If @name is a well-known name and the - * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START and %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION - * flags aren't set and no name owner currently exists, the message bus - * will be requested to launch a name owner for the name. - * - * This is a synchronous failable constructor. See g_dbus_proxy_new() - * and g_dbus_proxy_new_finish() for the asynchronous version. + * g_drive_stop_finish: + * @drive: a #GDrive. + * @result: a #GAsyncResult. + * @error: a #GError, or %NULL * - * #GDBusProxy is used in this [example][gdbus-wellknown-proxy]. + * Finishes stopping a drive. * - * Returns: (transfer full): A #GDBusProxy or %NULL if error is set. - * Free with g_object_unref(). - * Since: 2.26 + * Returns: %TRUE if the drive has been stopped successfully, + * %FALSE otherwise. + * Since: 2.22 */ /** - * g_dbus_proxy_set_cached_property: - * @proxy: A #GDBusProxy - * @property_name: Property name. - * @value: (nullable): Value for the property or %NULL to remove it from the cache. - * - * If @value is not %NULL, sets the cached value for the property with - * name @property_name to the value in @value. - * - * If @value is %NULL, then the cached value is removed from the - * property cache. - * - * If @proxy has an expected interface (see - * #GDBusProxy:g-interface-info) and @property_name is referenced by - * it, then @value is checked against the type of the property. - * - * If the @value #GVariant is floating, it is consumed. This allows - * convenient 'inline' use of g_variant_new(), e.g. - * |[ - * g_dbus_proxy_set_cached_property (proxy, - * "SomeProperty", - * g_variant_new ("(si)", - * "A String", - * 42)); - * ]| + * g_dtls_client_connection_get_accepted_cas: + * @conn: the #GDtlsClientConnection * - * Normally you will not need to use this method since @proxy - * is tracking changes using the - * `org.freedesktop.DBus.Properties.PropertiesChanged` - * D-Bus signal. However, for performance reasons an object may - * decide to not use this signal for some properties and instead - * use a proprietary out-of-band mechanism to transmit changes. + * Gets the list of distinguished names of the Certificate Authorities + * that the server will accept certificates from. This will be set + * during the TLS handshake if the server requests a certificate. + * Otherwise, it will be %NULL. * - * As a concrete example, consider an object with a property - * `ChatroomParticipants` which is an array of strings. Instead of - * transmitting the same (long) array every time the property changes, - * it is more efficient to only transmit the delta using e.g. signals - * `ChatroomParticipantJoined(String name)` and - * `ChatroomParticipantParted(String name)`. + * Each item in the list is a #GByteArray which contains the complete + * subject DN of the certificate authority. * - * Since: 2.26 + * Returns: (element-type GByteArray) (transfer full): the list of + * CA DNs. You should unref each element with g_byte_array_unref() and then + * the free the list with g_list_free(). + * Since: 2.48 */ /** - * g_dbus_proxy_set_default_timeout: - * @proxy: A #GDBusProxy. - * @timeout_msec: Timeout in milliseconds. - * - * Sets the timeout to use if -1 (specifying default timeout) is - * passed as @timeout_msec in the g_dbus_proxy_call() and - * g_dbus_proxy_call_sync() functions. + * g_dtls_client_connection_get_server_identity: + * @conn: the #GDtlsClientConnection * - * See the #GDBusProxy:g-default-timeout property for more details. + * Gets @conn's expected server identity * - * Since: 2.26 + * Returns: (transfer none): a #GSocketConnectable describing the + * expected server identity, or %NULL if the expected identity is not + * known. + * Since: 2.48 */ /** - * g_dbus_proxy_set_interface_info: - * @proxy: A #GDBusProxy - * @info: (transfer none) (nullable): Minimum interface this proxy conforms to - * or %NULL to unset. + * g_dtls_client_connection_get_validation_flags: + * @conn: the #GDtlsClientConnection * - * Ensure that interactions with @proxy conform to the given - * interface. See the #GDBusProxy:g-interface-info property for more - * details. + * Gets @conn's validation flags * - * Since: 2.26 + * Returns: the validation flags + * Since: 2.48 */ /** - * g_dbus_server_get_client_address: - * @server: A #GDBusServer. + * g_dtls_client_connection_new: + * @base_socket: the #GDatagramBased to wrap + * @server_identity: (nullable): the expected identity of the server + * @error: #GError for error reporting, or %NULL to ignore. * - * Gets a - * [D-Bus address](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses) - * string that can be used by clients to connect to @server. + * Creates a new #GDtlsClientConnection wrapping @base_socket which is + * assumed to communicate with the server identified by @server_identity. * - * Returns: A D-Bus address string. Do not free, the string is owned - * by @server. - * Since: 2.26 + * Returns: (transfer full) (type GDtlsClientConnection): the new + * #GDtlsClientConnection, or %NULL on error + * Since: 2.48 */ /** - * g_dbus_server_get_flags: - * @server: A #GDBusServer. + * g_dtls_client_connection_set_server_identity: + * @conn: the #GDtlsClientConnection + * @identity: a #GSocketConnectable describing the expected server identity * - * Gets the flags for @server. + * Sets @conn's expected server identity, which is used both to tell + * servers on virtual hosts which certificate to present, and also + * to let @conn know what name to look for in the certificate when + * performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled. * - * Returns: A set of flags from the #GDBusServerFlags enumeration. - * Since: 2.26 + * Since: 2.48 */ /** - * g_dbus_server_get_guid: - * @server: A #GDBusServer. + * g_dtls_client_connection_set_validation_flags: + * @conn: the #GDtlsClientConnection + * @flags: the #GTlsCertificateFlags to use * - * Gets the GUID for @server. + * Sets @conn's validation flags, to override the default set of + * checks performed when validating a server certificate. By default, + * %G_TLS_CERTIFICATE_VALIDATE_ALL is used. * - * Returns: A D-Bus GUID. Do not free this string, it is owned by @server. - * Since: 2.26 + * Since: 2.48 */ /** - * g_dbus_server_is_active: - * @server: A #GDBusServer. - * - * Gets whether @server is active. + * g_dtls_connection_close: + * @conn: a #GDtlsConnection + * @cancellable: (nullable): a #GCancellable, or %NULL + * @error: a #GError, or %NULL * - * Returns: %TRUE if server is active, %FALSE otherwise. - * Since: 2.26 - */ - - -/** - * g_dbus_server_new_sync: - * @address: A D-Bus address. - * @flags: Flags from the #GDBusServerFlags enumeration. - * @guid: A D-Bus GUID. - * @observer: (nullable): A #GDBusAuthObserver or %NULL. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for server or %NULL. + * Close the DTLS connection. This is equivalent to calling + * g_dtls_connection_shutdown() to shut down both sides of the connection. * - * Creates a new D-Bus server that listens on the first address in - * @address that works. + * Closing a #GDtlsConnection waits for all buffered but untransmitted data to + * be sent before it completes. It then sends a `close_notify` DTLS alert to the + * peer and may wait for a `close_notify` to be received from the peer. It does + * not close the underlying #GDtlsConnection:base-socket; that must be closed + * separately. * - * Once constructed, you can use g_dbus_server_get_client_address() to - * get a D-Bus address string that clients can use to connect. + * Once @conn is closed, all other operations will return %G_IO_ERROR_CLOSED. + * Closing a #GDtlsConnection multiple times will not return an error. * - * Connect to the #GDBusServer::new-connection signal to handle - * incoming connections. + * #GDtlsConnections will be automatically closed when the last reference is + * dropped, but you might want to call this function to make sure resources are + * released as early as possible. * - * The returned #GDBusServer isn't active - you have to start it with - * g_dbus_server_start(). + * If @cancellable is cancelled, the #GDtlsConnection may be left + * partially-closed and any pending untransmitted data may be lost. Call + * g_dtls_connection_close() again to complete closing the #GDtlsConnection. * - * #GDBusServer is used in this [example][gdbus-peer-to-peer]. + * Returns: %TRUE on success, %FALSE otherwise + * Since: 2.48 + */ + + +/** + * g_dtls_connection_close_async: + * @conn: a #GDtlsConnection + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): a #GCancellable, or %NULL + * @callback: callback to call when the close operation is complete + * @user_data: the data to pass to the callback function * - * This is a synchronous failable constructor. See - * g_dbus_server_new() for the asynchronous version. + * Asynchronously close the DTLS connection. See g_dtls_connection_close() for + * more information. * - * Returns: A #GDBusServer or %NULL if @error is set. Free with - * g_object_unref(). - * Since: 2.26 + * Since: 2.48 */ /** - * g_dbus_server_start: - * @server: A #GDBusServer. + * g_dtls_connection_close_finish: + * @conn: a #GDtlsConnection + * @result: a #GAsyncResult + * @error: a #GError pointer, or %NULL * - * Starts @server. + * Finish an asynchronous TLS close operation. See g_dtls_connection_close() + * for more information. * - * Since: 2.26 + * Returns: %TRUE on success, %FALSE on failure, in which + * case @error will be set + * Since: 2.48 */ /** - * g_dbus_server_stop: - * @server: A #GDBusServer. + * g_dtls_connection_emit_accept_certificate: + * @conn: a #GDtlsConnection + * @peer_cert: the peer's #GTlsCertificate + * @errors: the problems with @peer_cert * - * Stops @server. + * Used by #GDtlsConnection implementations to emit the + * #GDtlsConnection::accept-certificate signal. * - * Since: 2.26 + * Returns: %TRUE if one of the signal handlers has returned + * %TRUE to accept @peer_cert + * Since: 2.48 */ /** - * g_dbus_signal_info_ref: - * @info: A #GDBusSignalInfo + * g_dtls_connection_get_certificate: + * @conn: a #GDtlsConnection * - * If @info is statically allocated does nothing. Otherwise increases - * the reference count. + * Gets @conn's certificate, as set by + * g_dtls_connection_set_certificate(). * - * Returns: The same @info. - * Since: 2.26 + * Returns: (transfer none): @conn's certificate, or %NULL + * Since: 2.48 */ /** - * g_dbus_signal_info_unref: - * @info: A #GDBusSignalInfo. + * g_dtls_connection_get_database: + * @conn: a #GDtlsConnection * - * If @info is statically allocated, does nothing. Otherwise decreases - * the reference count of @info. When its reference count drops to 0, - * the memory used is freed. + * Gets the certificate database that @conn uses to verify + * peer certificates. See g_dtls_connection_set_database(). * - * Since: 2.26 + * Returns: (transfer none): the certificate database that @conn uses or %NULL + * Since: 2.48 */ /** - * g_desktop_app_info_get_action_name: - * @info: a #GDesktopAppInfo - * @action_name: the name of the action as from - * g_desktop_app_info_list_actions() - * - * Gets the user-visible display name of the "additional application - * action" specified by @action_name. + * g_dtls_connection_get_interaction: + * @conn: a connection * - * This corresponds to the "Name" key within the keyfile group for the - * action. + * Get the object that will be used to interact with the user. It will be used + * for things like prompting the user for passwords. If %NULL is returned, then + * no user interaction will occur for this connection. * - * Returns: (transfer full): the locale-specific action name - * Since: 2.38 + * Returns: (transfer none): The interaction object. + * Since: 2.48 */ /** - * g_desktop_app_info_get_boolean: - * @info: a #GDesktopAppInfo - * @key: the key to look up + * g_dtls_connection_get_negotiated_protocol: + * @conn: a #GDtlsConnection * - * Looks up a boolean value in the keyfile backing @info. + * Gets the name of the application-layer protocol negotiated during + * the handshake. * - * The @key is looked up in the "Desktop Entry" group. + * If the peer did not use the ALPN extension, or did not advertise a + * protocol that matched one of @conn's protocols, or the TLS backend + * does not support ALPN, then this will be %NULL. See + * g_dtls_connection_set_advertised_protocols(). * - * Returns: the boolean value, or %FALSE if the key - * is not found - * Since: 2.36 + * Returns: (nullable): the negotiated protocol, or %NULL + * Since: 2.60 */ /** - * g_desktop_app_info_get_categories: - * @info: a #GDesktopAppInfo + * g_dtls_connection_get_peer_certificate: + * @conn: a #GDtlsConnection * - * Gets the categories from the desktop file. + * Gets @conn's peer's certificate after the handshake has completed. + * (It is not set during the emission of + * #GDtlsConnection::accept-certificate.) * - * Returns: The unparsed Categories key from the desktop file; - * i.e. no attempt is made to split it by ';' or validate it. + * Returns: (transfer none): @conn's peer's certificate, or %NULL + * Since: 2.48 */ /** - * g_desktop_app_info_get_filename: - * @info: a #GDesktopAppInfo + * g_dtls_connection_get_peer_certificate_errors: + * @conn: a #GDtlsConnection * - * When @info was created from a known filename, return it. In some - * situations such as the #GDesktopAppInfo returned from - * g_desktop_app_info_new_from_keyfile(), this function will return %NULL. + * Gets the errors associated with validating @conn's peer's + * certificate, after the handshake has completed. (It is not set + * during the emission of #GDtlsConnection::accept-certificate.) * - * Returns: (type filename): The full path to the file for @info, - * or %NULL if not known. - * Since: 2.24 + * Returns: @conn's peer's certificate errors + * Since: 2.48 */ /** - * g_desktop_app_info_get_generic_name: - * @info: a #GDesktopAppInfo + * g_dtls_connection_get_rehandshake_mode: + * @conn: a #GDtlsConnection * - * Gets the generic name from the destkop file. + * Gets @conn rehandshaking mode. See + * g_dtls_connection_set_rehandshake_mode() for details. * - * Returns: The value of the GenericName key + * Returns: %G_TLS_REHANDSHAKE_SAFELY + * Since: 2.48 + * Deprecated: 2.64.: Changing the rehandshake mode is no longer + * required for compatibility. Also, rehandshaking has been removed + * from the TLS protocol in TLS 1.3. */ /** - * g_desktop_app_info_get_implementations: - * @interface: the name of the interface - * - * Gets all applications that implement @interface. + * g_dtls_connection_get_require_close_notify: + * @conn: a #GDtlsConnection * - * An application implements an interface if that interface is listed in - * the Implements= line of the desktop file of the application. + * Tests whether or not @conn expects a proper TLS close notification + * when the connection is closed. See + * g_dtls_connection_set_require_close_notify() for details. * - * Returns: (element-type GDesktopAppInfo) (transfer full): a list of #GDesktopAppInfo - * objects. - * Since: 2.42 + * Returns: %TRUE if @conn requires a proper TLS close notification. + * Since: 2.48 */ /** - * g_desktop_app_info_get_is_hidden: - * @info: a #GDesktopAppInfo. + * g_dtls_connection_handshake: + * @conn: a #GDtlsConnection + * @cancellable: (nullable): a #GCancellable, or %NULL + * @error: a #GError, or %NULL * - * A desktop file is hidden if the Hidden key in it is - * set to True. + * Attempts a TLS handshake on @conn. * - * Returns: %TRUE if hidden, %FALSE otherwise. + * On the client side, it is never necessary to call this method; + * although the connection needs to perform a handshake after + * connecting, #GDtlsConnection will handle this for you automatically + * when you try to send or receive data on the connection. You can call + * g_dtls_connection_handshake() manually if you want to know whether + * the initial handshake succeeded or failed (as opposed to just + * immediately trying to use @conn to read or write, in which case, + * if it fails, it may not be possible to tell if it failed before + * or after completing the handshake), but beware that servers may reject + * client authentication after the handshake has completed, so a + * successful handshake does not indicate the connection will be usable. + * + * Likewise, on the server side, although a handshake is necessary at + * the beginning of the communication, you do not need to call this + * function explicitly unless you want clearer error reporting. + * + * Previously, calling g_dtls_connection_handshake() after the initial + * handshake would trigger a rehandshake; however, this usage was + * deprecated in GLib 2.60 because rehandshaking was removed from the + * TLS protocol in TLS 1.3. Since GLib 2.64, calling this function after + * the initial handshake will no longer do anything. + * + * #GDtlsConnection::accept_certificate may be emitted during the + * handshake. + * + * Returns: success or failure + * Since: 2.48 */ /** - * g_desktop_app_info_get_keywords: - * @info: a #GDesktopAppInfo + * g_dtls_connection_handshake_async: + * @conn: a #GDtlsConnection + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): a #GCancellable, or %NULL + * @callback: callback to call when the handshake is complete + * @user_data: the data to pass to the callback function * - * Gets the keywords from the desktop file. + * Asynchronously performs a TLS handshake on @conn. See + * g_dtls_connection_handshake() for more information. * - * Returns: (transfer none): The value of the Keywords key - * Since: 2.32 + * Since: 2.48 */ /** - * g_desktop_app_info_get_locale_string: - * @info: a #GDesktopAppInfo - * @key: the key to look up - * - * Looks up a localized string value in the keyfile backing @info - * translated to the current locale. + * g_dtls_connection_handshake_finish: + * @conn: a #GDtlsConnection + * @result: a #GAsyncResult. + * @error: a #GError pointer, or %NULL * - * The @key is looked up in the "Desktop Entry" group. + * Finish an asynchronous TLS handshake operation. See + * g_dtls_connection_handshake() for more information. * - * Returns: (nullable): a newly allocated string, or %NULL if the key - * is not found - * Since: 2.56 + * Returns: %TRUE on success, %FALSE on failure, in which + * case @error will be set. + * Since: 2.48 */ /** - * g_desktop_app_info_get_nodisplay: - * @info: a #GDesktopAppInfo + * g_dtls_connection_set_advertised_protocols: + * @conn: a #GDtlsConnection + * @protocols: (array zero-terminated=1) (nullable): a %NULL-terminated + * array of ALPN protocol names (eg, "http/1.1", "h2"), or %NULL * - * Gets the value of the NoDisplay key, which helps determine if the - * application info should be shown in menus. See - * #G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY and g_app_info_should_show(). + * Sets the list of application-layer protocols to advertise that the + * caller is willing to speak on this connection. The + * Application-Layer Protocol Negotiation (ALPN) extension will be + * used to negotiate a compatible protocol with the peer; use + * g_dtls_connection_get_negotiated_protocol() to find the negotiated + * protocol after the handshake. Specifying %NULL for the the value + * of @protocols will disable ALPN negotiation. * - * Returns: The value of the NoDisplay key - * Since: 2.30 + * See [IANA TLS ALPN Protocol IDs](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids) + * for a list of registered protocol IDs. + * + * Since: 2.60 */ /** - * g_desktop_app_info_get_show_in: - * @info: a #GDesktopAppInfo - * @desktop_env: (nullable): a string specifying a desktop name + * g_dtls_connection_set_certificate: + * @conn: a #GDtlsConnection + * @certificate: the certificate to use for @conn * - * Checks if the application info should be shown in menus that list available - * applications for a specific name of the desktop, based on the - * `OnlyShowIn` and `NotShowIn` keys. + * This sets the certificate that @conn will present to its peer + * during the TLS handshake. For a #GDtlsServerConnection, it is + * mandatory to set this, and that will normally be done at construct + * time. * - * @desktop_env should typically be given as %NULL, in which case the - * `XDG_CURRENT_DESKTOP` environment variable is consulted. If you want - * to override the default mechanism then you may specify @desktop_env, - * but this is not recommended. + * For a #GDtlsClientConnection, this is optional. If a handshake fails + * with %G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server + * requires a certificate, and if you try connecting again, you should + * call this method first. You can call + * g_dtls_client_connection_get_accepted_cas() on the failed connection + * to get a list of Certificate Authorities that the server will + * accept certificates from. * - * Note that g_app_info_should_show() for @info will include this check (with - * %NULL for @desktop_env) as well as additional checks. + * (It is also possible that a server will allow the connection with + * or without a certificate; in that case, if you don't provide a + * certificate, you can tell that the server requested one by the fact + * that g_dtls_client_connection_get_accepted_cas() will return + * non-%NULL.) * - * Returns: %TRUE if the @info should be shown in @desktop_env according to the - * `OnlyShowIn` and `NotShowIn` keys, %FALSE - * otherwise. - * Since: 2.30 + * Since: 2.48 */ /** - * g_desktop_app_info_get_startup_wm_class: - * @info: a #GDesktopAppInfo that supports startup notify + * g_dtls_connection_set_database: + * @conn: a #GDtlsConnection + * @database: a #GTlsDatabase * - * Retrieves the StartupWMClass field from @info. This represents the - * WM_CLASS property of the main window of the application, if launched - * through @info. + * Sets the certificate database that is used to verify peer certificates. + * This is set to the default database by default. See + * g_tls_backend_get_default_database(). If set to %NULL, then + * peer certificate validation will always set the + * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning + * #GDtlsConnection::accept-certificate will always be emitted on + * client-side connections, unless that bit is not set in + * #GDtlsClientConnection:validation-flags). * - * Returns: (transfer none): the startup WM class, or %NULL if none is set - * in the desktop file. - * Since: 2.34 + * Since: 2.48 */ /** - * g_desktop_app_info_get_string: - * @info: a #GDesktopAppInfo - * @key: the key to look up + * g_dtls_connection_set_interaction: + * @conn: a connection + * @interaction: (nullable): an interaction object, or %NULL * - * Looks up a string value in the keyfile backing @info. + * Set the object that will be used to interact with the user. It will be used + * for things like prompting the user for passwords. * - * The @key is looked up in the "Desktop Entry" group. + * The @interaction argument will normally be a derived subclass of + * #GTlsInteraction. %NULL can also be provided if no user interaction + * should occur for this connection. * - * Returns: a newly allocated string, or %NULL if the key - * is not found - * Since: 2.36 + * Since: 2.48 */ /** - * g_desktop_app_info_has_key: - * @info: a #GDesktopAppInfo - * @key: the key to look up + * g_dtls_connection_set_rehandshake_mode: + * @conn: a #GDtlsConnection + * @mode: the rehandshaking mode * - * Returns whether @key exists in the "Desktop Entry" group - * of the keyfile backing @info. + * Since GLib 2.64, changing the rehandshake mode is no longer supported + * and will have no effect. With TLS 1.3, rehandshaking has been removed from + * the TLS protocol, replaced by separate post-handshake authentication and + * rekey operations. * - * Returns: %TRUE if the @key exists - * Since: 2.36 + * Since: 2.48 + * Deprecated: 2.60.: Changing the rehandshake mode is no longer + * required for compatibility. Also, rehandshaking has been removed + * from the TLS protocol in TLS 1.3. */ /** - * g_desktop_app_info_launch_action: - * @info: a #GDesktopAppInfo - * @action_name: the name of the action as from - * g_desktop_app_info_list_actions() - * @launch_context: (nullable): a #GAppLaunchContext - * - * Activates the named application action. + * g_dtls_connection_set_require_close_notify: + * @conn: a #GDtlsConnection + * @require_close_notify: whether or not to require close notification * - * You may only call this function on action names that were - * returned from g_desktop_app_info_list_actions(). + * Sets whether or not @conn expects a proper TLS close notification + * before the connection is closed. If this is %TRUE (the default), + * then @conn will expect to receive a TLS close notification from its + * peer before the connection is closed, and will return a + * %G_TLS_ERROR_EOF error if the connection is closed without proper + * notification (since this may indicate a network error, or + * man-in-the-middle attack). * - * Note that if the main entry of the desktop file indicates that the - * application supports startup notification, and @launch_context is - * non-%NULL, then startup notification will be used when activating the - * action (and as such, invocation of the action on the receiving side - * must signal the end of startup notification when it is completed). - * This is the expected behaviour of applications declaring additional - * actions, as per the desktop file specification. + * In some protocols, the application will know whether or not the + * connection was closed cleanly based on application-level data + * (because the application-level data includes a length field, or is + * somehow self-delimiting); in this case, the close notify is + * redundant and may be omitted. You + * can use g_dtls_connection_set_require_close_notify() to tell @conn + * to allow an "unannounced" connection close, in which case the close + * will show up as a 0-length read, as in a non-TLS + * #GDatagramBased, and it is up to the application to check that + * the data has been fully received. * - * As with g_app_info_launch() there is no way to detect failures that - * occur while using this function. + * Note that this only affects the behavior when the peer closes the + * connection; when the application calls g_dtls_connection_close_async() on + * @conn itself, this will send a close notification regardless of the + * setting of this property. If you explicitly want to do an unclean + * close, you can close @conn's #GDtlsConnection:base-socket rather + * than closing @conn itself. * - * Since: 2.38 + * Since: 2.48 */ /** - * g_desktop_app_info_launch_uris_as_manager: - * @appinfo: a #GDesktopAppInfo - * @uris: (element-type utf8): List of URIs - * @launch_context: (nullable): a #GAppLaunchContext - * @spawn_flags: #GSpawnFlags, used for each process - * @user_setup: (scope async) (nullable): a #GSpawnChildSetupFunc, used once - * for each process. - * @user_setup_data: (closure user_setup) (nullable): User data for @user_setup - * @pid_callback: (scope call) (nullable): Callback for child processes - * @pid_callback_data: (closure pid_callback) (nullable): User data for @callback - * @error: return location for a #GError, or %NULL - * - * This function performs the equivalent of g_app_info_launch_uris(), - * but is intended primarily for operating system components that - * launch applications. Ordinary applications should use - * g_app_info_launch_uris(). + * g_dtls_connection_shutdown: + * @conn: a #GDtlsConnection + * @shutdown_read: %TRUE to stop reception of incoming datagrams + * @shutdown_write: %TRUE to stop sending outgoing datagrams + * @cancellable: (nullable): a #GCancellable, or %NULL + * @error: a #GError, or %NULL * - * If the application is launched via traditional UNIX fork()/exec() - * then @spawn_flags, @user_setup and @user_setup_data are used for the - * call to g_spawn_async(). Additionally, @pid_callback (with - * @pid_callback_data) will be called to inform about the PID of the - * created process. + * Shut down part or all of a DTLS connection. * - * If application launching occurs via some other mechanism (eg: D-Bus - * activation) then @spawn_flags, @user_setup, @user_setup_data, - * @pid_callback and @pid_callback_data are ignored. + * If @shutdown_read is %TRUE then the receiving side of the connection is shut + * down, and further reading is disallowed. Subsequent calls to + * g_datagram_based_receive_messages() will return %G_IO_ERROR_CLOSED. * - * Returns: %TRUE on successful launch, %FALSE otherwise. - */ - - -/** - * g_desktop_app_info_list_actions: - * @info: a #GDesktopAppInfo + * If @shutdown_write is %TRUE then the sending side of the connection is shut + * down, and further writing is disallowed. Subsequent calls to + * g_datagram_based_send_messages() will return %G_IO_ERROR_CLOSED. * - * Returns the list of "additional application actions" supported on the - * desktop file, as per the desktop file specification. + * It is allowed for both @shutdown_read and @shutdown_write to be TRUE — this + * is equivalent to calling g_dtls_connection_close(). * - * As per the specification, this is the list of actions that are - * explicitly listed in the "Actions" key of the [Desktop Entry] group. + * If @cancellable is cancelled, the #GDtlsConnection may be left + * partially-closed and any pending untransmitted data may be lost. Call + * g_dtls_connection_shutdown() again to complete closing the #GDtlsConnection. * - * Returns: (array zero-terminated=1) (element-type utf8) (transfer none): a list of strings, always non-%NULL - * Since: 2.38 + * Returns: %TRUE on success, %FALSE otherwise + * Since: 2.48 */ /** - * g_desktop_app_info_lookup_get_default_for_uri_scheme: - * @lookup: a #GDesktopAppInfoLookup - * @uri_scheme: a string containing a URI scheme. - * - * Gets the default application for launching applications - * using this URI scheme for a particular GDesktopAppInfoLookup - * implementation. + * g_dtls_connection_shutdown_async: + * @conn: a #GDtlsConnection + * @shutdown_read: %TRUE to stop reception of incoming datagrams + * @shutdown_write: %TRUE to stop sending outgoing datagrams + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): a #GCancellable, or %NULL + * @callback: callback to call when the shutdown operation is complete + * @user_data: the data to pass to the callback function * - * The GDesktopAppInfoLookup interface and this function is used - * to implement g_app_info_get_default_for_uri_scheme() backends - * in a GIO module. There is no reason for applications to use it - * directly. Applications should use g_app_info_get_default_for_uri_scheme(). + * Asynchronously shut down part or all of the DTLS connection. See + * g_dtls_connection_shutdown() for more information. * - * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error. - * Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio. + * Since: 2.48 */ /** - * g_desktop_app_info_new: - * @desktop_id: the desktop file id - * - * Creates a new #GDesktopAppInfo based on a desktop file id. + * g_dtls_connection_shutdown_finish: + * @conn: a #GDtlsConnection + * @result: a #GAsyncResult + * @error: a #GError pointer, or %NULL * - * A desktop file id is the basename of the desktop file, including the - * .desktop extension. GIO is looking for a desktop file with this name - * in the `applications` subdirectories of the XDG - * data directories (i.e. the directories specified in the `XDG_DATA_HOME` - * and `XDG_DATA_DIRS` environment variables). GIO also supports the - * prefix-to-subdirectory mapping that is described in the - * [Menu Spec](http://standards.freedesktop.org/menu-spec/latest/) - * (i.e. a desktop id of kde-foo.desktop will match - * `/usr/share/applications/kde/foo.desktop`). + * Finish an asynchronous TLS shutdown operation. See + * g_dtls_connection_shutdown() for more information. * - * Returns: a new #GDesktopAppInfo, or %NULL if no desktop file with that id + * Returns: %TRUE on success, %FALSE on failure, in which + * case @error will be set + * Since: 2.48 */ /** - * g_desktop_app_info_new_from_filename: - * @filename: (type filename): the path of a desktop file, in the GLib - * filename encoding + * g_dtls_server_connection_new: + * @base_socket: the #GDatagramBased to wrap + * @certificate: (nullable): the default server certificate, or %NULL + * @error: #GError for error reporting, or %NULL to ignore * - * Creates a new #GDesktopAppInfo. + * Creates a new #GDtlsServerConnection wrapping @base_socket. * - * Returns: a new #GDesktopAppInfo or %NULL on error. + * Returns: (transfer full) (type GDtlsServerConnection): the new + * #GDtlsServerConnection, or %NULL on error + * Since: 2.48 */ /** - * g_desktop_app_info_new_from_keyfile: - * @key_file: an opened #GKeyFile + * g_emblem_get_icon: + * @emblem: a #GEmblem from which the icon should be extracted. * - * Creates a new #GDesktopAppInfo. + * Gives back the icon from @emblem. * - * Returns: a new #GDesktopAppInfo or %NULL on error. + * Returns: (transfer none): a #GIcon. The returned object belongs to + * the emblem and should not be modified or freed. * Since: 2.18 */ /** - * g_desktop_app_info_search: - * @search_string: the search string to use - * - * Searches desktop files for ones that match @search_string. + * g_emblem_get_origin: + * @emblem: a #GEmblem * - * The return value is an array of strvs. Each strv contains a list of - * applications that matched @search_string with an equal score. The - * outer list is sorted by score so that the first strv contains the - * best-matching applications, and so on. - * The algorithm for determining matches is undefined and may change at - * any time. + * Gets the origin of the emblem. * - * Returns: (array zero-terminated=1) (element-type GStrv) (transfer full): a - * list of strvs. Free each item with g_strfreev() and free the outer - * list with g_free(). + * Returns: (transfer none): the origin of the emblem + * Since: 2.18 */ /** - * g_desktop_app_info_set_desktop_env: - * @desktop_env: a string specifying what desktop this is - * - * Sets the name of the desktop that the application is running in. - * This is used by g_app_info_should_show() and - * g_desktop_app_info_get_show_in() to evaluate the - * `OnlyShowIn` and `NotShowIn` - * desktop entry fields. + * g_emblem_new: + * @icon: a GIcon containing the icon. * - * Should be called only once; subsequent calls are ignored. + * Creates a new emblem for @icon. * - * Deprecated: 2.42: do not use this API. Since 2.42 the value of the - * `XDG_CURRENT_DESKTOP` environment variable will be used. + * Returns: a new #GEmblem. + * Since: 2.18 */ /** - * g_drive_can_eject: - * @drive: a #GDrive. + * g_emblem_new_with_origin: + * @icon: a GIcon containing the icon. + * @origin: a GEmblemOrigin enum defining the emblem's origin * - * Checks if a drive can be ejected. + * Creates a new emblem for @icon. * - * Returns: %TRUE if the @drive can be ejected, %FALSE otherwise. + * Returns: a new #GEmblem. + * Since: 2.18 */ /** - * g_drive_can_poll_for_media: - * @drive: a #GDrive. + * g_emblemed_icon_add_emblem: + * @emblemed: a #GEmblemedIcon + * @emblem: a #GEmblem * - * Checks if a drive can be polled for media changes. + * Adds @emblem to the #GList of #GEmblems. * - * Returns: %TRUE if the @drive can be polled for media changes, - * %FALSE otherwise. + * Since: 2.18 */ /** - * g_drive_can_start: - * @drive: a #GDrive. + * g_emblemed_icon_clear_emblems: + * @emblemed: a #GEmblemedIcon * - * Checks if a drive can be started. + * Removes all the emblems from @icon. * - * Returns: %TRUE if the @drive can be started, %FALSE otherwise. - * Since: 2.22 + * Since: 2.28 */ /** - * g_drive_can_start_degraded: - * @drive: a #GDrive. + * g_emblemed_icon_get_emblems: + * @emblemed: a #GEmblemedIcon * - * Checks if a drive can be started degraded. + * Gets the list of emblems for the @icon. * - * Returns: %TRUE if the @drive can be started degraded, %FALSE otherwise. - * Since: 2.22 + * Returns: (element-type Gio.Emblem) (transfer none): a #GList of + * #GEmblems that is owned by @emblemed + * Since: 2.18 */ /** - * g_drive_can_stop: - * @drive: a #GDrive. + * g_emblemed_icon_get_icon: + * @emblemed: a #GEmblemedIcon * - * Checks if a drive can be stopped. + * Gets the main icon for @emblemed. * - * Returns: %TRUE if the @drive can be stopped, %FALSE otherwise. - * Since: 2.22 + * Returns: (transfer none): a #GIcon that is owned by @emblemed + * Since: 2.18 */ /** - * g_drive_eject: - * @drive: a #GDrive. - * @flags: flags affecting the unmount if required for eject - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (nullable): a #GAsyncReadyCallback, or %NULL. - * @user_data: user data to pass to @callback - * - * Asynchronously ejects a drive. + * g_emblemed_icon_new: + * @icon: a #GIcon + * @emblem: (nullable): a #GEmblem, or %NULL * - * When the operation is finished, @callback will be called. - * You can then call g_drive_eject_finish() to obtain the - * result of the operation. + * Creates a new emblemed icon for @icon with the emblem @emblem. * - * Deprecated: 2.22: Use g_drive_eject_with_operation() instead. + * Returns: (transfer full) (type GEmblemedIcon): a new #GIcon + * Since: 2.18 */ /** - * g_drive_eject_finish: - * @drive: a #GDrive. - * @result: a #GAsyncResult. + * g_file_append_to: + * @file: input #GFile + * @flags: a set of #GFileCreateFlags + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore * @error: a #GError, or %NULL * - * Finishes ejecting a drive. + * Gets an output stream for appending data to the file. + * If the file doesn't already exist it is created. * - * Returns: %TRUE if the drive has been ejected successfully, - * %FALSE otherwise. - * Deprecated: 2.22: Use g_drive_eject_with_operation_finish() instead. - */ - - -/** - * g_drive_eject_with_operation: - * @drive: a #GDrive. - * @flags: flags affecting the unmount if required for eject - * @mount_operation: (nullable): a #GMountOperation or %NULL to avoid - * user interaction. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (nullable): a #GAsyncReadyCallback, or %NULL. - * @user_data: user data passed to @callback. + * By default files created are generally readable by everyone, + * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file + * will be made readable only to the current user, to the level that + * is supported on the target filesystem. * - * Ejects a drive. This is an asynchronous operation, and is - * finished by calling g_drive_eject_with_operation_finish() with the @drive - * and #GAsyncResult data returned in the @callback. + * If @cancellable is not %NULL, then the operation can be cancelled + * by triggering the cancellable object from another thread. If the + * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be + * returned. * - * Since: 2.22 + * Some file systems don't allow all file names, and may return an + * %G_IO_ERROR_INVALID_FILENAME error. If the file is a directory the + * %G_IO_ERROR_IS_DIRECTORY error will be returned. Other errors are + * possible too, and depend on what kind of filesystem the file is on. + * + * Returns: (transfer full): a #GFileOutputStream, or %NULL on error. + * Free the returned object with g_object_unref(). */ /** - * g_drive_eject_with_operation_finish: - * @drive: a #GDrive. - * @result: a #GAsyncResult. - * @error: a #GError location to store the error occurring, or %NULL to - * ignore. + * g_file_append_to_async: + * @file: input #GFile + * @flags: a set of #GFileCreateFlags + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @callback: (scope async): a #GAsyncReadyCallback to call + * when the request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Finishes ejecting a drive. If any errors occurred during the operation, - * @error will be set to contain the errors and %FALSE will be returned. + * Asynchronously opens @file for appending. * - * Returns: %TRUE if the drive was successfully ejected. %FALSE otherwise. - * Since: 2.22 + * For more details, see g_file_append_to() which is + * the synchronous version of this call. + * + * When the operation is finished, @callback will be called. + * You can then call g_file_append_to_finish() to get the result + * of the operation. */ /** - * g_drive_enumerate_identifiers: - * @drive: a #GDrive + * g_file_append_to_finish: + * @file: input #GFile + * @res: #GAsyncResult + * @error: a #GError, or %NULL * - * Gets the kinds of identifiers that @drive has. - * Use g_drive_get_identifier() to obtain the identifiers - * themselves. + * Finishes an asynchronous file append operation started with + * g_file_append_to_async(). * - * Returns: (transfer full) (array zero-terminated=1): a %NULL-terminated - * array of strings containing kinds of identifiers. Use g_strfreev() - * to free. + * Returns: (transfer full): a valid #GFileOutputStream + * or %NULL on error. + * Free the returned object with g_object_unref(). */ /** - * g_drive_get_icon: - * @drive: a #GDrive. - * - * Gets the icon for @drive. + * g_file_attribute_info_list_add: + * @list: a #GFileAttributeInfoList. + * @name: the name of the attribute to add. + * @type: the #GFileAttributeType for the attribute. + * @flags: #GFileAttributeInfoFlags for the attribute. * - * Returns: (transfer full): #GIcon for the @drive. - * Free the returned object with g_object_unref(). + * Adds a new attribute with @name to the @list, setting + * its @type and @flags. */ /** - * g_drive_get_identifier: - * @drive: a #GDrive - * @kind: the kind of identifier to return + * g_file_attribute_info_list_dup: + * @list: a #GFileAttributeInfoList to duplicate. * - * Gets the identifier of the given kind for @drive. + * Makes a duplicate of a file attribute info list. * - * Returns: a newly allocated string containing the - * requested identfier, or %NULL if the #GDrive - * doesn't have this kind of identifier. + * Returns: a copy of the given @list. */ /** - * g_drive_get_name: - * @drive: a #GDrive. + * g_file_attribute_info_list_lookup: + * @list: a #GFileAttributeInfoList. + * @name: the name of the attribute to look up. * - * Gets the name of @drive. + * Gets the file attribute with the name @name from @list. * - * Returns: a string containing @drive's name. The returned - * string should be freed when no longer needed. + * Returns: a #GFileAttributeInfo for the @name, or %NULL if an + * attribute isn't found. */ /** - * g_drive_get_sort_key: - * @drive: A #GDrive. + * g_file_attribute_info_list_new: * - * Gets the sort key for @drive, if any. + * Creates a new file attribute info list. * - * Returns: Sorting key for @drive or %NULL if no such key is available. - * Since: 2.32 + * Returns: a #GFileAttributeInfoList. */ /** - * g_drive_get_start_stop_type: - * @drive: a #GDrive. + * g_file_attribute_info_list_ref: + * @list: a #GFileAttributeInfoList to reference. * - * Gets a hint about how a drive can be started/stopped. + * References a file attribute info list. * - * Returns: A value from the #GDriveStartStopType enumeration. - * Since: 2.22 + * Returns: #GFileAttributeInfoList or %NULL on error. */ /** - * g_drive_get_symbolic_icon: - * @drive: a #GDrive. - * - * Gets the icon for @drive. + * g_file_attribute_info_list_unref: + * @list: The #GFileAttributeInfoList to unreference. * - * Returns: (transfer full): symbolic #GIcon for the @drive. - * Free the returned object with g_object_unref(). - * Since: 2.34 + * Removes a reference from the given @list. If the reference count + * falls to zero, the @list is deleted. */ /** - * g_drive_get_volumes: - * @drive: a #GDrive. + * g_file_attribute_matcher_enumerate_namespace: + * @matcher: a #GFileAttributeMatcher. + * @ns: a string containing a file attribute namespace. * - * Get a list of mountable volumes for @drive. + * Checks if the matcher will match all of the keys in a given namespace. + * This will always return %TRUE if a wildcard character is in use (e.g. if + * matcher was created with "standard::*" and @ns is "standard", or if matcher was created + * using "*" and namespace is anything.) * - * The returned list should be freed with g_list_free(), after - * its elements have been unreffed with g_object_unref(). + * TODO: this is awkwardly worded. * - * Returns: (element-type GVolume) (transfer full): #GList containing any #GVolume objects on the given @drive. + * Returns: %TRUE if the matcher matches all of the entries + * in the given @ns, %FALSE otherwise. */ /** - * g_drive_has_media: - * @drive: a #GDrive. + * g_file_attribute_matcher_enumerate_next: + * @matcher: a #GFileAttributeMatcher. * - * Checks if the @drive has media. Note that the OS may not be polling - * the drive for media changes; see g_drive_is_media_check_automatic() - * for more details. + * Gets the next matched attribute from a #GFileAttributeMatcher. * - * Returns: %TRUE if @drive has media, %FALSE otherwise. + * Returns: a string containing the next attribute or %NULL if + * no more attribute exist. */ /** - * g_drive_has_volumes: - * @drive: a #GDrive. + * g_file_attribute_matcher_matches: + * @matcher: a #GFileAttributeMatcher. + * @attribute: a file attribute key. * - * Check if @drive has any mountable volumes. + * Checks if an attribute will be matched by an attribute matcher. If + * the matcher was created with the "*" matching string, this function + * will always return %TRUE. * - * Returns: %TRUE if the @drive contains volumes, %FALSE otherwise. + * Returns: %TRUE if @attribute matches @matcher. %FALSE otherwise. */ /** - * g_drive_is_media_check_automatic: - * @drive: a #GDrive. + * g_file_attribute_matcher_matches_only: + * @matcher: a #GFileAttributeMatcher. + * @attribute: a file attribute key. * - * Checks if @drive is capabable of automatically detecting media changes. + * Checks if a attribute matcher only matches a given attribute. Always + * returns %FALSE if "*" was used when creating the matcher. * - * Returns: %TRUE if the @drive is capabable of automatically detecting - * media changes, %FALSE otherwise. + * Returns: %TRUE if the matcher only matches @attribute. %FALSE otherwise. */ /** - * g_drive_is_media_removable: - * @drive: a #GDrive. + * g_file_attribute_matcher_new: + * @attributes: an attribute string to match. * - * Checks if the @drive supports removable media. + * Creates a new file attribute matcher, which matches attributes + * against a given string. #GFileAttributeMatchers are reference + * counted structures, and are created with a reference count of 1. If + * the number of references falls to 0, the #GFileAttributeMatcher is + * automatically destroyed. * - * Returns: %TRUE if @drive supports removable media, %FALSE otherwise. + * The @attributes string should be formatted with specific keys separated + * from namespaces with a double colon. Several "namespace::key" strings may be + * concatenated with a single comma (e.g. "standard::type,standard::is-hidden"). + * The wildcard "*" may be used to match all keys and namespaces, or + * "namespace::*" will match all keys in a given namespace. + * + * ## Examples of file attribute matcher strings and results + * + * - `"*"`: matches all attributes. + * - `"standard::is-hidden"`: matches only the key is-hidden in the + * standard namespace. + * - `"standard::type,unix::*"`: matches the type key in the standard + * namespace and all keys in the unix namespace. + * + * Returns: a #GFileAttributeMatcher */ /** - * g_drive_is_removable: - * @drive: a #GDrive. + * g_file_attribute_matcher_ref: + * @matcher: a #GFileAttributeMatcher. * - * Checks if the #GDrive and/or its media is considered removable by the user. - * See g_drive_is_media_removable(). + * References a file attribute matcher. * - * Returns: %TRUE if @drive and/or its media is considered removable, %FALSE otherwise. - * Since: 2.50 + * Returns: a #GFileAttributeMatcher. */ /** - * g_drive_poll_for_media: - * @drive: a #GDrive. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (nullable): a #GAsyncReadyCallback, or %NULL. - * @user_data: user data to pass to @callback + * g_file_attribute_matcher_subtract: + * @matcher: Matcher to subtract from + * @subtract: The matcher to subtract * - * Asynchronously polls @drive to see if media has been inserted or removed. + * Subtracts all attributes of @subtract from @matcher and returns + * a matcher that supports those attributes. * - * When the operation is finished, @callback will be called. - * You can then call g_drive_poll_for_media_finish() to obtain the - * result of the operation. + * Note that currently it is not possible to remove a single + * attribute when the @matcher matches the whole namespace - or remove + * a namespace or attribute when the matcher matches everything. This + * is a limitation of the current implementation, but may be fixed + * in the future. + * + * Returns: A file attribute matcher matching all attributes of + * @matcher that are not matched by @subtract */ /** - * g_drive_poll_for_media_finish: - * @drive: a #GDrive. - * @result: a #GAsyncResult. - * @error: a #GError, or %NULL + * g_file_attribute_matcher_to_string: + * @matcher: (nullable): a #GFileAttributeMatcher. * - * Finishes an operation started with g_drive_poll_for_media() on a drive. + * Prints what the matcher is matching against. The format will be + * equal to the format passed to g_file_attribute_matcher_new(). + * The output however, might not be identical, as the matcher may + * decide to use a different order or omit needless parts. * - * Returns: %TRUE if the drive has been poll_for_mediaed successfully, - * %FALSE otherwise. + * Returns: a string describing the attributes the matcher matches + * against or %NULL if @matcher was %NULL. + * Since: 2.32 */ /** - * g_drive_start: - * @drive: a #GDrive. - * @flags: flags affecting the start operation. - * @mount_operation: (nullable): a #GMountOperation or %NULL to avoid - * user interaction. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (nullable): a #GAsyncReadyCallback, or %NULL. - * @user_data: user data to pass to @callback - * - * Asynchronously starts a drive. - * - * When the operation is finished, @callback will be called. - * You can then call g_drive_start_finish() to obtain the - * result of the operation. + * g_file_attribute_matcher_unref: + * @matcher: a #GFileAttributeMatcher. * - * Since: 2.22 + * Unreferences @matcher. If the reference count falls below 1, + * the @matcher is automatically freed. */ /** - * g_drive_start_finish: - * @drive: a #GDrive. - * @result: a #GAsyncResult. - * @error: a #GError, or %NULL + * g_file_attribute_value_dup: + * @other: a #GFileAttributeValue to duplicate. * - * Finishes starting a drive. + * Duplicates a file attribute. * - * Returns: %TRUE if the drive has been started successfully, - * %FALSE otherwise. - * Since: 2.22 + * Returns: a duplicate of the @other. */ /** - * g_drive_stop: - * @drive: a #GDrive. - * @flags: flags affecting the unmount if required for stopping. - * @mount_operation: (nullable): a #GMountOperation or %NULL to avoid - * user interaction. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (nullable): a #GAsyncReadyCallback, or %NULL. - * @user_data: user data to pass to @callback - * - * Asynchronously stops a drive. - * - * When the operation is finished, @callback will be called. - * You can then call g_drive_stop_finish() to obtain the - * result of the operation. + * g_file_attribute_value_set: + * @attr: a #GFileAttributeValue to set the value in. + * @new_value: a #GFileAttributeValue to get the value from. * - * Since: 2.22 + * Sets an attribute's value from another attribute. */ /** - * g_drive_stop_finish: - * @drive: a #GDrive. - * @result: a #GAsyncResult. - * @error: a #GError, or %NULL + * g_file_copy: + * @source: input #GFile + * @destination: destination #GFile + * @flags: set of #GFileCopyFlags + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @progress_callback: (nullable) (scope call): function to callback with + * progress information, or %NULL if progress information is not needed + * @progress_callback_data: (closure): user data to pass to @progress_callback + * @error: #GError to set on error, or %NULL * - * Finishes stopping a drive. + * Copies the file @source to the location specified by @destination. + * Can not handle recursive copies of directories. * - * Returns: %TRUE if the drive has been stopped successfully, - * %FALSE otherwise. - * Since: 2.22 + * If the flag #G_FILE_COPY_OVERWRITE is specified an already + * existing @destination file is overwritten. + * + * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks + * will be copied as symlinks, otherwise the target of the + * @source symlink will be copied. + * + * If the flag #G_FILE_COPY_ALL_METADATA is specified then all the metadata + * that is possible to copy is copied, not just the default subset (which, + * for instance, does not include the owner, see #GFileInfo). + * + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * + * If @progress_callback is not %NULL, then the operation can be monitored + * by setting this to a #GFileProgressCallback function. + * @progress_callback_data will be passed to this function. It is guaranteed + * that this callback will be called after all data has been transferred with + * the total number of bytes copied during the operation. + * + * If the @source file does not exist, then the %G_IO_ERROR_NOT_FOUND error + * is returned, independent on the status of the @destination. + * + * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then + * the error %G_IO_ERROR_EXISTS is returned. + * + * If trying to overwrite a file over a directory, the %G_IO_ERROR_IS_DIRECTORY + * error is returned. If trying to overwrite a directory with a directory the + * %G_IO_ERROR_WOULD_MERGE error is returned. + * + * If the source is a directory and the target does not exist, or + * #G_FILE_COPY_OVERWRITE is specified and the target is a file, then the + * %G_IO_ERROR_WOULD_RECURSE error is returned. + * + * If you are interested in copying the #GFile object itself (not the on-disk + * file), see g_file_dup(). + * + * Returns: %TRUE on success, %FALSE otherwise. */ /** - * g_dtls_client_connection_get_accepted_cas: - * @conn: the #GDtlsClientConnection + * g_file_copy_async: + * @source: input #GFile + * @destination: destination #GFile + * @flags: set of #GFileCopyFlags + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @progress_callback: (nullable) (scope notified): function to callback with progress + * information, or %NULL if progress information is not needed + * @progress_callback_data: (closure progress_callback) (nullable): user data to pass to @progress_callback + * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied + * @user_data: (closure callback): the data to pass to callback function * - * Gets the list of distinguished names of the Certificate Authorities - * that the server will accept certificates from. This will be set - * during the TLS handshake if the server requests a certificate. - * Otherwise, it will be %NULL. + * Copies the file @source to the location specified by @destination + * asynchronously. For details of the behaviour, see g_file_copy(). * - * Each item in the list is a #GByteArray which contains the complete - * subject DN of the certificate authority. + * If @progress_callback is not %NULL, then that function that will be called + * just like in g_file_copy(). The callback will run in the default main context + * of the thread calling g_file_copy_async() — the same context as @callback is + * run in. * - * Returns: (element-type GByteArray) (transfer full): the list of - * CA DNs. You should unref each element with g_byte_array_unref() and then - * the free the list with g_list_free(). - * Since: 2.48 + * When the operation is finished, @callback will be called. You can then call + * g_file_copy_finish() to get the result of the operation. */ /** - * g_dtls_client_connection_get_server_identity: - * @conn: the #GDtlsClientConnection + * g_file_copy_attributes: + * @source: a #GFile with attributes + * @destination: a #GFile to copy attributes to + * @flags: a set of #GFileCopyFlags + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @error: a #GError, %NULL to ignore * - * Gets @conn's expected server identity + * Copies the file attributes from @source to @destination. * - * Returns: (transfer none): a #GSocketConnectable describing the - * expected server identity, or %NULL if the expected identity is not - * known. - * Since: 2.48 + * Normally only a subset of the file attributes are copied, + * those that are copies in a normal file copy operation + * (which for instance does not include e.g. owner). However + * if #G_FILE_COPY_ALL_METADATA is specified in @flags, then + * all the metadata that is possible to copy is copied. This + * is useful when implementing move by copy + delete source. + * + * Returns: %TRUE if the attributes were copied successfully, + * %FALSE otherwise. */ /** - * g_dtls_client_connection_get_validation_flags: - * @conn: the #GDtlsClientConnection + * g_file_copy_finish: + * @file: input #GFile + * @res: a #GAsyncResult + * @error: a #GError, or %NULL * - * Gets @conn's validation flags + * Finishes copying the file started with g_file_copy_async(). * - * Returns: the validation flags - * Since: 2.48 + * Returns: a %TRUE on success, %FALSE on error. */ /** - * g_dtls_client_connection_new: - * @base_socket: the #GDatagramBased to wrap - * @server_identity: (nullable): the expected identity of the server - * @error: #GError for error reporting, or %NULL to ignore. + * g_file_create: + * @file: input #GFile + * @flags: a set of #GFileCreateFlags + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @error: a #GError, or %NULL * - * Creates a new #GDtlsClientConnection wrapping @base_socket which is - * assumed to communicate with the server identified by @server_identity. + * Creates a new file and returns an output stream for writing to it. + * The file must not already exist. * - * Returns: (transfer full) (type GDtlsClientConnection): the new - * #GDtlsClientConnection, or %NULL on error - * Since: 2.48 + * By default files created are generally readable by everyone, + * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file + * will be made readable only to the current user, to the level + * that is supported on the target filesystem. + * + * If @cancellable is not %NULL, then the operation can be cancelled + * by triggering the cancellable object from another thread. If the + * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be + * returned. + * + * If a file or directory with this name already exists the + * %G_IO_ERROR_EXISTS error will be returned. Some file systems don't + * allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME + * error, and if the name is to long %G_IO_ERROR_FILENAME_TOO_LONG will + * be returned. Other errors are possible too, and depend on what kind + * of filesystem the file is on. + * + * Returns: (transfer full): a #GFileOutputStream for the newly created + * file, or %NULL on error. + * Free the returned object with g_object_unref(). */ /** - * g_dtls_client_connection_set_server_identity: - * @conn: the #GDtlsClientConnection - * @identity: a #GSocketConnectable describing the expected server identity + * g_file_create_async: + * @file: input #GFile + * @flags: a set of #GFileCreateFlags + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @callback: (scope async): a #GAsyncReadyCallback to call + * when the request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Sets @conn's expected server identity, which is used both to tell - * servers on virtual hosts which certificate to present, and also - * to let @conn know what name to look for in the certificate when - * performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled. + * Asynchronously creates a new file and returns an output stream + * for writing to it. The file must not already exist. * - * Since: 2.48 + * For more details, see g_file_create() which is + * the synchronous version of this call. + * + * When the operation is finished, @callback will be called. + * You can then call g_file_create_finish() to get the result + * of the operation. */ /** - * g_dtls_client_connection_set_validation_flags: - * @conn: the #GDtlsClientConnection - * @flags: the #GTlsCertificateFlags to use + * g_file_create_finish: + * @file: input #GFile + * @res: a #GAsyncResult + * @error: a #GError, or %NULL * - * Sets @conn's validation flags, to override the default set of - * checks performed when validating a server certificate. By default, - * %G_TLS_CERTIFICATE_VALIDATE_ALL is used. + * Finishes an asynchronous file create operation started with + * g_file_create_async(). * - * Since: 2.48 + * Returns: (transfer full): a #GFileOutputStream or %NULL on error. + * Free the returned object with g_object_unref(). */ /** - * g_dtls_connection_close: - * @conn: a #GDtlsConnection - * @cancellable: (nullable): a #GCancellable, or %NULL - * @error: a #GError, or %NULL + * g_file_create_readwrite: + * @file: a #GFile + * @flags: a set of #GFileCreateFlags + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @error: return location for a #GError, or %NULL * - * Close the DTLS connection. This is equivalent to calling - * g_dtls_connection_shutdown() to shut down both sides of the connection. + * Creates a new file and returns a stream for reading and + * writing to it. The file must not already exist. * - * Closing a #GDtlsConnection waits for all buffered but untransmitted data to - * be sent before it completes. It then sends a `close_notify` DTLS alert to the - * peer and may wait for a `close_notify` to be received from the peer. It does - * not close the underlying #GDtlsConnection:base-socket; that must be closed - * separately. + * By default files created are generally readable by everyone, + * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file + * will be made readable only to the current user, to the level + * that is supported on the target filesystem. * - * Once @conn is closed, all other operations will return %G_IO_ERROR_CLOSED. - * Closing a #GDtlsConnection multiple times will not return an error. + * If @cancellable is not %NULL, then the operation can be cancelled + * by triggering the cancellable object from another thread. If the + * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be + * returned. * - * #GDtlsConnections will be automatically closed when the last reference is - * dropped, but you might want to call this function to make sure resources are - * released as early as possible. + * If a file or directory with this name already exists, the + * %G_IO_ERROR_EXISTS error will be returned. Some file systems don't + * allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME + * error, and if the name is too long, %G_IO_ERROR_FILENAME_TOO_LONG + * will be returned. Other errors are possible too, and depend on what + * kind of filesystem the file is on. * - * If @cancellable is cancelled, the #GDtlsConnection may be left - * partially-closed and any pending untransmitted data may be lost. Call - * g_dtls_connection_close() again to complete closing the #GDtlsConnection. + * Note that in many non-local file cases read and write streams are + * not supported, so make sure you really need to do read and write + * streaming, rather than just opening for reading or writing. * - * Returns: %TRUE on success, %FALSE otherwise - * Since: 2.48 + * Returns: (transfer full): a #GFileIOStream for the newly created + * file, or %NULL on error. + * Free the returned object with g_object_unref(). + * Since: 2.22 */ /** - * g_dtls_connection_close_async: - * @conn: a #GDtlsConnection + * g_file_create_readwrite_async: + * @file: input #GFile + * @flags: a set of #GFileCreateFlags * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): a #GCancellable, or %NULL - * @callback: callback to call when the close operation is complete - * @user_data: the data to pass to the callback function + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @callback: (scope async): a #GAsyncReadyCallback to call + * when the request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Asynchronously close the DTLS connection. See g_dtls_connection_close() for - * more information. + * Asynchronously creates a new file and returns a stream + * for reading and writing to it. The file must not already exist. * - * Since: 2.48 - */ - - -/** - * g_dtls_connection_close_finish: - * @conn: a #GDtlsConnection - * @result: a #GAsyncResult - * @error: a #GError pointer, or %NULL + * For more details, see g_file_create_readwrite() which is + * the synchronous version of this call. * - * Finish an asynchronous TLS close operation. See g_dtls_connection_close() - * for more information. + * When the operation is finished, @callback will be called. + * You can then call g_file_create_readwrite_finish() to get + * the result of the operation. * - * Returns: %TRUE on success, %FALSE on failure, in which - * case @error will be set - * Since: 2.48 + * Since: 2.22 */ /** - * g_dtls_connection_emit_accept_certificate: - * @conn: a #GDtlsConnection - * @peer_cert: the peer's #GTlsCertificate - * @errors: the problems with @peer_cert + * g_file_create_readwrite_finish: + * @file: input #GFile + * @res: a #GAsyncResult + * @error: a #GError, or %NULL * - * Used by #GDtlsConnection implementations to emit the - * #GDtlsConnection::accept-certificate signal. + * Finishes an asynchronous file create operation started with + * g_file_create_readwrite_async(). * - * Returns: %TRUE if one of the signal handlers has returned - * %TRUE to accept @peer_cert - * Since: 2.48 + * Returns: (transfer full): a #GFileIOStream or %NULL on error. + * Free the returned object with g_object_unref(). + * Since: 2.22 */ /** - * g_dtls_connection_get_certificate: - * @conn: a #GDtlsConnection + * g_file_delete: (virtual delete_file) + * @file: input #GFile + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @error: a #GError, or %NULL * - * Gets @conn's certificate, as set by - * g_dtls_connection_set_certificate(). + * Deletes a file. If the @file is a directory, it will only be + * deleted if it is empty. This has the same semantics as g_unlink(). * - * Returns: (transfer none): @conn's certificate, or %NULL - * Since: 2.48 + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * + * Returns: %TRUE if the file was deleted. %FALSE otherwise. */ /** - * g_dtls_connection_get_database: - * @conn: a #GDtlsConnection + * g_file_delete_async: (virtual delete_file_async) + * @file: input #GFile + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @callback: a #GAsyncReadyCallback to call + * when the request is satisfied + * @user_data: the data to pass to callback function * - * Gets the certificate database that @conn uses to verify - * peer certificates. See g_dtls_connection_set_database(). + * Asynchronously delete a file. If the @file is a directory, it will + * only be deleted if it is empty. This has the same semantics as + * g_unlink(). * - * Returns: (transfer none): the certificate database that @conn uses or %NULL - * Since: 2.48 + * Since: 2.34 */ /** - * g_dtls_connection_get_interaction: - * @conn: a connection + * g_file_delete_finish: (virtual delete_file_finish) + * @file: input #GFile + * @result: a #GAsyncResult + * @error: a #GError, or %NULL * - * Get the object that will be used to interact with the user. It will be used - * for things like prompting the user for passwords. If %NULL is returned, then - * no user interaction will occur for this connection. + * Finishes deleting a file started with g_file_delete_async(). * - * Returns: (transfer none): The interaction object. - * Since: 2.48 + * Returns: %TRUE if the file was deleted. %FALSE otherwise. + * Since: 2.34 */ /** - * g_dtls_connection_get_peer_certificate: - * @conn: a #GDtlsConnection + * g_file_descriptor_based_get_fd: + * @fd_based: a #GFileDescriptorBased. * - * Gets @conn's peer's certificate after the handshake has completed. - * (It is not set during the emission of - * #GDtlsConnection::accept-certificate.) + * Gets the underlying file descriptor. * - * Returns: (transfer none): @conn's peer's certificate, or %NULL - * Since: 2.48 + * Returns: The file descriptor + * Since: 2.24 */ /** - * g_dtls_connection_get_peer_certificate_errors: - * @conn: a #GDtlsConnection + * g_file_dup: + * @file: input #GFile * - * Gets the errors associated with validating @conn's peer's - * certificate, after the handshake has completed. (It is not set - * during the emission of #GDtlsConnection::accept-certificate.) + * Duplicates a #GFile handle. This operation does not duplicate + * the actual file or directory represented by the #GFile; see + * g_file_copy() if attempting to copy a file. * - * Returns: @conn's peer's certificate errors - * Since: 2.48 - */ - - -/** - * g_dtls_connection_get_rehandshake_mode: - * @conn: a #GDtlsConnection + * g_file_dup() is useful when a second handle is needed to the same underlying + * file, for use in a separate thread (#GFile is not thread-safe). For use + * within the same thread, use g_object_ref() to increment the existing object’s + * reference count. * - * Gets @conn rehandshaking mode. See - * g_dtls_connection_set_rehandshake_mode() for details. + * This call does no blocking I/O. * - * Returns: @conn's rehandshaking mode - * Since: 2.48 + * Returns: (transfer full): a new #GFile that is a duplicate + * of the given #GFile. */ /** - * g_dtls_connection_get_require_close_notify: - * @conn: a #GDtlsConnection + * g_file_eject_mountable: + * @file: input #GFile + * @flags: flags affecting the operation + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @callback: (scope async) (nullable): a #GAsyncReadyCallback to call + * when the request is satisfied, or %NULL + * @user_data: (closure): the data to pass to callback function * - * Tests whether or not @conn expects a proper TLS close notification - * when the connection is closed. See - * g_dtls_connection_set_require_close_notify() for details. + * Starts an asynchronous eject on a mountable. + * When this operation has completed, @callback will be called with + * @user_user data, and the operation can be finalized with + * g_file_eject_mountable_finish(). * - * Returns: %TRUE if @conn requires a proper TLS close notification. - * Since: 2.48 + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * + * Deprecated: 2.22: Use g_file_eject_mountable_with_operation() instead. */ /** - * g_dtls_connection_handshake: - * @conn: a #GDtlsConnection - * @cancellable: (nullable): a #GCancellable, or %NULL + * g_file_eject_mountable_finish: + * @file: input #GFile + * @result: a #GAsyncResult * @error: a #GError, or %NULL * - * Attempts a TLS handshake on @conn. - * - * On the client side, it is never necessary to call this method; - * although the connection needs to perform a handshake after - * connecting (or after sending a "STARTTLS"-type command) and may - * need to rehandshake later if the server requests it, - * #GDtlsConnection will handle this for you automatically when you try - * to send or receive data on the connection. However, you can call - * g_dtls_connection_handshake() manually if you want to know for sure - * whether the initial handshake succeeded or failed (as opposed to - * just immediately trying to write to @conn, in which - * case if it fails, it may not be possible to tell if it failed - * before or after completing the handshake). - * - * Likewise, on the server side, although a handshake is necessary at - * the beginning of the communication, you do not need to call this - * function explicitly unless you want clearer error reporting. - * However, you may call g_dtls_connection_handshake() later on to - * renegotiate parameters (encryption methods, etc) with the client. - * - * #GDtlsConnection::accept_certificate may be emitted during the - * handshake. + * Finishes an asynchronous eject operation started by + * g_file_eject_mountable(). * - * Returns: success or failure - * Since: 2.48 + * Returns: %TRUE if the @file was ejected successfully. + * %FALSE otherwise. + * Deprecated: 2.22: Use g_file_eject_mountable_with_operation_finish() + * instead. */ /** - * g_dtls_connection_handshake_async: - * @conn: a #GDtlsConnection - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): a #GCancellable, or %NULL - * @callback: callback to call when the handshake is complete - * @user_data: the data to pass to the callback function + * g_file_eject_mountable_with_operation: + * @file: input #GFile + * @flags: flags affecting the operation + * @mount_operation: (nullable): a #GMountOperation, + * or %NULL to avoid user interaction + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @callback: (scope async) (nullable): a #GAsyncReadyCallback to call + * when the request is satisfied, or %NULL + * @user_data: (closure): the data to pass to callback function * - * Asynchronously performs a TLS handshake on @conn. See - * g_dtls_connection_handshake() for more information. + * Starts an asynchronous eject on a mountable. + * When this operation has completed, @callback will be called with + * @user_user data, and the operation can be finalized with + * g_file_eject_mountable_with_operation_finish(). * - * Since: 2.48 + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * + * Since: 2.22 */ /** - * g_dtls_connection_handshake_finish: - * @conn: a #GDtlsConnection - * @result: a #GAsyncResult. - * @error: a #GError pointer, or %NULL + * g_file_eject_mountable_with_operation_finish: + * @file: input #GFile + * @result: a #GAsyncResult + * @error: a #GError, or %NULL * - * Finish an asynchronous TLS handshake operation. See - * g_dtls_connection_handshake() for more information. + * Finishes an asynchronous eject operation started by + * g_file_eject_mountable_with_operation(). * - * Returns: %TRUE on success, %FALSE on failure, in which - * case @error will be set. - * Since: 2.48 + * Returns: %TRUE if the @file was ejected successfully. + * %FALSE otherwise. + * Since: 2.22 */ /** - * g_dtls_connection_set_certificate: - * @conn: a #GDtlsConnection - * @certificate: the certificate to use for @conn - * - * This sets the certificate that @conn will present to its peer - * during the TLS handshake. For a #GDtlsServerConnection, it is - * mandatory to set this, and that will normally be done at construct - * time. - * - * For a #GDtlsClientConnection, this is optional. If a handshake fails - * with %G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server - * requires a certificate, and if you try connecting again, you should - * call this method first. You can call - * g_dtls_client_connection_get_accepted_cas() on the failed connection - * to get a list of Certificate Authorities that the server will - * accept certificates from. - * - * (It is also possible that a server will allow the connection with - * or without a certificate; in that case, if you don't provide a - * certificate, you can tell that the server requested one by the fact - * that g_dtls_client_connection_get_accepted_cas() will return - * non-%NULL.) - * - * Since: 2.48 - */ - - -/** - * g_dtls_connection_set_database: - * @conn: a #GDtlsConnection - * @database: a #GTlsDatabase + * g_file_enumerate_children: + * @file: input #GFile + * @attributes: an attribute query string + * @flags: a set of #GFileQueryInfoFlags + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @error: #GError for error reporting * - * Sets the certificate database that is used to verify peer certificates. - * This is set to the default database by default. See - * g_tls_backend_get_default_database(). If set to %NULL, then - * peer certificate validation will always set the - * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning - * #GDtlsConnection::accept-certificate will always be emitted on - * client-side connections, unless that bit is not set in - * #GDtlsClientConnection:validation-flags). + * Gets the requested information about the files in a directory. + * The result is a #GFileEnumerator object that will give out + * #GFileInfo objects for all the files in the directory. * - * Since: 2.48 - */ - - -/** - * g_dtls_connection_set_interaction: - * @conn: a connection - * @interaction: (nullable): an interaction object, or %NULL + * The @attributes value is a string that specifies the file + * attributes that should be gathered. It is not an error if + * it's not possible to read a particular requested attribute + * from a file - it just won't be set. @attributes should + * be a comma-separated list of attributes or attribute wildcards. + * The wildcard "*" means all attributes, and a wildcard like + * "standard::*" means all attributes in the standard namespace. + * An example attribute query be "standard::*,owner::user". + * The standard attributes are available as defines, like + * #G_FILE_ATTRIBUTE_STANDARD_NAME. * - * Set the object that will be used to interact with the user. It will be used - * for things like prompting the user for passwords. + * If @cancellable is not %NULL, then the operation can be cancelled + * by triggering the cancellable object from another thread. If the + * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be + * returned. * - * The @interaction argument will normally be a derived subclass of - * #GTlsInteraction. %NULL can also be provided if no user interaction - * should occur for this connection. + * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will + * be returned. If the file is not a directory, the %G_IO_ERROR_NOT_DIRECTORY + * error will be returned. Other errors are possible too. * - * Since: 2.48 + * Returns: (transfer full): A #GFileEnumerator if successful, + * %NULL on error. Free the returned object with g_object_unref(). */ /** - * g_dtls_connection_set_rehandshake_mode: - * @conn: a #GDtlsConnection - * @mode: the rehandshaking mode + * g_file_enumerate_children_async: + * @file: input #GFile + * @attributes: an attribute query string + * @flags: a set of #GFileQueryInfoFlags + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @callback: (scope async): a #GAsyncReadyCallback to call when the + * request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Sets how @conn behaves with respect to rehandshaking requests. + * Asynchronously gets the requested information about the files + * in a directory. The result is a #GFileEnumerator object that will + * give out #GFileInfo objects for all the files in the directory. * - * %G_TLS_REHANDSHAKE_NEVER means that it will never agree to - * rehandshake after the initial handshake is complete. (For a client, - * this means it will refuse rehandshake requests from the server, and - * for a server, this means it will close the connection with an error - * if the client attempts to rehandshake.) - * - * %G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a - * rehandshake only if the other end of the connection supports the - * TLS `renegotiation_info` extension. This is the default behavior, - * but means that rehandshaking will not work against older - * implementations that do not support that extension. - * - * %G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow - * rehandshaking even without the `renegotiation_info` extension. On - * the server side in particular, this is not recommended, since it - * leaves the server open to certain attacks. However, this mode is - * necessary if you need to allow renegotiation with older client - * software. + * For more details, see g_file_enumerate_children() which is + * the synchronous version of this call. * - * Since: 2.48 + * When the operation is finished, @callback will be called. You can + * then call g_file_enumerate_children_finish() to get the result of + * the operation. */ /** - * g_dtls_connection_set_require_close_notify: - * @conn: a #GDtlsConnection - * @require_close_notify: whether or not to require close notification - * - * Sets whether or not @conn expects a proper TLS close notification - * before the connection is closed. If this is %TRUE (the default), - * then @conn will expect to receive a TLS close notification from its - * peer before the connection is closed, and will return a - * %G_TLS_ERROR_EOF error if the connection is closed without proper - * notification (since this may indicate a network error, or - * man-in-the-middle attack). - * - * In some protocols, the application will know whether or not the - * connection was closed cleanly based on application-level data - * (because the application-level data includes a length field, or is - * somehow self-delimiting); in this case, the close notify is - * redundant and may be omitted. You - * can use g_dtls_connection_set_require_close_notify() to tell @conn - * to allow an "unannounced" connection close, in which case the close - * will show up as a 0-length read, as in a non-TLS - * #GDatagramBased, and it is up to the application to check that - * the data has been fully received. + * g_file_enumerate_children_finish: + * @file: input #GFile + * @res: a #GAsyncResult + * @error: a #GError * - * Note that this only affects the behavior when the peer closes the - * connection; when the application calls g_dtls_connection_close_async() on - * @conn itself, this will send a close notification regardless of the - * setting of this property. If you explicitly want to do an unclean - * close, you can close @conn's #GDtlsConnection:base-socket rather - * than closing @conn itself. + * Finishes an async enumerate children operation. + * See g_file_enumerate_children_async(). * - * Since: 2.48 + * Returns: (transfer full): a #GFileEnumerator or %NULL + * if an error occurred. + * Free the returned object with g_object_unref(). */ /** - * g_dtls_connection_shutdown: - * @conn: a #GDtlsConnection - * @shutdown_read: %TRUE to stop reception of incoming datagrams - * @shutdown_write: %TRUE to stop sending outgoing datagrams - * @cancellable: (nullable): a #GCancellable, or %NULL - * @error: a #GError, or %NULL - * - * Shut down part or all of a DTLS connection. - * - * If @shutdown_read is %TRUE then the receiving side of the connection is shut - * down, and further reading is disallowed. Subsequent calls to - * g_datagram_based_receive_messages() will return %G_IO_ERROR_CLOSED. - * - * If @shutdown_write is %TRUE then the sending side of the connection is shut - * down, and further writing is disallowed. Subsequent calls to - * g_datagram_based_send_messages() will return %G_IO_ERROR_CLOSED. + * g_file_enumerator_close: + * @enumerator: a #GFileEnumerator. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: location to store the error occurring, or %NULL to ignore * - * It is allowed for both @shutdown_read and @shutdown_write to be TRUE — this - * is equivalent to calling g_dtls_connection_close(). + * Releases all resources used by this enumerator, making the + * enumerator return %G_IO_ERROR_CLOSED on all calls. * - * If @cancellable is cancelled, the #GDtlsConnection may be left - * partially-closed and any pending untransmitted data may be lost. Call - * g_dtls_connection_shutdown() again to complete closing the #GDtlsConnection. + * This will be automatically called when the last reference + * is dropped, but you might want to call this function to make + * sure resources are released as early as possible. * - * Returns: %TRUE on success, %FALSE otherwise - * Since: 2.48 + * Returns: #TRUE on success or #FALSE on error. */ /** - * g_dtls_connection_shutdown_async: - * @conn: a #GDtlsConnection - * @shutdown_read: %TRUE to stop reception of incoming datagrams - * @shutdown_write: %TRUE to stop sending outgoing datagrams + * g_file_enumerator_close_async: + * @enumerator: a #GFileEnumerator. * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): a #GCancellable, or %NULL - * @callback: callback to call when the shutdown operation is complete - * @user_data: the data to pass to the callback function + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Asynchronously shut down part or all of the DTLS connection. See - * g_dtls_connection_shutdown() for more information. + * Asynchronously closes the file enumerator. * - * Since: 2.48 + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in + * g_file_enumerator_close_finish(). */ /** - * g_dtls_connection_shutdown_finish: - * @conn: a #GDtlsConnection - * @result: a #GAsyncResult - * @error: a #GError pointer, or %NULL + * g_file_enumerator_close_finish: + * @enumerator: a #GFileEnumerator. + * @result: a #GAsyncResult. + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. * - * Finish an asynchronous TLS shutdown operation. See - * g_dtls_connection_shutdown() for more information. + * Finishes closing a file enumerator, started from g_file_enumerator_close_async(). * - * Returns: %TRUE on success, %FALSE on failure, in which - * case @error will be set - * Since: 2.48 + * If the file enumerator was already closed when g_file_enumerator_close_async() + * was called, then this function will report %G_IO_ERROR_CLOSED in @error, and + * return %FALSE. If the file enumerator had pending operation when the close + * operation was started, then this function will report %G_IO_ERROR_PENDING, and + * return %FALSE. If @cancellable was not %NULL, then the operation may have been + * cancelled by triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be + * returned. + * + * Returns: %TRUE if the close operation has finished successfully. */ /** - * g_dtls_server_connection_new: - * @base_socket: the #GDatagramBased to wrap - * @certificate: (nullable): the default server certificate, or %NULL - * @error: #GError for error reporting, or %NULL to ignore + * g_file_enumerator_get_child: + * @enumerator: a #GFileEnumerator + * @info: a #GFileInfo gotten from g_file_enumerator_next_file() + * or the async equivalents. * - * Creates a new #GDtlsServerConnection wrapping @base_socket. + * Return a new #GFile which refers to the file named by @info in the source + * directory of @enumerator. This function is primarily intended to be used + * inside loops with g_file_enumerator_next_file(). * - * Returns: (transfer full) (type GDtlsServerConnection): the new - * #GDtlsServerConnection, or %NULL on error - * Since: 2.48 + * This is a convenience method that's equivalent to: + * |[ + * gchar *name = g_file_info_get_name (info); + * GFile *child = g_file_get_child (g_file_enumerator_get_container (enumr), + * name); + * ]| + * + * Returns: (transfer full): a #GFile for the #GFileInfo passed it. + * Since: 2.36 */ /** - * g_emblem_get_icon: - * @emblem: a #GEmblem from which the icon should be extracted. + * g_file_enumerator_get_container: + * @enumerator: a #GFileEnumerator * - * Gives back the icon from @emblem. + * Get the #GFile container which is being enumerated. * - * Returns: (transfer none): a #GIcon. The returned object belongs to - * the emblem and should not be modified or freed. + * Returns: (transfer none): the #GFile which is being enumerated. * Since: 2.18 */ /** - * g_emblem_get_origin: - * @emblem: a #GEmblem + * g_file_enumerator_has_pending: + * @enumerator: a #GFileEnumerator. * - * Gets the origin of the emblem. + * Checks if the file enumerator has pending operations. * - * Returns: (transfer none): the origin of the emblem - * Since: 2.18 + * Returns: %TRUE if the @enumerator has pending operations. */ /** - * g_emblem_new: - * @icon: a GIcon containing the icon. + * g_file_enumerator_is_closed: + * @enumerator: a #GFileEnumerator. * - * Creates a new emblem for @icon. + * Checks if the file enumerator has been closed. * - * Returns: a new #GEmblem. - * Since: 2.18 + * Returns: %TRUE if the @enumerator is closed. */ /** - * g_emblem_new_with_origin: - * @icon: a GIcon containing the icon. - * @origin: a GEmblemOrigin enum defining the emblem's origin + * g_file_enumerator_iterate: + * @direnum: an open #GFileEnumerator + * @out_info: (out) (transfer none) (optional): Output location for the next #GFileInfo, or %NULL + * @out_child: (out) (transfer none) (optional): Output location for the next #GFile, or %NULL + * @cancellable: a #GCancellable + * @error: a #GError * - * Creates a new emblem for @icon. + * This is a version of g_file_enumerator_next_file() that's easier to + * use correctly from C programs. With g_file_enumerator_next_file(), + * the gboolean return value signifies "end of iteration or error", which + * requires allocation of a temporary #GError. * - * Returns: a new #GEmblem. - * Since: 2.18 + * In contrast, with this function, a %FALSE return from + * g_file_enumerator_iterate() *always* means + * "error". End of iteration is signaled by @out_info or @out_child being %NULL. + * + * Another crucial difference is that the references for @out_info and + * @out_child are owned by @direnum (they are cached as hidden + * properties). You must not unref them in your own code. This makes + * memory management significantly easier for C code in combination + * with loops. + * + * Finally, this function optionally allows retrieving a #GFile as + * well. + * + * You must specify at least one of @out_info or @out_child. + * + * The code pattern for correctly using g_file_enumerator_iterate() from C + * is: + * + * |[ + * direnum = g_file_enumerate_children (file, ...); + * while (TRUE) + * { + * GFileInfo *info; + * if (!g_file_enumerator_iterate (direnum, &info, NULL, cancellable, error)) + * goto out; + * if (!info) + * break; + * ... do stuff with "info"; do not unref it! ... + * } + * + * out: + * g_object_unref (direnum); // Note: frees the last @info + * ]| + * + * Since: 2.44 */ /** - * g_emblemed_icon_add_emblem: - * @emblemed: a #GEmblemedIcon - * @emblem: a #GEmblem + * g_file_enumerator_next_file: + * @enumerator: a #GFileEnumerator. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: location to store the error occurring, or %NULL to ignore * - * Adds @emblem to the #GList of #GEmblems. + * Returns information for the next file in the enumerated object. + * Will block until the information is available. The #GFileInfo + * returned from this function will contain attributes that match the + * attribute string that was passed when the #GFileEnumerator was created. * - * Since: 2.18 + * See the documentation of #GFileEnumerator for information about the + * order of returned files. + * + * On error, returns %NULL and sets @error to the error. If the + * enumerator is at the end, %NULL will be returned and @error will + * be unset. + * + * Returns: (nullable) (transfer full): A #GFileInfo or %NULL on error + * or end of enumerator. Free the returned object with + * g_object_unref() when no longer needed. */ /** - * g_emblemed_icon_clear_emblems: - * @emblemed: a #GEmblemedIcon + * g_file_enumerator_next_files_async: + * @enumerator: a #GFileEnumerator. + * @num_files: the number of file info objects to request + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Removes all the emblems from @icon. + * Request information for a number of files from the enumerator asynchronously. + * When all i/o for the operation is finished the @callback will be called with + * the requested information. * - * Since: 2.28 + * See the documentation of #GFileEnumerator for information about the + * order of returned files. + * + * The callback can be called with less than @num_files files in case of error + * or at the end of the enumerator. In case of a partial error the callback will + * be called with any succeeding items and no error, and on the next request the + * error will be reported. If a request is cancelled the callback will be called + * with %G_IO_ERROR_CANCELLED. + * + * During an async request no other sync and async calls are allowed, and will + * result in %G_IO_ERROR_PENDING errors. + * + * Any outstanding i/o request with higher priority (lower numerical value) will + * be executed before an outstanding request with lower priority. Default + * priority is %G_PRIORITY_DEFAULT. */ /** - * g_emblemed_icon_get_emblems: - * @emblemed: a #GEmblemedIcon + * g_file_enumerator_next_files_finish: + * @enumerator: a #GFileEnumerator. + * @result: a #GAsyncResult. + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. * - * Gets the list of emblems for the @icon. + * Finishes the asynchronous operation started with g_file_enumerator_next_files_async(). * - * Returns: (element-type Gio.Emblem) (transfer none): a #GList of - * #GEmblems that is owned by @emblemed - * Since: 2.18 + * Returns: (transfer full) (element-type Gio.FileInfo): a #GList of #GFileInfos. You must free the list with + * g_list_free() and unref the infos with g_object_unref() when you're + * done with them. */ /** - * g_emblemed_icon_get_icon: - * @emblemed: a #GEmblemedIcon - * - * Gets the main icon for @emblemed. + * g_file_enumerator_set_pending: + * @enumerator: a #GFileEnumerator. + * @pending: a boolean value. * - * Returns: (transfer none): a #GIcon that is owned by @emblemed - * Since: 2.18 + * Sets the file enumerator as having pending operations. */ /** - * g_emblemed_icon_new: - * @icon: a #GIcon - * @emblem: (nullable): a #GEmblem, or %NULL + * g_file_equal: + * @file1: the first #GFile + * @file2: the second #GFile * - * Creates a new emblemed icon for @icon with the emblem @emblem. + * Checks if the two given #GFiles refer to the same file. * - * Returns: (transfer full) (type GEmblemedIcon): a new #GIcon - * Since: 2.18 + * Note that two #GFiles that differ can still refer to the same + * file on the filesystem due to various forms of filename + * aliasing. + * + * This call does no blocking I/O. + * + * Returns: %TRUE if @file1 and @file2 are equal. */ /** - * g_file_append_to: + * g_file_find_enclosing_mount: * @file: input #GFile - * @flags: a set of #GFileCreateFlags * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore - * @error: a #GError, or %NULL - * - * Gets an output stream for appending data to the file. - * If the file doesn't already exist it is created. + * @error: a #GError * - * By default files created are generally readable by everyone, - * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file - * will be made readable only to the current user, to the level that - * is supported on the target filesystem. + * Gets a #GMount for the #GFile. * - * If @cancellable is not %NULL, then the operation can be cancelled - * by triggering the cancellable object from another thread. If the - * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be - * returned. + * #GMount is returned only for user interesting locations, see + * #GVolumeMonitor. If the #GFileIface for @file does not have a #mount, + * @error will be set to %G_IO_ERROR_NOT_FOUND and %NULL #will be returned. * - * Some file systems don't allow all file names, and may return an - * %G_IO_ERROR_INVALID_FILENAME error. If the file is a directory the - * %G_IO_ERROR_IS_DIRECTORY error will be returned. Other errors are - * possible too, and depend on what kind of filesystem the file is on. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * Returns: (transfer full): a #GFileOutputStream, or %NULL on error. + * Returns: (transfer full): a #GMount where the @file is located + * or %NULL on error. * Free the returned object with g_object_unref(). */ /** - * g_file_append_to_async: - * @file: input #GFile - * @flags: a set of #GFileCreateFlags + * g_file_find_enclosing_mount_async: + * @file: a #GFile * @io_priority: the [I/O priority][io-priority] of the request * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore @@ -22324,2105 +21956,2014 @@ * when the request is satisfied * @user_data: (closure): the data to pass to callback function * - * Asynchronously opens @file for appending. + * Asynchronously gets the mount for the file. * - * For more details, see g_file_append_to() which is + * For more details, see g_file_find_enclosing_mount() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. - * You can then call g_file_append_to_finish() to get the result - * of the operation. + * You can then call g_file_find_enclosing_mount_finish() to + * get the result of the operation. */ /** - * g_file_append_to_finish: - * @file: input #GFile - * @res: #GAsyncResult - * @error: a #GError, or %NULL + * g_file_find_enclosing_mount_finish: + * @file: a #GFile + * @res: a #GAsyncResult + * @error: a #GError * - * Finishes an asynchronous file append operation started with - * g_file_append_to_async(). + * Finishes an asynchronous find mount request. + * See g_file_find_enclosing_mount_async(). * - * Returns: (transfer full): a valid #GFileOutputStream - * or %NULL on error. + * Returns: (transfer full): #GMount for given @file or %NULL on error. * Free the returned object with g_object_unref(). */ /** - * g_file_attribute_info_list_add: - * @list: a #GFileAttributeInfoList. - * @name: the name of the attribute to add. - * @type: the #GFileAttributeType for the attribute. - * @flags: #GFileAttributeInfoFlags for the attribute. + * g_file_get_basename: + * @file: input #GFile * - * Adds a new attribute with @name to the @list, setting - * its @type and @flags. - */ - - -/** - * g_file_attribute_info_list_dup: - * @list: a #GFileAttributeInfoList to duplicate. + * Gets the base name (the last component of the path) for a given #GFile. * - * Makes a duplicate of a file attribute info list. + * If called for the top level of a system (such as the filesystem root + * or a uri like sftp://host/) it will return a single directory separator + * (and on Windows, possibly a drive letter). * - * Returns: a copy of the given @list. - */ - - -/** - * g_file_attribute_info_list_lookup: - * @list: a #GFileAttributeInfoList. - * @name: the name of the attribute to lookup. + * The base name is a byte string (not UTF-8). It has no defined encoding + * or rules other than it may not contain zero bytes. If you want to use + * filenames in a user interface you should use the display name that you + * can get by requesting the %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME + * attribute with g_file_query_info(). * - * Gets the file attribute with the name @name from @list. + * This call does no blocking I/O. * - * Returns: a #GFileAttributeInfo for the @name, or %NULL if an - * attribute isn't found. + * Returns: (type filename) (nullable): string containing the #GFile's + * base name, or %NULL if given #GFile is invalid. The returned string + * should be freed with g_free() when no longer needed. */ /** - * g_file_attribute_info_list_new: + * g_file_get_child: + * @file: input #GFile + * @name: (type filename): string containing the child's basename * - * Creates a new file attribute info list. + * Gets a child of @file with basename equal to @name. * - * Returns: a #GFileAttributeInfoList. + * Note that the file with that specific name might not exist, but + * you can still have a #GFile that points to it. You can use this + * for instance to create that file. + * + * This call does no blocking I/O. + * + * Returns: (transfer full): a #GFile to a child specified by @name. + * Free the returned object with g_object_unref(). */ /** - * g_file_attribute_info_list_ref: - * @list: a #GFileAttributeInfoList to reference. + * g_file_get_child_for_display_name: + * @file: input #GFile + * @display_name: string to a possible child + * @error: return location for an error * - * References a file attribute info list. + * Gets the child of @file for a given @display_name (i.e. a UTF-8 + * version of the name). If this function fails, it returns %NULL + * and @error will be set. This is very useful when constructing a + * #GFile for a new file and the user entered the filename in the + * user interface, for instance when you select a directory and + * type a filename in the file selector. * - * Returns: #GFileAttributeInfoList or %NULL on error. + * This call does no blocking I/O. + * + * Returns: (transfer full): a #GFile to the specified child, or + * %NULL if the display name couldn't be converted. + * Free the returned object with g_object_unref(). */ /** - * g_file_attribute_info_list_unref: - * @list: The #GFileAttributeInfoList to unreference. + * g_file_get_parent: + * @file: input #GFile * - * Removes a reference from the given @list. If the reference count - * falls to zero, the @list is deleted. + * Gets the parent directory for the @file. + * If the @file represents the root directory of the + * file system, then %NULL will be returned. + * + * This call does no blocking I/O. + * + * Returns: (nullable) (transfer full): a #GFile structure to the + * parent of the given #GFile or %NULL if there is no parent. Free + * the returned object with g_object_unref(). */ /** - * g_file_attribute_matcher_enumerate_namespace: - * @matcher: a #GFileAttributeMatcher. - * @ns: a string containing a file attribute namespace. + * g_file_get_parse_name: + * @file: input #GFile * - * Checks if the matcher will match all of the keys in a given namespace. - * This will always return %TRUE if a wildcard character is in use (e.g. if - * matcher was created with "standard::*" and @ns is "standard", or if matcher was created - * using "*" and namespace is anything.) + * Gets the parse name of the @file. + * A parse name is a UTF-8 string that describes the + * file such that one can get the #GFile back using + * g_file_parse_name(). * - * TODO: this is awkwardly worded. + * This is generally used to show the #GFile as a nice + * full-pathname kind of string in a user interface, + * like in a location entry. * - * Returns: %TRUE if the matcher matches all of the entries - * in the given @ns, %FALSE otherwise. + * For local files with names that can safely be converted + * to UTF-8 the pathname is used, otherwise the IRI is used + * (a form of URI that allows UTF-8 characters unescaped). + * + * This call does no blocking I/O. + * + * Returns: a string containing the #GFile's parse name. + * The returned string should be freed with g_free() + * when no longer needed. */ /** - * g_file_attribute_matcher_enumerate_next: - * @matcher: a #GFileAttributeMatcher. + * g_file_get_path: + * @file: input #GFile * - * Gets the next matched attribute from a #GFileAttributeMatcher. + * Gets the local pathname for #GFile, if one exists. If non-%NULL, this is + * guaranteed to be an absolute, canonical path. It might contain symlinks. * - * Returns: a string containing the next attribute or %NULL if - * no more attribute exist. + * This call does no blocking I/O. + * + * Returns: (type filename) (nullable): string containing the #GFile's path, + * or %NULL if no such path exists. The returned string should be freed + * with g_free() when no longer needed. */ /** - * g_file_attribute_matcher_matches: - * @matcher: a #GFileAttributeMatcher. - * @attribute: a file attribute key. + * g_file_get_relative_path: + * @parent: input #GFile + * @descendant: input #GFile * - * Checks if an attribute will be matched by an attribute matcher. If - * the matcher was created with the "*" matching string, this function - * will always return %TRUE. + * Gets the path for @descendant relative to @parent. * - * Returns: %TRUE if @attribute matches @matcher. %FALSE otherwise. + * This call does no blocking I/O. + * + * Returns: (type filename) (nullable): string with the relative path from + * @descendant to @parent, or %NULL if @descendant doesn't have @parent as + * prefix. The returned string should be freed with g_free() when + * no longer needed. */ /** - * g_file_attribute_matcher_matches_only: - * @matcher: a #GFileAttributeMatcher. - * @attribute: a file attribute key. + * g_file_get_uri: + * @file: input #GFile * - * Checks if a attribute matcher only matches a given attribute. Always - * returns %FALSE if "*" was used when creating the matcher. + * Gets the URI for the @file. * - * Returns: %TRUE if the matcher only matches @attribute. %FALSE otherwise. + * This call does no blocking I/O. + * + * Returns: a string containing the #GFile's URI. + * The returned string should be freed with g_free() + * when no longer needed. */ /** - * g_file_attribute_matcher_new: - * @attributes: an attribute string to match. + * g_file_get_uri_scheme: + * @file: input #GFile * - * Creates a new file attribute matcher, which matches attributes - * against a given string. #GFileAttributeMatchers are reference - * counted structures, and are created with a reference count of 1. If - * the number of references falls to 0, the #GFileAttributeMatcher is - * automatically destroyed. + * Gets the URI scheme for a #GFile. + * RFC 3986 decodes the scheme as: + * |[ + * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] + * ]| + * Common schemes include "file", "http", "ftp", etc. * - * The @attribute string should be formatted with specific keys separated - * from namespaces with a double colon. Several "namespace::key" strings may be - * concatenated with a single comma (e.g. "standard::type,standard::is-hidden"). - * The wildcard "*" may be used to match all keys and namespaces, or - * "namespace::*" will match all keys in a given namespace. + * This call does no blocking I/O. * - * ## Examples of file attribute matcher strings and results + * Returns: a string containing the URI scheme for the given + * #GFile. The returned string should be freed with g_free() + * when no longer needed. + */ + + +/** + * g_file_has_parent: + * @file: input #GFile + * @parent: (nullable): the parent to check for, or %NULL * - * - `"*"`: matches all attributes. - * - `"standard::is-hidden"`: matches only the key is-hidden in the - * standard namespace. - * - `"standard::type,unix::*"`: matches the type key in the standard - * namespace and all keys in the unix namespace. + * Checks if @file has a parent, and optionally, if it is @parent. * - * Returns: a #GFileAttributeMatcher + * If @parent is %NULL then this function returns %TRUE if @file has any + * parent at all. If @parent is non-%NULL then %TRUE is only returned + * if @file is an immediate child of @parent. + * + * Returns: %TRUE if @file is an immediate child of @parent (or any parent in + * the case that @parent is %NULL). + * Since: 2.24 */ /** - * g_file_attribute_matcher_ref: - * @matcher: a #GFileAttributeMatcher. + * g_file_has_prefix: (virtual prefix_matches) + * @file: input #GFile + * @prefix: input #GFile * - * References a file attribute matcher. + * Checks whether @file has the prefix specified by @prefix. * - * Returns: a #GFileAttributeMatcher. + * In other words, if the names of initial elements of @file's + * pathname match @prefix. Only full pathname elements are matched, + * so a path like /foo is not considered a prefix of /foobar, only + * of /foo/bar. + * + * A #GFile is not a prefix of itself. If you want to check for + * equality, use g_file_equal(). + * + * This call does no I/O, as it works purely on names. As such it can + * sometimes return %FALSE even if @file is inside a @prefix (from a + * filesystem point of view), because the prefix of @file is an alias + * of @prefix. + * + * Returns: %TRUE if the @file's parent, grandparent, etc is @prefix, + * %FALSE otherwise. */ /** - * g_file_attribute_matcher_subtract: - * @matcher: Matcher to subtract from - * @subtract: The matcher to subtract + * g_file_has_uri_scheme: + * @file: input #GFile + * @uri_scheme: a string containing a URI scheme * - * Subtracts all attributes of @subtract from @matcher and returns - * a matcher that supports those attributes. + * Checks to see if a #GFile has a given URI scheme. * - * Note that currently it is not possible to remove a single - * attribute when the @matcher matches the whole namespace - or remove - * a namespace or attribute when the matcher matches everything. This - * is a limitation of the current implementation, but may be fixed - * in the future. + * This call does no blocking I/O. * - * Returns: A file attribute matcher matching all attributes of - * @matcher that are not matched by @subtract + * Returns: %TRUE if #GFile's backend supports the + * given URI scheme, %FALSE if URI scheme is %NULL, + * not supported, or #GFile is invalid. */ /** - * g_file_attribute_matcher_to_string: - * @matcher: (nullable): a #GFileAttributeMatcher. + * g_file_hash: (virtual hash) + * @file: (type GFile): #gconstpointer to a #GFile * - * Prints what the matcher is matching against. The format will be - * equal to the format passed to g_file_attribute_matcher_new(). - * The output however, might not be identical, as the matcher may - * decide to use a different order or omit needless parts. + * Creates a hash value for a #GFile. * - * Returns: a string describing the attributes the matcher matches - * against or %NULL if @matcher was %NULL. - * Since: 2.32 + * This call does no blocking I/O. + * + * Returns: 0 if @file is not a valid #GFile, otherwise an + * integer that can be used as hash value for the #GFile. + * This function is intended for easily hashing a #GFile to + * add to a #GHashTable or similar data structure. */ /** - * g_file_attribute_matcher_unref: - * @matcher: a #GFileAttributeMatcher. + * g_file_icon_get_file: + * @icon: a #GIcon. * - * Unreferences @matcher. If the reference count falls below 1, - * the @matcher is automatically freed. + * Gets the #GFile associated with the given @icon. + * + * Returns: (transfer none): a #GFile, or %NULL. */ /** - * g_file_attribute_value_dup: - * @other: a #GFileAttributeValue to duplicate. + * g_file_icon_new: + * @file: a #GFile. * - * Duplicates a file attribute. + * Creates a new icon for a file. * - * Returns: a duplicate of the @other. + * Returns: (transfer full) (type GFileIcon): a #GIcon for the given + * @file, or %NULL on error. */ /** - * g_file_attribute_value_set: - * @attr: a #GFileAttributeValue to set the value in. - * @new_value: a #GFileAttributeValue to get the value from. + * g_file_info_clear_status: + * @info: a #GFileInfo. * - * Sets an attribute's value from another attribute. + * Clears the status information from @info. */ /** - * g_file_copy: - * @source: input #GFile - * @destination: destination #GFile - * @flags: set of #GFileCopyFlags - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @progress_callback: (nullable) (scope call): function to callback with - * progress information, or %NULL if progress information is not needed - * @progress_callback_data: (closure): user data to pass to @progress_callback - * @error: #GError to set on error, or %NULL - * - * Copies the file @source to the location specified by @destination. - * Can not handle recursive copies of directories. - * - * If the flag #G_FILE_COPY_OVERWRITE is specified an already - * existing @destination file is overwritten. - * - * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks - * will be copied as symlinks, otherwise the target of the - * @source symlink will be copied. - * - * If the flag #G_FILE_COPY_ALL_METADATA is specified then all the metadata - * that is possible to copy is copied, not just the default subset (which, - * for instance, does not include the owner, see #GFileInfo). - * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. - * - * If @progress_callback is not %NULL, then the operation can be monitored - * by setting this to a #GFileProgressCallback function. - * @progress_callback_data will be passed to this function. It is guaranteed - * that this callback will be called after all data has been transferred with - * the total number of bytes copied during the operation. - * - * If the @source file does not exist, then the %G_IO_ERROR_NOT_FOUND error - * is returned, independent on the status of the @destination. - * - * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then - * the error %G_IO_ERROR_EXISTS is returned. - * - * If trying to overwrite a file over a directory, the %G_IO_ERROR_IS_DIRECTORY - * error is returned. If trying to overwrite a directory with a directory the - * %G_IO_ERROR_WOULD_MERGE error is returned. + * g_file_info_copy_into: + * @src_info: source to copy attributes from. + * @dest_info: destination to copy attributes to. * - * If the source is a directory and the target does not exist, or - * #G_FILE_COPY_OVERWRITE is specified and the target is a file, then the - * %G_IO_ERROR_WOULD_RECURSE error is returned. + * First clears all of the [GFileAttribute][gio-GFileAttribute] of @dest_info, + * and then copies all of the file attributes from @src_info to @dest_info. + */ + + +/** + * g_file_info_dup: + * @other: a #GFileInfo. * - * If you are interested in copying the #GFile object itself (not the on-disk - * file), see g_file_dup(). + * Duplicates a file info structure. * - * Returns: %TRUE on success, %FALSE otherwise. + * Returns: (transfer full): a duplicate #GFileInfo of @other. */ /** - * g_file_copy_async: - * @source: input #GFile - * @destination: destination #GFile - * @flags: set of #GFileCopyFlags - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @progress_callback: (nullable) (scope notified): function to callback with progress - * information, or %NULL if progress information is not needed - * @progress_callback_data: (closure progress_callback) (nullable): user data to pass to @progress_callback - * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied - * @user_data: (closure callback): the data to pass to callback function - * - * Copies the file @source to the location specified by @destination - * asynchronously. For details of the behaviour, see g_file_copy(). + * g_file_info_get_attribute_as_string: + * @info: a #GFileInfo. + * @attribute: a file attribute key. * - * If @progress_callback is not %NULL, then that function that will be called - * just like in g_file_copy(). The callback will run in the default main context - * of the thread calling g_file_copy_async() — the same context as @callback is - * run in. + * Gets the value of a attribute, formated as a string. + * This escapes things as needed to make the string valid + * UTF-8. * - * When the operation is finished, @callback will be called. You can then call - * g_file_copy_finish() to get the result of the operation. + * Returns: (nullable): a UTF-8 string associated with the given @attribute, or + * %NULL if the attribute wasn’t set. + * When you're done with the string it must be freed with g_free(). */ /** - * g_file_copy_attributes: - * @source: a #GFile with attributes - * @destination: a #GFile to copy attributes to - * @flags: a set of #GFileCopyFlags - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @error: a #GError, %NULL to ignore - * - * Copies the file attributes from @source to @destination. + * g_file_info_get_attribute_boolean: + * @info: a #GFileInfo. + * @attribute: a file attribute key. * - * Normally only a subset of the file attributes are copied, - * those that are copies in a normal file copy operation - * (which for instance does not include e.g. owner). However - * if #G_FILE_COPY_ALL_METADATA is specified in @flags, then - * all the metadata that is possible to copy is copied. This - * is useful when implementing move by copy + delete source. + * Gets the value of a boolean attribute. If the attribute does not + * contain a boolean value, %FALSE will be returned. * - * Returns: %TRUE if the attributes were copied successfully, - * %FALSE otherwise. + * Returns: the boolean value contained within the attribute. */ /** - * g_file_copy_finish: - * @file: input #GFile - * @res: a #GAsyncResult - * @error: a #GError, or %NULL + * g_file_info_get_attribute_byte_string: + * @info: a #GFileInfo. + * @attribute: a file attribute key. * - * Finishes copying the file started with g_file_copy_async(). + * Gets the value of a byte string attribute. If the attribute does + * not contain a byte string, %NULL will be returned. * - * Returns: a %TRUE on success, %FALSE on error. + * Returns: the contents of the @attribute value as a byte string, or + * %NULL otherwise. */ /** - * g_file_create: - * @file: input #GFile - * @flags: a set of #GFileCreateFlags - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @error: a #GError, or %NULL - * - * Creates a new file and returns an output stream for writing to it. - * The file must not already exist. + * g_file_info_get_attribute_data: + * @info: a #GFileInfo + * @attribute: a file attribute key + * @type: (out) (optional): return location for the attribute type, or %NULL + * @value_pp: (out) (optional) (not nullable): return location for the + * attribute value, or %NULL; the attribute value will not be %NULL + * @status: (out) (optional): return location for the attribute status, or %NULL * - * By default files created are generally readable by everyone, - * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file - * will be made readable only to the current user, to the level - * that is supported on the target filesystem. + * Gets the attribute type, value and status for an attribute key. * - * If @cancellable is not %NULL, then the operation can be cancelled - * by triggering the cancellable object from another thread. If the - * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be - * returned. + * Returns: (transfer none): %TRUE if @info has an attribute named @attribute, + * %FALSE otherwise. + */ + + +/** + * g_file_info_get_attribute_int32: + * @info: a #GFileInfo. + * @attribute: a file attribute key. * - * If a file or directory with this name already exists the - * %G_IO_ERROR_EXISTS error will be returned. Some file systems don't - * allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME - * error, and if the name is to long %G_IO_ERROR_FILENAME_TOO_LONG will - * be returned. Other errors are possible too, and depend on what kind - * of filesystem the file is on. + * Gets a signed 32-bit integer contained within the attribute. If the + * attribute does not contain a signed 32-bit integer, or is invalid, + * 0 will be returned. * - * Returns: (transfer full): a #GFileOutputStream for the newly created - * file, or %NULL on error. - * Free the returned object with g_object_unref(). + * Returns: a signed 32-bit integer from the attribute. */ /** - * g_file_create_async: - * @file: input #GFile - * @flags: a set of #GFileCreateFlags - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @callback: (scope async): a #GAsyncReadyCallback to call - * when the request is satisfied - * @user_data: (closure): the data to pass to callback function - * - * Asynchronously creates a new file and returns an output stream - * for writing to it. The file must not already exist. + * g_file_info_get_attribute_int64: + * @info: a #GFileInfo. + * @attribute: a file attribute key. * - * For more details, see g_file_create() which is - * the synchronous version of this call. + * Gets a signed 64-bit integer contained within the attribute. If the + * attribute does not contain a signed 64-bit integer, or is invalid, + * 0 will be returned. * - * When the operation is finished, @callback will be called. - * You can then call g_file_create_finish() to get the result - * of the operation. + * Returns: a signed 64-bit integer from the attribute. */ /** - * g_file_create_finish: - * @file: input #GFile - * @res: a #GAsyncResult - * @error: a #GError, or %NULL + * g_file_info_get_attribute_object: + * @info: a #GFileInfo. + * @attribute: a file attribute key. * - * Finishes an asynchronous file create operation started with - * g_file_create_async(). + * Gets the value of a #GObject attribute. If the attribute does + * not contain a #GObject, %NULL will be returned. * - * Returns: (transfer full): a #GFileOutputStream or %NULL on error. - * Free the returned object with g_object_unref(). + * Returns: (transfer none): a #GObject associated with the given @attribute, or + * %NULL otherwise. */ /** - * g_file_create_readwrite: - * @file: a #GFile - * @flags: a set of #GFileCreateFlags - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @error: return location for a #GError, or %NULL + * g_file_info_get_attribute_status: + * @info: a #GFileInfo + * @attribute: a file attribute key * - * Creates a new file and returns a stream for reading and - * writing to it. The file must not already exist. + * Gets the attribute status for an attribute key. * - * By default files created are generally readable by everyone, - * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file - * will be made readable only to the current user, to the level - * that is supported on the target filesystem. + * Returns: a #GFileAttributeStatus for the given @attribute, or + * %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid. + */ + + +/** + * g_file_info_get_attribute_string: + * @info: a #GFileInfo. + * @attribute: a file attribute key. * - * If @cancellable is not %NULL, then the operation can be cancelled - * by triggering the cancellable object from another thread. If the - * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be - * returned. + * Gets the value of a string attribute. If the attribute does + * not contain a string, %NULL will be returned. * - * If a file or directory with this name already exists, the - * %G_IO_ERROR_EXISTS error will be returned. Some file systems don't - * allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME - * error, and if the name is too long, %G_IO_ERROR_FILENAME_TOO_LONG - * will be returned. Other errors are possible too, and depend on what - * kind of filesystem the file is on. + * Returns: the contents of the @attribute value as a UTF-8 string, or + * %NULL otherwise. + */ + + +/** + * g_file_info_get_attribute_stringv: + * @info: a #GFileInfo. + * @attribute: a file attribute key. * - * Note that in many non-local file cases read and write streams are - * not supported, so make sure you really need to do read and write - * streaming, rather than just opening for reading or writing. + * Gets the value of a stringv attribute. If the attribute does + * not contain a stringv, %NULL will be returned. * - * Returns: (transfer full): a #GFileIOStream for the newly created - * file, or %NULL on error. - * Free the returned object with g_object_unref(). + * Returns: (transfer none): the contents of the @attribute value as a stringv, or + * %NULL otherwise. Do not free. These returned strings are UTF-8. * Since: 2.22 */ /** - * g_file_create_readwrite_async: - * @file: input #GFile - * @flags: a set of #GFileCreateFlags - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @callback: (scope async): a #GAsyncReadyCallback to call - * when the request is satisfied - * @user_data: (closure): the data to pass to callback function - * - * Asynchronously creates a new file and returns a stream - * for reading and writing to it. The file must not already exist. - * - * For more details, see g_file_create_readwrite() which is - * the synchronous version of this call. + * g_file_info_get_attribute_type: + * @info: a #GFileInfo. + * @attribute: a file attribute key. * - * When the operation is finished, @callback will be called. - * You can then call g_file_create_readwrite_finish() to get - * the result of the operation. + * Gets the attribute type for an attribute key. * - * Since: 2.22 + * Returns: a #GFileAttributeType for the given @attribute, or + * %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set. */ /** - * g_file_create_readwrite_finish: - * @file: input #GFile - * @res: a #GAsyncResult - * @error: a #GError, or %NULL + * g_file_info_get_attribute_uint32: + * @info: a #GFileInfo. + * @attribute: a file attribute key. * - * Finishes an asynchronous file create operation started with - * g_file_create_readwrite_async(). + * Gets an unsigned 32-bit integer contained within the attribute. If the + * attribute does not contain an unsigned 32-bit integer, or is invalid, + * 0 will be returned. * - * Returns: (transfer full): a #GFileIOStream or %NULL on error. - * Free the returned object with g_object_unref(). - * Since: 2.22 + * Returns: an unsigned 32-bit integer from the attribute. */ /** - * g_file_delete: (virtual delete_file) - * @file: input #GFile - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @error: a #GError, or %NULL - * - * Deletes a file. If the @file is a directory, it will only be - * deleted if it is empty. This has the same semantics as g_unlink(). + * g_file_info_get_attribute_uint64: + * @info: a #GFileInfo. + * @attribute: a file attribute key. * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * Gets a unsigned 64-bit integer contained within the attribute. If the + * attribute does not contain an unsigned 64-bit integer, or is invalid, + * 0 will be returned. * - * Returns: %TRUE if the file was deleted. %FALSE otherwise. + * Returns: a unsigned 64-bit integer from the attribute. */ /** - * g_file_delete_async: (virtual delete_file_async) - * @file: input #GFile - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @callback: a #GAsyncReadyCallback to call - * when the request is satisfied - * @user_data: the data to pass to callback function + * g_file_info_get_content_type: + * @info: a #GFileInfo. * - * Asynchronously delete a file. If the @file is a directory, it will - * only be deleted if it is empty. This has the same semantics as - * g_unlink(). + * Gets the file's content type. * - * Since: 2.34 + * Returns: a string containing the file's content type. */ /** - * g_file_delete_finish: (virtual delete_file_finish) - * @file: input #GFile - * @result: a #GAsyncResult - * @error: a #GError, or %NULL + * g_file_info_get_deletion_date: + * @info: a #GFileInfo. * - * Finishes deleting a file started with g_file_delete_async(). + * Returns the #GDateTime representing the deletion date of the file, as + * available in G_FILE_ATTRIBUTE_TRASH_DELETION_DATE. If the + * G_FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, %NULL is returned. * - * Returns: %TRUE if the file was deleted. %FALSE otherwise. - * Since: 2.34 + * Returns: a #GDateTime, or %NULL. + * Since: 2.36 */ /** - * g_file_descriptor_based_get_fd: - * @fd_based: a #GFileDescriptorBased. + * g_file_info_get_display_name: + * @info: a #GFileInfo. * - * Gets the underlying file descriptor. + * Gets a display name for a file. * - * Returns: The file descriptor - * Since: 2.24 + * Returns: a string containing the display name. */ /** - * g_file_dup: - * @file: input #GFile - * - * Duplicates a #GFile handle. This operation does not duplicate - * the actual file or directory represented by the #GFile; see - * g_file_copy() if attempting to copy a file. + * g_file_info_get_edit_name: + * @info: a #GFileInfo. * - * This call does no blocking I/O. + * Gets the edit name for a file. * - * Returns: (transfer full): a new #GFile that is a duplicate - * of the given #GFile. + * Returns: a string containing the edit name. */ /** - * g_file_eject_mountable: - * @file: input #GFile - * @flags: flags affecting the operation - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @callback: (scope async) (nullable): a #GAsyncReadyCallback to call - * when the request is satisfied, or %NULL - * @user_data: (closure): the data to pass to callback function - * - * Starts an asynchronous eject on a mountable. - * When this operation has completed, @callback will be called with - * @user_user data, and the operation can be finalized with - * g_file_eject_mountable_finish(). + * g_file_info_get_etag: + * @info: a #GFileInfo. * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * Gets the [entity tag][gfile-etag] for a given + * #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE. * - * Deprecated: 2.22: Use g_file_eject_mountable_with_operation() instead. + * Returns: a string containing the value of the "etag:value" attribute. */ /** - * g_file_eject_mountable_finish: - * @file: input #GFile - * @result: a #GAsyncResult - * @error: a #GError, or %NULL + * g_file_info_get_file_type: + * @info: a #GFileInfo. * - * Finishes an asynchronous eject operation started by - * g_file_eject_mountable(). + * Gets a file's type (whether it is a regular file, symlink, etc). + * This is different from the file's content type, see g_file_info_get_content_type(). * - * Returns: %TRUE if the @file was ejected successfully. - * %FALSE otherwise. - * Deprecated: 2.22: Use g_file_eject_mountable_with_operation_finish() - * instead. + * Returns: a #GFileType for the given file. */ /** - * g_file_eject_mountable_with_operation: - * @file: input #GFile - * @flags: flags affecting the operation - * @mount_operation: (nullable): a #GMountOperation, - * or %NULL to avoid user interaction - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @callback: (scope async) (nullable): a #GAsyncReadyCallback to call - * when the request is satisfied, or %NULL - * @user_data: (closure): the data to pass to callback function - * - * Starts an asynchronous eject on a mountable. - * When this operation has completed, @callback will be called with - * @user_user data, and the operation can be finalized with - * g_file_eject_mountable_with_operation_finish(). + * g_file_info_get_icon: + * @info: a #GFileInfo. * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * Gets the icon for a file. * - * Since: 2.22 + * Returns: (transfer none): #GIcon for the given @info. */ /** - * g_file_eject_mountable_with_operation_finish: - * @file: input #GFile - * @result: a #GAsyncResult - * @error: a #GError, or %NULL + * g_file_info_get_is_backup: + * @info: a #GFileInfo. * - * Finishes an asynchronous eject operation started by - * g_file_eject_mountable_with_operation(). + * Checks if a file is a backup file. * - * Returns: %TRUE if the @file was ejected successfully. - * %FALSE otherwise. - * Since: 2.22 + * Returns: %TRUE if file is a backup file, %FALSE otherwise. */ /** - * g_file_enumerate_children: - * @file: input #GFile - * @attributes: an attribute query string - * @flags: a set of #GFileQueryInfoFlags - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @error: #GError for error reporting - * - * Gets the requested information about the files in a directory. - * The result is a #GFileEnumerator object that will give out - * #GFileInfo objects for all the files in the directory. + * g_file_info_get_is_hidden: + * @info: a #GFileInfo. * - * The @attributes value is a string that specifies the file - * attributes that should be gathered. It is not an error if - * it's not possible to read a particular requested attribute - * from a file - it just won't be set. @attributes should - * be a comma-separated list of attributes or attribute wildcards. - * The wildcard "*" means all attributes, and a wildcard like - * "standard::*" means all attributes in the standard namespace. - * An example attribute query be "standard::*,owner::user". - * The standard attributes are available as defines, like - * #G_FILE_ATTRIBUTE_STANDARD_NAME. + * Checks if a file is hidden. * - * If @cancellable is not %NULL, then the operation can be cancelled - * by triggering the cancellable object from another thread. If the - * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be - * returned. + * Returns: %TRUE if the file is a hidden file, %FALSE otherwise. + */ + + +/** + * g_file_info_get_is_symlink: + * @info: a #GFileInfo. * - * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will - * be returned. If the file is not a directory, the %G_IO_ERROR_NOT_DIRECTORY - * error will be returned. Other errors are possible too. + * Checks if a file is a symlink. * - * Returns: (transfer full): A #GFileEnumerator if successful, - * %NULL on error. Free the returned object with g_object_unref(). + * Returns: %TRUE if the given @info is a symlink. */ /** - * g_file_enumerate_children_async: - * @file: input #GFile - * @attributes: an attribute query string - * @flags: a set of #GFileQueryInfoFlags - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @callback: (scope async): a #GAsyncReadyCallback to call when the - * request is satisfied - * @user_data: (closure): the data to pass to callback function + * g_file_info_get_modification_date_time: + * @info: a #GFileInfo. * - * Asynchronously gets the requested information about the files - * in a directory. The result is a #GFileEnumerator object that will - * give out #GFileInfo objects for all the files in the directory. + * Gets the modification time of the current @info and returns it as a + * #GDateTime. * - * For more details, see g_file_enumerate_children() which is - * the synchronous version of this call. + * This requires the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute. If + * %G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC is provided, the resulting #GDateTime + * will have microsecond precision. * - * When the operation is finished, @callback will be called. You can - * then call g_file_enumerate_children_finish() to get the result of - * the operation. + * Returns: (transfer full) (nullable): modification time, or %NULL if unknown + * Since: 2.62 */ /** - * g_file_enumerate_children_finish: - * @file: input #GFile - * @res: a #GAsyncResult - * @error: a #GError + * g_file_info_get_modification_time: + * @info: a #GFileInfo. + * @result: (out caller-allocates): a #GTimeVal. * - * Finishes an async enumerate children operation. - * See g_file_enumerate_children_async(). + * Gets the modification time of the current @info and sets it + * in @result. * - * Returns: (transfer full): a #GFileEnumerator or %NULL - * if an error occurred. - * Free the returned object with g_object_unref(). + * Deprecated: 2.62: Use g_file_info_get_modification_date_time() instead, as + * #GTimeVal is deprecated due to the year 2038 problem. */ /** - * g_file_enumerator_close: - * @enumerator: a #GFileEnumerator. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: location to store the error occurring, or %NULL to ignore - * - * Releases all resources used by this enumerator, making the - * enumerator return %G_IO_ERROR_CLOSED on all calls. + * g_file_info_get_name: + * @info: a #GFileInfo. * - * This will be automatically called when the last reference - * is dropped, but you might want to call this function to make - * sure resources are released as early as possible. + * Gets the name for a file. * - * Returns: #TRUE on success or #FALSE on error. + * Returns: (type filename): a string containing the file name. */ /** - * g_file_enumerator_close_async: - * @enumerator: a #GFileEnumerator. - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied - * @user_data: (closure): the data to pass to callback function + * g_file_info_get_size: + * @info: a #GFileInfo. * - * Asynchronously closes the file enumerator. + * Gets the file's size. * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in - * g_file_enumerator_close_finish(). + * Returns: a #goffset containing the file's size. */ /** - * g_file_enumerator_close_finish: - * @enumerator: a #GFileEnumerator. - * @result: a #GAsyncResult. - * @error: a #GError location to store the error occurring, or %NULL to - * ignore. - * - * Finishes closing a file enumerator, started from g_file_enumerator_close_async(). + * g_file_info_get_sort_order: + * @info: a #GFileInfo. * - * If the file enumerator was already closed when g_file_enumerator_close_async() - * was called, then this function will report %G_IO_ERROR_CLOSED in @error, and - * return %FALSE. If the file enumerator had pending operation when the close - * operation was started, then this function will report %G_IO_ERROR_PENDING, and - * return %FALSE. If @cancellable was not %NULL, then the operation may have been - * cancelled by triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be - * returned. + * Gets the value of the sort_order attribute from the #GFileInfo. + * See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER. * - * Returns: %TRUE if the close operation has finished successfully. + * Returns: a #gint32 containing the value of the "standard::sort_order" attribute. */ /** - * g_file_enumerator_get_child: - * @enumerator: a #GFileEnumerator - * @info: a #GFileInfo gotten from g_file_enumerator_next_file() - * or the async equivalents. - * - * Return a new #GFile which refers to the file named by @info in the source - * directory of @enumerator. This function is primarily intended to be used - * inside loops with g_file_enumerator_next_file(). + * g_file_info_get_symbolic_icon: + * @info: a #GFileInfo. * - * This is a convenience method that's equivalent to: - * |[ - * gchar *name = g_file_info_get_name (info); - * GFile *child = g_file_get_child (g_file_enumerator_get_container (enumr), - * name); - * ]| + * Gets the symbolic icon for a file. * - * Returns: (transfer full): a #GFile for the #GFileInfo passed it. - * Since: 2.36 + * Returns: (transfer none): #GIcon for the given @info. + * Since: 2.34 */ /** - * g_file_enumerator_get_container: - * @enumerator: a #GFileEnumerator + * g_file_info_get_symlink_target: + * @info: a #GFileInfo. * - * Get the #GFile container which is being enumerated. + * Gets the symlink target for a given #GFileInfo. * - * Returns: (transfer none): the #GFile which is being enumerated. - * Since: 2.18 + * Returns: a string containing the symlink target. */ /** - * g_file_enumerator_has_pending: - * @enumerator: a #GFileEnumerator. + * g_file_info_has_attribute: + * @info: a #GFileInfo. + * @attribute: a file attribute key. * - * Checks if the file enumerator has pending operations. + * Checks if a file info structure has an attribute named @attribute. * - * Returns: %TRUE if the @enumerator has pending operations. + * Returns: %TRUE if @info has an attribute named @attribute, + * %FALSE otherwise. */ /** - * g_file_enumerator_is_closed: - * @enumerator: a #GFileEnumerator. + * g_file_info_has_namespace: + * @info: a #GFileInfo. + * @name_space: a file attribute namespace. * - * Checks if the file enumerator has been closed. + * Checks if a file info structure has an attribute in the + * specified @name_space. * - * Returns: %TRUE if the @enumerator is closed. + * Returns: %TRUE if @info has an attribute in @name_space, + * %FALSE otherwise. + * Since: 2.22 */ /** - * g_file_enumerator_iterate: - * @direnum: an open #GFileEnumerator - * @out_info: (out) (transfer none) (optional): Output location for the next #GFileInfo, or %NULL - * @out_child: (out) (transfer none) (optional): Output location for the next #GFile, or %NULL - * @cancellable: a #GCancellable - * @error: a #GError - * - * This is a version of g_file_enumerator_next_file() that's easier to - * use correctly from C programs. With g_file_enumerator_next_file(), - * the gboolean return value signifies "end of iteration or error", which - * requires allocation of a temporary #GError. - * - * In contrast, with this function, a %FALSE return from - * g_file_enumerator_iterate() *always* means - * "error". End of iteration is signaled by @out_info or @out_child being %NULL. - * - * Another crucial difference is that the references for @out_info and - * @out_child are owned by @direnum (they are cached as hidden - * properties). You must not unref them in your own code. This makes - * memory management significantly easier for C code in combination - * with loops. - * - * Finally, this function optionally allows retrieving a #GFile as - * well. - * - * You must specify at least one of @out_info or @out_child. - * - * The code pattern for correctly using g_file_enumerator_iterate() from C - * is: - * - * |[ - * direnum = g_file_enumerate_children (file, ...); - * while (TRUE) - * { - * GFileInfo *info; - * if (!g_file_enumerator_iterate (direnum, &info, NULL, cancellable, error)) - * goto out; - * if (!info) - * break; - * ... do stuff with "info"; do not unref it! ... - * } + * g_file_info_list_attributes: + * @info: a #GFileInfo. + * @name_space: (nullable): a file attribute key's namespace, or %NULL to list + * all attributes. * - * out: - * g_object_unref (direnum); // Note: frees the last @info - * ]| + * Lists the file info structure's attributes. * - * Since: 2.44 + * Returns: (nullable) (array zero-terminated=1) (transfer full): a + * null-terminated array of strings of all of the possible attribute + * types for the given @name_space, or %NULL on error. */ /** - * g_file_enumerator_next_file: - * @enumerator: a #GFileEnumerator. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: location to store the error occurring, or %NULL to ignore - * - * Returns information for the next file in the enumerated object. - * Will block until the information is available. The #GFileInfo - * returned from this function will contain attributes that match the - * attribute string that was passed when the #GFileEnumerator was created. - * - * See the documentation of #GFileEnumerator for information about the - * order of returned files. + * g_file_info_new: * - * On error, returns %NULL and sets @error to the error. If the - * enumerator is at the end, %NULL will be returned and @error will - * be unset. + * Creates a new file info structure. * - * Returns: (nullable) (transfer full): A #GFileInfo or %NULL on error - * or end of enumerator. Free the returned object with - * g_object_unref() when no longer needed. + * Returns: a #GFileInfo. */ /** - * g_file_enumerator_next_files_async: - * @enumerator: a #GFileEnumerator. - * @num_files: the number of file info objects to request - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied - * @user_data: (closure): the data to pass to callback function - * - * Request information for a number of files from the enumerator asynchronously. - * When all i/o for the operation is finished the @callback will be called with - * the requested information. - * - * See the documentation of #GFileEnumerator for information about the - * order of returned files. - * - * The callback can be called with less than @num_files files in case of error - * or at the end of the enumerator. In case of a partial error the callback will - * be called with any succeeding items and no error, and on the next request the - * error will be reported. If a request is cancelled the callback will be called - * with %G_IO_ERROR_CANCELLED. - * - * During an async request no other sync and async calls are allowed, and will - * result in %G_IO_ERROR_PENDING errors. + * g_file_info_remove_attribute: + * @info: a #GFileInfo. + * @attribute: a file attribute key. * - * Any outstanding i/o request with higher priority (lower numerical value) will - * be executed before an outstanding request with lower priority. Default - * priority is %G_PRIORITY_DEFAULT. + * Removes all cases of @attribute from @info if it exists. */ /** - * g_file_enumerator_next_files_finish: - * @enumerator: a #GFileEnumerator. - * @result: a #GAsyncResult. - * @error: a #GError location to store the error occurring, or %NULL to - * ignore. - * - * Finishes the asynchronous operation started with g_file_enumerator_next_files_async(). + * g_file_info_set_attribute: + * @info: a #GFileInfo. + * @attribute: a file attribute key. + * @type: a #GFileAttributeType + * @value_p: (not nullable): pointer to the value * - * Returns: (transfer full) (element-type Gio.FileInfo): a #GList of #GFileInfos. You must free the list with - * g_list_free() and unref the infos with g_object_unref() when you're - * done with them. + * Sets the @attribute to contain the given value, if possible. To unset the + * attribute, use %G_FILE_ATTRIBUTE_TYPE_INVALID for @type. */ /** - * g_file_enumerator_set_pending: - * @enumerator: a #GFileEnumerator. - * @pending: a boolean value. + * g_file_info_set_attribute_boolean: + * @info: a #GFileInfo. + * @attribute: a file attribute key. + * @attr_value: a boolean value. * - * Sets the file enumerator as having pending operations. + * Sets the @attribute to contain the given @attr_value, + * if possible. */ /** - * g_file_equal: - * @file1: the first #GFile - * @file2: the second #GFile - * - * Checks if the two given #GFiles refer to the same file. - * - * Note that two #GFiles that differ can still refer to the same - * file on the filesystem due to various forms of filename - * aliasing. - * - * This call does no blocking I/O. + * g_file_info_set_attribute_byte_string: + * @info: a #GFileInfo. + * @attribute: a file attribute key. + * @attr_value: a byte string. * - * Returns: %TRUE if @file1 and @file2 are equal. + * Sets the @attribute to contain the given @attr_value, + * if possible. */ /** - * g_file_find_enclosing_mount: - * @file: input #GFile - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @error: a #GError - * - * Gets a #GMount for the #GFile. - * - * If the #GFileIface for @file does not have a mount (e.g. - * possibly a remote share), @error will be set to %G_IO_ERROR_NOT_FOUND - * and %NULL will be returned. - * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * g_file_info_set_attribute_int32: + * @info: a #GFileInfo. + * @attribute: a file attribute key. + * @attr_value: a signed 32-bit integer * - * Returns: (transfer full): a #GMount where the @file is located - * or %NULL on error. - * Free the returned object with g_object_unref(). + * Sets the @attribute to contain the given @attr_value, + * if possible. */ /** - * g_file_find_enclosing_mount_async: - * @file: a #GFile - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @callback: (scope async): a #GAsyncReadyCallback to call - * when the request is satisfied - * @user_data: (closure): the data to pass to callback function - * - * Asynchronously gets the mount for the file. - * - * For more details, see g_file_find_enclosing_mount() which is - * the synchronous version of this call. + * g_file_info_set_attribute_int64: + * @info: a #GFileInfo. + * @attribute: attribute name to set. + * @attr_value: int64 value to set attribute to. * - * When the operation is finished, @callback will be called. - * You can then call g_file_find_enclosing_mount_finish() to - * get the result of the operation. + * Sets the @attribute to contain the given @attr_value, + * if possible. */ /** - * g_file_find_enclosing_mount_finish: - * @file: a #GFile - * @res: a #GAsyncResult - * @error: a #GError - * - * Finishes an asynchronous find mount request. - * See g_file_find_enclosing_mount_async(). + * g_file_info_set_attribute_mask: + * @info: a #GFileInfo. + * @mask: a #GFileAttributeMatcher. * - * Returns: (transfer full): #GMount for given @file or %NULL on error. - * Free the returned object with g_object_unref(). + * Sets @mask on @info to match specific attribute types. */ /** - * g_file_get_basename: - * @file: input #GFile - * - * Gets the base name (the last component of the path) for a given #GFile. - * - * If called for the top level of a system (such as the filesystem root - * or a uri like sftp://host/) it will return a single directory separator - * (and on Windows, possibly a drive letter). - * - * The base name is a byte string (not UTF-8). It has no defined encoding - * or rules other than it may not contain zero bytes. If you want to use - * filenames in a user interface you should use the display name that you - * can get by requesting the %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME - * attribute with g_file_query_info(). - * - * This call does no blocking I/O. + * g_file_info_set_attribute_object: + * @info: a #GFileInfo. + * @attribute: a file attribute key. + * @attr_value: a #GObject. * - * Returns: (type filename) (nullable): string containing the #GFile's - * base name, or %NULL if given #GFile is invalid. The returned string - * should be freed with g_free() when no longer needed. + * Sets the @attribute to contain the given @attr_value, + * if possible. */ /** - * g_file_get_child: - * @file: input #GFile - * @name: (type filename): string containing the child's basename - * - * Gets a child of @file with basename equal to @name. + * g_file_info_set_attribute_status: + * @info: a #GFileInfo + * @attribute: a file attribute key + * @status: a #GFileAttributeStatus * - * Note that the file with that specific name might not exist, but - * you can still have a #GFile that points to it. You can use this - * for instance to create that file. + * Sets the attribute status for an attribute key. This is only + * needed by external code that implement g_file_set_attributes_from_info() + * or similar functions. * - * This call does no blocking I/O. + * The attribute must exist in @info for this to work. Otherwise %FALSE + * is returned and @info is unchanged. * - * Returns: (transfer full): a #GFile to a child specified by @name. - * Free the returned object with g_object_unref(). + * Returns: %TRUE if the status was changed, %FALSE if the key was not set. + * Since: 2.22 */ /** - * g_file_get_child_for_display_name: - * @file: input #GFile - * @display_name: string to a possible child - * @error: return location for an error - * - * Gets the child of @file for a given @display_name (i.e. a UTF-8 - * version of the name). If this function fails, it returns %NULL - * and @error will be set. This is very useful when constructing a - * #GFile for a new file and the user entered the filename in the - * user interface, for instance when you select a directory and - * type a filename in the file selector. - * - * This call does no blocking I/O. + * g_file_info_set_attribute_string: + * @info: a #GFileInfo. + * @attribute: a file attribute key. + * @attr_value: a UTF-8 string. * - * Returns: (transfer full): a #GFile to the specified child, or - * %NULL if the display name couldn't be converted. - * Free the returned object with g_object_unref(). + * Sets the @attribute to contain the given @attr_value, + * if possible. */ /** - * g_file_get_parent: - * @file: input #GFile - * - * Gets the parent directory for the @file. - * If the @file represents the root directory of the - * file system, then %NULL will be returned. + * g_file_info_set_attribute_stringv: + * @info: a #GFileInfo. + * @attribute: a file attribute key + * @attr_value: (array zero-terminated=1) (element-type utf8): a %NULL + * terminated array of UTF-8 strings. * - * This call does no blocking I/O. + * Sets the @attribute to contain the given @attr_value, + * if possible. * - * Returns: (nullable) (transfer full): a #GFile structure to the - * parent of the given #GFile or %NULL if there is no parent. Free - * the returned object with g_object_unref(). + * Sinze: 2.22 */ /** - * g_file_get_parse_name: - * @file: input #GFile - * - * Gets the parse name of the @file. - * A parse name is a UTF-8 string that describes the - * file such that one can get the #GFile back using - * g_file_parse_name(). - * - * This is generally used to show the #GFile as a nice - * full-pathname kind of string in a user interface, - * like in a location entry. - * - * For local files with names that can safely be converted - * to UTF-8 the pathname is used, otherwise the IRI is used - * (a form of URI that allows UTF-8 characters unescaped). - * - * This call does no blocking I/O. + * g_file_info_set_attribute_uint32: + * @info: a #GFileInfo. + * @attribute: a file attribute key. + * @attr_value: an unsigned 32-bit integer. * - * Returns: a string containing the #GFile's parse name. - * The returned string should be freed with g_free() - * when no longer needed. + * Sets the @attribute to contain the given @attr_value, + * if possible. */ /** - * g_file_get_path: - * @file: input #GFile - * - * Gets the local pathname for #GFile, if one exists. If non-%NULL, this is - * guaranteed to be an absolute, canonical path. It might contain symlinks. - * - * This call does no blocking I/O. + * g_file_info_set_attribute_uint64: + * @info: a #GFileInfo. + * @attribute: a file attribute key. + * @attr_value: an unsigned 64-bit integer. * - * Returns: (type filename) (nullable): string containing the #GFile's path, - * or %NULL if no such path exists. The returned string should be freed - * with g_free() when no longer needed. + * Sets the @attribute to contain the given @attr_value, + * if possible. */ /** - * g_file_get_relative_path: - * @parent: input #GFile - * @descendant: input #GFile - * - * Gets the path for @descendant relative to @parent. - * - * This call does no blocking I/O. + * g_file_info_set_content_type: + * @info: a #GFileInfo. + * @content_type: a content type. See [GContentType][gio-GContentType] * - * Returns: (type filename) (nullable): string with the relative path from - * @descendant to @parent, or %NULL if @descendant doesn't have @parent as - * prefix. The returned string should be freed with g_free() when - * no longer needed. + * Sets the content type attribute for a given #GFileInfo. + * See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE. */ /** - * g_file_get_uri: - * @file: input #GFile - * - * Gets the URI for the @file. - * - * This call does no blocking I/O. + * g_file_info_set_display_name: + * @info: a #GFileInfo. + * @display_name: a string containing a display name. * - * Returns: a string containing the #GFile's URI. - * The returned string should be freed with g_free() - * when no longer needed. + * Sets the display name for the current #GFileInfo. + * See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME. */ /** - * g_file_get_uri_scheme: - * @file: input #GFile - * - * Gets the URI scheme for a #GFile. - * RFC 3986 decodes the scheme as: - * |[ - * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] - * ]| - * Common schemes include "file", "http", "ftp", etc. - * - * This call does no blocking I/O. + * g_file_info_set_edit_name: + * @info: a #GFileInfo. + * @edit_name: a string containing an edit name. * - * Returns: a string containing the URI scheme for the given - * #GFile. The returned string should be freed with g_free() - * when no longer needed. + * Sets the edit name for the current file. + * See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME. */ /** - * g_file_has_parent: - * @file: input #GFile - * @parent: (nullable): the parent to check for, or %NULL - * - * Checks if @file has a parent, and optionally, if it is @parent. - * - * If @parent is %NULL then this function returns %TRUE if @file has any - * parent at all. If @parent is non-%NULL then %TRUE is only returned - * if @file is an immediate child of @parent. + * g_file_info_set_file_type: + * @info: a #GFileInfo. + * @type: a #GFileType. * - * Returns: %TRUE if @file is an immediate child of @parent (or any parent in - * the case that @parent is %NULL). - * Since: 2.24 + * Sets the file type in a #GFileInfo to @type. + * See %G_FILE_ATTRIBUTE_STANDARD_TYPE. */ /** - * g_file_has_prefix: (virtual prefix_matches) - * @file: input #GFile - * @prefix: input #GFile - * - * Checks whether @file has the prefix specified by @prefix. - * - * In other words, if the names of initial elements of @file's - * pathname match @prefix. Only full pathname elements are matched, - * so a path like /foo is not considered a prefix of /foobar, only - * of /foo/bar. - * - * A #GFile is not a prefix of itself. If you want to check for - * equality, use g_file_equal(). - * - * This call does no I/O, as it works purely on names. As such it can - * sometimes return %FALSE even if @file is inside a @prefix (from a - * filesystem point of view), because the prefix of @file is an alias - * of @prefix. + * g_file_info_set_icon: + * @info: a #GFileInfo. + * @icon: a #GIcon. * - * Returns: %TRUE if the @files's parent, grandparent, etc is @prefix, - * %FALSE otherwise. + * Sets the icon for a given #GFileInfo. + * See %G_FILE_ATTRIBUTE_STANDARD_ICON. */ /** - * g_file_has_uri_scheme: - * @file: input #GFile - * @uri_scheme: a string containing a URI scheme - * - * Checks to see if a #GFile has a given URI scheme. - * - * This call does no blocking I/O. + * g_file_info_set_is_hidden: + * @info: a #GFileInfo. + * @is_hidden: a #gboolean. * - * Returns: %TRUE if #GFile's backend supports the - * given URI scheme, %FALSE if URI scheme is %NULL, - * not supported, or #GFile is invalid. + * Sets the "is_hidden" attribute in a #GFileInfo according to @is_hidden. + * See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN. */ /** - * g_file_hash: (virtual hash) - * @file: (type GFile): #gconstpointer to a #GFile - * - * Creates a hash value for a #GFile. - * - * This call does no blocking I/O. + * g_file_info_set_is_symlink: + * @info: a #GFileInfo. + * @is_symlink: a #gboolean. * - * Returns: 0 if @file is not a valid #GFile, otherwise an - * integer that can be used as hash value for the #GFile. - * This function is intended for easily hashing a #GFile to - * add to a #GHashTable or similar data structure. + * Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink. + * See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK. */ /** - * g_file_icon_get_file: - * @icon: a #GIcon. + * g_file_info_set_modification_date_time: + * @info: a #GFileInfo. + * @mtime: (not nullable): a #GDateTime. * - * Gets the #GFile associated with the given @icon. + * Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED and + * %G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC attributes in the file info to the + * given date/time value. * - * Returns: (transfer none): a #GFile, or %NULL. + * Since: 2.62 */ /** - * g_file_icon_new: - * @file: a #GFile. + * g_file_info_set_modification_time: + * @info: a #GFileInfo. + * @mtime: a #GTimeVal. * - * Creates a new icon for a file. + * Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED and + * %G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC attributes in the file info to the + * given time value. * - * Returns: (transfer full) (type GFileIcon): a #GIcon for the given - * @file, or %NULL on error. + * Deprecated: 2.62: Use g_file_info_set_modification_date_time() instead, as + * #GTimeVal is deprecated due to the year 2038 problem. */ /** - * g_file_info_clear_status: + * g_file_info_set_name: * @info: a #GFileInfo. + * @name: (type filename): a string containing a name. * - * Clears the status information from @info. + * Sets the name attribute for the current #GFileInfo. + * See %G_FILE_ATTRIBUTE_STANDARD_NAME. */ /** - * g_file_info_copy_into: - * @src_info: source to copy attributes from. - * @dest_info: destination to copy attributes to. + * g_file_info_set_size: + * @info: a #GFileInfo. + * @size: a #goffset containing the file's size. * - * First clears all of the [GFileAttribute][gio-GFileAttribute] of @dest_info, - * and then copies all of the file attributes from @src_info to @dest_info. + * Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info + * to the given size. */ /** - * g_file_info_dup: - * @other: a #GFileInfo. - * - * Duplicates a file info structure. + * g_file_info_set_sort_order: + * @info: a #GFileInfo. + * @sort_order: a sort order integer. * - * Returns: (transfer full): a duplicate #GFileInfo of @other. + * Sets the sort order attribute in the file info structure. See + * %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER. */ /** - * g_file_info_get_attribute_as_string: + * g_file_info_set_symbolic_icon: * @info: a #GFileInfo. - * @attribute: a file attribute key. + * @icon: a #GIcon. * - * Gets the value of a attribute, formated as a string. - * This escapes things as needed to make the string valid - * utf8. + * Sets the symbolic icon for a given #GFileInfo. + * See %G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON. * - * Returns: a UTF-8 string associated with the given @attribute. - * When you're done with the string it must be freed with g_free(). + * Since: 2.34 */ /** - * g_file_info_get_attribute_boolean: + * g_file_info_set_symlink_target: * @info: a #GFileInfo. - * @attribute: a file attribute key. - * - * Gets the value of a boolean attribute. If the attribute does not - * contain a boolean value, %FALSE will be returned. + * @symlink_target: a static string containing a path to a symlink target. * - * Returns: the boolean value contained within the attribute. + * Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info + * to the given symlink target. */ /** - * g_file_info_get_attribute_byte_string: - * @info: a #GFileInfo. - * @attribute: a file attribute key. - * - * Gets the value of a byte string attribute. If the attribute does - * not contain a byte string, %NULL will be returned. + * g_file_info_unset_attribute_mask: + * @info: #GFileInfo. * - * Returns: the contents of the @attribute value as a byte string, or - * %NULL otherwise. + * Unsets a mask set by g_file_info_set_attribute_mask(), if one + * is set. */ /** - * g_file_info_get_attribute_data: - * @info: a #GFileInfo - * @attribute: a file attribute key - * @type: (out) (optional): return location for the attribute type, or %NULL - * @value_pp: (out) (optional) (not nullable): return location for the - * attribute value, or %NULL; the attribute value will not be %NULL - * @status: (out) (optional): return location for the attribute status, or %NULL + * g_file_input_stream_query_info: + * @stream: a #GFileInputStream. + * @attributes: a file attribute query string. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. * - * Gets the attribute type, value and status for an attribute key. + * Queries a file input stream the given @attributes. This function blocks + * while querying the stream. For the asynchronous (non-blocking) version + * of this function, see g_file_input_stream_query_info_async(). While the + * stream is blocked, the stream will set the pending flag internally, and + * any other operations on the stream will fail with %G_IO_ERROR_PENDING. * - * Returns: (transfer none): %TRUE if @info has an attribute named @attribute, - * %FALSE otherwise. + * Returns: (transfer full): a #GFileInfo, or %NULL on error. */ /** - * g_file_info_get_attribute_int32: - * @info: a #GFileInfo. - * @attribute: a file attribute key. + * g_file_input_stream_query_info_async: + * @stream: a #GFileInputStream. + * @attributes: a file attribute query string. + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (scope async): callback to call when the request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Gets a signed 32-bit integer contained within the attribute. If the - * attribute does not contain a signed 32-bit integer, or is invalid, - * 0 will be returned. + * Queries the stream information asynchronously. + * When the operation is finished @callback will be called. + * You can then call g_file_input_stream_query_info_finish() + * to get the result of the operation. * - * Returns: a signed 32-bit integer from the attribute. + * For the synchronous version of this function, + * see g_file_input_stream_query_info(). + * + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be set */ /** - * g_file_info_get_attribute_int64: - * @info: a #GFileInfo. - * @attribute: a file attribute key. + * g_file_input_stream_query_info_finish: + * @stream: a #GFileInputStream. + * @result: a #GAsyncResult. + * @error: a #GError location to store the error occurring, + * or %NULL to ignore. * - * Gets a signed 64-bit integer contained within the attribute. If the - * attribute does not contain an signed 64-bit integer, or is invalid, - * 0 will be returned. + * Finishes an asynchronous info query operation. * - * Returns: a signed 64-bit integer from the attribute. + * Returns: (transfer full): #GFileInfo. */ /** - * g_file_info_get_attribute_object: - * @info: a #GFileInfo. - * @attribute: a file attribute key. + * g_file_io_stream_get_etag: + * @stream: a #GFileIOStream. * - * Gets the value of a #GObject attribute. If the attribute does - * not contain a #GObject, %NULL will be returned. + * Gets the entity tag for the file when it has been written. + * This must be called after the stream has been written + * and closed, as the etag can change while writing. * - * Returns: (transfer none): a #GObject associated with the given @attribute, or - * %NULL otherwise. + * Returns: the entity tag for the stream. + * Since: 2.22 */ /** - * g_file_info_get_attribute_status: - * @info: a #GFileInfo - * @attribute: a file attribute key + * g_file_io_stream_query_info: + * @stream: a #GFileIOStream. + * @attributes: a file attribute query string. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: a #GError, %NULL to ignore. * - * Gets the attribute status for an attribute key. + * Queries a file io stream for the given @attributes. + * This function blocks while querying the stream. For the asynchronous + * version of this function, see g_file_io_stream_query_info_async(). + * While the stream is blocked, the stream will set the pending flag + * internally, and any other operations on the stream will fail with + * %G_IO_ERROR_PENDING. * - * Returns: a #GFileAttributeStatus for the given @attribute, or - * %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid. + * Can fail if the stream was already closed (with @error being set to + * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being + * set to %G_IO_ERROR_PENDING), or if querying info is not supported for + * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). I + * all cases of failure, %NULL will be returned. + * + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will + * be returned. + * + * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error. + * Since: 2.22 */ /** - * g_file_info_get_attribute_string: - * @info: a #GFileInfo. - * @attribute: a file attribute key. + * g_file_io_stream_query_info_async: + * @stream: a #GFileIOStream. + * @attributes: a file attribute query string. + * @io_priority: the [I/O priority][gio-GIOScheduler] of the request + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (scope async): callback to call when the request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Gets the value of a string attribute. If the attribute does - * not contain a string, %NULL will be returned. + * Asynchronously queries the @stream for a #GFileInfo. When completed, + * @callback will be called with a #GAsyncResult which can be used to + * finish the operation with g_file_io_stream_query_info_finish(). * - * Returns: the contents of the @attribute value as a UTF-8 string, or - * %NULL otherwise. + * For the synchronous version of this function, see + * g_file_io_stream_query_info(). + * + * Since: 2.22 */ /** - * g_file_info_get_attribute_stringv: - * @info: a #GFileInfo. - * @attribute: a file attribute key. + * g_file_io_stream_query_info_finish: + * @stream: a #GFileIOStream. + * @result: a #GAsyncResult. + * @error: a #GError, %NULL to ignore. * - * Gets the value of a stringv attribute. If the attribute does - * not contain a stringv, %NULL will be returned. + * Finalizes the asynchronous query started + * by g_file_io_stream_query_info_async(). * - * Returns: (transfer none): the contents of the @attribute value as a stringv, or - * %NULL otherwise. Do not free. These returned strings are UTF-8. + * Returns: (transfer full): A #GFileInfo for the finished query. * Since: 2.22 */ /** - * g_file_info_get_attribute_type: - * @info: a #GFileInfo. - * @attribute: a file attribute key. + * g_file_is_native: + * @file: input #GFile * - * Gets the attribute type for an attribute key. + * Checks to see if a file is native to the platform. * - * Returns: a #GFileAttributeType for the given @attribute, or - * %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set. + * A native file is one expressed in the platform-native filename format, + * e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local, + * as it might be on a locally mounted remote filesystem. + * + * On some systems non-native files may be available using the native + * filesystem via a userspace filesystem (FUSE), in these cases this call + * will return %FALSE, but g_file_get_path() will still return a native path. + * + * This call does no blocking I/O. + * + * Returns: %TRUE if @file is native */ /** - * g_file_info_get_attribute_uint32: - * @info: a #GFileInfo. - * @attribute: a file attribute key. + * g_file_load_bytes: + * @file: a #GFile + * @cancellable: (nullable): a #GCancellable or %NULL + * @etag_out: (out) (nullable) (optional): a location to place the current + * entity tag for the file, or %NULL if the entity tag is not needed + * @error: a location for a #GError or %NULL * - * Gets an unsigned 32-bit integer contained within the attribute. If the - * attribute does not contain an unsigned 32-bit integer, or is invalid, - * 0 will be returned. + * Loads the contents of @file and returns it as #GBytes. * - * Returns: an unsigned 32-bit integer from the attribute. + * If @file is a resource:// based URI, the resulting bytes will reference the + * embedded resource instead of a copy. Otherwise, this is equivalent to calling + * g_file_load_contents() and g_bytes_new_take(). + * + * For resources, @etag_out will be set to %NULL. + * + * The data contained in the resulting #GBytes is always zero-terminated, but + * this is not included in the #GBytes length. The resulting #GBytes should be + * freed with g_bytes_unref() when no longer in use. + * + * Returns: (transfer full): a #GBytes or %NULL and @error is set + * Since: 2.56 */ /** - * g_file_info_get_attribute_uint64: - * @info: a #GFileInfo. - * @attribute: a file attribute key. + * g_file_load_bytes_async: + * @file: a #GFile + * @cancellable: (nullable): a #GCancellable or %NULL + * @callback: (scope async): a #GAsyncReadyCallback to call when the + * request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Gets a unsigned 64-bit integer contained within the attribute. If the - * attribute does not contain an unsigned 64-bit integer, or is invalid, - * 0 will be returned. + * Asynchronously loads the contents of @file as #GBytes. * - * Returns: a unsigned 64-bit integer from the attribute. + * If @file is a resource:// based URI, the resulting bytes will reference the + * embedded resource instead of a copy. Otherwise, this is equivalent to calling + * g_file_load_contents_async() and g_bytes_new_take(). + * + * @callback should call g_file_load_bytes_finish() to get the result of this + * asynchronous operation. + * + * See g_file_load_bytes() for more information. + * + * Since: 2.56 */ /** - * g_file_info_get_content_type: - * @info: a #GFileInfo. + * g_file_load_bytes_finish: + * @file: a #GFile + * @result: a #GAsyncResult provided to the callback + * @etag_out: (out) (nullable) (optional): a location to place the current + * entity tag for the file, or %NULL if the entity tag is not needed + * @error: a location for a #GError, or %NULL * - * Gets the file's content type. + * Completes an asynchronous request to g_file_load_bytes_async(). * - * Returns: a string containing the file's content type. + * For resources, @etag_out will be set to %NULL. + * + * The data contained in the resulting #GBytes is always zero-terminated, but + * this is not included in the #GBytes length. The resulting #GBytes should be + * freed with g_bytes_unref() when no longer in use. + * + * See g_file_load_bytes() for more information. + * + * Returns: (transfer full): a #GBytes or %NULL and @error is set + * Since: 2.56 */ /** - * g_file_info_get_deletion_date: - * @info: a #GFileInfo. + * g_file_load_contents: + * @file: input #GFile + * @cancellable: optional #GCancellable object, %NULL to ignore + * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file + * @length: (out) (optional): a location to place the length of the contents of the file, + * or %NULL if the length is not needed + * @etag_out: (out) (optional): a location to place the current entity tag for the file, + * or %NULL if the entity tag is not needed + * @error: a #GError, or %NULL * - * Returns the #GDateTime representing the deletion date of the file, as - * available in G_FILE_ATTRIBUTE_TRASH_DELETION_DATE. If the - * G_FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, %NULL is returned. + * Loads the content of the file into memory. The data is always + * zero-terminated, but this is not included in the resultant @length. + * The returned @contents should be freed with g_free() when no longer + * needed. * - * Returns: a #GDateTime, or %NULL. - * Since: 2.36 + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * + * Returns: %TRUE if the @file's contents were successfully loaded. + * %FALSE if there were errors. */ /** - * g_file_info_get_display_name: - * @info: a #GFileInfo. + * g_file_load_contents_async: + * @file: input #GFile + * @cancellable: optional #GCancellable object, %NULL to ignore + * @callback: a #GAsyncReadyCallback to call when the request is satisfied + * @user_data: the data to pass to callback function * - * Gets a display name for a file. + * Starts an asynchronous load of the @file's contents. * - * Returns: a string containing the display name. + * For more details, see g_file_load_contents() which is + * the synchronous version of this call. + * + * When the load operation has completed, @callback will be called + * with @user data. To finish the operation, call + * g_file_load_contents_finish() with the #GAsyncResult returned by + * the @callback. + * + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. */ /** - * g_file_info_get_edit_name: - * @info: a #GFileInfo. + * g_file_load_contents_finish: + * @file: input #GFile + * @res: a #GAsyncResult + * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file + * @length: (out) (optional): a location to place the length of the contents of the file, + * or %NULL if the length is not needed + * @etag_out: (out) (optional): a location to place the current entity tag for the file, + * or %NULL if the entity tag is not needed + * @error: a #GError, or %NULL * - * Gets the edit name for a file. + * Finishes an asynchronous load of the @file's contents. + * The contents are placed in @contents, and @length is set to the + * size of the @contents string. The @contents should be freed with + * g_free() when no longer needed. If @etag_out is present, it will be + * set to the new entity tag for the @file. * - * Returns: a string containing the edit name. + * Returns: %TRUE if the load was successful. If %FALSE and @error is + * present, it will be set appropriately. */ /** - * g_file_info_get_etag: - * @info: a #GFileInfo. + * g_file_load_partial_contents_async: (skip) + * @file: input #GFile + * @cancellable: optional #GCancellable object, %NULL to ignore + * @read_more_callback: (scope call) (closure user_data): a + * #GFileReadMoreCallback to receive partial data + * and to specify whether further data should be read + * @callback: (scope async) (closure user_data): a #GAsyncReadyCallback to call + * when the request is satisfied + * @user_data: the data to pass to the callback functions * - * Gets the [entity tag][gfile-etag] for a given - * #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE. + * Reads the partial contents of a file. A #GFileReadMoreCallback should + * be used to stop reading from the file when appropriate, else this + * function will behave exactly as g_file_load_contents_async(). This + * operation can be finished by g_file_load_partial_contents_finish(). * - * Returns: a string containing the value of the "etag:value" attribute. + * Users of this function should be aware that @user_data is passed to + * both the @read_more_callback and the @callback. + * + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. */ /** - * g_file_info_get_file_type: - * @info: a #GFileInfo. + * g_file_load_partial_contents_finish: + * @file: input #GFile + * @res: a #GAsyncResult + * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file + * @length: (out) (optional): a location to place the length of the contents of the file, + * or %NULL if the length is not needed + * @etag_out: (out) (optional): a location to place the current entity tag for the file, + * or %NULL if the entity tag is not needed + * @error: a #GError, or %NULL * - * Gets a file's type (whether it is a regular file, symlink, etc). - * This is different from the file's content type, see g_file_info_get_content_type(). + * Finishes an asynchronous partial load operation that was started + * with g_file_load_partial_contents_async(). The data is always + * zero-terminated, but this is not included in the resultant @length. + * The returned @contents should be freed with g_free() when no longer + * needed. * - * Returns: a #GFileType for the given file. + * Returns: %TRUE if the load was successful. If %FALSE and @error is + * present, it will be set appropriately. */ /** - * g_file_info_get_icon: - * @info: a #GFileInfo. + * g_file_make_directory: + * @file: input #GFile + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @error: a #GError, or %NULL * - * Gets the icon for a file. + * Creates a directory. Note that this will only create a child directory + * of the immediate parent directory of the path or URI given by the #GFile. + * To recursively create directories, see g_file_make_directory_with_parents(). + * This function will fail if the parent directory does not exist, setting + * @error to %G_IO_ERROR_NOT_FOUND. If the file system doesn't support + * creating directories, this function will fail, setting @error to + * %G_IO_ERROR_NOT_SUPPORTED. * - * Returns: (transfer none): #GIcon for the given @info. + * For a local #GFile the newly created directory will have the default + * (current) ownership and permissions of the current process. + * + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * + * Returns: %TRUE on successful creation, %FALSE otherwise. */ /** - * g_file_info_get_is_backup: - * @info: a #GFileInfo. + * g_file_make_directory_async: (virtual make_directory_async) + * @file: input #GFile + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @callback: a #GAsyncReadyCallback to call + * when the request is satisfied + * @user_data: the data to pass to callback function * - * Checks if a file is a backup file. + * Asynchronously creates a directory. * - * Returns: %TRUE if file is a backup file, %FALSE otherwise. + * Since: 2.38 */ /** - * g_file_info_get_is_hidden: - * @info: a #GFileInfo. + * g_file_make_directory_finish: (virtual make_directory_finish) + * @file: input #GFile + * @result: a #GAsyncResult + * @error: a #GError, or %NULL * - * Checks if a file is hidden. + * Finishes an asynchronous directory creation, started with + * g_file_make_directory_async(). * - * Returns: %TRUE if the file is a hidden file, %FALSE otherwise. + * Returns: %TRUE on successful directory creation, %FALSE otherwise. + * Since: 2.38 */ /** - * g_file_info_get_is_symlink: - * @info: a #GFileInfo. + * g_file_make_directory_with_parents: + * @file: input #GFile + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @error: a #GError, or %NULL * - * Checks if a file is a symlink. + * Creates a directory and any parent directories that may not + * exist similar to 'mkdir -p'. If the file system does not support + * creating directories, this function will fail, setting @error to + * %G_IO_ERROR_NOT_SUPPORTED. If the directory itself already exists, + * this function will fail setting @error to %G_IO_ERROR_EXISTS, unlike + * the similar g_mkdir_with_parents(). * - * Returns: %TRUE if the given @info is a symlink. + * For a local #GFile the newly created directories will have the default + * (current) ownership and permissions of the current process. + * + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * + * Returns: %TRUE if all directories have been successfully created, %FALSE + * otherwise. + * Since: 2.18 */ /** - * g_file_info_get_modification_time: - * @info: a #GFileInfo. - * @result: (out caller-allocates): a #GTimeVal. + * g_file_make_symbolic_link: + * @file: a #GFile with the name of the symlink to create + * @symlink_value: (type filename): a string with the path for the target + * of the new symlink + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @error: a #GError * - * Gets the modification time of the current @info and sets it - * in @result. + * Creates a symbolic link named @file which contains the string + * @symlink_value. + * + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * + * Returns: %TRUE on the creation of a new symlink, %FALSE otherwise. */ /** - * g_file_info_get_name: - * @info: a #GFileInfo. + * g_file_measure_disk_usage: + * @file: a #GFile + * @flags: #GFileMeasureFlags + * @cancellable: (nullable): optional #GCancellable + * @progress_callback: (nullable): a #GFileMeasureProgressCallback + * @progress_data: user_data for @progress_callback + * @disk_usage: (out) (optional): the number of bytes of disk space used + * @num_dirs: (out) (optional): the number of directories encountered + * @num_files: (out) (optional): the number of non-directories encountered + * @error: (nullable): %NULL, or a pointer to a %NULL #GError pointer * - * Gets the name for a file. + * Recursively measures the disk usage of @file. * - * Returns: (type filename): a string containing the file name. + * This is essentially an analog of the 'du' command, but it also + * reports the number of directories and non-directory files encountered + * (including things like symbolic links). + * + * By default, errors are only reported against the toplevel file + * itself. Errors found while recursing are silently ignored, unless + * %G_FILE_MEASURE_REPORT_ANY_ERROR is given in @flags. + * + * The returned size, @disk_usage, is in bytes and should be formatted + * with g_format_size() in order to get something reasonable for showing + * in a user interface. + * + * @progress_callback and @progress_data can be given to request + * periodic progress updates while scanning. See the documentation for + * #GFileMeasureProgressCallback for information about when and how the + * callback will be invoked. + * + * Returns: %TRUE if successful, with the out parameters set. + * %FALSE otherwise, with @error set. + * Since: 2.38 */ /** - * g_file_info_get_size: - * @info: a #GFileInfo. + * g_file_measure_disk_usage_async: + * @file: a #GFile + * @flags: #GFileMeasureFlags + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): optional #GCancellable + * @progress_callback: (nullable): a #GFileMeasureProgressCallback + * @progress_data: user_data for @progress_callback + * @callback: (nullable): a #GAsyncReadyCallback to call when complete + * @user_data: the data to pass to callback function * - * Gets the file's size. + * Recursively measures the disk usage of @file. * - * Returns: a #goffset containing the file's size. + * This is the asynchronous version of g_file_measure_disk_usage(). See + * there for more information. + * + * Since: 2.38 */ /** - * g_file_info_get_sort_order: - * @info: a #GFileInfo. + * g_file_measure_disk_usage_finish: + * @file: a #GFile + * @result: the #GAsyncResult passed to your #GAsyncReadyCallback + * @disk_usage: (out) (optional): the number of bytes of disk space used + * @num_dirs: (out) (optional): the number of directories encountered + * @num_files: (out) (optional): the number of non-directories encountered + * @error: (nullable): %NULL, or a pointer to a %NULL #GError pointer * - * Gets the value of the sort_order attribute from the #GFileInfo. - * See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER. + * Collects the results from an earlier call to + * g_file_measure_disk_usage_async(). See g_file_measure_disk_usage() for + * more information. * - * Returns: a #gint32 containing the value of the "standard::sort_order" attribute. + * Returns: %TRUE if successful, with the out parameters set. + * %FALSE otherwise, with @error set. + * Since: 2.38 */ /** - * g_file_info_get_symbolic_icon: - * @info: a #GFileInfo. + * g_file_monitor: + * @file: input #GFile + * @flags: a set of #GFileMonitorFlags + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @error: a #GError, or %NULL * - * Gets the symbolic icon for a file. + * Obtains a file or directory monitor for the given file, + * depending on the type of the file. * - * Returns: (transfer none): #GIcon for the given @info. - * Since: 2.34 + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * + * Returns: (transfer full): a #GFileMonitor for the given @file, + * or %NULL on error. + * Free the returned object with g_object_unref(). + * Since: 2.18 */ /** - * g_file_info_get_symlink_target: - * @info: a #GFileInfo. + * g_file_monitor_cancel: + * @monitor: a #GFileMonitor. * - * Gets the symlink target for a given #GFileInfo. + * Cancels a file monitor. * - * Returns: a string containing the symlink target. + * Returns: always %TRUE */ /** - * g_file_info_has_attribute: - * @info: a #GFileInfo. - * @attribute: a file attribute key. + * g_file_monitor_directory: (virtual monitor_dir) + * @file: input #GFile + * @flags: a set of #GFileMonitorFlags + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @error: a #GError, or %NULL * - * Checks if a file info structure has an attribute named @attribute. + * Obtains a directory monitor for the given file. + * This may fail if directory monitoring is not supported. * - * Returns: %TRUE if @Ginfo has an attribute named @attribute, - * %FALSE otherwise. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * + * It does not make sense for @flags to contain + * %G_FILE_MONITOR_WATCH_HARD_LINKS, since hard links can not be made to + * directories. It is not possible to monitor all the files in a + * directory for changes made via hard links; if you want to do this then + * you must register individual watches with g_file_monitor(). + * + * Returns: (transfer full): a #GFileMonitor for the given @file, + * or %NULL on error. + * Free the returned object with g_object_unref(). */ /** - * g_file_info_has_namespace: - * @info: a #GFileInfo. - * @name_space: a file attribute namespace. + * g_file_monitor_emit_event: + * @monitor: a #GFileMonitor. + * @child: a #GFile. + * @other_file: a #GFile. + * @event_type: a set of #GFileMonitorEvent flags. * - * Checks if a file info structure has an attribute in the - * specified @name_space. + * Emits the #GFileMonitor::changed signal if a change + * has taken place. Should be called from file monitor + * implementations only. * - * Returns: %TRUE if @Ginfo has an attribute in @name_space, - * %FALSE otherwise. - * Since: 2.22 + * Implementations are responsible to call this method from the + * [thread-default main context][g-main-context-push-thread-default] of the + * thread that the monitor was created in. */ /** - * g_file_info_list_attributes: - * @info: a #GFileInfo. - * @name_space: (nullable): a file attribute key's namespace, or %NULL to list - * all attributes. + * g_file_monitor_file: + * @file: input #GFile + * @flags: a set of #GFileMonitorFlags + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @error: a #GError, or %NULL * - * Lists the file info structure's attributes. + * Obtains a file monitor for the given file. If no file notification + * mechanism exists, then regular polling of the file is used. * - * Returns: (nullable) (array zero-terminated=1) (transfer full): a - * null-terminated array of strings of all of the possible attribute - * types for the given @name_space, or %NULL on error. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * + * If @flags contains %G_FILE_MONITOR_WATCH_HARD_LINKS then the monitor + * will also attempt to report changes made to the file via another + * filename (ie, a hard link). Without this flag, you can only rely on + * changes made through the filename contained in @file to be + * reported. Using this flag may result in an increase in resource + * usage, and may not have any effect depending on the #GFileMonitor + * backend and/or filesystem type. + * + * Returns: (transfer full): a #GFileMonitor for the given @file, + * or %NULL on error. + * Free the returned object with g_object_unref(). */ /** - * g_file_info_new: + * g_file_monitor_is_cancelled: + * @monitor: a #GFileMonitor * - * Creates a new file info structure. + * Returns whether the monitor is canceled. * - * Returns: a #GFileInfo. + * Returns: %TRUE if monitor is canceled. %FALSE otherwise. */ /** - * g_file_info_remove_attribute: - * @info: a #GFileInfo. - * @attribute: a file attribute key. + * g_file_monitor_set_rate_limit: + * @monitor: a #GFileMonitor. + * @limit_msecs: a non-negative integer with the limit in milliseconds + * to poll for changes * - * Removes all cases of @attribute from @info if it exists. + * Sets the rate limit to which the @monitor will report + * consecutive change events to the same file. */ /** - * g_file_info_set_attribute: - * @info: a #GFileInfo. - * @attribute: a file attribute key. - * @type: a #GFileAttributeType - * @value_p: (not nullable): pointer to the value + * g_file_mount_enclosing_volume: + * @location: input #GFile + * @flags: flags affecting the operation + * @mount_operation: (nullable): a #GMountOperation + * or %NULL to avoid user interaction + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @callback: (nullable): a #GAsyncReadyCallback to call + * when the request is satisfied, or %NULL + * @user_data: the data to pass to callback function * - * Sets the @attribute to contain the given value, if possible. To unset the - * attribute, use %G_ATTRIBUTE_TYPE_INVALID for @type. + * Starts a @mount_operation, mounting the volume that contains + * the file @location. + * + * When this operation has completed, @callback will be called with + * @user_user data, and the operation can be finalized with + * g_file_mount_enclosing_volume_finish(). + * + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. */ /** - * g_file_info_set_attribute_boolean: - * @info: a #GFileInfo. - * @attribute: a file attribute key. - * @attr_value: a boolean value. + * g_file_mount_enclosing_volume_finish: + * @location: input #GFile + * @result: a #GAsyncResult + * @error: a #GError, or %NULL * - * Sets the @attribute to contain the given @attr_value, - * if possible. - */ - - -/** - * g_file_info_set_attribute_byte_string: - * @info: a #GFileInfo. - * @attribute: a file attribute key. - * @attr_value: a byte string. + * Finishes a mount operation started by g_file_mount_enclosing_volume(). * - * Sets the @attribute to contain the given @attr_value, - * if possible. + * Returns: %TRUE if successful. If an error has occurred, + * this function will return %FALSE and set @error + * appropriately if present. */ /** - * g_file_info_set_attribute_int32: - * @info: a #GFileInfo. - * @attribute: a file attribute key. - * @attr_value: a signed 32-bit integer + * g_file_mount_mountable: + * @file: input #GFile + * @flags: flags affecting the operation + * @mount_operation: (nullable): a #GMountOperation, + * or %NULL to avoid user interaction + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @callback: (scope async) (nullable): a #GAsyncReadyCallback to call + * when the request is satisfied, or %NULL + * @user_data: (closure): the data to pass to callback function * - * Sets the @attribute to contain the given @attr_value, - * if possible. - */ - - -/** - * g_file_info_set_attribute_int64: - * @info: a #GFileInfo. - * @attribute: attribute name to set. - * @attr_value: int64 value to set attribute to. + * Mounts a file of type G_FILE_TYPE_MOUNTABLE. + * Using @mount_operation, you can request callbacks when, for instance, + * passwords are needed during authentication. * - * Sets the @attribute to contain the given @attr_value, - * if possible. - */ - - -/** - * g_file_info_set_attribute_mask: - * @info: a #GFileInfo. - * @mask: a #GFileAttributeMatcher. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * Sets @mask on @info to match specific attribute types. + * When the operation is finished, @callback will be called. + * You can then call g_file_mount_mountable_finish() to get + * the result of the operation. */ /** - * g_file_info_set_attribute_object: - * @info: a #GFileInfo. - * @attribute: a file attribute key. - * @attr_value: a #GObject. + * g_file_mount_mountable_finish: + * @file: input #GFile + * @result: a #GAsyncResult + * @error: a #GError, or %NULL * - * Sets the @attribute to contain the given @attr_value, - * if possible. + * Finishes a mount operation. See g_file_mount_mountable() for details. + * + * Finish an asynchronous mount operation that was started + * with g_file_mount_mountable(). + * + * Returns: (transfer full): a #GFile or %NULL on error. + * Free the returned object with g_object_unref(). */ /** - * g_file_info_set_attribute_status: - * @info: a #GFileInfo - * @attribute: a file attribute key - * @status: a #GFileAttributeStatus + * g_file_move: + * @source: #GFile pointing to the source location + * @destination: #GFile pointing to the destination location + * @flags: set of #GFileCopyFlags + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @progress_callback: (nullable) (scope call): #GFileProgressCallback + * function for updates + * @progress_callback_data: (closure): gpointer to user data for + * the callback function + * @error: #GError for returning error conditions, or %NULL * - * Sets the attribute status for an attribute key. This is only - * needed by external code that implement g_file_set_attributes_from_info() - * or similar functions. + * Tries to move the file or directory @source to the location specified + * by @destination. If native move operations are supported then this is + * used, otherwise a copy + delete fallback is used. The native + * implementation may support moving directories (for instance on moves + * inside the same filesystem), but the fallback code does not. * - * The attribute must exist in @info for this to work. Otherwise %FALSE - * is returned and @info is unchanged. + * If the flag #G_FILE_COPY_OVERWRITE is specified an already + * existing @destination file is overwritten. * - * Returns: %TRUE if the status was changed, %FALSE if the key was not set. - * Since: 2.22 - */ - - -/** - * g_file_info_set_attribute_string: - * @info: a #GFileInfo. - * @attribute: a file attribute key. - * @attr_value: a UTF-8 string. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * Sets the @attribute to contain the given @attr_value, - * if possible. - */ - - -/** - * g_file_info_set_attribute_stringv: - * @info: a #GFileInfo. - * @attribute: a file attribute key - * @attr_value: (array) (element-type utf8): a %NULL terminated array of UTF-8 strings. + * If @progress_callback is not %NULL, then the operation can be monitored + * by setting this to a #GFileProgressCallback function. + * @progress_callback_data will be passed to this function. It is + * guaranteed that this callback will be called after all data has been + * transferred with the total number of bytes copied during the operation. * - * Sets the @attribute to contain the given @attr_value, - * if possible. + * If the @source file does not exist, then the %G_IO_ERROR_NOT_FOUND + * error is returned, independent on the status of the @destination. * - * Sinze: 2.22 - */ - - -/** - * g_file_info_set_attribute_uint32: - * @info: a #GFileInfo. - * @attribute: a file attribute key. - * @attr_value: an unsigned 32-bit integer. + * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, + * then the error %G_IO_ERROR_EXISTS is returned. * - * Sets the @attribute to contain the given @attr_value, - * if possible. - */ - - -/** - * g_file_info_set_attribute_uint64: - * @info: a #GFileInfo. - * @attribute: a file attribute key. - * @attr_value: an unsigned 64-bit integer. + * If trying to overwrite a file over a directory, the %G_IO_ERROR_IS_DIRECTORY + * error is returned. If trying to overwrite a directory with a directory the + * %G_IO_ERROR_WOULD_MERGE error is returned. * - * Sets the @attribute to contain the given @attr_value, - * if possible. - */ - - -/** - * g_file_info_set_content_type: - * @info: a #GFileInfo. - * @content_type: a content type. See [GContentType][gio-GContentType] + * If the source is a directory and the target does not exist, or + * #G_FILE_COPY_OVERWRITE is specified and the target is a file, then + * the %G_IO_ERROR_WOULD_RECURSE error may be returned (if the native + * move operation isn't available). * - * Sets the content type attribute for a given #GFileInfo. - * See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE. + * Returns: %TRUE on successful move, %FALSE otherwise. */ /** - * g_file_info_set_display_name: - * @info: a #GFileInfo. - * @display_name: a string containing a display name. + * g_file_new_build_filename: + * @first_element: (type filename): the first element in the path + * @...: remaining elements in path, terminated by %NULL * - * Sets the display name for the current #GFileInfo. - * See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME. - */ - - -/** - * g_file_info_set_edit_name: - * @info: a #GFileInfo. - * @edit_name: a string containing an edit name. + * Constructs a #GFile from a series of elements using the correct + * separator for filenames. * - * Sets the edit name for the current file. - * See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME. - */ - - -/** - * g_file_info_set_file_type: - * @info: a #GFileInfo. - * @type: a #GFileType. + * Using this function is equivalent to calling g_build_filename(), + * followed by g_file_new_for_path() on the result. * - * Sets the file type in a #GFileInfo to @type. - * See %G_FILE_ATTRIBUTE_STANDARD_TYPE. + * Returns: (transfer full): a new #GFile + * Since: 2.56 */ /** - * g_file_info_set_icon: - * @info: a #GFileInfo. - * @icon: a #GIcon. + * g_file_new_for_commandline_arg: + * @arg: (type filename): a command line string * - * Sets the icon for a given #GFileInfo. - * See %G_FILE_ATTRIBUTE_STANDARD_ICON. - */ - - -/** - * g_file_info_set_is_hidden: - * @info: a #GFileInfo. - * @is_hidden: a #gboolean. + * Creates a #GFile with the given argument from the command line. + * The value of @arg can be either a URI, an absolute path or a + * relative path resolved relative to the current working directory. + * This operation never fails, but the returned object might not + * support any I/O operation if @arg points to a malformed path. * - * Sets the "is_hidden" attribute in a #GFileInfo according to @is_hidden. - * See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN. - */ - - -/** - * g_file_info_set_is_symlink: - * @info: a #GFileInfo. - * @is_symlink: a #gboolean. + * Note that on Windows, this function expects its argument to be in + * UTF-8 -- not the system code page. This means that you + * should not use this function with string from argv as it is passed + * to main(). g_win32_get_command_line() will return a UTF-8 version of + * the commandline. #GApplication also uses UTF-8 but + * g_application_command_line_create_file_for_arg() may be more useful + * for you there. It is also always possible to use this function with + * #GOptionContext arguments of type %G_OPTION_ARG_FILENAME. * - * Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink. - * See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK. + * Returns: (transfer full): a new #GFile. + * Free the returned object with g_object_unref(). */ /** - * g_file_info_set_modification_time: - * @info: a #GFileInfo. - * @mtime: a #GTimeVal. + * g_file_new_for_commandline_arg_and_cwd: + * @arg: (type filename): a command line string + * @cwd: (type filename): the current working directory of the commandline * - * Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file - * info to the given time value. - */ - - -/** - * g_file_info_set_name: - * @info: a #GFileInfo. - * @name: (type filename): a string containing a name. + * Creates a #GFile with the given argument from the command line. * - * Sets the name attribute for the current #GFileInfo. - * See %G_FILE_ATTRIBUTE_STANDARD_NAME. - */ - - -/** - * g_file_info_set_size: - * @info: a #GFileInfo. - * @size: a #goffset containing the file's size. + * This function is similar to g_file_new_for_commandline_arg() except + * that it allows for passing the current working directory as an + * argument instead of using the current working directory of the + * process. * - * Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info - * to the given size. - */ - - -/** - * g_file_info_set_sort_order: - * @info: a #GFileInfo. - * @sort_order: a sort order integer. + * This is useful if the commandline argument was given in a context + * other than the invocation of the current process. * - * Sets the sort order attribute in the file info structure. See - * %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER. + * See also g_application_command_line_create_file_for_arg(). + * + * Returns: (transfer full): a new #GFile + * Since: 2.36 */ /** - * g_file_info_set_symbolic_icon: - * @info: a #GFileInfo. - * @icon: a #GIcon. + * g_file_new_for_path: + * @path: (type filename): a string containing a relative or absolute path. + * The string must be encoded in the glib filename encoding. * - * Sets the symbolic icon for a given #GFileInfo. - * See %G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON. + * Constructs a #GFile for a given path. This operation never + * fails, but the returned object might not support any I/O + * operation if @path is malformed. * - * Since: 2.34 + * Returns: (transfer full): a new #GFile for the given @path. + * Free the returned object with g_object_unref(). */ /** - * g_file_info_set_symlink_target: - * @info: a #GFileInfo. - * @symlink_target: a static string containing a path to a symlink target. + * g_file_new_for_uri: + * @uri: a UTF-8 string containing a URI * - * Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info - * to the given symlink target. + * Constructs a #GFile for a given URI. This operation never + * fails, but the returned object might not support any I/O + * operation if @uri is malformed or if the uri type is + * not supported. + * + * Returns: (transfer full): a new #GFile for the given @uri. + * Free the returned object with g_object_unref(). */ /** - * g_file_info_unset_attribute_mask: - * @info: #GFileInfo. + * g_file_new_tmp: + * @tmpl: (type filename) (nullable): Template for the file + * name, as in g_file_open_tmp(), or %NULL for a default template + * @iostream: (out): on return, a #GFileIOStream for the created file + * @error: a #GError, or %NULL * - * Unsets a mask set by g_file_info_set_attribute_mask(), if one - * is set. + * Opens a file in the preferred directory for temporary files (as + * returned by g_get_tmp_dir()) and returns a #GFile and + * #GFileIOStream pointing to it. + * + * @tmpl should be a string in the GLib file name encoding + * containing a sequence of six 'X' characters, and containing no + * directory components. If it is %NULL, a default template is used. + * + * Unlike the other #GFile constructors, this will return %NULL if + * a temporary file could not be created. + * + * Returns: (transfer full): a new #GFile. + * Free the returned object with g_object_unref(). + * Since: 2.32 */ /** - * g_file_input_stream_query_info: - * @stream: a #GFileInputStream. - * @attributes: a file attribute query string. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: a #GError location to store the error occurring, or %NULL to - * ignore. + * g_file_open_readwrite: + * @file: #GFile to open + * @cancellable: (nullable): a #GCancellable + * @error: a #GError, or %NULL * - * Queries a file input stream the given @attributes. This function blocks - * while querying the stream. For the asynchronous (non-blocking) version - * of this function, see g_file_input_stream_query_info_async(). While the - * stream is blocked, the stream will set the pending flag internally, and - * any other operations on the stream will fail with %G_IO_ERROR_PENDING. + * Opens an existing file for reading and writing. The result is + * a #GFileIOStream that can be used to read and write the contents + * of the file. * - * Returns: (transfer full): a #GFileInfo, or %NULL on error. + * If @cancellable is not %NULL, then the operation can be cancelled + * by triggering the cancellable object from another thread. If the + * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be + * returned. + * + * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will + * be returned. If the file is a directory, the %G_IO_ERROR_IS_DIRECTORY + * error will be returned. Other errors are possible too, and depend on + * what kind of filesystem the file is on. Note that in many non-local + * file cases read and write streams are not supported, so make sure you + * really need to do read and write streaming, rather than just opening + * for reading or writing. + * + * Returns: (transfer full): #GFileIOStream or %NULL on error. + * Free the returned object with g_object_unref(). + * Since: 2.22 */ /** - * g_file_input_stream_query_info_async: - * @stream: a #GFileInputStream. - * @attributes: a file attribute query string. + * g_file_open_readwrite_async: + * @file: input #GFile * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (scope async): callback to call when the request is satisfied + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @callback: (scope async): a #GAsyncReadyCallback to call + * when the request is satisfied * @user_data: (closure): the data to pass to callback function * - * Queries the stream information asynchronously. - * When the operation is finished @callback will be called. - * You can then call g_file_input_stream_query_info_finish() - * to get the result of the operation. + * Asynchronously opens @file for reading and writing. * - * For the synchronous version of this function, - * see g_file_input_stream_query_info(). + * For more details, see g_file_open_readwrite() which is + * the synchronous version of this call. * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be set + * When the operation is finished, @callback will be called. + * You can then call g_file_open_readwrite_finish() to get + * the result of the operation. + * + * Since: 2.22 */ /** - * g_file_input_stream_query_info_finish: - * @stream: a #GFileInputStream. - * @result: a #GAsyncResult. - * @error: a #GError location to store the error occurring, - * or %NULL to ignore. + * g_file_open_readwrite_finish: + * @file: input #GFile + * @res: a #GAsyncResult + * @error: a #GError, or %NULL * - * Finishes an asynchronous info query operation. + * Finishes an asynchronous file read operation started with + * g_file_open_readwrite_async(). * - * Returns: (transfer full): #GFileInfo. + * Returns: (transfer full): a #GFileIOStream or %NULL on error. + * Free the returned object with g_object_unref(). + * Since: 2.22 */ /** - * g_file_io_stream_get_etag: - * @stream: a #GFileIOStream. + * g_file_output_stream_get_etag: + * @stream: a #GFileOutputStream. * * Gets the entity tag for the file when it has been written. * This must be called after the stream has been written * and closed, as the etag can change while writing. * * Returns: the entity tag for the stream. - * Since: 2.22 */ /** - * g_file_io_stream_query_info: - * @stream: a #GFileIOStream. + * g_file_output_stream_query_info: + * @stream: a #GFileOutputStream. * @attributes: a file attribute query string. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @cancellable: optional #GCancellable object, %NULL to ignore. * @error: a #GError, %NULL to ignore. * - * Queries a file io stream for the given @attributes. + * Queries a file output stream for the given @attributes. * This function blocks while querying the stream. For the asynchronous - * version of this function, see g_file_io_stream_query_info_async(). + * version of this function, see g_file_output_stream_query_info_async(). * While the stream is blocked, the stream will set the pending flag * internally, and any other operations on the stream will fail with * %G_IO_ERROR_PENDING. @@ -24430,7 +23971,7 @@ * Can fail if the stream was already closed (with @error being set to * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being * set to %G_IO_ERROR_PENDING), or if querying info is not supported for - * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). I + * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In * all cases of failure, %NULL will be returned. * * If @cancellable is not %NULL, then the operation can be cancelled by @@ -24439,839 +23980,722 @@ * be returned. * * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error. - * Since: 2.22 */ /** - * g_file_io_stream_query_info_async: - * @stream: a #GFileIOStream. + * g_file_output_stream_query_info_async: + * @stream: a #GFileOutputStream. * @attributes: a file attribute query string. * @io_priority: the [I/O priority][gio-GIOScheduler] of the request - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (scope async): callback to call when the request is satisfied - * @user_data: (closure): the data to pass to callback function + * @cancellable: optional #GCancellable object, %NULL to ignore. + * @callback: callback to call when the request is satisfied + * @user_data: the data to pass to callback function * * Asynchronously queries the @stream for a #GFileInfo. When completed, * @callback will be called with a #GAsyncResult which can be used to - * finish the operation with g_file_io_stream_query_info_finish(). + * finish the operation with g_file_output_stream_query_info_finish(). * * For the synchronous version of this function, see - * g_file_io_stream_query_info(). - * - * Since: 2.22 + * g_file_output_stream_query_info(). */ /** - * g_file_io_stream_query_info_finish: - * @stream: a #GFileIOStream. + * g_file_output_stream_query_info_finish: + * @stream: a #GFileOutputStream. * @result: a #GAsyncResult. * @error: a #GError, %NULL to ignore. * * Finalizes the asynchronous query started - * by g_file_io_stream_query_info_async(). + * by g_file_output_stream_query_info_async(). * * Returns: (transfer full): A #GFileInfo for the finished query. - * Since: 2.22 */ /** - * g_file_is_native: - * @file: input #GFile - * - * Checks to see if a file is native to the platform. - * - * A native file s one expressed in the platform-native filename format, - * e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local, - * as it might be on a locally mounted remote filesystem. - * - * On some systems non-native files may be available using the native - * filesystem via a userspace filesystem (FUSE), in these cases this call - * will return %FALSE, but g_file_get_path() will still return a native path. + * g_file_parse_name: + * @parse_name: a file name or path to be parsed * - * This call does no blocking I/O. + * Constructs a #GFile with the given @parse_name (i.e. something + * given by g_file_get_parse_name()). This operation never fails, + * but the returned object might not support any I/O operation if + * the @parse_name cannot be parsed. * - * Returns: %TRUE if @file is native + * Returns: (transfer full): a new #GFile. */ /** - * g_file_load_bytes: - * @file: a #GFile - * @cancellable: (nullable): a #GCancellable or %NULL - * @etag_out: (out) (nullable) (optional): a location to place the current - * entity tag for the file, or %NULL if the entity tag is not needed - * @error: a location for a #GError or %NULL - * - * Loads the contents of @file and returns it as #GBytes. - * - * If @file is a resource:// based URI, the resulting bytes will reference the - * embedded resource instead of a copy. Otherwise, this is equivalent to calling - * g_file_load_contents() and g_bytes_new_take(). + * g_file_peek_path: + * @file: input #GFile * - * For resources, @etag_out will be set to %NULL. + * Exactly like g_file_get_path(), but caches the result via + * g_object_set_qdata_full(). This is useful for example in C + * applications which mix `g_file_*` APIs with native ones. It + * also avoids an extra duplicated string when possible, so will be + * generally more efficient. * - * The data contained in the resulting #GBytes is always zero-terminated, but - * this is not included in the #GBytes length. The resulting #GBytes should be - * freed with g_bytes_unref() when no longer in use. + * This call does no blocking I/O. * - * Returns: (transfer full): a #GBytes or %NULL and @error is set + * Returns: (type filename) (nullable): string containing the #GFile's path, + * or %NULL if no such path exists. The returned string is owned by @file. * Since: 2.56 */ /** - * g_file_load_bytes_async: - * @file: a #GFile - * @cancellable: (nullable): a #GCancellable or %NULL - * @callback: (scope async): a #GAsyncReadyCallback to call when the - * request is satisfied - * @user_data: (closure): the data to pass to callback function - * - * Asynchronously loads the contents of @file as #GBytes. + * g_file_poll_mountable: + * @file: input #GFile + * @cancellable: optional #GCancellable object, %NULL to ignore + * @callback: (nullable): a #GAsyncReadyCallback to call + * when the request is satisfied, or %NULL + * @user_data: the data to pass to callback function * - * If @file is a resource:// based URI, the resulting bytes will reference the - * embedded resource instead of a copy. Otherwise, this is equivalent to calling - * g_file_load_contents_async() and g_bytes_new_take(). + * Polls a file of type #G_FILE_TYPE_MOUNTABLE. * - * @callback should call g_file_load_bytes_finish() to get the result of this - * asynchronous operation. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * See g_file_load_bytes() for more information. + * When the operation is finished, @callback will be called. + * You can then call g_file_mount_mountable_finish() to get + * the result of the operation. * - * Since: 2.56 + * Since: 2.22 */ /** - * g_file_load_bytes_finish: - * @file: a #GFile - * @result: a #GAsyncResult provided to the callback - * @etag_out: (out) (nullable) (optional): a location to place the current - * entity tag for the file, or %NULL if the entity tag is not needed - * @error: a location for a #GError, or %NULL - * - * Completes an asynchronous request to g_file_load_bytes_async(). - * - * For resources, @etag_out will be set to %NULL. + * g_file_poll_mountable_finish: + * @file: input #GFile + * @result: a #GAsyncResult + * @error: a #GError, or %NULL * - * The data contained in the resulting #GBytes is always zero-terminated, but - * this is not included in the #GBytes length. The resulting #GBytes should be - * freed with g_bytes_unref() when no longer in use. + * Finishes a poll operation. See g_file_poll_mountable() for details. * - * See g_file_load_bytes() for more information. + * Finish an asynchronous poll operation that was polled + * with g_file_poll_mountable(). * - * Returns: (transfer full): a #GBytes or %NULL and @error is set - * Since: 2.56 + * Returns: %TRUE if the operation finished successfully. %FALSE + * otherwise. + * Since: 2.22 */ /** - * g_file_load_contents: - * @file: input #GFile + * g_file_query_default_handler: + * @file: a #GFile to open * @cancellable: optional #GCancellable object, %NULL to ignore - * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file - * @length: (out) (optional): a location to place the length of the contents of the file, - * or %NULL if the length is not needed - * @etag_out: (out) (optional): a location to place the current entity tag for the file, - * or %NULL if the entity tag is not needed * @error: a #GError, or %NULL * - * Loads the content of the file into memory. The data is always - * zero-terminated, but this is not included in the resultant @length. - * The returned @content should be freed with g_free() when no longer - * needed. + * Returns the #GAppInfo that is registered as the default + * application to handle the file specified by @file. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * Returns: %TRUE if the @file's contents were successfully loaded. - * %FALSE if there were errors. + * Returns: (transfer full): a #GAppInfo if the handle was found, + * %NULL if there were errors. + * When you are done with it, release it with g_object_unref() */ /** - * g_file_load_contents_async: - * @file: input #GFile + * g_file_query_default_handler_async: + * @file: a #GFile to open + * @io_priority: the [I/O priority][io-priority] of the request * @cancellable: optional #GCancellable object, %NULL to ignore - * @callback: a #GAsyncReadyCallback to call when the request is satisfied - * @user_data: the data to pass to callback function - * - * Starts an asynchronous load of the @file's contents. - * - * For more details, see g_file_load_contents() which is - * the synchronous version of this call. + * @callback: (nullable): a #GAsyncReadyCallback to call when the request is done + * @user_data: (nullable): data to pass to @callback * - * When the load operation has completed, @callback will be called - * with @user data. To finish the operation, call - * g_file_load_contents_finish() with the #GAsyncResult returned by - * the @callback. + * Async version of g_file_query_default_handler(). * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * Since: 2.60 */ /** - * g_file_load_contents_finish: - * @file: input #GFile - * @res: a #GAsyncResult - * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file - * @length: (out) (optional): a location to place the length of the contents of the file, - * or %NULL if the length is not needed - * @etag_out: (out) (optional): a location to place the current entity tag for the file, - * or %NULL if the entity tag is not needed - * @error: a #GError, or %NULL + * g_file_query_default_handler_finish: + * @file: a #GFile to open + * @result: a #GAsyncResult + * @error: (nullable): a #GError * - * Finishes an asynchronous load of the @file's contents. - * The contents are placed in @contents, and @length is set to the - * size of the @contents string. The @content should be freed with - * g_free() when no longer needed. If @etag_out is present, it will be - * set to the new entity tag for the @file. + * Finishes a g_file_query_default_handler_async() operation. * - * Returns: %TRUE if the load was successful. If %FALSE and @error is - * present, it will be set appropriately. + * Returns: (transfer full): a #GAppInfo if the handle was found, + * %NULL if there were errors. + * When you are done with it, release it with g_object_unref() + * Since: 2.60 */ /** - * g_file_load_partial_contents_async: (skip) + * g_file_query_exists: * @file: input #GFile - * @cancellable: optional #GCancellable object, %NULL to ignore - * @read_more_callback: (scope call) (closure user_data): a - * #GFileReadMoreCallback to receive partial data - * and to specify whether further data should be read - * @callback: (scope async) (closure user_data): a #GAsyncReadyCallback to call - * when the request is satisfied - * @user_data: the data to pass to the callback functions + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore * - * Reads the partial contents of a file. A #GFileReadMoreCallback should - * be used to stop reading from the file when appropriate, else this - * function will behave exactly as g_file_load_contents_async(). This - * operation can be finished by g_file_load_partial_contents_finish(). + * Utility function to check if a particular file exists. This is + * implemented using g_file_query_info() and as such does blocking I/O. * - * Users of this function should be aware that @user_data is passed to - * both the @read_more_callback and the @callback. + * Note that in many cases it is [racy to first check for file existence](https://en.wikipedia.org/wiki/Time_of_check_to_time_of_use) + * and then execute something based on the outcome of that, because the + * file might have been created or removed in between the operations. The + * general approach to handling that is to not check, but just do the + * operation and handle the errors as they come. * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * As an example of race-free checking, take the case of reading a file, + * and if it doesn't exist, creating it. There are two racy versions: read + * it, and on error create it; and: check if it exists, if not create it. + * These can both result in two processes creating the file (with perhaps + * a partially written file as the result). The correct approach is to + * always try to create the file with g_file_create() which will either + * atomically create the file or fail with a %G_IO_ERROR_EXISTS error. + * + * However, in many cases an existence check is useful in a user interface, + * for instance to make a menu item sensitive/insensitive, so that you don't + * have to fool users that something is possible and then just show an error + * dialog. If you do this, you should make sure to also handle the errors + * that can happen due to races when you execute the operation. + * + * Returns: %TRUE if the file exists (and can be detected without error), + * %FALSE otherwise (or if cancelled). */ /** - * g_file_load_partial_contents_finish: + * g_file_query_file_type: * @file: input #GFile - * @res: a #GAsyncResult - * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file - * @length: (out) (optional): a location to place the length of the contents of the file, - * or %NULL if the length is not needed - * @etag_out: (out) (optional): a location to place the current entity tag for the file, - * or %NULL if the entity tag is not needed - * @error: a #GError, or %NULL + * @flags: a set of #GFileQueryInfoFlags passed to g_file_query_info() + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore * - * Finishes an asynchronous partial load operation that was started - * with g_file_load_partial_contents_async(). The data is always - * zero-terminated, but this is not included in the resultant @length. - * The returned @content should be freed with g_free() when no longer - * needed. + * Utility function to inspect the #GFileType of a file. This is + * implemented using g_file_query_info() and as such does blocking I/O. * - * Returns: %TRUE if the load was successful. If %FALSE and @error is - * present, it will be set appropriately. + * The primary use case of this method is to check if a file is + * a regular file, directory, or symlink. + * + * Returns: The #GFileType of the file and #G_FILE_TYPE_UNKNOWN + * if the file does not exist + * Since: 2.18 */ /** - * g_file_make_directory: + * g_file_query_filesystem_info: * @file: input #GFile + * @attributes: an attribute query string * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore - * @error: a #GError, or %NULL + * @error: a #GError * - * Creates a directory. Note that this will only create a child directory - * of the immediate parent directory of the path or URI given by the #GFile. - * To recursively create directories, see g_file_make_directory_with_parents(). - * This function will fail if the parent directory does not exist, setting - * @error to %G_IO_ERROR_NOT_FOUND. If the file system doesn't support - * creating directories, this function will fail, setting @error to - * %G_IO_ERROR_NOT_SUPPORTED. + * Similar to g_file_query_info(), but obtains information + * about the filesystem the @file is on, rather than the file itself. + * For instance the amount of space available and the type of + * the filesystem. * - * For a local #GFile the newly created directory will have the default - * (current) ownership and permissions of the current process. + * The @attributes value is a string that specifies the attributes + * that should be gathered. It is not an error if it's not possible + * to read a particular requested attribute from a file - it just + * won't be set. @attributes should be a comma-separated list of + * attributes or attribute wildcards. The wildcard "*" means all + * attributes, and a wildcard like "filesystem::*" means all attributes + * in the filesystem namespace. The standard namespace for filesystem + * attributes is "filesystem". Common attributes of interest are + * #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem + * in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available), + * and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem). * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * If @cancellable is not %NULL, then the operation can be cancelled + * by triggering the cancellable object from another thread. If the + * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be + * returned. * - * Returns: %TRUE on successful creation, %FALSE otherwise. + * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will + * be returned. Other errors are possible too, and depend on what + * kind of filesystem the file is on. + * + * Returns: (transfer full): a #GFileInfo or %NULL if there was an error. + * Free the returned object with g_object_unref(). */ /** - * g_file_make_directory_async: (virtual make_directory_async) + * g_file_query_filesystem_info_async: * @file: input #GFile + * @attributes: an attribute query string * @io_priority: the [I/O priority][io-priority] of the request * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore - * @callback: a #GAsyncReadyCallback to call + * @callback: (scope async): a #GAsyncReadyCallback to call * when the request is satisfied - * @user_data: the data to pass to callback function + * @user_data: (closure): the data to pass to callback function * - * Asynchronously creates a directory. + * Asynchronously gets the requested information about the filesystem + * that the specified @file is on. The result is a #GFileInfo object + * that contains key-value attributes (such as type or size for the + * file). * - * Since: 2.38 + * For more details, see g_file_query_filesystem_info() which is the + * synchronous version of this call. + * + * When the operation is finished, @callback will be called. You can + * then call g_file_query_info_finish() to get the result of the + * operation. */ /** - * g_file_make_directory_finish: (virtual make_directory_finish) + * g_file_query_filesystem_info_finish: * @file: input #GFile - * @result: a #GAsyncResult - * @error: a #GError, or %NULL + * @res: a #GAsyncResult + * @error: a #GError * - * Finishes an asynchronous directory creation, started with - * g_file_make_directory_async(). + * Finishes an asynchronous filesystem info query. + * See g_file_query_filesystem_info_async(). * - * Returns: %TRUE on successful directory creation, %FALSE otherwise. - * Since: 2.38 + * Returns: (transfer full): #GFileInfo for given @file + * or %NULL on error. + * Free the returned object with g_object_unref(). */ /** - * g_file_make_directory_with_parents: + * g_file_query_info: * @file: input #GFile + * @attributes: an attribute query string + * @flags: a set of #GFileQueryInfoFlags * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore - * @error: a #GError, or %NULL + * @error: a #GError * - * Creates a directory and any parent directories that may not - * exist similar to 'mkdir -p'. If the file system does not support - * creating directories, this function will fail, setting @error to - * %G_IO_ERROR_NOT_SUPPORTED. If the directory itself already exists, - * this function will fail setting @error to %G_IO_ERROR_EXISTS, unlike - * the similar g_mkdir_with_parents(). + * Gets the requested information about specified @file. + * The result is a #GFileInfo object that contains key-value + * attributes (such as the type or size of the file). * - * For a local #GFile the newly created directories will have the default - * (current) ownership and permissions of the current process. + * The @attributes value is a string that specifies the file + * attributes that should be gathered. It is not an error if + * it's not possible to read a particular requested attribute + * from a file - it just won't be set. @attributes should be a + * comma-separated list of attributes or attribute wildcards. + * The wildcard "*" means all attributes, and a wildcard like + * "standard::*" means all attributes in the standard namespace. + * An example attribute query be "standard::*,owner::user". + * The standard attributes are available as defines, like + * #G_FILE_ATTRIBUTE_STANDARD_NAME. * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * If @cancellable is not %NULL, then the operation can be cancelled + * by triggering the cancellable object from another thread. If the + * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be + * returned. * - * Returns: %TRUE if all directories have been successfully created, %FALSE - * otherwise. - * Since: 2.18 + * For symlinks, normally the information about the target of the + * symlink is returned, rather than information about the symlink + * itself. However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS + * in @flags the information about the symlink itself will be returned. + * Also, for symlinks that point to non-existing files the information + * about the symlink itself will be returned. + * + * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be + * returned. Other errors are possible too, and depend on what kind of + * filesystem the file is on. + * + * Returns: (transfer full): a #GFileInfo for the given @file, or %NULL + * on error. Free the returned object with g_object_unref(). */ /** - * g_file_make_symbolic_link: - * @file: a #GFile with the name of the symlink to create - * @symlink_value: (type filename): a string with the path for the target - * of the new symlink + * g_file_query_info_async: + * @file: input #GFile + * @attributes: an attribute query string + * @flags: a set of #GFileQueryInfoFlags + * @io_priority: the [I/O priority][io-priority] of the request * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore - * @error: a #GError + * @callback: (scope async): a #GAsyncReadyCallback to call when the + * request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Creates a symbolic link named @file which contains the string - * @symlink_value. + * Asynchronously gets the requested information about specified @file. + * The result is a #GFileInfo object that contains key-value attributes + * (such as type or size for the file). * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * For more details, see g_file_query_info() which is the synchronous + * version of this call. * - * Returns: %TRUE on the creation of a new symlink, %FALSE otherwise. + * When the operation is finished, @callback will be called. You can + * then call g_file_query_info_finish() to get the result of the operation. */ /** - * g_file_measure_disk_usage: - * @file: a #GFile - * @flags: #GFileMeasureFlags - * @cancellable: (nullable): optional #GCancellable - * @progress_callback: (nullable): a #GFileMeasureProgressCallback - * @progress_data: user_data for @progress_callback - * @disk_usage: (out) (optional): the number of bytes of disk space used - * @num_dirs: (out) (optional): the number of directories encountered - * @num_files: (out) (optional): the number of non-directories encountered - * @error: (nullable): %NULL, or a pointer to a %NULL #GError pointer - * - * Recursively measures the disk usage of @file. - * - * This is essentially an analog of the 'du' command, but it also - * reports the number of directories and non-directory files encountered - * (including things like symbolic links). - * - * By default, errors are only reported against the toplevel file - * itself. Errors found while recursing are silently ignored, unless - * %G_FILE_DISK_USAGE_REPORT_ALL_ERRORS is given in @flags. - * - * The returned size, @disk_usage, is in bytes and should be formatted - * with g_format_size() in order to get something reasonable for showing - * in a user interface. + * g_file_query_info_finish: + * @file: input #GFile + * @res: a #GAsyncResult + * @error: a #GError * - * @progress_callback and @progress_data can be given to request - * periodic progress updates while scanning. See the documentation for - * #GFileMeasureProgressCallback for information about when and how the - * callback will be invoked. + * Finishes an asynchronous file info query. + * See g_file_query_info_async(). * - * Returns: %TRUE if successful, with the out parameters set. - * %FALSE otherwise, with @error set. - * Since: 2.38 + * Returns: (transfer full): #GFileInfo for given @file + * or %NULL on error. Free the returned object with + * g_object_unref(). */ /** - * g_file_measure_disk_usage_async: - * @file: a #GFile - * @flags: #GFileMeasureFlags - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable - * @progress_callback: (nullable): a #GFileMeasureProgressCallback - * @progress_data: user_data for @progress_callback - * @callback: (nullable): a #GAsyncReadyCallback to call when complete - * @user_data: the data to pass to callback function - * - * Recursively measures the disk usage of @file. + * g_file_query_settable_attributes: + * @file: input #GFile + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @error: a #GError, or %NULL * - * This is the asynchronous version of g_file_measure_disk_usage(). See - * there for more information. + * Obtain the list of settable attributes for the file. * - * Since: 2.38 - */ - - -/** - * g_file_measure_disk_usage_finish: - * @file: a #GFile - * @result: the #GAsyncResult passed to your #GAsyncReadyCallback - * @disk_usage: (out) (optional): the number of bytes of disk space used - * @num_dirs: (out) (optional): the number of directories encountered - * @num_files: (out) (optional): the number of non-directories encountered - * @error: (nullable): %NULL, or a pointer to a %NULL #GError pointer + * Returns the type and full attribute name of all the attributes + * that can be set on this file. This doesn't mean setting it will + * always succeed though, you might get an access failure, or some + * specific file may not support a specific attribute. * - * Collects the results from an earlier call to - * g_file_measure_disk_usage_async(). See g_file_measure_disk_usage() for - * more information. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * Returns: %TRUE if successful, with the out parameters set. - * %FALSE otherwise, with @error set. - * Since: 2.38 + * Returns: a #GFileAttributeInfoList describing the settable attributes. + * When you are done with it, release it with + * g_file_attribute_info_list_unref() */ /** - * g_file_monitor: + * g_file_query_writable_namespaces: * @file: input #GFile - * @flags: a set of #GFileMonitorFlags * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore * @error: a #GError, or %NULL * - * Obtains a file or directory monitor for the given file, - * depending on the type of the file. + * Obtain the list of attribute namespaces where new attributes + * can be created by a user. An example of this is extended + * attributes (in the "xattr" namespace). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * Returns: (transfer full): a #GFileMonitor for the given @file, - * or %NULL on error. - * Free the returned object with g_object_unref(). - * Since: 2.18 + * Returns: a #GFileAttributeInfoList describing the writable namespaces. + * When you are done with it, release it with + * g_file_attribute_info_list_unref() */ /** - * g_file_monitor_cancel: - * @monitor: a #GFileMonitor. + * g_file_read: (virtual read_fn) + * @file: #GFile to read + * @cancellable: (nullable): a #GCancellable + * @error: a #GError, or %NULL * - * Cancels a file monitor. + * Opens a file for reading. The result is a #GFileInputStream that + * can be used to read the contents of the file. * - * Returns: always %TRUE + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * + * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be + * returned. If the file is a directory, the %G_IO_ERROR_IS_DIRECTORY + * error will be returned. Other errors are possible too, and depend + * on what kind of filesystem the file is on. + * + * Returns: (transfer full): #GFileInputStream or %NULL on error. + * Free the returned object with g_object_unref(). */ /** - * g_file_monitor_directory: (virtual monitor_dir) + * g_file_read_async: * @file: input #GFile - * @flags: a set of #GFileMonitorFlags + * @io_priority: the [I/O priority][io-priority] of the request * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore - * @error: a #GError, or %NULL - * - * Obtains a directory monitor for the given file. - * This may fail if directory monitoring is not supported. + * @callback: (scope async): a #GAsyncReadyCallback to call + * when the request is satisfied + * @user_data: (closure): the data to pass to callback function * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * Asynchronously opens @file for reading. * - * It does not make sense for @flags to contain - * %G_FILE_MONITOR_WATCH_HARD_LINKS, since hard links can not be made to - * directories. It is not possible to monitor all the files in a - * directory for changes made via hard links; if you want to do this then - * you must register individual watches with g_file_monitor(). + * For more details, see g_file_read() which is + * the synchronous version of this call. * - * Returns: (transfer full): a #GFileMonitor for the given @file, - * or %NULL on error. - * Free the returned object with g_object_unref(). + * When the operation is finished, @callback will be called. + * You can then call g_file_read_finish() to get the result + * of the operation. */ /** - * g_file_monitor_emit_event: - * @monitor: a #GFileMonitor. - * @child: a #GFile. - * @other_file: a #GFile. - * @event_type: a set of #GFileMonitorEvent flags. + * g_file_read_finish: + * @file: input #GFile + * @res: a #GAsyncResult + * @error: a #GError, or %NULL * - * Emits the #GFileMonitor::changed signal if a change - * has taken place. Should be called from file monitor - * implementations only. + * Finishes an asynchronous file read operation started with + * g_file_read_async(). * - * Implementations are responsible to call this method from the - * [thread-default main context][g-main-context-push-thread-default] of the - * thread that the monitor was created in. + * Returns: (transfer full): a #GFileInputStream or %NULL on error. + * Free the returned object with g_object_unref(). */ /** - * g_file_monitor_file: + * g_file_replace: * @file: input #GFile - * @flags: a set of #GFileMonitorFlags + * @etag: (nullable): an optional [entity tag][gfile-etag] + * for the current #GFile, or #NULL to ignore + * @make_backup: %TRUE if a backup should be created + * @flags: a set of #GFileCreateFlags * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore * @error: a #GError, or %NULL * - * Obtains a file monitor for the given file. If no file notification - * mechanism exists, then regular polling of the file is used. - * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. - * - * If @flags contains %G_FILE_MONITOR_WATCH_HARD_LINKS then the monitor - * will also attempt to report changes made to the file via another - * filename (ie, a hard link). Without this flag, you can only rely on - * changes made through the filename contained in @file to be - * reported. Using this flag may result in an increase in resource - * usage, and may not have any effect depending on the #GFileMonitor - * backend and/or filesystem type. - * - * Returns: (transfer full): a #GFileMonitor for the given @file, - * or %NULL on error. - * Free the returned object with g_object_unref(). - */ - - -/** - * g_file_monitor_is_cancelled: - * @monitor: a #GFileMonitor - * - * Returns whether the monitor is canceled. + * Returns an output stream for overwriting the file, possibly + * creating a backup copy of the file first. If the file doesn't exist, + * it will be created. * - * Returns: %TRUE if monitor is canceled. %FALSE otherwise. - */ - - -/** - * g_file_monitor_set_rate_limit: - * @monitor: a #GFileMonitor. - * @limit_msecs: a non-negative integer with the limit in milliseconds - * to poll for changes + * This will try to replace the file in the safest way possible so + * that any errors during the writing will not affect an already + * existing copy of the file. For instance, for local files it + * may write to a temporary file and then atomically rename over + * the destination when the stream is closed. * - * Sets the rate limit to which the @monitor will report - * consecutive change events to the same file. - */ - - -/** - * g_file_mount_enclosing_volume: - * @location: input #GFile - * @flags: flags affecting the operation - * @mount_operation: (nullable): a #GMountOperation - * or %NULL to avoid user interaction - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @callback: (nullable): a #GAsyncReadyCallback to call - * when the request is satisfied, or %NULL - * @user_data: the data to pass to callback function + * By default files created are generally readable by everyone, + * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file + * will be made readable only to the current user, to the level that + * is supported on the target filesystem. * - * Starts a @mount_operation, mounting the volume that contains - * the file @location. + * If @cancellable is not %NULL, then the operation can be cancelled + * by triggering the cancellable object from another thread. If the + * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be + * returned. * - * When this operation has completed, @callback will be called with - * @user_user data, and the operation can be finalized with - * g_file_mount_enclosing_volume_finish(). + * If you pass in a non-%NULL @etag value and @file already exists, then + * this value is compared to the current entity tag of the file, and if + * they differ an %G_IO_ERROR_WRONG_ETAG error is returned. This + * generally means that the file has been changed since you last read + * it. You can get the new etag from g_file_output_stream_get_etag() + * after you've finished writing and closed the #GFileOutputStream. When + * you load a new file you can use g_file_input_stream_query_info() to + * get the etag of the file. * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. - */ - - -/** - * g_file_mount_enclosing_volume_finish: - * @location: input #GFile - * @result: a #GAsyncResult - * @error: a #GError, or %NULL + * If @make_backup is %TRUE, this function will attempt to make a + * backup of the current file before overwriting it. If this fails + * a %G_IO_ERROR_CANT_CREATE_BACKUP error will be returned. If you + * want to replace anyway, try again with @make_backup set to %FALSE. * - * Finishes a mount operation started by g_file_mount_enclosing_volume(). + * If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will + * be returned, and if the file is some other form of non-regular file + * then a %G_IO_ERROR_NOT_REGULAR_FILE error will be returned. Some + * file systems don't allow all file names, and may return an + * %G_IO_ERROR_INVALID_FILENAME error, and if the name is to long + * %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors are + * possible too, and depend on what kind of filesystem the file is on. * - * Returns: %TRUE if successful. If an error has occurred, - * this function will return %FALSE and set @error - * appropriately if present. + * Returns: (transfer full): a #GFileOutputStream or %NULL on error. + * Free the returned object with g_object_unref(). */ /** - * g_file_mount_mountable: + * g_file_replace_async: * @file: input #GFile - * @flags: flags affecting the operation - * @mount_operation: (nullable): a #GMountOperation, - * or %NULL to avoid user interaction + * @etag: (nullable): an [entity tag][gfile-etag] for the current #GFile, + * or %NULL to ignore + * @make_backup: %TRUE if a backup should be created + * @flags: a set of #GFileCreateFlags + * @io_priority: the [I/O priority][io-priority] of the request * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore - * @callback: (scope async) (nullable): a #GAsyncReadyCallback to call - * when the request is satisfied, or %NULL + * @callback: (scope async): a #GAsyncReadyCallback to call + * when the request is satisfied * @user_data: (closure): the data to pass to callback function * - * Mounts a file of type G_FILE_TYPE_MOUNTABLE. - * Using @mount_operation, you can request callbacks when, for instance, - * passwords are needed during authentication. + * Asynchronously overwrites the file, replacing the contents, + * possibly creating a backup copy of the file first. * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * For more details, see g_file_replace() which is + * the synchronous version of this call. * * When the operation is finished, @callback will be called. - * You can then call g_file_mount_mountable_finish() to get - * the result of the operation. + * You can then call g_file_replace_finish() to get the result + * of the operation. */ /** - * g_file_mount_mountable_finish: + * g_file_replace_contents: * @file: input #GFile - * @result: a #GAsyncResult + * @contents: (element-type guint8) (array length=length): a string containing the new contents for @file + * @length: the length of @contents in bytes + * @etag: (nullable): the old [entity-tag][gfile-etag] for the document, + * or %NULL + * @make_backup: %TRUE if a backup should be created + * @flags: a set of #GFileCreateFlags + * @new_etag: (out) (optional): a location to a new [entity tag][gfile-etag] + * for the document. This should be freed with g_free() when no longer + * needed, or %NULL + * @cancellable: optional #GCancellable object, %NULL to ignore * @error: a #GError, or %NULL * - * Finishes a mount operation. See g_file_mount_mountable() for details. - * - * Finish an asynchronous mount operation that was started - * with g_file_mount_mountable(). - * - * Returns: (transfer full): a #GFile or %NULL on error. - * Free the returned object with g_object_unref(). - */ - - -/** - * g_file_move: - * @source: #GFile pointing to the source location - * @destination: #GFile pointing to the destination location - * @flags: set of #GFileCopyFlags - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @progress_callback: (nullable) (scope call): #GFileProgressCallback - * function for updates - * @progress_callback_data: (closure): gpointer to user data for - * the callback function - * @error: #GError for returning error conditions, or %NULL - * - * Tries to move the file or directory @source to the location specified - * by @destination. If native move operations are supported then this is - * used, otherwise a copy + delete fallback is used. The native - * implementation may support moving directories (for instance on moves - * inside the same filesystem), but the fallback code does not. + * Replaces the contents of @file with @contents of @length bytes. * - * If the flag #G_FILE_COPY_OVERWRITE is specified an already - * existing @destination file is overwritten. + * If @etag is specified (not %NULL), any existing file must have that etag, + * or the error %G_IO_ERROR_WRONG_ETAG will be returned. * - * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks - * will be copied as symlinks, otherwise the target of the - * @source symlink will be copied. + * If @make_backup is %TRUE, this function will attempt to make a backup + * of @file. Internally, it uses g_file_replace(), so will try to replace the + * file contents in the safest way possible. For example, atomic renames are + * used when replacing local files’ contents. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * If @progress_callback is not %NULL, then the operation can be monitored - * by setting this to a #GFileProgressCallback function. - * @progress_callback_data will be passed to this function. It is - * guaranteed that this callback will be called after all data has been - * transferred with the total number of bytes copied during the operation. - * - * If the @source file does not exist, then the %G_IO_ERROR_NOT_FOUND - * error is returned, independent on the status of the @destination. - * - * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, - * then the error %G_IO_ERROR_EXISTS is returned. - * - * If trying to overwrite a file over a directory, the %G_IO_ERROR_IS_DIRECTORY - * error is returned. If trying to overwrite a directory with a directory the - * %G_IO_ERROR_WOULD_MERGE error is returned. - * - * If the source is a directory and the target does not exist, or - * #G_FILE_COPY_OVERWRITE is specified and the target is a file, then - * the %G_IO_ERROR_WOULD_RECURSE error may be returned (if the native - * move operation isn't available). + * The returned @new_etag can be used to verify that the file hasn't + * changed the next time it is saved over. * - * Returns: %TRUE on successful move, %FALSE otherwise. + * Returns: %TRUE if successful. If an error has occurred, this function + * will return %FALSE and set @error appropriately if present. */ /** - * g_file_new_build_filename: - * @first_element: (type filename): the first element in the path - * @...: remaining elements in path, terminated by %NULL - * - * Constructs a #GFile from a series of elements using the correct - * separator for filenames. + * g_file_replace_contents_async: + * @file: input #GFile + * @contents: (element-type guint8) (array length=length): string of contents to replace the file with + * @length: the length of @contents in bytes + * @etag: (nullable): a new [entity tag][gfile-etag] for the @file, or %NULL + * @make_backup: %TRUE if a backup should be created + * @flags: a set of #GFileCreateFlags + * @cancellable: optional #GCancellable object, %NULL to ignore + * @callback: a #GAsyncReadyCallback to call when the request is satisfied + * @user_data: the data to pass to callback function * - * Using this function is equivalent to calling g_build_filename(), - * followed by g_file_new_for_path() on the result. + * Starts an asynchronous replacement of @file with the given + * @contents of @length bytes. @etag will replace the document's + * current entity tag. * - * Returns: (transfer full): a new #GFile - * Since: 2.56 - */ - - -/** - * g_file_new_for_commandline_arg: - * @arg: (type filename): a command line string + * When this operation has completed, @callback will be called with + * @user_user data, and the operation can be finalized with + * g_file_replace_contents_finish(). * - * Creates a #GFile with the given argument from the command line. - * The value of @arg can be either a URI, an absolute path or a - * relative path resolved relative to the current working directory. - * This operation never fails, but the returned object might not - * support any I/O operation if @arg points to a malformed path. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * Note that on Windows, this function expects its argument to be in - * UTF-8 -- not the system code page. This means that you - * should not use this function with string from argv as it is passed - * to main(). g_win32_get_command_line() will return a UTF-8 version of - * the commandline. #GApplication also uses UTF-8 but - * g_application_command_line_create_file_for_arg() may be more useful - * for you there. It is also always possible to use this function with - * #GOptionContext arguments of type %G_OPTION_ARG_FILENAME. + * If @make_backup is %TRUE, this function will attempt to + * make a backup of @file. * - * Returns: (transfer full): a new #GFile. - * Free the returned object with g_object_unref(). + * Note that no copy of @contents will be made, so it must stay valid + * until @callback is called. See g_file_replace_contents_bytes_async() + * for a #GBytes version that will automatically hold a reference to the + * contents (without copying) for the duration of the call. */ /** - * g_file_new_for_commandline_arg_and_cwd: - * @arg: (type filename): a command line string - * @cwd: (type filename): the current working directory of the commandline - * - * Creates a #GFile with the given argument from the command line. - * - * This function is similar to g_file_new_for_commandline_arg() except - * that it allows for passing the current working directory as an - * argument instead of using the current working directory of the - * process. - * - * This is useful if the commandline argument was given in a context - * other than the invocation of the current process. - * - * See also g_application_command_line_create_file_for_arg(). + * g_file_replace_contents_bytes_async: + * @file: input #GFile + * @contents: a #GBytes + * @etag: (nullable): a new [entity tag][gfile-etag] for the @file, or %NULL + * @make_backup: %TRUE if a backup should be created + * @flags: a set of #GFileCreateFlags + * @cancellable: optional #GCancellable object, %NULL to ignore + * @callback: a #GAsyncReadyCallback to call when the request is satisfied + * @user_data: the data to pass to callback function * - * Returns: (transfer full): a new #GFile - * Since: 2.36 - */ - - -/** - * g_file_new_for_path: - * @path: (type filename): a string containing a relative or absolute path. - * The string must be encoded in the glib filename encoding. + * Same as g_file_replace_contents_async() but takes a #GBytes input instead. + * This function will keep a ref on @contents until the operation is done. + * Unlike g_file_replace_contents_async() this allows forgetting about the + * content without waiting for the callback. * - * Constructs a #GFile for a given path. This operation never - * fails, but the returned object might not support any I/O - * operation if @path is malformed. + * When this operation has completed, @callback will be called with + * @user_user data, and the operation can be finalized with + * g_file_replace_contents_finish(). * - * Returns: (transfer full): a new #GFile for the given @path. - * Free the returned object with g_object_unref(). + * Since: 2.40 */ /** - * g_file_new_for_uri: - * @uri: a UTF-8 string containing a URI + * g_file_replace_contents_finish: + * @file: input #GFile + * @res: a #GAsyncResult + * @new_etag: (out) (optional): a location of a new [entity tag][gfile-etag] + * for the document. This should be freed with g_free() when it is no + * longer needed, or %NULL + * @error: a #GError, or %NULL * - * Constructs a #GFile for a given URI. This operation never - * fails, but the returned object might not support any I/O - * operation if @uri is malformed or if the uri type is - * not supported. + * Finishes an asynchronous replace of the given @file. See + * g_file_replace_contents_async(). Sets @new_etag to the new entity + * tag for the document, if present. * - * Returns: (transfer full): a new #GFile for the given @uri. - * Free the returned object with g_object_unref(). + * Returns: %TRUE on success, %FALSE on failure. */ /** - * g_file_new_tmp: - * @tmpl: (type filename) (nullable): Template for the file - * name, as in g_file_open_tmp(), or %NULL for a default template - * @iostream: (out): on return, a #GFileIOStream for the created file + * g_file_replace_finish: + * @file: input #GFile + * @res: a #GAsyncResult * @error: a #GError, or %NULL * - * Opens a file in the preferred directory for temporary files (as - * returned by g_get_tmp_dir()) and returns a #GFile and - * #GFileIOStream pointing to it. - * - * @tmpl should be a string in the GLib file name encoding - * containing a sequence of six 'X' characters, and containing no - * directory components. If it is %NULL, a default template is used. - * - * Unlike the other #GFile constructors, this will return %NULL if - * a temporary file could not be created. + * Finishes an asynchronous file replace operation started with + * g_file_replace_async(). * - * Returns: (transfer full): a new #GFile. + * Returns: (transfer full): a #GFileOutputStream, or %NULL on error. * Free the returned object with g_object_unref(). - * Since: 2.32 */ /** - * g_file_open_readwrite: - * @file: #GFile to open - * @cancellable: (nullable): a #GCancellable - * @error: a #GError, or %NULL + * g_file_replace_readwrite: + * @file: a #GFile + * @etag: (nullable): an optional [entity tag][gfile-etag] + * for the current #GFile, or #NULL to ignore + * @make_backup: %TRUE if a backup should be created + * @flags: a set of #GFileCreateFlags + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @error: return location for a #GError, or %NULL * - * Opens an existing file for reading and writing. The result is - * a #GFileIOStream that can be used to read and write the contents - * of the file. + * Returns an output stream for overwriting the file in readwrite mode, + * possibly creating a backup copy of the file first. If the file doesn't + * exist, it will be created. * - * If @cancellable is not %NULL, then the operation can be cancelled - * by triggering the cancellable object from another thread. If the - * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be - * returned. + * For details about the behaviour, see g_file_replace() which does the + * same thing but returns an output stream only. * - * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will - * be returned. If the file is a directory, the %G_IO_ERROR_IS_DIRECTORY - * error will be returned. Other errors are possible too, and depend on - * what kind of filesystem the file is on. Note that in many non-local - * file cases read and write streams are not supported, so make sure you - * really need to do read and write streaming, rather than just opening - * for reading or writing. + * Note that in many non-local file cases read and write streams are not + * supported, so make sure you really need to do read and write streaming, + * rather than just opening for reading or writing. * - * Returns: (transfer full): #GFileIOStream or %NULL on error. + * Returns: (transfer full): a #GFileIOStream or %NULL on error. * Free the returned object with g_object_unref(). * Since: 2.22 */ /** - * g_file_open_readwrite_async: + * g_file_replace_readwrite_async: * @file: input #GFile + * @etag: (nullable): an [entity tag][gfile-etag] for the current #GFile, + * or %NULL to ignore + * @make_backup: %TRUE if a backup should be created + * @flags: a set of #GFileCreateFlags * @io_priority: the [I/O priority][io-priority] of the request * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore @@ -25279,13 +24703,15 @@ * when the request is satisfied * @user_data: (closure): the data to pass to callback function * - * Asynchronously opens @file for reading and writing. + * Asynchronously overwrites the file in read-write mode, + * replacing the contents, possibly creating a backup copy + * of the file first. * - * For more details, see g_file_open_readwrite() which is + * For more details, see g_file_replace_readwrite() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. - * You can then call g_file_open_readwrite_finish() to get + * You can then call g_file_replace_readwrite_finish() to get * the result of the operation. * * Since: 2.22 @@ -25293,277 +24719,286 @@ /** - * g_file_open_readwrite_finish: + * g_file_replace_readwrite_finish: * @file: input #GFile * @res: a #GAsyncResult * @error: a #GError, or %NULL * - * Finishes an asynchronous file read operation started with - * g_file_open_readwrite_async(). + * Finishes an asynchronous file replace operation started with + * g_file_replace_readwrite_async(). * - * Returns: (transfer full): a #GFileIOStream or %NULL on error. + * Returns: (transfer full): a #GFileIOStream, or %NULL on error. * Free the returned object with g_object_unref(). * Since: 2.22 */ /** - * g_file_output_stream_get_etag: - * @stream: a #GFileOutputStream. + * g_file_resolve_relative_path: + * @file: input #GFile + * @relative_path: (type filename): a given relative path string * - * Gets the entity tag for the file when it has been written. - * This must be called after the stream has been written - * and closed, as the etag can change while writing. + * Resolves a relative path for @file to an absolute path. * - * Returns: the entity tag for the stream. + * This call does no blocking I/O. + * + * Returns: (transfer full): #GFile to the resolved path. + * %NULL if @relative_path is %NULL or if @file is invalid. + * Free the returned object with g_object_unref(). */ /** - * g_file_output_stream_query_info: - * @stream: a #GFileOutputStream. - * @attributes: a file attribute query string. - * @cancellable: optional #GCancellable object, %NULL to ignore. - * @error: a #GError, %NULL to ignore. + * g_file_set_attribute: + * @file: input #GFile + * @attribute: a string containing the attribute's name + * @type: The type of the attribute + * @value_p: (nullable): a pointer to the value (or the pointer + * itself if the type is a pointer type) + * @flags: a set of #GFileQueryInfoFlags + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @error: a #GError, or %NULL * - * Queries a file output stream for the given @attributes. - * This function blocks while querying the stream. For the asynchronous - * version of this function, see g_file_output_stream_query_info_async(). - * While the stream is blocked, the stream will set the pending flag - * internally, and any other operations on the stream will fail with - * %G_IO_ERROR_PENDING. + * Sets an attribute in the file with attribute name @attribute to @value_p. * - * Can fail if the stream was already closed (with @error being set to - * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being - * set to %G_IO_ERROR_PENDING), or if querying info is not supported for - * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In - * all cases of failure, %NULL will be returned. + * Some attributes can be unset by setting @type to + * %G_FILE_ATTRIBUTE_TYPE_INVALID and @value_p to %NULL. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will - * be returned. + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error. + * Returns: %TRUE if the attribute was set, %FALSE otherwise. */ /** - * g_file_output_stream_query_info_async: - * @stream: a #GFileOutputStream. - * @attributes: a file attribute query string. - * @io_priority: the [I/O priority][gio-GIOScheduler] of the request - * @cancellable: optional #GCancellable object, %NULL to ignore. - * @callback: callback to call when the request is satisfied - * @user_data: the data to pass to callback function - * - * Asynchronously queries the @stream for a #GFileInfo. When completed, - * @callback will be called with a #GAsyncResult which can be used to - * finish the operation with g_file_output_stream_query_info_finish(). + * g_file_set_attribute_byte_string: + * @file: input #GFile + * @attribute: a string containing the attribute's name + * @value: a string containing the attribute's new value + * @flags: a #GFileQueryInfoFlags + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @error: a #GError, or %NULL * - * For the synchronous version of this function, see - * g_file_output_stream_query_info(). - */ - - -/** - * g_file_output_stream_query_info_finish: - * @stream: a #GFileOutputStream. - * @result: a #GAsyncResult. - * @error: a #GError, %NULL to ignore. + * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value. + * If @attribute is of a different type, this operation will fail, + * returning %FALSE. * - * Finalizes the asynchronous query started - * by g_file_output_stream_query_info_async(). + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * Returns: (transfer full): A #GFileInfo for the finished query. + * Returns: %TRUE if the @attribute was successfully set to @value + * in the @file, %FALSE otherwise. */ /** - * g_file_parse_name: - * @parse_name: a file name or path to be parsed + * g_file_set_attribute_int32: + * @file: input #GFile + * @attribute: a string containing the attribute's name + * @value: a #gint32 containing the attribute's new value + * @flags: a #GFileQueryInfoFlags + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @error: a #GError, or %NULL * - * Constructs a #GFile with the given @parse_name (i.e. something - * given by g_file_get_parse_name()). This operation never fails, - * but the returned object might not support any I/O operation if - * the @parse_name cannot be parsed. + * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value. + * If @attribute is of a different type, this operation will fail. * - * Returns: (transfer full): a new #GFile. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * + * Returns: %TRUE if the @attribute was successfully set to @value + * in the @file, %FALSE otherwise. */ /** - * g_file_peek_path: + * g_file_set_attribute_int64: * @file: input #GFile + * @attribute: a string containing the attribute's name + * @value: a #guint64 containing the attribute's new value + * @flags: a #GFileQueryInfoFlags + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @error: a #GError, or %NULL * - * Exactly like g_file_get_path(), but caches the result via - * g_object_set_qdata_full(). This is useful for example in C - * applications which mix `g_file_*` APIs with native ones. It - * also avoids an extra duplicated string when possible, so will be - * generally more efficient. + * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value. + * If @attribute is of a different type, this operation will fail. * - * This call does no blocking I/O. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * Returns: (type filename) (nullable): string containing the #GFile's path, - * or %NULL if no such path exists. The returned string is owned by @file. - * Since: 2.56 + * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise. */ /** - * g_file_poll_mountable: + * g_file_set_attribute_string: * @file: input #GFile - * @cancellable: optional #GCancellable object, %NULL to ignore - * @callback: (nullable): a #GAsyncReadyCallback to call - * when the request is satisfied, or %NULL - * @user_data: the data to pass to callback function + * @attribute: a string containing the attribute's name + * @value: a string containing the attribute's value + * @flags: #GFileQueryInfoFlags + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore + * @error: a #GError, or %NULL * - * Polls a file of type #G_FILE_TYPE_MOUNTABLE. + * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value. + * If @attribute is of a different type, this operation will fail. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * When the operation is finished, @callback will be called. - * You can then call g_file_mount_mountable_finish() to get - * the result of the operation. - * - * Since: 2.22 + * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise. */ /** - * g_file_poll_mountable_finish: + * g_file_set_attribute_uint32: * @file: input #GFile - * @result: a #GAsyncResult + * @attribute: a string containing the attribute's name + * @value: a #guint32 containing the attribute's new value + * @flags: a #GFileQueryInfoFlags + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore * @error: a #GError, or %NULL * - * Finishes a poll operation. See g_file_poll_mountable() for details. + * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value. + * If @attribute is of a different type, this operation will fail. * - * Finish an asynchronous poll operation that was polled - * with g_file_poll_mountable(). + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * Returns: %TRUE if the operation finished successfully. %FALSE - * otherwise. - * Since: 2.22 + * Returns: %TRUE if the @attribute was successfully set to @value + * in the @file, %FALSE otherwise. */ /** - * g_file_query_default_handler: - * @file: a #GFile to open - * @cancellable: optional #GCancellable object, %NULL to ignore + * g_file_set_attribute_uint64: + * @file: input #GFile + * @attribute: a string containing the attribute's name + * @value: a #guint64 containing the attribute's new value + * @flags: a #GFileQueryInfoFlags + * @cancellable: (nullable): optional #GCancellable object, + * %NULL to ignore * @error: a #GError, or %NULL * - * Returns the #GAppInfo that is registered as the default - * application to handle the file specified by @file. + * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value. + * If @attribute is of a different type, this operation will fail. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * Returns: (transfer full): a #GAppInfo if the handle was found, - * %NULL if there were errors. - * When you are done with it, release it with g_object_unref() + * Returns: %TRUE if the @attribute was successfully set to @value + * in the @file, %FALSE otherwise. */ /** - * g_file_query_exists: + * g_file_set_attributes_async: * @file: input #GFile + * @info: a #GFileInfo + * @flags: a #GFileQueryInfoFlags + * @io_priority: the [I/O priority][io-priority] of the request * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore + * @callback: (scope async): a #GAsyncReadyCallback + * @user_data: (closure): a #gpointer * - * Utility function to check if a particular file exists. This is - * implemented using g_file_query_info() and as such does blocking I/O. + * Asynchronously sets the attributes of @file with @info. * - * Note that in many cases it is [racy to first check for file existence](https://en.wikipedia.org/wiki/Time_of_check_to_time_of_use) - * and then execute something based on the outcome of that, because the - * file might have been created or removed in between the operations. The - * general approach to handling that is to not check, but just do the - * operation and handle the errors as they come. + * For more details, see g_file_set_attributes_from_info(), + * which is the synchronous version of this call. * - * As an example of race-free checking, take the case of reading a file, - * and if it doesn't exist, creating it. There are two racy versions: read - * it, and on error create it; and: check if it exists, if not create it. - * These can both result in two processes creating the file (with perhaps - * a partially written file as the result). The correct approach is to - * always try to create the file with g_file_create() which will either - * atomically create the file or fail with a %G_IO_ERROR_EXISTS error. + * When the operation is finished, @callback will be called. + * You can then call g_file_set_attributes_finish() to get + * the result of the operation. + */ + + +/** + * g_file_set_attributes_finish: + * @file: input #GFile + * @result: a #GAsyncResult + * @info: (out) (transfer full): a #GFileInfo + * @error: a #GError, or %NULL * - * However, in many cases an existence check is useful in a user interface, - * for instance to make a menu item sensitive/insensitive, so that you don't - * have to fool users that something is possible and then just show an error - * dialog. If you do this, you should make sure to also handle the errors - * that can happen due to races when you execute the operation. + * Finishes setting an attribute started in g_file_set_attributes_async(). * - * Returns: %TRUE if the file exists (and can be detected without error), - * %FALSE otherwise (or if cancelled). + * Returns: %TRUE if the attributes were set correctly, %FALSE otherwise. */ /** - * g_file_query_file_type: + * g_file_set_attributes_from_info: * @file: input #GFile - * @flags: a set of #GFileQueryInfoFlags passed to g_file_query_info() + * @info: a #GFileInfo + * @flags: #GFileQueryInfoFlags * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore + * @error: a #GError, or %NULL * - * Utility function to inspect the #GFileType of a file. This is - * implemented using g_file_query_info() and as such does blocking I/O. + * Tries to set all attributes in the #GFileInfo on the target + * values, not stopping on the first error. * - * The primary use case of this method is to check if a file is - * a regular file, directory, or symlink. + * If there is any error during this operation then @error will + * be set to the first error. Error on particular fields are flagged + * by setting the "status" field in the attribute value to + * %G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can + * also detect further errors. * - * Returns: The #GFileType of the file and #G_FILE_TYPE_UNKNOWN - * if the file does not exist - * Since: 2.18 + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * + * Returns: %FALSE if there was any error, %TRUE otherwise. */ /** - * g_file_query_filesystem_info: + * g_file_set_display_name: * @file: input #GFile - * @attributes: an attribute query string + * @display_name: a string * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore - * @error: a #GError + * @error: a #GError, or %NULL * - * Similar to g_file_query_info(), but obtains information - * about the filesystem the @file is on, rather than the file itself. - * For instance the amount of space available and the type of - * the filesystem. + * Renames @file to the specified display name. * - * The @attributes value is a string that specifies the attributes - * that should be gathered. It is not an error if it's not possible - * to read a particular requested attribute from a file - it just - * won't be set. @attributes should be a comma-separated list of - * attributes or attribute wildcards. The wildcard "*" means all - * attributes, and a wildcard like "filesystem::*" means all attributes - * in the filesystem namespace. The standard namespace for filesystem - * attributes is "filesystem". Common attributes of interest are - * #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem - * in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available), - * and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem). + * The display name is converted from UTF-8 to the correct encoding + * for the target filesystem if possible and the @file is renamed to this. * - * If @cancellable is not %NULL, then the operation can be cancelled - * by triggering the cancellable object from another thread. If the - * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be - * returned. + * If you want to implement a rename operation in the user interface the + * edit name (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the + * initial value in the rename widget, and then the result after editing + * should be passed to g_file_set_display_name(). * - * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will - * be returned. Other errors are possible too, and depend on what - * kind of filesystem the file is on. + * On success the resulting converted filename is returned. * - * Returns: (transfer full): a #GFileInfo or %NULL if there was an error. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * + * Returns: (transfer full): a #GFile specifying what @file was renamed to, + * or %NULL if there was an error. * Free the returned object with g_object_unref(). */ /** - * g_file_query_filesystem_info_async: + * g_file_set_display_name_async: * @file: input #GFile - * @attributes: an attribute query string + * @display_name: a string * @io_priority: the [I/O priority][io-priority] of the request * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore @@ -25571,3510 +25006,3480 @@ * when the request is satisfied * @user_data: (closure): the data to pass to callback function * - * Asynchronously gets the requested information about the filesystem - * that the specified @file is on. The result is a #GFileInfo object - * that contains key-value attributes (such as type or size for the - * file). + * Asynchronously sets the display name for a given #GFile. * - * For more details, see g_file_query_filesystem_info() which is the - * synchronous version of this call. + * For more details, see g_file_set_display_name() which is + * the synchronous version of this call. * - * When the operation is finished, @callback will be called. You can - * then call g_file_query_info_finish() to get the result of the - * operation. + * When the operation is finished, @callback will be called. + * You can then call g_file_set_display_name_finish() to get + * the result of the operation. */ /** - * g_file_query_filesystem_info_finish: + * g_file_set_display_name_finish: * @file: input #GFile * @res: a #GAsyncResult - * @error: a #GError + * @error: a #GError, or %NULL * - * Finishes an asynchronous filesystem info query. - * See g_file_query_filesystem_info_async(). + * Finishes setting a display name started with + * g_file_set_display_name_async(). * - * Returns: (transfer full): #GFileInfo for given @file - * or %NULL on error. + * Returns: (transfer full): a #GFile or %NULL on error. * Free the returned object with g_object_unref(). */ /** - * g_file_query_info: + * g_file_start_mountable: * @file: input #GFile - * @attributes: an attribute query string - * @flags: a set of #GFileQueryInfoFlags - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @error: a #GError + * @flags: flags affecting the operation + * @start_operation: (nullable): a #GMountOperation, or %NULL to avoid user interaction + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore + * @callback: (nullable): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL + * @user_data: the data to pass to callback function * - * Gets the requested information about specified @file. - * The result is a #GFileInfo object that contains key-value - * attributes (such as the type or size of the file). + * Starts a file of type #G_FILE_TYPE_MOUNTABLE. + * Using @start_operation, you can request callbacks when, for instance, + * passwords are needed during authentication. * - * The @attributes value is a string that specifies the file - * attributes that should be gathered. It is not an error if - * it's not possible to read a particular requested attribute - * from a file - it just won't be set. @attributes should be a - * comma-separated list of attributes or attribute wildcards. - * The wildcard "*" means all attributes, and a wildcard like - * "standard::*" means all attributes in the standard namespace. - * An example attribute query be "standard::*,owner::user". - * The standard attributes are available as defines, like - * #G_FILE_ATTRIBUTE_STANDARD_NAME. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * If @cancellable is not %NULL, then the operation can be cancelled - * by triggering the cancellable object from another thread. If the - * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be - * returned. + * When the operation is finished, @callback will be called. + * You can then call g_file_mount_mountable_finish() to get + * the result of the operation. * - * For symlinks, normally the information about the target of the - * symlink is returned, rather than information about the symlink - * itself. However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS - * in @flags the information about the symlink itself will be returned. - * Also, for symlinks that point to non-existing files the information - * about the symlink itself will be returned. + * Since: 2.22 + */ + + +/** + * g_file_start_mountable_finish: + * @file: input #GFile + * @result: a #GAsyncResult + * @error: a #GError, or %NULL * - * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be - * returned. Other errors are possible too, and depend on what kind of - * filesystem the file is on. + * Finishes a start operation. See g_file_start_mountable() for details. * - * Returns: (transfer full): a #GFileInfo for the given @file, or %NULL - * on error. Free the returned object with g_object_unref(). + * Finish an asynchronous start operation that was started + * with g_file_start_mountable(). + * + * Returns: %TRUE if the operation finished successfully. %FALSE + * otherwise. + * Since: 2.22 */ /** - * g_file_query_info_async: + * g_file_stop_mountable: * @file: input #GFile - * @attributes: an attribute query string - * @flags: a set of #GFileQueryInfoFlags - * @io_priority: the [I/O priority][io-priority] of the request + * @flags: flags affecting the operation + * @mount_operation: (nullable): a #GMountOperation, + * or %NULL to avoid user interaction. * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore - * @callback: (scope async): a #GAsyncReadyCallback to call when the - * request is satisfied - * @user_data: (closure): the data to pass to callback function + * @callback: (nullable): a #GAsyncReadyCallback to call + * when the request is satisfied, or %NULL + * @user_data: the data to pass to callback function * - * Asynchronously gets the requested information about specified @file. - * The result is a #GFileInfo object that contains key-value attributes - * (such as type or size for the file). + * Stops a file of type #G_FILE_TYPE_MOUNTABLE. * - * For more details, see g_file_query_info() which is the synchronous - * version of this call. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * When the operation is finished, @callback will be called. You can - * then call g_file_query_info_finish() to get the result of the operation. + * When the operation is finished, @callback will be called. + * You can then call g_file_stop_mountable_finish() to get + * the result of the operation. + * + * Since: 2.22 */ /** - * g_file_query_info_finish: + * g_file_stop_mountable_finish: * @file: input #GFile - * @res: a #GAsyncResult - * @error: a #GError + * @result: a #GAsyncResult + * @error: a #GError, or %NULL * - * Finishes an asynchronous file info query. - * See g_file_query_info_async(). + * Finishes a stop operation, see g_file_stop_mountable() for details. * - * Returns: (transfer full): #GFileInfo for given @file - * or %NULL on error. Free the returned object with - * g_object_unref(). + * Finish an asynchronous stop operation that was started + * with g_file_stop_mountable(). + * + * Returns: %TRUE if the operation finished successfully. + * %FALSE otherwise. + * Since: 2.22 */ /** - * g_file_query_settable_attributes: - * @file: input #GFile + * g_file_supports_thread_contexts: + * @file: a #GFile + * + * Checks if @file supports + * [thread-default contexts][g-main-context-push-thread-default-context]. + * If this returns %FALSE, you cannot perform asynchronous operations on + * @file in a thread that has a thread-default context. + * + * Returns: Whether or not @file supports thread-default contexts. + * Since: 2.22 + */ + + +/** + * g_file_trash: (virtual trash) + * @file: #GFile to send to trash * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore * @error: a #GError, or %NULL * - * Obtain the list of settable attributes for the file. - * - * Returns the type and full attribute name of all the attributes - * that can be set on this file. This doesn't mean setting it will - * always succeed though, you might get an access failure, or some - * specific file may not support a specific attribute. + * Sends @file to the "Trashcan", if possible. This is similar to + * deleting it, but the user can recover it before emptying the trashcan. + * Not all file systems support trashing, so this call can return the + * %G_IO_ERROR_NOT_SUPPORTED error. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * Returns: a #GFileAttributeInfoList describing the settable attributes. - * When you are done with it, release it with - * g_file_attribute_info_list_unref() + * Returns: %TRUE on successful trash, %FALSE otherwise. */ /** - * g_file_query_writable_namespaces: + * g_file_trash_async: (virtual trash_async) * @file: input #GFile + * @io_priority: the [I/O priority][io-priority] of the request * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore - * @error: a #GError, or %NULL - * - * Obtain the list of attribute namespaces where new attributes - * can be created by a user. An example of this is extended - * attributes (in the "xattr" namespace). + * @callback: a #GAsyncReadyCallback to call + * when the request is satisfied + * @user_data: the data to pass to callback function * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * Asynchronously sends @file to the Trash location, if possible. * - * Returns: a #GFileAttributeInfoList describing the writable namespaces. - * When you are done with it, release it with - * g_file_attribute_info_list_unref() + * Since: 2.38 */ /** - * g_file_read: (virtual read_fn) - * @file: #GFile to read - * @cancellable: (nullable): a #GCancellable + * g_file_trash_finish: (virtual trash_finish) + * @file: input #GFile + * @result: a #GAsyncResult * @error: a #GError, or %NULL * - * Opens a file for reading. The result is a #GFileInputStream that - * can be used to read the contents of the file. - * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. - * - * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be - * returned. If the file is a directory, the %G_IO_ERROR_IS_DIRECTORY - * error will be returned. Other errors are possible too, and depend - * on what kind of filesystem the file is on. + * Finishes an asynchronous file trashing operation, started with + * g_file_trash_async(). * - * Returns: (transfer full): #GFileInputStream or %NULL on error. - * Free the returned object with g_object_unref(). + * Returns: %TRUE on successful trash, %FALSE otherwise. + * Since: 2.38 */ /** - * g_file_read_async: + * g_file_unmount_mountable: * @file: input #GFile - * @io_priority: the [I/O priority][io-priority] of the request + * @flags: flags affecting the operation * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore - * @callback: (scope async): a #GAsyncReadyCallback to call - * when the request is satisfied + * @callback: (scope async) (nullable): a #GAsyncReadyCallback to call + * when the request is satisfied, or %NULL * @user_data: (closure): the data to pass to callback function * - * Asynchronously opens @file for reading. + * Unmounts a file of type G_FILE_TYPE_MOUNTABLE. * - * For more details, see g_file_read() which is - * the synchronous version of this call. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * When the operation is finished, @callback will be called. - * You can then call g_file_read_finish() to get the result - * of the operation. + * You can then call g_file_unmount_mountable_finish() to get + * the result of the operation. + * + * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation() instead. */ /** - * g_file_read_finish: + * g_file_unmount_mountable_finish: * @file: input #GFile - * @res: a #GAsyncResult + * @result: a #GAsyncResult * @error: a #GError, or %NULL * - * Finishes an asynchronous file read operation started with - * g_file_read_async(). + * Finishes an unmount operation, see g_file_unmount_mountable() for details. * - * Returns: (transfer full): a #GFileInputStream or %NULL on error. - * Free the returned object with g_object_unref(). + * Finish an asynchronous unmount operation that was started + * with g_file_unmount_mountable(). + * + * Returns: %TRUE if the operation finished successfully. + * %FALSE otherwise. + * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation_finish() + * instead. */ /** - * g_file_replace: + * g_file_unmount_mountable_with_operation: * @file: input #GFile - * @etag: (nullable): an optional [entity tag][gfile-etag] - * for the current #GFile, or #NULL to ignore - * @make_backup: %TRUE if a backup should be created - * @flags: a set of #GFileCreateFlags + * @flags: flags affecting the operation + * @mount_operation: (nullable): a #GMountOperation, + * or %NULL to avoid user interaction * @cancellable: (nullable): optional #GCancellable object, * %NULL to ignore - * @error: a #GError, or %NULL + * @callback: (scope async) (nullable): a #GAsyncReadyCallback to call + * when the request is satisfied, or %NULL + * @user_data: (closure): the data to pass to callback function * - * Returns an output stream for overwriting the file, possibly - * creating a backup copy of the file first. If the file doesn't exist, - * it will be created. + * Unmounts a file of type #G_FILE_TYPE_MOUNTABLE. * - * This will try to replace the file in the safest way possible so - * that any errors during the writing will not affect an already - * existing copy of the file. For instance, for local files it - * may write to a temporary file and then atomically rename over - * the destination when the stream is closed. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * - * By default files created are generally readable by everyone, - * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file - * will be made readable only to the current user, to the level that - * is supported on the target filesystem. + * When the operation is finished, @callback will be called. + * You can then call g_file_unmount_mountable_finish() to get + * the result of the operation. * - * If @cancellable is not %NULL, then the operation can be cancelled - * by triggering the cancellable object from another thread. If the - * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be - * returned. + * Since: 2.22 + */ + + +/** + * g_file_unmount_mountable_with_operation_finish: + * @file: input #GFile + * @result: a #GAsyncResult + * @error: a #GError, or %NULL * - * If you pass in a non-%NULL @etag value and @file already exists, then - * this value is compared to the current entity tag of the file, and if - * they differ an %G_IO_ERROR_WRONG_ETAG error is returned. This - * generally means that the file has been changed since you last read - * it. You can get the new etag from g_file_output_stream_get_etag() - * after you've finished writing and closed the #GFileOutputStream. When - * you load a new file you can use g_file_input_stream_query_info() to - * get the etag of the file. - * - * If @make_backup is %TRUE, this function will attempt to make a - * backup of the current file before overwriting it. If this fails - * a %G_IO_ERROR_CANT_CREATE_BACKUP error will be returned. If you - * want to replace anyway, try again with @make_backup set to %FALSE. + * Finishes an unmount operation, + * see g_file_unmount_mountable_with_operation() for details. * - * If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will - * be returned, and if the file is some other form of non-regular file - * then a %G_IO_ERROR_NOT_REGULAR_FILE error will be returned. Some - * file systems don't allow all file names, and may return an - * %G_IO_ERROR_INVALID_FILENAME error, and if the name is to long - * %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors are - * possible too, and depend on what kind of filesystem the file is on. + * Finish an asynchronous unmount operation that was started + * with g_file_unmount_mountable_with_operation(). * - * Returns: (transfer full): a #GFileOutputStream or %NULL on error. - * Free the returned object with g_object_unref(). + * Returns: %TRUE if the operation finished successfully. + * %FALSE otherwise. + * Since: 2.22 */ /** - * g_file_replace_async: - * @file: input #GFile - * @etag: (nullable): an [entity tag][gfile-etag] for the current #GFile, - * or %NULL to ignore - * @make_backup: %TRUE if a backup should be created - * @flags: a set of #GFileCreateFlags - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @callback: (scope async): a #GAsyncReadyCallback to call - * when the request is satisfied - * @user_data: (closure): the data to pass to callback function - * - * Asynchronously overwrites the file, replacing the contents, - * possibly creating a backup copy of the file first. + * g_filename_completer_get_completion_suffix: + * @completer: the filename completer. + * @initial_text: text to be completed. * - * For more details, see g_file_replace() which is - * the synchronous version of this call. + * Obtains a completion for @initial_text from @completer. * - * When the operation is finished, @callback will be called. - * You can then call g_file_replace_finish() to get the result - * of the operation. + * Returns: a completed string, or %NULL if no completion exists. + * This string is not owned by GIO, so remember to g_free() it + * when finished. */ /** - * g_file_replace_contents: - * @file: input #GFile - * @contents: (element-type guint8) (array length=length): a string containing the new contents for @file - * @length: the length of @contents in bytes - * @etag: (nullable): the old [entity-tag][gfile-etag] for the document, - * or %NULL - * @make_backup: %TRUE if a backup should be created - * @flags: a set of #GFileCreateFlags - * @new_etag: (out) (optional): a location to a new [entity tag][gfile-etag] - * for the document. This should be freed with g_free() when no longer - * needed, or %NULL - * @cancellable: optional #GCancellable object, %NULL to ignore - * @error: a #GError, or %NULL - * - * Replaces the contents of @file with @contents of @length bytes. - * - * If @etag is specified (not %NULL), any existing file must have that etag, - * or the error %G_IO_ERROR_WRONG_ETAG will be returned. - * - * If @make_backup is %TRUE, this function will attempt to make a backup - * of @file. Internally, it uses g_file_replace(), so will try to replace the - * file contents in the safest way possible. For example, atomic renames are - * used when replacing local files’ contents. - * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * g_filename_completer_get_completions: + * @completer: the filename completer. + * @initial_text: text to be completed. * - * The returned @new_etag can be used to verify that the file hasn't - * changed the next time it is saved over. + * Gets an array of completion strings for a given initial text. * - * Returns: %TRUE if successful. If an error has occurred, this function - * will return %FALSE and set @error appropriately if present. + * Returns: (array zero-terminated=1) (transfer full): array of strings with possible completions for @initial_text. + * This array must be freed by g_strfreev() when finished. */ /** - * g_file_replace_contents_async: - * @file: input #GFile - * @contents: (element-type guint8) (array length=length): string of contents to replace the file with - * @length: the length of @contents in bytes - * @etag: (nullable): a new [entity tag][gfile-etag] for the @file, or %NULL - * @make_backup: %TRUE if a backup should be created - * @flags: a set of #GFileCreateFlags - * @cancellable: optional #GCancellable object, %NULL to ignore - * @callback: a #GAsyncReadyCallback to call when the request is satisfied - * @user_data: the data to pass to callback function - * - * Starts an asynchronous replacement of @file with the given - * @contents of @length bytes. @etag will replace the document's - * current entity tag. - * - * When this operation has completed, @callback will be called with - * @user_user data, and the operation can be finalized with - * g_file_replace_contents_finish(). - * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * g_filename_completer_new: * - * If @make_backup is %TRUE, this function will attempt to - * make a backup of @file. + * Creates a new filename completer. * - * Note that no copy of @content will be made, so it must stay valid - * until @callback is called. See g_file_replace_contents_bytes_async() - * for a #GBytes version that will automatically hold a reference to the - * contents (without copying) for the duration of the call. + * Returns: a #GFilenameCompleter. */ /** - * g_file_replace_contents_bytes_async: - * @file: input #GFile - * @contents: a #GBytes - * @etag: (nullable): a new [entity tag][gfile-etag] for the @file, or %NULL - * @make_backup: %TRUE if a backup should be created - * @flags: a set of #GFileCreateFlags - * @cancellable: optional #GCancellable object, %NULL to ignore - * @callback: a #GAsyncReadyCallback to call when the request is satisfied - * @user_data: the data to pass to callback function + * g_filename_completer_set_dirs_only: + * @completer: the filename completer. + * @dirs_only: a #gboolean. * - * Same as g_file_replace_contents_async() but takes a #GBytes input instead. - * This function will keep a ref on @contents until the operation is done. - * Unlike g_file_replace_contents_async() this allows forgetting about the - * content without waiting for the callback. + * If @dirs_only is %TRUE, @completer will only + * complete directory names, and not file names. + */ + + +/** + * g_filter_input_stream_get_base_stream: + * @stream: a #GFilterInputStream. * - * When this operation has completed, @callback will be called with - * @user_user data, and the operation can be finalized with - * g_file_replace_contents_finish(). + * Gets the base stream for the filter stream. * - * Since: 2.40 + * Returns: (transfer none): a #GInputStream. */ /** - * g_file_replace_contents_finish: - * @file: input #GFile - * @res: a #GAsyncResult - * @new_etag: (out) (optional): a location of a new [entity tag][gfile-etag] - * for the document. This should be freed with g_free() when it is no - * longer needed, or %NULL - * @error: a #GError, or %NULL + * g_filter_input_stream_get_close_base_stream: + * @stream: a #GFilterInputStream. * - * Finishes an asynchronous replace of the given @file. See - * g_file_replace_contents_async(). Sets @new_etag to the new entity - * tag for the document, if present. + * Returns whether the base stream will be closed when @stream is + * closed. * - * Returns: %TRUE on success, %FALSE on failure. + * Returns: %TRUE if the base stream will be closed. */ /** - * g_file_replace_finish: - * @file: input #GFile - * @res: a #GAsyncResult - * @error: a #GError, or %NULL - * - * Finishes an asynchronous file replace operation started with - * g_file_replace_async(). + * g_filter_input_stream_set_close_base_stream: + * @stream: a #GFilterInputStream. + * @close_base: %TRUE to close the base stream. * - * Returns: (transfer full): a #GFileOutputStream, or %NULL on error. - * Free the returned object with g_object_unref(). + * Sets whether the base stream will be closed when @stream is closed. */ /** - * g_file_replace_readwrite: - * @file: a #GFile - * @etag: (nullable): an optional [entity tag][gfile-etag] - * for the current #GFile, or #NULL to ignore - * @make_backup: %TRUE if a backup should be created - * @flags: a set of #GFileCreateFlags - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @error: return location for a #GError, or %NULL + * g_filter_output_stream_get_base_stream: + * @stream: a #GFilterOutputStream. * - * Returns an output stream for overwriting the file in readwrite mode, - * possibly creating a backup copy of the file first. If the file doesn't - * exist, it will be created. + * Gets the base stream for the filter stream. * - * For details about the behaviour, see g_file_replace() which does the - * same thing but returns an output stream only. + * Returns: (transfer none): a #GOutputStream. + */ + + +/** + * g_filter_output_stream_get_close_base_stream: + * @stream: a #GFilterOutputStream. * - * Note that in many non-local file cases read and write streams are not - * supported, so make sure you really need to do read and write streaming, - * rather than just opening for reading or writing. + * Returns whether the base stream will be closed when @stream is + * closed. * - * Returns: (transfer full): a #GFileIOStream or %NULL on error. - * Free the returned object with g_object_unref(). - * Since: 2.22 + * Returns: %TRUE if the base stream will be closed. */ /** - * g_file_replace_readwrite_async: - * @file: input #GFile - * @etag: (nullable): an [entity tag][gfile-etag] for the current #GFile, - * or %NULL to ignore - * @make_backup: %TRUE if a backup should be created - * @flags: a set of #GFileCreateFlags - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @callback: (scope async): a #GAsyncReadyCallback to call - * when the request is satisfied - * @user_data: (closure): the data to pass to callback function - * - * Asynchronously overwrites the file in read-write mode, - * replacing the contents, possibly creating a backup copy - * of the file first. + * g_filter_output_stream_set_close_base_stream: + * @stream: a #GFilterOutputStream. + * @close_base: %TRUE to close the base stream. * - * For more details, see g_file_replace_readwrite() which is - * the synchronous version of this call. + * Sets whether the base stream will be closed when @stream is closed. + */ + + +/** + * g_icon_deserialize: + * @value: a #GVariant created with g_icon_serialize() * - * When the operation is finished, @callback will be called. - * You can then call g_file_replace_readwrite_finish() to get - * the result of the operation. + * Deserializes a #GIcon previously serialized using g_icon_serialize(). * - * Since: 2.22 + * Returns: (transfer full): a #GIcon, or %NULL when deserialization fails. + * Since: 2.38 */ /** - * g_file_replace_readwrite_finish: - * @file: input #GFile - * @res: a #GAsyncResult - * @error: a #GError, or %NULL + * g_icon_equal: + * @icon1: (nullable): pointer to the first #GIcon. + * @icon2: (nullable): pointer to the second #GIcon. * - * Finishes an asynchronous file replace operation started with - * g_file_replace_readwrite_async(). + * Checks if two icons are equal. * - * Returns: (transfer full): a #GFileIOStream, or %NULL on error. - * Free the returned object with g_object_unref(). - * Since: 2.22 + * Returns: %TRUE if @icon1 is equal to @icon2. %FALSE otherwise. */ /** - * g_file_resolve_relative_path: - * @file: input #GFile - * @relative_path: (type filename): a given relative path string - * - * Resolves a relative path for @file to an absolute path. + * g_icon_hash: (virtual hash) + * @icon: (not nullable): #gconstpointer to an icon object. * - * This call does no blocking I/O. + * Gets a hash for an icon. * - * Returns: (transfer full): #GFile to the resolved path. - * %NULL if @relative_path is %NULL or if @file is invalid. - * Free the returned object with g_object_unref(). + * Returns: a #guint containing a hash for the @icon, suitable for + * use in a #GHashTable or similar data structure. */ /** - * g_file_set_attribute: - * @file: input #GFile - * @attribute: a string containing the attribute's name - * @type: The type of the attribute - * @value_p: (nullable): a pointer to the value (or the pointer - * itself if the type is a pointer type) - * @flags: a set of #GFileQueryInfoFlags - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @error: a #GError, or %NULL - * - * Sets an attribute in the file with attribute name @attribute to @value. + * g_icon_new_for_string: + * @str: A string obtained via g_icon_to_string(). + * @error: Return location for error. * - * Some attributes can be unset by setting @type to - * %G_FILE_ATTRIBUTE_TYPE_INVALID and @value_p to %NULL. + * Generate a #GIcon instance from @str. This function can fail if + * @str is not valid - see g_icon_to_string() for discussion. * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * If your application or library provides one or more #GIcon + * implementations you need to ensure that each #GType is registered + * with the type system prior to calling g_icon_new_for_string(). * - * Returns: %TRUE if the attribute was set, %FALSE otherwise. + * Returns: (transfer full): An object implementing the #GIcon + * interface or %NULL if @error is set. + * Since: 2.20 */ /** - * g_file_set_attribute_byte_string: - * @file: input #GFile - * @attribute: a string containing the attribute's name - * @value: a string containing the attribute's new value - * @flags: a #GFileQueryInfoFlags - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @error: a #GError, or %NULL - * - * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value. - * If @attribute is of a different type, this operation will fail, - * returning %FALSE. + * g_icon_serialize: + * @icon: a #GIcon * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved + * back by calling g_icon_deserialize() on the returned value. + * As serialization will avoid using raw icon data when possible, it only + * makes sense to transfer the #GVariant between processes on the same machine, + * (as opposed to over the network), and within the same file system namespace. * - * Returns: %TRUE if the @attribute was successfully set to @value - * in the @file, %FALSE otherwise. + * Returns: (transfer full): a #GVariant, or %NULL when serialization fails. + * Since: 2.38 */ /** - * g_file_set_attribute_int32: - * @file: input #GFile - * @attribute: a string containing the attribute's name - * @value: a #gint32 containing the attribute's new value - * @flags: a #GFileQueryInfoFlags - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @error: a #GError, or %NULL + * g_icon_to_string: (virtual to_tokens) + * @icon: a #GIcon. * - * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value. - * If @attribute is of a different type, this operation will fail. + * Generates a textual representation of @icon that can be used for + * serialization such as when passing @icon to a different process or + * saving it to persistent storage. Use g_icon_new_for_string() to + * get @icon back from the returned string. * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * The encoding of the returned string is proprietary to #GIcon except + * in the following two cases * - * Returns: %TRUE if the @attribute was successfully set to @value - * in the @file, %FALSE otherwise. + * - If @icon is a #GFileIcon, the returned string is a native path + * (such as `/path/to/my icon.png`) without escaping + * if the #GFile for @icon is a native file. If the file is not + * native, the returned string is the result of g_file_get_uri() + * (such as `sftp://path/to/my%20icon.png`). + * + * - If @icon is a #GThemedIcon with exactly one name and no fallbacks, + * the encoding is simply the name (such as `network-server`). + * + * Returns: (nullable): An allocated NUL-terminated UTF8 string or + * %NULL if @icon can't be serialized. Use g_free() to free. + * Since: 2.20 */ /** - * g_file_set_attribute_int64: - * @file: input #GFile - * @attribute: a string containing the attribute's name - * @value: a #guint64 containing the attribute's new value - * @flags: a #GFileQueryInfoFlags - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @error: a #GError, or %NULL - * - * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value. - * If @attribute is of a different type, this operation will fail. + * g_inet_address_equal: + * @address: A #GInetAddress. + * @other_address: Another #GInetAddress. * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * Checks if two #GInetAddress instances are equal, e.g. the same address. * - * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise. + * Returns: %TRUE if @address and @other_address are equal, %FALSE otherwise. + * Since: 2.30 */ /** - * g_file_set_attribute_string: - * @file: input #GFile - * @attribute: a string containing the attribute's name - * @value: a string containing the attribute's value - * @flags: #GFileQueryInfoFlags - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @error: a #GError, or %NULL - * - * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value. - * If @attribute is of a different type, this operation will fail. + * g_inet_address_get_family: + * @address: a #GInetAddress * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * Gets @address's family * - * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise. + * Returns: @address's family + * Since: 2.22 */ /** - * g_file_set_attribute_uint32: - * @file: input #GFile - * @attribute: a string containing the attribute's name - * @value: a #guint32 containing the attribute's new value - * @flags: a #GFileQueryInfoFlags - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @error: a #GError, or %NULL - * - * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value. - * If @attribute is of a different type, this operation will fail. + * g_inet_address_get_is_any: + * @address: a #GInetAddress * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * Tests whether @address is the "any" address for its family. * - * Returns: %TRUE if the @attribute was successfully set to @value - * in the @file, %FALSE otherwise. + * Returns: %TRUE if @address is the "any" address for its family. + * Since: 2.22 */ /** - * g_file_set_attribute_uint64: - * @file: input #GFile - * @attribute: a string containing the attribute's name - * @value: a #guint64 containing the attribute's new value - * @flags: a #GFileQueryInfoFlags - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @error: a #GError, or %NULL - * - * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value. - * If @attribute is of a different type, this operation will fail. + * g_inet_address_get_is_link_local: + * @address: a #GInetAddress * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * Tests whether @address is a link-local address (that is, if it + * identifies a host on a local network that is not connected to the + * Internet). * - * Returns: %TRUE if the @attribute was successfully set to @value - * in the @file, %FALSE otherwise. + * Returns: %TRUE if @address is a link-local address. + * Since: 2.22 */ /** - * g_file_set_attributes_async: - * @file: input #GFile - * @info: a #GFileInfo - * @flags: a #GFileQueryInfoFlags - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @callback: (scope async): a #GAsyncReadyCallback - * @user_data: (closure): a #gpointer - * - * Asynchronously sets the attributes of @file with @info. + * g_inet_address_get_is_loopback: + * @address: a #GInetAddress * - * For more details, see g_file_set_attributes_from_info(), - * which is the synchronous version of this call. + * Tests whether @address is the loopback address for its family. * - * When the operation is finished, @callback will be called. - * You can then call g_file_set_attributes_finish() to get - * the result of the operation. + * Returns: %TRUE if @address is the loopback address for its family. + * Since: 2.22 */ /** - * g_file_set_attributes_finish: - * @file: input #GFile - * @result: a #GAsyncResult - * @info: (out) (transfer full): a #GFileInfo - * @error: a #GError, or %NULL + * g_inet_address_get_is_mc_global: + * @address: a #GInetAddress * - * Finishes setting an attribute started in g_file_set_attributes_async(). + * Tests whether @address is a global multicast address. * - * Returns: %TRUE if the attributes were set correctly, %FALSE otherwise. + * Returns: %TRUE if @address is a global multicast address. + * Since: 2.22 */ /** - * g_file_set_attributes_from_info: - * @file: input #GFile - * @info: a #GFileInfo - * @flags: #GFileQueryInfoFlags - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @error: a #GError, or %NULL + * g_inet_address_get_is_mc_link_local: + * @address: a #GInetAddress * - * Tries to set all attributes in the #GFileInfo on the target - * values, not stopping on the first error. + * Tests whether @address is a link-local multicast address. * - * If there is any error during this operation then @error will - * be set to the first error. Error on particular fields are flagged - * by setting the "status" field in the attribute value to - * %G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can - * also detect further errors. + * Returns: %TRUE if @address is a link-local multicast address. + * Since: 2.22 + */ + + +/** + * g_inet_address_get_is_mc_node_local: + * @address: a #GInetAddress * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * Tests whether @address is a node-local multicast address. * - * Returns: %FALSE if there was any error, %TRUE otherwise. + * Returns: %TRUE if @address is a node-local multicast address. + * Since: 2.22 */ /** - * g_file_set_display_name: - * @file: input #GFile - * @display_name: a string - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @error: a #GError, or %NULL - * - * Renames @file to the specified display name. - * - * The display name is converted from UTF-8 to the correct encoding - * for the target filesystem if possible and the @file is renamed to this. - * - * If you want to implement a rename operation in the user interface the - * edit name (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the - * initial value in the rename widget, and then the result after editing - * should be passed to g_file_set_display_name(). - * - * On success the resulting converted filename is returned. + * g_inet_address_get_is_mc_org_local: + * @address: a #GInetAddress * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * Tests whether @address is an organization-local multicast address. * - * Returns: (transfer full): a #GFile specifying what @file was renamed to, - * or %NULL if there was an error. - * Free the returned object with g_object_unref(). + * Returns: %TRUE if @address is an organization-local multicast address. + * Since: 2.22 */ /** - * g_file_set_display_name_async: - * @file: input #GFile - * @display_name: a string - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @callback: (scope async): a #GAsyncReadyCallback to call - * when the request is satisfied - * @user_data: (closure): the data to pass to callback function - * - * Asynchronously sets the display name for a given #GFile. + * g_inet_address_get_is_mc_site_local: + * @address: a #GInetAddress * - * For more details, see g_file_set_display_name() which is - * the synchronous version of this call. + * Tests whether @address is a site-local multicast address. * - * When the operation is finished, @callback will be called. - * You can then call g_file_set_display_name_finish() to get - * the result of the operation. + * Returns: %TRUE if @address is a site-local multicast address. + * Since: 2.22 */ /** - * g_file_set_display_name_finish: - * @file: input #GFile - * @res: a #GAsyncResult - * @error: a #GError, or %NULL + * g_inet_address_get_is_multicast: + * @address: a #GInetAddress * - * Finishes setting a display name started with - * g_file_set_display_name_async(). + * Tests whether @address is a multicast address. * - * Returns: (transfer full): a #GFile or %NULL on error. - * Free the returned object with g_object_unref(). + * Returns: %TRUE if @address is a multicast address. + * Since: 2.22 */ /** - * g_file_start_mountable: - * @file: input #GFile - * @flags: flags affecting the operation - * @start_operation: (nullable): a #GMountOperation, or %NULL to avoid user interaction - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore - * @callback: (nullable): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL - * @user_data: the data to pass to callback function - * - * Starts a file of type #G_FILE_TYPE_MOUNTABLE. - * Using @start_operation, you can request callbacks when, for instance, - * passwords are needed during authentication. - * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * g_inet_address_get_is_site_local: + * @address: a #GInetAddress * - * When the operation is finished, @callback will be called. - * You can then call g_file_mount_mountable_finish() to get - * the result of the operation. + * Tests whether @address is a site-local address such as 10.0.0.1 + * (that is, the address identifies a host on a local network that can + * not be reached directly from the Internet, but which may have + * outgoing Internet connectivity via a NAT or firewall). * + * Returns: %TRUE if @address is a site-local address. * Since: 2.22 */ /** - * g_file_start_mountable_finish: - * @file: input #GFile - * @result: a #GAsyncResult - * @error: a #GError, or %NULL - * - * Finishes a start operation. See g_file_start_mountable() for details. + * g_inet_address_get_native_size: + * @address: a #GInetAddress * - * Finish an asynchronous start operation that was started - * with g_file_start_mountable(). + * Gets the size of the native raw binary address for @address. This + * is the size of the data that you get from g_inet_address_to_bytes(). * - * Returns: %TRUE if the operation finished successfully. %FALSE - * otherwise. + * Returns: the number of bytes used for the native version of @address. * Since: 2.22 */ /** - * g_file_stop_mountable: - * @file: input #GFile - * @flags: flags affecting the operation - * @mount_operation: (nullable): a #GMountOperation, - * or %NULL to avoid user interaction. - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @callback: (nullable): a #GAsyncReadyCallback to call - * when the request is satisfied, or %NULL - * @user_data: the data to pass to callback function - * - * Stops a file of type #G_FILE_TYPE_MOUNTABLE. - * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * g_inet_address_mask_equal: + * @mask: a #GInetAddressMask + * @mask2: another #GInetAddressMask * - * When the operation is finished, @callback will be called. - * You can then call g_file_stop_mountable_finish() to get - * the result of the operation. + * Tests if @mask and @mask2 are the same mask. * - * Since: 2.22 + * Returns: whether @mask and @mask2 are the same mask + * Since: 2.32 */ /** - * g_file_stop_mountable_finish: - * @file: input #GFile - * @result: a #GAsyncResult - * @error: a #GError, or %NULL - * - * Finishes an stop operation, see g_file_stop_mountable() for details. + * g_inet_address_mask_get_address: + * @mask: a #GInetAddressMask * - * Finish an asynchronous stop operation that was started - * with g_file_stop_mountable(). + * Gets @mask's base address * - * Returns: %TRUE if the operation finished successfully. - * %FALSE otherwise. - * Since: 2.22 + * Returns: (transfer none): @mask's base address + * Since: 2.32 */ /** - * g_file_supports_thread_contexts: - * @file: a #GFile + * g_inet_address_mask_get_family: + * @mask: a #GInetAddressMask * - * Checks if @file supports - * [thread-default contexts][g-main-context-push-thread-default-context]. - * If this returns %FALSE, you cannot perform asynchronous operations on - * @file in a thread that has a thread-default context. + * Gets the #GSocketFamily of @mask's address * - * Returns: Whether or not @file supports thread-default contexts. - * Since: 2.22 + * Returns: the #GSocketFamily of @mask's address + * Since: 2.32 */ /** - * g_file_trash: (virtual trash) - * @file: #GFile to send to trash - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @error: a #GError, or %NULL - * - * Sends @file to the "Trashcan", if possible. This is similar to - * deleting it, but the user can recover it before emptying the trashcan. - * Not all file systems support trashing, so this call can return the - * %G_IO_ERROR_NOT_SUPPORTED error. + * g_inet_address_mask_get_length: + * @mask: a #GInetAddressMask * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * Gets @mask's length * - * Returns: %TRUE on successful trash, %FALSE otherwise. + * Returns: @mask's length + * Since: 2.32 */ /** - * g_file_trash_async: (virtual trash_async) - * @file: input #GFile - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @callback: a #GAsyncReadyCallback to call - * when the request is satisfied - * @user_data: the data to pass to callback function + * g_inet_address_mask_matches: + * @mask: a #GInetAddressMask + * @address: a #GInetAddress * - * Asynchronously sends @file to the Trash location, if possible. + * Tests if @address falls within the range described by @mask. * - * Since: 2.38 + * Returns: whether @address falls within the range described by + * @mask. + * Since: 2.32 */ /** - * g_file_trash_finish: (virtual trash_finish) - * @file: input #GFile - * @result: a #GAsyncResult - * @error: a #GError, or %NULL + * g_inet_address_mask_new: + * @addr: a #GInetAddress + * @length: number of bits of @addr to use + * @error: return location for #GError, or %NULL * - * Finishes an asynchronous file trashing operation, started with - * g_file_trash_async(). + * Creates a new #GInetAddressMask representing all addresses whose + * first @length bits match @addr. * - * Returns: %TRUE on successful trash, %FALSE otherwise. - * Since: 2.38 + * Returns: a new #GInetAddressMask, or %NULL on error + * Since: 2.32 */ /** - * g_file_unmount_mountable: - * @file: input #GFile - * @flags: flags affecting the operation - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @callback: (scope async) (nullable): a #GAsyncReadyCallback to call - * when the request is satisfied, or %NULL - * @user_data: (closure): the data to pass to callback function - * - * Unmounts a file of type G_FILE_TYPE_MOUNTABLE. - * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * g_inet_address_mask_new_from_string: + * @mask_string: an IP address or address/length string + * @error: return location for #GError, or %NULL * - * When the operation is finished, @callback will be called. - * You can then call g_file_unmount_mountable_finish() to get - * the result of the operation. + * Parses @mask_string as an IP address and (optional) length, and + * creates a new #GInetAddressMask. The length, if present, is + * delimited by a "/". If it is not present, then the length is + * assumed to be the full length of the address. * - * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation() instead. + * Returns: a new #GInetAddressMask corresponding to @string, or %NULL + * on error. + * Since: 2.32 */ /** - * g_file_unmount_mountable_finish: - * @file: input #GFile - * @result: a #GAsyncResult - * @error: a #GError, or %NULL - * - * Finishes an unmount operation, see g_file_unmount_mountable() for details. + * g_inet_address_mask_to_string: + * @mask: a #GInetAddressMask * - * Finish an asynchronous unmount operation that was started - * with g_file_unmount_mountable(). + * Converts @mask back to its corresponding string form. * - * Returns: %TRUE if the operation finished successfully. - * %FALSE otherwise. - * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation_finish() - * instead. + * Returns: a string corresponding to @mask. + * Since: 2.32 */ /** - * g_file_unmount_mountable_with_operation: - * @file: input #GFile - * @flags: flags affecting the operation - * @mount_operation: (nullable): a #GMountOperation, - * or %NULL to avoid user interaction - * @cancellable: (nullable): optional #GCancellable object, - * %NULL to ignore - * @callback: (scope async) (nullable): a #GAsyncReadyCallback to call - * when the request is satisfied, or %NULL - * @user_data: (closure): the data to pass to callback function - * - * Unmounts a file of type #G_FILE_TYPE_MOUNTABLE. - * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * g_inet_address_new_any: + * @family: the address family * - * When the operation is finished, @callback will be called. - * You can then call g_file_unmount_mountable_finish() to get - * the result of the operation. + * Creates a #GInetAddress for the "any" address (unassigned/"don't + * care") for @family. * + * Returns: a new #GInetAddress corresponding to the "any" address + * for @family. + * Free the returned object with g_object_unref(). * Since: 2.22 */ /** - * g_file_unmount_mountable_with_operation_finish: - * @file: input #GFile - * @result: a #GAsyncResult - * @error: a #GError, or %NULL - * - * Finishes an unmount operation, - * see g_file_unmount_mountable_with_operation() for details. + * g_inet_address_new_from_bytes: + * @bytes: (array) (element-type guint8): raw address data + * @family: the address family of @bytes * - * Finish an asynchronous unmount operation that was started - * with g_file_unmount_mountable_with_operation(). + * Creates a new #GInetAddress from the given @family and @bytes. + * @bytes should be 4 bytes for %G_SOCKET_FAMILY_IPV4 and 16 bytes for + * %G_SOCKET_FAMILY_IPV6. * - * Returns: %TRUE if the operation finished successfully. - * %FALSE otherwise. + * Returns: a new #GInetAddress corresponding to @family and @bytes. + * Free the returned object with g_object_unref(). * Since: 2.22 */ /** - * g_filename_completer_get_completion_suffix: - * @completer: the filename completer. - * @initial_text: text to be completed. + * g_inet_address_new_from_string: + * @string: a string representation of an IP address * - * Obtains a completion for @initial_text from @completer. + * Parses @string as an IP address and creates a new #GInetAddress. * - * Returns: a completed string, or %NULL if no completion exists. - * This string is not owned by GIO, so remember to g_free() it - * when finished. + * Returns: a new #GInetAddress corresponding to @string, or %NULL if + * @string could not be parsed. + * Free the returned object with g_object_unref(). + * Since: 2.22 */ /** - * g_filename_completer_get_completions: - * @completer: the filename completer. - * @initial_text: text to be completed. + * g_inet_address_new_loopback: + * @family: the address family * - * Gets an array of completion strings for a given initial text. + * Creates a #GInetAddress for the loopback address for @family. * - * Returns: (array zero-terminated=1) (transfer full): array of strings with possible completions for @initial_text. - * This array must be freed by g_strfreev() when finished. + * Returns: a new #GInetAddress corresponding to the loopback address + * for @family. + * Free the returned object with g_object_unref(). + * Since: 2.22 */ /** - * g_filename_completer_new: + * g_inet_address_to_bytes: (skip) + * @address: a #GInetAddress * - * Creates a new filename completer. + * Gets the raw binary address data from @address. * - * Returns: a #GFilenameCompleter. + * Returns: a pointer to an internal array of the bytes in @address, + * which should not be modified, stored, or freed. The size of this + * array can be gotten with g_inet_address_get_native_size(). + * Since: 2.22 */ /** - * g_filename_completer_set_dirs_only: - * @completer: the filename completer. - * @dirs_only: a #gboolean. + * g_inet_address_to_string: + * @address: a #GInetAddress * - * If @dirs_only is %TRUE, @completer will only - * complete directory names, and not file names. + * Converts @address to string form. + * + * Returns: a representation of @address as a string, which should be + * freed after use. + * Since: 2.22 */ /** - * g_filter_input_stream_get_base_stream: - * @stream: a #GFilterInputStream. + * g_inet_socket_address_get_address: + * @address: a #GInetSocketAddress * - * Gets the base stream for the filter stream. + * Gets @address's #GInetAddress. * - * Returns: (transfer none): a #GInputStream. + * Returns: (transfer none): the #GInetAddress for @address, which must be + * g_object_ref()'d if it will be stored + * Since: 2.22 */ /** - * g_filter_input_stream_get_close_base_stream: - * @stream: a #GFilterInputStream. + * g_inet_socket_address_get_flowinfo: + * @address: a %G_SOCKET_FAMILY_IPV6 #GInetSocketAddress * - * Returns whether the base stream will be closed when @stream is - * closed. + * Gets the `sin6_flowinfo` field from @address, + * which must be an IPv6 address. * - * Returns: %TRUE if the base stream will be closed. + * Returns: the flowinfo field + * Since: 2.32 */ /** - * g_filter_input_stream_set_close_base_stream: - * @stream: a #GFilterInputStream. - * @close_base: %TRUE to close the base stream. + * g_inet_socket_address_get_port: + * @address: a #GInetSocketAddress * - * Sets whether the base stream will be closed when @stream is closed. + * Gets @address's port. + * + * Returns: the port for @address + * Since: 2.22 */ /** - * g_filter_output_stream_get_base_stream: - * @stream: a #GFilterOutputStream. + * g_inet_socket_address_get_scope_id: + * @address: a %G_SOCKET_FAMILY_IPV6 #GInetAddress * - * Gets the base stream for the filter stream. + * Gets the `sin6_scope_id` field from @address, + * which must be an IPv6 address. * - * Returns: (transfer none): a #GOutputStream. + * Returns: the scope id field + * Since: 2.32 */ /** - * g_filter_output_stream_get_close_base_stream: - * @stream: a #GFilterOutputStream. + * g_inet_socket_address_new: + * @address: a #GInetAddress + * @port: a port number * - * Returns whether the base stream will be closed when @stream is - * closed. + * Creates a new #GInetSocketAddress for @address and @port. * - * Returns: %TRUE if the base stream will be closed. + * Returns: a new #GInetSocketAddress + * Since: 2.22 */ /** - * g_filter_output_stream_set_close_base_stream: - * @stream: a #GFilterOutputStream. - * @close_base: %TRUE to close the base stream. + * g_inet_socket_address_new_from_string: + * @address: the string form of an IP address + * @port: a port number * - * Sets whether the base stream will be closed when @stream is closed. + * Creates a new #GInetSocketAddress for @address and @port. + * + * If @address is an IPv6 address, it can also contain a scope ID + * (separated from the address by a `%`). + * + * Returns: a new #GInetSocketAddress, or %NULL if @address cannot be + * parsed. + * Since: 2.40 */ /** - * g_icon_deserialize: - * @value: a #GVariant created with g_icon_serialize() + * g_initable_init: + * @initable: a #GInitable. + * @cancellable: optional #GCancellable object, %NULL to ignore. + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. * - * Deserializes a #GIcon previously serialized using g_icon_serialize(). + * Initializes the object implementing the interface. * - * Returns: (transfer full): a #GIcon, or %NULL when deserialization fails. - * Since: 2.38 + * This method is intended for language bindings. If writing in C, + * g_initable_new() should typically be used instead. + * + * The object must be initialized before any real use after initial + * construction, either with this function or g_async_initable_init_async(). + * + * Implementations may also support cancellation. If @cancellable is not %NULL, + * then initialization can be cancelled by triggering the cancellable object + * from another thread. If the operation was cancelled, the error + * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and + * the object doesn't support cancellable initialization the error + * %G_IO_ERROR_NOT_SUPPORTED will be returned. + * + * If the object is not initialized, or initialization returns with an + * error, then all operations on the object except g_object_ref() and + * g_object_unref() are considered to be invalid, and have undefined + * behaviour. See the [introduction][ginitable] for more details. + * + * Callers should not assume that a class which implements #GInitable can be + * initialized multiple times, unless the class explicitly documents itself as + * supporting this. Generally, a class’ implementation of init() can assume + * (and assert) that it will only be called once. Previously, this documentation + * recommended all #GInitable implementations should be idempotent; that + * recommendation was relaxed in GLib 2.54. + * + * If a class explicitly supports being initialized multiple times, it is + * recommended that the method is idempotent: multiple calls with the same + * arguments should return the same results. Only the first call initializes + * the object; further calls return the result of the first call. + * + * One reason why a class might need to support idempotent initialization is if + * it is designed to be used via the singleton pattern, with a + * #GObjectClass.constructor that sometimes returns an existing instance. + * In this pattern, a caller would expect to be able to call g_initable_init() + * on the result of g_object_new(), regardless of whether it is in fact a new + * instance. + * + * Returns: %TRUE if successful. If an error has occurred, this function will + * return %FALSE and set @error appropriately if present. + * Since: 2.22 */ /** - * g_icon_equal: - * @icon1: (nullable): pointer to the first #GIcon. - * @icon2: (nullable): pointer to the second #GIcon. + * g_initable_new: + * @object_type: a #GType supporting #GInitable. + * @cancellable: optional #GCancellable object, %NULL to ignore. + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. + * @first_property_name: (nullable): the name of the first property, or %NULL if no + * properties + * @...: the value if the first property, followed by and other property + * value pairs, and ended by %NULL. * - * Checks if two icons are equal. + * Helper function for constructing #GInitable object. This is + * similar to g_object_new() but also initializes the object + * and returns %NULL, setting an error on failure. * - * Returns: %TRUE if @icon1 is equal to @icon2. %FALSE otherwise. + * Returns: (type GObject.Object) (transfer full): a newly allocated + * #GObject, or %NULL on error + * Since: 2.22 */ /** - * g_icon_hash: (virtual hash) - * @icon: (not nullable): #gconstpointer to an icon object. + * g_initable_new_valist: + * @object_type: a #GType supporting #GInitable. + * @first_property_name: the name of the first property, followed by + * the value, and other property value pairs, and ended by %NULL. + * @var_args: The var args list generated from @first_property_name. + * @cancellable: optional #GCancellable object, %NULL to ignore. + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. * - * Gets a hash for an icon. + * Helper function for constructing #GInitable object. This is + * similar to g_object_new_valist() but also initializes the object + * and returns %NULL, setting an error on failure. * - * Returns: a #guint containing a hash for the @icon, suitable for - * use in a #GHashTable or similar data structure. + * Returns: (type GObject.Object) (transfer full): a newly allocated + * #GObject, or %NULL on error + * Since: 2.22 */ /** - * g_icon_new_for_string: - * @str: A string obtained via g_icon_to_string(). - * @error: Return location for error. - * - * Generate a #GIcon instance from @str. This function can fail if - * @str is not valid - see g_icon_to_string() for discussion. - * - * If your application or library provides one or more #GIcon - * implementations you need to ensure that each #GType is registered - * with the type system prior to calling g_icon_new_for_string(). + * g_initable_newv: + * @object_type: a #GType supporting #GInitable. + * @n_parameters: the number of parameters in @parameters + * @parameters: (array length=n_parameters): the parameters to use to construct the object + * @cancellable: optional #GCancellable object, %NULL to ignore. + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. * - * Returns: (transfer full): An object implementing the #GIcon - * interface or %NULL if @error is set. - * Since: 2.20 + * Helper function for constructing #GInitable object. This is + * similar to g_object_newv() but also initializes the object + * and returns %NULL, setting an error on failure. + * + * Returns: (type GObject.Object) (transfer full): a newly allocated + * #GObject, or %NULL on error + * Since: 2.22 + * Deprecated: 2.54: Use g_object_new_with_properties() and + * g_initable_init() instead. See #GParameter for more information. */ /** - * g_icon_serialize: - * @icon: a #GIcon - * - * Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved - * back by calling g_icon_deserialize() on the returned value. - * As serialization will avoid using raw icon data when possible, it only - * makes sense to transfer the #GVariant between processes on the same machine, - * (as opposed to over the network), and within the same file system namespace. + * g_input_stream_clear_pending: + * @stream: input stream * - * Returns: (transfer full): a #GVariant, or %NULL when serialization fails. - * Since: 2.38 + * Clears the pending flag on @stream. */ /** - * g_icon_to_string: (virtual to_tokens) - * @icon: a #GIcon. + * g_input_stream_close: + * @stream: A #GInputStream. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: location to store the error occurring, or %NULL to ignore * - * Generates a textual representation of @icon that can be used for - * serialization such as when passing @icon to a different process or - * saving it to persistent storage. Use g_icon_new_for_string() to - * get @icon back from the returned string. + * Closes the stream, releasing resources related to it. * - * The encoding of the returned string is proprietary to #GIcon except - * in the following two cases + * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED. + * Closing a stream multiple times will not return an error. * - * - If @icon is a #GFileIcon, the returned string is a native path - * (such as `/path/to/my icon.png`) without escaping - * if the #GFile for @icon is a native file. If the file is not - * native, the returned string is the result of g_file_get_uri() - * (such as `sftp://path/to/my%20icon.png`). + * Streams will be automatically closed when the last reference + * is dropped, but you might want to call this function to make sure + * resources are released as early as possible. * - * - If @icon is a #GThemedIcon with exactly one name, the encoding is - * simply the name (such as `network-server`). + * Some streams might keep the backing store of the stream (e.g. a file descriptor) + * open after the stream is closed. See the documentation for the individual + * stream for details. * - * Returns: (nullable): An allocated NUL-terminated UTF8 string or - * %NULL if @icon can't be serialized. Use g_free() to free. - * Since: 2.20 - */ - - -/** - * g_inet_address_equal: - * @address: A #GInetAddress. - * @other_address: Another #GInetAddress. + * On failure the first error that happened will be reported, but the close + * operation will finish as much as possible. A stream that failed to + * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it + * is important to check and report the error to the user. * - * Checks if two #GInetAddress instances are equal, e.g. the same address. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + * Cancelling a close will still leave the stream closed, but some streams + * can use a faster close that doesn't block to e.g. check errors. * - * Returns: %TRUE if @address and @other_address are equal, %FALSE otherwise. - * Since: 2.30 + * Returns: %TRUE on success, %FALSE on failure */ /** - * g_inet_address_get_family: - * @address: a #GInetAddress + * g_input_stream_close_async: + * @stream: A #GInputStream. + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): optional cancellable object + * @callback: (scope async): callback to call when the request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Gets @address's family + * Requests an asynchronous closes of the stream, releasing resources related to it. + * When the operation is finished @callback will be called. + * You can then call g_input_stream_close_finish() to get the result of the + * operation. * - * Returns: @address's family - * Since: 2.22 + * For behaviour details see g_input_stream_close(). + * + * The asynchronous methods have a default fallback that uses threads to implement + * asynchronicity, so they are optional for inheriting classes. However, if you + * override one you must override all. */ /** - * g_inet_address_get_is_any: - * @address: a #GInetAddress + * g_input_stream_close_finish: + * @stream: a #GInputStream. + * @result: a #GAsyncResult. + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. * - * Tests whether @address is the "any" address for its family. + * Finishes closing a stream asynchronously, started from g_input_stream_close_async(). * - * Returns: %TRUE if @address is the "any" address for its family. - * Since: 2.22 + * Returns: %TRUE if the stream was closed successfully. */ /** - * g_inet_address_get_is_link_local: - * @address: a #GInetAddress + * g_input_stream_has_pending: + * @stream: input stream. * - * Tests whether @address is a link-local address (that is, if it - * identifies a host on a local network that is not connected to the - * Internet). + * Checks if an input stream has pending actions. * - * Returns: %TRUE if @address is a link-local address. - * Since: 2.22 + * Returns: %TRUE if @stream has pending actions. */ /** - * g_inet_address_get_is_loopback: - * @address: a #GInetAddress + * g_input_stream_is_closed: + * @stream: input stream. * - * Tests whether @address is the loopback address for its family. + * Checks if an input stream is closed. * - * Returns: %TRUE if @address is the loopback address for its family. - * Since: 2.22 + * Returns: %TRUE if the stream is closed. */ /** - * g_inet_address_get_is_mc_global: - * @address: a #GInetAddress + * g_input_stream_read: + * @stream: a #GInputStream. + * @buffer: (array length=count) (element-type guint8) (out caller-allocates): + * a buffer to read data into (which should be at least count bytes long). + * @count: the number of bytes that will be read from the stream + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: location to store the error occurring, or %NULL to ignore * - * Tests whether @address is a global multicast address. + * Tries to read @count bytes from the stream into the buffer starting at + * @buffer. Will block during this read. * - * Returns: %TRUE if @address is a global multicast address. - * Since: 2.22 + * If count is zero returns zero and does nothing. A value of @count + * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error. + * + * On success, the number of bytes read into the buffer is returned. + * It is not an error if this is not the same as the requested size, as it + * can happen e.g. near the end of a file. Zero is returned on end of file + * (or if @count is zero), but never otherwise. + * + * The returned @buffer is not a nul-terminated string, it can contain nul bytes + * at any position, and this function doesn't nul-terminate the @buffer. + * + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an + * operation was partially finished when the operation was cancelled the + * partial result will be returned, without an error. + * + * On error -1 is returned and @error is set accordingly. + * + * Returns: Number of bytes read, or -1 on error, or 0 on end of file. */ /** - * g_inet_address_get_is_mc_link_local: - * @address: a #GInetAddress + * g_input_stream_read_all: + * @stream: a #GInputStream. + * @buffer: (array length=count) (element-type guint8) (out caller-allocates): + * a buffer to read data into (which should be at least count bytes long). + * @count: the number of bytes that will be read from the stream + * @bytes_read: (out): location to store the number of bytes that was read from the stream + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: location to store the error occurring, or %NULL to ignore * - * Tests whether @address is a link-local multicast address. + * Tries to read @count bytes from the stream into the buffer starting at + * @buffer. Will block during this read. * - * Returns: %TRUE if @address is a link-local multicast address. - * Since: 2.22 + * This function is similar to g_input_stream_read(), except it tries to + * read as many bytes as requested, only stopping on an error or end of stream. + * + * On a successful read of @count bytes, or if we reached the end of the + * stream, %TRUE is returned, and @bytes_read is set to the number of bytes + * read into @buffer. + * + * If there is an error during the operation %FALSE is returned and @error + * is set to indicate the error status. + * + * As a special exception to the normal conventions for functions that + * use #GError, if this function returns %FALSE (and sets @error) then + * @bytes_read will be set to the number of bytes that were successfully + * read before the error was encountered. This functionality is only + * available from C. If you need it from another language then you must + * write your own loop around g_input_stream_read(). + * + * Returns: %TRUE on success, %FALSE if there was an error */ /** - * g_inet_address_get_is_mc_node_local: - * @address: a #GInetAddress + * g_input_stream_read_all_async: + * @stream: A #GInputStream + * @buffer: (array length=count) (element-type guint8) (out caller-allocates): + * a buffer to read data into (which should be at least count bytes long) + * @count: the number of bytes that will be read from the stream + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore + * @callback: (scope async): callback to call when the request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Tests whether @address is a node-local multicast address. + * Request an asynchronous read of @count bytes from the stream into the + * buffer starting at @buffer. * - * Returns: %TRUE if @address is a node-local multicast address. - * Since: 2.22 + * This is the asynchronous equivalent of g_input_stream_read_all(). + * + * Call g_input_stream_read_all_finish() to collect the result. + * + * Any outstanding I/O request with higher priority (lower numerical + * value) will be executed before an outstanding request with lower + * priority. Default priority is %G_PRIORITY_DEFAULT. + * + * Since: 2.44 */ /** - * g_inet_address_get_is_mc_org_local: - * @address: a #GInetAddress + * g_input_stream_read_all_finish: + * @stream: a #GInputStream + * @result: a #GAsyncResult + * @bytes_read: (out): location to store the number of bytes that was read from the stream + * @error: a #GError location to store the error occurring, or %NULL to ignore * - * Tests whether @address is an organization-local multicast address. + * Finishes an asynchronous stream read operation started with + * g_input_stream_read_all_async(). * - * Returns: %TRUE if @address is an organization-local multicast address. - * Since: 2.22 + * As a special exception to the normal conventions for functions that + * use #GError, if this function returns %FALSE (and sets @error) then + * @bytes_read will be set to the number of bytes that were successfully + * read before the error was encountered. This functionality is only + * available from C. If you need it from another language then you must + * write your own loop around g_input_stream_read_async(). + * + * Returns: %TRUE on success, %FALSE if there was an error + * Since: 2.44 */ /** - * g_inet_address_get_is_mc_site_local: - * @address: a #GInetAddress + * g_input_stream_read_async: + * @stream: A #GInputStream. + * @buffer: (array length=count) (element-type guint8) (out caller-allocates): + * a buffer to read data into (which should be at least count bytes long). + * @count: the number of bytes that will be read from the stream + * @io_priority: the [I/O priority][io-priority] + * of the request. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (scope async): callback to call when the request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Tests whether @address is a site-local multicast address. + * Request an asynchronous read of @count bytes from the stream into the buffer + * starting at @buffer. When the operation is finished @callback will be called. + * You can then call g_input_stream_read_finish() to get the result of the + * operation. * - * Returns: %TRUE if @address is a site-local multicast address. - * Since: 2.22 + * During an async request no other sync and async calls are allowed on @stream, and will + * result in %G_IO_ERROR_PENDING errors. + * + * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error. + * + * On success, the number of bytes read into the buffer will be passed to the + * callback. It is not an error if this is not the same as the requested size, as it + * can happen e.g. near the end of a file, but generally we try to read + * as many bytes as requested. Zero is returned on end of file + * (or if @count is zero), but never otherwise. + * + * Any outstanding i/o request with higher priority (lower numerical value) will + * be executed before an outstanding request with lower priority. Default + * priority is %G_PRIORITY_DEFAULT. + * + * The asynchronous methods have a default fallback that uses threads to implement + * asynchronicity, so they are optional for inheriting classes. However, if you + * override one you must override all. */ /** - * g_inet_address_get_is_multicast: - * @address: a #GInetAddress + * g_input_stream_read_bytes: + * @stream: a #GInputStream. + * @count: maximum number of bytes that will be read from the stream. Common + * values include 4096 and 8192. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: location to store the error occurring, or %NULL to ignore * - * Tests whether @address is a multicast address. + * Like g_input_stream_read(), this tries to read @count bytes from + * the stream in a blocking fashion. However, rather than reading into + * a user-supplied buffer, this will create a new #GBytes containing + * the data that was read. This may be easier to use from language + * bindings. * - * Returns: %TRUE if @address is a multicast address. - * Since: 2.22 + * If count is zero, returns a zero-length #GBytes and does nothing. A + * value of @count larger than %G_MAXSSIZE will cause a + * %G_IO_ERROR_INVALID_ARGUMENT error. + * + * On success, a new #GBytes is returned. It is not an error if the + * size of this object is not the same as the requested size, as it + * can happen e.g. near the end of a file. A zero-length #GBytes is + * returned on end of file (or if @count is zero), but never + * otherwise. + * + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an + * operation was partially finished when the operation was cancelled the + * partial result will be returned, without an error. + * + * On error %NULL is returned and @error is set accordingly. + * + * Returns: (transfer full): a new #GBytes, or %NULL on error + * Since: 2.34 */ /** - * g_inet_address_get_is_site_local: - * @address: a #GInetAddress + * g_input_stream_read_bytes_async: + * @stream: A #GInputStream. + * @count: the number of bytes that will be read from the stream + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (scope async): callback to call when the request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Tests whether @address is a site-local address such as 10.0.0.1 - * (that is, the address identifies a host on a local network that can - * not be reached directly from the Internet, but which may have - * outgoing Internet connectivity via a NAT or firewall). + * Request an asynchronous read of @count bytes from the stream into a + * new #GBytes. When the operation is finished @callback will be + * called. You can then call g_input_stream_read_bytes_finish() to get the + * result of the operation. * - * Returns: %TRUE if @address is a site-local address. - * Since: 2.22 + * During an async request no other sync and async calls are allowed + * on @stream, and will result in %G_IO_ERROR_PENDING errors. + * + * A value of @count larger than %G_MAXSSIZE will cause a + * %G_IO_ERROR_INVALID_ARGUMENT error. + * + * On success, the new #GBytes will be passed to the callback. It is + * not an error if this is smaller than the requested size, as it can + * happen e.g. near the end of a file, but generally we try to read as + * many bytes as requested. Zero is returned on end of file (or if + * @count is zero), but never otherwise. + * + * Any outstanding I/O request with higher priority (lower numerical + * value) will be executed before an outstanding request with lower + * priority. Default priority is %G_PRIORITY_DEFAULT. + * + * Since: 2.34 */ /** - * g_inet_address_get_native_size: - * @address: a #GInetAddress + * g_input_stream_read_bytes_finish: + * @stream: a #GInputStream. + * @result: a #GAsyncResult. + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. * - * Gets the size of the native raw binary address for @address. This - * is the size of the data that you get from g_inet_address_to_bytes(). + * Finishes an asynchronous stream read-into-#GBytes operation. * - * Returns: the number of bytes used for the native version of @address. - * Since: 2.22 + * Returns: (transfer full): the newly-allocated #GBytes, or %NULL on error + * Since: 2.34 */ /** - * g_inet_address_mask_equal: - * @mask: a #GInetAddressMask - * @mask2: another #GInetAddressMask + * g_input_stream_read_finish: + * @stream: a #GInputStream. + * @result: a #GAsyncResult. + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. * - * Tests if @mask and @mask2 are the same mask. + * Finishes an asynchronous stream read operation. * - * Returns: whether @mask and @mask2 are the same mask - * Since: 2.32 + * Returns: number of bytes read in, or -1 on error, or 0 on end of file. */ /** - * g_inet_address_mask_get_address: - * @mask: a #GInetAddressMask + * g_input_stream_set_pending: + * @stream: input stream + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. * - * Gets @mask's base address + * Sets @stream to have actions pending. If the pending flag is + * already set or @stream is closed, it will return %FALSE and set + * @error. * - * Returns: (transfer none): @mask's base address - * Since: 2.32 + * Returns: %TRUE if pending was previously unset and is now set. */ /** - * g_inet_address_mask_get_family: - * @mask: a #GInetAddressMask + * g_input_stream_skip: + * @stream: a #GInputStream. + * @count: the number of bytes that will be skipped from the stream + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: location to store the error occurring, or %NULL to ignore * - * Gets the #GSocketFamily of @mask's address + * Tries to skip @count bytes from the stream. Will block during the operation. * - * Returns: the #GSocketFamily of @mask's address - * Since: 2.32 + * This is identical to g_input_stream_read(), from a behaviour standpoint, + * but the bytes that are skipped are not returned to the user. Some + * streams have an implementation that is more efficient than reading the data. + * + * This function is optional for inherited classes, as the default implementation + * emulates it using read. + * + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an + * operation was partially finished when the operation was cancelled the + * partial result will be returned, without an error. + * + * Returns: Number of bytes skipped, or -1 on error */ /** - * g_inet_address_mask_get_length: - * @mask: a #GInetAddressMask + * g_input_stream_skip_async: + * @stream: A #GInputStream. + * @count: the number of bytes that will be skipped from the stream + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (scope async): callback to call when the request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Gets @mask's length + * Request an asynchronous skip of @count bytes from the stream. + * When the operation is finished @callback will be called. + * You can then call g_input_stream_skip_finish() to get the result + * of the operation. * - * Returns: @mask's length - * Since: 2.32 + * During an async request no other sync and async calls are allowed, + * and will result in %G_IO_ERROR_PENDING errors. + * + * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error. + * + * On success, the number of bytes skipped will be passed to the callback. + * It is not an error if this is not the same as the requested size, as it + * can happen e.g. near the end of a file, but generally we try to skip + * as many bytes as requested. Zero is returned on end of file + * (or if @count is zero), but never otherwise. + * + * Any outstanding i/o request with higher priority (lower numerical value) + * will be executed before an outstanding request with lower priority. + * Default priority is %G_PRIORITY_DEFAULT. + * + * The asynchronous methods have a default fallback that uses threads to + * implement asynchronicity, so they are optional for inheriting classes. + * However, if you override one, you must override all. */ /** - * g_inet_address_mask_matches: - * @mask: a #GInetAddressMask - * @address: a #GInetAddress + * g_input_stream_skip_finish: + * @stream: a #GInputStream. + * @result: a #GAsyncResult. + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. * - * Tests if @address falls within the range described by @mask. + * Finishes a stream skip operation. * - * Returns: whether @address falls within the range described by - * @mask. - * Since: 2.32 + * Returns: the size of the bytes skipped, or `-1` on error. */ /** - * g_inet_address_mask_new: - * @addr: a #GInetAddress - * @length: number of bits of @addr to use - * @error: return location for #GError, or %NULL + * g_io_error_from_errno: + * @err_no: Error number as defined in errno.h. * - * Creates a new #GInetAddressMask representing all addresses whose - * first @length bits match @addr. + * Converts errno.h error codes into GIO error codes. The fallback + * value %G_IO_ERROR_FAILED is returned for error codes not currently + * handled (but note that future GLib releases may return a more + * specific value instead). * - * Returns: a new #GInetAddressMask, or %NULL on error - * Since: 2.32 + * As %errno is global and may be modified by intermediate function + * calls, you should save its value as soon as the call which sets it + * + * Returns: #GIOErrorEnum value for the given errno.h error number. */ /** - * g_inet_address_mask_new_from_string: - * @mask_string: an IP address or address/length string - * @error: return location for #GError, or %NULL + * g_io_error_from_win32_error: + * @error_code: Windows error number. * - * Parses @mask_string as an IP address and (optional) length, and - * creates a new #GInetAddressMask. The length, if present, is - * delimited by a "/". If it is not present, then the length is - * assumed to be the full length of the address. + * Converts some common error codes (as returned from GetLastError() + * or WSAGetLastError()) into GIO error codes. The fallback value + * %G_IO_ERROR_FAILED is returned for error codes not currently + * handled (but note that future GLib releases may return a more + * specific value instead). * - * Returns: a new #GInetAddressMask corresponding to @string, or %NULL - * on error. - * Since: 2.32 + * You can use g_win32_error_message() to get a localized string + * corresponding to @error_code. (But note that unlike g_strerror(), + * g_win32_error_message() returns a string that must be freed.) + * + * Returns: #GIOErrorEnum value for the given error number. + * Since: 2.26 */ /** - * g_inet_address_mask_to_string: - * @mask: a #GInetAddressMask + * g_io_error_quark: * - * Converts @mask back to its corresponding string form. + * Gets the GIO Error Quark. * - * Returns: a string corresponding to @mask. - * Since: 2.32 + * Returns: a #GQuark. */ /** - * g_inet_address_new_any: - * @family: the address family + * g_io_extension_get_name: + * @extension: a #GIOExtension * - * Creates a #GInetAddress for the "any" address (unassigned/"don't - * care") for @family. + * Gets the name under which @extension was registered. * - * Returns: a new #GInetAddress corresponding to the "any" address - * for @family. - * Free the returned object with g_object_unref(). - * Since: 2.22 + * Note that the same type may be registered as extension + * for multiple extension points, under different names. + * + * Returns: the name of @extension. */ /** - * g_inet_address_new_from_bytes: - * @bytes: (array) (element-type guint8): raw address data - * @family: the address family of @bytes + * g_io_extension_get_priority: + * @extension: a #GIOExtension * - * Creates a new #GInetAddress from the given @family and @bytes. - * @bytes should be 4 bytes for %G_SOCKET_FAMILY_IPV4 and 16 bytes for - * %G_SOCKET_FAMILY_IPV6. + * Gets the priority with which @extension was registered. * - * Returns: a new #GInetAddress corresponding to @family and @bytes. - * Free the returned object with g_object_unref(). - * Since: 2.22 + * Returns: the priority of @extension */ /** - * g_inet_address_new_from_string: - * @string: a string representation of an IP address + * g_io_extension_get_type: + * @extension: a #GIOExtension * - * Parses @string as an IP address and creates a new #GInetAddress. + * Gets the type associated with @extension. * - * Returns: a new #GInetAddress corresponding to @string, or %NULL if - * @string could not be parsed. - * Free the returned object with g_object_unref(). - * Since: 2.22 + * Returns: the type of @extension */ /** - * g_inet_address_new_loopback: - * @family: the address family + * g_io_extension_point_get_extension_by_name: + * @extension_point: a #GIOExtensionPoint + * @name: the name of the extension to get * - * Creates a #GInetAddress for the loopback address for @family. + * Finds a #GIOExtension for an extension point by name. * - * Returns: a new #GInetAddress corresponding to the loopback address - * for @family. - * Free the returned object with g_object_unref(). - * Since: 2.22 + * Returns: (transfer none): the #GIOExtension for @extension_point that has the + * given name, or %NULL if there is no extension with that name */ /** - * g_inet_address_to_bytes: (skip) - * @address: a #GInetAddress + * g_io_extension_point_get_extensions: + * @extension_point: a #GIOExtensionPoint * - * Gets the raw binary address data from @address. + * Gets a list of all extensions that implement this extension point. + * The list is sorted by priority, beginning with the highest priority. * - * Returns: a pointer to an internal array of the bytes in @address, - * which should not be modified, stored, or freed. The size of this - * array can be gotten with g_inet_address_get_native_size(). - * Since: 2.22 + * Returns: (element-type GIOExtension) (transfer none): a #GList of + * #GIOExtensions. The list is owned by GIO and should not be + * modified. */ /** - * g_inet_address_to_string: - * @address: a #GInetAddress + * g_io_extension_point_get_required_type: + * @extension_point: a #GIOExtensionPoint * - * Converts @address to string form. + * Gets the required type for @extension_point. * - * Returns: a representation of @address as a string, which should be - * freed after use. - * Since: 2.22 + * Returns: the #GType that all implementations must have, + * or #G_TYPE_INVALID if the extension point has no required type */ /** - * g_inet_socket_address_get_address: - * @address: a #GInetSocketAddress + * g_io_extension_point_implement: + * @extension_point_name: the name of the extension point + * @type: the #GType to register as extension + * @extension_name: the name for the extension + * @priority: the priority for the extension * - * Gets @address's #GInetAddress. + * Registers @type as extension for the extension point with name + * @extension_point_name. * - * Returns: (transfer none): the #GInetAddress for @address, which must be - * g_object_ref()'d if it will be stored - * Since: 2.22 + * If @type has already been registered as an extension for this + * extension point, the existing #GIOExtension object is returned. + * + * Returns: (transfer none): a #GIOExtension object for #GType */ /** - * g_inet_socket_address_get_flowinfo: - * @address: a %G_SOCKET_FAMILY_IPV6 #GInetSocketAddress + * g_io_extension_point_lookup: + * @name: the name of the extension point * - * Gets the `sin6_flowinfo` field from @address, - * which must be an IPv6 address. + * Looks up an existing extension point. * - * Returns: the flowinfo field - * Since: 2.32 + * Returns: (transfer none): the #GIOExtensionPoint, or %NULL if there + * is no registered extension point with the given name. */ /** - * g_inet_socket_address_get_port: - * @address: a #GInetSocketAddress + * g_io_extension_point_register: + * @name: The name of the extension point * - * Gets @address's port. + * Registers an extension point. * - * Returns: the port for @address - * Since: 2.22 + * Returns: (transfer none): the new #GIOExtensionPoint. This object is + * owned by GIO and should not be freed. */ /** - * g_inet_socket_address_get_scope_id: - * @address: a %G_SOCKET_FAMILY_IPV6 #GInetAddress + * g_io_extension_point_set_required_type: + * @extension_point: a #GIOExtensionPoint + * @type: the #GType to require * - * Gets the `sin6_scope_id` field from @address, - * which must be an IPv6 address. + * Sets the required type for @extension_point to @type. + * All implementations must henceforth have this type. + */ + + +/** + * g_io_extension_ref_class: + * @extension: a #GIOExtension * - * Returns: the scope id field - * Since: 2.32 + * Gets a reference to the class for the type that is + * associated with @extension. + * + * Returns: (transfer full): the #GTypeClass for the type of @extension */ /** - * g_inet_socket_address_new: - * @address: a #GInetAddress - * @port: a port number + * g_io_module_new: + * @filename: (type filename): filename of the shared library module. * - * Creates a new #GInetSocketAddress for @address and @port. + * Creates a new GIOModule that will load the specific + * shared library when in use. * - * Returns: a new #GInetSocketAddress - * Since: 2.22 + * Returns: a #GIOModule from given @filename, + * or %NULL on error. */ /** - * g_inet_socket_address_new_from_string: - * @address: the string form of an IP address - * @port: a port number + * g_io_module_scope_block: + * @scope: a module loading scope + * @basename: the basename to block * - * Creates a new #GInetSocketAddress for @address and @port. + * Block modules with the given @basename from being loaded when + * this scope is used with g_io_modules_scan_all_in_directory_with_scope() + * or g_io_modules_load_all_in_directory_with_scope(). * - * If @address is an IPv6 address, it can also contain a scope ID - * (separated from the address by a `%`). + * Since: 2.30 + */ + + +/** + * g_io_module_scope_free: + * @scope: a module loading scope * - * Returns: a new #GInetSocketAddress, or %NULL if @address cannot be - * parsed. - * Since: 2.40 + * Free a module scope. + * + * Since: 2.30 */ /** - * g_initable_init: - * @initable: a #GInitable. - * @cancellable: optional #GCancellable object, %NULL to ignore. - * @error: a #GError location to store the error occurring, or %NULL to - * ignore. + * g_io_module_scope_new: + * @flags: flags for the new scope * - * Initializes the object implementing the interface. + * Create a new scope for loading of IO modules. A scope can be used for + * blocking duplicate modules, or blocking a module you don't want to load. * - * This method is intended for language bindings. If writing in C, - * g_initable_new() should typically be used instead. + * Specify the %G_IO_MODULE_SCOPE_BLOCK_DUPLICATES flag to block modules + * which have the same base name as a module that has already been seen + * in this scope. * - * The object must be initialized before any real use after initial - * construction, either with this function or g_async_initable_init_async(). + * Returns: (transfer full): the new module scope + * Since: 2.30 + */ + + +/** + * g_io_modules_load_all_in_directory: + * @dirname: (type filename): pathname for a directory containing modules + * to load. * - * Implementations may also support cancellation. If @cancellable is not %NULL, - * then initialization can be cancelled by triggering the cancellable object - * from another thread. If the operation was cancelled, the error - * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and - * the object doesn't support cancellable initialization the error - * %G_IO_ERROR_NOT_SUPPORTED will be returned. + * Loads all the modules in the specified directory. * - * If the object is not initialized, or initialization returns with an - * error, then all operations on the object except g_object_ref() and - * g_object_unref() are considered to be invalid, and have undefined - * behaviour. See the [introduction][ginitable] for more details. + * If don't require all modules to be initialized (and thus registering + * all gtypes) then you can use g_io_modules_scan_all_in_directory() + * which allows delayed/lazy loading of modules. * - * Callers should not assume that a class which implements #GInitable can be - * initialized multiple times, unless the class explicitly documents itself as - * supporting this. Generally, a class’ implementation of init() can assume - * (and assert) that it will only be called once. Previously, this documentation - * recommended all #GInitable implementations should be idempotent; that - * recommendation was relaxed in GLib 2.54. + * Returns: (element-type GIOModule) (transfer full): a list of #GIOModules loaded + * from the directory, + * All the modules are loaded into memory, if you want to + * unload them (enabling on-demand loading) you must call + * g_type_module_unuse() on all the modules. Free the list + * with g_list_free(). + */ + + +/** + * g_io_modules_load_all_in_directory_with_scope: + * @dirname: (type filename): pathname for a directory containing modules + * to load. + * @scope: a scope to use when scanning the modules. * - * If a class explicitly supports being initialized multiple times, it is - * recommended that the method is idempotent: multiple calls with the same - * arguments should return the same results. Only the first call initializes - * the object; further calls return the result of the first call. + * Loads all the modules in the specified directory. * - * One reason why a class might need to support idempotent initialization is if - * it is designed to be used via the singleton pattern, with a - * #GObjectClass.constructor that sometimes returns an existing instance. - * In this pattern, a caller would expect to be able to call g_initable_init() - * on the result of g_object_new(), regardless of whether it is in fact a new - * instance. + * If don't require all modules to be initialized (and thus registering + * all gtypes) then you can use g_io_modules_scan_all_in_directory() + * which allows delayed/lazy loading of modules. * - * Returns: %TRUE if successful. If an error has occurred, this function will - * return %FALSE and set @error appropriately if present. - * Since: 2.22 + * Returns: (element-type GIOModule) (transfer full): a list of #GIOModules loaded + * from the directory, + * All the modules are loaded into memory, if you want to + * unload them (enabling on-demand loading) you must call + * g_type_module_unuse() on all the modules. Free the list + * with g_list_free(). + * Since: 2.30 */ /** - * g_initable_new: - * @object_type: a #GType supporting #GInitable. - * @cancellable: optional #GCancellable object, %NULL to ignore. - * @error: a #GError location to store the error occurring, or %NULL to - * ignore. - * @first_property_name: (nullable): the name of the first property, or %NULL if no - * properties - * @...: the value if the first property, followed by and other property - * value pairs, and ended by %NULL. + * g_io_modules_scan_all_in_directory: + * @dirname: (type filename): pathname for a directory containing modules + * to scan. * - * Helper function for constructing #GInitable object. This is - * similar to g_object_new() but also initializes the object - * and returns %NULL, setting an error on failure. + * Scans all the modules in the specified directory, ensuring that + * any extension point implemented by a module is registered. * - * Returns: (type GObject.Object) (transfer full): a newly allocated - * #GObject, or %NULL on error - * Since: 2.22 + * This may not actually load and initialize all the types in each + * module, some modules may be lazily loaded and initialized when + * an extension point it implementes is used with e.g. + * g_io_extension_point_get_extensions() or + * g_io_extension_point_get_extension_by_name(). + * + * If you need to guarantee that all types are loaded in all the modules, + * use g_io_modules_load_all_in_directory(). + * + * Since: 2.24 */ /** - * g_initable_new_valist: - * @object_type: a #GType supporting #GInitable. - * @first_property_name: the name of the first property, followed by - * the value, and other property value pairs, and ended by %NULL. - * @var_args: The var args list generated from @first_property_name. - * @cancellable: optional #GCancellable object, %NULL to ignore. - * @error: a #GError location to store the error occurring, or %NULL to - * ignore. + * g_io_modules_scan_all_in_directory_with_scope: + * @dirname: (type filename): pathname for a directory containing modules + * to scan. + * @scope: a scope to use when scanning the modules * - * Helper function for constructing #GInitable object. This is - * similar to g_object_new_valist() but also initializes the object - * and returns %NULL, setting an error on failure. + * Scans all the modules in the specified directory, ensuring that + * any extension point implemented by a module is registered. * - * Returns: (type GObject.Object) (transfer full): a newly allocated - * #GObject, or %NULL on error - * Since: 2.22 + * This may not actually load and initialize all the types in each + * module, some modules may be lazily loaded and initialized when + * an extension point it implementes is used with e.g. + * g_io_extension_point_get_extensions() or + * g_io_extension_point_get_extension_by_name(). + * + * If you need to guarantee that all types are loaded in all the modules, + * use g_io_modules_load_all_in_directory(). + * + * Since: 2.30 */ /** - * g_initable_newv: - * @object_type: a #GType supporting #GInitable. - * @n_parameters: the number of parameters in @parameters - * @parameters: (array length=n_parameters): the parameters to use to construct the object + * g_io_scheduler_cancel_all_jobs: + * + * Cancels all cancellable I/O jobs. + * + * A job is cancellable if a #GCancellable was passed into + * g_io_scheduler_push_job(). + * + * Deprecated: You should never call this function, since you don't + * know how other libraries in your program might be making use of + * gioscheduler. + */ + + +/** + * g_io_scheduler_job_send_to_mainloop: + * @job: a #GIOSchedulerJob + * @func: a #GSourceFunc callback that will be called in the original thread + * @user_data: data to pass to @func + * @notify: (nullable): a #GDestroyNotify for @user_data, or %NULL + * + * Used from an I/O job to send a callback to be run in the thread + * that the job was started from, waiting for the result (and thus + * blocking the I/O job). + * + * Returns: The return value of @func + * Deprecated: Use g_main_context_invoke(). + */ + + +/** + * g_io_scheduler_job_send_to_mainloop_async: + * @job: a #GIOSchedulerJob + * @func: a #GSourceFunc callback that will be called in the original thread + * @user_data: data to pass to @func + * @notify: (nullable): a #GDestroyNotify for @user_data, or %NULL + * + * Used from an I/O job to send a callback to be run asynchronously in + * the thread that the job was started from. The callback will be run + * when the main loop is available, but at that time the I/O job might + * have finished. The return value from the callback is ignored. + * + * Note that if you are passing the @user_data from g_io_scheduler_push_job() + * on to this function you have to ensure that it is not freed before + * @func is called, either by passing %NULL as @notify to + * g_io_scheduler_push_job() or by using refcounting for @user_data. + * + * Deprecated: Use g_main_context_invoke(). + */ + + +/** + * g_io_scheduler_push_job: + * @job_func: a #GIOSchedulerJobFunc. + * @user_data: data to pass to @job_func + * @notify: (nullable): a #GDestroyNotify for @user_data, or %NULL + * @io_priority: the [I/O priority][io-priority] + * of the request. * @cancellable: optional #GCancellable object, %NULL to ignore. - * @error: a #GError location to store the error occurring, or %NULL to - * ignore. * - * Helper function for constructing #GInitable object. This is - * similar to g_object_newv() but also initializes the object - * and returns %NULL, setting an error on failure. + * Schedules the I/O job to run in another thread. * - * Returns: (type GObject.Object) (transfer full): a newly allocated - * #GObject, or %NULL on error - * Since: 2.22 - * Deprecated: 2.54: Use g_object_new_with_properties() and - * g_initable_init() instead. See #GParameter for more information. + * @notify will be called on @user_data after @job_func has returned, + * regardless whether the job was cancelled or has run to completion. + * + * If @cancellable is not %NULL, it can be used to cancel the I/O job + * by calling g_cancellable_cancel() or by calling + * g_io_scheduler_cancel_all_jobs(). + * + * Deprecated: use #GThreadPool or g_task_run_in_thread() */ /** - * g_input_stream_clear_pending: - * @stream: input stream + * g_io_stream_clear_pending: + * @stream: a #GIOStream * * Clears the pending flag on @stream. + * + * Since: 2.22 */ /** - * g_input_stream_close: - * @stream: A #GInputStream. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * g_io_stream_close: + * @stream: a #GIOStream + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore * @error: location to store the error occurring, or %NULL to ignore * - * Closes the stream, releasing resources related to it. + * Closes the stream, releasing resources related to it. This will also + * close the individual input and output streams, if they are not already + * closed. * - * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED. - * Closing a stream multiple times will not return an error. + * Once the stream is closed, all other operations will return + * %G_IO_ERROR_CLOSED. Closing a stream multiple times will not + * return an error. + * + * Closing a stream will automatically flush any outstanding buffers + * in the stream. * * Streams will be automatically closed when the last reference * is dropped, but you might want to call this function to make sure * resources are released as early as possible. * - * Some streams might keep the backing store of the stream (e.g. a file descriptor) - * open after the stream is closed. See the documentation for the individual - * stream for details. + * Some streams might keep the backing store of the stream (e.g. a file + * descriptor) open after the stream is closed. See the documentation for + * the individual stream for details. * - * On failure the first error that happened will be reported, but the close - * operation will finish as much as possible. A stream that failed to - * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it - * is important to check and report the error to the user. + * On failure the first error that happened will be reported, but the + * close operation will finish as much as possible. A stream that failed + * to close will still return %G_IO_ERROR_CLOSED for all operations. + * Still, it is important to check and report the error to the user, + * otherwise there might be a loss of data as all data might not be written. * - * If @cancellable is not %NULL, then the operation can be cancelled by + * If @cancellable is not NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * Cancelling a close will still leave the stream closed, but some streams * can use a faster close that doesn't block to e.g. check errors. * + * The default implementation of this method just calls close on the + * individual input/output streams. + * * Returns: %TRUE on success, %FALSE on failure + * Since: 2.22 */ /** - * g_input_stream_close_async: - * @stream: A #GInputStream. - * @io_priority: the [I/O priority][io-priority] of the request + * g_io_stream_close_async: + * @stream: a #GIOStream + * @io_priority: the io priority of the request * @cancellable: (nullable): optional cancellable object * @callback: (scope async): callback to call when the request is satisfied * @user_data: (closure): the data to pass to callback function * - * Requests an asynchronous closes of the stream, releasing resources related to it. - * When the operation is finished @callback will be called. - * You can then call g_input_stream_close_finish() to get the result of the - * operation. + * Requests an asynchronous close of the stream, releasing resources + * related to it. When the operation is finished @callback will be + * called. You can then call g_io_stream_close_finish() to get + * the result of the operation. * - * For behaviour details see g_input_stream_close(). + * For behaviour details see g_io_stream_close(). * - * The asynchronous methods have a default fallback that uses threads to implement - * asynchronicity, so they are optional for inheriting classes. However, if you - * override one you must override all. + * The asynchronous methods have a default fallback that uses threads + * to implement asynchronicity, so they are optional for inheriting + * classes. However, if you override one you must override all. + * + * Since: 2.22 */ /** - * g_input_stream_close_finish: - * @stream: a #GInputStream. - * @result: a #GAsyncResult. + * g_io_stream_close_finish: + * @stream: a #GIOStream + * @result: a #GAsyncResult * @error: a #GError location to store the error occurring, or %NULL to - * ignore. + * ignore * - * Finishes closing a stream asynchronously, started from g_input_stream_close_async(). + * Closes a stream. * - * Returns: %TRUE if the stream was closed successfully. + * Returns: %TRUE if stream was successfully closed, %FALSE otherwise. + * Since: 2.22 */ /** - * g_input_stream_has_pending: - * @stream: input stream. + * g_io_stream_get_input_stream: + * @stream: a #GIOStream * - * Checks if an input stream has pending actions. + * Gets the input stream for this object. This is used + * for reading. * - * Returns: %TRUE if @stream has pending actions. + * Returns: (transfer none): a #GInputStream, owned by the #GIOStream. + * Do not free. + * Since: 2.22 */ /** - * g_input_stream_is_closed: - * @stream: input stream. + * g_io_stream_get_output_stream: + * @stream: a #GIOStream * - * Checks if an input stream is closed. + * Gets the output stream for this object. This is used for + * writing. * - * Returns: %TRUE if the stream is closed. + * Returns: (transfer none): a #GOutputStream, owned by the #GIOStream. + * Do not free. + * Since: 2.22 */ /** - * g_input_stream_read: - * @stream: a #GInputStream. - * @buffer: (array length=count) (element-type guint8): a buffer to - * read data into (which should be at least count bytes long). - * @count: the number of bytes that will be read from the stream - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: location to store the error occurring, or %NULL to ignore + * g_io_stream_has_pending: + * @stream: a #GIOStream * - * Tries to read @count bytes from the stream into the buffer starting at - * @buffer. Will block during this read. + * Checks if a stream has pending actions. * - * If count is zero returns zero and does nothing. A value of @count - * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error. - * - * On success, the number of bytes read into the buffer is returned. - * It is not an error if this is not the same as the requested size, as it - * can happen e.g. near the end of a file. Zero is returned on end of file - * (or if @count is zero), but never otherwise. - * - * The returned @buffer is not a nul-terminated string, it can contain nul bytes - * at any position, and this function doesn't nul-terminate the @buffer. - * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an - * operation was partially finished when the operation was cancelled the - * partial result will be returned, without an error. - * - * On error -1 is returned and @error is set accordingly. - * - * Returns: Number of bytes read, or -1 on error, or 0 on end of file. + * Returns: %TRUE if @stream has pending actions. + * Since: 2.22 */ /** - * g_input_stream_read_all: - * @stream: a #GInputStream. - * @buffer: (array length=count) (element-type guint8): a buffer to - * read data into (which should be at least count bytes long). - * @count: the number of bytes that will be read from the stream - * @bytes_read: (out): location to store the number of bytes that was read from the stream - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: location to store the error occurring, or %NULL to ignore - * - * Tries to read @count bytes from the stream into the buffer starting at - * @buffer. Will block during this read. - * - * This function is similar to g_input_stream_read(), except it tries to - * read as many bytes as requested, only stopping on an error or end of stream. - * - * On a successful read of @count bytes, or if we reached the end of the - * stream, %TRUE is returned, and @bytes_read is set to the number of bytes - * read into @buffer. - * - * If there is an error during the operation %FALSE is returned and @error - * is set to indicate the error status. + * g_io_stream_is_closed: + * @stream: a #GIOStream * - * As a special exception to the normal conventions for functions that - * use #GError, if this function returns %FALSE (and sets @error) then - * @bytes_read will be set to the number of bytes that were successfully - * read before the error was encountered. This functionality is only - * available from C. If you need it from another language then you must - * write your own loop around g_input_stream_read(). + * Checks if a stream is closed. * - * Returns: %TRUE on success, %FALSE if there was an error + * Returns: %TRUE if the stream is closed. + * Since: 2.22 */ /** - * g_input_stream_read_all_async: - * @stream: A #GInputStream - * @buffer: (array length=count) (element-type guint8): a buffer to - * read data into (which should be at least count bytes long) - * @count: the number of bytes that will be read from the stream - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore - * @callback: (scope async): callback to call when the request is satisfied - * @user_data: (closure): the data to pass to callback function - * - * Request an asynchronous read of @count bytes from the stream into the - * buffer starting at @buffer. - * - * This is the asynchronous equivalent of g_input_stream_read_all(). - * - * Call g_input_stream_read_all_finish() to collect the result. + * g_io_stream_set_pending: + * @stream: a #GIOStream + * @error: a #GError location to store the error occurring, or %NULL to + * ignore * - * Any outstanding I/O request with higher priority (lower numerical - * value) will be executed before an outstanding request with lower - * priority. Default priority is %G_PRIORITY_DEFAULT. + * Sets @stream to have actions pending. If the pending flag is + * already set or @stream is closed, it will return %FALSE and set + * @error. * - * Since: 2.44 + * Returns: %TRUE if pending was previously unset and is now set. + * Since: 2.22 */ /** - * g_input_stream_read_all_finish: - * @stream: a #GInputStream - * @result: a #GAsyncResult - * @bytes_read: (out): location to store the number of bytes that was read from the stream - * @error: a #GError location to store the error occurring, or %NULL to ignore + * g_io_stream_splice_async: + * @stream1: a #GIOStream. + * @stream2: a #GIOStream. + * @flags: a set of #GIOStreamSpliceFlags. + * @io_priority: the io priority of the request. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (scope async): a #GAsyncReadyCallback. + * @user_data: (closure): user data passed to @callback. * - * Finishes an asynchronous stream read operation started with - * g_input_stream_read_all_async(). + * Asyncronously splice the output stream of @stream1 to the input stream of + * @stream2, and splice the output stream of @stream2 to the input stream of + * @stream1. * - * As a special exception to the normal conventions for functions that - * use #GError, if this function returns %FALSE (and sets @error) then - * @bytes_read will be set to the number of bytes that were successfully - * read before the error was encountered. This functionality is only - * available from C. If you need it from another language then you must - * write your own loop around g_input_stream_read_async(). + * When the operation is finished @callback will be called. + * You can then call g_io_stream_splice_finish() to get the + * result of the operation. * - * Returns: %TRUE on success, %FALSE if there was an error - * Since: 2.44 + * Since: 2.28 */ /** - * g_input_stream_read_async: - * @stream: A #GInputStream. - * @buffer: (array length=count) (element-type guint8): a buffer to - * read data into (which should be at least count bytes long). - * @count: the number of bytes that will be read from the stream - * @io_priority: the [I/O priority][io-priority] - * of the request. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (scope async): callback to call when the request is satisfied - * @user_data: (closure): the data to pass to callback function - * - * Request an asynchronous read of @count bytes from the stream into the buffer - * starting at @buffer. When the operation is finished @callback will be called. - * You can then call g_input_stream_read_finish() to get the result of the - * operation. - * - * During an async request no other sync and async calls are allowed on @stream, and will - * result in %G_IO_ERROR_PENDING errors. - * - * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error. - * - * On success, the number of bytes read into the buffer will be passed to the - * callback. It is not an error if this is not the same as the requested size, as it - * can happen e.g. near the end of a file, but generally we try to read - * as many bytes as requested. Zero is returned on end of file - * (or if @count is zero), but never otherwise. + * g_io_stream_splice_finish: + * @result: a #GAsyncResult. + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. * - * Any outstanding i/o request with higher priority (lower numerical value) will - * be executed before an outstanding request with lower priority. Default - * priority is %G_PRIORITY_DEFAULT. + * Finishes an asynchronous io stream splice operation. * - * The asynchronous methods have a default fallback that uses threads to implement - * asynchronicity, so they are optional for inheriting classes. However, if you - * override one you must override all. + * Returns: %TRUE on success, %FALSE otherwise. + * Since: 2.28 */ /** - * g_input_stream_read_bytes: - * @stream: a #GInputStream. - * @count: maximum number of bytes that will be read from the stream. Common - * values include 4096 and 8192. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: location to store the error occurring, or %NULL to ignore + * g_keyfile_settings_backend_new: + * @filename: the filename of the keyfile + * @root_path: the path under which all settings keys appear + * @root_group: (nullable): the group name corresponding to + * @root_path, or %NULL * - * Like g_input_stream_read(), this tries to read @count bytes from - * the stream in a blocking fashion. However, rather than reading into - * a user-supplied buffer, this will create a new #GBytes containing - * the data that was read. This may be easier to use from language - * bindings. + * Creates a keyfile-backed #GSettingsBackend. * - * If count is zero, returns a zero-length #GBytes and does nothing. A - * value of @count larger than %G_MAXSSIZE will cause a - * %G_IO_ERROR_INVALID_ARGUMENT error. + * The filename of the keyfile to use is given by @filename. * - * On success, a new #GBytes is returned. It is not an error if the - * size of this object is not the same as the requested size, as it - * can happen e.g. near the end of a file. A zero-length #GBytes is - * returned on end of file (or if @count is zero), but never - * otherwise. + * All settings read to or written from the backend must fall under the + * path given in @root_path (which must start and end with a slash and + * not contain two consecutive slashes). @root_path may be "/". * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an - * operation was partially finished when the operation was cancelled the - * partial result will be returned, without an error. + * If @root_group is non-%NULL then it specifies the name of the keyfile + * group used for keys that are written directly below @root_path. For + * example, if @root_path is "/apps/example/" and @root_group is + * "toplevel", then settings the key "/apps/example/enabled" to a value + * of %TRUE will cause the following to appear in the keyfile: * - * On error %NULL is returned and @error is set accordingly. + * |[ + * [toplevel] + * enabled=true + * ]| * - * Returns: (transfer full): a new #GBytes, or %NULL on error - * Since: 2.34 - */ - - -/** - * g_input_stream_read_bytes_async: - * @stream: A #GInputStream. - * @count: the number of bytes that will be read from the stream - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (scope async): callback to call when the request is satisfied - * @user_data: (closure): the data to pass to callback function + * If @root_group is %NULL then it is not permitted to store keys + * directly below the @root_path. * - * Request an asynchronous read of @count bytes from the stream into a - * new #GBytes. When the operation is finished @callback will be - * called. You can then call g_input_stream_read_bytes_finish() to get the - * result of the operation. + * For keys not stored directly below @root_path (ie: in a sub-path), + * the name of the subpath (with the final slash stripped) is used as + * the name of the keyfile group. To continue the example, if + * "/apps/example/profiles/default/font-size" were set to + * 12 then the following would appear in the keyfile: * - * During an async request no other sync and async calls are allowed - * on @stream, and will result in %G_IO_ERROR_PENDING errors. + * |[ + * [profiles/default] + * font-size=12 + * ]| * - * A value of @count larger than %G_MAXSSIZE will cause a - * %G_IO_ERROR_INVALID_ARGUMENT error. + * The backend will refuse writes (and return writability as being + * %FALSE) for keys outside of @root_path and, in the event that + * @root_group is %NULL, also for keys directly under @root_path. + * Writes will also be refused if the backend detects that it has the + * inability to rewrite the keyfile (ie: the containing directory is not + * writable). * - * On success, the new #GBytes will be passed to the callback. It is - * not an error if this is smaller than the requested size, as it can - * happen e.g. near the end of a file, but generally we try to read as - * many bytes as requested. Zero is returned on end of file (or if - * @count is zero), but never otherwise. + * There is no checking done for your key namespace clashing with the + * syntax of the key file format. For example, if you have '[' or ']' + * characters in your path names or '=' in your key names you may be in + * trouble. * - * Any outstanding I/O request with higher priority (lower numerical - * value) will be executed before an outstanding request with lower - * priority. Default priority is %G_PRIORITY_DEFAULT. + * The backend reads default values from a keyfile called `defaults` in + * the directory specified by the #GKeyfileSettingsBackend:defaults-dir property, + * and a list of locked keys from a text file with the name `locks` in + * the same location. * - * Since: 2.34 + * Returns: (transfer full): a keyfile-backed #GSettingsBackend */ /** - * g_input_stream_read_bytes_finish: - * @stream: a #GInputStream. - * @result: a #GAsyncResult. - * @error: a #GError location to store the error occurring, or %NULL to - * ignore. + * g_list_model_get_item: (skip) + * @list: a #GListModel + * @position: the position of the item to fetch * - * Finishes an asynchronous stream read-into-#GBytes operation. + * Get the item at @position. If @position is greater than the number of + * items in @list, %NULL is returned. * - * Returns: (transfer full): the newly-allocated #GBytes, or %NULL on error - * Since: 2.34 + * %NULL is never returned for an index that is smaller than the length + * of the list. See g_list_model_get_n_items(). + * + * Returns: (transfer full) (nullable): the item at @position. + * Since: 2.44 */ /** - * g_input_stream_read_finish: - * @stream: a #GInputStream. - * @result: a #GAsyncResult. - * @error: a #GError location to store the error occurring, or %NULL to - * ignore. + * g_list_model_get_item_type: + * @list: a #GListModel * - * Finishes an asynchronous stream read operation. + * Gets the type of the items in @list. All items returned from + * g_list_model_get_type() are of that type or a subtype, or are an + * implementation of that interface. * - * Returns: number of bytes read in, or -1 on error, or 0 on end of file. + * The item type of a #GListModel can not change during the life of the + * model. + * + * Returns: the #GType of the items contained in @list. + * Since: 2.44 */ /** - * g_input_stream_set_pending: - * @stream: input stream - * @error: a #GError location to store the error occurring, or %NULL to - * ignore. + * g_list_model_get_n_items: + * @list: a #GListModel * - * Sets @stream to have actions pending. If the pending flag is - * already set or @stream is closed, it will return %FALSE and set - * @error. + * Gets the number of items in @list. * - * Returns: %TRUE if pending was previously unset and is now set. + * Depending on the model implementation, calling this function may be + * less efficient than iterating the list with increasing values for + * @position until g_list_model_get_item() returns %NULL. + * + * Returns: the number of items in @list. + * Since: 2.44 */ /** - * g_input_stream_skip: - * @stream: a #GInputStream. - * @count: the number of bytes that will be skipped from the stream - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: location to store the error occurring, or %NULL to ignore - * - * Tries to skip @count bytes from the stream. Will block during the operation. - * - * This is identical to g_input_stream_read(), from a behaviour standpoint, - * but the bytes that are skipped are not returned to the user. Some - * streams have an implementation that is more efficient than reading the data. + * g_list_model_get_object: (rename-to g_list_model_get_item) + * @list: a #GListModel + * @position: the position of the item to fetch * - * This function is optional for inherited classes, as the default implementation - * emulates it using read. + * Get the item at @position. If @position is greater than the number of + * items in @list, %NULL is returned. * - * If @cancellable is not %NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an - * operation was partially finished when the operation was cancelled the - * partial result will be returned, without an error. + * %NULL is never returned for an index that is smaller than the length + * of the list. See g_list_model_get_n_items(). * - * Returns: Number of bytes skipped, or -1 on error + * Returns: (transfer full) (nullable): the object at @position. + * Since: 2.44 */ /** - * g_input_stream_skip_async: - * @stream: A #GInputStream. - * @count: the number of bytes that will be skipped from the stream - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (scope async): callback to call when the request is satisfied - * @user_data: (closure): the data to pass to callback function - * - * Request an asynchronous skip of @count bytes from the stream. - * When the operation is finished @callback will be called. - * You can then call g_input_stream_skip_finish() to get the result - * of the operation. + * g_list_model_items_changed: + * @list: a #GListModel + * @position: the position at which @list changed + * @removed: the number of items removed + * @added: the number of items added * - * During an async request no other sync and async calls are allowed, - * and will result in %G_IO_ERROR_PENDING errors. + * Emits the #GListModel::items-changed signal on @list. * - * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error. + * This function should only be called by classes implementing + * #GListModel. It has to be called after the internal representation + * of @list has been updated, because handlers connected to this signal + * might query the new state of the list. * - * On success, the number of bytes skipped will be passed to the callback. - * It is not an error if this is not the same as the requested size, as it - * can happen e.g. near the end of a file, but generally we try to skip - * as many bytes as requested. Zero is returned on end of file - * (or if @count is zero), but never otherwise. + * Implementations must only make changes to the model (as visible to + * its consumer) in places that will not cause problems for that + * consumer. For models that are driven directly by a write API (such + * as #GListStore), changes can be reported in response to uses of that + * API. For models that represent remote data, changes should only be + * made from a fresh mainloop dispatch. It is particularly not + * permitted to make changes in response to a call to the #GListModel + * consumer API. * - * Any outstanding i/o request with higher priority (lower numerical value) - * will be executed before an outstanding request with lower priority. - * Default priority is %G_PRIORITY_DEFAULT. + * Stated another way: in general, it is assumed that code making a + * series of accesses to the model via the API, without returning to the + * mainloop, and without calling other code, will continue to view the + * same contents of the model. * - * The asynchronous methods have a default fallback that uses threads to - * implement asynchronicity, so they are optional for inheriting classes. - * However, if you override one, you must override all. + * Since: 2.44 */ /** - * g_input_stream_skip_finish: - * @stream: a #GInputStream. - * @result: a #GAsyncResult. - * @error: a #GError location to store the error occurring, or %NULL to - * ignore. - * - * Finishes a stream skip operation. + * g_list_store_append: + * @store: a #GListStore + * @item: (type GObject): the new item * - * Returns: the size of the bytes skipped, or %-1 on error. - */ - - -/** - * g_io_error_from_errno: - * @err_no: Error number as defined in errno.h. + * Appends @item to @store. @item must be of type #GListStore:item-type. * - * Converts errno.h error codes into GIO error codes. The fallback - * value %G_IO_ERROR_FAILED is returned for error codes not currently - * handled (but note that future GLib releases may return a more - * specific value instead). + * This function takes a ref on @item. * - * As %errno is global and may be modified by intermediate function - * calls, you should save its value as soon as the call which sets it + * Use g_list_store_splice() to append multiple items at the same time + * efficiently. * - * Returns: #GIOErrorEnum value for the given errno.h error number. + * Since: 2.44 */ /** - * g_io_error_from_win32_error: - * @error_code: Windows error number. + * g_list_store_find: + * @store: a #GListStore + * @item: (type GObject): an item + * @position: (out) (optional): the first position of @item, if it was found. * - * Converts some common error codes (as returned from GetLastError() - * or WSAGetLastError()) into GIO error codes. The fallback value - * %G_IO_ERROR_FAILED is returned for error codes not currently - * handled (but note that future GLib releases may return a more - * specific value instead). + * Looks up the given @item in the list store by looping over the items until + * the first occurrence of @item. If @item was not found, then @position will + * not be set, and this method will return %FALSE. * - * You can use g_win32_error_message() to get a localized string - * corresponding to @error_code. (But note that unlike g_strerror(), - * g_win32_error_message() returns a string that must be freed.) + * If you need to compare the two items with a custom comparison function, use + * g_list_store_find_with_equal_func() with a custom #GEqualFunc instead. * - * Returns: #GIOErrorEnum value for the given error number. - * Since: 2.26 + * Returns: Whether @store contains @item. If it was found, @position will be + * set to the position where @item occurred for the first time. + * Since: 2.64 */ /** - * g_io_error_quark: - * - * Gets the GIO Error Quark. - * - * Returns: a #GQuark. + * g_list_store_find_with_equal_func: + * @store: a #GListStore + * @item: (type GObject): an item + * @equal_func: (scope call): A custom equality check function + * @position: (out) (optional): the first position of @item, if it was found. + * + * Looks up the given @item in the list store by looping over the items and + * comparing them with @compare_func until the first occurrence of @item which + * matches. If @item was not found, then @position will not be set, and this + * method will return %FALSE. + * + * Returns: Whether @store contains @item. If it was found, @position will be + * set to the position where @item occurred for the first time. + * Since: 2.64 */ /** - * g_io_extension_get_name: - * @extension: a #GIOExtension + * g_list_store_insert: + * @store: a #GListStore + * @position: the position at which to insert the new item + * @item: (type GObject): the new item * - * Gets the name under which @extension was registered. + * Inserts @item into @store at @position. @item must be of type + * #GListStore:item-type or derived from it. @position must be smaller + * than the length of the list, or equal to it to append. * - * Note that the same type may be registered as extension - * for multiple extension points, under different names. + * This function takes a ref on @item. * - * Returns: the name of @extension. + * Use g_list_store_splice() to insert multiple items at the same time + * efficiently. + * + * Since: 2.44 */ /** - * g_io_extension_get_priority: - * @extension: a #GIOExtension + * g_list_store_insert_sorted: + * @store: a #GListStore + * @item: (type GObject): the new item + * @compare_func: (scope call): pairwise comparison function for sorting + * @user_data: (closure): user data for @compare_func * - * Gets the priority with which @extension was registered. + * Inserts @item into @store at a position to be determined by the + * @compare_func. * - * Returns: the priority of @extension + * The list must already be sorted before calling this function or the + * result is undefined. Usually you would approach this by only ever + * inserting items by way of this function. + * + * This function takes a ref on @item. + * + * Returns: the position at which @item was inserted + * Since: 2.44 */ /** - * g_io_extension_get_type: - * @extension: a #GIOExtension + * g_list_store_new: + * @item_type: the #GType of items in the list * - * Gets the type associated with @extension. + * Creates a new #GListStore with items of type @item_type. @item_type + * must be a subclass of #GObject. * - * Returns: the type of @extension + * Returns: a new #GListStore + * Since: 2.44 */ /** - * g_io_extension_point_get_extension_by_name: - * @extension_point: a #GIOExtensionPoint - * @name: the name of the extension to get + * g_list_store_remove: + * @store: a #GListStore + * @position: the position of the item that is to be removed * - * Finds a #GIOExtension for an extension point by name. + * Removes the item from @store that is at @position. @position must be + * smaller than the current length of the list. * - * Returns: (transfer none): the #GIOExtension for @extension_point that has the - * given name, or %NULL if there is no extension with that name + * Use g_list_store_splice() to remove multiple items at the same time + * efficiently. + * + * Since: 2.44 */ /** - * g_io_extension_point_get_extensions: - * @extension_point: a #GIOExtensionPoint + * g_list_store_remove_all: + * @store: a #GListStore * - * Gets a list of all extensions that implement this extension point. - * The list is sorted by priority, beginning with the highest priority. + * Removes all items from @store. * - * Returns: (element-type GIOExtension) (transfer none): a #GList of - * #GIOExtensions. The list is owned by GIO and should not be - * modified. + * Since: 2.44 */ /** - * g_io_extension_point_get_required_type: - * @extension_point: a #GIOExtensionPoint + * g_list_store_sort: + * @store: a #GListStore + * @compare_func: (scope call): pairwise comparison function for sorting + * @user_data: (closure): user data for @compare_func * - * Gets the required type for @extension_point. + * Sort the items in @store according to @compare_func. * - * Returns: the #GType that all implementations must have, - * or #G_TYPE_INVALID if the extension point has no required type + * Since: 2.46 */ /** - * g_io_extension_point_implement: - * @extension_point_name: the name of the extension point - * @type: the #GType to register as extension - * @extension_name: the name for the extension - * @priority: the priority for the extension - * - * Registers @type as extension for the extension point with name - * @extension_point_name. - * - * If @type has already been registered as an extension for this - * extension point, the existing #GIOExtension object is returned. + * g_list_store_splice: + * @store: a #GListStore + * @position: the position at which to make the change + * @n_removals: the number of items to remove + * @additions: (array length=n_additions) (element-type GObject): the items to add + * @n_additions: the number of items to add * - * Returns: (transfer none): a #GIOExtension object for #GType - */ - - -/** - * g_io_extension_point_lookup: - * @name: the name of the extension point + * Changes @store by removing @n_removals items and adding @n_additions + * items to it. @additions must contain @n_additions items of type + * #GListStore:item-type. %NULL is not permitted. * - * Looks up an existing extension point. + * This function is more efficient than g_list_store_insert() and + * g_list_store_remove(), because it only emits + * #GListModel::items-changed once for the change. * - * Returns: (transfer none): the #GIOExtensionPoint, or %NULL if there - * is no registered extension point with the given name. - */ - - -/** - * g_io_extension_point_register: - * @name: The name of the extension point + * This function takes a ref on each item in @additions. * - * Registers an extension point. + * The parameters @position and @n_removals must be correct (ie: + * @position + @n_removals must be less than or equal to the length of + * the list at the time this function is called). * - * Returns: (transfer none): the new #GIOExtensionPoint. This object is - * owned by GIO and should not be freed. + * Since: 2.44 */ /** - * g_io_extension_point_set_required_type: - * @extension_point: a #GIOExtensionPoint - * @type: the #GType to require + * g_loadable_icon_load: + * @icon: a #GLoadableIcon. + * @size: an integer. + * @type: (out) (optional): a location to store the type of the loaded + * icon, %NULL to ignore. + * @cancellable: (nullable): optional #GCancellable object, %NULL to + * ignore. + * @error: a #GError location to store the error occurring, or %NULL + * to ignore. * - * Sets the required type for @extension_point to @type. - * All implementations must henceforth have this type. + * Loads a loadable icon. For the asynchronous version of this function, + * see g_loadable_icon_load_async(). + * + * Returns: (transfer full): a #GInputStream to read the icon from. */ /** - * g_io_extension_ref_class: - * @extension: a #GIOExtension - * - * Gets a reference to the class for the type that is - * associated with @extension. + * g_loadable_icon_load_async: + * @icon: a #GLoadableIcon. + * @size: an integer. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (scope async): a #GAsyncReadyCallback to call when the + * request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Returns: (transfer full): the #GTypeClass for the type of @extension + * Loads an icon asynchronously. To finish this function, see + * g_loadable_icon_load_finish(). For the synchronous, blocking + * version of this function, see g_loadable_icon_load(). */ /** - * g_io_module_new: - * @filename: (type filename): filename of the shared library module. + * g_loadable_icon_load_finish: + * @icon: a #GLoadableIcon. + * @res: a #GAsyncResult. + * @type: (out) (optional): a location to store the type of the loaded + * icon, %NULL to ignore. + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. * - * Creates a new GIOModule that will load the specific - * shared library when in use. + * Finishes an asynchronous icon load started in g_loadable_icon_load_async(). * - * Returns: a #GIOModule from given @filename, - * or %NULL on error. + * Returns: (transfer full): a #GInputStream to read the icon from. */ /** - * g_io_module_scope_block: - * @scope: a module loading scope - * @basename: the basename to block + * g_local_vfs_new: * - * Block modules with the given @basename from being loaded when - * this scope is used with g_io_modules_scan_all_in_directory_with_scope() - * or g_io_modules_load_all_in_directory_with_scope(). + * Returns a new #GVfs handle for a local vfs. * - * Since: 2.30 + * Returns: a new #GVfs handle. */ /** - * g_io_module_scope_free: - * @scope: a module loading scope + * g_memory_input_stream_add_bytes: + * @stream: a #GMemoryInputStream + * @bytes: input data * - * Free a module scope. + * Appends @bytes to data that can be read from the input stream. * - * Since: 2.30 + * Since: 2.34 */ /** - * g_io_module_scope_new: - * @flags: flags for the new scope - * - * Create a new scope for loading of IO modules. A scope can be used for - * blocking duplicate modules, or blocking a module you don't want to load. - * - * Specify the %G_IO_MODULE_SCOPE_BLOCK_DUPLICATES flag to block modules - * which have the same base name as a module that has already been seen - * in this scope. + * g_memory_input_stream_add_data: + * @stream: a #GMemoryInputStream + * @data: (array length=len) (element-type guint8) (transfer full): input data + * @len: length of the data, may be -1 if @data is a nul-terminated string + * @destroy: (nullable): function that is called to free @data, or %NULL * - * Returns: (transfer full): the new module scope - * Since: 2.30 + * Appends @data to data that can be read from the input stream */ /** - * g_io_modules_load_all_in_directory: - * @dirname: (type filename): pathname for a directory containing modules - * to load. - * - * Loads all the modules in the specified directory. + * g_memory_input_stream_new: * - * If don't require all modules to be initialized (and thus registering - * all gtypes) then you can use g_io_modules_scan_all_in_directory() - * which allows delayed/lazy loading of modules. + * Creates a new empty #GMemoryInputStream. * - * Returns: (element-type GIOModule) (transfer full): a list of #GIOModules loaded - * from the directory, - * All the modules are loaded into memory, if you want to - * unload them (enabling on-demand loading) you must call - * g_type_module_unuse() on all the modules. Free the list - * with g_list_free(). + * Returns: a new #GInputStream */ /** - * g_io_modules_load_all_in_directory_with_scope: - * @dirname: (type filename): pathname for a directory containing modules - * to load. - * @scope: a scope to use when scanning the modules. - * - * Loads all the modules in the specified directory. + * g_memory_input_stream_new_from_bytes: + * @bytes: a #GBytes * - * If don't require all modules to be initialized (and thus registering - * all gtypes) then you can use g_io_modules_scan_all_in_directory() - * which allows delayed/lazy loading of modules. + * Creates a new #GMemoryInputStream with data from the given @bytes. * - * Returns: (element-type GIOModule) (transfer full): a list of #GIOModules loaded - * from the directory, - * All the modules are loaded into memory, if you want to - * unload them (enabling on-demand loading) you must call - * g_type_module_unuse() on all the modules. Free the list - * with g_list_free(). - * Since: 2.30 + * Returns: new #GInputStream read from @bytes + * Since: 2.34 */ /** - * g_io_modules_scan_all_in_directory: - * @dirname: (type filename): pathname for a directory containing modules - * to scan. - * - * Scans all the modules in the specified directory, ensuring that - * any extension point implemented by a module is registered. - * - * This may not actually load and initialize all the types in each - * module, some modules may be lazily loaded and initialized when - * an extension point it implementes is used with e.g. - * g_io_extension_point_get_extensions() or - * g_io_extension_point_get_extension_by_name(). + * g_memory_input_stream_new_from_data: + * @data: (array length=len) (element-type guint8) (transfer full): input data + * @len: length of the data, may be -1 if @data is a nul-terminated string + * @destroy: (nullable): function that is called to free @data, or %NULL * - * If you need to guarantee that all types are loaded in all the modules, - * use g_io_modules_load_all_in_directory(). + * Creates a new #GMemoryInputStream with data in memory of a given size. * - * Since: 2.24 + * Returns: new #GInputStream read from @data of @len bytes. */ /** - * g_io_modules_scan_all_in_directory_with_scope: - * @dirname: (type filename): pathname for a directory containing modules - * to scan. - * @scope: a scope to use when scanning the modules - * - * Scans all the modules in the specified directory, ensuring that - * any extension point implemented by a module is registered. - * - * This may not actually load and initialize all the types in each - * module, some modules may be lazily loaded and initialized when - * an extension point it implementes is used with e.g. - * g_io_extension_point_get_extensions() or - * g_io_extension_point_get_extension_by_name(). + * g_memory_monitor_dup_default: * - * If you need to guarantee that all types are loaded in all the modules, - * use g_io_modules_load_all_in_directory(). + * Gets a reference to the default #GMemoryMonitor for the system. * - * Since: 2.30 + * Returns: (transfer full): a new reference to the default #GMemoryMonitor + * Since: 2.64 */ /** - * g_io_scheduler_cancel_all_jobs: + * g_memory_output_stream_get_data: + * @ostream: a #GMemoryOutputStream * - * Cancels all cancellable I/O jobs. + * Gets any loaded data from the @ostream. * - * A job is cancellable if a #GCancellable was passed into - * g_io_scheduler_push_job(). + * Note that the returned pointer may become invalid on the next + * write or truncate operation on the stream. * - * Deprecated: You should never call this function, since you don't - * know how other libraries in your program might be making use of - * gioscheduler. + * Returns: (transfer none): pointer to the stream's data, or %NULL if the data + * has been stolen */ /** - * g_io_scheduler_job_send_to_mainloop: - * @job: a #GIOSchedulerJob - * @func: a #GSourceFunc callback that will be called in the original thread - * @user_data: data to pass to @func - * @notify: (nullable): a #GDestroyNotify for @user_data, or %NULL + * g_memory_output_stream_get_data_size: + * @ostream: a #GMemoryOutputStream * - * Used from an I/O job to send a callback to be run in the thread - * that the job was started from, waiting for the result (and thus - * blocking the I/O job). + * Returns the number of bytes from the start up to including the last + * byte written in the stream that has not been truncated away. * - * Returns: The return value of @func - * Deprecated: Use g_main_context_invoke(). + * Returns: the number of bytes written to the stream + * Since: 2.18 */ /** - * g_io_scheduler_job_send_to_mainloop_async: - * @job: a #GIOSchedulerJob - * @func: a #GSourceFunc callback that will be called in the original thread - * @user_data: data to pass to @func - * @notify: (nullable): a #GDestroyNotify for @user_data, or %NULL - * - * Used from an I/O job to send a callback to be run asynchronously in - * the thread that the job was started from. The callback will be run - * when the main loop is available, but at that time the I/O job might - * have finished. The return value from the callback is ignored. - * - * Note that if you are passing the @user_data from g_io_scheduler_push_job() - * on to this function you have to ensure that it is not freed before - * @func is called, either by passing %NULL as @notify to - * g_io_scheduler_push_job() or by using refcounting for @user_data. + * g_memory_output_stream_get_size: + * @ostream: a #GMemoryOutputStream * - * Deprecated: Use g_main_context_invoke(). - */ - - -/** - * g_io_scheduler_push_job: - * @job_func: a #GIOSchedulerJobFunc. - * @user_data: data to pass to @job_func - * @notify: (nullable): a #GDestroyNotify for @user_data, or %NULL - * @io_priority: the [I/O priority][io-priority] - * of the request. - * @cancellable: optional #GCancellable object, %NULL to ignore. + * Gets the size of the currently allocated data area (available from + * g_memory_output_stream_get_data()). * - * Schedules the I/O job to run in another thread. + * You probably don't want to use this function on resizable streams. + * See g_memory_output_stream_get_data_size() instead. For resizable + * streams the size returned by this function is an implementation + * detail and may be change at any time in response to operations on the + * stream. * - * @notify will be called on @user_data after @job_func has returned, - * regardless whether the job was cancelled or has run to completion. + * If the stream is fixed-sized (ie: no realloc was passed to + * g_memory_output_stream_new()) then this is the maximum size of the + * stream and further writes will return %G_IO_ERROR_NO_SPACE. * - * If @cancellable is not %NULL, it can be used to cancel the I/O job - * by calling g_cancellable_cancel() or by calling - * g_io_scheduler_cancel_all_jobs(). + * In any case, if you want the number of bytes currently written to the + * stream, use g_memory_output_stream_get_data_size(). * - * Deprecated: use #GThreadPool or g_task_run_in_thread() + * Returns: the number of bytes allocated for the data buffer */ /** - * g_io_stream_clear_pending: - * @stream: a #GIOStream - * - * Clears the pending flag on @stream. + * g_memory_output_stream_new: (skip) + * @data: (nullable): pointer to a chunk of memory to use, or %NULL + * @size: the size of @data + * @realloc_function: (nullable): a function with realloc() semantics (like g_realloc()) + * to be called when @data needs to be grown, or %NULL + * @destroy_function: (nullable): a function to be called on @data when the stream is + * finalized, or %NULL * - * Since: 2.22 - */ - - -/** - * g_io_stream_close: - * @stream: a #GIOStream - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore - * @error: location to store the error occurring, or %NULL to ignore + * Creates a new #GMemoryOutputStream. * - * Closes the stream, releasing resources related to it. This will also - * close the individual input and output streams, if they are not already - * closed. + * In most cases this is not the function you want. See + * g_memory_output_stream_new_resizable() instead. * - * Once the stream is closed, all other operations will return - * %G_IO_ERROR_CLOSED. Closing a stream multiple times will not - * return an error. + * If @data is non-%NULL, the stream will use that for its internal storage. * - * Closing a stream will automatically flush any outstanding buffers - * in the stream. + * If @realloc_fn is non-%NULL, it will be used for resizing the internal + * storage when necessary and the stream will be considered resizable. + * In that case, the stream will start out being (conceptually) empty. + * @size is used only as a hint for how big @data is. Specifically, + * seeking to the end of a newly-created stream will seek to zero, not + * @size. Seeking past the end of the stream and then writing will + * introduce a zero-filled gap. * - * Streams will be automatically closed when the last reference - * is dropped, but you might want to call this function to make sure - * resources are released as early as possible. + * If @realloc_fn is %NULL then the stream is fixed-sized. Seeking to + * the end will seek to @size exactly. Writing past the end will give + * an 'out of space' error. Attempting to seek past the end will fail. + * Unlike the resizable case, seeking to an offset within the stream and + * writing will preserve the bytes passed in as @data before that point + * and will return them as part of g_memory_output_stream_steal_data(). + * If you intend to seek you should probably therefore ensure that @data + * is properly initialised. * - * Some streams might keep the backing store of the stream (e.g. a file - * descriptor) open after the stream is closed. See the documentation for - * the individual stream for details. + * It is probably only meaningful to provide @data and @size in the case + * that you want a fixed-sized stream. Put another way: if @realloc_fn + * is non-%NULL then it makes most sense to give @data as %NULL and + * @size as 0 (allowing #GMemoryOutputStream to do the initial + * allocation for itself). * - * On failure the first error that happened will be reported, but the - * close operation will finish as much as possible. A stream that failed - * to close will still return %G_IO_ERROR_CLOSED for all operations. - * Still, it is important to check and report the error to the user, - * otherwise there might be a loss of data as all data might not be written. + * |[ + * // a stream that can grow + * stream = g_memory_output_stream_new (NULL, 0, realloc, free); * - * If @cancellable is not NULL, then the operation can be cancelled by - * triggering the cancellable object from another thread. If the operation - * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. - * Cancelling a close will still leave the stream closed, but some streams - * can use a faster close that doesn't block to e.g. check errors. + * // another stream that can grow + * stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free); * - * The default implementation of this method just calls close on the - * individual input/output streams. + * // a fixed-size stream + * data = malloc (200); + * stream3 = g_memory_output_stream_new (data, 200, NULL, free); + * ]| * - * Returns: %TRUE on success, %FALSE on failure - * Since: 2.22 + * Returns: A newly created #GMemoryOutputStream object. */ /** - * g_io_stream_close_async: - * @stream: a #GIOStream - * @io_priority: the io priority of the request - * @cancellable: (nullable): optional cancellable object - * @callback: (scope async): callback to call when the request is satisfied - * @user_data: (closure): the data to pass to callback function - * - * Requests an asynchronous close of the stream, releasing resources - * related to it. When the operation is finished @callback will be - * called. You can then call g_io_stream_close_finish() to get - * the result of the operation. - * - * For behaviour details see g_io_stream_close(). + * g_memory_output_stream_new_resizable: * - * The asynchronous methods have a default fallback that uses threads - * to implement asynchronicity, so they are optional for inheriting - * classes. However, if you override one you must override all. + * Creates a new #GMemoryOutputStream, using g_realloc() and g_free() + * for memory allocation. * - * Since: 2.22 + * Since: 2.36 */ /** - * g_io_stream_close_finish: - * @stream: a #GIOStream - * @result: a #GAsyncResult - * @error: a #GError location to store the error occurring, or %NULL to - * ignore + * g_memory_output_stream_steal_as_bytes: + * @ostream: a #GMemoryOutputStream * - * Closes a stream. + * Returns data from the @ostream as a #GBytes. @ostream must be + * closed before calling this function. * - * Returns: %TRUE if stream was successfully closed, %FALSE otherwise. - * Since: 2.22 + * Returns: (transfer full): the stream's data + * Since: 2.34 */ /** - * g_io_stream_get_input_stream: - * @stream: a #GIOStream + * g_memory_output_stream_steal_data: + * @ostream: a #GMemoryOutputStream * - * Gets the input stream for this object. This is used - * for reading. + * Gets any loaded data from the @ostream. Ownership of the data + * is transferred to the caller; when no longer needed it must be + * freed using the free function set in @ostream's + * #GMemoryOutputStream:destroy-function property. * - * Returns: (transfer none): a #GInputStream, owned by the #GIOStream. - * Do not free. - * Since: 2.22 + * @ostream must be closed before calling this function. + * + * Returns: (transfer full): the stream's data, or %NULL if it has previously + * been stolen + * Since: 2.26 */ /** - * g_io_stream_get_output_stream: - * @stream: a #GIOStream + * g_memory_settings_backend_new: * - * Gets the output stream for this object. This is used for - * writing. + * Creates a memory-backed #GSettingsBackend. * - * Returns: (transfer none): a #GOutputStream, owned by the #GIOStream. - * Do not free. - * Since: 2.22 + * This backend allows changes to settings, but does not write them + * to any backing storage, so the next time you run your application, + * the memory backend will start out with the default values again. + * + * Returns: (transfer full): a newly created #GSettingsBackend + * Since: 2.28 */ /** - * g_io_stream_has_pending: - * @stream: a #GIOStream + * g_menu_append: + * @menu: a #GMenu + * @label: (nullable): the section label, or %NULL + * @detailed_action: (nullable): the detailed action string, or %NULL * - * Checks if a stream has pending actions. + * Convenience function for appending a normal menu item to the end of + * @menu. Combine g_menu_item_new() and g_menu_insert_item() for a more + * flexible alternative. * - * Returns: %TRUE if @stream has pending actions. - * Since: 2.22 + * Since: 2.32 */ /** - * g_io_stream_is_closed: - * @stream: a #GIOStream + * g_menu_append_item: + * @menu: a #GMenu + * @item: a #GMenuItem to append * - * Checks if a stream is closed. + * Appends @item to the end of @menu. * - * Returns: %TRUE if the stream is closed. - * Since: 2.22 + * See g_menu_insert_item() for more information. + * + * Since: 2.32 */ /** - * g_io_stream_set_pending: - * @stream: a #GIOStream - * @error: a #GError location to store the error occurring, or %NULL to - * ignore + * g_menu_append_section: + * @menu: a #GMenu + * @label: (nullable): the section label, or %NULL + * @section: a #GMenuModel with the items of the section * - * Sets @stream to have actions pending. If the pending flag is - * already set or @stream is closed, it will return %FALSE and set - * @error. + * Convenience function for appending a section menu item to the end of + * @menu. Combine g_menu_item_new_section() and g_menu_insert_item() for a + * more flexible alternative. * - * Returns: %TRUE if pending was previously unset and is now set. - * Since: 2.22 + * Since: 2.32 */ /** - * g_io_stream_splice_async: - * @stream1: a #GIOStream. - * @stream2: a #GIOStream. - * @flags: a set of #GIOStreamSpliceFlags. - * @io_priority: the io priority of the request. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (scope async): a #GAsyncReadyCallback. - * @user_data: (closure): user data passed to @callback. - * - * Asyncronously splice the output stream of @stream1 to the input stream of - * @stream2, and splice the output stream of @stream2 to the input stream of - * @stream1. + * g_menu_append_submenu: + * @menu: a #GMenu + * @label: (nullable): the section label, or %NULL + * @submenu: a #GMenuModel with the items of the submenu * - * When the operation is finished @callback will be called. - * You can then call g_io_stream_splice_finish() to get the - * result of the operation. + * Convenience function for appending a submenu menu item to the end of + * @menu. Combine g_menu_item_new_submenu() and g_menu_insert_item() for a + * more flexible alternative. * - * Since: 2.28 + * Since: 2.32 */ /** - * g_io_stream_splice_finish: - * @result: a #GAsyncResult. - * @error: a #GError location to store the error occurring, or %NULL to - * ignore. + * g_menu_attribute_iter_get_name: + * @iter: a #GMenuAttributeIter * - * Finishes an asynchronous io stream splice operation. + * Gets the name of the attribute at the current iterator position, as + * a string. * - * Returns: %TRUE on success, %FALSE otherwise. - * Since: 2.28 + * The iterator is not advanced. + * + * Returns: the name of the attribute + * Since: 2.32 */ /** - * g_keyfile_settings_backend_new: - * @filename: the filename of the keyfile - * @root_path: the path under which all settings keys appear - * @root_group: (nullable): the group name corresponding to - * @root_path, or %NULL - * - * Creates a keyfile-backed #GSettingsBackend. - * - * The filename of the keyfile to use is given by @filename. - * - * All settings read to or written from the backend must fall under the - * path given in @root_path (which must start and end with a slash and - * not contain two consecutive slashes). @root_path may be "/". - * - * If @root_group is non-%NULL then it specifies the name of the keyfile - * group used for keys that are written directly below @root_path. For - * example, if @root_path is "/apps/example/" and @root_group is - * "toplevel", then settings the key "/apps/example/enabled" to a value - * of %TRUE will cause the following to appear in the keyfile: - * - * |[ - * [toplevel] - * enabled=true - * ]| - * - * If @root_group is %NULL then it is not permitted to store keys - * directly below the @root_path. + * g_menu_attribute_iter_get_next: + * @iter: a #GMenuAttributeIter + * @out_name: (out) (optional) (transfer none): the type of the attribute + * @value: (out) (optional) (transfer full): the attribute value * - * For keys not stored directly below @root_path (ie: in a sub-path), - * the name of the subpath (with the final slash stripped) is used as - * the name of the keyfile group. To continue the example, if - * "/apps/example/profiles/default/font-size" were set to - * 12 then the following would appear in the keyfile: + * This function combines g_menu_attribute_iter_next() with + * g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value(). * - * |[ - * [profiles/default] - * font-size=12 - * ]| + * First the iterator is advanced to the next (possibly first) attribute. + * If that fails, then %FALSE is returned and there are no other + * effects. * - * The backend will refuse writes (and return writability as being - * %FALSE) for keys outside of @root_path and, in the event that - * @root_group is %NULL, also for keys directly under @root_path. - * Writes will also be refused if the backend detects that it has the - * inability to rewrite the keyfile (ie: the containing directory is not - * writable). + * If successful, @name and @value are set to the name and value of the + * attribute that has just been advanced to. At this point, + * g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value() will + * return the same values again. * - * There is no checking done for your key namespace clashing with the - * syntax of the key file format. For example, if you have '[' or ']' - * characters in your path names or '=' in your key names you may be in - * trouble. + * The value returned in @name remains valid for as long as the iterator + * remains at the current position. The value returned in @value must + * be unreffed using g_variant_unref() when it is no longer in use. * - * Returns: (transfer full): a keyfile-backed #GSettingsBackend + * Returns: %TRUE on success, or %FALSE if there is no additional + * attribute + * Since: 2.32 */ /** - * g_list_model_get_item: (skip) - * @list: a #GListModel - * @position: the position of the item to fetch + * g_menu_attribute_iter_get_value: + * @iter: a #GMenuAttributeIter * - * Get the item at @position. If @position is greater than the number of - * items in @list, %NULL is returned. + * Gets the value of the attribute at the current iterator position. * - * %NULL is never returned for an index that is smaller than the length - * of the list. See g_list_model_get_n_items(). + * The iterator is not advanced. * - * Returns: (transfer full) (nullable): the item at @position. - * Since: 2.44 + * Returns: (transfer full): the value of the current attribute + * Since: 2.32 */ /** - * g_list_model_get_item_type: - * @list: a #GListModel + * g_menu_attribute_iter_next: + * @iter: a #GMenuAttributeIter * - * Gets the type of the items in @list. All items returned from - * g_list_model_get_type() are of that type or a subtype, or are an - * implementation of that interface. + * Attempts to advance the iterator to the next (possibly first) + * attribute. * - * The item type of a #GListModel can not change during the life of the - * model. + * %TRUE is returned on success, or %FALSE if there are no more + * attributes. * - * Returns: the #GType of the items contained in @list. - * Since: 2.44 + * You must call this function when you first acquire the iterator + * to advance it to the first attribute (and determine if the first + * attribute exists at all). + * + * Returns: %TRUE on success, or %FALSE when there are no more attributes + * Since: 2.32 */ /** - * g_list_model_get_n_items: - * @list: a #GListModel + * g_menu_freeze: + * @menu: a #GMenu * - * Gets the number of items in @list. + * Marks @menu as frozen. * - * Depending on the model implementation, calling this function may be - * less efficient than iterating the list with increasing values for - * @position until g_list_model_get_item() returns %NULL. + * After the menu is frozen, it is an error to attempt to make any + * changes to it. In effect this means that the #GMenu API must no + * longer be used. * - * Returns: the number of items in @list. - * Since: 2.44 + * This function causes g_menu_model_is_mutable() to begin returning + * %FALSE, which has some positive performance implications. + * + * Since: 2.32 */ /** - * g_list_model_get_object: (rename-to g_list_model_get_item) - * @list: a #GListModel - * @position: the position of the item to fetch - * - * Get the item at @position. If @position is greater than the number of - * items in @list, %NULL is returned. + * g_menu_insert: + * @menu: a #GMenu + * @position: the position at which to insert the item + * @label: (nullable): the section label, or %NULL + * @detailed_action: (nullable): the detailed action string, or %NULL * - * %NULL is never returned for an index that is smaller than the length - * of the list. See g_list_model_get_n_items(). + * Convenience function for inserting a normal menu item into @menu. + * Combine g_menu_item_new() and g_menu_insert_item() for a more flexible + * alternative. * - * Returns: (transfer full) (nullable): the object at @position. - * Since: 2.44 + * Since: 2.32 */ /** - * g_list_model_items_changed: - * @list: a #GListModel - * @position: the position at which @list changed - * @removed: the number of items removed - * @added: the number of items added + * g_menu_insert_item: + * @menu: a #GMenu + * @position: the position at which to insert the item + * @item: the #GMenuItem to insert * - * Emits the #GListModel::items-changed signal on @list. + * Inserts @item into @menu. * - * This function should only be called by classes implementing - * #GListModel. It has to be called after the internal representation - * of @list has been updated, because handlers connected to this signal - * might query the new state of the list. + * The "insertion" is actually done by copying all of the attribute and + * link values of @item and using them to form a new item within @menu. + * As such, @item itself is not really inserted, but rather, a menu item + * that is exactly the same as the one presently described by @item. * - * Implementations must only make changes to the model (as visible to - * its consumer) in places that will not cause problems for that - * consumer. For models that are driven directly by a write API (such - * as #GListStore), changes can be reported in response to uses of that - * API. For models that represent remote data, changes should only be - * made from a fresh mainloop dispatch. It is particularly not - * permitted to make changes in response to a call to the #GListModel - * consumer API. + * This means that @item is essentially useless after the insertion + * occurs. Any changes you make to it are ignored unless it is inserted + * again (at which point its updated values will be copied). * - * Stated another way: in general, it is assumed that code making a - * series of accesses to the model via the API, without returning to the - * mainloop, and without calling other code, will continue to view the - * same contents of the model. + * You should probably just free @item once you're done. * - * Since: 2.44 + * There are many convenience functions to take care of common cases. + * See g_menu_insert(), g_menu_insert_section() and + * g_menu_insert_submenu() as well as "prepend" and "append" variants of + * each of these functions. + * + * Since: 2.32 */ /** - * g_list_store_append: - * @store: a #GListStore - * @item: (type GObject): the new item - * - * Appends @item to @store. @item must be of type #GListStore:item-type. - * - * This function takes a ref on @item. + * g_menu_insert_section: + * @menu: a #GMenu + * @position: the position at which to insert the item + * @label: (nullable): the section label, or %NULL + * @section: a #GMenuModel with the items of the section * - * Use g_list_store_splice() to append multiple items at the same time - * efficiently. + * Convenience function for inserting a section menu item into @menu. + * Combine g_menu_item_new_section() and g_menu_insert_item() for a more + * flexible alternative. * - * Since: 2.44 + * Since: 2.32 */ /** - * g_list_store_insert: - * @store: a #GListStore - * @position: the position at which to insert the new item - * @item: (type GObject): the new item - * - * Inserts @item into @store at @position. @item must be of type - * #GListStore:item-type or derived from it. @position must be smaller - * than the length of the list, or equal to it to append. - * - * This function takes a ref on @item. + * g_menu_insert_submenu: + * @menu: a #GMenu + * @position: the position at which to insert the item + * @label: (nullable): the section label, or %NULL + * @submenu: a #GMenuModel with the items of the submenu * - * Use g_list_store_splice() to insert multiple items at the same time - * efficiently. + * Convenience function for inserting a submenu menu item into @menu. + * Combine g_menu_item_new_submenu() and g_menu_insert_item() for a more + * flexible alternative. * - * Since: 2.44 + * Since: 2.32 */ /** - * g_list_store_insert_sorted: - * @store: a #GListStore - * @item: (type GObject): the new item - * @compare_func: (scope call): pairwise comparison function for sorting - * @user_data: (closure): user data for @compare_func + * g_menu_item_get_attribute: + * @menu_item: a #GMenuItem + * @attribute: the attribute name to query + * @format_string: a #GVariant format string + * @...: positional parameters, as per @format_string * - * Inserts @item into @store at a position to be determined by the - * @compare_func. + * Queries the named @attribute on @menu_item. * - * The list must already be sorted before calling this function or the - * result is undefined. Usually you would approach this by only ever - * inserting items by way of this function. + * If the attribute exists and matches the #GVariantType corresponding + * to @format_string then @format_string is used to deconstruct the + * value into the positional parameters and %TRUE is returned. * - * This function takes a ref on @item. + * If the attribute does not exist, or it does exist but has the wrong + * type, then the positional parameters are ignored and %FALSE is + * returned. * - * Returns: the position at which @item was inserted - * Since: 2.44 + * Returns: %TRUE if the named attribute was found with the expected + * type + * Since: 2.34 */ /** - * g_list_store_new: - * @item_type: the #GType of items in the list + * g_menu_item_get_attribute_value: + * @menu_item: a #GMenuItem + * @attribute: the attribute name to query + * @expected_type: (nullable): the expected type of the attribute * - * Creates a new #GListStore with items of type @item_type. @item_type - * must be a subclass of #GObject. + * Queries the named @attribute on @menu_item. * - * Returns: a new #GListStore - * Since: 2.44 + * If @expected_type is specified and the attribute does not have this + * type, %NULL is returned. %NULL is also returned if the attribute + * simply does not exist. + * + * Returns: (transfer full): the attribute value, or %NULL + * Since: 2.34 */ /** - * g_list_store_remove: - * @store: a #GListStore - * @position: the position of the item that is to be removed - * - * Removes the item from @store that is at @position. @position must be - * smaller than the current length of the list. + * g_menu_item_get_link: + * @menu_item: a #GMenuItem + * @link: the link name to query * - * Use g_list_store_splice() to remove multiple items at the same time - * efficiently. + * Queries the named @link on @menu_item. * - * Since: 2.44 + * Returns: (transfer full): the link, or %NULL + * Since: 2.34 */ /** - * g_list_store_remove_all: - * @store: a #GListStore + * g_menu_item_new: + * @label: (nullable): the section label, or %NULL + * @detailed_action: (nullable): the detailed action string, or %NULL * - * Removes all items from @store. + * Creates a new #GMenuItem. * - * Since: 2.44 - */ - - -/** - * g_list_store_sort: - * @store: a #GListStore - * @compare_func: (scope call): pairwise comparison function for sorting - * @user_data: (closure): user data for @compare_func + * If @label is non-%NULL it is used to set the "label" attribute of the + * new item. * - * Sort the items in @store according to @compare_func. + * If @detailed_action is non-%NULL it is used to set the "action" and + * possibly the "target" attribute of the new item. See + * g_menu_item_set_detailed_action() for more information. * - * Since: 2.46 + * Returns: a new #GMenuItem + * Since: 2.32 */ /** - * g_list_store_splice: - * @store: a #GListStore - * @position: the position at which to make the change - * @n_removals: the number of items to remove - * @additions: (array length=n_additions) (element-type GObject): the items to add - * @n_additions: the number of items to add - * - * Changes @store by removing @n_removals items and adding @n_additions - * items to it. @additions must contain @n_additions items of type - * #GListStore:item-type. %NULL is not permitted. - * - * This function is more efficient than g_list_store_insert() and - * g_list_store_remove(), because it only emits - * #GListModel::items-changed once for the change. + * g_menu_item_new_from_model: + * @model: a #GMenuModel + * @item_index: the index of an item in @model * - * This function takes a ref on each item in @additions. + * Creates a #GMenuItem as an exact copy of an existing menu item in a + * #GMenuModel. * - * The parameters @position and @n_removals must be correct (ie: - * @position + @n_removals must be less than or equal to the length of - * the list at the time this function is called). + * @item_index must be valid (ie: be sure to call + * g_menu_model_get_n_items() first). * - * Since: 2.44 + * Returns: a new #GMenuItem. + * Since: 2.34 */ /** - * g_loadable_icon_load: - * @icon: a #GLoadableIcon. - * @size: an integer. - * @type: (out) (optional): a location to store the type of the loaded - * icon, %NULL to ignore. - * @cancellable: (nullable): optional #GCancellable object, %NULL to - * ignore. - * @error: a #GError location to store the error occurring, or %NULL - * to ignore. + * g_menu_item_new_section: + * @label: (nullable): the section label, or %NULL + * @section: a #GMenuModel with the items of the section * - * Loads a loadable icon. For the asynchronous version of this function, - * see g_loadable_icon_load_async(). + * Creates a new #GMenuItem representing a section. * - * Returns: (transfer full): a #GInputStream to read the icon from. - */ - - -/** - * g_loadable_icon_load_async: - * @icon: a #GLoadableIcon. - * @size: an integer. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (scope async): a #GAsyncReadyCallback to call when the - * request is satisfied - * @user_data: (closure): the data to pass to callback function + * This is a convenience API around g_menu_item_new() and + * g_menu_item_set_section(). * - * Loads an icon asynchronously. To finish this function, see - * g_loadable_icon_load_finish(). For the synchronous, blocking - * version of this function, see g_loadable_icon_load(). - */ - - -/** - * g_loadable_icon_load_finish: - * @icon: a #GLoadableIcon. - * @res: a #GAsyncResult. - * @type: (out) (optional): a location to store the type of the loaded - * icon, %NULL to ignore. - * @error: a #GError location to store the error occurring, or %NULL to - * ignore. + * The effect of having one menu appear as a section of another is + * exactly as it sounds: the items from @section become a direct part of + * the menu that @menu_item is added to. * - * Finishes an asynchronous icon load started in g_loadable_icon_load_async(). + * Visual separation is typically displayed between two non-empty + * sections. If @label is non-%NULL then it will be encorporated into + * this visual indication. This allows for labeled subsections of a + * menu. * - * Returns: (transfer full): a #GInputStream to read the icon from. - */ - - -/** - * g_local_vfs_new: + * As a simple example, consider a typical "Edit" menu from a simple + * program. It probably contains an "Undo" and "Redo" item, followed by + * a separator, followed by "Cut", "Copy" and "Paste". * - * Returns a new #GVfs handle for a local vfs. + * This would be accomplished by creating three #GMenu instances. The + * first would be populated with the "Undo" and "Redo" items, and the + * second with the "Cut", "Copy" and "Paste" items. The first and + * second menus would then be added as submenus of the third. In XML + * format, this would look something like the following: + * |[ + * + *
+ * + * + *
+ *
+ * + * + * + *
+ *
+ * ]| * - * Returns: a new #GVfs handle. + * The following example is exactly equivalent. It is more illustrative + * of the exact relationship between the menus and items (keeping in + * mind that the 'link' element defines a new menu that is linked to the + * containing one). The style of the second example is more verbose and + * difficult to read (and therefore not recommended except for the + * purpose of understanding what is really going on). + * |[ + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * ]| + * + * Returns: a new #GMenuItem + * Since: 2.32 */ /** - * g_memory_input_stream_add_bytes: - * @stream: a #GMemoryInputStream - * @bytes: input data + * g_menu_item_new_submenu: + * @label: (nullable): the section label, or %NULL + * @submenu: a #GMenuModel with the items of the submenu * - * Appends @bytes to data that can be read from the input stream. + * Creates a new #GMenuItem representing a submenu. * - * Since: 2.34 - */ - - -/** - * g_memory_input_stream_add_data: - * @stream: a #GMemoryInputStream - * @data: (array length=len) (element-type guint8) (transfer full): input data - * @len: length of the data, may be -1 if @data is a nul-terminated string - * @destroy: (nullable): function that is called to free @data, or %NULL + * This is a convenience API around g_menu_item_new() and + * g_menu_item_set_submenu(). * - * Appends @data to data that can be read from the input stream + * Returns: a new #GMenuItem + * Since: 2.32 */ /** - * g_memory_input_stream_new: + * g_menu_item_set_action_and_target: + * @menu_item: a #GMenuItem + * @action: (nullable): the name of the action for this item + * @format_string: (nullable): a GVariant format string + * @...: positional parameters, as per @format_string * - * Creates a new empty #GMemoryInputStream. + * Sets or unsets the "action" and "target" attributes of @menu_item. * - * Returns: a new #GInputStream - */ - - -/** - * g_memory_input_stream_new_from_bytes: - * @bytes: a #GBytes + * If @action is %NULL then both the "action" and "target" attributes + * are unset (and @format_string is ignored along with the positional + * parameters). * - * Creates a new #GMemoryInputStream with data from the given @bytes. + * If @action is non-%NULL then the "action" attribute is set. + * @format_string is then inspected. If it is non-%NULL then the proper + * position parameters are collected to create a #GVariant instance to + * use as the target value. If it is %NULL then the positional + * parameters are ignored and the "target" attribute is unset. * - * Returns: new #GInputStream read from @bytes - * Since: 2.34 - */ - - -/** - * g_memory_input_stream_new_from_data: - * @data: (array length=len) (element-type guint8) (transfer full): input data - * @len: length of the data, may be -1 if @data is a nul-terminated string - * @destroy: (nullable): function that is called to free @data, or %NULL + * See also g_menu_item_set_action_and_target_value() for an equivalent + * call that directly accepts a #GVariant. See + * g_menu_item_set_detailed_action() for a more convenient version that + * works with string-typed targets. * - * Creates a new #GMemoryInputStream with data in memory of a given size. + * See also g_menu_item_set_action_and_target_value() for a + * description of the semantics of the action and target attributes. * - * Returns: new #GInputStream read from @data of @len bytes. + * Since: 2.32 */ /** - * g_memory_output_stream_get_data: - * @ostream: a #GMemoryOutputStream + * g_menu_item_set_action_and_target_value: + * @menu_item: a #GMenuItem + * @action: (nullable): the name of the action for this item + * @target_value: (nullable): a #GVariant to use as the action target * - * Gets any loaded data from the @ostream. + * Sets or unsets the "action" and "target" attributes of @menu_item. * - * Note that the returned pointer may become invalid on the next - * write or truncate operation on the stream. + * If @action is %NULL then both the "action" and "target" attributes + * are unset (and @target_value is ignored). * - * Returns: (transfer none): pointer to the stream's data, or %NULL if the data - * has been stolen + * If @action is non-%NULL then the "action" attribute is set. The + * "target" attribute is then set to the value of @target_value if it is + * non-%NULL or unset otherwise. + * + * Normal menu items (ie: not submenu, section or other custom item + * types) are expected to have the "action" attribute set to identify + * the action that they are associated with. The state type of the + * action help to determine the disposition of the menu item. See + * #GAction and #GActionGroup for an overview of actions. + * + * In general, clicking on the menu item will result in activation of + * the named action with the "target" attribute given as the parameter + * to the action invocation. If the "target" attribute is not set then + * the action is invoked with no parameter. + * + * If the action has no state then the menu item is usually drawn as a + * plain menu item (ie: with no additional decoration). + * + * If the action has a boolean state then the menu item is usually drawn + * as a toggle menu item (ie: with a checkmark or equivalent + * indication). The item should be marked as 'toggled' or 'checked' + * when the boolean state is %TRUE. + * + * If the action has a string state then the menu item is usually drawn + * as a radio menu item (ie: with a radio bullet or equivalent + * indication). The item should be marked as 'selected' when the string + * state is equal to the value of the @target property. + * + * See g_menu_item_set_action_and_target() or + * g_menu_item_set_detailed_action() for two equivalent calls that are + * probably more convenient for most uses. + * + * Since: 2.32 */ /** - * g_memory_output_stream_get_data_size: - * @ostream: a #GMemoryOutputStream + * g_menu_item_set_attribute: + * @menu_item: a #GMenuItem + * @attribute: the attribute to set + * @format_string: (nullable): a #GVariant format string, or %NULL + * @...: positional parameters, as per @format_string * - * Returns the number of bytes from the start up to including the last - * byte written in the stream that has not been truncated away. + * Sets or unsets an attribute on @menu_item. * - * Returns: the number of bytes written to the stream - * Since: 2.18 + * The attribute to set or unset is specified by @attribute. This + * can be one of the standard attribute names %G_MENU_ATTRIBUTE_LABEL, + * %G_MENU_ATTRIBUTE_ACTION, %G_MENU_ATTRIBUTE_TARGET, or a custom + * attribute name. + * Attribute names are restricted to lowercase characters, numbers + * and '-'. Furthermore, the names must begin with a lowercase character, + * must not end with a '-', and must not contain consecutive dashes. + * + * If @format_string is non-%NULL then the proper position parameters + * are collected to create a #GVariant instance to use as the attribute + * value. If it is %NULL then the positional parameterrs are ignored + * and the named attribute is unset. + * + * See also g_menu_item_set_attribute_value() for an equivalent call + * that directly accepts a #GVariant. + * + * Since: 2.32 */ /** - * g_memory_output_stream_get_size: - * @ostream: a #GMemoryOutputStream + * g_menu_item_set_attribute_value: + * @menu_item: a #GMenuItem + * @attribute: the attribute to set + * @value: (nullable): a #GVariant to use as the value, or %NULL * - * Gets the size of the currently allocated data area (available from - * g_memory_output_stream_get_data()). + * Sets or unsets an attribute on @menu_item. * - * You probably don't want to use this function on resizable streams. - * See g_memory_output_stream_get_data_size() instead. For resizable - * streams the size returned by this function is an implementation - * detail and may be change at any time in response to operations on the - * stream. + * The attribute to set or unset is specified by @attribute. This + * can be one of the standard attribute names %G_MENU_ATTRIBUTE_LABEL, + * %G_MENU_ATTRIBUTE_ACTION, %G_MENU_ATTRIBUTE_TARGET, or a custom + * attribute name. + * Attribute names are restricted to lowercase characters, numbers + * and '-'. Furthermore, the names must begin with a lowercase character, + * must not end with a '-', and must not contain consecutive dashes. * - * If the stream is fixed-sized (ie: no realloc was passed to - * g_memory_output_stream_new()) then this is the maximum size of the - * stream and further writes will return %G_IO_ERROR_NO_SPACE. + * must consist only of lowercase + * ASCII characters, digits and '-'. * - * In any case, if you want the number of bytes currently written to the - * stream, use g_memory_output_stream_get_data_size(). + * If @value is non-%NULL then it is used as the new value for the + * attribute. If @value is %NULL then the attribute is unset. If + * the @value #GVariant is floating, it is consumed. * - * Returns: the number of bytes allocated for the data buffer + * See also g_menu_item_set_attribute() for a more convenient way to do + * the same. + * + * Since: 2.32 */ /** - * g_memory_output_stream_new: (skip) - * @data: (nullable): pointer to a chunk of memory to use, or %NULL - * @size: the size of @data - * @realloc_function: (nullable): a function with realloc() semantics (like g_realloc()) - * to be called when @data needs to be grown, or %NULL - * @destroy_function: (nullable): a function to be called on @data when the stream is - * finalized, or %NULL + * g_menu_item_set_detailed_action: + * @menu_item: a #GMenuItem + * @detailed_action: the "detailed" action string * - * Creates a new #GMemoryOutputStream. + * Sets the "action" and possibly the "target" attribute of @menu_item. * - * In most cases this is not the function you want. See - * g_memory_output_stream_new_resizable() instead. + * The format of @detailed_action is the same format parsed by + * g_action_parse_detailed_name(). * - * If @data is non-%NULL, the stream will use that for its internal storage. + * See g_menu_item_set_action_and_target() or + * g_menu_item_set_action_and_target_value() for more flexible (but + * slightly less convenient) alternatives. * - * If @realloc_fn is non-%NULL, it will be used for resizing the internal - * storage when necessary and the stream will be considered resizable. - * In that case, the stream will start out being (conceptually) empty. - * @size is used only as a hint for how big @data is. Specifically, - * seeking to the end of a newly-created stream will seek to zero, not - * @size. Seeking past the end of the stream and then writing will - * introduce a zero-filled gap. + * See also g_menu_item_set_action_and_target_value() for a description of + * the semantics of the action and target attributes. * - * If @realloc_fn is %NULL then the stream is fixed-sized. Seeking to - * the end will seek to @size exactly. Writing past the end will give - * an 'out of space' error. Attempting to seek past the end will fail. - * Unlike the resizable case, seeking to an offset within the stream and - * writing will preserve the bytes passed in as @data before that point - * and will return them as part of g_memory_output_stream_steal_data(). - * If you intend to seek you should probably therefore ensure that @data - * is properly initialised. + * Since: 2.32 + */ + + +/** + * g_menu_item_set_icon: + * @menu_item: a #GMenuItem + * @icon: a #GIcon, or %NULL * - * It is probably only meaningful to provide @data and @size in the case - * that you want a fixed-sized stream. Put another way: if @realloc_fn - * is non-%NULL then it makes most sense to give @data as %NULL and - * @size as 0 (allowing #GMemoryOutputStream to do the initial - * allocation for itself). + * Sets (or unsets) the icon on @menu_item. * - * |[ - * // a stream that can grow - * stream = g_memory_output_stream_new (NULL, 0, realloc, free); + * This call is the same as calling g_icon_serialize() and using the + * result as the value to g_menu_item_set_attribute_value() for + * %G_MENU_ATTRIBUTE_ICON. * - * // another stream that can grow - * stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free); + * This API is only intended for use with "noun" menu items; things like + * bookmarks or applications in an "Open With" menu. Don't use it on + * menu items corresponding to verbs (eg: stock icons for 'Save' or + * 'Quit'). * - * // a fixed-size stream - * data = malloc (200); - * stream3 = g_memory_output_stream_new (data, 200, NULL, free); - * ]| + * If @icon is %NULL then the icon is unset. * - * Returns: A newly created #GMemoryOutputStream object. + * Since: 2.38 */ /** - * g_memory_output_stream_new_resizable: + * g_menu_item_set_label: + * @menu_item: a #GMenuItem + * @label: (nullable): the label to set, or %NULL to unset * - * Creates a new #GMemoryOutputStream, using g_realloc() and g_free() - * for memory allocation. + * Sets or unsets the "label" attribute of @menu_item. * - * Since: 2.36 + * If @label is non-%NULL it is used as the label for the menu item. If + * it is %NULL then the label attribute is unset. + * + * Since: 2.32 */ /** - * g_memory_output_stream_steal_as_bytes: - * @ostream: a #GMemoryOutputStream + * g_menu_item_set_link: + * @menu_item: a #GMenuItem + * @link: type of link to establish or unset + * @model: (nullable): the #GMenuModel to link to (or %NULL to unset) * - * Returns data from the @ostream as a #GBytes. @ostream must be - * closed before calling this function. + * Creates a link from @menu_item to @model if non-%NULL, or unsets it. * - * Returns: (transfer full): the stream's data - * Since: 2.34 + * Links are used to establish a relationship between a particular menu + * item and another menu. For example, %G_MENU_LINK_SUBMENU is used to + * associate a submenu with a particular menu item, and %G_MENU_LINK_SECTION + * is used to create a section. Other types of link can be used, but there + * is no guarantee that clients will be able to make sense of them. + * Link types are restricted to lowercase characters, numbers + * and '-'. Furthermore, the names must begin with a lowercase character, + * must not end with a '-', and must not contain consecutive dashes. + * + * Since: 2.32 */ /** - * g_memory_output_stream_steal_data: - * @ostream: a #GMemoryOutputStream + * g_menu_item_set_section: + * @menu_item: a #GMenuItem + * @section: (nullable): a #GMenuModel, or %NULL * - * Gets any loaded data from the @ostream. Ownership of the data - * is transferred to the caller; when no longer needed it must be - * freed using the free function set in @ostream's - * #GMemoryOutputStream:destroy-function property. + * Sets or unsets the "section" link of @menu_item to @section. * - * @ostream must be closed before calling this function. + * The effect of having one menu appear as a section of another is + * exactly as it sounds: the items from @section become a direct part of + * the menu that @menu_item is added to. See g_menu_item_new_section() + * for more information about what it means for a menu item to be a + * section. * - * Returns: (transfer full): the stream's data, or %NULL if it has previously - * been stolen - * Since: 2.26 + * Since: 2.32 */ /** - * g_memory_settings_backend_new: + * g_menu_item_set_submenu: + * @menu_item: a #GMenuItem + * @submenu: (nullable): a #GMenuModel, or %NULL * - * Creates a memory-backed #GSettingsBackend. + * Sets or unsets the "submenu" link of @menu_item to @submenu. * - * This backend allows changes to settings, but does not write them - * to any backing storage, so the next time you run your application, - * the memory backend will start out with the default values again. + * If @submenu is non-%NULL, it is linked to. If it is %NULL then the + * link is unset. * - * Returns: (transfer full): a newly created #GSettingsBackend - * Since: 2.28 + * The effect of having one menu appear as a submenu of another is + * exactly as it sounds. + * + * Since: 2.32 */ /** - * g_menu_append: - * @menu: a #GMenu - * @label: (nullable): the section label, or %NULL - * @detailed_action: (nullable): the detailed action string, or %NULL + * g_menu_link_iter_get_name: + * @iter: a #GMenuLinkIter * - * Convenience function for appending a normal menu item to the end of - * @menu. Combine g_menu_item_new() and g_menu_insert_item() for a more - * flexible alternative. + * Gets the name of the link at the current iterator position. + * + * The iterator is not advanced. * + * Returns: the type of the link * Since: 2.32 */ /** - * g_menu_append_item: - * @menu: a #GMenu - * @item: a #GMenuItem to append + * g_menu_link_iter_get_next: + * @iter: a #GMenuLinkIter + * @out_link: (out) (optional) (transfer none): the name of the link + * @value: (out) (optional) (transfer full): the linked #GMenuModel * - * Appends @item to the end of @menu. + * This function combines g_menu_link_iter_next() with + * g_menu_link_iter_get_name() and g_menu_link_iter_get_value(). * - * See g_menu_insert_item() for more information. + * First the iterator is advanced to the next (possibly first) link. + * If that fails, then %FALSE is returned and there are no other effects. + * + * If successful, @out_link and @value are set to the name and #GMenuModel + * of the link that has just been advanced to. At this point, + * g_menu_link_iter_get_name() and g_menu_link_iter_get_value() will return the + * same values again. + * + * The value returned in @out_link remains valid for as long as the iterator + * remains at the current position. The value returned in @value must + * be unreffed using g_object_unref() when it is no longer in use. * + * Returns: %TRUE on success, or %FALSE if there is no additional link * Since: 2.32 */ /** - * g_menu_append_section: - * @menu: a #GMenu - * @label: (nullable): the section label, or %NULL - * @section: a #GMenuModel with the items of the section + * g_menu_link_iter_get_value: + * @iter: a #GMenuLinkIter * - * Convenience function for appending a section menu item to the end of - * @menu. Combine g_menu_item_new_section() and g_menu_insert_item() for a - * more flexible alternative. + * Gets the linked #GMenuModel at the current iterator position. + * + * The iterator is not advanced. * + * Returns: (transfer full): the #GMenuModel that is linked to * Since: 2.32 */ /** - * g_menu_append_submenu: - * @menu: a #GMenu - * @label: (nullable): the section label, or %NULL - * @submenu: a #GMenuModel with the items of the submenu + * g_menu_link_iter_next: + * @iter: a #GMenuLinkIter * - * Convenience function for appending a submenu menu item to the end of - * @menu. Combine g_menu_item_new_submenu() and g_menu_insert_item() for a - * more flexible alternative. + * Attempts to advance the iterator to the next (possibly first) + * link. * + * %TRUE is returned on success, or %FALSE if there are no more links. + * + * You must call this function when you first acquire the iterator to + * advance it to the first link (and determine if the first link exists + * at all). + * + * Returns: %TRUE on success, or %FALSE when there are no more links * Since: 2.32 */ /** - * g_menu_attribute_iter_get_name: - * @iter: a #GMenuAttributeIter + * g_menu_model_get_item_attribute: + * @model: a #GMenuModel + * @item_index: the index of the item + * @attribute: the attribute to query + * @format_string: a #GVariant format string + * @...: positional parameters, as per @format_string * - * Gets the name of the attribute at the current iterator position, as - * a string. + * Queries item at position @item_index in @model for the attribute + * specified by @attribute. * - * The iterator is not advanced. + * If the attribute exists and matches the #GVariantType corresponding + * to @format_string then @format_string is used to deconstruct the + * value into the positional parameters and %TRUE is returned. * - * Returns: the name of the attribute + * If the attribute does not exist, or it does exist but has the wrong + * type, then the positional parameters are ignored and %FALSE is + * returned. + * + * This function is a mix of g_menu_model_get_item_attribute_value() and + * g_variant_get(), followed by a g_variant_unref(). As such, + * @format_string must make a complete copy of the data (since the + * #GVariant may go away after the call to g_variant_unref()). In + * particular, no '&' characters are allowed in @format_string. + * + * Returns: %TRUE if the named attribute was found with the expected + * type * Since: 2.32 */ /** - * g_menu_attribute_iter_get_next: - * @iter: a #GMenuAttributeIter - * @out_name: (out) (optional) (transfer none): the type of the attribute - * @value: (out) (optional) (transfer full): the attribute value + * g_menu_model_get_item_attribute_value: + * @model: a #GMenuModel + * @item_index: the index of the item + * @attribute: the attribute to query + * @expected_type: (nullable): the expected type of the attribute, or + * %NULL * - * This function combines g_menu_attribute_iter_next() with - * g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value(). + * Queries the item at position @item_index in @model for the attribute + * specified by @attribute. * - * First the iterator is advanced to the next (possibly first) attribute. - * If that fails, then %FALSE is returned and there are no other - * effects. + * If @expected_type is non-%NULL then it specifies the expected type of + * the attribute. If it is %NULL then any type will be accepted. * - * If successful, @name and @value are set to the name and value of the - * attribute that has just been advanced to. At this point, - * g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value() will - * return the same values again. + * If the attribute exists and matches @expected_type (or if the + * expected type is unspecified) then the value is returned. * - * The value returned in @name remains valid for as long as the iterator - * remains at the current position. The value returned in @value must - * be unreffed using g_variant_unref() when it is no longer in use. + * If the attribute does not exist, or does not match the expected type + * then %NULL is returned. * - * Returns: %TRUE on success, or %FALSE if there is no additional - * attribute + * Returns: (transfer full): the value of the attribute * Since: 2.32 */ /** - * g_menu_attribute_iter_get_value: - * @iter: a #GMenuAttributeIter + * g_menu_model_get_item_link: + * @model: a #GMenuModel + * @item_index: the index of the item + * @link: the link to query * - * Gets the value of the attribute at the current iterator position. + * Queries the item at position @item_index in @model for the link + * specified by @link. * - * The iterator is not advanced. + * If the link exists, the linked #GMenuModel is returned. If the link + * does not exist, %NULL is returned. * - * Returns: (transfer full): the value of the current attribute + * Returns: (transfer full): the linked #GMenuModel, or %NULL * Since: 2.32 */ /** - * g_menu_attribute_iter_next: - * @iter: a #GMenuAttributeIter + * g_menu_model_get_n_items: + * @model: a #GMenuModel * - * Attempts to advance the iterator to the next (possibly first) - * attribute. + * Query the number of items in @model. * - * %TRUE is returned on success, or %FALSE if there are no more - * attributes. + * Returns: the number of items + * Since: 2.32 + */ + + +/** + * g_menu_model_is_mutable: + * @model: a #GMenuModel * - * You must call this function when you first acquire the iterator - * to advance it to the first attribute (and determine if the first - * attribute exists at all). + * Queries if @model is mutable. * - * Returns: %TRUE on success, or %FALSE when there are no more attributes + * An immutable #GMenuModel will never emit the #GMenuModel::items-changed + * signal. Consumers of the model may make optimisations accordingly. + * + * Returns: %TRUE if the model is mutable (ie: "items-changed" may be + * emitted). * Since: 2.32 */ /** - * g_menu_freeze: - * @menu: a #GMenu + * g_menu_model_items_changed: + * @model: a #GMenuModel + * @position: the position of the change + * @removed: the number of items removed + * @added: the number of items added * - * Marks @menu as frozen. + * Requests emission of the #GMenuModel::items-changed signal on @model. * - * After the menu is frozen, it is an error to attempt to make any - * changes to it. In effect this means that the #GMenu API must no - * longer be used. + * This function should never be called except by #GMenuModel + * subclasses. Any other calls to this function will very likely lead + * to a violation of the interface of the model. * - * This function causes g_menu_model_is_mutable() to begin returning - * %FALSE, which has some positive performance implications. + * The implementation should update its internal representation of the + * menu before emitting the signal. The implementation should further + * expect to receive queries about the new state of the menu (and + * particularly added menu items) while signal handlers are running. + * + * The implementation must dispatch this call directly from a mainloop + * entry and not in response to calls -- particularly those from the + * #GMenuModel API. Said another way: the menu must not change while + * user code is running without returning to the mainloop. * * Since: 2.32 */ /** - * g_menu_insert: - * @menu: a #GMenu - * @position: the position at which to insert the item - * @label: (nullable): the section label, or %NULL - * @detailed_action: (nullable): the detailed action string, or %NULL + * g_menu_model_iterate_item_attributes: + * @model: a #GMenuModel + * @item_index: the index of the item * - * Convenience function for inserting a normal menu item into @menu. - * Combine g_menu_item_new() and g_menu_insert_item() for a more flexible - * alternative. + * Creates a #GMenuAttributeIter to iterate over the attributes of + * the item at position @item_index in @model. + * + * You must free the iterator with g_object_unref() when you are done. * + * Returns: (transfer full): a new #GMenuAttributeIter * Since: 2.32 */ /** - * g_menu_insert_item: - * @menu: a #GMenu - * @position: the position at which to insert the item - * @item: the #GMenuItem to insert + * g_menu_model_iterate_item_links: + * @model: a #GMenuModel + * @item_index: the index of the item * - * Inserts @item into @menu. + * Creates a #GMenuLinkIter to iterate over the links of the item at + * position @item_index in @model. * - * The "insertion" is actually done by copying all of the attribute and - * link values of @item and using them to form a new item within @menu. - * As such, @item itself is not really inserted, but rather, a menu item - * that is exactly the same as the one presently described by @item. + * You must free the iterator with g_object_unref() when you are done. * - * This means that @item is essentially useless after the insertion - * occurs. Any changes you make to it are ignored unless it is inserted - * again (at which point its updated values will be copied). + * Returns: (transfer full): a new #GMenuLinkIter + * Since: 2.32 + */ + + +/** + * g_menu_new: * - * You should probably just free @item once you're done. + * Creates a new #GMenu. * - * There are many convenience functions to take care of common cases. - * See g_menu_insert(), g_menu_insert_section() and - * g_menu_insert_submenu() as well as "prepend" and "append" variants of - * each of these functions. + * The new menu has no items. * + * Returns: a new #GMenu * Since: 2.32 */ /** - * g_menu_insert_section: + * g_menu_prepend: * @menu: a #GMenu - * @position: the position at which to insert the item * @label: (nullable): the section label, or %NULL - * @section: a #GMenuModel with the items of the section + * @detailed_action: (nullable): the detailed action string, or %NULL * - * Convenience function for inserting a section menu item into @menu. - * Combine g_menu_item_new_section() and g_menu_insert_item() for a more + * Convenience function for prepending a normal menu item to the start + * of @menu. Combine g_menu_item_new() and g_menu_insert_item() for a more * flexible alternative. * * Since: 2.32 @@ -29082,1419 +28487,801 @@ /** - * g_menu_insert_submenu: + * g_menu_prepend_item: * @menu: a #GMenu - * @position: the position at which to insert the item - * @label: (nullable): the section label, or %NULL - * @submenu: a #GMenuModel with the items of the submenu + * @item: a #GMenuItem to prepend * - * Convenience function for inserting a submenu menu item into @menu. - * Combine g_menu_item_new_submenu() and g_menu_insert_item() for a more - * flexible alternative. + * Prepends @item to the start of @menu. + * + * See g_menu_insert_item() for more information. * * Since: 2.32 */ /** - * g_menu_item_get_attribute: - * @menu_item: a #GMenuItem - * @attribute: the attribute name to query - * @format_string: a #GVariant format string - * @...: positional parameters, as per @format_string - * - * Queries the named @attribute on @menu_item. - * - * If the attribute exists and matches the #GVariantType corresponding - * to @format_string then @format_string is used to deconstruct the - * value into the positional parameters and %TRUE is returned. + * g_menu_prepend_section: + * @menu: a #GMenu + * @label: (nullable): the section label, or %NULL + * @section: a #GMenuModel with the items of the section * - * If the attribute does not exist, or it does exist but has the wrong - * type, then the positional parameters are ignored and %FALSE is - * returned. + * Convenience function for prepending a section menu item to the start + * of @menu. Combine g_menu_item_new_section() and g_menu_insert_item() for + * a more flexible alternative. * - * Returns: %TRUE if the named attribute was found with the expected - * type - * Since: 2.34 + * Since: 2.32 */ /** - * g_menu_item_get_attribute_value: - * @menu_item: a #GMenuItem - * @attribute: the attribute name to query - * @expected_type: (nullable): the expected type of the attribute - * - * Queries the named @attribute on @menu_item. + * g_menu_prepend_submenu: + * @menu: a #GMenu + * @label: (nullable): the section label, or %NULL + * @submenu: a #GMenuModel with the items of the submenu * - * If @expected_type is specified and the attribute does not have this - * type, %NULL is returned. %NULL is also returned if the attribute - * simply does not exist. + * Convenience function for prepending a submenu menu item to the start + * of @menu. Combine g_menu_item_new_submenu() and g_menu_insert_item() for + * a more flexible alternative. * - * Returns: (transfer full): the attribute value, or %NULL - * Since: 2.34 + * Since: 2.32 */ /** - * g_menu_item_get_link: - * @menu_item: a #GMenuItem - * @link: the link name to query - * - * Queries the named @link on @menu_item. + * g_menu_remove: + * @menu: a #GMenu + * @position: the position of the item to remove * - * Returns: (transfer full): the link, or %NULL - * Since: 2.34 - */ - - -/** - * g_menu_item_new: - * @label: (nullable): the section label, or %NULL - * @detailed_action: (nullable): the detailed action string, or %NULL + * Removes an item from the menu. * - * Creates a new #GMenuItem. + * @position gives the index of the item to remove. * - * If @label is non-%NULL it is used to set the "label" attribute of the - * new item. + * It is an error if position is not in range the range from 0 to one + * less than the number of items in the menu. * - * If @detailed_action is non-%NULL it is used to set the "action" and - * possibly the "target" attribute of the new item. See - * g_menu_item_set_detailed_action() for more information. + * It is not possible to remove items by identity since items are added + * to the menu simply by copying their links and attributes (ie: + * identity of the item itself is not preserved). * - * Returns: a new #GMenuItem * Since: 2.32 */ /** - * g_menu_item_new_from_model: - * @model: a #GMenuModel - * @item_index: the index of an item in @model - * - * Creates a #GMenuItem as an exact copy of an existing menu item in a - * #GMenuModel. + * g_menu_remove_all: + * @menu: a #GMenu * - * @item_index must be valid (ie: be sure to call - * g_menu_model_get_n_items() first). + * Removes all items in the menu. * - * Returns: a new #GMenuItem. - * Since: 2.34 + * Since: 2.38 */ /** - * g_menu_item_new_section: - * @label: (nullable): the section label, or %NULL - * @section: a #GMenuModel with the items of the section - * - * Creates a new #GMenuItem representing a section. - * - * This is a convenience API around g_menu_item_new() and - * g_menu_item_set_section(). - * - * The effect of having one menu appear as a section of another is - * exactly as it sounds: the items from @section become a direct part of - * the menu that @menu_item is added to. - * - * Visual separation is typically displayed between two non-empty - * sections. If @label is non-%NULL then it will be encorporated into - * this visual indication. This allows for labeled subsections of a - * menu. - * - * As a simple example, consider a typical "Edit" menu from a simple - * program. It probably contains an "Undo" and "Redo" item, followed by - * a separator, followed by "Cut", "Copy" and "Paste". - * - * This would be accomplished by creating three #GMenu instances. The - * first would be populated with the "Undo" and "Redo" items, and the - * second with the "Cut", "Copy" and "Paste" items. The first and - * second menus would then be added as submenus of the third. In XML - * format, this would look something like the following: - * |[ - * - *
- * - * - *
- *
- * - * - * - *
- *
- * ]| + * g_mount_can_eject: + * @mount: a #GMount. * - * The following example is exactly equivalent. It is more illustrative - * of the exact relationship between the menus and items (keeping in - * mind that the 'link' element defines a new menu that is linked to the - * containing one). The style of the second example is more verbose and - * difficult to read (and therefore not recommended except for the - * purpose of understanding what is really going on). - * |[ - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * ]| + * Checks if @mount can be ejected. * - * Returns: a new #GMenuItem - * Since: 2.32 + * Returns: %TRUE if the @mount can be ejected. */ /** - * g_menu_item_new_submenu: - * @label: (nullable): the section label, or %NULL - * @submenu: a #GMenuModel with the items of the submenu - * - * Creates a new #GMenuItem representing a submenu. + * g_mount_can_unmount: + * @mount: a #GMount. * - * This is a convenience API around g_menu_item_new() and - * g_menu_item_set_submenu(). + * Checks if @mount can be unmounted. * - * Returns: a new #GMenuItem - * Since: 2.32 + * Returns: %TRUE if the @mount can be unmounted. */ /** - * g_menu_item_set_action_and_target: - * @menu_item: a #GMenuItem - * @action: (nullable): the name of the action for this item - * @format_string: (nullable): a GVariant format string - * @...: positional parameters, as per @format_string - * - * Sets or unsets the "action" and "target" attributes of @menu_item. - * - * If @action is %NULL then both the "action" and "target" attributes - * are unset (and @format_string is ignored along with the positional - * parameters). - * - * If @action is non-%NULL then the "action" attribute is set. - * @format_string is then inspected. If it is non-%NULL then the proper - * position parameters are collected to create a #GVariant instance to - * use as the target value. If it is %NULL then the positional - * parameters are ignored and the "target" attribute is unset. - * - * See also g_menu_item_set_action_and_target_value() for an equivalent - * call that directly accepts a #GVariant. See - * g_menu_item_set_detailed_action() for a more convenient version that - * works with string-typed targets. + * g_mount_eject: + * @mount: a #GMount. + * @flags: flags affecting the unmount if required for eject + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (nullable): a #GAsyncReadyCallback, or %NULL. + * @user_data: user data passed to @callback. * - * See also g_menu_item_set_action_and_target_value() for a - * description of the semantics of the action and target attributes. + * Ejects a mount. This is an asynchronous operation, and is + * finished by calling g_mount_eject_finish() with the @mount + * and #GAsyncResult data returned in the @callback. * - * Since: 2.32 + * Deprecated: 2.22: Use g_mount_eject_with_operation() instead. */ /** - * g_menu_item_set_action_and_target_value: - * @menu_item: a #GMenuItem - * @action: (nullable): the name of the action for this item - * @target_value: (nullable): a #GVariant to use as the action target - * - * Sets or unsets the "action" and "target" attributes of @menu_item. - * - * If @action is %NULL then both the "action" and "target" attributes - * are unset (and @target_value is ignored). - * - * If @action is non-%NULL then the "action" attribute is set. The - * "target" attribute is then set to the value of @target_value if it is - * non-%NULL or unset otherwise. - * - * Normal menu items (ie: not submenu, section or other custom item - * types) are expected to have the "action" attribute set to identify - * the action that they are associated with. The state type of the - * action help to determine the disposition of the menu item. See - * #GAction and #GActionGroup for an overview of actions. - * - * In general, clicking on the menu item will result in activation of - * the named action with the "target" attribute given as the parameter - * to the action invocation. If the "target" attribute is not set then - * the action is invoked with no parameter. - * - * If the action has no state then the menu item is usually drawn as a - * plain menu item (ie: with no additional decoration). - * - * If the action has a boolean state then the menu item is usually drawn - * as a toggle menu item (ie: with a checkmark or equivalent - * indication). The item should be marked as 'toggled' or 'checked' - * when the boolean state is %TRUE. - * - * If the action has a string state then the menu item is usually drawn - * as a radio menu item (ie: with a radio bullet or equivalent - * indication). The item should be marked as 'selected' when the string - * state is equal to the value of the @target property. + * g_mount_eject_finish: + * @mount: a #GMount. + * @result: a #GAsyncResult. + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. * - * See g_menu_item_set_action_and_target() or - * g_menu_item_set_detailed_action() for two equivalent calls that are - * probably more convenient for most uses. + * Finishes ejecting a mount. If any errors occurred during the operation, + * @error will be set to contain the errors and %FALSE will be returned. * - * Since: 2.32 + * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise. + * Deprecated: 2.22: Use g_mount_eject_with_operation_finish() instead. */ /** - * g_menu_item_set_attribute: - * @menu_item: a #GMenuItem - * @attribute: the attribute to set - * @format_string: (nullable): a #GVariant format string, or %NULL - * @...: positional parameters, as per @format_string - * - * Sets or unsets an attribute on @menu_item. - * - * The attribute to set or unset is specified by @attribute. This - * can be one of the standard attribute names %G_MENU_ATTRIBUTE_LABEL, - * %G_MENU_ATTRIBUTE_ACTION, %G_MENU_ATTRIBUTE_TARGET, or a custom - * attribute name. - * Attribute names are restricted to lowercase characters, numbers - * and '-'. Furthermore, the names must begin with a lowercase character, - * must not end with a '-', and must not contain consecutive dashes. - * - * If @format_string is non-%NULL then the proper position parameters - * are collected to create a #GVariant instance to use as the attribute - * value. If it is %NULL then the positional parameterrs are ignored - * and the named attribute is unset. + * g_mount_eject_with_operation: + * @mount: a #GMount. + * @flags: flags affecting the unmount if required for eject + * @mount_operation: (nullable): a #GMountOperation or %NULL to avoid + * user interaction. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (nullable): a #GAsyncReadyCallback, or %NULL. + * @user_data: user data passed to @callback. * - * See also g_menu_item_set_attribute_value() for an equivalent call - * that directly accepts a #GVariant. + * Ejects a mount. This is an asynchronous operation, and is + * finished by calling g_mount_eject_with_operation_finish() with the @mount + * and #GAsyncResult data returned in the @callback. * - * Since: 2.32 + * Since: 2.22 */ /** - * g_menu_item_set_attribute_value: - * @menu_item: a #GMenuItem - * @attribute: the attribute to set - * @value: (nullable): a #GVariant to use as the value, or %NULL - * - * Sets or unsets an attribute on @menu_item. - * - * The attribute to set or unset is specified by @attribute. This - * can be one of the standard attribute names %G_MENU_ATTRIBUTE_LABEL, - * %G_MENU_ATTRIBUTE_ACTION, %G_MENU_ATTRIBUTE_TARGET, or a custom - * attribute name. - * Attribute names are restricted to lowercase characters, numbers - * and '-'. Furthermore, the names must begin with a lowercase character, - * must not end with a '-', and must not contain consecutive dashes. - * - * must consist only of lowercase - * ASCII characters, digits and '-'. - * - * If @value is non-%NULL then it is used as the new value for the - * attribute. If @value is %NULL then the attribute is unset. If - * the @value #GVariant is floating, it is consumed. + * g_mount_eject_with_operation_finish: + * @mount: a #GMount. + * @result: a #GAsyncResult. + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. * - * See also g_menu_item_set_attribute() for a more convenient way to do - * the same. + * Finishes ejecting a mount. If any errors occurred during the operation, + * @error will be set to contain the errors and %FALSE will be returned. * - * Since: 2.32 + * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise. + * Since: 2.22 */ /** - * g_menu_item_set_detailed_action: - * @menu_item: a #GMenuItem - * @detailed_action: the "detailed" action string - * - * Sets the "action" and possibly the "target" attribute of @menu_item. - * - * The format of @detailed_action is the same format parsed by - * g_action_parse_detailed_name(). - * - * See g_menu_item_set_action_and_target() or - * g_menu_item_set_action_and_target_value() for more flexible (but - * slightly less convenient) alternatives. + * g_mount_get_default_location: + * @mount: a #GMount. * - * See also g_menu_item_set_action_and_target_value() for a description of - * the semantics of the action and target attributes. + * Gets the default location of @mount. The default location of the given + * @mount is a path that reflects the main entry point for the user (e.g. + * the home directory, or the root of the volume). * - * Since: 2.32 + * Returns: (transfer full): a #GFile. + * The returned object should be unreffed with + * g_object_unref() when no longer needed. */ /** - * g_menu_item_set_icon: - * @menu_item: a #GMenuItem - * @icon: a #GIcon, or %NULL - * - * Sets (or unsets) the icon on @menu_item. - * - * This call is the same as calling g_icon_serialize() and using the - * result as the value to g_menu_item_set_attribute_value() for - * %G_MENU_ATTRIBUTE_ICON. + * g_mount_get_drive: + * @mount: a #GMount. * - * This API is only intended for use with "noun" menu items; things like - * bookmarks or applications in an "Open With" menu. Don't use it on - * menu items corresponding to verbs (eg: stock icons for 'Save' or - * 'Quit'). + * Gets the drive for the @mount. * - * If @icon is %NULL then the icon is unset. + * This is a convenience method for getting the #GVolume and then + * using that object to get the #GDrive. * - * Since: 2.38 + * Returns: (transfer full) (nullable): a #GDrive or %NULL if @mount is not + * associated with a volume or a drive. + * The returned object should be unreffed with + * g_object_unref() when no longer needed. */ /** - * g_menu_item_set_label: - * @menu_item: a #GMenuItem - * @label: (nullable): the label to set, or %NULL to unset - * - * Sets or unsets the "label" attribute of @menu_item. + * g_mount_get_icon: + * @mount: a #GMount. * - * If @label is non-%NULL it is used as the label for the menu item. If - * it is %NULL then the label attribute is unset. + * Gets the icon for @mount. * - * Since: 2.32 + * Returns: (transfer full): a #GIcon. + * The returned object should be unreffed with + * g_object_unref() when no longer needed. */ /** - * g_menu_item_set_link: - * @menu_item: a #GMenuItem - * @link: type of link to establish or unset - * @model: (nullable): the #GMenuModel to link to (or %NULL to unset) - * - * Creates a link from @menu_item to @model if non-%NULL, or unsets it. + * g_mount_get_name: + * @mount: a #GMount. * - * Links are used to establish a relationship between a particular menu - * item and another menu. For example, %G_MENU_LINK_SUBMENU is used to - * associate a submenu with a particular menu item, and %G_MENU_LINK_SECTION - * is used to create a section. Other types of link can be used, but there - * is no guarantee that clients will be able to make sense of them. - * Link types are restricted to lowercase characters, numbers - * and '-'. Furthermore, the names must begin with a lowercase character, - * must not end with a '-', and must not contain consecutive dashes. + * Gets the name of @mount. * - * Since: 2.32 + * Returns: the name for the given @mount. + * The returned string should be freed with g_free() + * when no longer needed. */ /** - * g_menu_item_set_section: - * @menu_item: a #GMenuItem - * @section: (nullable): a #GMenuModel, or %NULL - * - * Sets or unsets the "section" link of @menu_item to @section. + * g_mount_get_root: + * @mount: a #GMount. * - * The effect of having one menu appear as a section of another is - * exactly as it sounds: the items from @section become a direct part of - * the menu that @menu_item is added to. See g_menu_item_new_section() - * for more information about what it means for a menu item to be a - * section. + * Gets the root directory on @mount. * - * Since: 2.32 + * Returns: (transfer full): a #GFile. + * The returned object should be unreffed with + * g_object_unref() when no longer needed. */ /** - * g_menu_item_set_submenu: - * @menu_item: a #GMenuItem - * @submenu: (nullable): a #GMenuModel, or %NULL - * - * Sets or unsets the "submenu" link of @menu_item to @submenu. - * - * If @submenu is non-%NULL, it is linked to. If it is %NULL then the - * link is unset. + * g_mount_get_sort_key: + * @mount: A #GMount. * - * The effect of having one menu appear as a submenu of another is - * exactly as it sounds. + * Gets the sort key for @mount, if any. * + * Returns: (nullable): Sorting key for @mount or %NULL if no such key is available. * Since: 2.32 */ /** - * g_menu_link_iter_get_name: - * @iter: a #GMenuLinkIter - * - * Gets the name of the link at the current iterator position. + * g_mount_get_symbolic_icon: + * @mount: a #GMount. * - * The iterator is not advanced. + * Gets the symbolic icon for @mount. * - * Returns: the type of the link - * Since: 2.32 + * Returns: (transfer full): a #GIcon. + * The returned object should be unreffed with + * g_object_unref() when no longer needed. + * Since: 2.34 */ /** - * g_menu_link_iter_get_next: - * @iter: a #GMenuLinkIter - * @out_link: (out) (optional) (transfer none): the name of the link - * @value: (out) (optional) (transfer full): the linked #GMenuModel - * - * This function combines g_menu_link_iter_next() with - * g_menu_link_iter_get_name() and g_menu_link_iter_get_value(). + * g_mount_get_uuid: + * @mount: a #GMount. * - * First the iterator is advanced to the next (possibly first) link. - * If that fails, then %FALSE is returned and there are no other effects. + * Gets the UUID for the @mount. The reference is typically based on + * the file system UUID for the mount in question and should be + * considered an opaque string. Returns %NULL if there is no UUID + * available. * - * If successful, @out_link and @value are set to the name and #GMenuModel - * of the link that has just been advanced to. At this point, - * g_menu_link_iter_get_name() and g_menu_link_iter_get_value() will return the - * same values again. + * Returns: (nullable) (transfer full): the UUID for @mount or %NULL if no UUID + * can be computed. + * The returned string should be freed with g_free() + * when no longer needed. + */ + + +/** + * g_mount_get_volume: + * @mount: a #GMount. * - * The value returned in @out_link remains valid for as long as the iterator - * remains at the current position. The value returned in @value must - * be unreffed using g_object_unref() when it is no longer in use. + * Gets the volume for the @mount. * - * Returns: %TRUE on success, or %FALSE if there is no additional link - * Since: 2.32 + * Returns: (transfer full) (nullable): a #GVolume or %NULL if @mount is not + * associated with a volume. + * The returned object should be unreffed with + * g_object_unref() when no longer needed. */ /** - * g_menu_link_iter_get_value: - * @iter: a #GMenuLinkIter + * g_mount_guess_content_type: + * @mount: a #GMount + * @force_rescan: Whether to force a rescan of the content. + * Otherwise a cached result will be used if available + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore + * @callback: a #GAsyncReadyCallback + * @user_data: user data passed to @callback * - * Gets the linked #GMenuModel at the current iterator position. + * Tries to guess the type of content stored on @mount. Returns one or + * more textual identifiers of well-known content types (typically + * prefixed with "x-content/"), e.g. x-content/image-dcf for camera + * memory cards. See the + * [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) + * specification for more on x-content types. * - * The iterator is not advanced. + * This is an asynchronous operation (see + * g_mount_guess_content_type_sync() for the synchronous version), and + * is finished by calling g_mount_guess_content_type_finish() with the + * @mount and #GAsyncResult data returned in the @callback. * - * Returns: (transfer full): the #GMenuModel that is linked to - * Since: 2.32 + * Since: 2.18 */ /** - * g_menu_link_iter_next: - * @iter: a #GMenuLinkIter + * g_mount_guess_content_type_finish: + * @mount: a #GMount + * @result: a #GAsyncResult + * @error: a #GError location to store the error occurring, or %NULL to + * ignore * - * Attempts to advance the iterator to the next (possibly first) - * link. - * - * %TRUE is returned on success, or %FALSE if there are no more links. - * - * You must call this function when you first acquire the iterator to - * advance it to the first link (and determine if the first link exists - * at all). + * Finishes guessing content types of @mount. If any errors occurred + * during the operation, @error will be set to contain the errors and + * %FALSE will be returned. In particular, you may get an + * %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content + * guessing. * - * Returns: %TRUE on success, or %FALSE when there are no more links - * Since: 2.32 + * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error. + * Caller should free this array with g_strfreev() when done with it. + * Since: 2.18 */ /** - * g_menu_model_get_item_attribute: - * @model: a #GMenuModel - * @item_index: the index of the item - * @attribute: the attribute to query - * @format_string: a #GVariant format string - * @...: positional parameters, as per @format_string - * - * Queries item at position @item_index in @model for the attribute - * specified by @attribute. - * - * If the attribute exists and matches the #GVariantType corresponding - * to @format_string then @format_string is used to deconstruct the - * value into the positional parameters and %TRUE is returned. + * g_mount_guess_content_type_sync: + * @mount: a #GMount + * @force_rescan: Whether to force a rescan of the content. + * Otherwise a cached result will be used if available + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore + * @error: a #GError location to store the error occurring, or %NULL to + * ignore * - * If the attribute does not exist, or it does exist but has the wrong - * type, then the positional parameters are ignored and %FALSE is - * returned. + * Tries to guess the type of content stored on @mount. Returns one or + * more textual identifiers of well-known content types (typically + * prefixed with "x-content/"), e.g. x-content/image-dcf for camera + * memory cards. See the + * [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) + * specification for more on x-content types. * - * This function is a mix of g_menu_model_get_item_attribute_value() and - * g_variant_get(), followed by a g_variant_unref(). As such, - * @format_string must make a complete copy of the data (since the - * #GVariant may go away after the call to g_variant_unref()). In - * particular, no '&' characters are allowed in @format_string. + * This is a synchronous operation and as such may block doing IO; + * see g_mount_guess_content_type() for the asynchronous version. * - * Returns: %TRUE if the named attribute was found with the expected - * type - * Since: 2.32 + * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error. + * Caller should free this array with g_strfreev() when done with it. + * Since: 2.18 */ /** - * g_menu_model_get_item_attribute_value: - * @model: a #GMenuModel - * @item_index: the index of the item - * @attribute: the attribute to query - * @expected_type: (nullable): the expected type of the attribute, or - * %NULL + * g_mount_is_shadowed: + * @mount: A #GMount. * - * Queries the item at position @item_index in @model for the attribute - * specified by @attribute. + * Determines if @mount is shadowed. Applications or libraries should + * avoid displaying @mount in the user interface if it is shadowed. * - * If @expected_type is non-%NULL then it specifies the expected type of - * the attribute. If it is %NULL then any type will be accepted. + * A mount is said to be shadowed if there exists one or more user + * visible objects (currently #GMount objects) with a root that is + * inside the root of @mount. * - * If the attribute exists and matches @expected_type (or if the - * expected type is unspecified) then the value is returned. + * One application of shadow mounts is when exposing a single file + * system that is used to address several logical volumes. In this + * situation, a #GVolumeMonitor implementation would create two + * #GVolume objects (for example, one for the camera functionality of + * the device and one for a SD card reader on the device) with + * activation URIs `gphoto2://[usb:001,002]/store1/` + * and `gphoto2://[usb:001,002]/store2/`. When the + * underlying mount (with root + * `gphoto2://[usb:001,002]/`) is mounted, said + * #GVolumeMonitor implementation would create two #GMount objects + * (each with their root matching the corresponding volume activation + * root) that would shadow the original mount. * - * If the attribute does not exist, or does not match the expected type - * then %NULL is returned. + * The proxy monitor in GVfs 2.26 and later, automatically creates and + * manage shadow mounts (and shadows the underlying mount) if the + * activation root on a #GVolume is set. * - * Returns: (transfer full): the value of the attribute - * Since: 2.32 + * Returns: %TRUE if @mount is shadowed. + * Since: 2.20 */ /** - * g_menu_model_get_item_link: - * @model: a #GMenuModel - * @item_index: the index of the item - * @link: the link to query - * - * Queries the item at position @item_index in @model for the link - * specified by @link. + * g_mount_operation_get_anonymous: + * @op: a #GMountOperation. * - * If the link exists, the linked #GMenuModel is returned. If the link - * does not exist, %NULL is returned. + * Check to see whether the mount operation is being used + * for an anonymous user. * - * Returns: (transfer full): the linked #GMenuModel, or %NULL - * Since: 2.32 + * Returns: %TRUE if mount operation is anonymous. */ /** - * g_menu_model_get_n_items: - * @model: a #GMenuModel + * g_mount_operation_get_choice: + * @op: a #GMountOperation. * - * Query the number of items in @model. + * Gets a choice from the mount operation. * - * Returns: the number of items - * Since: 2.32 + * Returns: an integer containing an index of the user's choice from + * the choice's list, or `0`. */ /** - * g_menu_model_is_mutable: - * @model: a #GMenuModel - * - * Queries if @model is mutable. + * g_mount_operation_get_domain: + * @op: a #GMountOperation. * - * An immutable #GMenuModel will never emit the #GMenuModel::items-changed - * signal. Consumers of the model may make optimisations accordingly. + * Gets the domain of the mount operation. * - * Returns: %TRUE if the model is mutable (ie: "items-changed" may be - * emitted). - * Since: 2.32 + * Returns: a string set to the domain. */ /** - * g_menu_model_items_changed: - * @model: a #GMenuModel - * @position: the position of the change - * @removed: the number of items removed - * @added: the number of items added - * - * Requests emission of the #GMenuModel::items-changed signal on @model. + * g_mount_operation_get_is_tcrypt_hidden_volume: + * @op: a #GMountOperation. * - * This function should never be called except by #GMenuModel - * subclasses. Any other calls to this function will very likely lead - * to a violation of the interface of the model. + * Check to see whether the mount operation is being used + * for a TCRYPT hidden volume. * - * The implementation should update its internal representation of the - * menu before emitting the signal. The implementation should further - * expect to receive queries about the new state of the menu (and - * particularly added menu items) while signal handlers are running. + * Returns: %TRUE if mount operation is for hidden volume. + * Since: 2.58 + */ + + +/** + * g_mount_operation_get_is_tcrypt_system_volume: + * @op: a #GMountOperation. * - * The implementation must dispatch this call directly from a mainloop - * entry and not in response to calls -- particularly those from the - * #GMenuModel API. Said another way: the menu must not change while - * user code is running without returning to the mainloop. + * Check to see whether the mount operation is being used + * for a TCRYPT system volume. * - * Since: 2.32 + * Returns: %TRUE if mount operation is for system volume. + * Since: 2.58 */ /** - * g_menu_model_iterate_item_attributes: - * @model: a #GMenuModel - * @item_index: the index of the item - * - * Creates a #GMenuAttributeIter to iterate over the attributes of - * the item at position @item_index in @model. + * g_mount_operation_get_password: + * @op: a #GMountOperation. * - * You must free the iterator with g_object_unref() when you are done. + * Gets a password from the mount operation. * - * Returns: (transfer full): a new #GMenuAttributeIter - * Since: 2.32 + * Returns: a string containing the password within @op. */ /** - * g_menu_model_iterate_item_links: - * @model: a #GMenuModel - * @item_index: the index of the item - * - * Creates a #GMenuLinkIter to iterate over the links of the item at - * position @item_index in @model. + * g_mount_operation_get_password_save: + * @op: a #GMountOperation. * - * You must free the iterator with g_object_unref() when you are done. + * Gets the state of saving passwords for the mount operation. * - * Returns: (transfer full): a new #GMenuLinkIter - * Since: 2.32 + * Returns: a #GPasswordSave flag. */ /** - * g_menu_new: - * - * Creates a new #GMenu. + * g_mount_operation_get_pim: + * @op: a #GMountOperation. * - * The new menu has no items. + * Gets a PIM from the mount operation. * - * Returns: a new #GMenu - * Since: 2.32 + * Returns: The VeraCrypt PIM within @op. + * Since: 2.58 */ /** - * g_menu_prepend: - * @menu: a #GMenu - * @label: (nullable): the section label, or %NULL - * @detailed_action: (nullable): the detailed action string, or %NULL + * g_mount_operation_get_username: + * @op: a #GMountOperation. * - * Convenience function for prepending a normal menu item to the start - * of @menu. Combine g_menu_item_new() and g_menu_insert_item() for a more - * flexible alternative. + * Get the user name from the mount operation. * - * Since: 2.32 + * Returns: a string containing the user name. */ /** - * g_menu_prepend_item: - * @menu: a #GMenu - * @item: a #GMenuItem to prepend - * - * Prepends @item to the start of @menu. + * g_mount_operation_new: * - * See g_menu_insert_item() for more information. + * Creates a new mount operation. * - * Since: 2.32 + * Returns: a #GMountOperation. */ /** - * g_menu_prepend_section: - * @menu: a #GMenu - * @label: (nullable): the section label, or %NULL - * @section: a #GMenuModel with the items of the section - * - * Convenience function for prepending a section menu item to the start - * of @menu. Combine g_menu_item_new_section() and g_menu_insert_item() for - * a more flexible alternative. + * g_mount_operation_reply: + * @op: a #GMountOperation + * @result: a #GMountOperationResult * - * Since: 2.32 + * Emits the #GMountOperation::reply signal. */ /** - * g_menu_prepend_submenu: - * @menu: a #GMenu - * @label: (nullable): the section label, or %NULL - * @submenu: a #GMenuModel with the items of the submenu + * g_mount_operation_set_anonymous: + * @op: a #GMountOperation. + * @anonymous: boolean value. * - * Convenience function for prepending a submenu menu item to the start - * of @menu. Combine g_menu_item_new_submenu() and g_menu_insert_item() for - * a more flexible alternative. + * Sets the mount operation to use an anonymous user if @anonymous is %TRUE. + */ + + +/** + * g_mount_operation_set_choice: + * @op: a #GMountOperation. + * @choice: an integer. * - * Since: 2.32 + * Sets a default choice for the mount operation. */ /** - * g_menu_remove: - * @menu: a #GMenu - * @position: the position of the item to remove + * g_mount_operation_set_domain: + * @op: a #GMountOperation. + * @domain: the domain to set. * - * Removes an item from the menu. + * Sets the mount operation's domain. + */ + + +/** + * g_mount_operation_set_is_tcrypt_hidden_volume: + * @op: a #GMountOperation. + * @hidden_volume: boolean value. * - * @position gives the index of the item to remove. + * Sets the mount operation to use a hidden volume if @hidden_volume is %TRUE. * - * It is an error if position is not in range the range from 0 to one - * less than the number of items in the menu. + * Since: 2.58 + */ + + +/** + * g_mount_operation_set_is_tcrypt_system_volume: + * @op: a #GMountOperation. + * @system_volume: boolean value. * - * It is not possible to remove items by identity since items are added - * to the menu simply by copying their links and attributes (ie: - * identity of the item itself is not preserved). + * Sets the mount operation to use a system volume if @system_volume is %TRUE. * - * Since: 2.32 + * Since: 2.58 */ /** - * g_menu_remove_all: - * @menu: a #GMenu + * g_mount_operation_set_password: + * @op: a #GMountOperation. + * @password: password to set. * - * Removes all items in the menu. + * Sets the mount operation's password to @password. + */ + + +/** + * g_mount_operation_set_password_save: + * @op: a #GMountOperation. + * @save: a set of #GPasswordSave flags. * - * Since: 2.38 + * Sets the state of saving passwords for the mount operation. */ /** - * g_mount_can_eject: - * @mount: a #GMount. + * g_mount_operation_set_pim: + * @op: a #GMountOperation. + * @pim: an unsigned integer. * - * Checks if @mount can be ejected. + * Sets the mount operation's PIM to @pim. * - * Returns: %TRUE if the @mount can be ejected. + * Since: 2.58 */ /** - * g_mount_can_unmount: - * @mount: a #GMount. - * - * Checks if @mount can be unmounted. + * g_mount_operation_set_username: + * @op: a #GMountOperation. + * @username: input username. * - * Returns: %TRUE if the @mount can be unmounted. + * Sets the user name within @op to @username. */ /** - * g_mount_eject: + * g_mount_remount: * @mount: a #GMount. - * @flags: flags affecting the unmount if required for eject + * @flags: flags affecting the operation + * @mount_operation: (nullable): a #GMountOperation or %NULL to avoid + * user interaction. * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. * @callback: (nullable): a #GAsyncReadyCallback, or %NULL. * @user_data: user data passed to @callback. * - * Ejects a mount. This is an asynchronous operation, and is - * finished by calling g_mount_eject_finish() with the @mount - * and #GAsyncResult data returned in the @callback. + * Remounts a mount. This is an asynchronous operation, and is + * finished by calling g_mount_remount_finish() with the @mount + * and #GAsyncResults data returned in the @callback. * - * Deprecated: 2.22: Use g_mount_eject_with_operation() instead. + * Remounting is useful when some setting affecting the operation + * of the volume has been changed, as these may need a remount to + * take affect. While this is semantically equivalent with unmounting + * and then remounting not all backends might need to actually be + * unmounted. */ /** - * g_mount_eject_finish: + * g_mount_remount_finish: * @mount: a #GMount. * @result: a #GAsyncResult. * @error: a #GError location to store the error occurring, or %NULL to * ignore. * - * Finishes ejecting a mount. If any errors occurred during the operation, + * Finishes remounting a mount. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * - * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise. - * Deprecated: 2.22: Use g_mount_eject_with_operation_finish() instead. + * Returns: %TRUE if the mount was successfully remounted. %FALSE otherwise. */ /** - * g_mount_eject_with_operation: + * g_mount_shadow: + * @mount: A #GMount. + * + * Increments the shadow count on @mount. Usually used by + * #GVolumeMonitor implementations when creating a shadow mount for + * @mount, see g_mount_is_shadowed() for more information. The caller + * will need to emit the #GMount::changed signal on @mount manually. + * + * Since: 2.20 + */ + + +/** + * g_mount_unmount: * @mount: a #GMount. - * @flags: flags affecting the unmount if required for eject - * @mount_operation: (nullable): a #GMountOperation or %NULL to avoid - * user interaction. + * @flags: flags affecting the operation * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. * @callback: (nullable): a #GAsyncReadyCallback, or %NULL. * @user_data: user data passed to @callback. * - * Ejects a mount. This is an asynchronous operation, and is - * finished by calling g_mount_eject_with_operation_finish() with the @mount + * Unmounts a mount. This is an asynchronous operation, and is + * finished by calling g_mount_unmount_finish() with the @mount * and #GAsyncResult data returned in the @callback. * - * Since: 2.22 + * Deprecated: 2.22: Use g_mount_unmount_with_operation() instead. */ /** - * g_mount_eject_with_operation_finish: + * g_mount_unmount_finish: * @mount: a #GMount. * @result: a #GAsyncResult. * @error: a #GError location to store the error occurring, or %NULL to * ignore. * - * Finishes ejecting a mount. If any errors occurred during the operation, + * Finishes unmounting a mount. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * - * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise. - * Since: 2.22 + * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise. + * Deprecated: 2.22: Use g_mount_unmount_with_operation_finish() instead. */ /** - * g_mount_get_default_location: + * g_mount_unmount_with_operation: * @mount: a #GMount. + * @flags: flags affecting the operation + * @mount_operation: (nullable): a #GMountOperation or %NULL to avoid + * user interaction. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (nullable): a #GAsyncReadyCallback, or %NULL. + * @user_data: user data passed to @callback. * - * Gets the default location of @mount. The default location of the given - * @mount is a path that reflects the main entry point for the user (e.g. - * the home directory, or the root of the volume). + * Unmounts a mount. This is an asynchronous operation, and is + * finished by calling g_mount_unmount_with_operation_finish() with the @mount + * and #GAsyncResult data returned in the @callback. * - * Returns: (transfer full): a #GFile. - * The returned object should be unreffed with - * g_object_unref() when no longer needed. + * Since: 2.22 */ /** - * g_mount_get_drive: + * g_mount_unmount_with_operation_finish: * @mount: a #GMount. + * @result: a #GAsyncResult. + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. * - * Gets the drive for the @mount. - * - * This is a convenience method for getting the #GVolume and then - * using that object to get the #GDrive. + * Finishes unmounting a mount. If any errors occurred during the operation, + * @error will be set to contain the errors and %FALSE will be returned. * - * Returns: (transfer full): a #GDrive or %NULL if @mount is not associated with a volume or a drive. - * The returned object should be unreffed with - * g_object_unref() when no longer needed. + * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise. + * Since: 2.22 */ /** - * g_mount_get_icon: - * @mount: a #GMount. + * g_mount_unshadow: + * @mount: A #GMount. * - * Gets the icon for @mount. + * Decrements the shadow count on @mount. Usually used by + * #GVolumeMonitor implementations when destroying a shadow mount for + * @mount, see g_mount_is_shadowed() for more information. The caller + * will need to emit the #GMount::changed signal on @mount manually. * - * Returns: (transfer full): a #GIcon. - * The returned object should be unreffed with - * g_object_unref() when no longer needed. + * Since: 2.20 */ /** - * g_mount_get_name: - * @mount: a #GMount. + * g_native_socket_address_new: + * @native: a native address object + * @len: the length of @native, in bytes * - * Gets the name of @mount. + * Creates a new #GNativeSocketAddress for @native and @len. * - * Returns: the name for the given @mount. - * The returned string should be freed with g_free() - * when no longer needed. + * Returns: a new #GNativeSocketAddress + * Since: 2.46 */ /** - * g_mount_get_root: - * @mount: a #GMount. + * g_network_address_get_hostname: + * @addr: a #GNetworkAddress * - * Gets the root directory on @mount. + * Gets @addr's hostname. This might be either UTF-8 or ASCII-encoded, + * depending on what @addr was created with. * - * Returns: (transfer full): a #GFile. - * The returned object should be unreffed with - * g_object_unref() when no longer needed. + * Returns: @addr's hostname + * Since: 2.22 */ /** - * g_mount_get_sort_key: - * @mount: A #GMount. + * g_network_address_get_port: + * @addr: a #GNetworkAddress * - * Gets the sort key for @mount, if any. + * Gets @addr's port number * - * Returns: Sorting key for @mount or %NULL if no such key is available. - * Since: 2.32 + * Returns: @addr's port (which may be 0) + * Since: 2.22 */ /** - * g_mount_get_symbolic_icon: - * @mount: a #GMount. + * g_network_address_get_scheme: + * @addr: a #GNetworkAddress * - * Gets the symbolic icon for @mount. + * Gets @addr's scheme * - * Returns: (transfer full): a #GIcon. - * The returned object should be unreffed with - * g_object_unref() when no longer needed. - * Since: 2.34 + * Returns: @addr's scheme (%NULL if not built from URI) + * Since: 2.26 */ /** - * g_mount_get_uuid: - * @mount: a #GMount. + * g_network_address_new: + * @hostname: the hostname + * @port: the port * - * Gets the UUID for the @mount. The reference is typically based on - * the file system UUID for the mount in question and should be - * considered an opaque string. Returns %NULL if there is no UUID - * available. + * Creates a new #GSocketConnectable for connecting to the given + * @hostname and @port. * - * Returns: the UUID for @mount or %NULL if no UUID can be computed. - * The returned string should be freed with g_free() - * when no longer needed. + * Note that depending on the configuration of the machine, a + * @hostname of `localhost` may refer to the IPv4 loopback address + * only, or to both IPv4 and IPv6; use + * g_network_address_new_loopback() to create a #GNetworkAddress that + * is guaranteed to resolve to both addresses. + * + * Returns: (transfer full) (type GNetworkAddress): the new #GNetworkAddress + * Since: 2.22 */ /** - * g_mount_get_volume: - * @mount: a #GMount. + * g_network_address_new_loopback: + * @port: the port * - * Gets the volume for the @mount. + * Creates a new #GSocketConnectable for connecting to the local host + * over a loopback connection to the given @port. This is intended for + * use in connecting to local services which may be running on IPv4 or + * IPv6. * - * Returns: (transfer full): a #GVolume or %NULL if @mount is not associated with a volume. - * The returned object should be unreffed with - * g_object_unref() when no longer needed. + * The connectable will return IPv4 and IPv6 loopback addresses, + * regardless of how the host resolves `localhost`. By contrast, + * g_network_address_new() will often only return an IPv4 address when + * resolving `localhost`, and an IPv6 address for `localhost6`. + * + * g_network_address_get_hostname() will always return `localhost` for + * a #GNetworkAddress created with this constructor. + * + * Returns: (transfer full) (type GNetworkAddress): the new #GNetworkAddress + * Since: 2.44 */ /** - * g_mount_guess_content_type: - * @mount: a #GMount - * @force_rescan: Whether to force a rescan of the content. - * Otherwise a cached result will be used if available - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore - * @callback: a #GAsyncReadyCallback - * @user_data: user data passed to @callback - * - * Tries to guess the type of content stored on @mount. Returns one or - * more textual identifiers of well-known content types (typically - * prefixed with "x-content/"), e.g. x-content/image-dcf for camera - * memory cards. See the - * [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) - * specification for more on x-content types. - * - * This is an asynchronous operation (see - * g_mount_guess_content_type_sync() for the synchronous version), and - * is finished by calling g_mount_guess_content_type_finish() with the - * @mount and #GAsyncResult data returned in the @callback. - * - * Since: 2.18 - */ - - -/** - * g_mount_guess_content_type_finish: - * @mount: a #GMount - * @result: a #GAsyncResult - * @error: a #GError location to store the error occurring, or %NULL to - * ignore - * - * Finishes guessing content types of @mount. If any errors occurred - * during the operation, @error will be set to contain the errors and - * %FALSE will be returned. In particular, you may get an - * %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content - * guessing. - * - * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error. - * Caller should free this array with g_strfreev() when done with it. - * Since: 2.18 - */ - - -/** - * g_mount_guess_content_type_sync: - * @mount: a #GMount - * @force_rescan: Whether to force a rescan of the content. - * Otherwise a cached result will be used if available - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore - * @error: a #GError location to store the error occurring, or %NULL to - * ignore - * - * Tries to guess the type of content stored on @mount. Returns one or - * more textual identifiers of well-known content types (typically - * prefixed with "x-content/"), e.g. x-content/image-dcf for camera - * memory cards. See the - * [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) - * specification for more on x-content types. - * - * This is an synchronous operation and as such may block doing IO; - * see g_mount_guess_content_type() for the asynchronous version. - * - * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error. - * Caller should free this array with g_strfreev() when done with it. - * Since: 2.18 - */ - - -/** - * g_mount_is_shadowed: - * @mount: A #GMount. - * - * Determines if @mount is shadowed. Applications or libraries should - * avoid displaying @mount in the user interface if it is shadowed. - * - * A mount is said to be shadowed if there exists one or more user - * visible objects (currently #GMount objects) with a root that is - * inside the root of @mount. - * - * One application of shadow mounts is when exposing a single file - * system that is used to address several logical volumes. In this - * situation, a #GVolumeMonitor implementation would create two - * #GVolume objects (for example, one for the camera functionality of - * the device and one for a SD card reader on the device) with - * activation URIs `gphoto2://[usb:001,002]/store1/` - * and `gphoto2://[usb:001,002]/store2/`. When the - * underlying mount (with root - * `gphoto2://[usb:001,002]/`) is mounted, said - * #GVolumeMonitor implementation would create two #GMount objects - * (each with their root matching the corresponding volume activation - * root) that would shadow the original mount. - * - * The proxy monitor in GVfs 2.26 and later, automatically creates and - * manage shadow mounts (and shadows the underlying mount) if the - * activation root on a #GVolume is set. - * - * Returns: %TRUE if @mount is shadowed. - * Since: 2.20 - */ - - -/** - * g_mount_operation_get_anonymous: - * @op: a #GMountOperation. - * - * Check to see whether the mount operation is being used - * for an anonymous user. - * - * Returns: %TRUE if mount operation is anonymous. - */ - - -/** - * g_mount_operation_get_choice: - * @op: a #GMountOperation. - * - * Gets a choice from the mount operation. - * - * Returns: an integer containing an index of the user's choice from - * the choice's list, or %0. - */ - - -/** - * g_mount_operation_get_domain: - * @op: a #GMountOperation. - * - * Gets the domain of the mount operation. - * - * Returns: a string set to the domain. - */ - - -/** - * g_mount_operation_get_password: - * @op: a #GMountOperation. - * - * Gets a password from the mount operation. - * - * Returns: a string containing the password within @op. - */ - - -/** - * g_mount_operation_get_password_save: - * @op: a #GMountOperation. - * - * Gets the state of saving passwords for the mount operation. - * - * Returns: a #GPasswordSave flag. - */ - - -/** - * g_mount_operation_get_username: - * @op: a #GMountOperation. - * - * Get the user name from the mount operation. - * - * Returns: a string containing the user name. - */ - - -/** - * g_mount_operation_new: - * - * Creates a new mount operation. - * - * Returns: a #GMountOperation. - */ - - -/** - * g_mount_operation_reply: - * @op: a #GMountOperation - * @result: a #GMountOperationResult - * - * Emits the #GMountOperation::reply signal. - */ - - -/** - * g_mount_operation_set_anonymous: - * @op: a #GMountOperation. - * @anonymous: boolean value. - * - * Sets the mount operation to use an anonymous user if @anonymous is %TRUE. - */ - - -/** - * g_mount_operation_set_choice: - * @op: a #GMountOperation. - * @choice: an integer. - * - * Sets a default choice for the mount operation. - */ - - -/** - * g_mount_operation_set_domain: - * @op: a #GMountOperation. - * @domain: the domain to set. - * - * Sets the mount operation's domain. - */ - - -/** - * g_mount_operation_set_password: - * @op: a #GMountOperation. - * @password: password to set. - * - * Sets the mount operation's password to @password. - */ - - -/** - * g_mount_operation_set_password_save: - * @op: a #GMountOperation. - * @save: a set of #GPasswordSave flags. - * - * Sets the state of saving passwords for the mount operation. - */ - - -/** - * g_mount_operation_set_username: - * @op: a #GMountOperation. - * @username: input username. - * - * Sets the user name within @op to @username. - */ - - -/** - * g_mount_remount: - * @mount: a #GMount. - * @flags: flags affecting the operation - * @mount_operation: (nullable): a #GMountOperation or %NULL to avoid - * user interaction. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (nullable): a #GAsyncReadyCallback, or %NULL. - * @user_data: user data passed to @callback. - * - * Remounts a mount. This is an asynchronous operation, and is - * finished by calling g_mount_remount_finish() with the @mount - * and #GAsyncResults data returned in the @callback. - * - * Remounting is useful when some setting affecting the operation - * of the volume has been changed, as these may need a remount to - * take affect. While this is semantically equivalent with unmounting - * and then remounting not all backends might need to actually be - * unmounted. - */ - - -/** - * g_mount_remount_finish: - * @mount: a #GMount. - * @result: a #GAsyncResult. - * @error: a #GError location to store the error occurring, or %NULL to - * ignore. - * - * Finishes remounting a mount. If any errors occurred during the operation, - * @error will be set to contain the errors and %FALSE will be returned. - * - * Returns: %TRUE if the mount was successfully remounted. %FALSE otherwise. - */ - - -/** - * g_mount_shadow: - * @mount: A #GMount. - * - * Increments the shadow count on @mount. Usually used by - * #GVolumeMonitor implementations when creating a shadow mount for - * @mount, see g_mount_is_shadowed() for more information. The caller - * will need to emit the #GMount::changed signal on @mount manually. - * - * Since: 2.20 - */ - - -/** - * g_mount_unmount: - * @mount: a #GMount. - * @flags: flags affecting the operation - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (nullable): a #GAsyncReadyCallback, or %NULL. - * @user_data: user data passed to @callback. - * - * Unmounts a mount. This is an asynchronous operation, and is - * finished by calling g_mount_unmount_finish() with the @mount - * and #GAsyncResult data returned in the @callback. - * - * Deprecated: 2.22: Use g_mount_unmount_with_operation() instead. - */ - - -/** - * g_mount_unmount_finish: - * @mount: a #GMount. - * @result: a #GAsyncResult. - * @error: a #GError location to store the error occurring, or %NULL to - * ignore. - * - * Finishes unmounting a mount. If any errors occurred during the operation, - * @error will be set to contain the errors and %FALSE will be returned. - * - * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise. - * Deprecated: 2.22: Use g_mount_unmount_with_operation_finish() instead. - */ - - -/** - * g_mount_unmount_with_operation: - * @mount: a #GMount. - * @flags: flags affecting the operation - * @mount_operation: (nullable): a #GMountOperation or %NULL to avoid - * user interaction. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (nullable): a #GAsyncReadyCallback, or %NULL. - * @user_data: user data passed to @callback. - * - * Unmounts a mount. This is an asynchronous operation, and is - * finished by calling g_mount_unmount_with_operation_finish() with the @mount - * and #GAsyncResult data returned in the @callback. - * - * Since: 2.22 - */ - - -/** - * g_mount_unmount_with_operation_finish: - * @mount: a #GMount. - * @result: a #GAsyncResult. - * @error: a #GError location to store the error occurring, or %NULL to - * ignore. - * - * Finishes unmounting a mount. If any errors occurred during the operation, - * @error will be set to contain the errors and %FALSE will be returned. - * - * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise. - * Since: 2.22 - */ - - -/** - * g_mount_unshadow: - * @mount: A #GMount. - * - * Decrements the shadow count on @mount. Usually used by - * #GVolumeMonitor implementations when destroying a shadow mount for - * @mount, see g_mount_is_shadowed() for more information. The caller - * will need to emit the #GMount::changed signal on @mount manually. - * - * Since: 2.20 - */ - - -/** - * g_native_socket_address_new: - * @native: a native address object - * @len: the length of @native, in bytes - * - * Creates a new #GNativeSocketAddress for @native and @len. - * - * Returns: a new #GNativeSocketAddress - * Since: 2.46 - */ - - -/** - * g_network_address_get_hostname: - * @addr: a #GNetworkAddress - * - * Gets @addr's hostname. This might be either UTF-8 or ASCII-encoded, - * depending on what @addr was created with. - * - * Returns: @addr's hostname - * Since: 2.22 - */ - - -/** - * g_network_address_get_port: - * @addr: a #GNetworkAddress - * - * Gets @addr's port number - * - * Returns: @addr's port (which may be 0) - * Since: 2.22 - */ - - -/** - * g_network_address_get_scheme: - * @addr: a #GNetworkAddress - * - * Gets @addr's scheme - * - * Returns: @addr's scheme (%NULL if not built from URI) - * Since: 2.26 - */ - - -/** - * g_network_address_new: - * @hostname: the hostname - * @port: the port - * - * Creates a new #GSocketConnectable for connecting to the given - * @hostname and @port. - * - * Note that depending on the configuration of the machine, a - * @hostname of `localhost` may refer to the IPv4 loopback address - * only, or to both IPv4 and IPv6; use - * g_network_address_new_loopback() to create a #GNetworkAddress that - * is guaranteed to resolve to both addresses. - * - * Returns: (transfer full) (type GNetworkAddress): the new #GNetworkAddress - * Since: 2.22 - */ - - -/** - * g_network_address_new_loopback: - * @port: the port - * - * Creates a new #GSocketConnectable for connecting to the local host - * over a loopback connection to the given @port. This is intended for - * use in connecting to local services which may be running on IPv4 or - * IPv6. - * - * The connectable will return IPv4 and IPv6 loopback addresses, - * regardless of how the host resolves `localhost`. By contrast, - * g_network_address_new() will often only return an IPv4 address when - * resolving `localhost`, and an IPv6 address for `localhost6`. - * - * g_network_address_get_hostname() will always return `localhost` for - * #GNetworkAddresses created with this constructor. - * - * Returns: (transfer full) (type GNetworkAddress): the new #GNetworkAddress - * Since: 2.44 - */ - - -/** - * g_network_address_parse: - * @host_and_port: the hostname and optionally a port - * @default_port: the default port if not in @host_and_port - * @error: a pointer to a #GError, or %NULL + * g_network_address_parse: + * @host_and_port: the hostname and optionally a port + * @default_port: the default port if not in @host_and_port + * @error: a pointer to a #GError, or %NULL * * Creates a new #GSocketConnectable for connecting to the given * @hostname and @port. May fail and return %NULL in case @@ -30546,7 +29333,7 @@ /** * g_network_monitor_base_add_network: * @monitor: the #GNetworkMonitorBase - * @network: a #GInetAddressMask + * @network: (transfer none): a #GInetAddressMask * * Adds @network to @monitor's list of available networks. * @@ -31530,62 +30317,253 @@ /** - * g_permission_acquire: - * @permission: a #GPermission instance - * @cancellable: (nullable): a #GCancellable, or %NULL - * @error: a pointer to a %NULL #GError, or %NULL + * g_output_stream_writev: (virtual writev_fn) + * @stream: a #GOutputStream. + * @vectors: (array length=n_vectors): the buffer containing the #GOutputVectors to write. + * @n_vectors: the number of vectors to write + * @bytes_written: (out) (optional): location to store the number of bytes that were + * written to the stream + * @cancellable: (nullable): optional cancellable object + * @error: location to store the error occurring, or %NULL to ignore * - * Attempts to acquire the permission represented by @permission. + * Tries to write the bytes contained in the @n_vectors @vectors into the + * stream. Will block during the operation. * - * The precise method by which this happens depends on the permission - * and the underlying authentication mechanism. A simple example is - * that a dialog may appear asking the user to enter their password. + * If @n_vectors is 0 or the sum of all bytes in @vectors is 0, returns 0 and + * does nothing. * - * You should check with g_permission_get_can_acquire() before calling - * this function. + * On success, the number of bytes written to the stream is returned. + * It is not an error if this is not the same as the requested size, as it + * can happen e.g. on a partial I/O error, or if there is not enough + * storage in the stream. All writes block until at least one byte + * is written or an error occurs; 0 is never returned (unless + * @n_vectors is 0 or the sum of all bytes in @vectors is 0). * - * If the permission is acquired then %TRUE is returned. Otherwise, - * %FALSE is returned and @error is set appropriately. + * If @cancellable is not %NULL, then the operation can be cancelled by + * triggering the cancellable object from another thread. If the operation + * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an + * operation was partially finished when the operation was cancelled the + * partial result will be returned, without an error. * - * This call is blocking, likely for a very long time (in the case that - * user interaction is required). See g_permission_acquire_async() for - * the non-blocking version. + * Some implementations of g_output_stream_writev() may have limitations on the + * aggregate buffer size, and will return %G_IO_ERROR_INVALID_ARGUMENT if these + * are exceeded. For example, when writing to a local file on UNIX platforms, + * the aggregate buffer size must not exceed %G_MAXSSIZE bytes. * - * Returns: %TRUE if the permission was successfully acquired - * Since: 2.26 + * Returns: %TRUE on success, %FALSE if there was an error + * Since: 2.60 */ /** - * g_permission_acquire_async: - * @permission: a #GPermission instance - * @cancellable: (nullable): a #GCancellable, or %NULL - * @callback: the #GAsyncReadyCallback to call when done - * @user_data: the user data to pass to @callback + * g_output_stream_writev_all: + * @stream: a #GOutputStream. + * @vectors: (array length=n_vectors): the buffer containing the #GOutputVectors to write. + * @n_vectors: the number of vectors to write + * @bytes_written: (out) (optional): location to store the number of bytes that were + * written to the stream + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: location to store the error occurring, or %NULL to ignore * - * Attempts to acquire the permission represented by @permission. + * Tries to write the bytes contained in the @n_vectors @vectors into the + * stream. Will block during the operation. * - * This is the first half of the asynchronous version of - * g_permission_acquire(). + * This function is similar to g_output_stream_writev(), except it tries to + * write as many bytes as requested, only stopping on an error. * - * Since: 2.26 - */ - - -/** - * g_permission_acquire_finish: - * @permission: a #GPermission instance - * @result: the #GAsyncResult given to the #GAsyncReadyCallback - * @error: a pointer to a %NULL #GError, or %NULL + * On a successful write of all @n_vectors vectors, %TRUE is returned, and + * @bytes_written is set to the sum of all the sizes of @vectors. * - * Collects the result of attempting to acquire the permission - * represented by @permission. + * If there is an error during the operation %FALSE is returned and @error + * is set to indicate the error status. * - * This is the second half of the asynchronous version of - * g_permission_acquire(). + * As a special exception to the normal conventions for functions that + * use #GError, if this function returns %FALSE (and sets @error) then + * @bytes_written will be set to the number of bytes that were + * successfully written before the error was encountered. This + * functionality is only available from C. If you need it from another + * language then you must write your own loop around + * g_output_stream_write(). * - * Returns: %TRUE if the permission was successfully acquired - * Since: 2.26 + * The content of the individual elements of @vectors might be changed by this + * function. + * + * Returns: %TRUE on success, %FALSE if there was an error + * Since: 2.60 + */ + + +/** + * g_output_stream_writev_all_async: + * @stream: A #GOutputStream + * @vectors: (array length=n_vectors): the buffer containing the #GOutputVectors to write. + * @n_vectors: the number of vectors to write + * @io_priority: the I/O priority of the request + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore + * @callback: (scope async): callback to call when the request is satisfied + * @user_data: (closure): the data to pass to callback function + * + * Request an asynchronous write of the bytes contained in the @n_vectors @vectors into + * the stream. When the operation is finished @callback will be called. + * You can then call g_output_stream_writev_all_finish() to get the result of the + * operation. + * + * This is the asynchronous version of g_output_stream_writev_all(). + * + * Call g_output_stream_writev_all_finish() to collect the result. + * + * Any outstanding I/O request with higher priority (lower numerical + * value) will be executed before an outstanding request with lower + * priority. Default priority is %G_PRIORITY_DEFAULT. + * + * Note that no copy of @vectors will be made, so it must stay valid + * until @callback is called. The content of the individual elements + * of @vectors might be changed by this function. + * + * Since: 2.60 + */ + + +/** + * g_output_stream_writev_all_finish: + * @stream: a #GOutputStream + * @result: a #GAsyncResult + * @bytes_written: (out) (optional): location to store the number of bytes that were written to the stream + * @error: a #GError location to store the error occurring, or %NULL to ignore. + * + * Finishes an asynchronous stream write operation started with + * g_output_stream_writev_all_async(). + * + * As a special exception to the normal conventions for functions that + * use #GError, if this function returns %FALSE (and sets @error) then + * @bytes_written will be set to the number of bytes that were + * successfully written before the error was encountered. This + * functionality is only available from C. If you need it from another + * language then you must write your own loop around + * g_output_stream_writev_async(). + * + * Returns: %TRUE on success, %FALSE if there was an error + * Since: 2.60 + */ + + +/** + * g_output_stream_writev_async: + * @stream: A #GOutputStream. + * @vectors: (array length=n_vectors): the buffer containing the #GOutputVectors to write. + * @n_vectors: the number of vectors to write + * @io_priority: the I/O priority of the request. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (scope async): callback to call when the request is satisfied + * @user_data: (closure): the data to pass to callback function + * + * Request an asynchronous write of the bytes contained in @n_vectors @vectors into + * the stream. When the operation is finished @callback will be called. + * You can then call g_output_stream_writev_finish() to get the result of the + * operation. + * + * During an async request no other sync and async calls are allowed, + * and will result in %G_IO_ERROR_PENDING errors. + * + * On success, the number of bytes written will be passed to the + * @callback. It is not an error if this is not the same as the + * requested size, as it can happen e.g. on a partial I/O error, + * but generally we try to write as many bytes as requested. + * + * You are guaranteed that this method will never fail with + * %G_IO_ERROR_WOULD_BLOCK — if @stream can't accept more data, the + * method will just wait until this changes. + * + * Any outstanding I/O request with higher priority (lower numerical + * value) will be executed before an outstanding request with lower + * priority. Default priority is %G_PRIORITY_DEFAULT. + * + * The asynchronous methods have a default fallback that uses threads + * to implement asynchronicity, so they are optional for inheriting + * classes. However, if you override one you must override all. + * + * For the synchronous, blocking version of this function, see + * g_output_stream_writev(). + * + * Note that no copy of @vectors will be made, so it must stay valid + * until @callback is called. + * + * Since: 2.60 + */ + + +/** + * g_output_stream_writev_finish: + * @stream: a #GOutputStream. + * @result: a #GAsyncResult. + * @bytes_written: (out) (optional): location to store the number of bytes that were written to the stream + * @error: a #GError location to store the error occurring, or %NULL to + * ignore. + * + * Finishes a stream writev operation. + * + * Returns: %TRUE on success, %FALSE if there was an error + * Since: 2.60 + */ + + +/** + * g_permission_acquire: + * @permission: a #GPermission instance + * @cancellable: (nullable): a #GCancellable, or %NULL + * @error: a pointer to a %NULL #GError, or %NULL + * + * Attempts to acquire the permission represented by @permission. + * + * The precise method by which this happens depends on the permission + * and the underlying authentication mechanism. A simple example is + * that a dialog may appear asking the user to enter their password. + * + * You should check with g_permission_get_can_acquire() before calling + * this function. + * + * If the permission is acquired then %TRUE is returned. Otherwise, + * %FALSE is returned and @error is set appropriately. + * + * This call is blocking, likely for a very long time (in the case that + * user interaction is required). See g_permission_acquire_async() for + * the non-blocking version. + * + * Returns: %TRUE if the permission was successfully acquired + * Since: 2.26 + */ + + +/** + * g_permission_acquire_async: + * @permission: a #GPermission instance + * @cancellable: (nullable): a #GCancellable, or %NULL + * @callback: the #GAsyncReadyCallback to call when done + * @user_data: the user data to pass to @callback + * + * Attempts to acquire the permission represented by @permission. + * + * This is the first half of the asynchronous version of + * g_permission_acquire(). + * + * Since: 2.26 + */ + + +/** + * g_permission_acquire_finish: + * @permission: a #GPermission instance + * @result: the #GAsyncResult given to the #GAsyncReadyCallback + * @error: a pointer to a %NULL #GError, or %NULL + * + * Collects the result of attempting to acquire the permission + * represented by @permission. + * + * This is the second half of the asynchronous version of + * g_permission_acquire(). + * + * Returns: %TRUE if the permission was successfully acquired + * Since: 2.26 */ @@ -31867,7 +30845,8 @@ * to having been cancelled. * * Also note that if %G_IO_ERROR_WOULD_BLOCK is returned some underlying - * transports like D/TLS require that you send the same @buffer and @count. + * transports like D/TLS require that you re-send the same @buffer and + * @count in the next write call. * * Returns: the number of bytes written, or -1 on error (including * %G_IO_ERROR_WOULD_BLOCK). @@ -31875,6 +30854,41 @@ /** + * g_pollable_output_stream_writev_nonblocking: (virtual writev_nonblocking) + * @stream: a #GPollableOutputStream + * @vectors: (array length=n_vectors): the buffer containing the #GOutputVectors to write. + * @n_vectors: the number of vectors to write + * @bytes_written: (out) (optional): location to store the number of bytes that were + * written to the stream + * @cancellable: (nullable): a #GCancellable, or %NULL + * @error: #GError for error reporting, or %NULL to ignore. + * + * Attempts to write the bytes contained in the @n_vectors @vectors to @stream, + * as with g_output_stream_writev(). If @stream is not currently writable, + * this will immediately return %@G_POLLABLE_RETURN_WOULD_BLOCK, and you can + * use g_pollable_output_stream_create_source() to create a #GSource + * that will be triggered when @stream is writable. @error will *not* be + * set in that case. + * + * Note that since this method never blocks, you cannot actually + * use @cancellable to cancel it. However, it will return an error + * if @cancellable has already been cancelled when you call, which + * may happen if you call this method after a source triggers due + * to having been cancelled. + * + * Also note that if %G_POLLABLE_RETURN_WOULD_BLOCK is returned some underlying + * transports like D/TLS require that you re-send the same @vectors and + * @n_vectors in the next write call. + * + * Returns: %@G_POLLABLE_RETURN_OK on success, %G_POLLABLE_RETURN_WOULD_BLOCK + * if the stream is not currently writable (and @error is *not* set), or + * %G_POLLABLE_RETURN_FAILED if there was an error in which case @error will + * be set. + * Since: 2.60 + */ + + +/** * g_pollable_source_new: * @pollable_stream: the stream associated with the new source * @@ -32172,8 +31186,8 @@ * g_proxy_get_default_for_protocol: * @protocol: the proxy protocol name (e.g. http, socks, etc) * - * Lookup "gio-proxy" extension point for a proxy implementation that supports - * specified protocol. + * Find the `gio-proxy` extension point for a proxy implementation that supports + * the specified protocol. * * Returns: (transfer full): return a #GProxy or NULL if protocol * is not supported. @@ -32508,10 +31522,68 @@ /** + * g_resolver_lookup_by_name_with_flags: + * @resolver: a #GResolver + * @hostname: the hostname to look up + * @flags: extra #GResolverNameLookupFlags for the lookup + * @cancellable: (nullable): a #GCancellable, or %NULL + * @error: (nullable): return location for a #GError, or %NULL + * + * This differs from g_resolver_lookup_by_name() in that you can modify + * the lookup behavior with @flags. For example this can be used to limit + * results with #G_RESOLVER_NAME_LOOKUP_FLAGS_IPV4_ONLY. + * + * Returns: (element-type GInetAddress) (transfer full): a non-empty #GList + * of #GInetAddress, or %NULL on error. You + * must unref each of the addresses and free the list when you are + * done with it. (You can use g_resolver_free_addresses() to do this.) + * Since: 2.60 + */ + + +/** + * g_resolver_lookup_by_name_with_flags_async: + * @resolver: a #GResolver + * @hostname: the hostname to look up the address of + * @flags: extra #GResolverNameLookupFlags for the lookup + * @cancellable: (nullable): a #GCancellable, or %NULL + * @callback: (scope async): callback to call after resolution completes + * @user_data: (closure): data for @callback + * + * Begins asynchronously resolving @hostname to determine its + * associated IP address(es), and eventually calls @callback, which + * must call g_resolver_lookup_by_name_with_flags_finish() to get the result. + * See g_resolver_lookup_by_name() for more details. + * + * Since: 2.60 + */ + + +/** + * g_resolver_lookup_by_name_with_flags_finish: + * @resolver: a #GResolver + * @result: the result passed to your #GAsyncReadyCallback + * @error: return location for a #GError, or %NULL + * + * Retrieves the result of a call to + * g_resolver_lookup_by_name_with_flags_async(). + * + * If the DNS resolution failed, @error (if non-%NULL) will be set to + * a value from #GResolverError. If the operation was cancelled, + * @error will be set to %G_IO_ERROR_CANCELLED. + * + * Returns: (element-type GInetAddress) (transfer full): a #GList + * of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name() + * for more details. + * Since: 2.60 + */ + + +/** * g_resolver_lookup_records: * @resolver: a #GResolver - * @rrname: the DNS name to lookup the record for - * @record_type: the type of DNS record to lookup + * @rrname: the DNS name to look up the record for + * @record_type: the type of DNS record to look up * @cancellable: (nullable): a #GCancellable, or %NULL * @error: return location for a #GError, or %NULL * @@ -32537,8 +31609,8 @@ /** * g_resolver_lookup_records_async: * @resolver: a #GResolver - * @rrname: the DNS name to lookup the record for - * @record_type: the type of DNS record to lookup + * @rrname: the DNS name to look up the record for + * @record_type: the type of DNS record to look up * @cancellable: (nullable): a #GCancellable, or %NULL * @callback: (scope async): callback to call after resolution completes * @user_data: (closure): data for @callback @@ -32735,6 +31807,11 @@ * If you want to use this resource in the global resource namespace you need * to register it with g_resources_register(). * + * If @filename is empty or the data in it is corrupt, + * %G_RESOURCE_ERROR_INTERNAL will be returned. If @filename doesn’t exist, or + * there is an error in reading it, an error from g_mapped_file_new() will be + * returned. + * * Returns: (transfer full): a new #GResource, or %NULL on error * Since: 2.32 */ @@ -32784,6 +31861,8 @@ * Otherwise this function will internally create a copy of the memory since * GLib 2.56, or in older versions fail and exit the process. * + * If @data is empty or corrupt, %G_RESOURCE_ERROR_INTERNAL will be returned. + * * Returns: (transfer full): a new #GResource, or %NULL on error * Since: 2.32 */ @@ -33473,7 +32552,7 @@ * to the flags value that it represents. * * In order to use this function the type of the value must be an array - * of strings and it must be marked in the schema file as an flags type. + * of strings and it must be marked in the schema file as a flags type. * * It is a programmer error to give a @key that isn't contained in the * schema for @settings or is not marked as a flags type. @@ -33720,22 +32799,15 @@ * The list is exactly the list of strings for which it is not an error * to call g_settings_get_child(). * - * For GSettings objects that are lists, this value can change at any - * time and you should connect to the "children-changed" signal to watch - * for those changes. Note that there is a race condition here: you may - * request a child after listing it only for it to have been destroyed - * in the meantime. For this reason, g_settings_get_child() may return - * %NULL even for a child that was listed by this function. - * - * For GSettings objects that are not lists, you should probably not be - * calling this function from "normal" code (since you should already - * know what children are in your schema). This function may still be - * useful there for introspection reasons, however. + * There is little reason to call this function from "normal" code, since + * you should already know what children are in your schema. This function + * may still be useful there for introspection reasons, however. * * You should free the return value with g_strfreev() when you are done * with it. * - * Returns: (transfer full) (element-type utf8): a list of the children on @settings + * Returns: (transfer full) (element-type utf8): a list of the children on + * @settings, in no defined order */ @@ -33752,7 +32824,9 @@ * You should free the return value with g_strfreev() when you are done * with it. * - * Returns: (transfer full) (element-type utf8): a list of the keys on @settings + * Returns: (transfer full) (element-type utf8): a list of the keys on + * @settings, in no defined order + * Deprecated: 2.46: Use g_settings_schema_list_keys() instead. */ @@ -33762,8 +32836,8 @@ * Deprecated. * * Returns: (element-type utf8) (transfer none): a list of relocatable - * #GSettings schemas that are available. The list must not be - * modified or freed. + * #GSettings schemas that are available, in no defined order. The list must + * not be modified or freed. * Since: 2.28 * Deprecated: 2.40: Use g_settings_schema_source_list_schemas() instead */ @@ -33775,8 +32849,8 @@ * Deprecated. * * Returns: (element-type utf8) (transfer none): a list of #GSettings - * schemas that are available. The list must not be modified or - * freed. + * schemas that are available, in no defined order. The list must not be + * modified or freed. * Since: 2.26 * Deprecated: 2.40: Use g_settings_schema_source_list_schemas() instead. * If you used g_settings_list_schemas() to check for the presence of @@ -33920,7 +32994,7 @@ * Resets @key to its default value. * * This call resets the key, as much as possible, to its default value. - * That might the value specified in the schema or the one set by the + * That might be the value specified in the schema or the one set by the * administrator. */ @@ -33974,7 +33048,7 @@ * database: those located at the path returned by this function. * * Relocatable schemas can be referenced by other schemas and can - * threfore describe multiple sets of keys at different locations. For + * therefore describe multiple sets of keys at different locations. For * relocatable schemas, this function will return %NULL. * * Returns: (transfer none): the path of the schema, or %NULL @@ -34169,7 +33243,8 @@ * You should free the return value with g_strfreev() when you are done * with it. * - * Returns: (transfer full) (element-type utf8): a list of the children on @settings + * Returns: (transfer full) (element-type utf8): a list of the children on + * @settings, in no defined order * Since: 2.44 */ @@ -34185,7 +33260,7 @@ * function is intended for introspection reasons. * * Returns: (transfer full) (element-type utf8): a list of the keys on - * @schema + * @schema, in no defined order * Since: 2.46 */ @@ -34228,9 +33303,9 @@ * @source: a #GSettingsSchemaSource * @recursive: if we should recurse * @non_relocatable: (out) (transfer full) (array zero-terminated=1): the - * list of non-relocatable schemas + * list of non-relocatable schemas, in no defined order * @relocatable: (out) (transfer full) (array zero-terminated=1): the list - * of relocatable schemas + * of relocatable schemas, in no defined order * * Lists the schemas in a given source. * @@ -34293,6 +33368,9 @@ * Generally, you should set @trusted to %TRUE for files installed by the * system and to %FALSE for files in the home directory. * + * In either case, an empty file or some types of corruption in the file will + * result in %G_FILE_ERROR_INVAL being returned. + * * If @parent is non-%NULL then there are two effects. * * First, if g_settings_schema_source_lookup() is called with the @@ -34688,11 +33766,13 @@ /** * g_simple_action_new: * @name: the name of the action - * @parameter_type: (nullable): the type of parameter to the activate function + * @parameter_type: (nullable): the type of parameter that will be passed to + * handlers for the #GSimpleAction::activate signal, or %NULL for no parameter * * Creates a new action. * - * The created action is stateless. See g_simple_action_new_stateful(). + * The created action is stateless. See g_simple_action_new_stateful() to create + * an action that has state. * * Returns: a new #GSimpleAction * Since: 2.28 @@ -34702,15 +33782,16 @@ /** * g_simple_action_new_stateful: * @name: the name of the action - * @parameter_type: (nullable): the type of the parameter to the activate function + * @parameter_type: (nullable): the type of the parameter that will be passed to + * handlers for the #GSimpleAction::activate signal, or %NULL for no parameter * @state: the initial state of the action * * Creates a new stateful action. * - * @state is the initial state of the action. All future state values - * must have the same #GVariantType as the initial state. + * All future state values must have the same #GVariantType as the initial + * @state. * - * If the @state GVariant is floating, it is consumed. + * If the @state #GVariant is floating, it is consumed. * * Returns: a new #GSimpleAction * Since: 2.28 @@ -35306,6 +34387,8 @@ * Asynchronously retrieves the next #GSocketAddress from @enumerator * and then calls @callback, which must call * g_socket_address_enumerator_next_finish() to get the result. + * + * It is an error to call this multiple times before the previous callback has finished. */ @@ -35913,7 +34996,7 @@ * The sockets created by this object will use of the specified * protocol. * - * If @protocol is %0 that means to use the default + * If @protocol is %G_SOCKET_PROTOCOL_DEFAULT that means to use the default * protocol for the socket family and type. * * Since: 2.22 @@ -36082,25 +35165,25 @@ * g_socket_condition_timed_wait: * @socket: a #GSocket * @condition: a #GIOCondition mask to wait for - * @timeout: the maximum time (in microseconds) to wait, or -1 + * @timeout_us: the maximum time (in microseconds) to wait, or -1 * @cancellable: (nullable): a #GCancellable, or %NULL * @error: a #GError pointer, or %NULL * - * Waits for up to @timeout microseconds for @condition to become true + * Waits for up to @timeout_us microseconds for @condition to become true * on @socket. If the condition is met, %TRUE is returned. * * If @cancellable is cancelled before the condition is met, or if - * @timeout (or the socket's #GSocket:timeout) is reached before the + * @timeout_us (or the socket's #GSocket:timeout) is reached before the * condition is met, then %FALSE is returned and @error, if non-%NULL, * is set to the appropriate value (%G_IO_ERROR_CANCELLED or * %G_IO_ERROR_TIMED_OUT). * * If you don't want a timeout, use g_socket_condition_wait(). - * (Alternatively, you can pass -1 for @timeout.) + * (Alternatively, you can pass -1 for @timeout_us.) * - * Note that although @timeout is in microseconds for consistency with + * Note that although @timeout_us is in microseconds for consistency with * other GLib APIs, this function actually only has millisecond - * resolution, and the behavior is undefined if @timeout is not an + * resolution, and the behavior is undefined if @timeout_us is not an * exact number of milliseconds. * * Returns: %TRUE if the condition was met, %FALSE otherwise @@ -36176,7 +35259,7 @@ * @connectable: a #GSocketConnectable * * Creates a #GSocketAddressEnumerator for @connectable that will - * return #GProxyAddresses for addresses that you must connect + * return a #GProxyAddress for each of its addresses that you must connect * to via a proxy. * * If @connectable does not implement @@ -36518,6 +35601,13 @@ * the %G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented * by reading the %SO_PEERCRED option on the underlying socket. * + * This method can be expected to be available on the following platforms: + * + * - Linux since GLib 2.26 + * - OpenBSD since GLib 2.30 + * - Solaris, Illumos and OpenSolaris since GLib 2.40 + * - NetBSD since GLib 2.42 + * * Other ways to obtain credentials from a foreign peer includes the * #GUnixCredentialsMessage type and * g_unix_connection_send_credentials() / @@ -37003,6 +36093,10 @@ * requesting a binding to port 0 (ie: "any port"). This address, if * requested, belongs to the caller and must be freed. * + * Call g_socket_listener_close() to stop listening on @address; this will not + * be done automatically when you drop your final reference to @listener, as + * references may be held internally. + * * Returns: %TRUE on success, %FALSE on error. * Since: 2.22 */ @@ -37047,6 +36141,10 @@ * useful if you're listening on multiple addresses and do * different things depending on what address is connected to. * + * Call g_socket_listener_close() to stop listening on @port; this will not + * be done automatically when you drop your final reference to @listener, as + * references may be held internally. + * * Returns: %TRUE on success, %FALSE on error. * Since: 2.22 */ @@ -37105,7 +36203,9 @@ * @listener: a #GSocketListener * @listen_backlog: an integer * - * Sets the listen backlog on the sockets in the listener. + * Sets the listen backlog on the sockets in the listener. This must be called + * before adding any sockets, addresses or ports to the #GSocketListener (for + * example, by calling g_socket_listener_add_inet_port()) to be effective. * * See g_socket_set_listen_backlog() for details * @@ -37240,7 +36340,9 @@ * which may be filled with an array of #GSocketControlMessages, or %NULL * @num_messages: (out): a pointer which will be filled with the number of * elements in @messages, or %NULL - * @flags: (inout): a pointer to an int containing #GSocketMsgFlags flags + * @flags: (inout): a pointer to an int containing #GSocketMsgFlags flags, + * which may additionally contain + * [other platform specific flags](http://man7.org/linux/man-pages/man2/recv.2.html) * @cancellable: a %GCancellable or %NULL * @error: a #GError pointer, or %NULL * @@ -37315,7 +36417,9 @@ * @socket: a #GSocket * @messages: (array length=num_messages): an array of #GInputMessage structs * @num_messages: the number of elements in @messages - * @flags: an int containing #GSocketMsgFlags flags for the overall operation + * @flags: an int containing #GSocketMsgFlags flags for the overall operation, + * which may additionally contain + * [other platform specific flags](http://man7.org/linux/man-pages/man2/recv.2.html) * @cancellable: (nullable): a %GCancellable or %NULL * @error: #GError for error reporting, or %NULL to ignore * @@ -37436,7 +36540,8 @@ * @messages: (array length=num_messages) (nullable): a pointer to an * array of #GSocketControlMessages, or %NULL. * @num_messages: number of elements in @messages, or -1. - * @flags: an int containing #GSocketMsgFlags flags + * @flags: an int containing #GSocketMsgFlags flags, which may additionally + * contain [other platform specific flags](http://man7.org/linux/man-pages/man2/recv.2.html) * @cancellable: (nullable): a %GCancellable or %NULL * @error: #GError for error reporting, or %NULL to ignore. * @@ -37468,7424 +36573,6273 @@ * are passed in as-is, so you can pass in system-specific flags too. * * If the socket is in blocking mode the call will block until there is - * space for the data in the socket queue. If there is no space available - * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error - * will be returned. To be notified when space is available, wait for the - * %G_IO_OUT condition. Note though that you may still receive - * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously - * notified of a %G_IO_OUT condition. (On Windows in particular, this is - * very common due to the way the underlying APIs work.) - * - * On error -1 is returned and @error is set accordingly. - * - * Returns: Number of bytes written (which may be less than @size), or -1 - * on error - * Since: 2.22 - */ - - -/** - * g_socket_send_messages: - * @socket: a #GSocket - * @messages: (array length=num_messages): an array of #GOutputMessage structs - * @num_messages: the number of elements in @messages - * @flags: an int containing #GSocketMsgFlags flags - * @cancellable: (nullable): a %GCancellable or %NULL - * @error: #GError for error reporting, or %NULL to ignore. - * - * Send multiple data messages from @socket in one go. This is the most - * complicated and fully-featured version of this call. For easier use, see - * g_socket_send(), g_socket_send_to(), and g_socket_send_message(). - * - * @messages must point to an array of #GOutputMessage structs and - * @num_messages must be the length of this array. Each #GOutputMessage - * contains an address to send the data to, and a pointer to an array of - * #GOutputVector structs to describe the buffers that the data to be sent - * for each message will be gathered from. Using multiple #GOutputVectors is - * more memory-efficient than manually copying data from multiple sources - * into a single buffer, and more network-efficient than making multiple - * calls to g_socket_send(). Sending multiple messages in one go avoids the - * overhead of making a lot of syscalls in scenarios where a lot of data - * packets need to be sent (e.g. high-bandwidth video streaming over RTP/UDP), - * or where the same data needs to be sent to multiple recipients. - * - * @flags modify how the message is sent. The commonly available arguments - * for this are available in the #GSocketMsgFlags enum, but the - * values there are the same as the system values, and the flags - * are passed in as-is, so you can pass in system-specific flags too. - * - * If the socket is in blocking mode the call will block until there is - * space for all the data in the socket queue. If there is no space available - * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error - * will be returned if no data was written at all, otherwise the number of - * messages sent will be returned. To be notified when space is available, - * wait for the %G_IO_OUT condition. Note though that you may still receive - * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously - * notified of a %G_IO_OUT condition. (On Windows in particular, this is - * very common due to the way the underlying APIs work.) - * - * On error -1 is returned and @error is set accordingly. An error will only - * be returned if zero messages could be sent; otherwise the number of messages - * successfully sent before the error will be returned. - * - * Returns: number of messages sent, or -1 on error. Note that the number of - * messages sent may be smaller than @num_messages if the socket is - * non-blocking or if @num_messages was larger than UIO_MAXIOV (1024), - * in which case the caller may re-try to send the remaining messages. - * Since: 2.44 - */ - - -/** - * g_socket_send_to: - * @socket: a #GSocket - * @address: (nullable): a #GSocketAddress, or %NULL - * @buffer: (array length=size) (element-type guint8): the buffer - * containing the data to send. - * @size: the number of bytes to send - * @cancellable: (nullable): a %GCancellable or %NULL - * @error: #GError for error reporting, or %NULL to ignore. - * - * Tries to send @size bytes from @buffer to @address. If @address is - * %NULL then the message is sent to the default receiver (set by - * g_socket_connect()). - * - * See g_socket_send() for additional information. - * - * Returns: Number of bytes written (which may be less than @size), or -1 - * on error - * Since: 2.22 - */ - - -/** - * g_socket_send_with_blocking: - * @socket: a #GSocket - * @buffer: (array length=size) (element-type guint8): the buffer - * containing the data to send. - * @size: the number of bytes to send - * @blocking: whether to do blocking or non-blocking I/O - * @cancellable: (nullable): a %GCancellable or %NULL - * @error: #GError for error reporting, or %NULL to ignore. - * - * This behaves exactly the same as g_socket_send(), except that - * the choice of blocking or non-blocking behavior is determined by - * the @blocking argument rather than by @socket's properties. - * - * Returns: Number of bytes written (which may be less than @size), or -1 - * on error - * Since: 2.26 - */ - - -/** - * g_socket_service_is_active: - * @service: a #GSocketService - * - * Check whether the service is active or not. An active - * service will accept new clients that connect, while - * a non-active service will let connecting clients queue - * up until the service is started. - * - * Returns: %TRUE if the service is active, %FALSE otherwise - * Since: 2.22 - */ - - -/** - * g_socket_service_new: - * - * Creates a new #GSocketService with no sockets to listen for. - * New listeners can be added with e.g. g_socket_listener_add_address() - * or g_socket_listener_add_inet_port(). - * - * New services are created active, there is no need to call - * g_socket_service_start(), unless g_socket_service_stop() has been - * called before. - * - * Returns: a new #GSocketService. - * Since: 2.22 - */ - - -/** - * g_socket_service_start: - * @service: a #GSocketService - * - * Restarts the service, i.e. start accepting connections - * from the added sockets when the mainloop runs. This only needs - * to be called after the service has been stopped from - * g_socket_service_stop(). - * - * This call is thread-safe, so it may be called from a thread - * handling an incoming client request. - * - * Since: 2.22 - */ - - -/** - * g_socket_service_stop: - * @service: a #GSocketService - * - * Stops the service, i.e. stops accepting connections - * from the added sockets when the mainloop runs. - * - * This call is thread-safe, so it may be called from a thread - * handling an incoming client request. - * - * Note that this only stops accepting new connections; it does not - * close the listening sockets, and you can call - * g_socket_service_start() again later to begin listening again. To - * close the listening sockets, call g_socket_listener_close(). (This - * will happen automatically when the #GSocketService is finalized.) - * - * This must be called before calling g_socket_listener_close() as - * the socket service will start accepting connections immediately - * when a new socket is added. - * - * Since: 2.22 - */ - - -/** - * g_socket_set_blocking: - * @socket: a #GSocket. - * @blocking: Whether to use blocking I/O or not. - * - * Sets the blocking mode of the socket. In blocking mode - * all operations (which don’t take an explicit blocking parameter) block until - * they succeed or there is an error. In - * non-blocking mode all functions return results immediately or - * with a %G_IO_ERROR_WOULD_BLOCK error. - * - * All sockets are created in blocking mode. However, note that the - * platform level socket is always non-blocking, and blocking mode - * is a GSocket level feature. - * - * Since: 2.22 - */ - - -/** - * g_socket_set_broadcast: - * @socket: a #GSocket. - * @broadcast: whether @socket should allow sending to broadcast - * addresses - * - * Sets whether @socket should allow sending to broadcast addresses. - * This is %FALSE by default. - * - * Since: 2.32 - */ - - -/** - * g_socket_set_keepalive: - * @socket: a #GSocket. - * @keepalive: Value for the keepalive flag - * - * Sets or unsets the %SO_KEEPALIVE flag on the underlying socket. When - * this flag is set on a socket, the system will attempt to verify that the - * remote socket endpoint is still present if a sufficiently long period of - * time passes with no data being exchanged. If the system is unable to - * verify the presence of the remote endpoint, it will automatically close - * the connection. - * - * This option is only functional on certain kinds of sockets. (Notably, - * %G_SOCKET_PROTOCOL_TCP sockets.) - * - * The exact time between pings is system- and protocol-dependent, but will - * normally be at least two hours. Most commonly, you would set this flag - * on a server socket if you want to allow clients to remain idle for long - * periods of time, but also want to ensure that connections are eventually - * garbage-collected if clients crash or become unreachable. - * - * Since: 2.22 - */ - - -/** - * g_socket_set_listen_backlog: - * @socket: a #GSocket. - * @backlog: the maximum number of pending connections. - * - * Sets the maximum number of outstanding connections allowed - * when listening on this socket. If more clients than this are - * connecting to the socket and the application is not handling them - * on time then the new connections will be refused. - * - * Note that this must be called before g_socket_listen() and has no - * effect if called after that. - * - * Since: 2.22 - */ - - -/** - * g_socket_set_multicast_loopback: - * @socket: a #GSocket. - * @loopback: whether @socket should receive messages sent to its - * multicast groups from the local host - * - * Sets whether outgoing multicast packets will be received by sockets - * listening on that multicast address on the same host. This is %TRUE - * by default. - * - * Since: 2.32 - */ - - -/** - * g_socket_set_multicast_ttl: - * @socket: a #GSocket. - * @ttl: the time-to-live value for all multicast datagrams on @socket - * - * Sets the time-to-live for outgoing multicast datagrams on @socket. - * By default, this is 1, meaning that multicast packets will not leave - * the local network. - * - * Since: 2.32 - */ - - -/** - * g_socket_set_option: - * @socket: a #GSocket - * @level: the "API level" of the option (eg, `SOL_SOCKET`) - * @optname: the "name" of the option (eg, `SO_BROADCAST`) - * @value: the value to set the option to - * @error: #GError for error reporting, or %NULL to ignore. - * - * Sets the value of an integer-valued option on @socket, as with - * setsockopt(). (If you need to set a non-integer-valued option, - * you will need to call setsockopt() directly.) - * - * The [][gio-gnetworking.h] - * header pulls in system headers that will define most of the - * standard/portable socket options. For unusual socket protocols or - * platform-dependent options, you may need to include additional - * headers. - * - * Returns: success or failure. On failure, @error will be set, and - * the system error value (`errno` or WSAGetLastError()) will still - * be set to the result of the setsockopt() call. - * Since: 2.36 - */ - - -/** - * g_socket_set_timeout: - * @socket: a #GSocket. - * @timeout: the timeout for @socket, in seconds, or 0 for none - * - * Sets the time in seconds after which I/O operations on @socket will - * time out if they have not yet completed. - * - * On a blocking socket, this means that any blocking #GSocket - * operation will time out after @timeout seconds of inactivity, - * returning %G_IO_ERROR_TIMED_OUT. - * - * On a non-blocking socket, calls to g_socket_condition_wait() will - * also fail with %G_IO_ERROR_TIMED_OUT after the given time. Sources - * created with g_socket_create_source() will trigger after - * @timeout seconds of inactivity, with the requested condition - * set, at which point calling g_socket_receive(), g_socket_send(), - * g_socket_check_connect_result(), etc, will fail with - * %G_IO_ERROR_TIMED_OUT. - * - * If @timeout is 0 (the default), operations will never time out - * on their own. - * - * Note that if an I/O operation is interrupted by a signal, this may - * cause the timeout to be reset. - * - * Since: 2.26 - */ - - -/** - * g_socket_set_ttl: - * @socket: a #GSocket. - * @ttl: the time-to-live value for all unicast packets on @socket - * - * Sets the time-to-live for outgoing unicast packets on @socket. - * By default the platform-specific default value is used. - * - * Since: 2.32 - */ - - -/** - * g_socket_shutdown: - * @socket: a #GSocket - * @shutdown_read: whether to shut down the read side - * @shutdown_write: whether to shut down the write side - * @error: #GError for error reporting, or %NULL to ignore. - * - * Shut down part or all of a full-duplex connection. - * - * If @shutdown_read is %TRUE then the receiving side of the connection - * is shut down, and further reading is disallowed. - * - * If @shutdown_write is %TRUE then the sending side of the connection - * is shut down, and further writing is disallowed. - * - * It is allowed for both @shutdown_read and @shutdown_write to be %TRUE. - * - * One example where it is useful to shut down only one side of a connection is - * graceful disconnect for TCP connections where you close the sending side, - * then wait for the other side to close the connection, thus ensuring that the - * other side saw all sent data. - * - * Returns: %TRUE on success, %FALSE on error - * Since: 2.22 - */ - - -/** - * g_socket_speaks_ipv4: - * @socket: a #GSocket - * - * Checks if a socket is capable of speaking IPv4. - * - * IPv4 sockets are capable of speaking IPv4. On some operating systems - * and under some combinations of circumstances IPv6 sockets are also - * capable of speaking IPv4. See RFC 3493 section 3.7 for more - * information. - * - * No other types of sockets are currently considered as being capable - * of speaking IPv4. - * - * Returns: %TRUE if this socket can be used with IPv4. - * Since: 2.22 - */ - - -/** - * g_srv_target_copy: - * @target: a #GSrvTarget - * - * Copies @target - * - * Returns: a copy of @target - * Since: 2.22 - */ - - -/** - * g_srv_target_free: - * @target: a #GSrvTarget - * - * Frees @target - * - * Since: 2.22 - */ - - -/** - * g_srv_target_get_hostname: - * @target: a #GSrvTarget - * - * Gets @target's hostname (in ASCII form; if you are going to present - * this to the user, you should use g_hostname_is_ascii_encoded() to - * check if it contains encoded Unicode segments, and use - * g_hostname_to_unicode() to convert it if it does.) - * - * Returns: @target's hostname - * Since: 2.22 - */ - - -/** - * g_srv_target_get_port: - * @target: a #GSrvTarget - * - * Gets @target's port - * - * Returns: @target's port - * Since: 2.22 - */ - - -/** - * g_srv_target_get_priority: - * @target: a #GSrvTarget - * - * Gets @target's priority. You should not need to look at this; - * #GResolver already sorts the targets according to the algorithm in - * RFC 2782. - * - * Returns: @target's priority - * Since: 2.22 - */ - - -/** - * g_srv_target_get_weight: - * @target: a #GSrvTarget - * - * Gets @target's weight. You should not need to look at this; - * #GResolver already sorts the targets according to the algorithm in - * RFC 2782. - * - * Returns: @target's weight - * Since: 2.22 - */ - - -/** - * g_srv_target_list_sort: (skip) - * @targets: a #GList of #GSrvTarget - * - * Sorts @targets in place according to the algorithm in RFC 2782. - * - * Returns: (transfer full): the head of the sorted list. - * Since: 2.22 - */ - - -/** - * g_srv_target_new: - * @hostname: the host that the service is running on - * @port: the port that the service is running on - * @priority: the target's priority - * @weight: the target's weight - * - * Creates a new #GSrvTarget with the given parameters. - * - * You should not need to use this; normally #GSrvTargets are - * created by #GResolver. - * - * Returns: a new #GSrvTarget. - * Since: 2.22 - */ - - -/** - * g_static_resource_fini: - * @static_resource: pointer to a static #GStaticResource - * - * Finalized a GResource initialized by g_static_resource_init(). - * - * This is normally used by code generated by - * [glib-compile-resources][glib-compile-resources] - * and is not typically used by other code. - * - * Since: 2.32 - */ - - -/** - * g_static_resource_get_resource: - * @static_resource: pointer to a static #GStaticResource - * - * Gets the GResource that was registered by a call to g_static_resource_init(). - * - * This is normally used by code generated by - * [glib-compile-resources][glib-compile-resources] - * and is not typically used by other code. - * - * Returns: (transfer none): a #GResource - * Since: 2.32 - */ - - -/** - * g_static_resource_init: - * @static_resource: pointer to a static #GStaticResource - * - * Initializes a GResource from static data using a - * GStaticResource. - * - * This is normally used by code generated by - * [glib-compile-resources][glib-compile-resources] - * and is not typically used by other code. - * - * Since: 2.32 - */ - - -/** - * g_subprocess_communicate: - * @subprocess: a #GSubprocess - * @stdin_buf: (nullable): data to send to the stdin of the subprocess, or %NULL - * @cancellable: a #GCancellable - * @stdout_buf: (out) (nullable) (optional) (transfer full): data read from the subprocess stdout - * @stderr_buf: (out) (nullable) (optional) (transfer full): data read from the subprocess stderr - * @error: a pointer to a %NULL #GError pointer, or %NULL - * - * Communicate with the subprocess until it terminates, and all input - * and output has been completed. - * - * If @stdin_buf is given, the subprocess must have been created with - * %G_SUBPROCESS_FLAGS_STDIN_PIPE. The given data is fed to the - * stdin of the subprocess and the pipe is closed (ie: EOF). - * - * At the same time (as not to cause blocking when dealing with large - * amounts of data), if %G_SUBPROCESS_FLAGS_STDOUT_PIPE or - * %G_SUBPROCESS_FLAGS_STDERR_PIPE were used, reads from those - * streams. The data that was read is returned in @stdout and/or - * the @stderr. - * - * If the subprocess was created with %G_SUBPROCESS_FLAGS_STDOUT_PIPE, - * @stdout_buf will contain the data read from stdout. Otherwise, for - * subprocesses not created with %G_SUBPROCESS_FLAGS_STDOUT_PIPE, - * @stdout_buf will be set to %NULL. Similar provisions apply to - * @stderr_buf and %G_SUBPROCESS_FLAGS_STDERR_PIPE. - * - * As usual, any output variable may be given as %NULL to ignore it. - * - * If you desire the stdout and stderr data to be interleaved, create - * the subprocess with %G_SUBPROCESS_FLAGS_STDOUT_PIPE and - * %G_SUBPROCESS_FLAGS_STDERR_MERGE. The merged result will be returned - * in @stdout_buf and @stderr_buf will be set to %NULL. - * - * In case of any error (including cancellation), %FALSE will be - * returned with @error set. Some or all of the stdin data may have - * been written. Any stdout or stderr data that has been read will be - * discarded. None of the out variables (aside from @error) will have - * been set to anything in particular and should not be inspected. - * - * In the case that %TRUE is returned, the subprocess has exited and the - * exit status inspection APIs (eg: g_subprocess_get_if_exited(), - * g_subprocess_get_exit_status()) may be used. - * - * You should not attempt to use any of the subprocess pipes after - * starting this function, since they may be left in strange states, - * even if the operation was cancelled. You should especially not - * attempt to interact with the pipes while the operation is in progress - * (either from another thread or if using the asynchronous version). - * - * Returns: %TRUE if successful - * Since: 2.40 - */ - - -/** - * g_subprocess_communicate_async: - * @subprocess: Self - * @stdin_buf: (nullable): Input data, or %NULL - * @cancellable: (nullable): Cancellable - * @callback: Callback - * @user_data: User data - * - * Asynchronous version of g_subprocess_communicate(). Complete - * invocation with g_subprocess_communicate_finish(). - */ - - -/** - * g_subprocess_communicate_finish: - * @subprocess: Self - * @result: Result - * @stdout_buf: (out) (nullable) (optional) (transfer full): Return location for stdout data - * @stderr_buf: (out) (nullable) (optional) (transfer full): Return location for stderr data - * @error: Error - * - * Complete an invocation of g_subprocess_communicate_async(). - */ - - -/** - * g_subprocess_communicate_utf8: - * @subprocess: a #GSubprocess - * @stdin_buf: (nullable): data to send to the stdin of the subprocess, or %NULL - * @cancellable: a #GCancellable - * @stdout_buf: (out) (nullable) (optional) (transfer full): data read from the subprocess stdout - * @stderr_buf: (out) (nullable) (optional) (transfer full): data read from the subprocess stderr - * @error: a pointer to a %NULL #GError pointer, or %NULL - * - * Like g_subprocess_communicate(), but validates the output of the - * process as UTF-8, and returns it as a regular NUL terminated string. - */ - - -/** - * g_subprocess_communicate_utf8_async: - * @subprocess: Self - * @stdin_buf: (nullable): Input data, or %NULL - * @cancellable: Cancellable - * @callback: Callback - * @user_data: User data - * - * Asynchronous version of g_subprocess_communicate_utf8(). Complete - * invocation with g_subprocess_communicate_utf8_finish(). - */ - - -/** - * g_subprocess_communicate_utf8_finish: - * @subprocess: Self - * @result: Result - * @stdout_buf: (out) (nullable) (optional) (transfer full): Return location for stdout data - * @stderr_buf: (out) (nullable) (optional) (transfer full): Return location for stderr data - * @error: Error - * - * Complete an invocation of g_subprocess_communicate_utf8_async(). - */ - - -/** - * g_subprocess_force_exit: - * @subprocess: a #GSubprocess - * - * Use an operating-system specific method to attempt an immediate, - * forceful termination of the process. There is no mechanism to - * determine whether or not the request itself was successful; - * however, you can use g_subprocess_wait() to monitor the status of - * the process after calling this function. - * - * On Unix, this function sends %SIGKILL. - * - * Since: 2.40 - */ - - -/** - * g_subprocess_get_exit_status: - * @subprocess: a #GSubprocess - * - * Check the exit status of the subprocess, given that it exited - * normally. This is the value passed to the exit() system call or the - * return value from main. - * - * This is equivalent to the system WEXITSTATUS macro. - * - * It is an error to call this function before g_subprocess_wait() and - * unless g_subprocess_get_if_exited() returned %TRUE. - * - * Returns: the exit status - * Since: 2.40 - */ - - -/** - * g_subprocess_get_identifier: - * @subprocess: a #GSubprocess - * - * On UNIX, returns the process ID as a decimal string. - * On Windows, returns the result of GetProcessId() also as a string. - */ - - -/** - * g_subprocess_get_if_exited: - * @subprocess: a #GSubprocess - * - * Check if the given subprocess exited normally (ie: by way of exit() - * or return from main()). - * - * This is equivalent to the system WIFEXITED macro. - * - * It is an error to call this function before g_subprocess_wait() has - * returned. - * - * Returns: %TRUE if the case of a normal exit - * Since: 2.40 - */ - - -/** - * g_subprocess_get_if_signaled: - * @subprocess: a #GSubprocess - * - * Check if the given subprocess terminated in response to a signal. - * - * This is equivalent to the system WIFSIGNALED macro. - * - * It is an error to call this function before g_subprocess_wait() has - * returned. - * - * Returns: %TRUE if the case of termination due to a signal - * Since: 2.40 - */ - - -/** - * g_subprocess_get_status: - * @subprocess: a #GSubprocess - * - * Gets the raw status code of the process, as from waitpid(). - * - * This value has no particular meaning, but it can be used with the - * macros defined by the system headers such as WIFEXITED. It can also - * be used with g_spawn_check_exit_status(). - * - * It is more likely that you want to use g_subprocess_get_if_exited() - * followed by g_subprocess_get_exit_status(). - * - * It is an error to call this function before g_subprocess_wait() has - * returned. - * - * Returns: the (meaningless) waitpid() exit status from the kernel - * Since: 2.40 - */ - - -/** - * g_subprocess_get_stderr_pipe: - * @subprocess: a #GSubprocess - * - * Gets the #GInputStream from which to read the stderr output of - * @subprocess. - * - * The process must have been created with - * %G_SUBPROCESS_FLAGS_STDERR_PIPE. - * - * Returns: (transfer none): the stderr pipe - * Since: 2.40 - */ - - -/** - * g_subprocess_get_stdin_pipe: - * @subprocess: a #GSubprocess - * - * Gets the #GOutputStream that you can write to in order to give data - * to the stdin of @subprocess. - * - * The process must have been created with - * %G_SUBPROCESS_FLAGS_STDIN_PIPE. - * - * Returns: (transfer none): the stdout pipe - * Since: 2.40 - */ - - -/** - * g_subprocess_get_stdout_pipe: - * @subprocess: a #GSubprocess - * - * Gets the #GInputStream from which to read the stdout output of - * @subprocess. - * - * The process must have been created with - * %G_SUBPROCESS_FLAGS_STDOUT_PIPE. - * - * Returns: (transfer none): the stdout pipe - * Since: 2.40 - */ - - -/** - * g_subprocess_get_successful: - * @subprocess: a #GSubprocess - * - * Checks if the process was "successful". A process is considered - * successful if it exited cleanly with an exit status of 0, either by - * way of the exit() system call or return from main(). - * - * It is an error to call this function before g_subprocess_wait() has - * returned. - * - * Returns: %TRUE if the process exited cleanly with a exit status of 0 - * Since: 2.40 - */ - - -/** - * g_subprocess_get_term_sig: - * @subprocess: a #GSubprocess - * - * Get the signal number that caused the subprocess to terminate, given - * that it terminated due to a signal. - * - * This is equivalent to the system WTERMSIG macro. - * - * It is an error to call this function before g_subprocess_wait() and - * unless g_subprocess_get_if_signaled() returned %TRUE. - * - * Returns: the signal causing termination - * Since: 2.40 - */ - - -/** - * g_subprocess_launcher_getenv: - * @self: a #GSubprocess - * @variable: (type filename): the environment variable to get - * - * Returns the value of the environment variable @variable in the - * environment of processes launched from this launcher. - * - * On UNIX, the returned string can be an arbitrary byte string. - * On Windows, it will be UTF-8. - * - * Returns: (type filename): the value of the environment variable, - * %NULL if unset - * Since: 2.40 - */ - - -/** - * g_subprocess_launcher_new: - * @flags: #GSubprocessFlags - * - * Creates a new #GSubprocessLauncher. - * - * The launcher is created with the default options. A copy of the - * environment of the calling process is made at the time of this call - * and will be used as the environment that the process is launched in. - * - * Since: 2.40 - */ - - -/** - * g_subprocess_launcher_set_child_setup: (skip) - * @self: a #GSubprocessLauncher - * @child_setup: a #GSpawnChildSetupFunc to use as the child setup function - * @user_data: user data for @child_setup - * @destroy_notify: a #GDestroyNotify for @user_data - * - * Sets up a child setup function. - * - * The child setup function will be called after fork() but before - * exec() on the child's side. - * - * @destroy_notify will not be automatically called on the child's side - * of the fork(). It will only be called when the last reference on the - * #GSubprocessLauncher is dropped or when a new child setup function is - * given. - * - * %NULL can be given as @child_setup to disable the functionality. - * - * Child setup functions are only available on UNIX. - * - * Since: 2.40 - */ - - -/** - * g_subprocess_launcher_set_cwd: - * @self: a #GSubprocess - * @cwd: (type filename): the cwd for launched processes - * - * Sets the current working directory that processes will be launched - * with. - * - * By default processes are launched with the current working directory - * of the launching process at the time of launch. - * - * Since: 2.40 - */ - - -/** - * g_subprocess_launcher_set_environ: - * @self: a #GSubprocess - * @env: (array zero-terminated=1) (element-type filename) (transfer none): - * the replacement environment - * - * Replace the entire environment of processes launched from this - * launcher with the given 'environ' variable. - * - * Typically you will build this variable by using g_listenv() to copy - * the process 'environ' and using the functions g_environ_setenv(), - * g_environ_unsetenv(), etc. - * - * As an alternative, you can use g_subprocess_launcher_setenv(), - * g_subprocess_launcher_unsetenv(), etc. - * - * Pass an empty array to set an empty environment. Pass %NULL to inherit the - * parent process’ environment. As of GLib 2.54, the parent process’ environment - * will be copied when g_subprocess_launcher_set_environ() is called. - * Previously, it was copied when the subprocess was executed. This means the - * copied environment may now be modified (using g_subprocess_launcher_setenv(), - * etc.) before launching the subprocess. - * - * On UNIX, all strings in this array can be arbitrary byte strings. - * On Windows, they should be in UTF-8. - * - * Since: 2.40 - */ - - -/** - * g_subprocess_launcher_set_flags: - * @self: a #GSubprocessLauncher - * @flags: #GSubprocessFlags - * - * Sets the flags on the launcher. - * - * The default flags are %G_SUBPROCESS_FLAGS_NONE. - * - * You may not set flags that specify conflicting options for how to - * handle a particular stdio stream (eg: specifying both - * %G_SUBPROCESS_FLAGS_STDIN_PIPE and - * %G_SUBPROCESS_FLAGS_STDIN_INHERIT). - * - * You may also not set a flag that conflicts with a previous call to a - * function like g_subprocess_launcher_set_stdin_file_path() or - * g_subprocess_launcher_take_stdout_fd(). - * - * Since: 2.40 - */ - - -/** - * g_subprocess_launcher_set_stderr_file_path: - * @self: a #GSubprocessLauncher - * @path: (type filename) (nullable): a filename or %NULL - * - * Sets the file path to use as the stderr for spawned processes. - * - * If @path is %NULL then any previously given path is unset. - * - * The file will be created or truncated when the process is spawned, as - * would be the case if using '2>' at the shell. - * - * If you want to send both stdout and stderr to the same file then use - * %G_SUBPROCESS_FLAGS_STDERR_MERGE. - * - * You may not set a stderr file path if a stderr fd is already set or - * if the launcher flags contain any flags directing stderr elsewhere. - * - * This feature is only available on UNIX. - * - * Since: 2.40 - */ - - -/** - * g_subprocess_launcher_set_stdin_file_path: - * @self: a #GSubprocessLauncher - * @path: - * - * Sets the file path to use as the stdin for spawned processes. - * - * If @path is %NULL then any previously given path is unset. - * - * The file must exist or spawning the process will fail. - * - * You may not set a stdin file path if a stdin fd is already set or if - * the launcher flags contain any flags directing stdin elsewhere. - * - * This feature is only available on UNIX. - * - * Since: 2.40 - */ - - -/** - * g_subprocess_launcher_set_stdout_file_path: - * @self: a #GSubprocessLauncher - * @path: (type filename) (nullable): a filename or %NULL - * - * Sets the file path to use as the stdout for spawned processes. - * - * If @path is %NULL then any previously given path is unset. - * - * The file will be created or truncated when the process is spawned, as - * would be the case if using '>' at the shell. - * - * You may not set a stdout file path if a stdout fd is already set or - * if the launcher flags contain any flags directing stdout elsewhere. - * - * This feature is only available on UNIX. - * - * Since: 2.40 - */ - - -/** - * g_subprocess_launcher_setenv: - * @self: a #GSubprocess - * @variable: (type filename): the environment variable to set, - * must not contain '=' - * @value: (type filename): the new value for the variable - * @overwrite: whether to change the variable if it already exists - * - * Sets the environment variable @variable in the environment of - * processes launched from this launcher. - * - * On UNIX, both the variable's name and value can be arbitrary byte - * strings, except that the variable's name cannot contain '='. - * On Windows, they should be in UTF-8. - * - * Since: 2.40 - */ - - -/** - * g_subprocess_launcher_spawn: - * @self: a #GSubprocessLauncher - * @error: Error - * @argv0: Command line arguments - * @...: Continued arguments, %NULL terminated - * - * Creates a #GSubprocess given a provided varargs list of arguments. - * - * Since: 2.40 - * Returns: (transfer full): A new #GSubprocess, or %NULL on error (and @error will be set) - */ - - -/** - * g_subprocess_launcher_spawnv: - * @self: a #GSubprocessLauncher - * @argv: (array zero-terminated=1) (element-type filename): Command line arguments - * @error: Error - * - * Creates a #GSubprocess given a provided array of arguments. - * - * Since: 2.40 - * Returns: (transfer full): A new #GSubprocess, or %NULL on error (and @error will be set) - */ - - -/** - * g_subprocess_launcher_take_fd: - * @self: a #GSubprocessLauncher - * @source_fd: File descriptor in parent process - * @target_fd: Target descriptor for child process - * - * Transfer an arbitrary file descriptor from parent process to the - * child. This function takes "ownership" of the fd; it will be closed - * in the parent when @self is freed. - * - * By default, all file descriptors from the parent will be closed. - * This function allows you to create (for example) a custom pipe() or - * socketpair() before launching the process, and choose the target - * descriptor in the child. - * - * An example use case is GNUPG, which has a command line argument - * --passphrase-fd providing a file descriptor number where it expects - * the passphrase to be written. - */ - - -/** - * g_subprocess_launcher_take_stderr_fd: - * @self: a #GSubprocessLauncher - * @fd: a file descriptor, or -1 - * - * Sets the file descriptor to use as the stderr for spawned processes. - * - * If @fd is -1 then any previously given fd is unset. - * - * Note that the default behaviour is to pass stderr through to the - * stderr of the parent process. - * - * The passed @fd belongs to the #GSubprocessLauncher. It will be - * automatically closed when the launcher is finalized. The file - * descriptor will also be closed on the child side when executing the - * spawned process. - * - * You may not set a stderr fd if a stderr file path is already set or - * if the launcher flags contain any flags directing stderr elsewhere. - * - * This feature is only available on UNIX. - * - * Since: 2.40 - */ - - -/** - * g_subprocess_launcher_take_stdin_fd: - * @self: a #GSubprocessLauncher - * @fd: a file descriptor, or -1 - * - * Sets the file descriptor to use as the stdin for spawned processes. - * - * If @fd is -1 then any previously given fd is unset. - * - * Note that if your intention is to have the stdin of the calling - * process inherited by the child then %G_SUBPROCESS_FLAGS_STDIN_INHERIT - * is a better way to go about doing that. - * - * The passed @fd is noted but will not be touched in the current - * process. It is therefore necessary that it be kept open by the - * caller until the subprocess is spawned. The file descriptor will - * also not be explicitly closed on the child side, so it must be marked - * O_CLOEXEC if that's what you want. - * - * You may not set a stdin fd if a stdin file path is already set or if - * the launcher flags contain any flags directing stdin elsewhere. - * - * This feature is only available on UNIX. - * - * Since: 2.40 - */ - - -/** - * g_subprocess_launcher_take_stdout_fd: - * @self: a #GSubprocessLauncher - * @fd: a file descriptor, or -1 - * - * Sets the file descriptor to use as the stdout for spawned processes. - * - * If @fd is -1 then any previously given fd is unset. - * - * Note that the default behaviour is to pass stdout through to the - * stdout of the parent process. - * - * The passed @fd is noted but will not be touched in the current - * process. It is therefore necessary that it be kept open by the - * caller until the subprocess is spawned. The file descriptor will - * also not be explicitly closed on the child side, so it must be marked - * O_CLOEXEC if that's what you want. - * - * You may not set a stdout fd if a stdout file path is already set or - * if the launcher flags contain any flags directing stdout elsewhere. - * - * This feature is only available on UNIX. - * - * Since: 2.40 - */ - - -/** - * g_subprocess_launcher_unsetenv: - * @self: a #GSubprocess - * @variable: (type filename): the environment variable to unset, - * must not contain '=' - * - * Removes the environment variable @variable from the environment of - * processes launched from this launcher. - * - * On UNIX, the variable's name can be an arbitrary byte string not - * containing '='. On Windows, it should be in UTF-8. - * - * Since: 2.40 - */ - - -/** - * g_subprocess_new: (skip) - * @flags: flags that define the behaviour of the subprocess - * @error: (nullable): return location for an error, or %NULL - * @argv0: first commandline argument to pass to the subprocess - * @...: more commandline arguments, followed by %NULL - * - * Create a new process with the given flags and varargs argument - * list. By default, matching the g_spawn_async() defaults, the - * child's stdin will be set to the system null device, and - * stdout/stderr will be inherited from the parent. You can use - * @flags to control this behavior. - * - * The argument list must be terminated with %NULL. - * - * Returns: A newly created #GSubprocess, or %NULL on error (and @error - * will be set) - * Since: 2.40 - */ - - -/** - * g_subprocess_newv: (rename-to g_subprocess_new) - * @argv: (array zero-terminated=1) (element-type filename): commandline arguments for the subprocess - * @flags: flags that define the behaviour of the subprocess - * @error: (nullable): return location for an error, or %NULL - * - * Create a new process with the given flags and argument list. - * - * The argument list is expected to be %NULL-terminated. - * - * Returns: A newly created #GSubprocess, or %NULL on error (and @error - * will be set) - * Since: 2.40 - */ - - -/** - * g_subprocess_send_signal: - * @subprocess: a #GSubprocess - * @signal_num: the signal number to send - * - * Sends the UNIX signal @signal_num to the subprocess, if it is still - * running. - * - * This API is race-free. If the subprocess has terminated, it will not - * be signalled. - * - * This API is not available on Windows. - * - * Since: 2.40 - */ - - -/** - * g_subprocess_wait: - * @subprocess: a #GSubprocess - * @cancellable: a #GCancellable - * @error: a #GError - * - * Synchronously wait for the subprocess to terminate. - * - * After the process terminates you can query its exit status with - * functions such as g_subprocess_get_if_exited() and - * g_subprocess_get_exit_status(). - * - * This function does not fail in the case of the subprocess having - * abnormal termination. See g_subprocess_wait_check() for that. - * - * Cancelling @cancellable doesn't kill the subprocess. Call - * g_subprocess_force_exit() if it is desirable. - * - * Returns: %TRUE on success, %FALSE if @cancellable was cancelled - * Since: 2.40 - */ - - -/** - * g_subprocess_wait_async: - * @subprocess: a #GSubprocess - * @cancellable: a #GCancellable, or %NULL - * @callback: a #GAsyncReadyCallback to call when the operation is complete - * @user_data: user_data for @callback - * - * Wait for the subprocess to terminate. - * - * This is the asynchronous version of g_subprocess_wait(). - * - * Since: 2.40 - */ - - -/** - * g_subprocess_wait_check: - * @subprocess: a #GSubprocess - * @cancellable: a #GCancellable - * @error: a #GError - * - * Combines g_subprocess_wait() with g_spawn_check_exit_status(). - * - * Returns: %TRUE on success, %FALSE if process exited abnormally, or - * @cancellable was cancelled - * Since: 2.40 - */ - - -/** - * g_subprocess_wait_check_async: - * @subprocess: a #GSubprocess - * @cancellable: a #GCancellable, or %NULL - * @callback: a #GAsyncReadyCallback to call when the operation is complete - * @user_data: user_data for @callback - * - * Combines g_subprocess_wait_async() with g_spawn_check_exit_status(). - * - * This is the asynchronous version of g_subprocess_wait_check(). - * - * Since: 2.40 - */ - - -/** - * g_subprocess_wait_check_finish: - * @subprocess: a #GSubprocess - * @result: the #GAsyncResult passed to your #GAsyncReadyCallback - * @error: a pointer to a %NULL #GError, or %NULL - * - * Collects the result of a previous call to - * g_subprocess_wait_check_async(). - * - * Returns: %TRUE if successful, or %FALSE with @error set - * Since: 2.40 - */ - - -/** - * g_subprocess_wait_finish: - * @subprocess: a #GSubprocess - * @result: the #GAsyncResult passed to your #GAsyncReadyCallback - * @error: a pointer to a %NULL #GError, or %NULL - * - * Collects the result of a previous call to - * g_subprocess_wait_async(). - * - * Returns: %TRUE if successful, or %FALSE with @error set - * Since: 2.40 - */ - - -/** - * g_task_attach_source: - * @task: a #GTask - * @source: the source to attach - * @callback: the callback to invoke when @source triggers - * - * A utility function for dealing with async operations where you need - * to wait for a #GSource to trigger. Attaches @source to @task's - * #GMainContext with @task's [priority][io-priority], and sets @source's - * callback to @callback, with @task as the callback's `user_data`. - * - * This takes a reference on @task until @source is destroyed. - * - * Since: 2.36 - */ - - -/** - * g_task_get_cancellable: - * @task: a #GTask - * - * Gets @task's #GCancellable - * - * Returns: (transfer none): @task's #GCancellable - * Since: 2.36 - */ - - -/** - * g_task_get_check_cancellable: - * @task: the #GTask - * - * Gets @task's check-cancellable flag. See - * g_task_set_check_cancellable() for more details. - * - * Since: 2.36 - */ - - -/** - * g_task_get_completed: - * @task: a #GTask. - * - * Gets the value of #GTask:completed. This changes from %FALSE to %TRUE after - * the task’s callback is invoked, and will return %FALSE if called from inside - * the callback. - * - * Returns: %TRUE if the task has completed, %FALSE otherwise. - * Since: 2.44 - */ - - -/** - * g_task_get_context: - * @task: a #GTask - * - * Gets the #GMainContext that @task will return its result in (that - * is, the context that was the - * [thread-default main context][g-main-context-push-thread-default] - * at the point when @task was created). - * - * This will always return a non-%NULL value, even if the task's - * context is the default #GMainContext. - * - * Returns: (transfer none): @task's #GMainContext - * Since: 2.36 - */ - - -/** - * g_task_get_priority: - * @task: a #GTask - * - * Gets @task's priority - * - * Returns: @task's priority - * Since: 2.36 - */ - - -/** - * g_task_get_return_on_cancel: - * @task: the #GTask - * - * Gets @task's return-on-cancel flag. See - * g_task_set_return_on_cancel() for more details. - * - * Since: 2.36 - */ - - -/** - * g_task_get_source_object: - * @task: a #GTask - * - * Gets the source object from @task. Like - * g_async_result_get_source_object(), but does not ref the object. - * - * Returns: (transfer none) (nullable) (type GObject): @task's source object, or %NULL - * Since: 2.36 - */ - - -/** - * g_task_get_source_tag: - * @task: a #GTask - * - * Gets @task's source tag. See g_task_set_source_tag(). - * - * Returns: (transfer none): @task's source tag - * Since: 2.36 - */ - - -/** - * g_task_get_task_data: - * @task: a #GTask + * space for the data in the socket queue. If there is no space available + * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error + * will be returned. To be notified when space is available, wait for the + * %G_IO_OUT condition. Note though that you may still receive + * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously + * notified of a %G_IO_OUT condition. (On Windows in particular, this is + * very common due to the way the underlying APIs work.) * - * Gets @task's `task_data`. + * On error -1 is returned and @error is set accordingly. * - * Returns: (transfer none): @task's `task_data`. - * Since: 2.36 + * Returns: Number of bytes written (which may be less than @size), or -1 + * on error + * Since: 2.22 */ /** - * g_task_had_error: - * @task: a #GTask. - * - * Tests if @task resulted in an error. + * g_socket_send_message_with_timeout: + * @socket: a #GSocket + * @address: (nullable): a #GSocketAddress, or %NULL + * @vectors: (array length=num_vectors): an array of #GOutputVector structs + * @num_vectors: the number of elements in @vectors, or -1 + * @messages: (array length=num_messages) (nullable): a pointer to an + * array of #GSocketControlMessages, or %NULL. + * @num_messages: number of elements in @messages, or -1. + * @flags: an int containing #GSocketMsgFlags flags, which may additionally + * contain [other platform specific flags](http://man7.org/linux/man-pages/man2/recv.2.html) + * @timeout_us: the maximum time (in microseconds) to wait, or -1 + * @bytes_written: (out) (optional): location to store the number of bytes that were written to the socket + * @cancellable: (nullable): a %GCancellable or %NULL + * @error: #GError for error reporting, or %NULL to ignore. * - * Returns: %TRUE if the task resulted in an error, %FALSE otherwise. - * Since: 2.36 + * This behaves exactly the same as g_socket_send_message(), except that + * the choice of timeout behavior is determined by the @timeout_us argument + * rather than by @socket's properties. + * + * On error %G_POLLABLE_RETURN_FAILED is returned and @error is set accordingly, or + * if the socket is currently not writable %G_POLLABLE_RETURN_WOULD_BLOCK is + * returned. @bytes_written will contain 0 in both cases. + * + * Returns: %G_POLLABLE_RETURN_OK if all data was successfully written, + * %G_POLLABLE_RETURN_WOULD_BLOCK if the socket is currently not writable, or + * %G_POLLABLE_RETURN_FAILED if an error happened and @error is set. + * Since: 2.60 */ /** - * g_task_is_valid: - * @result: (type Gio.AsyncResult): A #GAsyncResult - * @source_object: (nullable) (type GObject): the source object - * expected to be associated with the task + * g_socket_send_messages: + * @socket: a #GSocket + * @messages: (array length=num_messages): an array of #GOutputMessage structs + * @num_messages: the number of elements in @messages + * @flags: an int containing #GSocketMsgFlags flags, which may additionally + * contain [other platform specific flags](http://man7.org/linux/man-pages/man2/recv.2.html) + * @cancellable: (nullable): a %GCancellable or %NULL + * @error: #GError for error reporting, or %NULL to ignore. * - * Checks that @result is a #GTask, and that @source_object is its - * source object (or that @source_object is %NULL and @result has no - * source object). This can be used in g_return_if_fail() checks. + * Send multiple data messages from @socket in one go. This is the most + * complicated and fully-featured version of this call. For easier use, see + * g_socket_send(), g_socket_send_to(), and g_socket_send_message(). * - * Returns: %TRUE if @result and @source_object are valid, %FALSE - * if not - * Since: 2.36 - */ - - -/** - * g_task_new: - * @source_object: (nullable) (type GObject): the #GObject that owns - * this task, or %NULL. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (scope async): a #GAsyncReadyCallback. - * @callback_data: (closure): user data passed to @callback. + * @messages must point to an array of #GOutputMessage structs and + * @num_messages must be the length of this array. Each #GOutputMessage + * contains an address to send the data to, and a pointer to an array of + * #GOutputVector structs to describe the buffers that the data to be sent + * for each message will be gathered from. Using multiple #GOutputVectors is + * more memory-efficient than manually copying data from multiple sources + * into a single buffer, and more network-efficient than making multiple + * calls to g_socket_send(). Sending multiple messages in one go avoids the + * overhead of making a lot of syscalls in scenarios where a lot of data + * packets need to be sent (e.g. high-bandwidth video streaming over RTP/UDP), + * or where the same data needs to be sent to multiple recipients. * - * Creates a #GTask acting on @source_object, which will eventually be - * used to invoke @callback in the current - * [thread-default main context][g-main-context-push-thread-default]. + * @flags modify how the message is sent. The commonly available arguments + * for this are available in the #GSocketMsgFlags enum, but the + * values there are the same as the system values, and the flags + * are passed in as-is, so you can pass in system-specific flags too. * - * Call this in the "start" method of your asynchronous method, and - * pass the #GTask around throughout the asynchronous operation. You - * can use g_task_set_task_data() to attach task-specific data to the - * object, which you can retrieve later via g_task_get_task_data(). + * If the socket is in blocking mode the call will block until there is + * space for all the data in the socket queue. If there is no space available + * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error + * will be returned if no data was written at all, otherwise the number of + * messages sent will be returned. To be notified when space is available, + * wait for the %G_IO_OUT condition. Note though that you may still receive + * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously + * notified of a %G_IO_OUT condition. (On Windows in particular, this is + * very common due to the way the underlying APIs work.) * - * By default, if @cancellable is cancelled, then the return value of - * the task will always be %G_IO_ERROR_CANCELLED, even if the task had - * already completed before the cancellation. This allows for - * simplified handling in cases where cancellation may imply that - * other objects that the task depends on have been destroyed. If you - * do not want this behavior, you can use - * g_task_set_check_cancellable() to change it. + * On error -1 is returned and @error is set accordingly. An error will only + * be returned if zero messages could be sent; otherwise the number of messages + * successfully sent before the error will be returned. * - * Returns: a #GTask. - * Since: 2.36 + * Returns: number of messages sent, or -1 on error. Note that the number of + * messages sent may be smaller than @num_messages if the socket is + * non-blocking or if @num_messages was larger than UIO_MAXIOV (1024), + * in which case the caller may re-try to send the remaining messages. + * Since: 2.44 */ /** - * g_task_propagate_boolean: - * @task: a #GTask. - * @error: return location for a #GError - * - * Gets the result of @task as a #gboolean. + * g_socket_send_to: + * @socket: a #GSocket + * @address: (nullable): a #GSocketAddress, or %NULL + * @buffer: (array length=size) (element-type guint8): the buffer + * containing the data to send. + * @size: the number of bytes to send + * @cancellable: (nullable): a %GCancellable or %NULL + * @error: #GError for error reporting, or %NULL to ignore. * - * If the task resulted in an error, or was cancelled, then this will - * instead return %FALSE and set @error. + * Tries to send @size bytes from @buffer to @address. If @address is + * %NULL then the message is sent to the default receiver (set by + * g_socket_connect()). * - * Since this method transfers ownership of the return value (or - * error) to the caller, you may only call it once. + * See g_socket_send() for additional information. * - * Returns: the task result, or %FALSE on error - * Since: 2.36 + * Returns: Number of bytes written (which may be less than @size), or -1 + * on error + * Since: 2.22 */ /** - * g_task_propagate_int: - * @task: a #GTask. - * @error: return location for a #GError - * - * Gets the result of @task as an integer (#gssize). - * - * If the task resulted in an error, or was cancelled, then this will - * instead return -1 and set @error. + * g_socket_send_with_blocking: + * @socket: a #GSocket + * @buffer: (array length=size) (element-type guint8): the buffer + * containing the data to send. + * @size: the number of bytes to send + * @blocking: whether to do blocking or non-blocking I/O + * @cancellable: (nullable): a %GCancellable or %NULL + * @error: #GError for error reporting, or %NULL to ignore. * - * Since this method transfers ownership of the return value (or - * error) to the caller, you may only call it once. + * This behaves exactly the same as g_socket_send(), except that + * the choice of blocking or non-blocking behavior is determined by + * the @blocking argument rather than by @socket's properties. * - * Returns: the task result, or -1 on error - * Since: 2.36 + * Returns: Number of bytes written (which may be less than @size), or -1 + * on error + * Since: 2.26 */ /** - * g_task_propagate_pointer: - * @task: a #GTask - * @error: return location for a #GError - * - * Gets the result of @task as a pointer, and transfers ownership - * of that value to the caller. - * - * If the task resulted in an error, or was cancelled, then this will - * instead return %NULL and set @error. + * g_socket_service_is_active: + * @service: a #GSocketService * - * Since this method transfers ownership of the return value (or - * error) to the caller, you may only call it once. + * Check whether the service is active or not. An active + * service will accept new clients that connect, while + * a non-active service will let connecting clients queue + * up until the service is started. * - * Returns: (transfer full): the task result, or %NULL on error - * Since: 2.36 + * Returns: %TRUE if the service is active, %FALSE otherwise + * Since: 2.22 */ /** - * g_task_report_error: - * @source_object: (nullable) (type GObject): the #GObject that owns - * this task, or %NULL. - * @callback: (scope async): a #GAsyncReadyCallback. - * @callback_data: (closure): user data passed to @callback. - * @source_tag: an opaque pointer indicating the source of this task - * @error: (transfer full): error to report + * g_socket_service_new: * - * Creates a #GTask and then immediately calls g_task_return_error() - * on it. Use this in the wrapper function of an asynchronous method - * when you want to avoid even calling the virtual method. You can - * then use g_async_result_is_tagged() in the finish method wrapper to - * check if the result there is tagged as having been created by the - * wrapper method, and deal with it appropriately if so. + * Creates a new #GSocketService with no sockets to listen for. + * New listeners can be added with e.g. g_socket_listener_add_address() + * or g_socket_listener_add_inet_port(). * - * See also g_task_report_new_error(). + * New services are created active, there is no need to call + * g_socket_service_start(), unless g_socket_service_stop() has been + * called before. * - * Since: 2.36 + * Returns: a new #GSocketService. + * Since: 2.22 */ /** - * g_task_report_new_error: - * @source_object: (nullable) (type GObject): the #GObject that owns - * this task, or %NULL. - * @callback: (scope async): a #GAsyncReadyCallback. - * @callback_data: (closure): user data passed to @callback. - * @source_tag: an opaque pointer indicating the source of this task - * @domain: a #GQuark. - * @code: an error code. - * @format: a string with format characters. - * @...: a list of values to insert into @format. + * g_socket_service_start: + * @service: a #GSocketService * - * Creates a #GTask and then immediately calls - * g_task_return_new_error() on it. Use this in the wrapper function - * of an asynchronous method when you want to avoid even calling the - * virtual method. You can then use g_async_result_is_tagged() in the - * finish method wrapper to check if the result there is tagged as - * having been created by the wrapper method, and deal with it - * appropriately if so. + * Restarts the service, i.e. start accepting connections + * from the added sockets when the mainloop runs. This only needs + * to be called after the service has been stopped from + * g_socket_service_stop(). * - * See also g_task_report_error(). + * This call is thread-safe, so it may be called from a thread + * handling an incoming client request. * - * Since: 2.36 + * Since: 2.22 */ /** - * g_task_return_boolean: - * @task: a #GTask. - * @result: the #gboolean result of a task function. - * - * Sets @task's result to @result and completes the task (see - * g_task_return_pointer() for more discussion of exactly what this - * means). + * g_socket_service_stop: + * @service: a #GSocketService * - * Since: 2.36 - */ - - -/** - * g_task_return_error: - * @task: a #GTask. - * @error: (transfer full): the #GError result of a task function. + * Stops the service, i.e. stops accepting connections + * from the added sockets when the mainloop runs. * - * Sets @task's result to @error (which @task assumes ownership of) - * and completes the task (see g_task_return_pointer() for more - * discussion of exactly what this means). + * This call is thread-safe, so it may be called from a thread + * handling an incoming client request. * - * Note that since the task takes ownership of @error, and since the - * task may be completed before returning from g_task_return_error(), - * you cannot assume that @error is still valid after calling this. - * Call g_error_copy() on the error if you need to keep a local copy - * as well. + * Note that this only stops accepting new connections; it does not + * close the listening sockets, and you can call + * g_socket_service_start() again later to begin listening again. To + * close the listening sockets, call g_socket_listener_close(). (This + * will happen automatically when the #GSocketService is finalized.) * - * See also g_task_return_new_error(). + * This must be called before calling g_socket_listener_close() as + * the socket service will start accepting connections immediately + * when a new socket is added. * - * Since: 2.36 + * Since: 2.22 */ /** - * g_task_return_error_if_cancelled: - * @task: a #GTask - * - * Checks if @task's #GCancellable has been cancelled, and if so, sets - * @task's error accordingly and completes the task (see - * g_task_return_pointer() for more discussion of exactly what this - * means). + * g_socket_set_blocking: + * @socket: a #GSocket. + * @blocking: Whether to use blocking I/O or not. * - * Returns: %TRUE if @task has been cancelled, %FALSE if not - * Since: 2.36 - */ - - -/** - * g_task_return_int: - * @task: a #GTask. - * @result: the integer (#gssize) result of a task function. + * Sets the blocking mode of the socket. In blocking mode + * all operations (which don’t take an explicit blocking parameter) block until + * they succeed or there is an error. In + * non-blocking mode all functions return results immediately or + * with a %G_IO_ERROR_WOULD_BLOCK error. * - * Sets @task's result to @result and completes the task (see - * g_task_return_pointer() for more discussion of exactly what this - * means). + * All sockets are created in blocking mode. However, note that the + * platform level socket is always non-blocking, and blocking mode + * is a GSocket level feature. * - * Since: 2.36 + * Since: 2.22 */ /** - * g_task_return_new_error: - * @task: a #GTask. - * @domain: a #GQuark. - * @code: an error code. - * @format: a string with format characters. - * @...: a list of values to insert into @format. - * - * Sets @task's result to a new #GError created from @domain, @code, - * @format, and the remaining arguments, and completes the task (see - * g_task_return_pointer() for more discussion of exactly what this - * means). + * g_socket_set_broadcast: + * @socket: a #GSocket. + * @broadcast: whether @socket should allow sending to broadcast + * addresses * - * See also g_task_return_error(). + * Sets whether @socket should allow sending to broadcast addresses. + * This is %FALSE by default. * - * Since: 2.36 + * Since: 2.32 */ /** - * g_task_return_pointer: - * @task: a #GTask - * @result: (nullable) (transfer full): the pointer result of a task - * function - * @result_destroy: (nullable): a #GDestroyNotify function. + * g_socket_set_keepalive: + * @socket: a #GSocket. + * @keepalive: Value for the keepalive flag * - * Sets @task's result to @result and completes the task. If @result - * is not %NULL, then @result_destroy will be used to free @result if - * the caller does not take ownership of it with - * g_task_propagate_pointer(). + * Sets or unsets the %SO_KEEPALIVE flag on the underlying socket. When + * this flag is set on a socket, the system will attempt to verify that the + * remote socket endpoint is still present if a sufficiently long period of + * time passes with no data being exchanged. If the system is unable to + * verify the presence of the remote endpoint, it will automatically close + * the connection. * - * "Completes the task" means that for an ordinary asynchronous task - * it will either invoke the task's callback, or else queue that - * callback to be invoked in the proper #GMainContext, or in the next - * iteration of the current #GMainContext. For a task run via - * g_task_run_in_thread() or g_task_run_in_thread_sync(), calling this - * method will save @result to be returned to the caller later, but - * the task will not actually be completed until the #GTaskThreadFunc - * exits. + * This option is only functional on certain kinds of sockets. (Notably, + * %G_SOCKET_PROTOCOL_TCP sockets.) * - * Note that since the task may be completed before returning from - * g_task_return_pointer(), you cannot assume that @result is still - * valid after calling this, unless you are still holding another - * reference on it. + * The exact time between pings is system- and protocol-dependent, but will + * normally be at least two hours. Most commonly, you would set this flag + * on a server socket if you want to allow clients to remain idle for long + * periods of time, but also want to ensure that connections are eventually + * garbage-collected if clients crash or become unreachable. * - * Since: 2.36 + * Since: 2.22 */ /** - * g_task_run_in_thread: - * @task: a #GTask - * @task_func: a #GTaskThreadFunc - * - * Runs @task_func in another thread. When @task_func returns, @task's - * #GAsyncReadyCallback will be invoked in @task's #GMainContext. - * - * This takes a ref on @task until the task completes. + * g_socket_set_listen_backlog: + * @socket: a #GSocket. + * @backlog: the maximum number of pending connections. * - * See #GTaskThreadFunc for more details about how @task_func is handled. + * Sets the maximum number of outstanding connections allowed + * when listening on this socket. If more clients than this are + * connecting to the socket and the application is not handling them + * on time then the new connections will be refused. * - * Although GLib currently rate-limits the tasks queued via - * g_task_run_in_thread(), you should not assume that it will always - * do this. If you have a very large number of tasks to run, but don't - * want them to all run at once, you should only queue a limited - * number of them at a time. + * Note that this must be called before g_socket_listen() and has no + * effect if called after that. * - * Since: 2.36 + * Since: 2.22 */ /** - * g_task_run_in_thread_sync: - * @task: a #GTask - * @task_func: a #GTaskThreadFunc - * - * Runs @task_func in another thread, and waits for it to return or be - * cancelled. You can use g_task_propagate_pointer(), etc, afterward - * to get the result of @task_func. - * - * See #GTaskThreadFunc for more details about how @task_func is handled. - * - * Normally this is used with tasks created with a %NULL - * `callback`, but note that even if the task does - * have a callback, it will not be invoked when @task_func returns. - * #GTask:completed will be set to %TRUE just before this function returns. + * g_socket_set_multicast_loopback: + * @socket: a #GSocket. + * @loopback: whether @socket should receive messages sent to its + * multicast groups from the local host * - * Although GLib currently rate-limits the tasks queued via - * g_task_run_in_thread_sync(), you should not assume that it will - * always do this. If you have a very large number of tasks to run, - * but don't want them to all run at once, you should only queue a - * limited number of them at a time. + * Sets whether outgoing multicast packets will be received by sockets + * listening on that multicast address on the same host. This is %TRUE + * by default. * - * Since: 2.36 + * Since: 2.32 */ /** - * g_task_set_check_cancellable: - * @task: the #GTask - * @check_cancellable: whether #GTask will check the state of - * its #GCancellable for you. - * - * Sets or clears @task's check-cancellable flag. If this is %TRUE - * (the default), then g_task_propagate_pointer(), etc, and - * g_task_had_error() will check the task's #GCancellable first, and - * if it has been cancelled, then they will consider the task to have - * returned an "Operation was cancelled" error - * (%G_IO_ERROR_CANCELLED), regardless of any other error or return - * value the task may have had. - * - * If @check_cancellable is %FALSE, then the #GTask will not check the - * cancellable itself, and it is up to @task's owner to do this (eg, - * via g_task_return_error_if_cancelled()). + * g_socket_set_multicast_ttl: + * @socket: a #GSocket. + * @ttl: the time-to-live value for all multicast datagrams on @socket * - * If you are using g_task_set_return_on_cancel() as well, then - * you must leave check-cancellable set %TRUE. + * Sets the time-to-live for outgoing multicast datagrams on @socket. + * By default, this is 1, meaning that multicast packets will not leave + * the local network. * - * Since: 2.36 + * Since: 2.32 */ /** - * g_task_set_priority: - * @task: the #GTask - * @priority: the [priority][io-priority] of the request + * g_socket_set_option: + * @socket: a #GSocket + * @level: the "API level" of the option (eg, `SOL_SOCKET`) + * @optname: the "name" of the option (eg, `SO_BROADCAST`) + * @value: the value to set the option to + * @error: #GError for error reporting, or %NULL to ignore. * - * Sets @task's priority. If you do not call this, it will default to - * %G_PRIORITY_DEFAULT. + * Sets the value of an integer-valued option on @socket, as with + * setsockopt(). (If you need to set a non-integer-valued option, + * you will need to call setsockopt() directly.) * - * This will affect the priority of #GSources created with - * g_task_attach_source() and the scheduling of tasks run in threads, - * and can also be explicitly retrieved later via - * g_task_get_priority(). + * The [][gio-gnetworking.h] + * header pulls in system headers that will define most of the + * standard/portable socket options. For unusual socket protocols or + * platform-dependent options, you may need to include additional + * headers. * + * Returns: success or failure. On failure, @error will be set, and + * the system error value (`errno` or WSAGetLastError()) will still + * be set to the result of the setsockopt() call. * Since: 2.36 */ /** - * g_task_set_return_on_cancel: - * @task: the #GTask - * @return_on_cancel: whether the task returns automatically when - * it is cancelled. + * g_socket_set_timeout: + * @socket: a #GSocket. + * @timeout: the timeout for @socket, in seconds, or 0 for none * - * Sets or clears @task's return-on-cancel flag. This is only - * meaningful for tasks run via g_task_run_in_thread() or - * g_task_run_in_thread_sync(). + * Sets the time in seconds after which I/O operations on @socket will + * time out if they have not yet completed. * - * If @return_on_cancel is %TRUE, then cancelling @task's - * #GCancellable will immediately cause it to return, as though the - * task's #GTaskThreadFunc had called - * g_task_return_error_if_cancelled() and then returned. + * On a blocking socket, this means that any blocking #GSocket + * operation will time out after @timeout seconds of inactivity, + * returning %G_IO_ERROR_TIMED_OUT. * - * This allows you to create a cancellable wrapper around an - * uninterruptable function. The #GTaskThreadFunc just needs to be - * careful that it does not modify any externally-visible state after - * it has been cancelled. To do that, the thread should call - * g_task_set_return_on_cancel() again to (atomically) set - * return-on-cancel %FALSE before making externally-visible changes; - * if the task gets cancelled before the return-on-cancel flag could - * be changed, g_task_set_return_on_cancel() will indicate this by - * returning %FALSE. + * On a non-blocking socket, calls to g_socket_condition_wait() will + * also fail with %G_IO_ERROR_TIMED_OUT after the given time. Sources + * created with g_socket_create_source() will trigger after + * @timeout seconds of inactivity, with the requested condition + * set, at which point calling g_socket_receive(), g_socket_send(), + * g_socket_check_connect_result(), etc, will fail with + * %G_IO_ERROR_TIMED_OUT. * - * You can disable and re-enable this flag multiple times if you wish. - * If the task's #GCancellable is cancelled while return-on-cancel is - * %FALSE, then calling g_task_set_return_on_cancel() to set it %TRUE - * again will cause the task to be cancelled at that point. + * If @timeout is 0 (the default), operations will never time out + * on their own. * - * If the task's #GCancellable is already cancelled before you call - * g_task_run_in_thread()/g_task_run_in_thread_sync(), then the - * #GTaskThreadFunc will still be run (for consistency), but the task - * will also be completed right away. + * Note that if an I/O operation is interrupted by a signal, this may + * cause the timeout to be reset. * - * Returns: %TRUE if @task's return-on-cancel flag was changed to - * match @return_on_cancel. %FALSE if @task has already been - * cancelled. - * Since: 2.36 + * Since: 2.26 */ /** - * g_task_set_source_tag: - * @task: the #GTask - * @source_tag: an opaque pointer indicating the source of this task + * g_socket_set_ttl: + * @socket: a #GSocket. + * @ttl: the time-to-live value for all unicast packets on @socket * - * Sets @task's source tag. You can use this to tag a task return - * value with a particular pointer (usually a pointer to the function - * doing the tagging) and then later check it using - * g_task_get_source_tag() (or g_async_result_is_tagged()) in the - * task's "finish" function, to figure out if the response came from a - * particular place. + * Sets the time-to-live for outgoing unicast packets on @socket. + * By default the platform-specific default value is used. * - * Since: 2.36 + * Since: 2.32 */ /** - * g_task_set_task_data: - * @task: the #GTask - * @task_data: (nullable): task-specific data - * @task_data_destroy: (nullable): #GDestroyNotify for @task_data + * g_socket_shutdown: + * @socket: a #GSocket + * @shutdown_read: whether to shut down the read side + * @shutdown_write: whether to shut down the write side + * @error: #GError for error reporting, or %NULL to ignore. * - * Sets @task's task data (freeing the existing task data, if any). + * Shut down part or all of a full-duplex connection. * - * Since: 2.36 + * If @shutdown_read is %TRUE then the receiving side of the connection + * is shut down, and further reading is disallowed. + * + * If @shutdown_write is %TRUE then the sending side of the connection + * is shut down, and further writing is disallowed. + * + * It is allowed for both @shutdown_read and @shutdown_write to be %TRUE. + * + * One example where it is useful to shut down only one side of a connection is + * graceful disconnect for TCP connections where you close the sending side, + * then wait for the other side to close the connection, thus ensuring that the + * other side saw all sent data. + * + * Returns: %TRUE on success, %FALSE on error + * Since: 2.22 */ /** - * g_tcp_connection_get_graceful_disconnect: - * @connection: a #GTcpConnection + * g_socket_speaks_ipv4: + * @socket: a #GSocket * - * Checks if graceful disconnects are used. See - * g_tcp_connection_set_graceful_disconnect(). + * Checks if a socket is capable of speaking IPv4. * - * Returns: %TRUE if graceful disconnect is used on close, %FALSE otherwise + * IPv4 sockets are capable of speaking IPv4. On some operating systems + * and under some combinations of circumstances IPv6 sockets are also + * capable of speaking IPv4. See RFC 3493 section 3.7 for more + * information. + * + * No other types of sockets are currently considered as being capable + * of speaking IPv4. + * + * Returns: %TRUE if this socket can be used with IPv4. * Since: 2.22 */ /** - * g_tcp_connection_set_graceful_disconnect: - * @connection: a #GTcpConnection - * @graceful_disconnect: Whether to do graceful disconnects or not - * - * This enables graceful disconnects on close. A graceful disconnect - * means that we signal the receiving end that the connection is terminated - * and wait for it to close the connection before closing the connection. + * g_srv_target_copy: + * @target: a #GSrvTarget * - * A graceful disconnect means that we can be sure that we successfully sent - * all the outstanding data to the other end, or get an error reported. - * However, it also means we have to wait for all the data to reach the - * other side and for it to acknowledge this by closing the socket, which may - * take a while. For this reason it is disabled by default. + * Copies @target * + * Returns: a copy of @target * Since: 2.22 */ /** - * g_tcp_wrapper_connection_get_base_io_stream: - * @conn: a #GTcpWrapperConnection + * g_srv_target_free: + * @target: a #GSrvTarget * - * Get's @conn's base #GIOStream + * Frees @target * - * Returns: (transfer none): @conn's base #GIOStream + * Since: 2.22 */ /** - * g_tcp_wrapper_connection_new: - * @base_io_stream: the #GIOStream to wrap - * @socket: the #GSocket associated with @base_io_stream + * g_srv_target_get_hostname: + * @target: a #GSrvTarget * - * Wraps @base_io_stream and @socket together as a #GSocketConnection. + * Gets @target's hostname (in ASCII form; if you are going to present + * this to the user, you should use g_hostname_is_ascii_encoded() to + * check if it contains encoded Unicode segments, and use + * g_hostname_to_unicode() to convert it if it does.) * - * Returns: the new #GSocketConnection. - * Since: 2.28 + * Returns: @target's hostname + * Since: 2.22 */ /** - * g_test_dbus_add_service_dir: - * @self: a #GTestDBus - * @path: path to a directory containing .service files + * g_srv_target_get_port: + * @target: a #GSrvTarget * - * Add a path where dbus-daemon will look up .service files. This can't be - * called after g_test_dbus_up(). + * Gets @target's port + * + * Returns: @target's port + * Since: 2.22 */ /** - * g_test_dbus_down: - * @self: a #GTestDBus + * g_srv_target_get_priority: + * @target: a #GSrvTarget * - * Stop the session bus started by g_test_dbus_up(). + * Gets @target's priority. You should not need to look at this; + * #GResolver already sorts the targets according to the algorithm in + * RFC 2782. * - * This will wait for the singleton returned by g_bus_get() or g_bus_get_sync() - * is destroyed. This is done to ensure that the next unit test won't get a - * leaked singleton from this test. + * Returns: @target's priority + * Since: 2.22 */ /** - * g_test_dbus_get_bus_address: - * @self: a #GTestDBus + * g_srv_target_get_weight: + * @target: a #GSrvTarget * - * Get the address on which dbus-daemon is running. If g_test_dbus_up() has not - * been called yet, %NULL is returned. This can be used with - * g_dbus_connection_new_for_address(). + * Gets @target's weight. You should not need to look at this; + * #GResolver already sorts the targets according to the algorithm in + * RFC 2782. * - * Returns: (nullable): the address of the bus, or %NULL. + * Returns: @target's weight + * Since: 2.22 */ /** - * g_test_dbus_get_flags: - * @self: a #GTestDBus + * g_srv_target_list_sort: (skip) + * @targets: a #GList of #GSrvTarget * - * Get the flags of the #GTestDBus object. + * Sorts @targets in place according to the algorithm in RFC 2782. * - * Returns: the value of #GTestDBus:flags property + * Returns: (transfer full): the head of the sorted list. + * Since: 2.22 */ /** - * g_test_dbus_new: - * @flags: a #GTestDBusFlags + * g_srv_target_new: + * @hostname: the host that the service is running on + * @port: the port that the service is running on + * @priority: the target's priority + * @weight: the target's weight * - * Create a new #GTestDBus object. + * Creates a new #GSrvTarget with the given parameters. * - * Returns: (transfer full): a new #GTestDBus. + * You should not need to use this; normally #GSrvTargets are + * created by #GResolver. + * + * Returns: a new #GSrvTarget. + * Since: 2.22 */ /** - * g_test_dbus_stop: - * @self: a #GTestDBus + * g_static_resource_fini: + * @static_resource: pointer to a static #GStaticResource * - * Stop the session bus started by g_test_dbus_up(). + * Finalized a GResource initialized by g_static_resource_init(). * - * Unlike g_test_dbus_down(), this won't verify the #GDBusConnection - * singleton returned by g_bus_get() or g_bus_get_sync() is destroyed. Unit - * tests wanting to verify behaviour after the session bus has been stopped - * can use this function but should still call g_test_dbus_down() when done. + * This is normally used by code generated by + * [glib-compile-resources][glib-compile-resources] + * and is not typically used by other code. + * + * Since: 2.32 */ /** - * g_test_dbus_unset: + * g_static_resource_get_resource: + * @static_resource: pointer to a static #GStaticResource * - * Unset DISPLAY and DBUS_SESSION_BUS_ADDRESS env variables to ensure the test - * won't use user's session bus. + * Gets the GResource that was registered by a call to g_static_resource_init(). * - * This is useful for unit tests that want to verify behaviour when no session - * bus is running. It is not necessary to call this if unit test already calls - * g_test_dbus_up() before acquiring the session bus. + * This is normally used by code generated by + * [glib-compile-resources][glib-compile-resources] + * and is not typically used by other code. + * + * Returns: (transfer none): a #GResource + * Since: 2.32 */ /** - * g_test_dbus_up: - * @self: a #GTestDBus + * g_static_resource_init: + * @static_resource: pointer to a static #GStaticResource * - * Start a dbus-daemon instance and set DBUS_SESSION_BUS_ADDRESS. After this - * call, it is safe for unit tests to start sending messages on the session bus. + * Initializes a GResource from static data using a + * GStaticResource. * - * If this function is called from setup callback of g_test_add(), - * g_test_dbus_down() must be called in its teardown callback. + * This is normally used by code generated by + * [glib-compile-resources][glib-compile-resources] + * and is not typically used by other code. * - * If this function is called from unit test's main(), then g_test_dbus_down() - * must be called after g_test_run(). + * Since: 2.32 */ /** - * g_themed_icon_append_name: - * @icon: a #GThemedIcon - * @iconname: name of icon to append to list of icons from within @icon. + * g_subprocess_communicate: + * @subprocess: a #GSubprocess + * @stdin_buf: (nullable): data to send to the stdin of the subprocess, or %NULL + * @cancellable: a #GCancellable + * @stdout_buf: (out) (nullable) (optional) (transfer full): data read from the subprocess stdout + * @stderr_buf: (out) (nullable) (optional) (transfer full): data read from the subprocess stderr + * @error: a pointer to a %NULL #GError pointer, or %NULL * - * Append a name to the list of icons from within @icon. + * Communicate with the subprocess until it terminates, and all input + * and output has been completed. * - * Note that doing so invalidates the hash computed by prior calls - * to g_icon_hash(). + * If @stdin_buf is given, the subprocess must have been created with + * %G_SUBPROCESS_FLAGS_STDIN_PIPE. The given data is fed to the + * stdin of the subprocess and the pipe is closed (ie: EOF). + * + * At the same time (as not to cause blocking when dealing with large + * amounts of data), if %G_SUBPROCESS_FLAGS_STDOUT_PIPE or + * %G_SUBPROCESS_FLAGS_STDERR_PIPE were used, reads from those + * streams. The data that was read is returned in @stdout and/or + * the @stderr. + * + * If the subprocess was created with %G_SUBPROCESS_FLAGS_STDOUT_PIPE, + * @stdout_buf will contain the data read from stdout. Otherwise, for + * subprocesses not created with %G_SUBPROCESS_FLAGS_STDOUT_PIPE, + * @stdout_buf will be set to %NULL. Similar provisions apply to + * @stderr_buf and %G_SUBPROCESS_FLAGS_STDERR_PIPE. + * + * As usual, any output variable may be given as %NULL to ignore it. + * + * If you desire the stdout and stderr data to be interleaved, create + * the subprocess with %G_SUBPROCESS_FLAGS_STDOUT_PIPE and + * %G_SUBPROCESS_FLAGS_STDERR_MERGE. The merged result will be returned + * in @stdout_buf and @stderr_buf will be set to %NULL. + * + * In case of any error (including cancellation), %FALSE will be + * returned with @error set. Some or all of the stdin data may have + * been written. Any stdout or stderr data that has been read will be + * discarded. None of the out variables (aside from @error) will have + * been set to anything in particular and should not be inspected. + * + * In the case that %TRUE is returned, the subprocess has exited and the + * exit status inspection APIs (eg: g_subprocess_get_if_exited(), + * g_subprocess_get_exit_status()) may be used. + * + * You should not attempt to use any of the subprocess pipes after + * starting this function, since they may be left in strange states, + * even if the operation was cancelled. You should especially not + * attempt to interact with the pipes while the operation is in progress + * (either from another thread or if using the asynchronous version). + * + * Returns: %TRUE if successful + * Since: 2.40 */ /** - * g_themed_icon_get_names: - * @icon: a #GThemedIcon. - * - * Gets the names of icons from within @icon. + * g_subprocess_communicate_async: + * @subprocess: Self + * @stdin_buf: (nullable): Input data, or %NULL + * @cancellable: (nullable): Cancellable + * @callback: Callback + * @user_data: User data * - * Returns: (transfer none): a list of icon names. + * Asynchronous version of g_subprocess_communicate(). Complete + * invocation with g_subprocess_communicate_finish(). */ /** - * g_themed_icon_new: - * @iconname: a string containing an icon name. - * - * Creates a new themed icon for @iconname. + * g_subprocess_communicate_finish: + * @subprocess: Self + * @result: Result + * @stdout_buf: (out) (nullable) (optional) (transfer full): Return location for stdout data + * @stderr_buf: (out) (nullable) (optional) (transfer full): Return location for stderr data + * @error: Error * - * Returns: (transfer full) (type GThemedIcon): a new #GThemedIcon. + * Complete an invocation of g_subprocess_communicate_async(). */ /** - * g_themed_icon_new_from_names: - * @iconnames: (array length=len): an array of strings containing icon names. - * @len: the length of the @iconnames array, or -1 if @iconnames is - * %NULL-terminated + * g_subprocess_communicate_utf8: + * @subprocess: a #GSubprocess + * @stdin_buf: (nullable): data to send to the stdin of the subprocess, or %NULL + * @cancellable: a #GCancellable + * @stdout_buf: (out) (nullable) (optional) (transfer full): data read from the subprocess stdout + * @stderr_buf: (out) (nullable) (optional) (transfer full): data read from the subprocess stderr + * @error: a pointer to a %NULL #GError pointer, or %NULL * - * Creates a new themed icon for @iconnames. + * Like g_subprocess_communicate(), but validates the output of the + * process as UTF-8, and returns it as a regular NUL terminated string. * - * Returns: (transfer full) (type GThemedIcon): a new #GThemedIcon + * On error, @stdout_buf and @stderr_buf will be set to undefined values and + * should not be used. */ /** - * g_themed_icon_new_with_default_fallbacks: - * @iconname: a string containing an icon name - * - * Creates a new themed icon for @iconname, and all the names - * that can be created by shortening @iconname at '-' characters. - * - * In the following example, @icon1 and @icon2 are equivalent: - * |[ - * const char *names[] = { - * "gnome-dev-cdrom-audio", - * "gnome-dev-cdrom", - * "gnome-dev", - * "gnome" - * }; + * g_subprocess_communicate_utf8_async: + * @subprocess: Self + * @stdin_buf: (nullable): Input data, or %NULL + * @cancellable: Cancellable + * @callback: Callback + * @user_data: User data * - * icon1 = g_themed_icon_new_from_names (names, 4); - * icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio"); - * ]| + * Asynchronous version of g_subprocess_communicate_utf8(). Complete + * invocation with g_subprocess_communicate_utf8_finish(). + */ + + +/** + * g_subprocess_communicate_utf8_finish: + * @subprocess: Self + * @result: Result + * @stdout_buf: (out) (nullable) (optional) (transfer full): Return location for stdout data + * @stderr_buf: (out) (nullable) (optional) (transfer full): Return location for stderr data + * @error: Error * - * Returns: (transfer full) (type GThemedIcon): a new #GThemedIcon. + * Complete an invocation of g_subprocess_communicate_utf8_async(). */ /** - * g_themed_icon_prepend_name: - * @icon: a #GThemedIcon - * @iconname: name of icon to prepend to list of icons from within @icon. + * g_subprocess_force_exit: + * @subprocess: a #GSubprocess * - * Prepend a name to the list of icons from within @icon. + * Use an operating-system specific method to attempt an immediate, + * forceful termination of the process. There is no mechanism to + * determine whether or not the request itself was successful; + * however, you can use g_subprocess_wait() to monitor the status of + * the process after calling this function. * - * Note that doing so invalidates the hash computed by prior calls - * to g_icon_hash(). + * On Unix, this function sends %SIGKILL. * - * Since: 2.18 + * Since: 2.40 */ /** - * g_threaded_socket_service_new: - * @max_threads: the maximal number of threads to execute concurrently - * handling incoming clients, -1 means no limit + * g_subprocess_get_exit_status: + * @subprocess: a #GSubprocess * - * Creates a new #GThreadedSocketService with no listeners. Listeners - * must be added with one of the #GSocketListener "add" methods. + * Check the exit status of the subprocess, given that it exited + * normally. This is the value passed to the exit() system call or the + * return value from main. * - * Returns: a new #GSocketService. - * Since: 2.22 + * This is equivalent to the system WEXITSTATUS macro. + * + * It is an error to call this function before g_subprocess_wait() and + * unless g_subprocess_get_if_exited() returned %TRUE. + * + * Returns: the exit status + * Since: 2.40 */ /** - * g_tls_backend_get_certificate_type: - * @backend: the #GTlsBackend + * g_subprocess_get_identifier: + * @subprocess: a #GSubprocess * - * Gets the #GType of @backend's #GTlsCertificate implementation. + * On UNIX, returns the process ID as a decimal string. + * On Windows, returns the result of GetProcessId() also as a string. + * If the subprocess has terminated, this will return %NULL. * - * Returns: the #GType of @backend's #GTlsCertificate - * implementation. - * Since: 2.28 + * Returns: (nullable): the subprocess identifier, or %NULL if the subprocess + * has terminated + * Since: 2.40 */ /** - * g_tls_backend_get_client_connection_type: - * @backend: the #GTlsBackend + * g_subprocess_get_if_exited: + * @subprocess: a #GSubprocess * - * Gets the #GType of @backend's #GTlsClientConnection implementation. + * Check if the given subprocess exited normally (ie: by way of exit() + * or return from main()). * - * Returns: the #GType of @backend's #GTlsClientConnection - * implementation. - * Since: 2.28 + * This is equivalent to the system WIFEXITED macro. + * + * It is an error to call this function before g_subprocess_wait() has + * returned. + * + * Returns: %TRUE if the case of a normal exit + * Since: 2.40 */ /** - * g_tls_backend_get_default: + * g_subprocess_get_if_signaled: + * @subprocess: a #GSubprocess * - * Gets the default #GTlsBackend for the system. + * Check if the given subprocess terminated in response to a signal. * - * Returns: (transfer none): a #GTlsBackend - * Since: 2.28 + * This is equivalent to the system WIFSIGNALED macro. + * + * It is an error to call this function before g_subprocess_wait() has + * returned. + * + * Returns: %TRUE if the case of termination due to a signal + * Since: 2.40 */ /** - * g_tls_backend_get_default_database: - * @backend: the #GTlsBackend + * g_subprocess_get_status: + * @subprocess: a #GSubprocess * - * Gets the default #GTlsDatabase used to verify TLS connections. + * Gets the raw status code of the process, as from waitpid(). * - * Returns: (transfer full): the default database, which should be - * unreffed when done. - * Since: 2.30 + * This value has no particular meaning, but it can be used with the + * macros defined by the system headers such as WIFEXITED. It can also + * be used with g_spawn_check_exit_status(). + * + * It is more likely that you want to use g_subprocess_get_if_exited() + * followed by g_subprocess_get_exit_status(). + * + * It is an error to call this function before g_subprocess_wait() has + * returned. + * + * Returns: the (meaningless) waitpid() exit status from the kernel + * Since: 2.40 */ /** - * g_tls_backend_get_dtls_client_connection_type: - * @backend: the #GTlsBackend + * g_subprocess_get_stderr_pipe: + * @subprocess: a #GSubprocess * - * Gets the #GType of @backend’s #GDtlsClientConnection implementation. + * Gets the #GInputStream from which to read the stderr output of + * @subprocess. * - * Returns: the #GType of @backend’s #GDtlsClientConnection - * implementation, or %G_TYPE_INVALID if this backend doesn’t support DTLS. - * Since: 2.48 + * The process must have been created with + * %G_SUBPROCESS_FLAGS_STDERR_PIPE. + * + * Returns: (transfer none): the stderr pipe + * Since: 2.40 */ /** - * g_tls_backend_get_dtls_server_connection_type: - * @backend: the #GTlsBackend + * g_subprocess_get_stdin_pipe: + * @subprocess: a #GSubprocess * - * Gets the #GType of @backend’s #GDtlsServerConnection implementation. + * Gets the #GOutputStream that you can write to in order to give data + * to the stdin of @subprocess. * - * Returns: the #GType of @backend’s #GDtlsServerConnection - * implementation, or %G_TYPE_INVALID if this backend doesn’t support DTLS. - * Since: 2.48 + * The process must have been created with + * %G_SUBPROCESS_FLAGS_STDIN_PIPE. + * + * Returns: (transfer none): the stdout pipe + * Since: 2.40 */ /** - * g_tls_backend_get_file_database_type: - * @backend: the #GTlsBackend + * g_subprocess_get_stdout_pipe: + * @subprocess: a #GSubprocess * - * Gets the #GType of @backend's #GTlsFileDatabase implementation. + * Gets the #GInputStream from which to read the stdout output of + * @subprocess. * - * Returns: the #GType of backend's #GTlsFileDatabase implementation. - * Since: 2.30 + * The process must have been created with + * %G_SUBPROCESS_FLAGS_STDOUT_PIPE. + * + * Returns: (transfer none): the stdout pipe + * Since: 2.40 */ /** - * g_tls_backend_get_server_connection_type: - * @backend: the #GTlsBackend + * g_subprocess_get_successful: + * @subprocess: a #GSubprocess * - * Gets the #GType of @backend's #GTlsServerConnection implementation. + * Checks if the process was "successful". A process is considered + * successful if it exited cleanly with an exit status of 0, either by + * way of the exit() system call or return from main(). * - * Returns: the #GType of @backend's #GTlsServerConnection - * implementation. - * Since: 2.28 + * It is an error to call this function before g_subprocess_wait() has + * returned. + * + * Returns: %TRUE if the process exited cleanly with a exit status of 0 + * Since: 2.40 */ /** - * g_tls_backend_supports_dtls: - * @backend: the #GTlsBackend + * g_subprocess_get_term_sig: + * @subprocess: a #GSubprocess * - * Checks if DTLS is supported. DTLS support may not be available even if TLS - * support is available, and vice-versa. + * Get the signal number that caused the subprocess to terminate, given + * that it terminated due to a signal. + * + * This is equivalent to the system WTERMSIG macro. + * + * It is an error to call this function before g_subprocess_wait() and + * unless g_subprocess_get_if_signaled() returned %TRUE. * - * Returns: whether DTLS is supported - * Since: 2.48 + * Returns: the signal causing termination + * Since: 2.40 */ /** - * g_tls_backend_supports_tls: - * @backend: the #GTlsBackend + * g_subprocess_launcher_getenv: + * @self: a #GSubprocessLauncher + * @variable: (type filename): the environment variable to get * - * Checks if TLS is supported; if this returns %FALSE for the default - * #GTlsBackend, it means no "real" TLS backend is available. + * Returns the value of the environment variable @variable in the + * environment of processes launched from this launcher. * - * Returns: whether or not TLS is supported - * Since: 2.28 + * On UNIX, the returned string can be an arbitrary byte string. + * On Windows, it will be UTF-8. + * + * Returns: (type filename): the value of the environment variable, + * %NULL if unset + * Since: 2.40 */ /** - * g_tls_certificate_get_issuer: - * @cert: a #GTlsCertificate + * g_subprocess_launcher_new: + * @flags: #GSubprocessFlags * - * Gets the #GTlsCertificate representing @cert's issuer, if known + * Creates a new #GSubprocessLauncher. * - * Returns: (transfer none): The certificate of @cert's issuer, - * or %NULL if @cert is self-signed or signed with an unknown - * certificate. - * Since: 2.28 + * The launcher is created with the default options. A copy of the + * environment of the calling process is made at the time of this call + * and will be used as the environment that the process is launched in. + * + * Since: 2.40 */ /** - * g_tls_certificate_is_same: - * @cert_one: first certificate to compare - * @cert_two: second certificate to compare + * g_subprocess_launcher_set_child_setup: (skip) + * @self: a #GSubprocessLauncher + * @child_setup: a #GSpawnChildSetupFunc to use as the child setup function + * @user_data: user data for @child_setup + * @destroy_notify: a #GDestroyNotify for @user_data * - * Check if two #GTlsCertificate objects represent the same certificate. - * The raw DER byte data of the two certificates are checked for equality. - * This has the effect that two certificates may compare equal even if - * their #GTlsCertificate:issuer, #GTlsCertificate:private-key, or - * #GTlsCertificate:private-key-pem properties differ. + * Sets up a child setup function. * - * Returns: whether the same or not - * Since: 2.34 + * The child setup function will be called after fork() but before + * exec() on the child's side. + * + * @destroy_notify will not be automatically called on the child's side + * of the fork(). It will only be called when the last reference on the + * #GSubprocessLauncher is dropped or when a new child setup function is + * given. + * + * %NULL can be given as @child_setup to disable the functionality. + * + * Child setup functions are only available on UNIX. + * + * Since: 2.40 */ /** - * g_tls_certificate_list_new_from_file: - * @file: (type filename): file containing PEM-encoded certificates to import - * @error: #GError for error reporting, or %NULL to ignore. + * g_subprocess_launcher_set_cwd: + * @self: a #GSubprocessLauncher + * @cwd: (type filename): the cwd for launched processes * - * Creates one or more #GTlsCertificates from the PEM-encoded - * data in @file. If @file cannot be read or parsed, the function will - * return %NULL and set @error. If @file does not contain any - * PEM-encoded certificates, this will return an empty list and not - * set @error. + * Sets the current working directory that processes will be launched + * with. * - * Returns: (element-type Gio.TlsCertificate) (transfer full): a - * #GList containing #GTlsCertificate objects. You must free the list - * and its contents when you are done with it. - * Since: 2.28 + * By default processes are launched with the current working directory + * of the launching process at the time of launch. + * + * Since: 2.40 */ /** - * g_tls_certificate_new_from_file: - * @file: (type filename): file containing a PEM-encoded certificate to import - * @error: #GError for error reporting, or %NULL to ignore. + * g_subprocess_launcher_set_environ: + * @self: a #GSubprocessLauncher + * @env: (array zero-terminated=1) (element-type filename) (transfer none): + * the replacement environment * - * Creates a #GTlsCertificate from the PEM-encoded data in @file. The - * returned certificate will be the first certificate found in @file. As - * of GLib 2.44, if @file contains more certificates it will try to load - * a certificate chain. All certificates will be verified in the order - * found (top-level certificate should be the last one in the file) and - * the #GTlsCertificate:issuer property of each certificate will be set - * accordingly if the verification succeeds. If any certificate in the - * chain cannot be verified, the first certificate in the file will - * still be returned. + * Replace the entire environment of processes launched from this + * launcher with the given 'environ' variable. * - * If @file cannot be read or parsed, the function will return %NULL and - * set @error. Otherwise, this behaves like - * g_tls_certificate_new_from_pem(). + * Typically you will build this variable by using g_listenv() to copy + * the process 'environ' and using the functions g_environ_setenv(), + * g_environ_unsetenv(), etc. * - * Returns: the new certificate, or %NULL on error - * Since: 2.28 + * As an alternative, you can use g_subprocess_launcher_setenv(), + * g_subprocess_launcher_unsetenv(), etc. + * + * Pass an empty array to set an empty environment. Pass %NULL to inherit the + * parent process’ environment. As of GLib 2.54, the parent process’ environment + * will be copied when g_subprocess_launcher_set_environ() is called. + * Previously, it was copied when the subprocess was executed. This means the + * copied environment may now be modified (using g_subprocess_launcher_setenv(), + * etc.) before launching the subprocess. + * + * On UNIX, all strings in this array can be arbitrary byte strings. + * On Windows, they should be in UTF-8. + * + * Since: 2.40 */ /** - * g_tls_certificate_new_from_files: - * @cert_file: (type filename): file containing one or more PEM-encoded - * certificates to import - * @key_file: (type filename): file containing a PEM-encoded private key - * to import - * @error: #GError for error reporting, or %NULL to ignore. + * g_subprocess_launcher_set_flags: + * @self: a #GSubprocessLauncher + * @flags: #GSubprocessFlags * - * Creates a #GTlsCertificate from the PEM-encoded data in @cert_file - * and @key_file. The returned certificate will be the first certificate - * found in @cert_file. As of GLib 2.44, if @cert_file contains more - * certificates it will try to load a certificate chain. All - * certificates will be verified in the order found (top-level - * certificate should be the last one in the file) and the - * #GTlsCertificate:issuer property of each certificate will be set - * accordingly if the verification succeeds. If any certificate in the - * chain cannot be verified, the first certificate in the file will - * still be returned. + * Sets the flags on the launcher. * - * If either file cannot be read or parsed, the function will return - * %NULL and set @error. Otherwise, this behaves like - * g_tls_certificate_new_from_pem(). + * The default flags are %G_SUBPROCESS_FLAGS_NONE. * - * Returns: the new certificate, or %NULL on error - * Since: 2.28 + * You may not set flags that specify conflicting options for how to + * handle a particular stdio stream (eg: specifying both + * %G_SUBPROCESS_FLAGS_STDIN_PIPE and + * %G_SUBPROCESS_FLAGS_STDIN_INHERIT). + * + * You may also not set a flag that conflicts with a previous call to a + * function like g_subprocess_launcher_set_stdin_file_path() or + * g_subprocess_launcher_take_stdout_fd(). + * + * Since: 2.40 */ /** - * g_tls_certificate_new_from_pem: - * @data: PEM-encoded certificate data - * @length: the length of @data, or -1 if it's 0-terminated. - * @error: #GError for error reporting, or %NULL to ignore. + * g_subprocess_launcher_set_stderr_file_path: + * @self: a #GSubprocessLauncher + * @path: (type filename) (nullable): a filename or %NULL * - * Creates a #GTlsCertificate from the PEM-encoded data in @data. If - * @data includes both a certificate and a private key, then the - * returned certificate will include the private key data as well. (See - * the #GTlsCertificate:private-key-pem property for information about - * supported formats.) + * Sets the file path to use as the stderr for spawned processes. * - * The returned certificate will be the first certificate found in - * @data. As of GLib 2.44, if @data contains more certificates it will - * try to load a certificate chain. All certificates will be verified in - * the order found (top-level certificate should be the last one in the - * file) and the #GTlsCertificate:issuer property of each certificate - * will be set accordingly if the verification succeeds. If any - * certificate in the chain cannot be verified, the first certificate in - * the file will still be returned. + * If @path is %NULL then any previously given path is unset. * - * Returns: the new certificate, or %NULL if @data is invalid - * Since: 2.28 + * The file will be created or truncated when the process is spawned, as + * would be the case if using '2>' at the shell. + * + * If you want to send both stdout and stderr to the same file then use + * %G_SUBPROCESS_FLAGS_STDERR_MERGE. + * + * You may not set a stderr file path if a stderr fd is already set or + * if the launcher flags contain any flags directing stderr elsewhere. + * + * This feature is only available on UNIX. + * + * Since: 2.40 */ /** - * g_tls_certificate_verify: - * @cert: a #GTlsCertificate - * @identity: (nullable): the expected peer identity - * @trusted_ca: (nullable): the certificate of a trusted authority + * g_subprocess_launcher_set_stdin_file_path: + * @self: a #GSubprocessLauncher + * @path: * - * This verifies @cert and returns a set of #GTlsCertificateFlags - * indicating any problems found with it. This can be used to verify a - * certificate outside the context of making a connection, or to - * check a certificate against a CA that is not part of the system - * CA database. + * Sets the file path to use as the stdin for spawned processes. * - * If @identity is not %NULL, @cert's name(s) will be compared against - * it, and %G_TLS_CERTIFICATE_BAD_IDENTITY will be set in the return - * value if it does not match. If @identity is %NULL, that bit will - * never be set in the return value. + * If @path is %NULL then any previously given path is unset. * - * If @trusted_ca is not %NULL, then @cert (or one of the certificates - * in its chain) must be signed by it, or else - * %G_TLS_CERTIFICATE_UNKNOWN_CA will be set in the return value. If - * @trusted_ca is %NULL, that bit will never be set in the return - * value. + * The file must exist or spawning the process will fail. * - * (All other #GTlsCertificateFlags values will always be set or unset - * as appropriate.) + * You may not set a stdin file path if a stdin fd is already set or if + * the launcher flags contain any flags directing stdin elsewhere. * - * Returns: the appropriate #GTlsCertificateFlags - * Since: 2.28 + * This feature is only available on UNIX. + * + * Since: 2.40 */ /** - * g_tls_client_connection_copy_session_state: - * @conn: a #GTlsClientConnection - * @source: a #GTlsClientConnection + * g_subprocess_launcher_set_stdout_file_path: + * @self: a #GSubprocessLauncher + * @path: (type filename) (nullable): a filename or %NULL * - * Copies session state from one connection to another. This is - * not normally needed, but may be used when the same session - * needs to be used between different endpoints as is required - * by some protocols such as FTP over TLS. @source should have - * already completed a handshake, and @conn should not have - * completed a handshake. + * Sets the file path to use as the stdout for spawned processes. * - * Since: 2.46 + * If @path is %NULL then any previously given path is unset. + * + * The file will be created or truncated when the process is spawned, as + * would be the case if using '>' at the shell. + * + * You may not set a stdout file path if a stdout fd is already set or + * if the launcher flags contain any flags directing stdout elsewhere. + * + * This feature is only available on UNIX. + * + * Since: 2.40 */ /** - * g_tls_client_connection_get_accepted_cas: - * @conn: the #GTlsClientConnection + * g_subprocess_launcher_setenv: + * @self: a #GSubprocessLauncher + * @variable: (type filename): the environment variable to set, + * must not contain '=' + * @value: (type filename): the new value for the variable + * @overwrite: whether to change the variable if it already exists * - * Gets the list of distinguished names of the Certificate Authorities - * that the server will accept certificates from. This will be set - * during the TLS handshake if the server requests a certificate. - * Otherwise, it will be %NULL. + * Sets the environment variable @variable in the environment of + * processes launched from this launcher. * - * Each item in the list is a #GByteArray which contains the complete - * subject DN of the certificate authority. + * On UNIX, both the variable's name and value can be arbitrary byte + * strings, except that the variable's name cannot contain '='. + * On Windows, they should be in UTF-8. * - * Returns: (element-type GByteArray) (transfer full): the list of - * CA DNs. You should unref each element with g_byte_array_unref() and then - * the free the list with g_list_free(). - * Since: 2.28 + * Since: 2.40 */ /** - * g_tls_client_connection_get_server_identity: - * @conn: the #GTlsClientConnection + * g_subprocess_launcher_spawn: + * @self: a #GSubprocessLauncher + * @error: Error + * @argv0: Command line arguments + * @...: Continued arguments, %NULL terminated * - * Gets @conn's expected server identity + * Creates a #GSubprocess given a provided varargs list of arguments. * - * Returns: (transfer none): a #GSocketConnectable describing the - * expected server identity, or %NULL if the expected identity is not - * known. - * Since: 2.28 + * Since: 2.40 + * Returns: (transfer full): A new #GSubprocess, or %NULL on error (and @error will be set) */ /** - * g_tls_client_connection_get_use_ssl3: - * @conn: the #GTlsClientConnection + * g_subprocess_launcher_spawnv: + * @self: a #GSubprocessLauncher + * @argv: (array zero-terminated=1) (element-type filename): Command line arguments + * @error: Error * - * Gets whether @conn will force the lowest-supported TLS protocol - * version rather than attempt to negotiate the highest mutually- - * supported version of TLS; see g_tls_client_connection_set_use_ssl3(). + * Creates a #GSubprocess given a provided array of arguments. * - * Returns: whether @conn will use the lowest-supported TLS protocol version - * Since: 2.28 - * Deprecated: 2.56: SSL 3.0 is insecure, and this function does not - * actually indicate whether it is enabled. + * Since: 2.40 + * Returns: (transfer full): A new #GSubprocess, or %NULL on error (and @error will be set) */ /** - * g_tls_client_connection_get_validation_flags: - * @conn: the #GTlsClientConnection + * g_subprocess_launcher_take_fd: + * @self: a #GSubprocessLauncher + * @source_fd: File descriptor in parent process + * @target_fd: Target descriptor for child process * - * Gets @conn's validation flags + * Transfer an arbitrary file descriptor from parent process to the + * child. This function takes "ownership" of the fd; it will be closed + * in the parent when @self is freed. * - * Returns: the validation flags - * Since: 2.28 + * By default, all file descriptors from the parent will be closed. + * This function allows you to create (for example) a custom pipe() or + * socketpair() before launching the process, and choose the target + * descriptor in the child. + * + * An example use case is GNUPG, which has a command line argument + * --passphrase-fd providing a file descriptor number where it expects + * the passphrase to be written. */ /** - * g_tls_client_connection_new: - * @base_io_stream: the #GIOStream to wrap - * @server_identity: (nullable): the expected identity of the server - * @error: #GError for error reporting, or %NULL to ignore. + * g_subprocess_launcher_take_stderr_fd: + * @self: a #GSubprocessLauncher + * @fd: a file descriptor, or -1 * - * Creates a new #GTlsClientConnection wrapping @base_io_stream (which - * must have pollable input and output streams) which is assumed to - * communicate with the server identified by @server_identity. + * Sets the file descriptor to use as the stderr for spawned processes. * - * See the documentation for #GTlsConnection:base-io-stream for restrictions - * on when application code can run operations on the @base_io_stream after - * this function has returned. + * If @fd is -1 then any previously given fd is unset. * - * Returns: (transfer full) (type GTlsClientConnection): the new - * #GTlsClientConnection, or %NULL on error - * Since: 2.28 + * Note that the default behaviour is to pass stderr through to the + * stderr of the parent process. + * + * The passed @fd belongs to the #GSubprocessLauncher. It will be + * automatically closed when the launcher is finalized. The file + * descriptor will also be closed on the child side when executing the + * spawned process. + * + * You may not set a stderr fd if a stderr file path is already set or + * if the launcher flags contain any flags directing stderr elsewhere. + * + * This feature is only available on UNIX. + * + * Since: 2.40 */ /** - * g_tls_client_connection_set_server_identity: - * @conn: the #GTlsClientConnection - * @identity: a #GSocketConnectable describing the expected server identity + * g_subprocess_launcher_take_stdin_fd: + * @self: a #GSubprocessLauncher + * @fd: a file descriptor, or -1 * - * Sets @conn's expected server identity, which is used both to tell - * servers on virtual hosts which certificate to present, and also - * to let @conn know what name to look for in the certificate when - * performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled. + * Sets the file descriptor to use as the stdin for spawned processes. * - * Since: 2.28 + * If @fd is -1 then any previously given fd is unset. + * + * Note that if your intention is to have the stdin of the calling + * process inherited by the child then %G_SUBPROCESS_FLAGS_STDIN_INHERIT + * is a better way to go about doing that. + * + * The passed @fd is noted but will not be touched in the current + * process. It is therefore necessary that it be kept open by the + * caller until the subprocess is spawned. The file descriptor will + * also not be explicitly closed on the child side, so it must be marked + * O_CLOEXEC if that's what you want. + * + * You may not set a stdin fd if a stdin file path is already set or if + * the launcher flags contain any flags directing stdin elsewhere. + * + * This feature is only available on UNIX. + * + * Since: 2.40 */ /** - * g_tls_client_connection_set_use_ssl3: - * @conn: the #GTlsClientConnection - * @use_ssl3: whether to use the lowest-supported protocol version + * g_subprocess_launcher_take_stdout_fd: + * @self: a #GSubprocessLauncher + * @fd: a file descriptor, or -1 * - * If @use_ssl3 is %TRUE, this forces @conn to use the lowest-supported - * TLS protocol version rather than trying to properly negotiate the - * highest mutually-supported protocol version with the peer. This can - * be used when talking to broken TLS servers that exhibit protocol - * version intolerance. + * Sets the file descriptor to use as the stdout for spawned processes. * - * Be aware that SSL 3.0 is generally disabled by the #GTlsBackend, so - * the lowest-supported protocol version is probably not SSL 3.0. + * If @fd is -1 then any previously given fd is unset. * - * Since: 2.28 - * Deprecated: 2.56: SSL 3.0 is insecure, and this function does not - * generally enable or disable it, despite its name. + * Note that the default behaviour is to pass stdout through to the + * stdout of the parent process. + * + * The passed @fd is noted but will not be touched in the current + * process. It is therefore necessary that it be kept open by the + * caller until the subprocess is spawned. The file descriptor will + * also not be explicitly closed on the child side, so it must be marked + * O_CLOEXEC if that's what you want. + * + * You may not set a stdout fd if a stdout file path is already set or + * if the launcher flags contain any flags directing stdout elsewhere. + * + * This feature is only available on UNIX. + * + * Since: 2.40 */ /** - * g_tls_client_connection_set_validation_flags: - * @conn: the #GTlsClientConnection - * @flags: the #GTlsCertificateFlags to use + * g_subprocess_launcher_unsetenv: + * @self: a #GSubprocessLauncher + * @variable: (type filename): the environment variable to unset, + * must not contain '=' * - * Sets @conn's validation flags, to override the default set of - * checks performed when validating a server certificate. By default, - * %G_TLS_CERTIFICATE_VALIDATE_ALL is used. + * Removes the environment variable @variable from the environment of + * processes launched from this launcher. * - * Since: 2.28 + * On UNIX, the variable's name can be an arbitrary byte string not + * containing '='. On Windows, it should be in UTF-8. + * + * Since: 2.40 */ /** - * g_tls_connection_emit_accept_certificate: - * @conn: a #GTlsConnection - * @peer_cert: the peer's #GTlsCertificate - * @errors: the problems with @peer_cert + * g_subprocess_new: (skip) + * @flags: flags that define the behaviour of the subprocess + * @error: (nullable): return location for an error, or %NULL + * @argv0: first commandline argument to pass to the subprocess + * @...: more commandline arguments, followed by %NULL * - * Used by #GTlsConnection implementations to emit the - * #GTlsConnection::accept-certificate signal. + * Create a new process with the given flags and varargs argument + * list. By default, matching the g_spawn_async() defaults, the + * child's stdin will be set to the system null device, and + * stdout/stderr will be inherited from the parent. You can use + * @flags to control this behavior. * - * Returns: %TRUE if one of the signal handlers has returned - * %TRUE to accept @peer_cert - * Since: 2.28 + * The argument list must be terminated with %NULL. + * + * Returns: A newly created #GSubprocess, or %NULL on error (and @error + * will be set) + * Since: 2.40 */ /** - * g_tls_connection_get_certificate: - * @conn: a #GTlsConnection + * g_subprocess_newv: (rename-to g_subprocess_new) + * @argv: (array zero-terminated=1) (element-type filename): commandline arguments for the subprocess + * @flags: flags that define the behaviour of the subprocess + * @error: (nullable): return location for an error, or %NULL * - * Gets @conn's certificate, as set by - * g_tls_connection_set_certificate(). + * Create a new process with the given flags and argument list. * - * Returns: (transfer none): @conn's certificate, or %NULL - * Since: 2.28 + * The argument list is expected to be %NULL-terminated. + * + * Returns: A newly created #GSubprocess, or %NULL on error (and @error + * will be set) + * Since: 2.40 */ /** - * g_tls_connection_get_database: - * @conn: a #GTlsConnection + * g_subprocess_send_signal: + * @subprocess: a #GSubprocess + * @signal_num: the signal number to send * - * Gets the certificate database that @conn uses to verify - * peer certificates. See g_tls_connection_set_database(). + * Sends the UNIX signal @signal_num to the subprocess, if it is still + * running. * - * Returns: (transfer none): the certificate database that @conn uses or %NULL - * Since: 2.30 + * This API is race-free. If the subprocess has terminated, it will not + * be signalled. + * + * This API is not available on Windows. + * + * Since: 2.40 */ /** - * g_tls_connection_get_interaction: - * @conn: a connection + * g_subprocess_wait: + * @subprocess: a #GSubprocess + * @cancellable: a #GCancellable + * @error: a #GError * - * Get the object that will be used to interact with the user. It will be used - * for things like prompting the user for passwords. If %NULL is returned, then - * no user interaction will occur for this connection. + * Synchronously wait for the subprocess to terminate. * - * Returns: (transfer none): The interaction object. - * Since: 2.30 + * After the process terminates you can query its exit status with + * functions such as g_subprocess_get_if_exited() and + * g_subprocess_get_exit_status(). + * + * This function does not fail in the case of the subprocess having + * abnormal termination. See g_subprocess_wait_check() for that. + * + * Cancelling @cancellable doesn't kill the subprocess. Call + * g_subprocess_force_exit() if it is desirable. + * + * Returns: %TRUE on success, %FALSE if @cancellable was cancelled + * Since: 2.40 */ /** - * g_tls_connection_get_peer_certificate: - * @conn: a #GTlsConnection + * g_subprocess_wait_async: + * @subprocess: a #GSubprocess + * @cancellable: a #GCancellable, or %NULL + * @callback: a #GAsyncReadyCallback to call when the operation is complete + * @user_data: user_data for @callback + * + * Wait for the subprocess to terminate. * - * Gets @conn's peer's certificate after the handshake has completed. - * (It is not set during the emission of - * #GTlsConnection::accept-certificate.) + * This is the asynchronous version of g_subprocess_wait(). * - * Returns: (transfer none): @conn's peer's certificate, or %NULL - * Since: 2.28 + * Since: 2.40 */ /** - * g_tls_connection_get_peer_certificate_errors: - * @conn: a #GTlsConnection + * g_subprocess_wait_check: + * @subprocess: a #GSubprocess + * @cancellable: a #GCancellable + * @error: a #GError * - * Gets the errors associated with validating @conn's peer's - * certificate, after the handshake has completed. (It is not set - * during the emission of #GTlsConnection::accept-certificate.) + * Combines g_subprocess_wait() with g_spawn_check_exit_status(). * - * Returns: @conn's peer's certificate errors - * Since: 2.28 + * Returns: %TRUE on success, %FALSE if process exited abnormally, or + * @cancellable was cancelled + * Since: 2.40 */ /** - * g_tls_connection_get_rehandshake_mode: - * @conn: a #GTlsConnection + * g_subprocess_wait_check_async: + * @subprocess: a #GSubprocess + * @cancellable: a #GCancellable, or %NULL + * @callback: a #GAsyncReadyCallback to call when the operation is complete + * @user_data: user_data for @callback * - * Gets @conn rehandshaking mode. See - * g_tls_connection_set_rehandshake_mode() for details. + * Combines g_subprocess_wait_async() with g_spawn_check_exit_status(). * - * Returns: @conn's rehandshaking mode - * Since: 2.28 + * This is the asynchronous version of g_subprocess_wait_check(). + * + * Since: 2.40 */ /** - * g_tls_connection_get_require_close_notify: - * @conn: a #GTlsConnection + * g_subprocess_wait_check_finish: + * @subprocess: a #GSubprocess + * @result: the #GAsyncResult passed to your #GAsyncReadyCallback + * @error: a pointer to a %NULL #GError, or %NULL * - * Tests whether or not @conn expects a proper TLS close notification - * when the connection is closed. See - * g_tls_connection_set_require_close_notify() for details. + * Collects the result of a previous call to + * g_subprocess_wait_check_async(). * - * Returns: %TRUE if @conn requires a proper TLS close - * notification. - * Since: 2.28 + * Returns: %TRUE if successful, or %FALSE with @error set + * Since: 2.40 */ /** - * g_tls_connection_get_use_system_certdb: - * @conn: a #GTlsConnection + * g_subprocess_wait_finish: + * @subprocess: a #GSubprocess + * @result: the #GAsyncResult passed to your #GAsyncReadyCallback + * @error: a pointer to a %NULL #GError, or %NULL * - * Gets whether @conn uses the system certificate database to verify - * peer certificates. See g_tls_connection_set_use_system_certdb(). + * Collects the result of a previous call to + * g_subprocess_wait_async(). * - * Returns: whether @conn uses the system certificate database - * Deprecated: 2.30: Use g_tls_connection_get_database() instead + * Returns: %TRUE if successful, or %FALSE with @error set + * Since: 2.40 */ /** - * g_tls_connection_handshake: - * @conn: a #GTlsConnection - * @cancellable: (nullable): a #GCancellable, or %NULL - * @error: a #GError, or %NULL - * - * Attempts a TLS handshake on @conn. + * g_task_attach_source: + * @task: a #GTask + * @source: the source to attach + * @callback: the callback to invoke when @source triggers * - * On the client side, it is never necessary to call this method; - * although the connection needs to perform a handshake after - * connecting (or after sending a "STARTTLS"-type command) and may - * need to rehandshake later if the server requests it, - * #GTlsConnection will handle this for you automatically when you try - * to send or receive data on the connection. However, you can call - * g_tls_connection_handshake() manually if you want to know for sure - * whether the initial handshake succeeded or failed (as opposed to - * just immediately trying to write to @conn's output stream, in which - * case if it fails, it may not be possible to tell if it failed - * before or after completing the handshake). + * A utility function for dealing with async operations where you need + * to wait for a #GSource to trigger. Attaches @source to @task's + * #GMainContext with @task's [priority][io-priority], and sets @source's + * callback to @callback, with @task as the callback's `user_data`. * - * Likewise, on the server side, although a handshake is necessary at - * the beginning of the communication, you do not need to call this - * function explicitly unless you want clearer error reporting. - * However, you may call g_tls_connection_handshake() later on to - * renegotiate parameters (encryption methods, etc) with the client. + * It will set the @source’s name to the task’s name (as set with + * g_task_set_name()), if one has been set. * - * #GTlsConnection::accept_certificate may be emitted during the - * handshake. + * This takes a reference on @task until @source is destroyed. * - * Returns: success or failure - * Since: 2.28 + * Since: 2.36 */ /** - * g_tls_connection_handshake_async: - * @conn: a #GTlsConnection - * @io_priority: the [I/O priority][io-priority] of the request - * @cancellable: (nullable): a #GCancellable, or %NULL - * @callback: callback to call when the handshake is complete - * @user_data: the data to pass to the callback function + * g_task_get_cancellable: + * @task: a #GTask * - * Asynchronously performs a TLS handshake on @conn. See - * g_tls_connection_handshake() for more information. + * Gets @task's #GCancellable * - * Since: 2.28 + * Returns: (transfer none): @task's #GCancellable + * Since: 2.36 */ /** - * g_tls_connection_handshake_finish: - * @conn: a #GTlsConnection - * @result: a #GAsyncResult. - * @error: a #GError pointer, or %NULL + * g_task_get_check_cancellable: + * @task: the #GTask * - * Finish an asynchronous TLS handshake operation. See - * g_tls_connection_handshake() for more information. + * Gets @task's check-cancellable flag. See + * g_task_set_check_cancellable() for more details. * - * Returns: %TRUE on success, %FALSE on failure, in which - * case @error will be set. - * Since: 2.28 + * Since: 2.36 */ /** - * g_tls_connection_set_certificate: - * @conn: a #GTlsConnection - * @certificate: the certificate to use for @conn - * - * This sets the certificate that @conn will present to its peer - * during the TLS handshake. For a #GTlsServerConnection, it is - * mandatory to set this, and that will normally be done at construct - * time. - * - * For a #GTlsClientConnection, this is optional. If a handshake fails - * with %G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server - * requires a certificate, and if you try connecting again, you should - * call this method first. You can call - * g_tls_client_connection_get_accepted_cas() on the failed connection - * to get a list of Certificate Authorities that the server will - * accept certificates from. + * g_task_get_completed: + * @task: a #GTask. * - * (It is also possible that a server will allow the connection with - * or without a certificate; in that case, if you don't provide a - * certificate, you can tell that the server requested one by the fact - * that g_tls_client_connection_get_accepted_cas() will return - * non-%NULL.) + * Gets the value of #GTask:completed. This changes from %FALSE to %TRUE after + * the task’s callback is invoked, and will return %FALSE if called from inside + * the callback. * - * Since: 2.28 + * Returns: %TRUE if the task has completed, %FALSE otherwise. + * Since: 2.44 */ /** - * g_tls_connection_set_database: - * @conn: a #GTlsConnection - * @database: a #GTlsDatabase + * g_task_get_context: + * @task: a #GTask * - * Sets the certificate database that is used to verify peer certificates. - * This is set to the default database by default. See - * g_tls_backend_get_default_database(). If set to %NULL, then - * peer certificate validation will always set the - * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning - * #GTlsConnection::accept-certificate will always be emitted on - * client-side connections, unless that bit is not set in - * #GTlsClientConnection:validation-flags). + * Gets the #GMainContext that @task will return its result in (that + * is, the context that was the + * [thread-default main context][g-main-context-push-thread-default] + * at the point when @task was created). * - * Since: 2.30 + * This will always return a non-%NULL value, even if the task's + * context is the default #GMainContext. + * + * Returns: (transfer none): @task's #GMainContext + * Since: 2.36 */ /** - * g_tls_connection_set_interaction: - * @conn: a connection - * @interaction: (nullable): an interaction object, or %NULL - * - * Set the object that will be used to interact with the user. It will be used - * for things like prompting the user for passwords. + * g_task_get_name: + * @task: a #GTask * - * The @interaction argument will normally be a derived subclass of - * #GTlsInteraction. %NULL can also be provided if no user interaction - * should occur for this connection. + * Gets @task’s name. See g_task_set_name(). * - * Since: 2.30 + * Returns: (nullable) (transfer none): @task’s name, or %NULL + * Since: 2.60 */ /** - * g_tls_connection_set_rehandshake_mode: - * @conn: a #GTlsConnection - * @mode: the rehandshaking mode - * - * Sets how @conn behaves with respect to rehandshaking requests. + * g_task_get_priority: + * @task: a #GTask * - * %G_TLS_REHANDSHAKE_NEVER means that it will never agree to - * rehandshake after the initial handshake is complete. (For a client, - * this means it will refuse rehandshake requests from the server, and - * for a server, this means it will close the connection with an error - * if the client attempts to rehandshake.) - * - * %G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a - * rehandshake only if the other end of the connection supports the - * TLS `renegotiation_info` extension. This is the default behavior, - * but means that rehandshaking will not work against older - * implementations that do not support that extension. - * - * %G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow - * rehandshaking even without the `renegotiation_info` extension. On - * the server side in particular, this is not recommended, since it - * leaves the server open to certain attacks. However, this mode is - * necessary if you need to allow renegotiation with older client - * software. + * Gets @task's priority * - * Since: 2.28 + * Returns: @task's priority + * Since: 2.36 */ /** - * g_tls_connection_set_require_close_notify: - * @conn: a #GTlsConnection - * @require_close_notify: whether or not to require close notification - * - * Sets whether or not @conn expects a proper TLS close notification - * before the connection is closed. If this is %TRUE (the default), - * then @conn will expect to receive a TLS close notification from its - * peer before the connection is closed, and will return a - * %G_TLS_ERROR_EOF error if the connection is closed without proper - * notification (since this may indicate a network error, or - * man-in-the-middle attack). - * - * In some protocols, the application will know whether or not the - * connection was closed cleanly based on application-level data - * (because the application-level data includes a length field, or is - * somehow self-delimiting); in this case, the close notify is - * redundant and sometimes omitted. (TLS 1.1 explicitly allows this; - * in TLS 1.0 it is technically an error, but often done anyway.) You - * can use g_tls_connection_set_require_close_notify() to tell @conn - * to allow an "unannounced" connection close, in which case the close - * will show up as a 0-length read, as in a non-TLS - * #GSocketConnection, and it is up to the application to check that - * the data has been fully received. + * g_task_get_return_on_cancel: + * @task: the #GTask * - * Note that this only affects the behavior when the peer closes the - * connection; when the application calls g_io_stream_close() itself - * on @conn, this will send a close notification regardless of the - * setting of this property. If you explicitly want to do an unclean - * close, you can close @conn's #GTlsConnection:base-io-stream rather - * than closing @conn itself, but note that this may only be done when no other - * operations are pending on @conn or the base I/O stream. + * Gets @task's return-on-cancel flag. See + * g_task_set_return_on_cancel() for more details. * - * Since: 2.28 + * Since: 2.36 */ /** - * g_tls_connection_set_use_system_certdb: - * @conn: a #GTlsConnection - * @use_system_certdb: whether to use the system certificate database + * g_task_get_source_object: + * @task: a #GTask * - * Sets whether @conn uses the system certificate database to verify - * peer certificates. This is %TRUE by default. If set to %FALSE, then - * peer certificate validation will always set the - * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning - * #GTlsConnection::accept-certificate will always be emitted on - * client-side connections, unless that bit is not set in - * #GTlsClientConnection:validation-flags). + * Gets the source object from @task. Like + * g_async_result_get_source_object(), but does not ref the object. * - * Deprecated: 2.30: Use g_tls_connection_set_database() instead + * Returns: (transfer none) (nullable) (type GObject): @task's source object, or %NULL + * Since: 2.36 */ /** - * g_tls_database_create_certificate_handle: - * @self: a #GTlsDatabase - * @certificate: certificate for which to create a handle. - * - * Create a handle string for the certificate. The database will only be able - * to create a handle for certificates that originate from the database. In - * cases where the database cannot create a handle for a certificate, %NULL - * will be returned. + * g_task_get_source_tag: + * @task: a #GTask * - * This handle should be stable across various instances of the application, - * and between applications. If a certificate is modified in the database, - * then it is not guaranteed that this handle will continue to point to it. + * Gets @task's source tag. See g_task_set_source_tag(). * - * Returns: (nullable): a newly allocated string containing the - * handle. - * Since: 2.30 + * Returns: (transfer none): @task's source tag + * Since: 2.36 */ /** - * g_tls_database_lookup_certificate_for_handle: - * @self: a #GTlsDatabase - * @handle: a certificate handle - * @interaction: (nullable): used to interact with the user if necessary - * @flags: Flags which affect the lookup. - * @cancellable: (nullable): a #GCancellable, or %NULL - * @error: (nullable): a #GError, or %NULL - * - * Lookup a certificate by its handle. - * - * The handle should have been created by calling - * g_tls_database_create_certificate_handle() on a #GTlsDatabase object of - * the same TLS backend. The handle is designed to remain valid across - * instantiations of the database. - * - * If the handle is no longer valid, or does not point to a certificate in - * this database, then %NULL will be returned. + * g_task_get_task_data: + * @task: a #GTask * - * This function can block, use g_tls_database_lookup_certificate_for_handle_async() to perform - * the lookup operation asynchronously. + * Gets @task's `task_data`. * - * Returns: (transfer full) (nullable): a newly allocated - * #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate. - * Since: 2.30 + * Returns: (transfer none): @task's `task_data`. + * Since: 2.36 */ /** - * g_tls_database_lookup_certificate_for_handle_async: - * @self: a #GTlsDatabase - * @handle: a certificate handle - * @interaction: (nullable): used to interact with the user if necessary - * @flags: Flags which affect the lookup. - * @cancellable: (nullable): a #GCancellable, or %NULL - * @callback: callback to call when the operation completes - * @user_data: the data to pass to the callback function + * g_task_had_error: + * @task: a #GTask. * - * Asynchronously lookup a certificate by its handle in the database. See - * g_tls_database_lookup_certificate_for_handle() for more information. + * Tests if @task resulted in an error. * - * Since: 2.30 + * Returns: %TRUE if the task resulted in an error, %FALSE otherwise. + * Since: 2.36 */ /** - * g_tls_database_lookup_certificate_for_handle_finish: - * @self: a #GTlsDatabase - * @result: a #GAsyncResult. - * @error: a #GError pointer, or %NULL - * - * Finish an asynchronous lookup of a certificate by its handle. See - * g_tls_database_lookup_certificate_by_handle() for more information. + * g_task_is_valid: + * @result: (type Gio.AsyncResult): A #GAsyncResult + * @source_object: (nullable) (type GObject): the source object + * expected to be associated with the task * - * If the handle is no longer valid, or does not point to a certificate in - * this database, then %NULL will be returned. + * Checks that @result is a #GTask, and that @source_object is its + * source object (or that @source_object is %NULL and @result has no + * source object). This can be used in g_return_if_fail() checks. * - * Returns: (transfer full): a newly allocated #GTlsCertificate object. - * Use g_object_unref() to release the certificate. - * Since: 2.30 + * Returns: %TRUE if @result and @source_object are valid, %FALSE + * if not + * Since: 2.36 */ /** - * g_tls_database_lookup_certificate_issuer: - * @self: a #GTlsDatabase - * @certificate: a #GTlsCertificate - * @interaction: (nullable): used to interact with the user if necessary - * @flags: flags which affect the lookup operation - * @cancellable: (nullable): a #GCancellable, or %NULL - * @error: (nullable): a #GError, or %NULL + * g_task_new: + * @source_object: (nullable) (type GObject): the #GObject that owns + * this task, or %NULL. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (scope async): a #GAsyncReadyCallback. + * @callback_data: (closure): user data passed to @callback. * - * Lookup the issuer of @certificate in the database. + * Creates a #GTask acting on @source_object, which will eventually be + * used to invoke @callback in the current + * [thread-default main context][g-main-context-push-thread-default]. * - * The %issuer property - * of @certificate is not modified, and the two certificates are not hooked - * into a chain. + * Call this in the "start" method of your asynchronous method, and + * pass the #GTask around throughout the asynchronous operation. You + * can use g_task_set_task_data() to attach task-specific data to the + * object, which you can retrieve later via g_task_get_task_data(). * - * This function can block, use g_tls_database_lookup_certificate_issuer_async() to perform - * the lookup operation asynchronously. + * By default, if @cancellable is cancelled, then the return value of + * the task will always be %G_IO_ERROR_CANCELLED, even if the task had + * already completed before the cancellation. This allows for + * simplified handling in cases where cancellation may imply that + * other objects that the task depends on have been destroyed. If you + * do not want this behavior, you can use + * g_task_set_check_cancellable() to change it. * - * Returns: (transfer full): a newly allocated issuer #GTlsCertificate, - * or %NULL. Use g_object_unref() to release the certificate. - * Since: 2.30 + * Returns: a #GTask. + * Since: 2.36 */ /** - * g_tls_database_lookup_certificate_issuer_async: - * @self: a #GTlsDatabase - * @certificate: a #GTlsCertificate - * @interaction: (nullable): used to interact with the user if necessary - * @flags: flags which affect the lookup operation - * @cancellable: (nullable): a #GCancellable, or %NULL - * @callback: callback to call when the operation completes - * @user_data: the data to pass to the callback function + * g_task_propagate_boolean: + * @task: a #GTask. + * @error: return location for a #GError * - * Asynchronously lookup the issuer of @certificate in the database. See - * g_tls_database_lookup_certificate_issuer() for more information. + * Gets the result of @task as a #gboolean. * - * Since: 2.30 + * If the task resulted in an error, or was cancelled, then this will + * instead return %FALSE and set @error. + * + * Since this method transfers ownership of the return value (or + * error) to the caller, you may only call it once. + * + * Returns: the task result, or %FALSE on error + * Since: 2.36 */ /** - * g_tls_database_lookup_certificate_issuer_finish: - * @self: a #GTlsDatabase - * @result: a #GAsyncResult. - * @error: a #GError pointer, or %NULL + * g_task_propagate_int: + * @task: a #GTask. + * @error: return location for a #GError * - * Finish an asynchronous lookup issuer operation. See - * g_tls_database_lookup_certificate_issuer() for more information. + * Gets the result of @task as an integer (#gssize). * - * Returns: (transfer full): a newly allocated issuer #GTlsCertificate, - * or %NULL. Use g_object_unref() to release the certificate. - * Since: 2.30 + * If the task resulted in an error, or was cancelled, then this will + * instead return -1 and set @error. + * + * Since this method transfers ownership of the return value (or + * error) to the caller, you may only call it once. + * + * Returns: the task result, or -1 on error + * Since: 2.36 */ /** - * g_tls_database_lookup_certificates_issued_by: - * @self: a #GTlsDatabase - * @issuer_raw_dn: a #GByteArray which holds the DER encoded issuer DN. - * @interaction: (nullable): used to interact with the user if necessary - * @flags: Flags which affect the lookup operation. - * @cancellable: (nullable): a #GCancellable, or %NULL - * @error: (nullable): a #GError, or %NULL + * g_task_propagate_pointer: + * @task: a #GTask + * @error: return location for a #GError * - * Lookup certificates issued by this issuer in the database. + * Gets the result of @task as a pointer, and transfers ownership + * of that value to the caller. * - * This function can block, use g_tls_database_lookup_certificates_issued_by_async() to perform - * the lookup operation asynchronously. + * If the task resulted in an error, or was cancelled, then this will + * instead return %NULL and set @error. * - * Returns: (transfer full) (element-type GTlsCertificate): a newly allocated list of #GTlsCertificate - * objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list. - * Since: 2.30 + * Since this method transfers ownership of the return value (or + * error) to the caller, you may only call it once. + * + * Returns: (transfer full): the task result, or %NULL on error + * Since: 2.36 */ /** - * g_tls_database_lookup_certificates_issued_by_async: - * @self: a #GTlsDatabase - * @issuer_raw_dn: a #GByteArray which holds the DER encoded issuer DN. - * @interaction: (nullable): used to interact with the user if necessary - * @flags: Flags which affect the lookup operation. - * @cancellable: (nullable): a #GCancellable, or %NULL - * @callback: callback to call when the operation completes - * @user_data: the data to pass to the callback function + * g_task_propagate_value: + * @task: a #GTask + * @value: (out caller-allocates): return location for the #GValue + * @error: return location for a #GError * - * Asynchronously lookup certificates issued by this issuer in the database. See - * g_tls_database_lookup_certificates_issued_by() for more information. + * Gets the result of @task as a #GValue, and transfers ownership of + * that value to the caller. As with g_task_return_value(), this is + * a generic low-level method; g_task_propagate_pointer() and the like + * will usually be more useful for C code. * - * The database may choose to hold a reference to the issuer byte array for the duration - * of of this asynchronous operation. The byte array should not be modified during - * this time. + * If the task resulted in an error, or was cancelled, then this will + * instead set @error and return %FALSE. * - * Since: 2.30 + * Since this method transfers ownership of the return value (or + * error) to the caller, you may only call it once. + * + * Returns: %TRUE if @task succeeded, %FALSE on error. + * Since: 2.64 */ /** - * g_tls_database_lookup_certificates_issued_by_finish: - * @self: a #GTlsDatabase - * @result: a #GAsyncResult. - * @error: a #GError pointer, or %NULL + * g_task_report_error: + * @source_object: (nullable) (type GObject): the #GObject that owns + * this task, or %NULL. + * @callback: (scope async): a #GAsyncReadyCallback. + * @callback_data: (closure): user data passed to @callback. + * @source_tag: an opaque pointer indicating the source of this task + * @error: (transfer full): error to report * - * Finish an asynchronous lookup of certificates. See - * g_tls_database_lookup_certificates_issued_by() for more information. + * Creates a #GTask and then immediately calls g_task_return_error() + * on it. Use this in the wrapper function of an asynchronous method + * when you want to avoid even calling the virtual method. You can + * then use g_async_result_is_tagged() in the finish method wrapper to + * check if the result there is tagged as having been created by the + * wrapper method, and deal with it appropriately if so. * - * Returns: (transfer full) (element-type GTlsCertificate): a newly allocated list of #GTlsCertificate - * objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list. - * Since: 2.30 + * See also g_task_report_new_error(). + * + * Since: 2.36 */ /** - * g_tls_database_verify_chain: - * @self: a #GTlsDatabase - * @chain: a #GTlsCertificate chain - * @purpose: the purpose that this certificate chain will be used for. - * @identity: (nullable): the expected peer identity - * @interaction: (nullable): used to interact with the user if necessary - * @flags: additional verify flags - * @cancellable: (nullable): a #GCancellable, or %NULL - * @error: (nullable): a #GError, or %NULL - * - * Determines the validity of a certificate chain after looking up and - * adding any missing certificates to the chain. - * - * @chain is a chain of #GTlsCertificate objects each pointing to the next - * certificate in the chain by its #GTlsCertificate:issuer property. The chain may initially - * consist of one or more certificates. After the verification process is - * complete, @chain may be modified by adding missing certificates, or removing - * extra certificates. If a certificate anchor was found, then it is added to - * the @chain. - * - * @purpose describes the purpose (or usage) for which the certificate - * is being used. Typically @purpose will be set to #G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER - * which means that the certificate is being used to authenticate a server - * (and we are acting as the client). - * - * The @identity is used to check for pinned certificates (trust exceptions) - * in the database. These will override the normal verification process on a - * host by host basis. - * - * Currently there are no @flags, and %G_TLS_DATABASE_VERIFY_NONE should be - * used. + * g_task_report_new_error: + * @source_object: (nullable) (type GObject): the #GObject that owns + * this task, or %NULL. + * @callback: (scope async): a #GAsyncReadyCallback. + * @callback_data: (closure): user data passed to @callback. + * @source_tag: an opaque pointer indicating the source of this task + * @domain: a #GQuark. + * @code: an error code. + * @format: a string with format characters. + * @...: a list of values to insert into @format. * - * If @chain is found to be valid, then the return value will be 0. If - * @chain is found to be invalid, then the return value will indicate - * the problems found. If the function is unable to determine whether - * @chain is valid or not (eg, because @cancellable is triggered - * before it completes) then the return value will be - * %G_TLS_CERTIFICATE_GENERIC_ERROR and @error will be set - * accordingly. @error is not set when @chain is successfully analyzed - * but found to be invalid. + * Creates a #GTask and then immediately calls + * g_task_return_new_error() on it. Use this in the wrapper function + * of an asynchronous method when you want to avoid even calling the + * virtual method. You can then use g_async_result_is_tagged() in the + * finish method wrapper to check if the result there is tagged as + * having been created by the wrapper method, and deal with it + * appropriately if so. * - * This function can block, use g_tls_database_verify_chain_async() to perform - * the verification operation asynchronously. + * See also g_task_report_error(). * - * Returns: the appropriate #GTlsCertificateFlags which represents the - * result of verification. - * Since: 2.30 + * Since: 2.36 */ /** - * g_tls_database_verify_chain_async: - * @self: a #GTlsDatabase - * @chain: a #GTlsCertificate chain - * @purpose: the purpose that this certificate chain will be used for. - * @identity: (nullable): the expected peer identity - * @interaction: (nullable): used to interact with the user if necessary - * @flags: additional verify flags - * @cancellable: (nullable): a #GCancellable, or %NULL - * @callback: callback to call when the operation completes - * @user_data: the data to pass to the callback function + * g_task_return_boolean: + * @task: a #GTask. + * @result: the #gboolean result of a task function. * - * Asynchronously determines the validity of a certificate chain after - * looking up and adding any missing certificates to the chain. See - * g_tls_database_verify_chain() for more information. + * Sets @task's result to @result and completes the task (see + * g_task_return_pointer() for more discussion of exactly what this + * means). * - * Since: 2.30 + * Since: 2.36 */ /** - * g_tls_database_verify_chain_finish: - * @self: a #GTlsDatabase - * @result: a #GAsyncResult. - * @error: a #GError pointer, or %NULL + * g_task_return_error: + * @task: a #GTask. + * @error: (transfer full): the #GError result of a task function. * - * Finish an asynchronous verify chain operation. See - * g_tls_database_verify_chain() for more information. + * Sets @task's result to @error (which @task assumes ownership of) + * and completes the task (see g_task_return_pointer() for more + * discussion of exactly what this means). * - * If @chain is found to be valid, then the return value will be 0. If - * @chain is found to be invalid, then the return value will indicate - * the problems found. If the function is unable to determine whether - * @chain is valid or not (eg, because @cancellable is triggered - * before it completes) then the return value will be - * %G_TLS_CERTIFICATE_GENERIC_ERROR and @error will be set - * accordingly. @error is not set when @chain is successfully analyzed - * but found to be invalid. + * Note that since the task takes ownership of @error, and since the + * task may be completed before returning from g_task_return_error(), + * you cannot assume that @error is still valid after calling this. + * Call g_error_copy() on the error if you need to keep a local copy + * as well. * - * Returns: the appropriate #GTlsCertificateFlags which represents the - * result of verification. - * Since: 2.30 + * See also g_task_return_new_error(). + * + * Since: 2.36 */ /** - * g_tls_error_quark: + * g_task_return_error_if_cancelled: + * @task: a #GTask * - * Gets the TLS error quark. + * Checks if @task's #GCancellable has been cancelled, and if so, sets + * @task's error accordingly and completes the task (see + * g_task_return_pointer() for more discussion of exactly what this + * means). * - * Returns: a #GQuark. - * Since: 2.28 + * Returns: %TRUE if @task has been cancelled, %FALSE if not + * Since: 2.36 */ /** - * g_tls_file_database_new: - * @anchors: (type filename): filename of anchor certificate authorities. - * @error: #GError for error reporting, or %NULL to ignore. - * - * Creates a new #GTlsFileDatabase which uses anchor certificate authorities - * in @anchors to verify certificate chains. + * g_task_return_int: + * @task: a #GTask. + * @result: the integer (#gssize) result of a task function. * - * The certificates in @anchors must be PEM encoded. + * Sets @task's result to @result and completes the task (see + * g_task_return_pointer() for more discussion of exactly what this + * means). * - * Returns: (transfer full) (type GTlsFileDatabase): the new - * #GTlsFileDatabase, or %NULL on error - * Since: 2.30 + * Since: 2.36 */ /** - * g_tls_interaction_ask_password: - * @interaction: a #GTlsInteraction object - * @password: a #GTlsPassword object - * @cancellable: an optional #GCancellable cancellation object - * @error: an optional location to place an error on failure - * - * Run synchronous interaction to ask the user for a password. In general, - * g_tls_interaction_invoke_ask_password() should be used instead of this - * function. + * g_task_return_new_error: + * @task: a #GTask. + * @domain: a #GQuark. + * @code: an error code. + * @format: a string with format characters. + * @...: a list of values to insert into @format. * - * Derived subclasses usually implement a password prompt, although they may - * also choose to provide a password from elsewhere. The @password value will - * be filled in and then @callback will be called. Alternatively the user may - * abort this password request, which will usually abort the TLS connection. + * Sets @task's result to a new #GError created from @domain, @code, + * @format, and the remaining arguments, and completes the task (see + * g_task_return_pointer() for more discussion of exactly what this + * means). * - * If the interaction is cancelled by the cancellation object, or by the - * user then %G_TLS_INTERACTION_FAILED will be returned with an error that - * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may - * not support immediate cancellation. + * See also g_task_return_error(). * - * Returns: The status of the ask password interaction. - * Since: 2.30 + * Since: 2.36 */ /** - * g_tls_interaction_ask_password_async: - * @interaction: a #GTlsInteraction object - * @password: a #GTlsPassword object - * @cancellable: an optional #GCancellable cancellation object - * @callback: (nullable): will be called when the interaction completes - * @user_data: (nullable): data to pass to the @callback - * - * Run asynchronous interaction to ask the user for a password. In general, - * g_tls_interaction_invoke_ask_password() should be used instead of this - * function. + * g_task_return_pointer: + * @task: a #GTask + * @result: (nullable) (transfer full): the pointer result of a task + * function + * @result_destroy: (nullable): a #GDestroyNotify function. * - * Derived subclasses usually implement a password prompt, although they may - * also choose to provide a password from elsewhere. The @password value will - * be filled in and then @callback will be called. Alternatively the user may - * abort this password request, which will usually abort the TLS connection. + * Sets @task's result to @result and completes the task. If @result + * is not %NULL, then @result_destroy will be used to free @result if + * the caller does not take ownership of it with + * g_task_propagate_pointer(). * - * If the interaction is cancelled by the cancellation object, or by the - * user then %G_TLS_INTERACTION_FAILED will be returned with an error that - * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may - * not support immediate cancellation. + * "Completes the task" means that for an ordinary asynchronous task + * it will either invoke the task's callback, or else queue that + * callback to be invoked in the proper #GMainContext, or in the next + * iteration of the current #GMainContext. For a task run via + * g_task_run_in_thread() or g_task_run_in_thread_sync(), calling this + * method will save @result to be returned to the caller later, but + * the task will not actually be completed until the #GTaskThreadFunc + * exits. * - * Certain implementations may not support immediate cancellation. + * Note that since the task may be completed before returning from + * g_task_return_pointer(), you cannot assume that @result is still + * valid after calling this, unless you are still holding another + * reference on it. * - * Since: 2.30 + * Since: 2.36 */ /** - * g_tls_interaction_ask_password_finish: - * @interaction: a #GTlsInteraction object - * @result: the result passed to the callback - * @error: an optional location to place an error on failure + * g_task_return_value: + * @task: a #GTask + * @result: (nullable) (transfer none): the #GValue result of + * a task function * - * Complete an ask password user interaction request. This should be once - * the g_tls_interaction_ask_password_async() completion callback is called. + * Sets @task's result to @result (by copying it) and completes the task. * - * If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsPassword passed - * to g_tls_interaction_ask_password() will have its password filled in. + * If @result is %NULL then a #GValue of type #G_TYPE_POINTER + * with a value of %NULL will be used for the result. * - * If the interaction is cancelled by the cancellation object, or by the - * user then %G_TLS_INTERACTION_FAILED will be returned with an error that - * contains a %G_IO_ERROR_CANCELLED error code. + * This is a very generic low-level method intended primarily for use + * by language bindings; for C code, g_task_return_pointer() and the + * like will normally be much easier to use. * - * Returns: The status of the ask password interaction. - * Since: 2.30 + * Since: 2.64 */ /** - * g_tls_interaction_invoke_ask_password: - * @interaction: a #GTlsInteraction object - * @password: a #GTlsPassword object - * @cancellable: an optional #GCancellable cancellation object - * @error: an optional location to place an error on failure + * g_task_run_in_thread: + * @task: a #GTask + * @task_func: (scope async): a #GTaskThreadFunc * - * Invoke the interaction to ask the user for a password. It invokes this - * interaction in the main loop, specifically the #GMainContext returned by - * g_main_context_get_thread_default() when the interaction is created. This - * is called by called by #GTlsConnection or #GTlsDatabase to ask the user - * for a password. + * Runs @task_func in another thread. When @task_func returns, @task's + * #GAsyncReadyCallback will be invoked in @task's #GMainContext. * - * Derived subclasses usually implement a password prompt, although they may - * also choose to provide a password from elsewhere. The @password value will - * be filled in and then @callback will be called. Alternatively the user may - * abort this password request, which will usually abort the TLS connection. + * This takes a ref on @task until the task completes. * - * The implementation can either be a synchronous (eg: modal dialog) or an - * asynchronous one (eg: modeless dialog). This function will take care of - * calling which ever one correctly. + * See #GTaskThreadFunc for more details about how @task_func is handled. * - * If the interaction is cancelled by the cancellation object, or by the - * user then %G_TLS_INTERACTION_FAILED will be returned with an error that - * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may - * not support immediate cancellation. + * Although GLib currently rate-limits the tasks queued via + * g_task_run_in_thread(), you should not assume that it will always + * do this. If you have a very large number of tasks to run, but don't + * want them to all run at once, you should only queue a limited + * number of them at a time. * - * Returns: The status of the ask password interaction. - * Since: 2.30 + * Since: 2.36 */ /** - * g_tls_interaction_invoke_request_certificate: - * @interaction: a #GTlsInteraction object - * @connection: a #GTlsConnection object - * @flags: flags providing more information about the request - * @cancellable: an optional #GCancellable cancellation object - * @error: an optional location to place an error on failure + * g_task_run_in_thread_sync: + * @task: a #GTask + * @task_func: (scope async): a #GTaskThreadFunc * - * Invoke the interaction to ask the user to choose a certificate to - * use with the connection. It invokes this interaction in the main - * loop, specifically the #GMainContext returned by - * g_main_context_get_thread_default() when the interaction is - * created. This is called by called by #GTlsConnection when the peer - * requests a certificate during the handshake. + * Runs @task_func in another thread, and waits for it to return or be + * cancelled. You can use g_task_propagate_pointer(), etc, afterward + * to get the result of @task_func. * - * Derived subclasses usually implement a certificate selector, - * although they may also choose to provide a certificate from - * elsewhere. Alternatively the user may abort this certificate - * request, which may or may not abort the TLS connection. + * See #GTaskThreadFunc for more details about how @task_func is handled. * - * The implementation can either be a synchronous (eg: modal dialog) or an - * asynchronous one (eg: modeless dialog). This function will take care of - * calling which ever one correctly. + * Normally this is used with tasks created with a %NULL + * `callback`, but note that even if the task does + * have a callback, it will not be invoked when @task_func returns. + * #GTask:completed will be set to %TRUE just before this function returns. * - * If the interaction is cancelled by the cancellation object, or by the - * user then %G_TLS_INTERACTION_FAILED will be returned with an error that - * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may - * not support immediate cancellation. + * Although GLib currently rate-limits the tasks queued via + * g_task_run_in_thread_sync(), you should not assume that it will + * always do this. If you have a very large number of tasks to run, + * but don't want them to all run at once, you should only queue a + * limited number of them at a time. * - * Returns: The status of the certificate request interaction. - * Since: 2.40 + * Since: 2.36 */ /** - * g_tls_interaction_request_certificate: - * @interaction: a #GTlsInteraction object - * @connection: a #GTlsConnection object - * @flags: flags providing more information about the request - * @cancellable: an optional #GCancellable cancellation object - * @error: an optional location to place an error on failure + * g_task_set_check_cancellable: + * @task: the #GTask + * @check_cancellable: whether #GTask will check the state of + * its #GCancellable for you. * - * Run synchronous interaction to ask the user to choose a certificate to use - * with the connection. In general, g_tls_interaction_invoke_request_certificate() - * should be used instead of this function. + * Sets or clears @task's check-cancellable flag. If this is %TRUE + * (the default), then g_task_propagate_pointer(), etc, and + * g_task_had_error() will check the task's #GCancellable first, and + * if it has been cancelled, then they will consider the task to have + * returned an "Operation was cancelled" error + * (%G_IO_ERROR_CANCELLED), regardless of any other error or return + * value the task may have had. * - * Derived subclasses usually implement a certificate selector, although they may - * also choose to provide a certificate from elsewhere. Alternatively the user may - * abort this certificate request, which will usually abort the TLS connection. + * If @check_cancellable is %FALSE, then the #GTask will not check the + * cancellable itself, and it is up to @task's owner to do this (eg, + * via g_task_return_error_if_cancelled()). * - * If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsConnection - * passed to g_tls_interaction_request_certificate() will have had its - * #GTlsConnection:certificate filled in. + * If you are using g_task_set_return_on_cancel() as well, then + * you must leave check-cancellable set %TRUE. * - * If the interaction is cancelled by the cancellation object, or by the - * user then %G_TLS_INTERACTION_FAILED will be returned with an error that - * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may - * not support immediate cancellation. + * Since: 2.36 + */ + + +/** + * g_task_set_name: + * @task: a #GTask + * @name: (nullable): a human readable name for the task, or %NULL to unset it * - * Returns: The status of the request certificate interaction. - * Since: 2.40 + * Sets @task’s name, used in debugging and profiling. The name defaults to + * %NULL. + * + * The task name should describe in a human readable way what the task does. + * For example, ‘Open file’ or ‘Connect to network host’. It is used to set the + * name of the #GSource used for idle completion of the task. + * + * This function may only be called before the @task is first used in a thread + * other than the one it was constructed in. + * + * Since: 2.60 */ /** - * g_tls_interaction_request_certificate_async: - * @interaction: a #GTlsInteraction object - * @connection: a #GTlsConnection object - * @flags: flags providing more information about the request - * @cancellable: an optional #GCancellable cancellation object - * @callback: (nullable): will be called when the interaction completes - * @user_data: (nullable): data to pass to the @callback + * g_task_set_priority: + * @task: the #GTask + * @priority: the [priority][io-priority] of the request * - * Run asynchronous interaction to ask the user for a certificate to use with - * the connection. In general, g_tls_interaction_invoke_request_certificate() should - * be used instead of this function. + * Sets @task's priority. If you do not call this, it will default to + * %G_PRIORITY_DEFAULT. * - * Derived subclasses usually implement a certificate selector, although they may - * also choose to provide a certificate from elsewhere. @callback will be called - * when the operation completes. Alternatively the user may abort this certificate - * request, which will usually abort the TLS connection. + * This will affect the priority of #GSources created with + * g_task_attach_source() and the scheduling of tasks run in threads, + * and can also be explicitly retrieved later via + * g_task_get_priority(). * - * Since: 2.40 + * Since: 2.36 */ /** - * g_tls_interaction_request_certificate_finish: - * @interaction: a #GTlsInteraction object - * @result: the result passed to the callback - * @error: an optional location to place an error on failure + * g_task_set_return_on_cancel: + * @task: the #GTask + * @return_on_cancel: whether the task returns automatically when + * it is cancelled. * - * Complete an request certificate user interaction request. This should be once - * the g_tls_interaction_request_certificate_async() completion callback is called. + * Sets or clears @task's return-on-cancel flag. This is only + * meaningful for tasks run via g_task_run_in_thread() or + * g_task_run_in_thread_sync(). * - * If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsConnection - * passed to g_tls_interaction_request_certificate_async() will have had its - * #GTlsConnection:certificate filled in. + * If @return_on_cancel is %TRUE, then cancelling @task's + * #GCancellable will immediately cause it to return, as though the + * task's #GTaskThreadFunc had called + * g_task_return_error_if_cancelled() and then returned. * - * If the interaction is cancelled by the cancellation object, or by the - * user then %G_TLS_INTERACTION_FAILED will be returned with an error that - * contains a %G_IO_ERROR_CANCELLED error code. + * This allows you to create a cancellable wrapper around an + * uninterruptable function. The #GTaskThreadFunc just needs to be + * careful that it does not modify any externally-visible state after + * it has been cancelled. To do that, the thread should call + * g_task_set_return_on_cancel() again to (atomically) set + * return-on-cancel %FALSE before making externally-visible changes; + * if the task gets cancelled before the return-on-cancel flag could + * be changed, g_task_set_return_on_cancel() will indicate this by + * returning %FALSE. * - * Returns: The status of the request certificate interaction. - * Since: 2.40 + * You can disable and re-enable this flag multiple times if you wish. + * If the task's #GCancellable is cancelled while return-on-cancel is + * %FALSE, then calling g_task_set_return_on_cancel() to set it %TRUE + * again will cause the task to be cancelled at that point. + * + * If the task's #GCancellable is already cancelled before you call + * g_task_run_in_thread()/g_task_run_in_thread_sync(), then the + * #GTaskThreadFunc will still be run (for consistency), but the task + * will also be completed right away. + * + * Returns: %TRUE if @task's return-on-cancel flag was changed to + * match @return_on_cancel. %FALSE if @task has already been + * cancelled. + * Since: 2.36 */ /** - * g_tls_password_get_description: - * @password: a #GTlsPassword object + * g_task_set_source_tag: + * @task: the #GTask + * @source_tag: an opaque pointer indicating the source of this task * - * Get a description string about what the password will be used for. + * Sets @task's source tag. You can use this to tag a task return + * value with a particular pointer (usually a pointer to the function + * doing the tagging) and then later check it using + * g_task_get_source_tag() (or g_async_result_is_tagged()) in the + * task's "finish" function, to figure out if the response came from a + * particular place. * - * Returns: The description of the password. - * Since: 2.30 + * Since: 2.36 */ /** - * g_tls_password_get_flags: - * @password: a #GTlsPassword object + * g_task_set_task_data: + * @task: the #GTask + * @task_data: (nullable): task-specific data + * @task_data_destroy: (nullable): #GDestroyNotify for @task_data * - * Get flags about the password. + * Sets @task's task data (freeing the existing task data, if any). * - * Returns: The flags about the password. - * Since: 2.30 + * Since: 2.36 */ /** - * g_tls_password_get_value: - * @password: a #GTlsPassword object - * @length: (nullable): location to place the length of the password. + * g_tcp_connection_get_graceful_disconnect: + * @connection: a #GTcpConnection * - * Get the password value. If @length is not %NULL then it will be - * filled in with the length of the password value. (Note that the - * password value is not nul-terminated, so you can only pass %NULL - * for @length in contexts where you know the password will have a - * certain fixed length.) + * Checks if graceful disconnects are used. See + * g_tcp_connection_set_graceful_disconnect(). * - * Returns: The password value (owned by the password object). - * Since: 2.30 + * Returns: %TRUE if graceful disconnect is used on close, %FALSE otherwise + * Since: 2.22 */ /** - * g_tls_password_get_warning: - * @password: a #GTlsPassword object + * g_tcp_connection_set_graceful_disconnect: + * @connection: a #GTcpConnection + * @graceful_disconnect: Whether to do graceful disconnects or not * - * Get a user readable translated warning. Usually this warning is a - * representation of the password flags returned from - * g_tls_password_get_flags(). + * This enables graceful disconnects on close. A graceful disconnect + * means that we signal the receiving end that the connection is terminated + * and wait for it to close the connection before closing the connection. * - * Returns: The warning. - * Since: 2.30 + * A graceful disconnect means that we can be sure that we successfully sent + * all the outstanding data to the other end, or get an error reported. + * However, it also means we have to wait for all the data to reach the + * other side and for it to acknowledge this by closing the socket, which may + * take a while. For this reason it is disabled by default. + * + * Since: 2.22 */ /** - * g_tls_password_new: - * @flags: the password flags - * @description: description of what the password is for + * g_tcp_wrapper_connection_get_base_io_stream: + * @conn: a #GTcpWrapperConnection * - * Create a new #GTlsPassword object. + * Get's @conn's base #GIOStream * - * Returns: (transfer full): The newly allocated password object + * Returns: (transfer none): @conn's base #GIOStream */ /** - * g_tls_password_set_description: - * @password: a #GTlsPassword object - * @description: The description of the password + * g_tcp_wrapper_connection_new: + * @base_io_stream: the #GIOStream to wrap + * @socket: the #GSocket associated with @base_io_stream * - * Set a description string about what the password will be used for. + * Wraps @base_io_stream and @socket together as a #GSocketConnection. * - * Since: 2.30 + * Returns: the new #GSocketConnection. + * Since: 2.28 */ /** - * g_tls_password_set_flags: - * @password: a #GTlsPassword object - * @flags: The flags about the password + * g_test_dbus_add_service_dir: + * @self: a #GTestDBus + * @path: path to a directory containing .service files * - * Set flags about the password. + * Add a path where dbus-daemon will look up .service files. This can't be + * called after g_test_dbus_up(). + */ + + +/** + * g_test_dbus_down: + * @self: a #GTestDBus * - * Since: 2.30 + * Stop the session bus started by g_test_dbus_up(). + * + * This will wait for the singleton returned by g_bus_get() or g_bus_get_sync() + * to be destroyed. This is done to ensure that the next unit test won't get a + * leaked singleton from this test. */ /** - * g_tls_password_set_value: - * @password: a #GTlsPassword object - * @value: (array length=length): the new password value - * @length: the length of the password, or -1 + * g_test_dbus_get_bus_address: + * @self: a #GTestDBus * - * Set the value for this password. The @value will be copied by the password - * object. + * Get the address on which dbus-daemon is running. If g_test_dbus_up() has not + * been called yet, %NULL is returned. This can be used with + * g_dbus_connection_new_for_address(). * - * Specify the @length, for a non-nul-terminated password. Pass -1 as - * @length if using a nul-terminated password, and @length will be - * calculated automatically. (Note that the terminating nul is not - * considered part of the password in this case.) + * Returns: (nullable): the address of the bus, or %NULL. + */ + + +/** + * g_test_dbus_get_flags: + * @self: a #GTestDBus * - * Since: 2.30 + * Get the flags of the #GTestDBus object. + * + * Returns: the value of #GTestDBus:flags property */ /** - * g_tls_password_set_value_full: (virtual set_value) - * @password: a #GTlsPassword object - * @value: (array length=length): the value for the password - * @length: the length of the password, or -1 - * @destroy: (nullable): a function to use to free the password. - * - * Provide the value for this password. - * - * The @value will be owned by the password object, and later freed using - * the @destroy function callback. + * g_test_dbus_new: + * @flags: a #GTestDBusFlags * - * Specify the @length, for a non-nul-terminated password. Pass -1 as - * @length if using a nul-terminated password, and @length will be - * calculated automatically. (Note that the terminating nul is not - * considered part of the password in this case.) + * Create a new #GTestDBus object. * - * Since: 2.30 + * Returns: (transfer full): a new #GTestDBus. */ /** - * g_tls_password_set_warning: - * @password: a #GTlsPassword object - * @warning: The user readable warning + * g_test_dbus_stop: + * @self: a #GTestDBus * - * Set a user readable translated warning. Usually this warning is a - * representation of the password flags returned from - * g_tls_password_get_flags(). + * Stop the session bus started by g_test_dbus_up(). * - * Since: 2.30 + * Unlike g_test_dbus_down(), this won't verify the #GDBusConnection + * singleton returned by g_bus_get() or g_bus_get_sync() is destroyed. Unit + * tests wanting to verify behaviour after the session bus has been stopped + * can use this function but should still call g_test_dbus_down() when done. */ /** - * g_tls_server_connection_new: - * @base_io_stream: the #GIOStream to wrap - * @certificate: (nullable): the default server certificate, or %NULL - * @error: #GError for error reporting, or %NULL to ignore. - * - * Creates a new #GTlsServerConnection wrapping @base_io_stream (which - * must have pollable input and output streams). + * g_test_dbus_unset: * - * See the documentation for #GTlsConnection:base-io-stream for restrictions - * on when application code can run operations on the @base_io_stream after - * this function has returned. + * Unset DISPLAY and DBUS_SESSION_BUS_ADDRESS env variables to ensure the test + * won't use user's session bus. * - * Returns: (transfer full) (type GTlsServerConnection): the new - * #GTlsServerConnection, or %NULL on error - * Since: 2.28 + * This is useful for unit tests that want to verify behaviour when no session + * bus is running. It is not necessary to call this if unit test already calls + * g_test_dbus_up() before acquiring the session bus. */ /** - * g_unix_connection_receive_credentials: - * @connection: A #GUnixConnection. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Receives credentials from the sending end of the connection. The - * sending end has to call g_unix_connection_send_credentials() (or - * similar) for this to work. + * g_test_dbus_up: + * @self: a #GTestDBus * - * As well as reading the credentials this also reads (and discards) a - * single byte from the stream, as this is required for credentials - * passing to work on some implementations. + * Start a dbus-daemon instance and set DBUS_SESSION_BUS_ADDRESS. After this + * call, it is safe for unit tests to start sending messages on the session bus. * - * Other ways to exchange credentials with a foreign peer includes the - * #GUnixCredentialsMessage type and g_socket_get_credentials() function. + * If this function is called from setup callback of g_test_add(), + * g_test_dbus_down() must be called in its teardown callback. * - * Returns: (transfer full): Received credentials on success (free with - * g_object_unref()), %NULL if @error is set. - * Since: 2.26 + * If this function is called from unit test's main(), then g_test_dbus_down() + * must be called after g_test_run(). */ /** - * g_unix_connection_receive_credentials_async: - * @connection: A #GUnixConnection. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied - * @user_data: (closure): the data to pass to callback function + * g_themed_icon_append_name: + * @icon: a #GThemedIcon + * @iconname: name of icon to append to list of icons from within @icon. * - * Asynchronously receive credentials. + * Append a name to the list of icons from within @icon. * - * For more details, see g_unix_connection_receive_credentials() which is - * the synchronous version of this call. + * Note that doing so invalidates the hash computed by prior calls + * to g_icon_hash(). + */ + + +/** + * g_themed_icon_get_names: + * @icon: a #GThemedIcon. * - * When the operation is finished, @callback will be called. You can then call - * g_unix_connection_receive_credentials_finish() to get the result of the operation. + * Gets the names of icons from within @icon. * - * Since: 2.32 + * Returns: (transfer none): a list of icon names. */ /** - * g_unix_connection_receive_credentials_finish: - * @connection: A #GUnixConnection. - * @result: a #GAsyncResult. - * @error: a #GError, or %NULL + * g_themed_icon_new: + * @iconname: a string containing an icon name. * - * Finishes an asynchronous receive credentials operation started with - * g_unix_connection_receive_credentials_async(). + * Creates a new themed icon for @iconname. * - * Returns: (transfer full): a #GCredentials, or %NULL on error. - * Free the returned object with g_object_unref(). - * Since: 2.32 + * Returns: (transfer full) (type GThemedIcon): a new #GThemedIcon. */ /** - * g_unix_connection_receive_fd: - * @connection: a #GUnixConnection - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore - * @error: (nullable): #GError for error reporting, or %NULL to ignore - * - * Receives a file descriptor from the sending end of the connection. - * The sending end has to call g_unix_connection_send_fd() for this - * to work. + * g_themed_icon_new_from_names: + * @iconnames: (array length=len): an array of strings containing icon names. + * @len: the length of the @iconnames array, or -1 if @iconnames is + * %NULL-terminated * - * As well as reading the fd this also reads a single byte from the - * stream, as this is required for fd passing to work on some - * implementations. + * Creates a new themed icon for @iconnames. * - * Returns: a file descriptor on success, -1 on error. - * Since: 2.22 + * Returns: (transfer full) (type GThemedIcon): a new #GThemedIcon */ /** - * g_unix_connection_send_credentials: - * @connection: A #GUnixConnection. - * @cancellable: (nullable): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * g_themed_icon_new_with_default_fallbacks: + * @iconname: a string containing an icon name * - * Passes the credentials of the current user the receiving side - * of the connection. The receiving end has to call - * g_unix_connection_receive_credentials() (or similar) to accept the - * credentials. + * Creates a new themed icon for @iconname, and all the names + * that can be created by shortening @iconname at '-' characters. * - * As well as sending the credentials this also writes a single NUL - * byte to the stream, as this is required for credentials passing to - * work on some implementations. + * In the following example, @icon1 and @icon2 are equivalent: + * |[ + * const char *names[] = { + * "gnome-dev-cdrom-audio", + * "gnome-dev-cdrom", + * "gnome-dev", + * "gnome" + * }; * - * Other ways to exchange credentials with a foreign peer includes the - * #GUnixCredentialsMessage type and g_socket_get_credentials() function. + * icon1 = g_themed_icon_new_from_names (names, 4); + * icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio"); + * ]| * - * Returns: %TRUE on success, %FALSE if @error is set. - * Since: 2.26 + * Returns: (transfer full) (type GThemedIcon): a new #GThemedIcon. */ /** - * g_unix_connection_send_credentials_async: - * @connection: A #GUnixConnection. - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied - * @user_data: (closure): the data to pass to callback function - * - * Asynchronously send credentials. + * g_themed_icon_prepend_name: + * @icon: a #GThemedIcon + * @iconname: name of icon to prepend to list of icons from within @icon. * - * For more details, see g_unix_connection_send_credentials() which is - * the synchronous version of this call. + * Prepend a name to the list of icons from within @icon. * - * When the operation is finished, @callback will be called. You can then call - * g_unix_connection_send_credentials_finish() to get the result of the operation. + * Note that doing so invalidates the hash computed by prior calls + * to g_icon_hash(). * - * Since: 2.32 + * Since: 2.18 */ /** - * g_unix_connection_send_credentials_finish: - * @connection: A #GUnixConnection. - * @result: a #GAsyncResult. - * @error: a #GError, or %NULL + * g_themed_icon_update_names: + * @themed: a #GThemedIcon. * - * Finishes an asynchronous send credentials operation started with - * g_unix_connection_send_credentials_async(). + * Update the actual icon name list, based on the requested names (from + * construction, or later added with g_themed_icon_prepend_name() and + * g_themed_icon_append_name()). + * The order of the list matters, indicating priority: + * - The first requested icon is first in priority. + * - If "use-default-fallbacks" is #TRUE, then it is followed by all its + * fallbacks (starting from top to lower context levels). + * - Then next requested icons, and optionally their fallbacks, follow. + * - Finally all the style variants (symbolic or regular, opposite to whatever + * is the requested style) follow in the same order. + * + * An icon is not added twice in the list if it was previously added. + * + * For instance, if requested names are: + * [ "some-icon-symbolic", "some-other-icon" ] + * and use-default-fallbacks is TRUE, the final name list shall be: + * [ "some-icon-symbolic", "some-symbolic", "some-other-icon", + * "some-other", "some", "some-icon", "some-other-icon-symbolic", + * "some-other-symbolic" ] * - * Returns: %TRUE if the operation was successful, otherwise %FALSE. - * Since: 2.32 + * Returns: (transfer full) (type GThemedIcon): a new #GThemedIcon */ /** - * g_unix_connection_send_fd: - * @connection: a #GUnixConnection - * @fd: a file descriptor - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. - * @error: (nullable): #GError for error reporting, or %NULL to ignore. - * - * Passes a file descriptor to the receiving side of the - * connection. The receiving end has to call g_unix_connection_receive_fd() - * to accept the file descriptor. + * g_threaded_socket_service_new: + * @max_threads: the maximal number of threads to execute concurrently + * handling incoming clients, -1 means no limit * - * As well as sending the fd this also writes a single byte to the - * stream, as this is required for fd passing to work on some - * implementations. + * Creates a new #GThreadedSocketService with no listeners. Listeners + * must be added with one of the #GSocketListener "add" methods. * - * Returns: a %TRUE on success, %NULL on error. + * Returns: a new #GSocketService. * Since: 2.22 */ /** - * g_unix_credentials_message_get_credentials: - * @message: A #GUnixCredentialsMessage. + * g_tls_backend_get_certificate_type: + * @backend: the #GTlsBackend * - * Gets the credentials stored in @message. + * Gets the #GType of @backend's #GTlsCertificate implementation. * - * Returns: (transfer none): A #GCredentials instance. Do not free, it is owned by @message. - * Since: 2.26 + * Returns: the #GType of @backend's #GTlsCertificate + * implementation. + * Since: 2.28 */ /** - * g_unix_credentials_message_is_supported: + * g_tls_backend_get_client_connection_type: + * @backend: the #GTlsBackend * - * Checks if passing #GCredentials on a #GSocket is supported on this platform. + * Gets the #GType of @backend's #GTlsClientConnection implementation. * - * Returns: %TRUE if supported, %FALSE otherwise - * Since: 2.26 + * Returns: the #GType of @backend's #GTlsClientConnection + * implementation. + * Since: 2.28 */ /** - * g_unix_credentials_message_new: + * g_tls_backend_get_default: * - * Creates a new #GUnixCredentialsMessage with credentials matching the current processes. + * Gets the default #GTlsBackend for the system. * - * Returns: a new #GUnixCredentialsMessage - * Since: 2.26 + * Returns: (transfer none): a #GTlsBackend + * Since: 2.28 */ /** - * g_unix_credentials_message_new_with_credentials: - * @credentials: A #GCredentials object. + * g_tls_backend_get_default_database: + * @backend: the #GTlsBackend * - * Creates a new #GUnixCredentialsMessage holding @credentials. + * Gets the default #GTlsDatabase used to verify TLS connections. * - * Returns: a new #GUnixCredentialsMessage - * Since: 2.26 + * Returns: (transfer full): the default database, which should be + * unreffed when done. + * Since: 2.30 */ /** - * g_unix_fd_list_append: - * @list: a #GUnixFDList - * @fd: a valid open file descriptor - * @error: a #GError pointer - * - * Adds a file descriptor to @list. - * - * The file descriptor is duplicated using dup(). You keep your copy - * of the descriptor and the copy contained in @list will be closed - * when @list is finalized. - * - * A possible cause of failure is exceeding the per-process or - * system-wide file descriptor limit. + * g_tls_backend_get_dtls_client_connection_type: + * @backend: the #GTlsBackend * - * The index of the file descriptor in the list is returned. If you use - * this index with g_unix_fd_list_get() then you will receive back a - * duplicated copy of the same file descriptor. + * Gets the #GType of @backend’s #GDtlsClientConnection implementation. * - * Returns: the index of the appended fd in case of success, else -1 - * (and @error is set) - * Since: 2.24 + * Returns: the #GType of @backend’s #GDtlsClientConnection + * implementation, or %G_TYPE_INVALID if this backend doesn’t support DTLS. + * Since: 2.48 */ /** - * g_unix_fd_list_get: - * @list: a #GUnixFDList - * @index_: the index into the list - * @error: a #GError pointer - * - * Gets a file descriptor out of @list. - * - * @index_ specifies the index of the file descriptor to get. It is a - * programmer error for @index_ to be out of range; see - * g_unix_fd_list_get_length(). - * - * The file descriptor is duplicated using dup() and set as - * close-on-exec before being returned. You must call close() on it - * when you are done. + * g_tls_backend_get_dtls_server_connection_type: + * @backend: the #GTlsBackend * - * A possible cause of failure is exceeding the per-process or - * system-wide file descriptor limit. + * Gets the #GType of @backend’s #GDtlsServerConnection implementation. * - * Returns: the file descriptor, or -1 in case of error - * Since: 2.24 + * Returns: the #GType of @backend’s #GDtlsServerConnection + * implementation, or %G_TYPE_INVALID if this backend doesn’t support DTLS. + * Since: 2.48 */ /** - * g_unix_fd_list_get_length: - * @list: a #GUnixFDList + * g_tls_backend_get_file_database_type: + * @backend: the #GTlsBackend * - * Gets the length of @list (ie: the number of file descriptors - * contained within). + * Gets the #GType of @backend's #GTlsFileDatabase implementation. * - * Returns: the length of @list - * Since: 2.24 + * Returns: the #GType of backend's #GTlsFileDatabase implementation. + * Since: 2.30 */ /** - * g_unix_fd_list_new: + * g_tls_backend_get_server_connection_type: + * @backend: the #GTlsBackend * - * Creates a new #GUnixFDList containing no file descriptors. + * Gets the #GType of @backend's #GTlsServerConnection implementation. * - * Returns: a new #GUnixFDList - * Since: 2.24 + * Returns: the #GType of @backend's #GTlsServerConnection + * implementation. + * Since: 2.28 */ /** - * g_unix_fd_list_new_from_array: - * @fds: (array length=n_fds): the initial list of file descriptors - * @n_fds: the length of #fds, or -1 + * g_tls_backend_set_default_database: + * @backend: the #GTlsBackend + * @database: (nullable): the #GTlsDatabase * - * Creates a new #GUnixFDList containing the file descriptors given in - * @fds. The file descriptors become the property of the new list and - * may no longer be used by the caller. The array itself is owned by - * the caller. + * Set the default #GTlsDatabase used to verify TLS connections * - * Each file descriptor in the array should be set to close-on-exec. + * Any subsequent call to g_tls_backend_get_default_database() will return + * the database set in this call. Existing databases and connections are not + * modified. * - * If @n_fds is -1 then @fds must be terminated with -1. + * Setting a %NULL default database will reset to using the system default + * database as if g_tls_backend_set_default_database() had never been called. * - * Returns: a new #GUnixFDList - * Since: 2.24 + * Since: 2.60 */ /** - * g_unix_fd_list_peek_fds: - * @list: a #GUnixFDList - * @length: (out) (optional): pointer to the length of the returned - * array, or %NULL - * - * Returns the array of file descriptors that is contained in this - * object. - * - * After this call, the descriptors remain the property of @list. The - * caller must not close them and must not free the array. The array is - * valid only until @list is changed in any way. - * - * If @length is non-%NULL then it is set to the number of file - * descriptors in the returned array. The returned array is also - * terminated with -1. + * g_tls_backend_supports_dtls: + * @backend: the #GTlsBackend * - * This function never returns %NULL. In case there are no file - * descriptors contained in @list, an empty array is returned. + * Checks if DTLS is supported. DTLS support may not be available even if TLS + * support is available, and vice-versa. * - * Returns: (array length=length) (transfer none): an array of file - * descriptors - * Since: 2.24 + * Returns: whether DTLS is supported + * Since: 2.48 */ /** - * g_unix_fd_list_steal_fds: - * @list: a #GUnixFDList - * @length: (out) (optional): pointer to the length of the returned - * array, or %NULL - * - * Returns the array of file descriptors that is contained in this - * object. - * - * After this call, the descriptors are no longer contained in - * @list. Further calls will return an empty list (unless more - * descriptors have been added). + * g_tls_backend_supports_tls: + * @backend: the #GTlsBackend * - * The return result of this function must be freed with g_free(). - * The caller is also responsible for closing all of the file - * descriptors. The file descriptors in the array are set to - * close-on-exec. + * Checks if TLS is supported; if this returns %FALSE for the default + * #GTlsBackend, it means no "real" TLS backend is available. * - * If @length is non-%NULL then it is set to the number of file - * descriptors in the returned array. The returned array is also - * terminated with -1. + * Returns: whether or not TLS is supported + * Since: 2.28 + */ + + +/** + * g_tls_certificate_get_issuer: + * @cert: a #GTlsCertificate * - * This function never returns %NULL. In case there are no file - * descriptors contained in @list, an empty array is returned. + * Gets the #GTlsCertificate representing @cert's issuer, if known * - * Returns: (array length=length) (transfer full): an array of file - * descriptors - * Since: 2.24 + * Returns: (transfer none): The certificate of @cert's issuer, + * or %NULL if @cert is self-signed or signed with an unknown + * certificate. + * Since: 2.28 */ /** - * g_unix_fd_message_append_fd: - * @message: a #GUnixFDMessage - * @fd: a valid open file descriptor - * @error: a #GError pointer + * g_tls_certificate_is_same: + * @cert_one: first certificate to compare + * @cert_two: second certificate to compare * - * Adds a file descriptor to @message. + * Check if two #GTlsCertificate objects represent the same certificate. + * The raw DER byte data of the two certificates are checked for equality. + * This has the effect that two certificates may compare equal even if + * their #GTlsCertificate:issuer, #GTlsCertificate:private-key, or + * #GTlsCertificate:private-key-pem properties differ. * - * The file descriptor is duplicated using dup(). You keep your copy - * of the descriptor and the copy contained in @message will be closed - * when @message is finalized. + * Returns: whether the same or not + * Since: 2.34 + */ + + +/** + * g_tls_certificate_list_new_from_file: + * @file: (type filename): file containing PEM-encoded certificates to import + * @error: #GError for error reporting, or %NULL to ignore. * - * A possible cause of failure is exceeding the per-process or - * system-wide file descriptor limit. + * Creates one or more #GTlsCertificates from the PEM-encoded + * data in @file. If @file cannot be read or parsed, the function will + * return %NULL and set @error. If @file does not contain any + * PEM-encoded certificates, this will return an empty list and not + * set @error. * - * Returns: %TRUE in case of success, else %FALSE (and @error is set) - * Since: 2.22 + * Returns: (element-type Gio.TlsCertificate) (transfer full): a + * #GList containing #GTlsCertificate objects. You must free the list + * and its contents when you are done with it. + * Since: 2.28 */ /** - * g_unix_fd_message_get_fd_list: - * @message: a #GUnixFDMessage + * g_tls_certificate_new_from_file: + * @file: (type filename): file containing a PEM-encoded certificate to import + * @error: #GError for error reporting, or %NULL to ignore. * - * Gets the #GUnixFDList contained in @message. This function does not - * return a reference to the caller, but the returned list is valid for - * the lifetime of @message. + * Creates a #GTlsCertificate from the PEM-encoded data in @file. The + * returned certificate will be the first certificate found in @file. As + * of GLib 2.44, if @file contains more certificates it will try to load + * a certificate chain. All certificates will be verified in the order + * found (top-level certificate should be the last one in the file) and + * the #GTlsCertificate:issuer property of each certificate will be set + * accordingly if the verification succeeds. If any certificate in the + * chain cannot be verified, the first certificate in the file will + * still be returned. * - * Returns: (transfer none): the #GUnixFDList from @message - * Since: 2.24 + * If @file cannot be read or parsed, the function will return %NULL and + * set @error. Otherwise, this behaves like + * g_tls_certificate_new_from_pem(). + * + * Returns: the new certificate, or %NULL on error + * Since: 2.28 */ /** - * g_unix_fd_message_new: + * g_tls_certificate_new_from_files: + * @cert_file: (type filename): file containing one or more PEM-encoded + * certificates to import + * @key_file: (type filename): file containing a PEM-encoded private key + * to import + * @error: #GError for error reporting, or %NULL to ignore. * - * Creates a new #GUnixFDMessage containing an empty file descriptor - * list. + * Creates a #GTlsCertificate from the PEM-encoded data in @cert_file + * and @key_file. The returned certificate will be the first certificate + * found in @cert_file. As of GLib 2.44, if @cert_file contains more + * certificates it will try to load a certificate chain. All + * certificates will be verified in the order found (top-level + * certificate should be the last one in the file) and the + * #GTlsCertificate:issuer property of each certificate will be set + * accordingly if the verification succeeds. If any certificate in the + * chain cannot be verified, the first certificate in the file will + * still be returned. * - * Returns: a new #GUnixFDMessage - * Since: 2.22 + * If either file cannot be read or parsed, the function will return + * %NULL and set @error. Otherwise, this behaves like + * g_tls_certificate_new_from_pem(). + * + * Returns: the new certificate, or %NULL on error + * Since: 2.28 */ /** - * g_unix_fd_message_new_with_fd_list: - * @fd_list: a #GUnixFDList + * g_tls_certificate_new_from_pem: + * @data: PEM-encoded certificate data + * @length: the length of @data, or -1 if it's 0-terminated. + * @error: #GError for error reporting, or %NULL to ignore. * - * Creates a new #GUnixFDMessage containing @list. + * Creates a #GTlsCertificate from the PEM-encoded data in @data. If + * @data includes both a certificate and a private key, then the + * returned certificate will include the private key data as well. (See + * the #GTlsCertificate:private-key-pem property for information about + * supported formats.) + * + * The returned certificate will be the first certificate found in + * @data. As of GLib 2.44, if @data contains more certificates it will + * try to load a certificate chain. All certificates will be verified in + * the order found (top-level certificate should be the last one in the + * file) and the #GTlsCertificate:issuer property of each certificate + * will be set accordingly if the verification succeeds. If any + * certificate in the chain cannot be verified, the first certificate in + * the file will still be returned. * - * Returns: a new #GUnixFDMessage - * Since: 2.24 + * Returns: the new certificate, or %NULL if @data is invalid + * Since: 2.28 */ /** - * g_unix_fd_message_steal_fds: - * @message: a #GUnixFDMessage - * @length: (out) (optional): pointer to the length of the returned - * array, or %NULL - * - * Returns the array of file descriptors that is contained in this - * object. + * g_tls_certificate_verify: + * @cert: a #GTlsCertificate + * @identity: (nullable): the expected peer identity + * @trusted_ca: (nullable): the certificate of a trusted authority * - * After this call, the descriptors are no longer contained in - * @message. Further calls will return an empty list (unless more - * descriptors have been added). + * This verifies @cert and returns a set of #GTlsCertificateFlags + * indicating any problems found with it. This can be used to verify a + * certificate outside the context of making a connection, or to + * check a certificate against a CA that is not part of the system + * CA database. * - * The return result of this function must be freed with g_free(). - * The caller is also responsible for closing all of the file - * descriptors. + * If @identity is not %NULL, @cert's name(s) will be compared against + * it, and %G_TLS_CERTIFICATE_BAD_IDENTITY will be set in the return + * value if it does not match. If @identity is %NULL, that bit will + * never be set in the return value. * - * If @length is non-%NULL then it is set to the number of file - * descriptors in the returned array. The returned array is also - * terminated with -1. + * If @trusted_ca is not %NULL, then @cert (or one of the certificates + * in its chain) must be signed by it, or else + * %G_TLS_CERTIFICATE_UNKNOWN_CA will be set in the return value. If + * @trusted_ca is %NULL, that bit will never be set in the return + * value. * - * This function never returns %NULL. In case there are no file - * descriptors contained in @message, an empty array is returned. + * (All other #GTlsCertificateFlags values will always be set or unset + * as appropriate.) * - * Returns: (array length=length) (transfer full): an array of file - * descriptors - * Since: 2.22 + * Returns: the appropriate #GTlsCertificateFlags + * Since: 2.28 */ /** - * g_unix_input_stream_get_close_fd: - * @stream: a #GUnixInputStream + * g_tls_client_connection_copy_session_state: + * @conn: a #GTlsClientConnection + * @source: a #GTlsClientConnection * - * Returns whether the file descriptor of @stream will be - * closed when the stream is closed. + * Possibly copies session state from one connection to another, for use + * in TLS session resumption. This is not normally needed, but may be + * used when the same session needs to be used between different + * endpoints, as is required by some protocols, such as FTP over TLS. + * @source should have already completed a handshake and, since TLS 1.3, + * it should have been used to read data at least once. @conn should not + * have completed a handshake. + * + * It is not possible to know whether a call to this function will + * actually do anything. Because session resumption is normally used + * only for performance benefit, the TLS backend might not implement + * this function. Even if implemented, it may not actually succeed in + * allowing @conn to resume @source's TLS session, because the server + * may not have sent a session resumption token to @source, or it may + * refuse to accept the token from @conn. There is no way to know + * whether a call to this function is actually successful. + * + * Using this function is not required to benefit from session + * resumption. If the TLS backend supports session resumption, the + * session will be resumed automatically if it is possible to do so + * without weakening the privacy guarantees normally provided by TLS, + * without need to call this function. For example, with TLS 1.3, + * a session ticket will be automatically copied from any + * #GTlsClientConnection that has previously received session tickets + * from the server, provided a ticket is available that has not + * previously been used for session resumption, since session ticket + * reuse would be a privacy weakness. Using this function causes the + * ticket to be copied without regard for privacy considerations. * - * Returns: %TRUE if the file descriptor is closed when done - * Since: 2.20 + * Since: 2.46 */ /** - * g_unix_input_stream_get_fd: - * @stream: a #GUnixInputStream + * g_tls_client_connection_get_accepted_cas: + * @conn: the #GTlsClientConnection * - * Return the UNIX file descriptor that the stream reads from. + * Gets the list of distinguished names of the Certificate Authorities + * that the server will accept certificates from. This will be set + * during the TLS handshake if the server requests a certificate. + * Otherwise, it will be %NULL. * - * Returns: The file descriptor of @stream - * Since: 2.20 + * Each item in the list is a #GByteArray which contains the complete + * subject DN of the certificate authority. + * + * Returns: (element-type GByteArray) (transfer full): the list of + * CA DNs. You should unref each element with g_byte_array_unref() and then + * the free the list with g_list_free(). + * Since: 2.28 */ /** - * g_unix_input_stream_new: - * @fd: a UNIX file descriptor - * @close_fd: %TRUE to close the file descriptor when done - * - * Creates a new #GUnixInputStream for the given @fd. + * g_tls_client_connection_get_server_identity: + * @conn: the #GTlsClientConnection * - * If @close_fd is %TRUE, the file descriptor will be closed - * when the stream is closed. + * Gets @conn's expected server identity * - * Returns: a new #GUnixInputStream + * Returns: (transfer none): a #GSocketConnectable describing the + * expected server identity, or %NULL if the expected identity is not + * known. + * Since: 2.28 */ /** - * g_unix_input_stream_set_close_fd: - * @stream: a #GUnixInputStream - * @close_fd: %TRUE to close the file descriptor when done + * g_tls_client_connection_get_use_ssl3: + * @conn: the #GTlsClientConnection * - * Sets whether the file descriptor of @stream shall be closed - * when the stream is closed. + * SSL 3.0 is no longer supported. See + * g_tls_client_connection_set_use_ssl3() for details. * - * Since: 2.20 + * Returns: %FALSE + * Since: 2.28 + * Deprecated: 2.56: SSL 3.0 is insecure. */ /** - * g_unix_is_mount_path_system_internal: - * @mount_path: (type filename): a mount path, e.g. `/media/disk` or `/usr` + * g_tls_client_connection_get_validation_flags: + * @conn: the #GTlsClientConnection * - * Determines if @mount_path is considered an implementation of the - * OS. This is primarily used for hiding mountable and mounted volumes - * that only are used in the OS and has little to no relevance to the - * casual user. + * Gets @conn's validation flags * - * Returns: %TRUE if @mount_path is considered an implementation detail - * of the OS. + * Returns: the validation flags + * Since: 2.28 */ /** - * g_unix_is_system_device_path: - * @device_path: a device path, e.g. `/dev/loop0` or `nfsd` + * g_tls_client_connection_new: + * @base_io_stream: the #GIOStream to wrap + * @server_identity: (nullable): the expected identity of the server + * @error: #GError for error reporting, or %NULL to ignore. * - * Determines if @device_path is considered a block device path which is only - * used in implementation of the OS. This is primarily used for hiding - * mounted volumes that are intended as APIs for programs to read, and system - * administrators at a shell; rather than something that should, for example, - * appear in a GUI. For example, the Linux `/proc` filesystem. + * Creates a new #GTlsClientConnection wrapping @base_io_stream (which + * must have pollable input and output streams) which is assumed to + * communicate with the server identified by @server_identity. * - * The list of device paths considered ‘system’ ones may change over time. + * See the documentation for #GTlsConnection:base-io-stream for restrictions + * on when application code can run operations on the @base_io_stream after + * this function has returned. * - * Returns: %TRUE if @device_path is considered an implementation detail of - * the OS. - * Since: 2.56 + * Returns: (transfer full) (type GTlsClientConnection): the new + * #GTlsClientConnection, or %NULL on error + * Since: 2.28 */ /** - * g_unix_is_system_fs_type: - * @fs_type: a file system type, e.g. `procfs` or `tmpfs` - * - * Determines if @fs_type is considered a type of file system which is only - * used in implementation of the OS. This is primarily used for hiding - * mounted volumes that are intended as APIs for programs to read, and system - * administrators at a shell; rather than something that should, for example, - * appear in a GUI. For example, the Linux `/proc` filesystem. + * g_tls_client_connection_set_server_identity: + * @conn: the #GTlsClientConnection + * @identity: a #GSocketConnectable describing the expected server identity * - * The list of file system types considered ‘system’ ones may change over time. + * Sets @conn's expected server identity, which is used both to tell + * servers on virtual hosts which certificate to present, and also + * to let @conn know what name to look for in the certificate when + * performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled. * - * Returns: %TRUE if @fs_type is considered an implementation detail of the OS. - * Since: 2.56 + * Since: 2.28 */ /** - * g_unix_mount_at: - * @mount_path: (type filename): path for a possible unix mount. - * @time_read: (out) (optional): guint64 to contain a timestamp. + * g_tls_client_connection_set_use_ssl3: + * @conn: the #GTlsClientConnection + * @use_ssl3: a #gboolean, ignored * - * Gets a #GUnixMountEntry for a given mount path. If @time_read - * is set, it will be filled with a unix timestamp for checking - * if the mounts have changed since with g_unix_mounts_changed_since(). + * Since GLib 2.42.1, SSL 3.0 is no longer supported. * - * Returns: (transfer full): a #GUnixMountEntry. - */ - - -/** - * g_unix_mount_compare: - * @mount1: first #GUnixMountEntry to compare. - * @mount2: second #GUnixMountEntry to compare. + * From GLib 2.42.1 through GLib 2.62, this function could be used to + * force use of TLS 1.0, the lowest-supported TLS protocol version at + * the time. In the past, this was needed to connect to broken TLS + * servers that exhibited protocol version intolerance. Such servers + * are no longer common, and using TLS 1.0 is no longer considered + * acceptable. * - * Compares two unix mounts. + * Since GLib 2.64, this function does nothing. * - * Returns: 1, 0 or -1 if @mount1 is greater than, equal to, - * or less than @mount2, respectively. + * Since: 2.28 + * Deprecated: 2.56: SSL 3.0 is insecure. */ /** - * g_unix_mount_copy: - * @mount_entry: a #GUnixMountEntry. + * g_tls_client_connection_set_validation_flags: + * @conn: the #GTlsClientConnection + * @flags: the #GTlsCertificateFlags to use * - * Makes a copy of @mount_entry. + * Sets @conn's validation flags, to override the default set of + * checks performed when validating a server certificate. By default, + * %G_TLS_CERTIFICATE_VALIDATE_ALL is used. * - * Returns: (transfer full): a new #GUnixMountEntry - * Since: 2.54 + * Since: 2.28 */ /** - * g_unix_mount_for: - * @file_path: (type filename): file path on some unix mount. - * @time_read: (out) (optional): guint64 to contain a timestamp. + * g_tls_connection_emit_accept_certificate: + * @conn: a #GTlsConnection + * @peer_cert: the peer's #GTlsCertificate + * @errors: the problems with @peer_cert * - * Gets a #GUnixMountEntry for a given file path. If @time_read - * is set, it will be filled with a unix timestamp for checking - * if the mounts have changed since with g_unix_mounts_changed_since(). + * Used by #GTlsConnection implementations to emit the + * #GTlsConnection::accept-certificate signal. * - * Returns: (transfer full): a #GUnixMountEntry. - * Since: 2.52 + * Returns: %TRUE if one of the signal handlers has returned + * %TRUE to accept @peer_cert + * Since: 2.28 */ /** - * g_unix_mount_free: - * @mount_entry: a #GUnixMountEntry. + * g_tls_connection_get_certificate: + * @conn: a #GTlsConnection * - * Frees a unix mount. + * Gets @conn's certificate, as set by + * g_tls_connection_set_certificate(). + * + * Returns: (transfer none): @conn's certificate, or %NULL + * Since: 2.28 */ /** - * g_unix_mount_get_device_path: - * @mount_entry: a #GUnixMount. + * g_tls_connection_get_database: + * @conn: a #GTlsConnection * - * Gets the device path for a unix mount. + * Gets the certificate database that @conn uses to verify + * peer certificates. See g_tls_connection_set_database(). * - * Returns: (type filename): a string containing the device path. + * Returns: (transfer none): the certificate database that @conn uses or %NULL + * Since: 2.30 */ /** - * g_unix_mount_get_fs_type: - * @mount_entry: a #GUnixMount. + * g_tls_connection_get_interaction: + * @conn: a connection * - * Gets the filesystem type for the unix mount. + * Get the object that will be used to interact with the user. It will be used + * for things like prompting the user for passwords. If %NULL is returned, then + * no user interaction will occur for this connection. * - * Returns: a string containing the file system type. + * Returns: (transfer none): The interaction object. + * Since: 2.30 */ /** - * g_unix_mount_get_mount_path: - * @mount_entry: input #GUnixMountEntry to get the mount path for. + * g_tls_connection_get_negotiated_protocol: + * @conn: a #GTlsConnection * - * Gets the mount path for a unix mount. + * Gets the name of the application-layer protocol negotiated during + * the handshake. * - * Returns: (type filename): the mount path for @mount_entry. + * If the peer did not use the ALPN extension, or did not advertise a + * protocol that matched one of @conn's protocols, or the TLS backend + * does not support ALPN, then this will be %NULL. See + * g_tls_connection_set_advertised_protocols(). + * + * Returns: (nullable): the negotiated protocol, or %NULL + * Since: 2.60 */ /** - * g_unix_mount_guess_can_eject: - * @mount_entry: a #GUnixMountEntry + * g_tls_connection_get_peer_certificate: + * @conn: a #GTlsConnection * - * Guesses whether a Unix mount can be ejected. + * Gets @conn's peer's certificate after the handshake has completed. + * (It is not set during the emission of + * #GTlsConnection::accept-certificate.) * - * Returns: %TRUE if @mount_entry is deemed to be ejectable. + * Returns: (transfer none): @conn's peer's certificate, or %NULL + * Since: 2.28 */ /** - * g_unix_mount_guess_icon: - * @mount_entry: a #GUnixMountEntry + * g_tls_connection_get_peer_certificate_errors: + * @conn: a #GTlsConnection * - * Guesses the icon of a Unix mount. + * Gets the errors associated with validating @conn's peer's + * certificate, after the handshake has completed. (It is not set + * during the emission of #GTlsConnection::accept-certificate.) * - * Returns: (transfer full): a #GIcon + * Returns: @conn's peer's certificate errors + * Since: 2.28 */ /** - * g_unix_mount_guess_name: - * @mount_entry: a #GUnixMountEntry + * g_tls_connection_get_rehandshake_mode: + * @conn: a #GTlsConnection * - * Guesses the name of a Unix mount. - * The result is a translated string. + * Gets @conn rehandshaking mode. See + * g_tls_connection_set_rehandshake_mode() for details. * - * Returns: A newly allocated string that must - * be freed with g_free() + * Returns: %G_TLS_REHANDSHAKE_SAFELY + * Since: 2.28 + * Deprecated: 2.60.: Changing the rehandshake mode is no longer + * required for compatibility. Also, rehandshaking has been removed + * from the TLS protocol in TLS 1.3. */ /** - * g_unix_mount_guess_should_display: - * @mount_entry: a #GUnixMountEntry + * g_tls_connection_get_require_close_notify: + * @conn: a #GTlsConnection * - * Guesses whether a Unix mount should be displayed in the UI. + * Tests whether or not @conn expects a proper TLS close notification + * when the connection is closed. See + * g_tls_connection_set_require_close_notify() for details. * - * Returns: %TRUE if @mount_entry is deemed to be displayable. + * Returns: %TRUE if @conn requires a proper TLS close + * notification. + * Since: 2.28 */ /** - * g_unix_mount_guess_symbolic_icon: - * @mount_entry: a #GUnixMountEntry + * g_tls_connection_get_use_system_certdb: + * @conn: a #GTlsConnection * - * Guesses the symbolic icon of a Unix mount. + * Gets whether @conn uses the system certificate database to verify + * peer certificates. See g_tls_connection_set_use_system_certdb(). * - * Returns: (transfer full): a #GIcon - * Since: 2.34 + * Returns: whether @conn uses the system certificate database + * Deprecated: 2.30: Use g_tls_connection_get_database() instead */ /** - * g_unix_mount_guess_type: - * @mount_entry: a #GUnixMount. + * g_tls_connection_handshake: + * @conn: a #GTlsConnection + * @cancellable: (nullable): a #GCancellable, or %NULL + * @error: a #GError, or %NULL * - * Guesses the type of a unix mount. If the mount type cannot be - * determined, returns %G_UNIX_MOUNT_TYPE_UNKNOWN. + * Attempts a TLS handshake on @conn. * - * Returns: a #GUnixMountType. - */ - - -/** - * g_unix_mount_is_readonly: - * @mount_entry: a #GUnixMount. + * On the client side, it is never necessary to call this method; + * although the connection needs to perform a handshake after + * connecting (or after sending a "STARTTLS"-type command), + * #GTlsConnection will handle this for you automatically when you try + * to send or receive data on the connection. You can call + * g_tls_connection_handshake() manually if you want to know whether + * the initial handshake succeeded or failed (as opposed to just + * immediately trying to use @conn to read or write, in which case, + * if it fails, it may not be possible to tell if it failed before or + * after completing the handshake), but beware that servers may reject + * client authentication after the handshake has completed, so a + * successful handshake does not indicate the connection will be usable. * - * Checks if a unix mount is mounted read only. + * Likewise, on the server side, although a handshake is necessary at + * the beginning of the communication, you do not need to call this + * function explicitly unless you want clearer error reporting. * - * Returns: %TRUE if @mount_entry is read only. + * Previously, calling g_tls_connection_handshake() after the initial + * handshake would trigger a rehandshake; however, this usage was + * deprecated in GLib 2.60 because rehandshaking was removed from the + * TLS protocol in TLS 1.3. Since GLib 2.64, calling this function after + * the initial handshake will no longer do anything. + * + * When using a #GTlsConnection created by #GSocketClient, the + * #GSocketClient performs the initial handshake, so calling this + * function manually is not recommended. + * + * #GTlsConnection::accept_certificate may be emitted during the + * handshake. + * + * Returns: success or failure + * Since: 2.28 */ /** - * g_unix_mount_is_system_internal: - * @mount_entry: a #GUnixMount. - * - * Checks if a Unix mount is a system mount. This is the Boolean OR of - * g_unix_is_system_fs_type(), g_unix_is_system_device_path() and - * g_unix_is_mount_path_system_internal() on @mount_entry’s properties. + * g_tls_connection_handshake_async: + * @conn: a #GTlsConnection + * @io_priority: the [I/O priority][io-priority] of the request + * @cancellable: (nullable): a #GCancellable, or %NULL + * @callback: callback to call when the handshake is complete + * @user_data: the data to pass to the callback function * - * The definition of what a ‘system’ mount entry is may change over time as new - * file system types and device paths are ignored. + * Asynchronously performs a TLS handshake on @conn. See + * g_tls_connection_handshake() for more information. * - * Returns: %TRUE if the unix mount is for a system path. + * Since: 2.28 */ /** - * g_unix_mount_monitor_get: - * - * Gets the #GUnixMountMonitor for the current thread-default main - * context. - * - * The mount monitor can be used to monitor for changes to the list of - * mounted filesystems as well as the list of mount points (ie: fstab - * entries). + * g_tls_connection_handshake_finish: + * @conn: a #GTlsConnection + * @result: a #GAsyncResult. + * @error: a #GError pointer, or %NULL * - * You must only call g_object_unref() on the return value from under - * the same main context as you called this function. + * Finish an asynchronous TLS handshake operation. See + * g_tls_connection_handshake() for more information. * - * Returns: (transfer full): the #GUnixMountMonitor. - * Since: 2.44 + * Returns: %TRUE on success, %FALSE on failure, in which + * case @error will be set. + * Since: 2.28 */ /** - * g_unix_mount_monitor_new: + * g_tls_connection_set_advertised_protocols: + * @conn: a #GTlsConnection + * @protocols: (array zero-terminated=1) (nullable): a %NULL-terminated + * array of ALPN protocol names (eg, "http/1.1", "h2"), or %NULL * - * Deprecated alias for g_unix_mount_monitor_get(). + * Sets the list of application-layer protocols to advertise that the + * caller is willing to speak on this connection. The + * Application-Layer Protocol Negotiation (ALPN) extension will be + * used to negotiate a compatible protocol with the peer; use + * g_tls_connection_get_negotiated_protocol() to find the negotiated + * protocol after the handshake. Specifying %NULL for the the value + * of @protocols will disable ALPN negotiation. * - * This function was never a true constructor, which is why it was - * renamed. + * See [IANA TLS ALPN Protocol IDs](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids) + * for a list of registered protocol IDs. * - * Returns: a #GUnixMountMonitor. - * Deprecated: 2.44: Use g_unix_mount_monitor_get() instead. + * Since: 2.60 */ /** - * g_unix_mount_monitor_set_rate_limit: - * @mount_monitor: a #GUnixMountMonitor - * @limit_msec: a integer with the limit in milliseconds to - * poll for changes. + * g_tls_connection_set_certificate: + * @conn: a #GTlsConnection + * @certificate: the certificate to use for @conn * - * This function does nothing. + * This sets the certificate that @conn will present to its peer + * during the TLS handshake. For a #GTlsServerConnection, it is + * mandatory to set this, and that will normally be done at construct + * time. * - * Before 2.44, this was a partially-effective way of controlling the - * rate at which events would be reported under some uncommon - * circumstances. Since @mount_monitor is a singleton, it also meant - * that calling this function would have side effects for other users of - * the monitor. + * For a #GTlsClientConnection, this is optional. If a handshake fails + * with %G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server + * requires a certificate, and if you try connecting again, you should + * call this method first. You can call + * g_tls_client_connection_get_accepted_cas() on the failed connection + * to get a list of Certificate Authorities that the server will + * accept certificates from. * - * Since: 2.18 - * Deprecated: 2.44: This function does nothing. Don't call it. + * (It is also possible that a server will allow the connection with + * or without a certificate; in that case, if you don't provide a + * certificate, you can tell that the server requested one by the fact + * that g_tls_client_connection_get_accepted_cas() will return + * non-%NULL.) + * + * Since: 2.28 */ /** - * g_unix_mount_point_compare: - * @mount1: a #GUnixMount. - * @mount2: a #GUnixMount. + * g_tls_connection_set_database: + * @conn: a #GTlsConnection + * @database: a #GTlsDatabase * - * Compares two unix mount points. + * Sets the certificate database that is used to verify peer certificates. + * This is set to the default database by default. See + * g_tls_backend_get_default_database(). If set to %NULL, then + * peer certificate validation will always set the + * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning + * #GTlsConnection::accept-certificate will always be emitted on + * client-side connections, unless that bit is not set in + * #GTlsClientConnection:validation-flags). * - * Returns: 1, 0 or -1 if @mount1 is greater than, equal to, - * or less than @mount2, respectively. + * Since: 2.30 */ /** - * g_unix_mount_point_copy: - * @mount_point: a #GUnixMountPoint. + * g_tls_connection_set_interaction: + * @conn: a connection + * @interaction: (nullable): an interaction object, or %NULL * - * Makes a copy of @mount_point. + * Set the object that will be used to interact with the user. It will be used + * for things like prompting the user for passwords. * - * Returns: (transfer full): a new #GUnixMountPoint - * Since: 2.54 - */ - - -/** - * g_unix_mount_point_free: - * @mount_point: unix mount point to free. + * The @interaction argument will normally be a derived subclass of + * #GTlsInteraction. %NULL can also be provided if no user interaction + * should occur for this connection. * - * Frees a unix mount point. + * Since: 2.30 */ /** - * g_unix_mount_point_get_device_path: - * @mount_point: a #GUnixMountPoint. + * g_tls_connection_set_rehandshake_mode: + * @conn: a #GTlsConnection + * @mode: the rehandshaking mode * - * Gets the device path for a unix mount point. + * Since GLib 2.64, changing the rehandshake mode is no longer supported + * and will have no effect. With TLS 1.3, rehandshaking has been removed from + * the TLS protocol, replaced by separate post-handshake authentication and + * rekey operations. * - * Returns: (type filename): a string containing the device path. + * Since: 2.28 + * Deprecated: 2.60.: Changing the rehandshake mode is no longer + * required for compatibility. Also, rehandshaking has been removed + * from the TLS protocol in TLS 1.3. */ /** - * g_unix_mount_point_get_fs_type: - * @mount_point: a #GUnixMountPoint. + * g_tls_connection_set_require_close_notify: + * @conn: a #GTlsConnection + * @require_close_notify: whether or not to require close notification * - * Gets the file system type for the mount point. + * Sets whether or not @conn expects a proper TLS close notification + * before the connection is closed. If this is %TRUE (the default), + * then @conn will expect to receive a TLS close notification from its + * peer before the connection is closed, and will return a + * %G_TLS_ERROR_EOF error if the connection is closed without proper + * notification (since this may indicate a network error, or + * man-in-the-middle attack). * - * Returns: a string containing the file system type. - */ - - -/** - * g_unix_mount_point_get_mount_path: - * @mount_point: a #GUnixMountPoint. + * In some protocols, the application will know whether or not the + * connection was closed cleanly based on application-level data + * (because the application-level data includes a length field, or is + * somehow self-delimiting); in this case, the close notify is + * redundant and sometimes omitted. (TLS 1.1 explicitly allows this; + * in TLS 1.0 it is technically an error, but often done anyway.) You + * can use g_tls_connection_set_require_close_notify() to tell @conn + * to allow an "unannounced" connection close, in which case the close + * will show up as a 0-length read, as in a non-TLS + * #GSocketConnection, and it is up to the application to check that + * the data has been fully received. * - * Gets the mount path for a unix mount point. + * Note that this only affects the behavior when the peer closes the + * connection; when the application calls g_io_stream_close() itself + * on @conn, this will send a close notification regardless of the + * setting of this property. If you explicitly want to do an unclean + * close, you can close @conn's #GTlsConnection:base-io-stream rather + * than closing @conn itself, but note that this may only be done when no other + * operations are pending on @conn or the base I/O stream. * - * Returns: (type filename): a string containing the mount path. + * Since: 2.28 */ /** - * g_unix_mount_point_get_options: - * @mount_point: a #GUnixMountPoint. + * g_tls_connection_set_use_system_certdb: + * @conn: a #GTlsConnection + * @use_system_certdb: whether to use the system certificate database * - * Gets the options for the mount point. + * Sets whether @conn uses the system certificate database to verify + * peer certificates. This is %TRUE by default. If set to %FALSE, then + * peer certificate validation will always set the + * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning + * #GTlsConnection::accept-certificate will always be emitted on + * client-side connections, unless that bit is not set in + * #GTlsClientConnection:validation-flags). * - * Returns: a string containing the options. - * Since: 2.32 + * Deprecated: 2.30: Use g_tls_connection_set_database() instead */ /** - * g_unix_mount_point_guess_can_eject: - * @mount_point: a #GUnixMountPoint + * g_tls_database_create_certificate_handle: + * @self: a #GTlsDatabase + * @certificate: certificate for which to create a handle. * - * Guesses whether a Unix mount point can be ejected. + * Create a handle string for the certificate. The database will only be able + * to create a handle for certificates that originate from the database. In + * cases where the database cannot create a handle for a certificate, %NULL + * will be returned. * - * Returns: %TRUE if @mount_point is deemed to be ejectable. + * This handle should be stable across various instances of the application, + * and between applications. If a certificate is modified in the database, + * then it is not guaranteed that this handle will continue to point to it. + * + * Returns: (nullable): a newly allocated string containing the + * handle. + * Since: 2.30 */ /** - * g_unix_mount_point_guess_icon: - * @mount_point: a #GUnixMountPoint + * g_tls_database_lookup_certificate_for_handle: + * @self: a #GTlsDatabase + * @handle: a certificate handle + * @interaction: (nullable): used to interact with the user if necessary + * @flags: Flags which affect the lookup. + * @cancellable: (nullable): a #GCancellable, or %NULL + * @error: (nullable): a #GError, or %NULL * - * Guesses the icon of a Unix mount point. + * Look up a certificate by its handle. * - * Returns: (transfer full): a #GIcon - */ - - -/** - * g_unix_mount_point_guess_name: - * @mount_point: a #GUnixMountPoint + * The handle should have been created by calling + * g_tls_database_create_certificate_handle() on a #GTlsDatabase object of + * the same TLS backend. The handle is designed to remain valid across + * instantiations of the database. * - * Guesses the name of a Unix mount point. - * The result is a translated string. + * If the handle is no longer valid, or does not point to a certificate in + * this database, then %NULL will be returned. * - * Returns: A newly allocated string that must - * be freed with g_free() + * This function can block, use g_tls_database_lookup_certificate_for_handle_async() to perform + * the lookup operation asynchronously. + * + * Returns: (transfer full) (nullable): a newly allocated + * #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate. + * Since: 2.30 */ /** - * g_unix_mount_point_guess_symbolic_icon: - * @mount_point: a #GUnixMountPoint + * g_tls_database_lookup_certificate_for_handle_async: + * @self: a #GTlsDatabase + * @handle: a certificate handle + * @interaction: (nullable): used to interact with the user if necessary + * @flags: Flags which affect the lookup. + * @cancellable: (nullable): a #GCancellable, or %NULL + * @callback: callback to call when the operation completes + * @user_data: the data to pass to the callback function * - * Guesses the symbolic icon of a Unix mount point. + * Asynchronously look up a certificate by its handle in the database. See + * g_tls_database_lookup_certificate_for_handle() for more information. * - * Returns: (transfer full): a #GIcon - * Since: 2.34 + * Since: 2.30 */ /** - * g_unix_mount_point_guess_type: - * @mount_point: a #GUnixMountPoint. + * g_tls_database_lookup_certificate_for_handle_finish: + * @self: a #GTlsDatabase + * @result: a #GAsyncResult. + * @error: a #GError pointer, or %NULL * - * Guesses the type of a unix mount point. - * If the mount type cannot be determined, - * returns %G_UNIX_MOUNT_TYPE_UNKNOWN. + * Finish an asynchronous lookup of a certificate by its handle. See + * g_tls_database_lookup_certificate_for_handle() for more information. * - * Returns: a #GUnixMountType. + * If the handle is no longer valid, or does not point to a certificate in + * this database, then %NULL will be returned. + * + * Returns: (transfer full): a newly allocated #GTlsCertificate object. + * Use g_object_unref() to release the certificate. + * Since: 2.30 */ /** - * g_unix_mount_point_is_loopback: - * @mount_point: a #GUnixMountPoint. + * g_tls_database_lookup_certificate_issuer: + * @self: a #GTlsDatabase + * @certificate: a #GTlsCertificate + * @interaction: (nullable): used to interact with the user if necessary + * @flags: flags which affect the lookup operation + * @cancellable: (nullable): a #GCancellable, or %NULL + * @error: (nullable): a #GError, or %NULL * - * Checks if a unix mount point is a loopback device. + * Look up the issuer of @certificate in the database. * - * Returns: %TRUE if the mount point is a loopback. %FALSE otherwise. - */ - - -/** - * g_unix_mount_point_is_readonly: - * @mount_point: a #GUnixMountPoint. + * The #GTlsCertificate:issuer property + * of @certificate is not modified, and the two certificates are not hooked + * into a chain. * - * Checks if a unix mount point is read only. + * This function can block, use g_tls_database_lookup_certificate_issuer_async() to perform + * the lookup operation asynchronously. * - * Returns: %TRUE if a mount point is read only. + * Returns: (transfer full): a newly allocated issuer #GTlsCertificate, + * or %NULL. Use g_object_unref() to release the certificate. + * Since: 2.30 */ /** - * g_unix_mount_point_is_user_mountable: - * @mount_point: a #GUnixMountPoint. + * g_tls_database_lookup_certificate_issuer_async: + * @self: a #GTlsDatabase + * @certificate: a #GTlsCertificate + * @interaction: (nullable): used to interact with the user if necessary + * @flags: flags which affect the lookup operation + * @cancellable: (nullable): a #GCancellable, or %NULL + * @callback: callback to call when the operation completes + * @user_data: the data to pass to the callback function * - * Checks if a unix mount point is mountable by the user. + * Asynchronously look up the issuer of @certificate in the database. See + * g_tls_database_lookup_certificate_issuer() for more information. * - * Returns: %TRUE if the mount point is user mountable. + * Since: 2.30 */ /** - * g_unix_mount_points_changed_since: - * @time: guint64 to contain a timestamp. + * g_tls_database_lookup_certificate_issuer_finish: + * @self: a #GTlsDatabase + * @result: a #GAsyncResult. + * @error: a #GError pointer, or %NULL * - * Checks if the unix mount points have changed since a given unix time. + * Finish an asynchronous lookup issuer operation. See + * g_tls_database_lookup_certificate_issuer() for more information. * - * Returns: %TRUE if the mount points have changed since @time. + * Returns: (transfer full): a newly allocated issuer #GTlsCertificate, + * or %NULL. Use g_object_unref() to release the certificate. + * Since: 2.30 */ /** - * g_unix_mount_points_get: - * @time_read: (out) (optional): guint64 to contain a timestamp. + * g_tls_database_lookup_certificates_issued_by: + * @self: a #GTlsDatabase + * @issuer_raw_dn: a #GByteArray which holds the DER encoded issuer DN. + * @interaction: (nullable): used to interact with the user if necessary + * @flags: Flags which affect the lookup operation. + * @cancellable: (nullable): a #GCancellable, or %NULL + * @error: (nullable): a #GError, or %NULL * - * Gets a #GList of #GUnixMountPoint containing the unix mount points. - * If @time_read is set, it will be filled with the mount timestamp, - * allowing for checking if the mounts have changed with - * g_unix_mount_points_changed_since(). + * Look up certificates issued by this issuer in the database. * - * Returns: (element-type GUnixMountPoint) (transfer full): - * a #GList of the UNIX mountpoints. + * This function can block, use g_tls_database_lookup_certificates_issued_by_async() to perform + * the lookup operation asynchronously. + * + * Returns: (transfer full) (element-type GTlsCertificate): a newly allocated list of #GTlsCertificate + * objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list. + * Since: 2.30 */ /** - * g_unix_mounts_changed_since: - * @time: guint64 to contain a timestamp. + * g_tls_database_lookup_certificates_issued_by_async: + * @self: a #GTlsDatabase + * @issuer_raw_dn: a #GByteArray which holds the DER encoded issuer DN. + * @interaction: (nullable): used to interact with the user if necessary + * @flags: Flags which affect the lookup operation. + * @cancellable: (nullable): a #GCancellable, or %NULL + * @callback: callback to call when the operation completes + * @user_data: the data to pass to the callback function * - * Checks if the unix mounts have changed since a given unix time. + * Asynchronously look up certificates issued by this issuer in the database. See + * g_tls_database_lookup_certificates_issued_by() for more information. * - * Returns: %TRUE if the mounts have changed since @time. + * The database may choose to hold a reference to the issuer byte array for the duration + * of of this asynchronous operation. The byte array should not be modified during + * this time. + * + * Since: 2.30 */ /** - * g_unix_mounts_get: - * @time_read: (out) (optional): guint64 to contain a timestamp, or %NULL + * g_tls_database_lookup_certificates_issued_by_finish: + * @self: a #GTlsDatabase + * @result: a #GAsyncResult. + * @error: a #GError pointer, or %NULL * - * Gets a #GList of #GUnixMountEntry containing the unix mounts. - * If @time_read is set, it will be filled with the mount - * timestamp, allowing for checking if the mounts have changed - * with g_unix_mounts_changed_since(). + * Finish an asynchronous lookup of certificates. See + * g_tls_database_lookup_certificates_issued_by() for more information. * - * Returns: (element-type GUnixMountEntry) (transfer full): - * a #GList of the UNIX mounts. + * Returns: (transfer full) (element-type GTlsCertificate): a newly allocated list of #GTlsCertificate + * objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list. + * Since: 2.30 */ /** - * g_unix_output_stream_get_close_fd: - * @stream: a #GUnixOutputStream + * g_tls_database_verify_chain: + * @self: a #GTlsDatabase + * @chain: a #GTlsCertificate chain + * @purpose: the purpose that this certificate chain will be used for. + * @identity: (nullable): the expected peer identity + * @interaction: (nullable): used to interact with the user if necessary + * @flags: additional verify flags + * @cancellable: (nullable): a #GCancellable, or %NULL + * @error: (nullable): a #GError, or %NULL * - * Returns whether the file descriptor of @stream will be - * closed when the stream is closed. + * Determines the validity of a certificate chain after looking up and + * adding any missing certificates to the chain. * - * Returns: %TRUE if the file descriptor is closed when done - * Since: 2.20 + * @chain is a chain of #GTlsCertificate objects each pointing to the next + * certificate in the chain by its #GTlsCertificate:issuer property. The chain may initially + * consist of one or more certificates. After the verification process is + * complete, @chain may be modified by adding missing certificates, or removing + * extra certificates. If a certificate anchor was found, then it is added to + * the @chain. + * + * @purpose describes the purpose (or usage) for which the certificate + * is being used. Typically @purpose will be set to #G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER + * which means that the certificate is being used to authenticate a server + * (and we are acting as the client). + * + * The @identity is used to check for pinned certificates (trust exceptions) + * in the database. These will override the normal verification process on a + * host by host basis. + * + * Currently there are no @flags, and %G_TLS_DATABASE_VERIFY_NONE should be + * used. + * + * If @chain is found to be valid, then the return value will be 0. If + * @chain is found to be invalid, then the return value will indicate + * the problems found. If the function is unable to determine whether + * @chain is valid or not (eg, because @cancellable is triggered + * before it completes) then the return value will be + * %G_TLS_CERTIFICATE_GENERIC_ERROR and @error will be set + * accordingly. @error is not set when @chain is successfully analyzed + * but found to be invalid. + * + * This function can block, use g_tls_database_verify_chain_async() to perform + * the verification operation asynchronously. + * + * Returns: the appropriate #GTlsCertificateFlags which represents the + * result of verification. + * Since: 2.30 */ /** - * g_unix_output_stream_get_fd: - * @stream: a #GUnixOutputStream + * g_tls_database_verify_chain_async: + * @self: a #GTlsDatabase + * @chain: a #GTlsCertificate chain + * @purpose: the purpose that this certificate chain will be used for. + * @identity: (nullable): the expected peer identity + * @interaction: (nullable): used to interact with the user if necessary + * @flags: additional verify flags + * @cancellable: (nullable): a #GCancellable, or %NULL + * @callback: callback to call when the operation completes + * @user_data: the data to pass to the callback function * - * Return the UNIX file descriptor that the stream writes to. + * Asynchronously determines the validity of a certificate chain after + * looking up and adding any missing certificates to the chain. See + * g_tls_database_verify_chain() for more information. * - * Returns: The file descriptor of @stream - * Since: 2.20 + * Since: 2.30 */ /** - * g_unix_output_stream_new: - * @fd: a UNIX file descriptor - * @close_fd: %TRUE to close the file descriptor when done + * g_tls_database_verify_chain_finish: + * @self: a #GTlsDatabase + * @result: a #GAsyncResult. + * @error: a #GError pointer, or %NULL * - * Creates a new #GUnixOutputStream for the given @fd. + * Finish an asynchronous verify chain operation. See + * g_tls_database_verify_chain() for more information. * - * If @close_fd, is %TRUE, the file descriptor will be closed when - * the output stream is destroyed. + * If @chain is found to be valid, then the return value will be 0. If + * @chain is found to be invalid, then the return value will indicate + * the problems found. If the function is unable to determine whether + * @chain is valid or not (eg, because @cancellable is triggered + * before it completes) then the return value will be + * %G_TLS_CERTIFICATE_GENERIC_ERROR and @error will be set + * accordingly. @error is not set when @chain is successfully analyzed + * but found to be invalid. * - * Returns: a new #GOutputStream + * Returns: the appropriate #GTlsCertificateFlags which represents the + * result of verification. + * Since: 2.30 */ /** - * g_unix_output_stream_set_close_fd: - * @stream: a #GUnixOutputStream - * @close_fd: %TRUE to close the file descriptor when done + * g_tls_error_quark: * - * Sets whether the file descriptor of @stream shall be closed - * when the stream is closed. + * Gets the TLS error quark. * - * Since: 2.20 + * Returns: a #GQuark. + * Since: 2.28 */ /** - * g_unix_socket_address_abstract_names_supported: + * g_tls_file_database_new: + * @anchors: (type filename): filename of anchor certificate authorities. + * @error: #GError for error reporting, or %NULL to ignore. * - * Checks if abstract UNIX domain socket names are supported. + * Creates a new #GTlsFileDatabase which uses anchor certificate authorities + * in @anchors to verify certificate chains. * - * Returns: %TRUE if supported, %FALSE otherwise - * Since: 2.22 + * The certificates in @anchors must be PEM encoded. + * + * Returns: (transfer full) (type GTlsFileDatabase): the new + * #GTlsFileDatabase, or %NULL on error + * Since: 2.30 */ /** - * g_unix_socket_address_get_address_type: - * @address: a #GInetSocketAddress + * g_tls_interaction_ask_password: + * @interaction: a #GTlsInteraction object + * @password: a #GTlsPassword object + * @cancellable: an optional #GCancellable cancellation object + * @error: an optional location to place an error on failure * - * Gets @address's type. + * Run synchronous interaction to ask the user for a password. In general, + * g_tls_interaction_invoke_ask_password() should be used instead of this + * function. * - * Returns: a #GUnixSocketAddressType - * Since: 2.26 - */ - - -/** - * g_unix_socket_address_get_is_abstract: - * @address: a #GInetSocketAddress + * Derived subclasses usually implement a password prompt, although they may + * also choose to provide a password from elsewhere. The @password value will + * be filled in and then @callback will be called. Alternatively the user may + * abort this password request, which will usually abort the TLS connection. * - * Tests if @address is abstract. + * If the interaction is cancelled by the cancellation object, or by the + * user then %G_TLS_INTERACTION_FAILED will be returned with an error that + * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may + * not support immediate cancellation. * - * Returns: %TRUE if the address is abstract, %FALSE otherwise - * Since: 2.22 - * Deprecated: Use g_unix_socket_address_get_address_type() + * Returns: The status of the ask password interaction. + * Since: 2.30 */ /** - * g_unix_socket_address_get_path: - * @address: a #GInetSocketAddress + * g_tls_interaction_ask_password_async: + * @interaction: a #GTlsInteraction object + * @password: a #GTlsPassword object + * @cancellable: an optional #GCancellable cancellation object + * @callback: (nullable): will be called when the interaction completes + * @user_data: (nullable): data to pass to the @callback * - * Gets @address's path, or for abstract sockets the "name". + * Run asynchronous interaction to ask the user for a password. In general, + * g_tls_interaction_invoke_ask_password() should be used instead of this + * function. * - * Guaranteed to be zero-terminated, but an abstract socket - * may contain embedded zeros, and thus you should use - * g_unix_socket_address_get_path_len() to get the true length - * of this string. + * Derived subclasses usually implement a password prompt, although they may + * also choose to provide a password from elsewhere. The @password value will + * be filled in and then @callback will be called. Alternatively the user may + * abort this password request, which will usually abort the TLS connection. * - * Returns: the path for @address - * Since: 2.22 + * If the interaction is cancelled by the cancellation object, or by the + * user then %G_TLS_INTERACTION_FAILED will be returned with an error that + * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may + * not support immediate cancellation. + * + * Certain implementations may not support immediate cancellation. + * + * Since: 2.30 */ /** - * g_unix_socket_address_get_path_len: - * @address: a #GInetSocketAddress + * g_tls_interaction_ask_password_finish: + * @interaction: a #GTlsInteraction object + * @result: the result passed to the callback + * @error: an optional location to place an error on failure * - * Gets the length of @address's path. + * Complete an ask password user interaction request. This should be once + * the g_tls_interaction_ask_password_async() completion callback is called. * - * For details, see g_unix_socket_address_get_path(). + * If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsPassword passed + * to g_tls_interaction_ask_password() will have its password filled in. * - * Returns: the length of the path - * Since: 2.22 + * If the interaction is cancelled by the cancellation object, or by the + * user then %G_TLS_INTERACTION_FAILED will be returned with an error that + * contains a %G_IO_ERROR_CANCELLED error code. + * + * Returns: The status of the ask password interaction. + * Since: 2.30 */ /** - * g_unix_socket_address_new: - * @path: the socket path + * g_tls_interaction_invoke_ask_password: + * @interaction: a #GTlsInteraction object + * @password: a #GTlsPassword object + * @cancellable: an optional #GCancellable cancellation object + * @error: an optional location to place an error on failure * - * Creates a new #GUnixSocketAddress for @path. + * Invoke the interaction to ask the user for a password. It invokes this + * interaction in the main loop, specifically the #GMainContext returned by + * g_main_context_get_thread_default() when the interaction is created. This + * is called by called by #GTlsConnection or #GTlsDatabase to ask the user + * for a password. * - * To create abstract socket addresses, on systems that support that, - * use g_unix_socket_address_new_abstract(). + * Derived subclasses usually implement a password prompt, although they may + * also choose to provide a password from elsewhere. The @password value will + * be filled in and then @callback will be called. Alternatively the user may + * abort this password request, which will usually abort the TLS connection. * - * Returns: a new #GUnixSocketAddress - * Since: 2.22 + * The implementation can either be a synchronous (eg: modal dialog) or an + * asynchronous one (eg: modeless dialog). This function will take care of + * calling which ever one correctly. + * + * If the interaction is cancelled by the cancellation object, or by the + * user then %G_TLS_INTERACTION_FAILED will be returned with an error that + * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may + * not support immediate cancellation. + * + * Returns: The status of the ask password interaction. + * Since: 2.30 */ /** - * g_unix_socket_address_new_abstract: - * @path: (array length=path_len) (element-type gchar): the abstract name - * @path_len: the length of @path, or -1 + * g_tls_interaction_invoke_request_certificate: + * @interaction: a #GTlsInteraction object + * @connection: a #GTlsConnection object + * @flags: flags providing more information about the request + * @cancellable: an optional #GCancellable cancellation object + * @error: an optional location to place an error on failure * - * Creates a new %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED - * #GUnixSocketAddress for @path. + * Invoke the interaction to ask the user to choose a certificate to + * use with the connection. It invokes this interaction in the main + * loop, specifically the #GMainContext returned by + * g_main_context_get_thread_default() when the interaction is + * created. This is called by called by #GTlsConnection when the peer + * requests a certificate during the handshake. * - * Returns: a new #GUnixSocketAddress - * Deprecated: Use g_unix_socket_address_new_with_type(). + * Derived subclasses usually implement a certificate selector, + * although they may also choose to provide a certificate from + * elsewhere. Alternatively the user may abort this certificate + * request, which may or may not abort the TLS connection. + * + * The implementation can either be a synchronous (eg: modal dialog) or an + * asynchronous one (eg: modeless dialog). This function will take care of + * calling which ever one correctly. + * + * If the interaction is cancelled by the cancellation object, or by the + * user then %G_TLS_INTERACTION_FAILED will be returned with an error that + * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may + * not support immediate cancellation. + * + * Returns: The status of the certificate request interaction. + * Since: 2.40 */ /** - * g_unix_socket_address_new_with_type: - * @path: (array length=path_len) (element-type gchar): the name - * @path_len: the length of @path, or -1 - * @type: a #GUnixSocketAddressType - * - * Creates a new #GUnixSocketAddress of type @type with name @path. - * - * If @type is %G_UNIX_SOCKET_ADDRESS_PATH, this is equivalent to - * calling g_unix_socket_address_new(). + * g_tls_interaction_request_certificate: + * @interaction: a #GTlsInteraction object + * @connection: a #GTlsConnection object + * @flags: flags providing more information about the request + * @cancellable: an optional #GCancellable cancellation object + * @error: an optional location to place an error on failure * - * If @type is %G_UNIX_SOCKET_ADDRESS_ANONYMOUS, @path and @path_len will be - * ignored. + * Run synchronous interaction to ask the user to choose a certificate to use + * with the connection. In general, g_tls_interaction_invoke_request_certificate() + * should be used instead of this function. * - * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT, then @path_len - * bytes of @path will be copied to the socket's path, and only those - * bytes will be considered part of the name. (If @path_len is -1, - * then @path is assumed to be NUL-terminated.) For example, if @path - * was "test", then calling g_socket_address_get_native_size() on the - * returned socket would return 7 (2 bytes of overhead, 1 byte for the - * abstract-socket indicator byte, and 4 bytes for the name "test"). + * Derived subclasses usually implement a certificate selector, although they may + * also choose to provide a certificate from elsewhere. Alternatively the user may + * abort this certificate request, which will usually abort the TLS connection. * - * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED, then - * @path_len bytes of @path will be copied to the socket's path, the - * rest of the path will be padded with 0 bytes, and the entire - * zero-padded buffer will be considered the name. (As above, if - * @path_len is -1, then @path is assumed to be NUL-terminated.) In - * this case, g_socket_address_get_native_size() will always return - * the full size of a `struct sockaddr_un`, although - * g_unix_socket_address_get_path_len() will still return just the - * length of @path. + * If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsConnection + * passed to g_tls_interaction_request_certificate() will have had its + * #GTlsConnection:certificate filled in. * - * %G_UNIX_SOCKET_ADDRESS_ABSTRACT is preferred over - * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED for new programs. Of course, - * when connecting to a server created by another process, you must - * use the appropriate type corresponding to how that process created - * its listening socket. + * If the interaction is cancelled by the cancellation object, or by the + * user then %G_TLS_INTERACTION_FAILED will be returned with an error that + * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may + * not support immediate cancellation. * - * Returns: a new #GUnixSocketAddress - * Since: 2.26 + * Returns: The status of the request certificate interaction. + * Since: 2.40 */ /** - * g_vfs_get_default: + * g_tls_interaction_request_certificate_async: + * @interaction: a #GTlsInteraction object + * @connection: a #GTlsConnection object + * @flags: flags providing more information about the request + * @cancellable: an optional #GCancellable cancellation object + * @callback: (nullable): will be called when the interaction completes + * @user_data: (nullable): data to pass to the @callback * - * Gets the default #GVfs for the system. + * Run asynchronous interaction to ask the user for a certificate to use with + * the connection. In general, g_tls_interaction_invoke_request_certificate() should + * be used instead of this function. * - * Returns: (transfer none): a #GVfs. + * Derived subclasses usually implement a certificate selector, although they may + * also choose to provide a certificate from elsewhere. @callback will be called + * when the operation completes. Alternatively the user may abort this certificate + * request, which will usually abort the TLS connection. + * + * Since: 2.40 */ /** - * g_vfs_get_file_for_path: - * @vfs: a #GVfs. - * @path: a string containing a VFS path. + * g_tls_interaction_request_certificate_finish: + * @interaction: a #GTlsInteraction object + * @result: the result passed to the callback + * @error: an optional location to place an error on failure * - * Gets a #GFile for @path. + * Complete a request certificate user interaction request. This should be once + * the g_tls_interaction_request_certificate_async() completion callback is called. * - * Returns: (transfer full): a #GFile. - * Free the returned object with g_object_unref(). + * If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsConnection + * passed to g_tls_interaction_request_certificate_async() will have had its + * #GTlsConnection:certificate filled in. + * + * If the interaction is cancelled by the cancellation object, or by the + * user then %G_TLS_INTERACTION_FAILED will be returned with an error that + * contains a %G_IO_ERROR_CANCELLED error code. + * + * Returns: The status of the request certificate interaction. + * Since: 2.40 */ /** - * g_vfs_get_file_for_uri: - * @vfs: a#GVfs. - * @uri: a string containing a URI - * - * Gets a #GFile for @uri. + * g_tls_password_get_description: + * @password: a #GTlsPassword object * - * This operation never fails, but the returned object - * might not support any I/O operation if the URI - * is malformed or if the URI scheme is not supported. + * Get a description string about what the password will be used for. * - * Returns: (transfer full): a #GFile. - * Free the returned object with g_object_unref(). + * Returns: The description of the password. + * Since: 2.30 */ /** - * g_vfs_get_local: + * g_tls_password_get_flags: + * @password: a #GTlsPassword object * - * Gets the local #GVfs for the system. + * Get flags about the password. * - * Returns: (transfer none): a #GVfs. + * Returns: The flags about the password. + * Since: 2.30 */ /** - * g_vfs_get_supported_uri_schemes: - * @vfs: a #GVfs. + * g_tls_password_get_value: + * @password: a #GTlsPassword object + * @length: (nullable): location to place the length of the password. * - * Gets a list of URI schemes supported by @vfs. + * Get the password value. If @length is not %NULL then it will be + * filled in with the length of the password value. (Note that the + * password value is not nul-terminated, so you can only pass %NULL + * for @length in contexts where you know the password will have a + * certain fixed length.) * - * Returns: (transfer none): a %NULL-terminated array of strings. - * The returned array belongs to GIO and must - * not be freed or modified. + * Returns: The password value (owned by the password object). + * Since: 2.30 */ /** - * g_vfs_is_active: - * @vfs: a #GVfs. + * g_tls_password_get_warning: + * @password: a #GTlsPassword object * - * Checks if the VFS is active. + * Get a user readable translated warning. Usually this warning is a + * representation of the password flags returned from + * g_tls_password_get_flags(). * - * Returns: %TRUE if construction of the @vfs was successful - * and it is now active. + * Returns: The warning. + * Since: 2.30 */ /** - * g_vfs_parse_name: - * @vfs: a #GVfs. - * @parse_name: a string to be parsed by the VFS module. + * g_tls_password_new: + * @flags: the password flags + * @description: description of what the password is for * - * This operation never fails, but the returned object might - * not support any I/O operations if the @parse_name cannot - * be parsed by the #GVfs module. + * Create a new #GTlsPassword object. * - * Returns: (transfer full): a #GFile for the given @parse_name. - * Free the returned object with g_object_unref(). + * Returns: (transfer full): The newly allocated password object */ /** - * g_vfs_register_uri_scheme: - * @vfs: a #GVfs - * @scheme: an URI scheme, e.g. "http" - * @uri_func: (scope notified) (nullable): a #GVfsFileLookupFunc - * @uri_data: (nullable): custom data passed to be passed to @uri_func, or %NULL - * @uri_destroy: (nullable): function to be called when unregistering the - * URI scheme, or when @vfs is disposed, to free the resources used - * by the URI lookup function - * @parse_name_func: (scope notified) (nullable): a #GVfsFileLookupFunc - * @parse_name_data: (nullable): custom data passed to be passed to - * @parse_name_func, or %NULL - * @parse_name_destroy: (nullable): function to be called when unregistering the - * URI scheme, or when @vfs is disposed, to free the resources used - * by the parse name lookup function - * - * Registers @uri_func and @parse_name_func as the #GFile URI and parse name - * lookup functions for URIs with a scheme matching @scheme. - * Note that @scheme is registered only within the running application, as - * opposed to desktop-wide as it happens with GVfs backends. - * - * When a #GFile is requested with an URI containing @scheme (e.g. through - * g_file_new_for_uri()), @uri_func will be called to allow a custom - * constructor. The implementation of @uri_func should not be blocking, and - * must not call g_vfs_register_uri_scheme() or g_vfs_unregister_uri_scheme(). - * - * When g_file_parse_name() is called with a parse name obtained from such file, - * @parse_name_func will be called to allow the #GFile to be created again. In - * that case, it's responsibility of @parse_name_func to make sure the parse - * name matches what the custom #GFile implementation returned when - * g_file_get_parse_name() was previously called. The implementation of - * @parse_name_func should not be blocking, and must not call - * g_vfs_register_uri_scheme() or g_vfs_unregister_uri_scheme(). + * g_tls_password_set_description: + * @password: a #GTlsPassword object + * @description: The description of the password * - * It's an error to call this function twice with the same scheme. To unregister - * a custom URI scheme, use g_vfs_unregister_uri_scheme(). + * Set a description string about what the password will be used for. * - * Returns: %TRUE if @scheme was successfully registered, or %FALSE if a handler - * for @scheme already exists. - * Since: 2.50 + * Since: 2.30 */ /** - * g_vfs_unregister_uri_scheme: - * @vfs: a #GVfs - * @scheme: an URI scheme, e.g. "http" + * g_tls_password_set_flags: + * @password: a #GTlsPassword object + * @flags: The flags about the password * - * Unregisters the URI handler for @scheme previously registered with - * g_vfs_register_uri_scheme(). + * Set flags about the password. * - * Returns: %TRUE if @scheme was successfully unregistered, or %FALSE if a - * handler for @scheme does not exist. - * Since: 2.50 + * Since: 2.30 */ /** - * g_volume_can_eject: - * @volume: a #GVolume + * g_tls_password_set_value: + * @password: a #GTlsPassword object + * @value: (array length=length): the new password value + * @length: the length of the password, or -1 * - * Checks if a volume can be ejected. + * Set the value for this password. The @value will be copied by the password + * object. * - * Returns: %TRUE if the @volume can be ejected. %FALSE otherwise + * Specify the @length, for a non-nul-terminated password. Pass -1 as + * @length if using a nul-terminated password, and @length will be + * calculated automatically. (Note that the terminating nul is not + * considered part of the password in this case.) + * + * Since: 2.30 */ /** - * g_volume_can_mount: - * @volume: a #GVolume + * g_tls_password_set_value_full: (virtual set_value) + * @password: a #GTlsPassword object + * @value: (array length=length): the value for the password + * @length: the length of the password, or -1 + * @destroy: (nullable): a function to use to free the password. * - * Checks if a volume can be mounted. + * Provide the value for this password. * - * Returns: %TRUE if the @volume can be mounted. %FALSE otherwise + * The @value will be owned by the password object, and later freed using + * the @destroy function callback. + * + * Specify the @length, for a non-nul-terminated password. Pass -1 as + * @length if using a nul-terminated password, and @length will be + * calculated automatically. (Note that the terminating nul is not + * considered part of the password in this case.) + * + * Since: 2.30 */ /** - * g_volume_eject: - * @volume: a #GVolume - * @flags: flags affecting the unmount if required for eject - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore - * @callback: (nullable): a #GAsyncReadyCallback, or %NULL - * @user_data: user data that gets passed to @callback + * g_tls_password_set_warning: + * @password: a #GTlsPassword object + * @warning: The user readable warning * - * Ejects a volume. This is an asynchronous operation, and is - * finished by calling g_volume_eject_finish() with the @volume - * and #GAsyncResult returned in the @callback. + * Set a user readable translated warning. Usually this warning is a + * representation of the password flags returned from + * g_tls_password_get_flags(). * - * Deprecated: 2.22: Use g_volume_eject_with_operation() instead. + * Since: 2.30 */ /** - * g_volume_eject_finish: - * @volume: pointer to a #GVolume - * @result: a #GAsyncResult - * @error: a #GError location to store an error, or %NULL to ignore + * g_tls_server_connection_new: + * @base_io_stream: the #GIOStream to wrap + * @certificate: (nullable): the default server certificate, or %NULL + * @error: #GError for error reporting, or %NULL to ignore. * - * Finishes ejecting a volume. If any errors occurred during the operation, - * @error will be set to contain the errors and %FALSE will be returned. + * Creates a new #GTlsServerConnection wrapping @base_io_stream (which + * must have pollable input and output streams). * - * Returns: %TRUE, %FALSE if operation failed - * Deprecated: 2.22: Use g_volume_eject_with_operation_finish() instead. + * See the documentation for #GTlsConnection:base-io-stream for restrictions + * on when application code can run operations on the @base_io_stream after + * this function has returned. + * + * Returns: (transfer full) (type GTlsServerConnection): the new + * #GTlsServerConnection, or %NULL on error + * Since: 2.28 */ /** - * g_volume_eject_with_operation: - * @volume: a #GVolume - * @flags: flags affecting the unmount if required for eject - * @mount_operation: (nullable): a #GMountOperation or %NULL to - * avoid user interaction - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore - * @callback: (nullable): a #GAsyncReadyCallback, or %NULL - * @user_data: user data passed to @callback + * g_unix_connection_receive_credentials: + * @connection: A #GUnixConnection. + * @cancellable: (nullable): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. * - * Ejects a volume. This is an asynchronous operation, and is - * finished by calling g_volume_eject_with_operation_finish() with the @volume - * and #GAsyncResult data returned in the @callback. + * Receives credentials from the sending end of the connection. The + * sending end has to call g_unix_connection_send_credentials() (or + * similar) for this to work. * - * Since: 2.22 + * As well as reading the credentials this also reads (and discards) a + * single byte from the stream, as this is required for credentials + * passing to work on some implementations. + * + * This method can be expected to be available on the following platforms: + * + * - Linux since GLib 2.26 + * - FreeBSD since GLib 2.26 + * - GNU/kFreeBSD since GLib 2.36 + * - Solaris, Illumos and OpenSolaris since GLib 2.40 + * - GNU/Hurd since GLib 2.40 + * + * Other ways to exchange credentials with a foreign peer includes the + * #GUnixCredentialsMessage type and g_socket_get_credentials() function. + * + * Returns: (transfer full): Received credentials on success (free with + * g_object_unref()), %NULL if @error is set. + * Since: 2.26 */ /** - * g_volume_eject_with_operation_finish: - * @volume: a #GVolume - * @result: a #GAsyncResult - * @error: a #GError location to store the error occurring, or %NULL + * g_unix_connection_receive_credentials_async: + * @connection: A #GUnixConnection. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Finishes ejecting a volume. If any errors occurred during the operation, - * @error will be set to contain the errors and %FALSE will be returned. + * Asynchronously receive credentials. * - * Returns: %TRUE if the volume was successfully ejected. %FALSE otherwise - * Since: 2.22 + * For more details, see g_unix_connection_receive_credentials() which is + * the synchronous version of this call. + * + * When the operation is finished, @callback will be called. You can then call + * g_unix_connection_receive_credentials_finish() to get the result of the operation. + * + * Since: 2.32 */ /** - * g_volume_enumerate_identifiers: - * @volume: a #GVolume + * g_unix_connection_receive_credentials_finish: + * @connection: A #GUnixConnection. + * @result: a #GAsyncResult. + * @error: a #GError, or %NULL * - * Gets the kinds of [identifiers][volume-identifier] that @volume has. - * Use g_volume_get_identifier() to obtain the identifiers themselves. + * Finishes an asynchronous receive credentials operation started with + * g_unix_connection_receive_credentials_async(). * - * Returns: (array zero-terminated=1) (transfer full): a %NULL-terminated array - * of strings containing kinds of identifiers. Use g_strfreev() to free. + * Returns: (transfer full): a #GCredentials, or %NULL on error. + * Free the returned object with g_object_unref(). + * Since: 2.32 */ /** - * g_volume_get_activation_root: - * @volume: a #GVolume - * - * Gets the activation root for a #GVolume if it is known ahead of - * mount time. Returns %NULL otherwise. If not %NULL and if @volume - * is mounted, then the result of g_mount_get_root() on the - * #GMount object obtained from g_volume_get_mount() will always - * either be equal or a prefix of what this function returns. In - * other words, in code - * - * |[ - * GMount *mount; - * GFile *mount_root - * GFile *volume_activation_root; + * g_unix_connection_receive_fd: + * @connection: a #GUnixConnection + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore + * @error: (nullable): #GError for error reporting, or %NULL to ignore * - * mount = g_volume_get_mount (volume); // mounted, so never NULL - * mount_root = g_mount_get_root (mount); - * volume_activation_root = g_volume_get_activation_root (volume); // assume not NULL - * ]| - * then the expression - * |[ - * (g_file_has_prefix (volume_activation_root, mount_root) || - * g_file_equal (volume_activation_root, mount_root)) - * ]| - * will always be %TRUE. + * Receives a file descriptor from the sending end of the connection. + * The sending end has to call g_unix_connection_send_fd() for this + * to work. * - * Activation roots are typically used in #GVolumeMonitor - * implementations to find the underlying mount to shadow, see - * g_mount_is_shadowed() for more details. + * As well as reading the fd this also reads a single byte from the + * stream, as this is required for fd passing to work on some + * implementations. * - * Returns: (nullable) (transfer full): the activation root of @volume - * or %NULL. Use g_object_unref() to free. - * Since: 2.18 + * Returns: a file descriptor on success, -1 on error. + * Since: 2.22 */ /** - * g_volume_get_drive: - * @volume: a #GVolume + * g_unix_connection_send_credentials: + * @connection: A #GUnixConnection. + * @cancellable: (nullable): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. * - * Gets the drive for the @volume. + * Passes the credentials of the current user the receiving side + * of the connection. The receiving end has to call + * g_unix_connection_receive_credentials() (or similar) to accept the + * credentials. * - * Returns: (transfer full): a #GDrive or %NULL if @volume is not - * associated with a drive. The returned object should be unreffed - * with g_object_unref() when no longer needed. - */ - - -/** - * g_volume_get_icon: - * @volume: a #GVolume + * As well as sending the credentials this also writes a single NUL + * byte to the stream, as this is required for credentials passing to + * work on some implementations. * - * Gets the icon for @volume. + * This method can be expected to be available on the following platforms: * - * Returns: (transfer full): a #GIcon. - * The returned object should be unreffed with g_object_unref() - * when no longer needed. + * - Linux since GLib 2.26 + * - FreeBSD since GLib 2.26 + * - GNU/kFreeBSD since GLib 2.36 + * - Solaris, Illumos and OpenSolaris since GLib 2.40 + * - GNU/Hurd since GLib 2.40 + * + * Other ways to exchange credentials with a foreign peer includes the + * #GUnixCredentialsMessage type and g_socket_get_credentials() function. + * + * Returns: %TRUE on success, %FALSE if @error is set. + * Since: 2.26 */ /** - * g_volume_get_identifier: - * @volume: a #GVolume - * @kind: the kind of identifier to return + * g_unix_connection_send_credentials_async: + * @connection: A #GUnixConnection. + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied + * @user_data: (closure): the data to pass to callback function * - * Gets the identifier of the given kind for @volume. - * See the [introduction][volume-identifier] for more - * information about volume identifiers. + * Asynchronously send credentials. * - * Returns: a newly allocated string containing the - * requested identfier, or %NULL if the #GVolume - * doesn't have this kind of identifier + * For more details, see g_unix_connection_send_credentials() which is + * the synchronous version of this call. + * + * When the operation is finished, @callback will be called. You can then call + * g_unix_connection_send_credentials_finish() to get the result of the operation. + * + * Since: 2.32 */ /** - * g_volume_get_mount: - * @volume: a #GVolume + * g_unix_connection_send_credentials_finish: + * @connection: A #GUnixConnection. + * @result: a #GAsyncResult. + * @error: a #GError, or %NULL * - * Gets the mount for the @volume. + * Finishes an asynchronous send credentials operation started with + * g_unix_connection_send_credentials_async(). * - * Returns: (transfer full): a #GMount or %NULL if @volume isn't mounted. - * The returned object should be unreffed with g_object_unref() - * when no longer needed. + * Returns: %TRUE if the operation was successful, otherwise %FALSE. + * Since: 2.32 */ /** - * g_volume_get_name: - * @volume: a #GVolume + * g_unix_connection_send_fd: + * @connection: a #GUnixConnection + * @fd: a file descriptor + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore. + * @error: (nullable): #GError for error reporting, or %NULL to ignore. * - * Gets the name of @volume. + * Passes a file descriptor to the receiving side of the + * connection. The receiving end has to call g_unix_connection_receive_fd() + * to accept the file descriptor. * - * Returns: the name for the given @volume. The returned string should - * be freed with g_free() when no longer needed. + * As well as sending the fd this also writes a single byte to the + * stream, as this is required for fd passing to work on some + * implementations. + * + * Returns: a %TRUE on success, %NULL on error. + * Since: 2.22 */ /** - * g_volume_get_sort_key: - * @volume: a #GVolume + * g_unix_credentials_message_get_credentials: + * @message: A #GUnixCredentialsMessage. * - * Gets the sort key for @volume, if any. + * Gets the credentials stored in @message. * - * Returns: Sorting key for @volume or %NULL if no such key is available - * Since: 2.32 + * Returns: (transfer none): A #GCredentials instance. Do not free, it is owned by @message. + * Since: 2.26 */ /** - * g_volume_get_symbolic_icon: - * @volume: a #GVolume + * g_unix_credentials_message_is_supported: * - * Gets the symbolic icon for @volume. + * Checks if passing #GCredentials on a #GSocket is supported on this platform. * - * Returns: (transfer full): a #GIcon. - * The returned object should be unreffed with g_object_unref() - * when no longer needed. - * Since: 2.34 + * Returns: %TRUE if supported, %FALSE otherwise + * Since: 2.26 */ /** - * g_volume_get_uuid: - * @volume: a #GVolume + * g_unix_credentials_message_new: * - * Gets the UUID for the @volume. The reference is typically based on - * the file system UUID for the volume in question and should be - * considered an opaque string. Returns %NULL if there is no UUID - * available. + * Creates a new #GUnixCredentialsMessage with credentials matching the current processes. * - * Returns: the UUID for @volume or %NULL if no UUID can be computed. - * The returned string should be freed with g_free() - * when no longer needed. + * Returns: a new #GUnixCredentialsMessage + * Since: 2.26 */ /** - * g_volume_monitor_adopt_orphan_mount: - * @mount: a #GMount object to find a parent for - * - * This function should be called by any #GVolumeMonitor - * implementation when a new #GMount object is created that is not - * associated with a #GVolume object. It must be called just before - * emitting the @mount_added signal. - * - * If the return value is not %NULL, the caller must associate the - * returned #GVolume object with the #GMount. This involves returning - * it in its g_mount_get_volume() implementation. The caller must - * also listen for the "removed" signal on the returned object - * and give up its reference when handling that signal - * - * Similary, if implementing g_volume_monitor_adopt_orphan_mount(), - * the implementor must take a reference to @mount and return it in - * its g_volume_get_mount() implemented. Also, the implementor must - * listen for the "unmounted" signal on @mount and give up its - * reference upon handling that signal. - * - * There are two main use cases for this function. - * - * One is when implementing a user space file system driver that reads - * blocks of a block device that is already represented by the native - * volume monitor (for example a CD Audio file system driver). Such - * a driver will generate its own #GMount object that needs to be - * associated with the #GVolume object that represents the volume. + * g_unix_credentials_message_new_with_credentials: + * @credentials: A #GCredentials object. * - * The other is for implementing a #GVolumeMonitor whose sole purpose - * is to return #GVolume objects representing entries in the users - * "favorite servers" list or similar. + * Creates a new #GUnixCredentialsMessage holding @credentials. * - * Returns: (transfer full): the #GVolume object that is the parent for @mount or %NULL - * if no wants to adopt the #GMount. - * Deprecated: 2.20: Instead of using this function, #GVolumeMonitor - * implementations should instead create shadow mounts with the URI of - * the mount they intend to adopt. See the proxy volume monitor in - * gvfs for an example of this. Also see g_mount_is_shadowed(), - * g_mount_shadow() and g_mount_unshadow() functions. + * Returns: a new #GUnixCredentialsMessage + * Since: 2.26 */ /** - * g_volume_monitor_get: + * g_unix_fd_list_append: + * @list: a #GUnixFDList + * @fd: a valid open file descriptor + * @error: a #GError pointer + * + * Adds a file descriptor to @list. + * + * The file descriptor is duplicated using dup(). You keep your copy + * of the descriptor and the copy contained in @list will be closed + * when @list is finalized. * - * Gets the volume monitor used by gio. + * A possible cause of failure is exceeding the per-process or + * system-wide file descriptor limit. * - * Returns: (transfer full): a reference to the #GVolumeMonitor used by gio. Call - * g_object_unref() when done with it. + * The index of the file descriptor in the list is returned. If you use + * this index with g_unix_fd_list_get() then you will receive back a + * duplicated copy of the same file descriptor. + * + * Returns: the index of the appended fd in case of success, else -1 + * (and @error is set) + * Since: 2.24 */ /** - * g_volume_monitor_get_connected_drives: - * @volume_monitor: a #GVolumeMonitor. + * g_unix_fd_list_get: + * @list: a #GUnixFDList + * @index_: the index into the list + * @error: a #GError pointer * - * Gets a list of drives connected to the system. + * Gets a file descriptor out of @list. * - * The returned list should be freed with g_list_free(), after - * its elements have been unreffed with g_object_unref(). + * @index_ specifies the index of the file descriptor to get. It is a + * programmer error for @index_ to be out of range; see + * g_unix_fd_list_get_length(). * - * Returns: (element-type GDrive) (transfer full): a #GList of connected #GDrive objects. + * The file descriptor is duplicated using dup() and set as + * close-on-exec before being returned. You must call close() on it + * when you are done. + * + * A possible cause of failure is exceeding the per-process or + * system-wide file descriptor limit. + * + * Returns: the file descriptor, or -1 in case of error + * Since: 2.24 */ /** - * g_volume_monitor_get_mount_for_uuid: - * @volume_monitor: a #GVolumeMonitor. - * @uuid: the UUID to look for + * g_unix_fd_list_get_length: + * @list: a #GUnixFDList * - * Finds a #GMount object by its UUID (see g_mount_get_uuid()) + * Gets the length of @list (ie: the number of file descriptors + * contained within). * - * Returns: (transfer full): a #GMount or %NULL if no such mount is available. - * Free the returned object with g_object_unref(). + * Returns: the length of @list + * Since: 2.24 */ /** - * g_volume_monitor_get_mounts: - * @volume_monitor: a #GVolumeMonitor. - * - * Gets a list of the mounts on the system. + * g_unix_fd_list_new: * - * The returned list should be freed with g_list_free(), after - * its elements have been unreffed with g_object_unref(). + * Creates a new #GUnixFDList containing no file descriptors. * - * Returns: (element-type GMount) (transfer full): a #GList of #GMount objects. + * Returns: a new #GUnixFDList + * Since: 2.24 */ /** - * g_volume_monitor_get_volume_for_uuid: - * @volume_monitor: a #GVolumeMonitor. - * @uuid: the UUID to look for + * g_unix_fd_list_new_from_array: + * @fds: (array length=n_fds): the initial list of file descriptors + * @n_fds: the length of #fds, or -1 * - * Finds a #GVolume object by its UUID (see g_volume_get_uuid()) + * Creates a new #GUnixFDList containing the file descriptors given in + * @fds. The file descriptors become the property of the new list and + * may no longer be used by the caller. The array itself is owned by + * the caller. * - * Returns: (transfer full): a #GVolume or %NULL if no such volume is available. - * Free the returned object with g_object_unref(). + * Each file descriptor in the array should be set to close-on-exec. + * + * If @n_fds is -1 then @fds must be terminated with -1. + * + * Returns: a new #GUnixFDList + * Since: 2.24 */ /** - * g_volume_monitor_get_volumes: - * @volume_monitor: a #GVolumeMonitor. + * g_unix_fd_list_peek_fds: + * @list: a #GUnixFDList + * @length: (out) (optional): pointer to the length of the returned + * array, or %NULL * - * Gets a list of the volumes on the system. + * Returns the array of file descriptors that is contained in this + * object. * - * The returned list should be freed with g_list_free(), after - * its elements have been unreffed with g_object_unref(). + * After this call, the descriptors remain the property of @list. The + * caller must not close them and must not free the array. The array is + * valid only until @list is changed in any way. * - * Returns: (element-type GVolume) (transfer full): a #GList of #GVolume objects. + * If @length is non-%NULL then it is set to the number of file + * descriptors in the returned array. The returned array is also + * terminated with -1. + * + * This function never returns %NULL. In case there are no file + * descriptors contained in @list, an empty array is returned. + * + * Returns: (array length=length) (transfer none): an array of file + * descriptors + * Since: 2.24 */ /** - * g_volume_mount: (virtual mount_fn) - * @volume: a #GVolume - * @flags: flags affecting the operation - * @mount_operation: (nullable): a #GMountOperation or %NULL to avoid user interaction - * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore - * @callback: (nullable): a #GAsyncReadyCallback, or %NULL - * @user_data: user data that gets passed to @callback + * g_unix_fd_list_steal_fds: + * @list: a #GUnixFDList + * @length: (out) (optional): pointer to the length of the returned + * array, or %NULL * - * Mounts a volume. This is an asynchronous operation, and is - * finished by calling g_volume_mount_finish() with the @volume - * and #GAsyncResult returned in the @callback. + * Returns the array of file descriptors that is contained in this + * object. + * + * After this call, the descriptors are no longer contained in + * @list. Further calls will return an empty list (unless more + * descriptors have been added). + * + * The return result of this function must be freed with g_free(). + * The caller is also responsible for closing all of the file + * descriptors. The file descriptors in the array are set to + * close-on-exec. + * + * If @length is non-%NULL then it is set to the number of file + * descriptors in the returned array. The returned array is also + * terminated with -1. + * + * This function never returns %NULL. In case there are no file + * descriptors contained in @list, an empty array is returned. + * + * Returns: (array length=length) (transfer full): an array of file + * descriptors + * Since: 2.24 */ /** - * g_volume_mount_finish: - * @volume: a #GVolume - * @result: a #GAsyncResult - * @error: a #GError location to store an error, or %NULL to ignore + * g_unix_fd_message_append_fd: + * @message: a #GUnixFDMessage + * @fd: a valid open file descriptor + * @error: a #GError pointer * - * Finishes mounting a volume. If any errors occurred during the operation, - * @error will be set to contain the errors and %FALSE will be returned. + * Adds a file descriptor to @message. * - * If the mount operation succeeded, g_volume_get_mount() on @volume - * is guaranteed to return the mount right after calling this - * function; there's no need to listen for the 'mount-added' signal on - * #GVolumeMonitor. + * The file descriptor is duplicated using dup(). You keep your copy + * of the descriptor and the copy contained in @message will be closed + * when @message is finalized. * - * Returns: %TRUE, %FALSE if operation failed + * A possible cause of failure is exceeding the per-process or + * system-wide file descriptor limit. + * + * Returns: %TRUE in case of success, else %FALSE (and @error is set) + * Since: 2.22 */ /** - * g_volume_should_automount: - * @volume: a #GVolume + * g_unix_fd_message_get_fd_list: + * @message: a #GUnixFDMessage * - * Returns whether the volume should be automatically mounted. + * Gets the #GUnixFDList contained in @message. This function does not + * return a reference to the caller, but the returned list is valid for + * the lifetime of @message. * - * Returns: %TRUE if the volume should be automatically mounted + * Returns: (transfer none): the #GUnixFDList from @message + * Since: 2.24 */ /** - * g_win32_input_stream_get_close_handle: - * @stream: a #GWin32InputStream + * g_unix_fd_message_new: * - * Returns whether the handle of @stream will be - * closed when the stream is closed. + * Creates a new #GUnixFDMessage containing an empty file descriptor + * list. * - * Returns: %TRUE if the handle is closed when done - * Since: 2.26 + * Returns: a new #GUnixFDMessage + * Since: 2.22 */ /** - * g_win32_input_stream_get_handle: - * @stream: a #GWin32InputStream + * g_unix_fd_message_new_with_fd_list: + * @fd_list: a #GUnixFDList * - * Return the Windows file handle that the stream reads from. + * Creates a new #GUnixFDMessage containing @list. * - * Returns: The file handle of @stream - * Since: 2.26 + * Returns: a new #GUnixFDMessage + * Since: 2.24 */ /** - * g_win32_input_stream_new: - * @handle: a Win32 file handle - * @close_handle: %TRUE to close the handle when done + * g_unix_fd_message_steal_fds: + * @message: a #GUnixFDMessage + * @length: (out) (optional): pointer to the length of the returned + * array, or %NULL * - * Creates a new #GWin32InputStream for the given @handle. + * Returns the array of file descriptors that is contained in this + * object. * - * If @close_handle is %TRUE, the handle will be closed - * when the stream is closed. + * After this call, the descriptors are no longer contained in + * @message. Further calls will return an empty list (unless more + * descriptors have been added). * - * Note that "handle" here means a Win32 HANDLE, not a "file descriptor" - * as used in the Windows C libraries. + * The return result of this function must be freed with g_free(). + * The caller is also responsible for closing all of the file + * descriptors. * - * Returns: a new #GWin32InputStream + * If @length is non-%NULL then it is set to the number of file + * descriptors in the returned array. The returned array is also + * terminated with -1. + * + * This function never returns %NULL. In case there are no file + * descriptors contained in @message, an empty array is returned. + * + * Returns: (array length=length) (transfer full): an array of file + * descriptors + * Since: 2.22 */ /** - * g_win32_input_stream_set_close_handle: - * @stream: a #GWin32InputStream - * @close_handle: %TRUE to close the handle when done + * g_unix_input_stream_get_close_fd: + * @stream: a #GUnixInputStream * - * Sets whether the handle of @stream shall be closed - * when the stream is closed. + * Returns whether the file descriptor of @stream will be + * closed when the stream is closed. * - * Since: 2.26 + * Returns: %TRUE if the file descriptor is closed when done + * Since: 2.20 */ /** - * g_win32_output_stream_get_close_handle: - * @stream: a #GWin32OutputStream + * g_unix_input_stream_get_fd: + * @stream: a #GUnixInputStream * - * Returns whether the handle of @stream will be closed when the - * stream is closed. + * Return the UNIX file descriptor that the stream reads from. * - * Returns: %TRUE if the handle is closed when done - * Since: 2.26 + * Returns: The file descriptor of @stream + * Since: 2.20 */ /** - * g_win32_output_stream_get_handle: - * @stream: a #GWin32OutputStream + * g_unix_input_stream_new: + * @fd: a UNIX file descriptor + * @close_fd: %TRUE to close the file descriptor when done * - * Return the Windows handle that the stream writes to. + * Creates a new #GUnixInputStream for the given @fd. * - * Returns: The handle descriptor of @stream - * Since: 2.26 + * If @close_fd is %TRUE, the file descriptor will be closed + * when the stream is closed. + * + * Returns: a new #GUnixInputStream */ /** - * g_win32_output_stream_new: - * @handle: a Win32 file handle - * @close_handle: %TRUE to close the handle when done - * - * Creates a new #GWin32OutputStream for the given @handle. + * g_unix_input_stream_set_close_fd: + * @stream: a #GUnixInputStream + * @close_fd: %TRUE to close the file descriptor when done * - * If @close_handle, is %TRUE, the handle will be closed when the - * output stream is destroyed. + * Sets whether the file descriptor of @stream shall be closed + * when the stream is closed. * - * Returns: a new #GOutputStream - * Since: 2.26 + * Since: 2.20 */ /** - * g_win32_output_stream_set_close_handle: - * @stream: a #GWin32OutputStream - * @close_handle: %TRUE to close the handle when done + * g_unix_is_mount_path_system_internal: + * @mount_path: (type filename): a mount path, e.g. `/media/disk` or `/usr` * - * Sets whether the handle of @stream shall be closed when the stream - * is closed. + * Determines if @mount_path is considered an implementation of the + * OS. This is primarily used for hiding mountable and mounted volumes + * that only are used in the OS and has little to no relevance to the + * casual user. * - * Since: 2.26 + * Returns: %TRUE if @mount_path is considered an implementation detail + * of the OS. */ /** - * g_win32_registry_key_erase_change_indicator: - * @key: (in) (transfer none): a #GWin32RegistryKey + * g_unix_is_system_device_path: + * @device_path: a device path, e.g. `/dev/loop0` or `nfsd` * - * Erases change indicator of the @key. + * Determines if @device_path is considered a block device path which is only + * used in implementation of the OS. This is primarily used for hiding + * mounted volumes that are intended as APIs for programs to read, and system + * administrators at a shell; rather than something that should, for example, + * appear in a GUI. For example, the Linux `/proc` filesystem. * - * Subsequent calls to g_win32_registry_key_has_changed() will return %FALSE - * until the key is put on watch again by calling - * g_win32_registry_key_watch() again. + * The list of device paths considered ‘system’ ones may change over time. * - * Since: 2.46 + * Returns: %TRUE if @device_path is considered an implementation detail of + * the OS. + * Since: 2.56 */ /** - * g_win32_registry_key_get_child: - * @key: (in) (transfer none): a parent #GWin32RegistryKey - * @subkey: (in) (transfer none): name of a child key to open (in UTF-8), relative to @key - * @error: (inout) (optional) (nullable): a pointer to a %NULL #GError, or %NULL + * g_unix_is_system_fs_type: + * @fs_type: a file system type, e.g. `procfs` or `tmpfs` * - * Opens a @subkey of the @key. + * Determines if @fs_type is considered a type of file system which is only + * used in implementation of the OS. This is primarily used for hiding + * mounted volumes that are intended as APIs for programs to read, and system + * administrators at a shell; rather than something that should, for example, + * appear in a GUI. For example, the Linux `/proc` filesystem. * - * Returns: (nullable): a #GWin32RegistryKey or %NULL if can't be opened. Free - * with g_object_unref(). + * The list of file system types considered ‘system’ ones may change over time. + * + * Returns: %TRUE if @fs_type is considered an implementation detail of the OS. + * Since: 2.56 */ /** - * g_win32_registry_key_get_child_w: - * @key: (in) (transfer none): a parent #GWin32RegistryKey - * @subkey: (in) (transfer none): name of a child key to open (in UTF-8), relative to @key - * @error: (inout) (optional) (nullable): a pointer to a %NULL #GError, or %NULL + * g_unix_mount_at: + * @mount_path: (type filename): path for a possible unix mount. + * @time_read: (out) (optional): guint64 to contain a timestamp. * - * Opens a @subkey of the @key. + * Gets a #GUnixMountEntry for a given mount path. If @time_read + * is set, it will be filled with a unix timestamp for checking + * if the mounts have changed since with g_unix_mounts_changed_since(). * - * Returns: (nullable): a #GWin32RegistryKey or %NULL if can't be opened. Free - * with g_object_unref(). + * If more mounts have the same mount path, the last matching mount + * is returned. + * + * Returns: (transfer full): a #GUnixMountEntry. */ /** - * g_win32_registry_key_get_path: - * @key: (in) (transfer none): a #GWin32RegistryKey + * g_unix_mount_compare: + * @mount1: first #GUnixMountEntry to compare. + * @mount2: second #GUnixMountEntry to compare. * - * Get full path to the key + * Compares two unix mounts. * - * Returns: (transfer none): a full path to the key (in UTF-8), - * or %NULL if it can't be converted to UTF-8. - * Since: 2.46 + * Returns: 1, 0 or -1 if @mount1 is greater than, equal to, + * or less than @mount2, respectively. */ /** - * g_win32_registry_key_get_path_w: - * @key: (in) (transfer none): a #GWin32RegistryKey + * g_unix_mount_copy: + * @mount_entry: a #GUnixMountEntry. * - * Get full path to the key + * Makes a copy of @mount_entry. * - * Returns: (transfer none): a full path to the key (in UTF-16) - * Since: 2.46 + * Returns: (transfer full): a new #GUnixMountEntry + * Since: 2.54 */ /** - * g_win32_registry_key_get_value: - * @key: (in) (transfer none): a #GWin32RegistryKey - * @auto_expand: (in): %TRUE to automatically expand G_WIN32_REGISTRY_VALUE_EXPAND_STR - * to G_WIN32_REGISTRY_VALUE_STR. - * @value_name: (in) (transfer none): name of the value to get (in UTF-8). - * Empty string means the '(Default)' value. - * @value_type: (out) (optional): type of the value retrieved. - * @value_data: (out callee-allocates) (optional): contents of the value. - * @value_data_size: (out) (optional): size of the buffer pointed - * by @value_data. - * @error: (nullable): a pointer to %NULL #GError, or %NULL + * g_unix_mount_for: + * @file_path: (type filename): file path on some unix mount. + * @time_read: (out) (optional): guint64 to contain a timestamp. * - * Get data from a value of a key. String data is guaranteed to be - * appropriately terminated and will be in UTF-8. + * Gets a #GUnixMountEntry for a given file path. If @time_read + * is set, it will be filled with a unix timestamp for checking + * if the mounts have changed since with g_unix_mounts_changed_since(). * - * Returns: %TRUE on success, %FALSE on failure. - * Since: 2.46 + * If more mounts have the same mount path, the last matching mount + * is returned. + * + * Returns: (transfer full): a #GUnixMountEntry. + * Since: 2.52 */ /** - * g_win32_registry_key_get_value_w: - * @key: (in) (transfer none): a #GWin32RegistryKey - * @auto_expand: (in): %TRUE to automatically expand G_WIN32_REGISTRY_VALUE_EXPAND_STR - * to G_WIN32_REGISTRY_VALUE_STR. - * @value_name: (in) (transfer none): name of the value to get (in UTF-16). - * Empty string means the '(Default)' value. - * @value_type: (out) (optional): type of the value retrieved. - * @value_data: (out callee-allocates) (optional): contents of the value. - * @value_data_size: (out) (optional): size of the buffer pointed - * by @value_data. - * @error: (nullable): a pointer to %NULL #GError, or %NULL - * - * Get data from a value of a key. - * - * Get data from a value of a key. String data is guaranteed to be - * appropriately terminated and will be in UTF-16. - * - * When calling with value_data == NULL (to get data size without getting - * the data itself) remember that returned size corresponds to possibly - * unterminated string data (if value is some kind of string), because - * termination cannot be checked and fixed unless the data is retreived - * too. + * g_unix_mount_free: + * @mount_entry: a #GUnixMountEntry. * - * Returns: %TRUE on success, %FALSE on failure. - * Since: 2.46 + * Frees a unix mount. */ /** - * g_win32_registry_key_has_changed: - * @key: (in) (transfer none): a #GWin32RegistryKey + * g_unix_mount_get_device_path: + * @mount_entry: a #GUnixMount. * - * Check the @key's status indicator. + * Gets the device path for a unix mount. * - * Returns: %TRUE if the @key was put under watch at some point and has changed - * since then, %FALSE if it either wasn't changed or wasn't watched at all. - * Since: 2.46 + * Returns: (type filename): a string containing the device path. */ /** - * g_win32_registry_key_new: - * @path: absolute full name of a key to open (in UTF-8) - * @error: (nullable): a pointer to a %NULL #GError, or %NULL + * g_unix_mount_get_fs_type: + * @mount_entry: a #GUnixMount. * - * Creates an object that represents a registry key specified by @path. - * @path must start with one of the following pre-defined names: - * - HKEY_CLASSES_ROOT - * - HKEY_CURRENT_CONFIG - * - HKEY_CURRENT_USER - * - HKEY_CURRENT_USER_LOCAL_SETTINGS - * - HKEY_LOCAL_MACHINE - * - HKEY_PERFORMANCE_DATA - * - HKEY_PERFORMANCE_NLSTEXT - * - HKEY_PERFORMANCE_TEXT - * - HKEY_USERS - * @path must not end with '\\'. + * Gets the filesystem type for the unix mount. * - * Returns: (nullable) (transfer full): a #GWin32RegistryKey or %NULL if can't - * be opened. Free with g_object_unref(). + * Returns: a string containing the file system type. */ /** - * g_win32_registry_key_new_w: - * @path: (in) (transfer none): absolute full name of a key to open (in UTF-16) - * @error: (inout) (optional) (nullable): a pointer to a %NULL #GError, or %NULL + * g_unix_mount_get_mount_path: + * @mount_entry: input #GUnixMountEntry to get the mount path for. * - * Creates an object that represents a registry key specified by @path. - * @path must start with one of the following pre-defined names: - * - HKEY_CLASSES_ROOT - * - HKEY_CURRENT_CONFIG - * - HKEY_CURRENT_USER - * - HKEY_CURRENT_USER_LOCAL_SETTINGS - * - HKEY_LOCAL_MACHINE - * - HKEY_PERFORMANCE_DATA - * - HKEY_PERFORMANCE_NLSTEXT - * - HKEY_PERFORMANCE_TEXT - * - HKEY_USERS - * @path must not end with L'\\'. + * Gets the mount path for a unix mount. * - * Returns: (nullable) (transfer full): a #GWin32RegistryKey or %NULL if can't - * be opened. Free with g_object_unref(). + * Returns: (type filename): the mount path for @mount_entry. */ /** - * g_win32_registry_key_watch: - * @key: (in) (transfer none): a #GWin32RegistryKey - * @watch_children: (in): %TRUE also watch the children of the @key, %FALSE - * to watch the key only. - * @watch_flags: (in): specifies the types of changes to watch for. - * @callback: (in) (nullable): a function to invoke when a change occurs. - * @user_data: (in) (nullable): a pointer to pass to @callback on invocation. - * @error: (nullable): a pointer to %NULL #GError, or %NULL + * g_unix_mount_get_options: + * @mount_entry: a #GUnixMountEntry. * - * Puts @key under a watch. + * Gets a comma-separated list of mount options for the unix mount. For example, + * `rw,relatime,seclabel,data=ordered`. * - * When the key changes, an APC will be queued in the current thread. The APC - * will run when the current thread enters alertable state (GLib main loop - * should do that; if you are not using it, see MSDN documentation for W32API - * calls that put thread into alertable state). When it runs, it will - * atomically switch an indicator in the @key. If a callback was specified, - * it is invoked at that point. Subsequent calls to - * g_win32_registry_key_has_changed() will return %TRUE, and the callback (if - * it was specified) will not be invoked anymore. - * Calling g_win32_registry_key_erase_change_indicator() will reset the indicator, - * and g_win32_registry_key_has_changed() will start returning %FALSE. - * To resume the watch, call g_win32_registry_key_watch_for_changes() again. + * This is similar to g_unix_mount_point_get_options(), but it takes + * a #GUnixMountEntry as an argument. * - * Calling g_win32_registry_key_watch_for_changes() for a key that is already - * being watched is allowed and affects nothing. + * Returns: (nullable): a string containing the options, or %NULL if not + * available. + * Since: 2.58 + */ + + +/** + * g_unix_mount_get_root_path: + * @mount_entry: a #GUnixMountEntry. * - * The fact that the key is being watched will be used internally to update - * key path (if it changes). + * Gets the root of the mount within the filesystem. This is useful e.g. for + * mounts created by bind operation, or btrfs subvolumes. * - * Returns: %TRUE on success, %FALSE on failure. - * Since: 2.46 + * For example, the root path is equal to "/" for mount created by + * "mount /dev/sda1 /mnt/foo" and "/bar" for + * "mount --bind /mnt/foo/bar /mnt/bar". + * + * Returns: (nullable): a string containing the root, or %NULL if not supported. + * Since: 2.60 */ /** - * g_win32_registry_subkey_iter_assign: - * @iter: a #GWin32RegistrySubkeyIter - * @other: another #GWin32RegistrySubkeyIter - * - * Assigns the value of @other to @iter. This function - * is not useful in applications, because iterators can be assigned - * with `GWin32RegistrySubkeyIter i = j;`. The - * function is used by language bindings. + * g_unix_mount_guess_can_eject: + * @mount_entry: a #GUnixMountEntry * - * Since: 2.46 + * Guesses whether a Unix mount can be ejected. + * + * Returns: %TRUE if @mount_entry is deemed to be ejectable. */ /** - * g_win32_registry_subkey_iter_clear: - * @iter: (in) (transfer none): a #GWin32RegistrySubkeyIter + * g_unix_mount_guess_icon: + * @mount_entry: a #GUnixMountEntry * - * Frees internal buffers of a #GWin32RegistrySubkeyIter. + * Guesses the icon of a Unix mount. * - * Since: 2.46 + * Returns: (transfer full): a #GIcon */ /** - * g_win32_registry_subkey_iter_copy: - * @iter: an iterator + * g_unix_mount_guess_name: + * @mount_entry: a #GUnixMountEntry * - * Creates a dynamically-allocated copy of an iterator. Dynamically-allocated - * state of the iterator is duplicated too. + * Guesses the name of a Unix mount. + * The result is a translated string. * - * Returns: (transfer full): a copy of the @iter, - * free with g_win32_registry_subkey_iter_free () - * Since: 2.46 + * Returns: A newly allocated string that must + * be freed with g_free() */ /** - * g_win32_registry_subkey_iter_free: - * @iter: a dynamically-allocated iterator + * g_unix_mount_guess_should_display: + * @mount_entry: a #GUnixMountEntry * - * Free an iterator allocated on the heap. For iterators that are allocated - * on the stack use g_win32_registry_subkey_iter_clear () instead. + * Guesses whether a Unix mount should be displayed in the UI. * - * Since: 2.46 + * Returns: %TRUE if @mount_entry is deemed to be displayable. */ /** - * g_win32_registry_subkey_iter_get_name: - * @iter: (in) (transfer none): a #GWin32RegistrySubkeyIter - * @subkey_name: (out callee-allocates) (transfer none): Pointer to a location - * to store the name of a subkey (in UTF-8). Free with g_free(). - * @subkey_name_len: (out) (optional): Pointer to a location to store the - * length of @subkey_name, in gchars, excluding NUL-terminator. - * %NULL if length is not needed. - * @error: (nullable): a pointer to %NULL #GError, or %NULL + * g_unix_mount_guess_symbolic_icon: + * @mount_entry: a #GUnixMountEntry * - * Gets the name of the subkey at the @iter potision. + * Guesses the symbolic icon of a Unix mount. * - * Returns: %TRUE if the name was retrieved, %FALSE otherwise. - * Since: 2.46 + * Returns: (transfer full): a #GIcon + * Since: 2.34 */ /** - * g_win32_registry_subkey_iter_get_name_w: - * @iter: (in) (transfer none): a #GWin32RegistrySubkeyIter - * @subkey_name: (out callee-allocates) (transfer none): Pointer to a location - * to store the name of a subkey (in UTF-16). - * @subkey_name_len: (out) (optional) (transfer none): Pointer to a location - * to store the length of @subkey_name, in gunichar2s, excluding - * NUL-terminator. - * %NULL if length is not needed. - * @error: (nullable): a pointer to %NULL #GError, or %NULL + * g_unix_mount_guess_type: + * @mount_entry: a #GUnixMount. * - * Same as g_win32_registry_subkey_iter_get_next(), but outputs UTF-16-encoded - * data, without converting it to UTF-8 first. + * Guesses the type of a unix mount. If the mount type cannot be + * determined, returns %G_UNIX_MOUNT_TYPE_UNKNOWN. * - * Returns: %TRUE if the name was retrieved, %FALSE otherwise. - * Since: 2.46 + * Returns: a #GUnixMountType. */ /** - * g_win32_registry_subkey_iter_init: - * @iter: (in) (transfer none): a pointer to a #GWin32RegistrySubkeyIter - * @key: (in) (transfer none): a #GWin32RegistryKey to iterate over - * @error: (inout) (optional) (nullable): a pointer to %NULL #GError, or %NULL - * - * Initialises (without allocating) a #GWin32RegistrySubkeyIter. @iter may be - * completely uninitialised prior to this call; its old value is - * ignored. + * g_unix_mount_is_readonly: + * @mount_entry: a #GUnixMount. * - * The iterator remains valid for as long as @key exists. - * Clean up its internal buffers with a call to - * g_win32_registry_subkey_iter_clear() when done. + * Checks if a unix mount is mounted read only. * - * Returns: %TRUE if iterator was initialized successfully, %FALSE on error. - * Since: 2.46 + * Returns: %TRUE if @mount_entry is read only. */ /** - * g_win32_registry_subkey_iter_n_subkeys: - * @iter: (in) (transfer none): a #GWin32RegistrySubkeyIter + * g_unix_mount_is_system_internal: + * @mount_entry: a #GUnixMount. * - * Queries the number of subkeys items in the key that we are - * iterating over. This is the total number of subkeys -- not the number - * of items remaining. + * Checks if a Unix mount is a system mount. This is the Boolean OR of + * g_unix_is_system_fs_type(), g_unix_is_system_device_path() and + * g_unix_is_mount_path_system_internal() on @mount_entry’s properties. * - * This information is accurate at the point of iterator initialization, - * and may go out of sync with reality even while subkeys are enumerated. + * The definition of what a ‘system’ mount entry is may change over time as new + * file system types and device paths are ignored. * - * Returns: the number of subkeys in the key - * Since: 2.46 + * Returns: %TRUE if the unix mount is for a system path. */ /** - * g_win32_registry_subkey_iter_next: - * @iter: (in) (transfer none): a #GWin32RegistrySubkeyIter - * @skip_errors: (in): %TRUE if iterator should silently ignore errors (such as - * the actual number of subkeys being less than expected) and - * proceed forward - * @error: (nullable): a pointer to %NULL #GError, or %NULL - * - * Moves iterator to the next subkey. - * Enumeration errors can be ignored if @skip_errors is %TRUE + * g_unix_mount_monitor_get: * - * Here is an example for iterating with g_win32_registry_subkey_iter_next(): - * |[ - * // recursively iterate a key - * void - * iterate_key_recursive (GWin32RegistryKey *key) - * { - * GWin32RegistrySubkeyIter iter; - * gchar *name; - * GWin32RegistryKey *child; + * Gets the #GUnixMountMonitor for the current thread-default main + * context. * - * if (!g_win32_registry_subkey_iter_init (&iter, key, NULL)) - * return; + * The mount monitor can be used to monitor for changes to the list of + * mounted filesystems as well as the list of mount points (ie: fstab + * entries). * - * while (g_win32_registry_subkey_iter_next (&iter, TRUE, NULL)) - * { - * if (!g_win32_registry_subkey_iter_get_name (&iter, &name, NULL, NULL)) - * continue; + * You must only call g_object_unref() on the return value from under + * the same main context as you called this function. * - * g_print ("subkey '%s'\n", name); - * child = g_win32_registry_key_get_child (key, name, NULL); + * Returns: (transfer full): the #GUnixMountMonitor. + * Since: 2.44 + */ + + +/** + * g_unix_mount_monitor_new: * - * if (child) - * iterate_key_recursive (child); - * } + * Deprecated alias for g_unix_mount_monitor_get(). * - * g_win32_registry_subkey_iter_clear (&iter); - * } - * ]| + * This function was never a true constructor, which is why it was + * renamed. * - * Returns: %TRUE if next subkey info was retrieved, %FALSE otherwise. - * Since: 2.46 + * Returns: a #GUnixMountMonitor. + * Deprecated: 2.44: Use g_unix_mount_monitor_get() instead. */ /** - * g_win32_registry_value_iter_assign: - * @iter: a #GWin32RegistryValueIter - * @other: another #GWin32RegistryValueIter + * g_unix_mount_monitor_set_rate_limit: + * @mount_monitor: a #GUnixMountMonitor + * @limit_msec: a integer with the limit in milliseconds to + * poll for changes. * - * Assigns the value of @other to @iter. This function - * is not useful in applications, because iterators can be assigned - * with `GWin32RegistryValueIter i = j;`. The - * function is used by language bindings. + * This function does nothing. * - * Since: 2.46 + * Before 2.44, this was a partially-effective way of controlling the + * rate at which events would be reported under some uncommon + * circumstances. Since @mount_monitor is a singleton, it also meant + * that calling this function would have side effects for other users of + * the monitor. + * + * Since: 2.18 + * Deprecated: 2.44: This function does nothing. Don't call it. */ /** - * g_win32_registry_value_iter_clear: - * @iter: (in) (transfer none): a #GWin32RegistryValueIter + * g_unix_mount_point_compare: + * @mount1: a #GUnixMount. + * @mount2: a #GUnixMount. * - * Frees internal buffers of a #GWin32RegistryValueIter. + * Compares two unix mount points. * - * Since: 2.46 + * Returns: 1, 0 or -1 if @mount1 is greater than, equal to, + * or less than @mount2, respectively. */ /** - * g_win32_registry_value_iter_copy: - * @iter: an iterator + * g_unix_mount_point_copy: + * @mount_point: a #GUnixMountPoint. * - * Creates a dynamically-allocated copy of an iterator. Dynamically-allocated - * state of the iterator is duplicated too. + * Makes a copy of @mount_point. * - * Returns: (transfer full): a copy of the @iter, - * free with g_win32_registry_value_iter_free (). - * Since: 2.46 + * Returns: (transfer full): a new #GUnixMountPoint + * Since: 2.54 */ /** - * g_win32_registry_value_iter_free: - * @iter: a dynamically-allocated iterator - * - * Free an iterator allocated on the heap. For iterators that are allocated - * on the stack use g_win32_registry_value_iter_clear () instead. + * g_unix_mount_point_free: + * @mount_point: unix mount point to free. * - * Since: 2.46 + * Frees a unix mount point. */ /** - * g_win32_registry_value_iter_get_data: - * @iter: (in) (transfer none): a #GWin32RegistryValueIter - * @auto_expand: (in): %TRUE to automatically expand G_WIN32_REGISTRY_VALUE_EXPAND_STR to - * G_WIN32_REGISTRY_VALUE_STR - * @value_data: (out callee-allocates) (optional) (transfer none): Pointer to a - * location to store the data of the value (in UTF-8, if it's a string) - * @value_data_size: (out) (optional): Pointer to a location to store the length - * of @value_data, in bytes (including any NUL-terminators, if it's a string). - * %NULL if length is not needed - * @error: (nullable): a pointer to %NULL #GError, or %NULL + * g_unix_mount_point_get_device_path: + * @mount_point: a #GUnixMountPoint. * - * Stores the data of the value currently being iterated over in @value_data, - * and its length - in @value_data_len (if not %NULL). + * Gets the device path for a unix mount point. * - * Returns: %TRUE if value data was retrieved, %FALSE otherwise. - * Since: 2.46 + * Returns: (type filename): a string containing the device path. */ /** - * g_win32_registry_value_iter_get_data_w: - * @iter: (in) (transfer none): a #GWin32RegistryValueIter - * @auto_expand: (in): %TRUE to automatically expand G_WIN32_REGISTRY_VALUE_EXPAND_STR to - * G_WIN32_REGISTRY_VALUE_STR - * @value_data: (out callee-allocates) (optional) (transfer none): Pointer to a - * location to store the data of the value (in UTF-16, if it's a string) - * @value_data_size: (out) (optional): Pointer to a location to store the size - * of @value_data, in bytes (including any NUL-terminators, if it's a string). - * %NULL if length is not needed. - * @error: (nullable): a pointer to %NULL #GError, or %NULL + * g_unix_mount_point_get_fs_type: + * @mount_point: a #GUnixMountPoint. * - * Stores the data of the value currently being iterated over in @value_data, - * and its length - in @value_data_len (if not %NULL). + * Gets the file system type for the mount point. * - * Returns: %TRUE if value data was retrieved, %FALSE otherwise. - * Since: 2.46 + * Returns: a string containing the file system type. */ /** - * g_win32_registry_value_iter_get_name: - * @iter: (in) (transfer none): a #GWin32RegistryValueIter - * @value_name: (out callee-allocates) (transfer none): Pointer to a location - * to store the name of a value (in UTF-8). - * @value_name_len: (out) (optional): Pointer to a location to store the length - * of @value_name, in gchars, excluding NUL-terminator. - * %NULL if length is not needed. - * @error: (nullable): a pointer to %NULL #GError, or %NULL + * g_unix_mount_point_get_mount_path: + * @mount_point: a #GUnixMountPoint. * - * Stores the name of the value currently being iterated over in @value_name, - * and its length - in @value_name_len (if not %NULL). + * Gets the mount path for a unix mount point. * - * Returns: %TRUE if value name was retrieved, %FALSE otherwise. - * Since: 2.46 + * Returns: (type filename): a string containing the mount path. */ /** - * g_win32_registry_value_iter_get_name_w: - * @iter: (in) (transfer none): a #GWin32RegistryValueIter - * @value_name: (out callee-allocates) (transfer none): Pointer to a location - * to store the name of a value (in UTF-16). - * @value_name_len: (out) (optional): Pointer to a location to store the length - * of @value_name, in gunichar2s, excluding NUL-terminator. - * %NULL if length is not needed. - * @error: (nullable): a pointer to %NULL #GError, or %NULL + * g_unix_mount_point_get_options: + * @mount_point: a #GUnixMountPoint. * - * Stores the name of the value currently being iterated over in @value_name, - * and its length - in @value_name (if not %NULL). + * Gets the options for the mount point. * - * Returns: %TRUE if value name was retrieved, %FALSE otherwise. - * Since: 2.46 + * Returns: a string containing the options. + * Since: 2.32 */ /** - * g_win32_registry_value_iter_get_value_type: - * @iter: (in) (transfer none): a #GWin32RegistryValueIter - * @value_type: (out): Pointer to a location to store the type of - * the value. - * @error: (nullable): a pointer to %NULL #GError, or %NULL + * g_unix_mount_point_guess_can_eject: + * @mount_point: a #GUnixMountPoint * - * Stores the type of the value currently being iterated over in @value_type. + * Guesses whether a Unix mount point can be ejected. * - * Returns: %TRUE if value type was retrieved, %FALSE otherwise. - * Since: 2.46 + * Returns: %TRUE if @mount_point is deemed to be ejectable. */ /** - * g_win32_registry_value_iter_init: - * @iter: (in) (transfer none): a pointer to a #GWin32RegistryValueIter - * @key: (in) (transfer none): a #GWin32RegistryKey to iterate over - * @error: (nullable): a pointer to %NULL #GError, or %NULL - * - * Initialises (without allocating) a #GWin32RegistryValueIter. @iter may be - * completely uninitialised prior to this call; its old value is - * ignored. + * g_unix_mount_point_guess_icon: + * @mount_point: a #GUnixMountPoint * - * The iterator remains valid for as long as @key exists. - * Clean up its internal buffers with a call to - * g_win32_registry_value_iter_clear() when done. + * Guesses the icon of a Unix mount point. * - * Returns: %TRUE if iterator was initialized successfully, %FALSE on error. - * Since: 2.46 + * Returns: (transfer full): a #GIcon */ /** - * g_win32_registry_value_iter_n_values: - * @iter: (in) (transfer none): a #GWin32RegistryValueIter - * - * Queries the number of values items in the key that we are - * iterating over. This is the total number of values -- not the number - * of items remaining. + * g_unix_mount_point_guess_name: + * @mount_point: a #GUnixMountPoint * - * This information is accurate at the point of iterator initialization, - * and may go out of sync with reality even while values are enumerated. + * Guesses the name of a Unix mount point. + * The result is a translated string. * - * Returns: the number of values in the key - * Since: 2.46 + * Returns: A newly allocated string that must + * be freed with g_free() */ /** - * g_win32_registry_value_iter_next: - * @iter: (in) (transfer none): a #GWin32RegistryValueIter - * @skip_errors: (in): %TRUE if iterator should silently ignore errors (such as - * the actual number of values being less than expected) and - * proceed forward - * @error: (nullable): a pointer to %NULL #GError, or %NULL - * - * Advances iterator to the next value in the key. If no more values remain then - * FALSE is returned. - * Enumeration errors can be ignored if @skip_errors is %TRUE - * - * Here is an example for iterating with g_win32_registry_value_iter_next(): - * |[ - * // iterate values of a key - * void - * iterate_values_recursive (GWin32RegistryKey *key) - * { - * GWin32RegistryValueIter iter; - * gchar *name; - * GWin32RegistryValueType val_type; - * gchar *val_data; - * - * if (!g_win32_registry_value_iter_init (&iter, key, NULL)) - * return; - * - * while (g_win32_registry_value_iter_next (&iter, TRUE, NULL)) - * { - * if ((!g_win32_registry_value_iter_get_value_type (&iter, &value)) || - * ((val_type != G_WIN32_REGISTRY_VALUE_STR) && - * (val_type != G_WIN32_REGISTRY_VALUE_EXPAND_STR))) - * continue; - * - * if (g_win32_registry_value_iter_get_value (&iter, TRUE, &name, NULL, - * &val_data, NULL, NULL)) - * g_print ("value '%s' = '%s'\n", name, val_data); - * } + * g_unix_mount_point_guess_symbolic_icon: + * @mount_point: a #GUnixMountPoint * - * g_win32_registry_value_iter_clear (&iter); - * } - * ]| + * Guesses the symbolic icon of a Unix mount point. * - * Returns: %TRUE if next value info was retrieved, %FALSE otherwise. - * Since: 2.46 + * Returns: (transfer full): a #GIcon + * Since: 2.34 */ /** - * g_zlib_compressor_get_file_info: - * @compressor: a #GZlibCompressor + * g_unix_mount_point_guess_type: + * @mount_point: a #GUnixMountPoint. * - * Returns the #GZlibCompressor:file-info property. + * Guesses the type of a unix mount point. + * If the mount type cannot be determined, + * returns %G_UNIX_MOUNT_TYPE_UNKNOWN. * - * Returns: (transfer none): a #GFileInfo, or %NULL - * Since: 2.26 + * Returns: a #GUnixMountType. */ /** - * g_zlib_compressor_new: - * @format: The format to use for the compressed data - * @level: compression level (0-9), -1 for default + * g_unix_mount_point_is_loopback: + * @mount_point: a #GUnixMountPoint. * - * Creates a new #GZlibCompressor. + * Checks if a unix mount point is a loopback device. * - * Returns: a new #GZlibCompressor - * Since: 2.24 + * Returns: %TRUE if the mount point is a loopback. %FALSE otherwise. */ /** - * g_zlib_compressor_set_file_info: - * @compressor: a #GZlibCompressor - * @file_info: (nullable): a #GFileInfo - * - * Sets @file_info in @compressor. If non-%NULL, and @compressor's - * #GZlibCompressor:format property is %G_ZLIB_COMPRESSOR_FORMAT_GZIP, - * it will be used to set the file name and modification time in - * the GZIP header of the compressed data. + * g_unix_mount_point_is_readonly: + * @mount_point: a #GUnixMountPoint. * - * Note: it is an error to call this function while a compression is in - * progress; it may only be called immediately after creation of @compressor, - * or after resetting it with g_converter_reset(). + * Checks if a unix mount point is read only. * - * Since: 2.26 + * Returns: %TRUE if a mount point is read only. */ /** - * g_zlib_decompressor_get_file_info: - * @decompressor: a #GZlibDecompressor + * g_unix_mount_point_is_user_mountable: + * @mount_point: a #GUnixMountPoint. * - * Retrieves the #GFileInfo constructed from the GZIP header data - * of compressed data processed by @compressor, or %NULL if @decompressor's - * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP, - * or the header data was not fully processed yet, or it not present in the - * data stream at all. + * Checks if a unix mount point is mountable by the user. * - * Returns: (transfer none): a #GFileInfo, or %NULL - * Since: 2.26 + * Returns: %TRUE if the mount point is user mountable. */ /** - * g_zlib_decompressor_new: - * @format: The format to use for the compressed data + * g_unix_mount_points_changed_since: + * @time: guint64 to contain a timestamp. * - * Creates a new #GZlibDecompressor. + * Checks if the unix mount points have changed since a given unix time. * - * Returns: a new #GZlibDecompressor - * Since: 2.24 + * Returns: %TRUE if the mount points have changed since @time. */ /** - * get_viewable_logical_drives: + * g_unix_mount_points_get: + * @time_read: (out) (optional): guint64 to contain a timestamp. * - * Returns the list of logical and viewable drives as defined by - * GetLogicalDrives() and the registry keys - * Software\Microsoft\Windows\CurrentVersion\Policies\Explorer under - * HKLM or HKCU. If neither key exists the result of - * GetLogicalDrives() is returned. + * Gets a #GList of #GUnixMountPoint containing the unix mount points. + * If @time_read is set, it will be filled with the mount timestamp, + * allowing for checking if the mounts have changed with + * g_unix_mount_points_changed_since(). * - * Returns: bitmask with same meaning as returned by GetLogicalDrives() + * Returns: (element-type GUnixMountPoint) (transfer full): + * a #GList of the UNIX mountpoints. */ /** - * gxdp_documents_call_add: - * @proxy: A #GXdpDocumentsProxy. - * @arg_o_path_fd: Argument to pass with the method invocation. - * @arg_reuse_existing: Argument to pass with the method invocation. - * @arg_persistent: Argument to pass with the method invocation. - * @fd_list: (allow-none): A #GUnixFDList or %NULL. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_unix_mounts_changed_since: + * @time: guint64 to contain a timestamp. * - * Asynchronously invokes the Add() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_documents_call_add_finish() to get the result of the operation. + * Checks if the unix mounts have changed since a given unix time. * - * See gxdp_documents_call_add_sync() for the synchronous, blocking version of this method. + * Returns: %TRUE if the mounts have changed since @time. */ /** - * gxdp_documents_call_add_finish: - * @proxy: A #GXdpDocumentsProxy. - * @out_doc_id: (out): Return location for return parameter or %NULL to ignore. - * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_documents_call_add(). - * @error: Return location for error or %NULL. + * g_unix_mounts_get: + * @time_read: (out) (optional): guint64 to contain a timestamp, or %NULL * - * Finishes an operation started with gxdp_documents_call_add(). + * Gets a #GList of #GUnixMountEntry containing the unix mounts. + * If @time_read is set, it will be filled with the mount + * timestamp, allowing for checking if the mounts have changed + * with g_unix_mounts_changed_since(). * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: (element-type GUnixMountEntry) (transfer full): + * a #GList of the UNIX mounts. */ /** - * gxdp_documents_call_add_full: - * @proxy: A #GXdpDocumentsProxy. - * @arg_o_path_fds: Argument to pass with the method invocation. - * @arg_flags: Argument to pass with the method invocation. - * @arg_app_id: Argument to pass with the method invocation. - * @arg_permissions: Argument to pass with the method invocation. - * @fd_list: (allow-none): A #GUnixFDList or %NULL. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_unix_output_stream_get_close_fd: + * @stream: a #GUnixOutputStream * - * Asynchronously invokes the AddFull() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_documents_call_add_full_finish() to get the result of the operation. + * Returns whether the file descriptor of @stream will be + * closed when the stream is closed. * - * See gxdp_documents_call_add_full_sync() for the synchronous, blocking version of this method. + * Returns: %TRUE if the file descriptor is closed when done + * Since: 2.20 */ /** - * gxdp_documents_call_add_full_finish: - * @proxy: A #GXdpDocumentsProxy. - * @out_doc_ids: (out): Return location for return parameter or %NULL to ignore. - * @out_extra_out: (out): Return location for return parameter or %NULL to ignore. - * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_documents_call_add_full(). - * @error: Return location for error or %NULL. + * g_unix_output_stream_get_fd: + * @stream: a #GUnixOutputStream * - * Finishes an operation started with gxdp_documents_call_add_full(). + * Return the UNIX file descriptor that the stream writes to. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: The file descriptor of @stream + * Since: 2.20 */ /** - * gxdp_documents_call_add_full_sync: - * @proxy: A #GXdpDocumentsProxy. - * @arg_o_path_fds: Argument to pass with the method invocation. - * @arg_flags: Argument to pass with the method invocation. - * @arg_app_id: Argument to pass with the method invocation. - * @arg_permissions: Argument to pass with the method invocation. - * @fd_list: (allow-none): A #GUnixFDList or %NULL. - * @out_doc_ids: (out): Return location for return parameter or %NULL to ignore. - * @out_extra_out: (out): Return location for return parameter or %NULL to ignore. - * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * g_unix_output_stream_new: + * @fd: a UNIX file descriptor + * @close_fd: %TRUE to close the file descriptor when done * - * Synchronously invokes the AddFull() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * Creates a new #GUnixOutputStream for the given @fd. * - * See gxdp_documents_call_add_full() for the asynchronous version of this method. + * If @close_fd, is %TRUE, the file descriptor will be closed when + * the output stream is destroyed. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: a new #GOutputStream */ /** - * gxdp_documents_call_add_named: - * @proxy: A #GXdpDocumentsProxy. - * @arg_o_path_parent_fd: Argument to pass with the method invocation. - * @arg_filename: Argument to pass with the method invocation. - * @arg_reuse_existing: Argument to pass with the method invocation. - * @arg_persistent: Argument to pass with the method invocation. - * @fd_list: (allow-none): A #GUnixFDList or %NULL. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_unix_output_stream_set_close_fd: + * @stream: a #GUnixOutputStream + * @close_fd: %TRUE to close the file descriptor when done * - * Asynchronously invokes the AddNamed() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_documents_call_add_named_finish() to get the result of the operation. + * Sets whether the file descriptor of @stream shall be closed + * when the stream is closed. * - * See gxdp_documents_call_add_named_sync() for the synchronous, blocking version of this method. + * Since: 2.20 */ /** - * gxdp_documents_call_add_named_finish: - * @proxy: A #GXdpDocumentsProxy. - * @out_doc_id: (out): Return location for return parameter or %NULL to ignore. - * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_documents_call_add_named(). - * @error: Return location for error or %NULL. + * g_unix_socket_address_abstract_names_supported: * - * Finishes an operation started with gxdp_documents_call_add_named(). + * Checks if abstract UNIX domain socket names are supported. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: %TRUE if supported, %FALSE otherwise + * Since: 2.22 */ /** - * gxdp_documents_call_add_named_sync: - * @proxy: A #GXdpDocumentsProxy. - * @arg_o_path_parent_fd: Argument to pass with the method invocation. - * @arg_filename: Argument to pass with the method invocation. - * @arg_reuse_existing: Argument to pass with the method invocation. - * @arg_persistent: Argument to pass with the method invocation. - * @fd_list: (allow-none): A #GUnixFDList or %NULL. - * @out_doc_id: (out): Return location for return parameter or %NULL to ignore. - * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the AddNamed() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * g_unix_socket_address_get_address_type: + * @address: a #GInetSocketAddress * - * See gxdp_documents_call_add_named() for the asynchronous version of this method. + * Gets @address's type. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: a #GUnixSocketAddressType + * Since: 2.26 */ /** - * gxdp_documents_call_add_sync: - * @proxy: A #GXdpDocumentsProxy. - * @arg_o_path_fd: Argument to pass with the method invocation. - * @arg_reuse_existing: Argument to pass with the method invocation. - * @arg_persistent: Argument to pass with the method invocation. - * @fd_list: (allow-none): A #GUnixFDList or %NULL. - * @out_doc_id: (out): Return location for return parameter or %NULL to ignore. - * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the Add() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * g_unix_socket_address_get_is_abstract: + * @address: a #GInetSocketAddress * - * See gxdp_documents_call_add() for the asynchronous version of this method. + * Tests if @address is abstract. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: %TRUE if the address is abstract, %FALSE otherwise + * Since: 2.22 + * Deprecated: Use g_unix_socket_address_get_address_type() */ /** - * gxdp_documents_call_delete: - * @proxy: A #GXdpDocumentsProxy. - * @arg_doc_id: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_unix_socket_address_get_path: + * @address: a #GInetSocketAddress * - * Asynchronously invokes the Delete() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_documents_call_delete_finish() to get the result of the operation. + * Gets @address's path, or for abstract sockets the "name". + * + * Guaranteed to be zero-terminated, but an abstract socket + * may contain embedded zeros, and thus you should use + * g_unix_socket_address_get_path_len() to get the true length + * of this string. * - * See gxdp_documents_call_delete_sync() for the synchronous, blocking version of this method. + * Returns: the path for @address + * Since: 2.22 */ /** - * gxdp_documents_call_delete_finish: - * @proxy: A #GXdpDocumentsProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_documents_call_delete(). - * @error: Return location for error or %NULL. + * g_unix_socket_address_get_path_len: + * @address: a #GInetSocketAddress + * + * Gets the length of @address's path. * - * Finishes an operation started with gxdp_documents_call_delete(). + * For details, see g_unix_socket_address_get_path(). * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: the length of the path + * Since: 2.22 */ /** - * gxdp_documents_call_delete_sync: - * @proxy: A #GXdpDocumentsProxy. - * @arg_doc_id: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * g_unix_socket_address_new: + * @path: the socket path * - * Synchronously invokes the Delete() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * Creates a new #GUnixSocketAddress for @path. * - * See gxdp_documents_call_delete() for the asynchronous version of this method. + * To create abstract socket addresses, on systems that support that, + * use g_unix_socket_address_new_abstract(). * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: a new #GUnixSocketAddress + * Since: 2.22 */ /** - * gxdp_documents_call_get_mount_point: - * @proxy: A #GXdpDocumentsProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_unix_socket_address_new_abstract: + * @path: (array length=path_len) (element-type gchar): the abstract name + * @path_len: the length of @path, or -1 * - * Asynchronously invokes the GetMountPoint() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_documents_call_get_mount_point_finish() to get the result of the operation. + * Creates a new %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED + * #GUnixSocketAddress for @path. * - * See gxdp_documents_call_get_mount_point_sync() for the synchronous, blocking version of this method. + * Returns: a new #GUnixSocketAddress + * Deprecated: Use g_unix_socket_address_new_with_type(). */ /** - * gxdp_documents_call_get_mount_point_finish: - * @proxy: A #GXdpDocumentsProxy. - * @out_path: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_documents_call_get_mount_point(). - * @error: Return location for error or %NULL. + * g_unix_socket_address_new_with_type: + * @path: (array length=path_len) (element-type gchar): the name + * @path_len: the length of @path, or -1 + * @type: a #GUnixSocketAddressType * - * Finishes an operation started with gxdp_documents_call_get_mount_point(). + * Creates a new #GUnixSocketAddress of type @type with name @path. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * gxdp_documents_call_get_mount_point_sync: - * @proxy: A #GXdpDocumentsProxy. - * @out_path: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * If @type is %G_UNIX_SOCKET_ADDRESS_PATH, this is equivalent to + * calling g_unix_socket_address_new(). + * + * If @type is %G_UNIX_SOCKET_ADDRESS_ANONYMOUS, @path and @path_len will be + * ignored. + * + * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT, then @path_len + * bytes of @path will be copied to the socket's path, and only those + * bytes will be considered part of the name. (If @path_len is -1, + * then @path is assumed to be NUL-terminated.) For example, if @path + * was "test", then calling g_socket_address_get_native_size() on the + * returned socket would return 7 (2 bytes of overhead, 1 byte for the + * abstract-socket indicator byte, and 4 bytes for the name "test"). * - * Synchronously invokes the GetMountPoint() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED, then + * @path_len bytes of @path will be copied to the socket's path, the + * rest of the path will be padded with 0 bytes, and the entire + * zero-padded buffer will be considered the name. (As above, if + * @path_len is -1, then @path is assumed to be NUL-terminated.) In + * this case, g_socket_address_get_native_size() will always return + * the full size of a `struct sockaddr_un`, although + * g_unix_socket_address_get_path_len() will still return just the + * length of @path. * - * See gxdp_documents_call_get_mount_point() for the asynchronous version of this method. + * %G_UNIX_SOCKET_ADDRESS_ABSTRACT is preferred over + * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED for new programs. Of course, + * when connecting to a server created by another process, you must + * use the appropriate type corresponding to how that process created + * its listening socket. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: a new #GUnixSocketAddress + * Since: 2.26 */ /** - * gxdp_documents_call_grant_permissions: - * @proxy: A #GXdpDocumentsProxy. - * @arg_doc_id: Argument to pass with the method invocation. - * @arg_app_id: Argument to pass with the method invocation. - * @arg_permissions: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_vfs_get_default: * - * Asynchronously invokes the GrantPermissions() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_documents_call_grant_permissions_finish() to get the result of the operation. + * Gets the default #GVfs for the system. * - * See gxdp_documents_call_grant_permissions_sync() for the synchronous, blocking version of this method. + * Returns: (transfer none): a #GVfs. */ /** - * gxdp_documents_call_grant_permissions_finish: - * @proxy: A #GXdpDocumentsProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_documents_call_grant_permissions(). - * @error: Return location for error or %NULL. + * g_vfs_get_file_for_path: + * @vfs: a #GVfs. + * @path: a string containing a VFS path. * - * Finishes an operation started with gxdp_documents_call_grant_permissions(). + * Gets a #GFile for @path. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: (transfer full): a #GFile. + * Free the returned object with g_object_unref(). */ /** - * gxdp_documents_call_grant_permissions_sync: - * @proxy: A #GXdpDocumentsProxy. - * @arg_doc_id: Argument to pass with the method invocation. - * @arg_app_id: Argument to pass with the method invocation. - * @arg_permissions: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * g_vfs_get_file_for_uri: + * @vfs: a#GVfs. + * @uri: a string containing a URI * - * Synchronously invokes the GrantPermissions() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * Gets a #GFile for @uri. * - * See gxdp_documents_call_grant_permissions() for the asynchronous version of this method. + * This operation never fails, but the returned object + * might not support any I/O operation if the URI + * is malformed or if the URI scheme is not supported. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: (transfer full): a #GFile. + * Free the returned object with g_object_unref(). */ /** - * gxdp_documents_call_info: - * @proxy: A #GXdpDocumentsProxy. - * @arg_doc_id: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_vfs_get_local: * - * Asynchronously invokes the Info() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_documents_call_info_finish() to get the result of the operation. + * Gets the local #GVfs for the system. * - * See gxdp_documents_call_info_sync() for the synchronous, blocking version of this method. + * Returns: (transfer none): a #GVfs. */ /** - * gxdp_documents_call_info_finish: - * @proxy: A #GXdpDocumentsProxy. - * @out_path: (out): Return location for return parameter or %NULL to ignore. - * @out_apps: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_documents_call_info(). - * @error: Return location for error or %NULL. + * g_vfs_get_supported_uri_schemes: + * @vfs: a #GVfs. * - * Finishes an operation started with gxdp_documents_call_info(). + * Gets a list of URI schemes supported by @vfs. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: (transfer none): a %NULL-terminated array of strings. + * The returned array belongs to GIO and must + * not be freed or modified. */ /** - * gxdp_documents_call_info_sync: - * @proxy: A #GXdpDocumentsProxy. - * @arg_doc_id: Argument to pass with the method invocation. - * @out_path: (out): Return location for return parameter or %NULL to ignore. - * @out_apps: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the Info() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * g_vfs_is_active: + * @vfs: a #GVfs. * - * See gxdp_documents_call_info() for the asynchronous version of this method. + * Checks if the VFS is active. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: %TRUE if construction of the @vfs was successful + * and it is now active. */ /** - * gxdp_documents_call_list: - * @proxy: A #GXdpDocumentsProxy. - * @arg_app_id: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_vfs_parse_name: + * @vfs: a #GVfs. + * @parse_name: a string to be parsed by the VFS module. * - * Asynchronously invokes the List() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_documents_call_list_finish() to get the result of the operation. + * This operation never fails, but the returned object might + * not support any I/O operations if the @parse_name cannot + * be parsed by the #GVfs module. * - * See gxdp_documents_call_list_sync() for the synchronous, blocking version of this method. + * Returns: (transfer full): a #GFile for the given @parse_name. + * Free the returned object with g_object_unref(). */ /** - * gxdp_documents_call_list_finish: - * @proxy: A #GXdpDocumentsProxy. - * @out_docs: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_documents_call_list(). - * @error: Return location for error or %NULL. + * g_vfs_register_uri_scheme: + * @vfs: a #GVfs + * @scheme: an URI scheme, e.g. "http" + * @uri_func: (scope notified) (nullable): a #GVfsFileLookupFunc + * @uri_data: (nullable): custom data passed to be passed to @uri_func, or %NULL + * @uri_destroy: (nullable): function to be called when unregistering the + * URI scheme, or when @vfs is disposed, to free the resources used + * by the URI lookup function + * @parse_name_func: (scope notified) (nullable): a #GVfsFileLookupFunc + * @parse_name_data: (nullable): custom data passed to be passed to + * @parse_name_func, or %NULL + * @parse_name_destroy: (nullable): function to be called when unregistering the + * URI scheme, or when @vfs is disposed, to free the resources used + * by the parse name lookup function * - * Finishes an operation started with gxdp_documents_call_list(). + * Registers @uri_func and @parse_name_func as the #GFile URI and parse name + * lookup functions for URIs with a scheme matching @scheme. + * Note that @scheme is registered only within the running application, as + * opposed to desktop-wide as it happens with GVfs backends. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * gxdp_documents_call_list_sync: - * @proxy: A #GXdpDocumentsProxy. - * @arg_app_id: Argument to pass with the method invocation. - * @out_docs: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * When a #GFile is requested with an URI containing @scheme (e.g. through + * g_file_new_for_uri()), @uri_func will be called to allow a custom + * constructor. The implementation of @uri_func should not be blocking, and + * must not call g_vfs_register_uri_scheme() or g_vfs_unregister_uri_scheme(). * - * Synchronously invokes the List() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * When g_file_parse_name() is called with a parse name obtained from such file, + * @parse_name_func will be called to allow the #GFile to be created again. In + * that case, it's responsibility of @parse_name_func to make sure the parse + * name matches what the custom #GFile implementation returned when + * g_file_get_parse_name() was previously called. The implementation of + * @parse_name_func should not be blocking, and must not call + * g_vfs_register_uri_scheme() or g_vfs_unregister_uri_scheme(). * - * See gxdp_documents_call_list() for the asynchronous version of this method. + * It's an error to call this function twice with the same scheme. To unregister + * a custom URI scheme, use g_vfs_unregister_uri_scheme(). * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: %TRUE if @scheme was successfully registered, or %FALSE if a handler + * for @scheme already exists. + * Since: 2.50 */ /** - * gxdp_documents_call_lookup: - * @proxy: A #GXdpDocumentsProxy. - * @arg_filename: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_vfs_unregister_uri_scheme: + * @vfs: a #GVfs + * @scheme: an URI scheme, e.g. "http" * - * Asynchronously invokes the Lookup() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_documents_call_lookup_finish() to get the result of the operation. + * Unregisters the URI handler for @scheme previously registered with + * g_vfs_register_uri_scheme(). * - * See gxdp_documents_call_lookup_sync() for the synchronous, blocking version of this method. + * Returns: %TRUE if @scheme was successfully unregistered, or %FALSE if a + * handler for @scheme does not exist. + * Since: 2.50 */ /** - * gxdp_documents_call_lookup_finish: - * @proxy: A #GXdpDocumentsProxy. - * @out_doc_id: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_documents_call_lookup(). - * @error: Return location for error or %NULL. + * g_volume_can_eject: + * @volume: a #GVolume * - * Finishes an operation started with gxdp_documents_call_lookup(). + * Checks if a volume can be ejected. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: %TRUE if the @volume can be ejected. %FALSE otherwise */ /** - * gxdp_documents_call_lookup_sync: - * @proxy: A #GXdpDocumentsProxy. - * @arg_filename: Argument to pass with the method invocation. - * @out_doc_id: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the Lookup() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * g_volume_can_mount: + * @volume: a #GVolume * - * See gxdp_documents_call_lookup() for the asynchronous version of this method. + * Checks if a volume can be mounted. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: %TRUE if the @volume can be mounted. %FALSE otherwise */ /** - * gxdp_documents_call_revoke_permissions: - * @proxy: A #GXdpDocumentsProxy. - * @arg_doc_id: Argument to pass with the method invocation. - * @arg_app_id: Argument to pass with the method invocation. - * @arg_permissions: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_volume_eject: + * @volume: a #GVolume + * @flags: flags affecting the unmount if required for eject + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore + * @callback: (nullable): a #GAsyncReadyCallback, or %NULL + * @user_data: user data that gets passed to @callback * - * Asynchronously invokes the RevokePermissions() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_documents_call_revoke_permissions_finish() to get the result of the operation. + * Ejects a volume. This is an asynchronous operation, and is + * finished by calling g_volume_eject_finish() with the @volume + * and #GAsyncResult returned in the @callback. * - * See gxdp_documents_call_revoke_permissions_sync() for the synchronous, blocking version of this method. + * Deprecated: 2.22: Use g_volume_eject_with_operation() instead. */ /** - * gxdp_documents_call_revoke_permissions_finish: - * @proxy: A #GXdpDocumentsProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_documents_call_revoke_permissions(). - * @error: Return location for error or %NULL. + * g_volume_eject_finish: + * @volume: pointer to a #GVolume + * @result: a #GAsyncResult + * @error: a #GError location to store an error, or %NULL to ignore * - * Finishes an operation started with gxdp_documents_call_revoke_permissions(). + * Finishes ejecting a volume. If any errors occurred during the operation, + * @error will be set to contain the errors and %FALSE will be returned. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: %TRUE, %FALSE if operation failed + * Deprecated: 2.22: Use g_volume_eject_with_operation_finish() instead. */ /** - * gxdp_documents_call_revoke_permissions_sync: - * @proxy: A #GXdpDocumentsProxy. - * @arg_doc_id: Argument to pass with the method invocation. - * @arg_app_id: Argument to pass with the method invocation. - * @arg_permissions: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the RevokePermissions() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * g_volume_eject_with_operation: + * @volume: a #GVolume + * @flags: flags affecting the unmount if required for eject + * @mount_operation: (nullable): a #GMountOperation or %NULL to + * avoid user interaction + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore + * @callback: (nullable): a #GAsyncReadyCallback, or %NULL + * @user_data: user data passed to @callback * - * See gxdp_documents_call_revoke_permissions() for the asynchronous version of this method. + * Ejects a volume. This is an asynchronous operation, and is + * finished by calling g_volume_eject_with_operation_finish() with the @volume + * and #GAsyncResult data returned in the @callback. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Since: 2.22 */ /** - * gxdp_documents_complete_add: - * @object: A #GXdpDocuments. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @fd_list: (allow-none): A #GUnixFDList or %NULL. - * @doc_id: Parameter to return. + * g_volume_eject_with_operation_finish: + * @volume: a #GVolume + * @result: a #GAsyncResult + * @error: a #GError location to store the error occurring, or %NULL * - * Helper function used in service implementations to finish handling invocations of the Add() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Finishes ejecting a volume. If any errors occurred during the operation, + * @error will be set to contain the errors and %FALSE will be returned. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: %TRUE if the volume was successfully ejected. %FALSE otherwise + * Since: 2.22 */ /** - * gxdp_documents_complete_add_full: - * @object: A #GXdpDocuments. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @fd_list: (allow-none): A #GUnixFDList or %NULL. - * @doc_ids: Parameter to return. - * @extra_out: Parameter to return. + * g_volume_enumerate_identifiers: + * @volume: a #GVolume * - * Helper function used in service implementations to finish handling invocations of the AddFull() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets the kinds of [identifiers][volume-identifier] that @volume has. + * Use g_volume_get_identifier() to obtain the identifiers themselves. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: (array zero-terminated=1) (transfer full): a %NULL-terminated array + * of strings containing kinds of identifiers. Use g_strfreev() to free. */ /** - * gxdp_documents_complete_add_named: - * @object: A #GXdpDocuments. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @fd_list: (allow-none): A #GUnixFDList or %NULL. - * @doc_id: Parameter to return. + * g_volume_get_activation_root: + * @volume: a #GVolume * - * Helper function used in service implementations to finish handling invocations of the AddNamed() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets the activation root for a #GVolume if it is known ahead of + * mount time. Returns %NULL otherwise. If not %NULL and if @volume + * is mounted, then the result of g_mount_get_root() on the + * #GMount object obtained from g_volume_get_mount() will always + * either be equal or a prefix of what this function returns. In + * other words, in code * - * This method will free @invocation, you cannot use it afterwards. - */ - - -/** - * gxdp_documents_complete_delete: - * @object: A #GXdpDocuments. - * @invocation: (transfer full): A #GDBusMethodInvocation. + * |[ + * GMount *mount; + * GFile *mount_root + * GFile *volume_activation_root; + * + * mount = g_volume_get_mount (volume); // mounted, so never NULL + * mount_root = g_mount_get_root (mount); + * volume_activation_root = g_volume_get_activation_root (volume); // assume not NULL + * ]| + * then the expression + * |[ + * (g_file_has_prefix (volume_activation_root, mount_root) || + * g_file_equal (volume_activation_root, mount_root)) + * ]| + * will always be %TRUE. * - * Helper function used in service implementations to finish handling invocations of the Delete() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Activation roots are typically used in #GVolumeMonitor + * implementations to find the underlying mount to shadow, see + * g_mount_is_shadowed() for more details. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: (nullable) (transfer full): the activation root of @volume + * or %NULL. Use g_object_unref() to free. + * Since: 2.18 */ /** - * gxdp_documents_complete_get_mount_point: - * @object: A #GXdpDocuments. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @path: Parameter to return. + * g_volume_get_drive: + * @volume: a #GVolume * - * Helper function used in service implementations to finish handling invocations of the GetMountPoint() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets the drive for the @volume. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: (transfer full) (nullable): a #GDrive or %NULL if @volume is not + * associated with a drive. The returned object should be unreffed + * with g_object_unref() when no longer needed. */ /** - * gxdp_documents_complete_grant_permissions: - * @object: A #GXdpDocuments. - * @invocation: (transfer full): A #GDBusMethodInvocation. + * g_volume_get_icon: + * @volume: a #GVolume * - * Helper function used in service implementations to finish handling invocations of the GrantPermissions() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets the icon for @volume. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: (transfer full): a #GIcon. + * The returned object should be unreffed with g_object_unref() + * when no longer needed. */ /** - * gxdp_documents_complete_info: - * @object: A #GXdpDocuments. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @path: Parameter to return. - * @apps: Parameter to return. + * g_volume_get_identifier: + * @volume: a #GVolume + * @kind: the kind of identifier to return * - * Helper function used in service implementations to finish handling invocations of the Info() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets the identifier of the given kind for @volume. + * See the [introduction][volume-identifier] for more + * information about volume identifiers. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: (nullable) (transfer full): a newly allocated string containing the + * requested identifier, or %NULL if the #GVolume + * doesn't have this kind of identifier */ /** - * gxdp_documents_complete_list: - * @object: A #GXdpDocuments. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @docs: Parameter to return. + * g_volume_get_mount: + * @volume: a #GVolume * - * Helper function used in service implementations to finish handling invocations of the List() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets the mount for the @volume. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: (transfer full) (nullable): a #GMount or %NULL if @volume isn't mounted. + * The returned object should be unreffed with g_object_unref() + * when no longer needed. */ /** - * gxdp_documents_complete_lookup: - * @object: A #GXdpDocuments. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @doc_id: Parameter to return. + * g_volume_get_name: + * @volume: a #GVolume * - * Helper function used in service implementations to finish handling invocations of the Lookup() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets the name of @volume. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: the name for the given @volume. The returned string should + * be freed with g_free() when no longer needed. */ /** - * gxdp_documents_complete_revoke_permissions: - * @object: A #GXdpDocuments. - * @invocation: (transfer full): A #GDBusMethodInvocation. + * g_volume_get_sort_key: + * @volume: a #GVolume * - * Helper function used in service implementations to finish handling invocations of the RevokePermissions() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Gets the sort key for @volume, if any. * - * This method will free @invocation, you cannot use it afterwards. + * Returns: (nullable): Sorting key for @volume or %NULL if no such key is available + * Since: 2.32 */ /** - * gxdp_documents_get_version: (skip) - * @object: A #GXdpDocuments. - * - * Gets the value of the "version" D-Bus property. + * g_volume_get_symbolic_icon: + * @volume: a #GVolume * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * Gets the symbolic icon for @volume. * - * Returns: The property value. + * Returns: (transfer full): a #GIcon. + * The returned object should be unreffed with g_object_unref() + * when no longer needed. + * Since: 2.34 */ /** - * gxdp_documents_interface_info: + * g_volume_get_uuid: + * @volume: a #GVolume * - * Gets a machine-readable description of the org.freedesktop.portal.Documents D-Bus interface. + * Gets the UUID for the @volume. The reference is typically based on + * the file system UUID for the volume in question and should be + * considered an opaque string. Returns %NULL if there is no UUID + * available. * - * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. + * Returns: (nullable) (transfer full): the UUID for @volume or %NULL if no UUID + * can be computed. + * The returned string should be freed with g_free() + * when no longer needed. */ /** - * gxdp_documents_override_properties: - * @klass: The class structure for a #GObject-derived class. - * @property_id_begin: The property id to assign to the first overridden property. + * g_volume_monitor_adopt_orphan_mount: + * @mount: a #GMount object to find a parent for * - * Overrides all #GObject properties in the #GXdpDocuments interface for a concrete class. - * The properties are overridden in the order they are defined. + * This function should be called by any #GVolumeMonitor + * implementation when a new #GMount object is created that is not + * associated with a #GVolume object. It must be called just before + * emitting the @mount_added signal. * - * Returns: The last property id. - */ - - -/** - * gxdp_documents_proxy_new: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. + * If the return value is not %NULL, the caller must associate the + * returned #GVolume object with the #GMount. This involves returning + * it in its g_mount_get_volume() implementation. The caller must + * also listen for the "removed" signal on the returned object + * and give up its reference when handling that signal * - * Asynchronously creates a proxy for the D-Bus interface org.freedesktop.portal.Documents. See g_dbus_proxy_new() for more details. + * Similarly, if implementing g_volume_monitor_adopt_orphan_mount(), + * the implementor must take a reference to @mount and return it in + * its g_volume_get_mount() implemented. Also, the implementor must + * listen for the "unmounted" signal on @mount and give up its + * reference upon handling that signal. * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_documents_proxy_new_finish() to get the result of the operation. + * There are two main use cases for this function. * - * See gxdp_documents_proxy_new_sync() for the synchronous, blocking version of this constructor. - */ - - -/** - * gxdp_documents_proxy_new_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_documents_proxy_new(). - * @error: Return location for error or %NULL + * One is when implementing a user space file system driver that reads + * blocks of a block device that is already represented by the native + * volume monitor (for example a CD Audio file system driver). Such + * a driver will generate its own #GMount object that needs to be + * associated with the #GVolume object that represents the volume. * - * Finishes an operation started with gxdp_documents_proxy_new(). + * The other is for implementing a #GVolumeMonitor whose sole purpose + * is to return #GVolume objects representing entries in the users + * "favorite servers" list or similar. * - * Returns: (transfer full) (type GXdpDocumentsProxy): The constructed proxy object or %NULL if @error is set. + * Returns: (transfer full): the #GVolume object that is the parent for @mount or %NULL + * if no wants to adopt the #GMount. + * Deprecated: 2.20: Instead of using this function, #GVolumeMonitor + * implementations should instead create shadow mounts with the URI of + * the mount they intend to adopt. See the proxy volume monitor in + * gvfs for an example of this. Also see g_mount_is_shadowed(), + * g_mount_shadow() and g_mount_unshadow() functions. */ /** - * gxdp_documents_proxy_new_for_bus: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. - * - * Like gxdp_documents_proxy_new() but takes a #GBusType instead of a #GDBusConnection. + * g_volume_monitor_get: * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_documents_proxy_new_for_bus_finish() to get the result of the operation. + * Gets the volume monitor used by gio. * - * See gxdp_documents_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. + * Returns: (transfer full): a reference to the #GVolumeMonitor used by gio. Call + * g_object_unref() when done with it. */ /** - * gxdp_documents_proxy_new_for_bus_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_documents_proxy_new_for_bus(). - * @error: Return location for error or %NULL + * g_volume_monitor_get_connected_drives: + * @volume_monitor: a #GVolumeMonitor. + * + * Gets a list of drives connected to the system. * - * Finishes an operation started with gxdp_documents_proxy_new_for_bus(). + * The returned list should be freed with g_list_free(), after + * its elements have been unreffed with g_object_unref(). * - * Returns: (transfer full) (type GXdpDocumentsProxy): The constructed proxy object or %NULL if @error is set. + * Returns: (element-type GDrive) (transfer full): a #GList of connected #GDrive objects. */ /** - * gxdp_documents_proxy_new_for_bus_sync: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL - * - * Like gxdp_documents_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. - * - * The calling thread is blocked until a reply is received. + * g_volume_monitor_get_mount_for_uuid: + * @volume_monitor: a #GVolumeMonitor. + * @uuid: the UUID to look for * - * See gxdp_documents_proxy_new_for_bus() for the asynchronous version of this constructor. + * Finds a #GMount object by its UUID (see g_mount_get_uuid()) * - * Returns: (transfer full) (type GXdpDocumentsProxy): The constructed proxy object or %NULL if @error is set. + * Returns: (transfer full): a #GMount or %NULL if no such mount is available. + * Free the returned object with g_object_unref(). */ /** - * gxdp_documents_proxy_new_sync: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL - * - * Synchronously creates a proxy for the D-Bus interface org.freedesktop.portal.Documents. See g_dbus_proxy_new_sync() for more details. + * g_volume_monitor_get_mounts: + * @volume_monitor: a #GVolumeMonitor. * - * The calling thread is blocked until a reply is received. + * Gets a list of the mounts on the system. * - * See gxdp_documents_proxy_new() for the asynchronous version of this constructor. + * The returned list should be freed with g_list_free(), after + * its elements have been unreffed with g_object_unref(). * - * Returns: (transfer full) (type GXdpDocumentsProxy): The constructed proxy object or %NULL if @error is set. + * Returns: (element-type GMount) (transfer full): a #GList of #GMount objects. */ /** - * gxdp_documents_set_version: (skip) - * @object: A #GXdpDocuments. - * @value: The value to set. + * g_volume_monitor_get_volume_for_uuid: + * @volume_monitor: a #GVolumeMonitor. + * @uuid: the UUID to look for * - * Sets the "version" D-Bus property to @value. + * Finds a #GVolume object by its UUID (see g_volume_get_uuid()) * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + * Returns: (transfer full): a #GVolume or %NULL if no such volume is available. + * Free the returned object with g_object_unref(). */ /** - * gxdp_documents_skeleton_new: + * g_volume_monitor_get_volumes: + * @volume_monitor: a #GVolumeMonitor. + * + * Gets a list of the volumes on the system. * - * Creates a skeleton object for the D-Bus interface org.freedesktop.portal.Documents. + * The returned list should be freed with g_list_free(), after + * its elements have been unreffed with g_object_unref(). * - * Returns: (transfer full) (type GXdpDocumentsSkeleton): The skeleton object. + * Returns: (element-type GVolume) (transfer full): a #GList of #GVolume objects. */ /** - * gxdp_network_monitor_emit_changed: - * @object: A #GXdpNetworkMonitor. - * @arg_available: Argument to pass with the signal. + * g_volume_mount: (virtual mount_fn) + * @volume: a #GVolume + * @flags: flags affecting the operation + * @mount_operation: (nullable): a #GMountOperation or %NULL to avoid user interaction + * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore + * @callback: (nullable): a #GAsyncReadyCallback, or %NULL + * @user_data: user data that gets passed to @callback * - * Emits the "changed" D-Bus signal. + * Mounts a volume. This is an asynchronous operation, and is + * finished by calling g_volume_mount_finish() with the @volume + * and #GAsyncResult returned in the @callback. */ /** - * gxdp_network_monitor_get_available: (skip) - * @object: A #GXdpNetworkMonitor. + * g_volume_mount_finish: + * @volume: a #GVolume + * @result: a #GAsyncResult + * @error: a #GError location to store an error, or %NULL to ignore * - * Gets the value of the "available" D-Bus property. + * Finishes mounting a volume. If any errors occurred during the operation, + * @error will be set to contain the errors and %FALSE will be returned. * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * If the mount operation succeeded, g_volume_get_mount() on @volume + * is guaranteed to return the mount right after calling this + * function; there's no need to listen for the 'mount-added' signal on + * #GVolumeMonitor. * - * Returns: The property value. + * Returns: %TRUE, %FALSE if operation failed */ /** - * gxdp_network_monitor_get_connectivity: (skip) - * @object: A #GXdpNetworkMonitor. - * - * Gets the value of the "connectivity" D-Bus property. + * g_volume_should_automount: + * @volume: a #GVolume * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * Returns whether the volume should be automatically mounted. * - * Returns: The property value. + * Returns: %TRUE if the volume should be automatically mounted */ /** - * gxdp_network_monitor_get_metered: (skip) - * @object: A #GXdpNetworkMonitor. - * - * Gets the value of the "metered" D-Bus property. + * g_win32_input_stream_get_close_handle: + * @stream: a #GWin32InputStream * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * Returns whether the handle of @stream will be + * closed when the stream is closed. * - * Returns: The property value. + * Returns: %TRUE if the handle is closed when done + * Since: 2.26 */ /** - * gxdp_network_monitor_interface_info: + * g_win32_input_stream_get_handle: + * @stream: a #GWin32InputStream * - * Gets a machine-readable description of the org.freedesktop.portal.NetworkMonitor D-Bus interface. + * Return the Windows file handle that the stream reads from. * - * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. + * Returns: The file handle of @stream + * Since: 2.26 */ /** - * gxdp_network_monitor_override_properties: - * @klass: The class structure for a #GObject-derived class. - * @property_id_begin: The property id to assign to the first overridden property. + * g_win32_input_stream_new: + * @handle: a Win32 file handle + * @close_handle: %TRUE to close the handle when done * - * Overrides all #GObject properties in the #GXdpNetworkMonitor interface for a concrete class. - * The properties are overridden in the order they are defined. + * Creates a new #GWin32InputStream for the given @handle. + * + * If @close_handle is %TRUE, the handle will be closed + * when the stream is closed. * - * Returns: The last property id. + * Note that "handle" here means a Win32 HANDLE, not a "file descriptor" + * as used in the Windows C libraries. + * + * Returns: a new #GWin32InputStream */ /** - * gxdp_network_monitor_proxy_new: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. - * - * Asynchronously creates a proxy for the D-Bus interface org.freedesktop.portal.NetworkMonitor. See g_dbus_proxy_new() for more details. + * g_win32_input_stream_set_close_handle: + * @stream: a #GWin32InputStream + * @close_handle: %TRUE to close the handle when done * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_network_monitor_proxy_new_finish() to get the result of the operation. + * Sets whether the handle of @stream shall be closed + * when the stream is closed. * - * See gxdp_network_monitor_proxy_new_sync() for the synchronous, blocking version of this constructor. + * Since: 2.26 */ /** - * gxdp_network_monitor_proxy_new_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_network_monitor_proxy_new(). - * @error: Return location for error or %NULL + * g_win32_output_stream_get_close_handle: + * @stream: a #GWin32OutputStream * - * Finishes an operation started with gxdp_network_monitor_proxy_new(). + * Returns whether the handle of @stream will be closed when the + * stream is closed. * - * Returns: (transfer full) (type GXdpNetworkMonitorProxy): The constructed proxy object or %NULL if @error is set. + * Returns: %TRUE if the handle is closed when done + * Since: 2.26 */ /** - * gxdp_network_monitor_proxy_new_for_bus: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. - * - * Like gxdp_network_monitor_proxy_new() but takes a #GBusType instead of a #GDBusConnection. + * g_win32_output_stream_get_handle: + * @stream: a #GWin32OutputStream * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_network_monitor_proxy_new_for_bus_finish() to get the result of the operation. + * Return the Windows handle that the stream writes to. * - * See gxdp_network_monitor_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. + * Returns: The handle descriptor of @stream + * Since: 2.26 */ /** - * gxdp_network_monitor_proxy_new_for_bus_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_network_monitor_proxy_new_for_bus(). - * @error: Return location for error or %NULL + * g_win32_output_stream_new: + * @handle: a Win32 file handle + * @close_handle: %TRUE to close the handle when done + * + * Creates a new #GWin32OutputStream for the given @handle. * - * Finishes an operation started with gxdp_network_monitor_proxy_new_for_bus(). + * If @close_handle, is %TRUE, the handle will be closed when the + * output stream is destroyed. * - * Returns: (transfer full) (type GXdpNetworkMonitorProxy): The constructed proxy object or %NULL if @error is set. + * Returns: a new #GOutputStream + * Since: 2.26 */ /** - * gxdp_network_monitor_proxy_new_for_bus_sync: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL - * - * Like gxdp_network_monitor_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. - * - * The calling thread is blocked until a reply is received. + * g_win32_output_stream_set_close_handle: + * @stream: a #GWin32OutputStream + * @close_handle: %TRUE to close the handle when done * - * See gxdp_network_monitor_proxy_new_for_bus() for the asynchronous version of this constructor. + * Sets whether the handle of @stream shall be closed when the stream + * is closed. * - * Returns: (transfer full) (type GXdpNetworkMonitorProxy): The constructed proxy object or %NULL if @error is set. + * Since: 2.26 */ /** - * gxdp_network_monitor_proxy_new_sync: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL - * - * Synchronously creates a proxy for the D-Bus interface org.freedesktop.portal.NetworkMonitor. See g_dbus_proxy_new_sync() for more details. + * g_win32_registry_key_erase_change_indicator: + * @key: (in) (transfer none): a #GWin32RegistryKey * - * The calling thread is blocked until a reply is received. + * Erases change indicator of the @key. * - * See gxdp_network_monitor_proxy_new() for the asynchronous version of this constructor. + * Subsequent calls to g_win32_registry_key_has_changed() will return %FALSE + * until the key is put on watch again by calling + * g_win32_registry_key_watch() again. * - * Returns: (transfer full) (type GXdpNetworkMonitorProxy): The constructed proxy object or %NULL if @error is set. + * Since: 2.46 */ /** - * gxdp_network_monitor_set_available: (skip) - * @object: A #GXdpNetworkMonitor. - * @value: The value to set. + * g_win32_registry_key_get_child: + * @key: (in) (transfer none): a parent #GWin32RegistryKey + * @subkey: (in) (transfer none): name of a child key to open (in UTF-8), relative to @key + * @error: (inout) (optional) (nullable): a pointer to a %NULL #GError, or %NULL * - * Sets the "available" D-Bus property to @value. + * Opens a @subkey of the @key. * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + * Returns: (nullable): a #GWin32RegistryKey or %NULL if can't be opened. Free + * with g_object_unref(). */ /** - * gxdp_network_monitor_set_connectivity: (skip) - * @object: A #GXdpNetworkMonitor. - * @value: The value to set. + * g_win32_registry_key_get_child_w: + * @key: (in) (transfer none): a parent #GWin32RegistryKey + * @subkey: (in) (transfer none): name of a child key to open (in UTF-8), relative to @key + * @error: (inout) (optional) (nullable): a pointer to a %NULL #GError, or %NULL * - * Sets the "connectivity" D-Bus property to @value. + * Opens a @subkey of the @key. * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + * Returns: (nullable): a #GWin32RegistryKey or %NULL if can't be opened. Free + * with g_object_unref(). */ /** - * gxdp_network_monitor_set_metered: (skip) - * @object: A #GXdpNetworkMonitor. - * @value: The value to set. + * g_win32_registry_key_get_path: + * @key: (in) (transfer none): a #GWin32RegistryKey * - * Sets the "metered" D-Bus property to @value. + * Get full path to the key * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + * Returns: (transfer none): a full path to the key (in UTF-8), + * or %NULL if it can't be converted to UTF-8. + * Since: 2.46 */ /** - * gxdp_network_monitor_skeleton_new: + * g_win32_registry_key_get_path_w: + * @key: (in) (transfer none): a #GWin32RegistryKey * - * Creates a skeleton object for the D-Bus interface org.freedesktop.portal.NetworkMonitor. + * Get full path to the key * - * Returns: (transfer full) (type GXdpNetworkMonitorSkeleton): The skeleton object. + * Returns: (transfer none): a full path to the key (in UTF-16) + * Since: 2.46 */ /** - * gxdp_open_uri_call_open_file: - * @proxy: A #GXdpOpenURIProxy. - * @arg_parent_window: Argument to pass with the method invocation. - * @arg_fd: Argument to pass with the method invocation. - * @arg_options: Argument to pass with the method invocation. - * @fd_list: (allow-none): A #GUnixFDList or %NULL. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_win32_registry_key_get_value: + * @key: (in) (transfer none): a #GWin32RegistryKey + * @auto_expand: (in): %TRUE to automatically expand G_WIN32_REGISTRY_VALUE_EXPAND_STR + * to G_WIN32_REGISTRY_VALUE_STR. + * @value_name: (in) (transfer none): name of the value to get (in UTF-8). + * Empty string means the '(Default)' value. + * @value_type: (out) (optional): type of the value retrieved. + * @value_data: (out callee-allocates) (optional): contents of the value. + * @value_data_size: (out) (optional): size of the buffer pointed + * by @value_data. + * @error: (nullable): a pointer to %NULL #GError, or %NULL * - * Asynchronously invokes the OpenFile() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_open_uri_call_open_file_finish() to get the result of the operation. + * Get data from a value of a key. String data is guaranteed to be + * appropriately terminated and will be in UTF-8. * - * See gxdp_open_uri_call_open_file_sync() for the synchronous, blocking version of this method. + * Returns: %TRUE on success, %FALSE on failure. + * Since: 2.46 */ /** - * gxdp_open_uri_call_open_file_finish: - * @proxy: A #GXdpOpenURIProxy. - * @out_handle: (out): Return location for return parameter or %NULL to ignore. - * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_open_uri_call_open_file(). - * @error: Return location for error or %NULL. + * g_win32_registry_key_get_value_w: + * @key: (in) (transfer none): a #GWin32RegistryKey + * @auto_expand: (in): %TRUE to automatically expand G_WIN32_REGISTRY_VALUE_EXPAND_STR + * to G_WIN32_REGISTRY_VALUE_STR. + * @value_name: (in) (transfer none): name of the value to get (in UTF-16). + * Empty string means the '(Default)' value. + * @value_type: (out) (optional): type of the value retrieved. + * @value_data: (out callee-allocates) (optional): contents of the value. + * @value_data_size: (out) (optional): size of the buffer pointed + * by @value_data. + * @error: (nullable): a pointer to %NULL #GError, or %NULL + * + * Get data from a value of a key. * - * Finishes an operation started with gxdp_open_uri_call_open_file(). + * Get data from a value of a key. String data is guaranteed to be + * appropriately terminated and will be in UTF-16. + * + * When calling with value_data == NULL (to get data size without getting + * the data itself) remember that returned size corresponds to possibly + * unterminated string data (if value is some kind of string), because + * termination cannot be checked and fixed unless the data is retreived + * too. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: %TRUE on success, %FALSE on failure. + * Since: 2.46 */ /** - * gxdp_open_uri_call_open_file_sync: - * @proxy: A #GXdpOpenURIProxy. - * @arg_parent_window: Argument to pass with the method invocation. - * @arg_fd: Argument to pass with the method invocation. - * @arg_options: Argument to pass with the method invocation. - * @fd_list: (allow-none): A #GUnixFDList or %NULL. - * @out_handle: (out): Return location for return parameter or %NULL to ignore. - * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the OpenFile() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * g_win32_registry_key_has_changed: + * @key: (in) (transfer none): a #GWin32RegistryKey * - * See gxdp_open_uri_call_open_file() for the asynchronous version of this method. + * Check the @key's status indicator. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: %TRUE if the @key was put under watch at some point and has changed + * since then, %FALSE if it either wasn't changed or wasn't watched at all. + * Since: 2.46 */ /** - * gxdp_open_uri_call_open_uri: - * @proxy: A #GXdpOpenURIProxy. - * @arg_parent_window: Argument to pass with the method invocation. - * @arg_uri: Argument to pass with the method invocation. - * @arg_options: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_win32_registry_key_new: + * @path: absolute full name of a key to open (in UTF-8) + * @error: (nullable): a pointer to a %NULL #GError, or %NULL * - * Asynchronously invokes the OpenURI() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_open_uri_call_open_uri_finish() to get the result of the operation. + * Creates an object that represents a registry key specified by @path. + * @path must start with one of the following pre-defined names: + * - HKEY_CLASSES_ROOT + * - HKEY_CURRENT_CONFIG + * - HKEY_CURRENT_USER + * - HKEY_CURRENT_USER_LOCAL_SETTINGS + * - HKEY_LOCAL_MACHINE + * - HKEY_PERFORMANCE_DATA + * - HKEY_PERFORMANCE_NLSTEXT + * - HKEY_PERFORMANCE_TEXT + * - HKEY_USERS + * @path must not end with '\\'. * - * See gxdp_open_uri_call_open_uri_sync() for the synchronous, blocking version of this method. + * Returns: (nullable) (transfer full): a #GWin32RegistryKey or %NULL if can't + * be opened. Free with g_object_unref(). */ /** - * gxdp_open_uri_call_open_uri_finish: - * @proxy: A #GXdpOpenURIProxy. - * @out_handle: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_open_uri_call_open_uri(). - * @error: Return location for error or %NULL. + * g_win32_registry_key_new_w: + * @path: (in) (transfer none): absolute full name of a key to open (in UTF-16) + * @error: (inout) (optional) (nullable): a pointer to a %NULL #GError, or %NULL * - * Finishes an operation started with gxdp_open_uri_call_open_uri(). + * Creates an object that represents a registry key specified by @path. + * @path must start with one of the following pre-defined names: + * - HKEY_CLASSES_ROOT + * - HKEY_CURRENT_CONFIG + * - HKEY_CURRENT_USER + * - HKEY_CURRENT_USER_LOCAL_SETTINGS + * - HKEY_LOCAL_MACHINE + * - HKEY_PERFORMANCE_DATA + * - HKEY_PERFORMANCE_NLSTEXT + * - HKEY_PERFORMANCE_TEXT + * - HKEY_USERS + * @path must not end with L'\\'. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: (nullable) (transfer full): a #GWin32RegistryKey or %NULL if can't + * be opened. Free with g_object_unref(). */ /** - * gxdp_open_uri_call_open_uri_sync: - * @proxy: A #GXdpOpenURIProxy. - * @arg_parent_window: Argument to pass with the method invocation. - * @arg_uri: Argument to pass with the method invocation. - * @arg_options: Argument to pass with the method invocation. - * @out_handle: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. + * g_win32_registry_key_watch: + * @key: (in) (transfer none): a #GWin32RegistryKey + * @watch_children: (in): %TRUE also watch the children of the @key, %FALSE + * to watch the key only. + * @watch_flags: (in): specifies the types of changes to watch for. + * @callback: (in) (nullable): a function to invoke when a change occurs. + * @user_data: (in) (nullable): a pointer to pass to @callback on invocation. + * @error: (nullable): a pointer to %NULL #GError, or %NULL * - * Synchronously invokes the OpenURI() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * Puts @key under a watch. * - * See gxdp_open_uri_call_open_uri() for the asynchronous version of this method. + * When the key changes, an APC will be queued in the current thread. The APC + * will run when the current thread enters alertable state (GLib main loop + * should do that; if you are not using it, see MSDN documentation for W32API + * calls that put thread into alertable state). When it runs, it will + * atomically switch an indicator in the @key. If a callback was specified, + * it is invoked at that point. Subsequent calls to + * g_win32_registry_key_has_changed() will return %TRUE, and the callback (if + * it was specified) will not be invoked anymore. + * Calling g_win32_registry_key_erase_change_indicator() will reset the indicator, + * and g_win32_registry_key_has_changed() will start returning %FALSE. + * To resume the watch, call g_win32_registry_key_watch_for_changes() again. * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ - - -/** - * gxdp_open_uri_complete_open_file: - * @object: A #GXdpOpenURI. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @fd_list: (allow-none): A #GUnixFDList or %NULL. - * @handle: Parameter to return. + * Calling g_win32_registry_key_watch_for_changes() for a key that is already + * being watched is allowed and affects nothing. * - * Helper function used in service implementations to finish handling invocations of the OpenFile() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * The fact that the key is being watched will be used internally to update + * key path (if it changes). * - * This method will free @invocation, you cannot use it afterwards. + * Returns: %TRUE on success, %FALSE on failure. + * Since: 2.46 */ /** - * gxdp_open_uri_complete_open_uri: - * @object: A #GXdpOpenURI. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @handle: Parameter to return. + * g_win32_registry_subkey_iter_assign: + * @iter: a #GWin32RegistrySubkeyIter + * @other: another #GWin32RegistrySubkeyIter * - * Helper function used in service implementations to finish handling invocations of the OpenURI() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Assigns the value of @other to @iter. This function + * is not useful in applications, because iterators can be assigned + * with `GWin32RegistrySubkeyIter i = j;`. The + * function is used by language bindings. * - * This method will free @invocation, you cannot use it afterwards. + * Since: 2.46 */ /** - * gxdp_open_uri_get_version: (skip) - * @object: A #GXdpOpenURI. - * - * Gets the value of the "version" D-Bus property. + * g_win32_registry_subkey_iter_clear: + * @iter: (in) (transfer none): a #GWin32RegistrySubkeyIter * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * Frees internal buffers of a #GWin32RegistrySubkeyIter. * - * Returns: The property value. + * Since: 2.46 */ /** - * gxdp_open_uri_interface_info: + * g_win32_registry_subkey_iter_copy: + * @iter: an iterator * - * Gets a machine-readable description of the org.freedesktop.portal.OpenURI D-Bus interface. + * Creates a dynamically-allocated copy of an iterator. Dynamically-allocated + * state of the iterator is duplicated too. * - * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. + * Returns: (transfer full): a copy of the @iter, + * free with g_win32_registry_subkey_iter_free () + * Since: 2.46 */ /** - * gxdp_open_uri_override_properties: - * @klass: The class structure for a #GObject-derived class. - * @property_id_begin: The property id to assign to the first overridden property. + * g_win32_registry_subkey_iter_free: + * @iter: a dynamically-allocated iterator * - * Overrides all #GObject properties in the #GXdpOpenURI interface for a concrete class. - * The properties are overridden in the order they are defined. + * Free an iterator allocated on the heap. For iterators that are allocated + * on the stack use g_win32_registry_subkey_iter_clear () instead. * - * Returns: The last property id. + * Since: 2.46 */ /** - * gxdp_open_uri_proxy_new: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. - * - * Asynchronously creates a proxy for the D-Bus interface org.freedesktop.portal.OpenURI. See g_dbus_proxy_new() for more details. + * g_win32_registry_subkey_iter_get_name: + * @iter: (in) (transfer none): a #GWin32RegistrySubkeyIter + * @subkey_name: (out callee-allocates) (transfer none): Pointer to a location + * to store the name of a subkey (in UTF-8). Free with g_free(). + * @subkey_name_len: (out) (optional): Pointer to a location to store the + * length of @subkey_name, in gchars, excluding NUL-terminator. + * %NULL if length is not needed. + * @error: (nullable): a pointer to %NULL #GError, or %NULL * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_open_uri_proxy_new_finish() to get the result of the operation. + * Gets the name of the subkey at the @iter potision. * - * See gxdp_open_uri_proxy_new_sync() for the synchronous, blocking version of this constructor. + * Returns: %TRUE if the name was retrieved, %FALSE otherwise. + * Since: 2.46 */ /** - * gxdp_open_uri_proxy_new_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_open_uri_proxy_new(). - * @error: Return location for error or %NULL + * g_win32_registry_subkey_iter_get_name_w: + * @iter: (in) (transfer none): a #GWin32RegistrySubkeyIter + * @subkey_name: (out callee-allocates) (transfer none): Pointer to a location + * to store the name of a subkey (in UTF-16). + * @subkey_name_len: (out) (optional) (transfer none): Pointer to a location + * to store the length of @subkey_name, in gunichar2s, excluding + * NUL-terminator. + * %NULL if length is not needed. + * @error: (nullable): a pointer to %NULL #GError, or %NULL * - * Finishes an operation started with gxdp_open_uri_proxy_new(). + * Same as g_win32_registry_subkey_iter_get_next(), but outputs UTF-16-encoded + * data, without converting it to UTF-8 first. * - * Returns: (transfer full) (type GXdpOpenURIProxy): The constructed proxy object or %NULL if @error is set. + * Returns: %TRUE if the name was retrieved, %FALSE otherwise. + * Since: 2.46 */ /** - * gxdp_open_uri_proxy_new_for_bus: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. + * g_win32_registry_subkey_iter_init: + * @iter: (in) (transfer none): a pointer to a #GWin32RegistrySubkeyIter + * @key: (in) (transfer none): a #GWin32RegistryKey to iterate over + * @error: (inout) (optional) (nullable): a pointer to %NULL #GError, or %NULL * - * Like gxdp_open_uri_proxy_new() but takes a #GBusType instead of a #GDBusConnection. + * Initialises (without allocating) a #GWin32RegistrySubkeyIter. @iter may be + * completely uninitialised prior to this call; its old value is + * ignored. * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_open_uri_proxy_new_for_bus_finish() to get the result of the operation. + * The iterator remains valid for as long as @key exists. + * Clean up its internal buffers with a call to + * g_win32_registry_subkey_iter_clear() when done. * - * See gxdp_open_uri_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. + * Returns: %TRUE if iterator was initialized successfully, %FALSE on error. + * Since: 2.46 */ /** - * gxdp_open_uri_proxy_new_for_bus_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_open_uri_proxy_new_for_bus(). - * @error: Return location for error or %NULL + * g_win32_registry_subkey_iter_n_subkeys: + * @iter: (in) (transfer none): a #GWin32RegistrySubkeyIter + * + * Queries the number of subkeys items in the key that we are + * iterating over. This is the total number of subkeys -- not the number + * of items remaining. * - * Finishes an operation started with gxdp_open_uri_proxy_new_for_bus(). + * This information is accurate at the point of iterator initialization, + * and may go out of sync with reality even while subkeys are enumerated. * - * Returns: (transfer full) (type GXdpOpenURIProxy): The constructed proxy object or %NULL if @error is set. + * Returns: the number of subkeys in the key + * Since: 2.46 */ /** - * gxdp_open_uri_proxy_new_for_bus_sync: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL + * g_win32_registry_subkey_iter_next: + * @iter: (in) (transfer none): a #GWin32RegistrySubkeyIter + * @skip_errors: (in): %TRUE if iterator should silently ignore errors (such as + * the actual number of subkeys being less than expected) and + * proceed forward + * @error: (nullable): a pointer to %NULL #GError, or %NULL + * + * Moves iterator to the next subkey. + * Enumeration errors can be ignored if @skip_errors is %TRUE * - * Like gxdp_open_uri_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. + * Here is an example for iterating with g_win32_registry_subkey_iter_next(): + * |[ + * // recursively iterate a key + * void + * iterate_key_recursive (GWin32RegistryKey *key) + * { + * GWin32RegistrySubkeyIter iter; + * gchar *name; + * GWin32RegistryKey *child; + * + * if (!g_win32_registry_subkey_iter_init (&iter, key, NULL)) + * return; + * + * while (g_win32_registry_subkey_iter_next (&iter, TRUE, NULL)) + * { + * if (!g_win32_registry_subkey_iter_get_name (&iter, &name, NULL, NULL)) + * continue; + * + * g_print ("subkey '%s'\n", name); + * child = g_win32_registry_key_get_child (key, name, NULL); * - * The calling thread is blocked until a reply is received. + * if (child) + * iterate_key_recursive (child); + * } * - * See gxdp_open_uri_proxy_new_for_bus() for the asynchronous version of this constructor. + * g_win32_registry_subkey_iter_clear (&iter); + * } + * ]| * - * Returns: (transfer full) (type GXdpOpenURIProxy): The constructed proxy object or %NULL if @error is set. + * Returns: %TRUE if next subkey info was retrieved, %FALSE otherwise. + * Since: 2.46 */ /** - * gxdp_open_uri_proxy_new_sync: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL - * - * Synchronously creates a proxy for the D-Bus interface org.freedesktop.portal.OpenURI. See g_dbus_proxy_new_sync() for more details. - * - * The calling thread is blocked until a reply is received. + * g_win32_registry_value_iter_assign: + * @iter: a #GWin32RegistryValueIter + * @other: another #GWin32RegistryValueIter * - * See gxdp_open_uri_proxy_new() for the asynchronous version of this constructor. + * Assigns the value of @other to @iter. This function + * is not useful in applications, because iterators can be assigned + * with `GWin32RegistryValueIter i = j;`. The + * function is used by language bindings. * - * Returns: (transfer full) (type GXdpOpenURIProxy): The constructed proxy object or %NULL if @error is set. + * Since: 2.46 */ /** - * gxdp_open_uri_set_version: (skip) - * @object: A #GXdpOpenURI. - * @value: The value to set. + * g_win32_registry_value_iter_clear: + * @iter: (in) (transfer none): a #GWin32RegistryValueIter * - * Sets the "version" D-Bus property to @value. + * Frees internal buffers of a #GWin32RegistryValueIter. * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + * Since: 2.46 */ /** - * gxdp_open_uri_skeleton_new: + * g_win32_registry_value_iter_copy: + * @iter: an iterator * - * Creates a skeleton object for the D-Bus interface org.freedesktop.portal.OpenURI. + * Creates a dynamically-allocated copy of an iterator. Dynamically-allocated + * state of the iterator is duplicated too. * - * Returns: (transfer full) (type GXdpOpenURISkeleton): The skeleton object. + * Returns: (transfer full): a copy of the @iter, + * free with g_win32_registry_value_iter_free (). + * Since: 2.46 */ /** - * gxdp_proxy_resolver_call_lookup: - * @proxy: A #GXdpProxyResolverProxy. - * @arg_uri: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. + * g_win32_registry_value_iter_free: + * @iter: a dynamically-allocated iterator * - * Asynchronously invokes the Lookup() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_proxy_resolver_call_lookup_finish() to get the result of the operation. + * Free an iterator allocated on the heap. For iterators that are allocated + * on the stack use g_win32_registry_value_iter_clear () instead. * - * See gxdp_proxy_resolver_call_lookup_sync() for the synchronous, blocking version of this method. + * Since: 2.46 */ /** - * gxdp_proxy_resolver_call_lookup_finish: - * @proxy: A #GXdpProxyResolverProxy. - * @out_proxies: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_proxy_resolver_call_lookup(). - * @error: Return location for error or %NULL. + * g_win32_registry_value_iter_get_data: + * @iter: (in) (transfer none): a #GWin32RegistryValueIter + * @auto_expand: (in): %TRUE to automatically expand G_WIN32_REGISTRY_VALUE_EXPAND_STR to + * G_WIN32_REGISTRY_VALUE_STR + * @value_data: (out callee-allocates) (optional) (transfer none): Pointer to a + * location to store the data of the value (in UTF-8, if it's a string) + * @value_data_size: (out) (optional): Pointer to a location to store the length + * of @value_data, in bytes (including any NUL-terminators, if it's a string). + * %NULL if length is not needed + * @error: (nullable): a pointer to %NULL #GError, or %NULL * - * Finishes an operation started with gxdp_proxy_resolver_call_lookup(). + * Stores the data of the value currently being iterated over in @value_data, + * and its length - in @value_data_len (if not %NULL). * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: %TRUE if value data was retrieved, %FALSE otherwise. + * Since: 2.46 */ /** - * gxdp_proxy_resolver_call_lookup_sync: - * @proxy: A #GXdpProxyResolverProxy. - * @arg_uri: Argument to pass with the method invocation. - * @out_proxies: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the Lookup() D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * g_win32_registry_value_iter_get_data_w: + * @iter: (in) (transfer none): a #GWin32RegistryValueIter + * @auto_expand: (in): %TRUE to automatically expand G_WIN32_REGISTRY_VALUE_EXPAND_STR to + * G_WIN32_REGISTRY_VALUE_STR + * @value_data: (out callee-allocates) (optional) (transfer none): Pointer to a + * location to store the data of the value (in UTF-16, if it's a string) + * @value_data_size: (out) (optional): Pointer to a location to store the size + * of @value_data, in bytes (including any NUL-terminators, if it's a string). + * %NULL if length is not needed. + * @error: (nullable): a pointer to %NULL #GError, or %NULL * - * See gxdp_proxy_resolver_call_lookup() for the asynchronous version of this method. + * Stores the data of the value currently being iterated over in @value_data, + * and its length - in @value_data_len (if not %NULL). * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + * Returns: %TRUE if value data was retrieved, %FALSE otherwise. + * Since: 2.46 */ /** - * gxdp_proxy_resolver_complete_lookup: - * @object: A #GXdpProxyResolver. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @proxies: Parameter to return. + * g_win32_registry_value_iter_get_name: + * @iter: (in) (transfer none): a #GWin32RegistryValueIter + * @value_name: (out callee-allocates) (transfer none): Pointer to a location + * to store the name of a value (in UTF-8). + * @value_name_len: (out) (optional): Pointer to a location to store the length + * of @value_name, in gchars, excluding NUL-terminator. + * %NULL if length is not needed. + * @error: (nullable): a pointer to %NULL #GError, or %NULL * - * Helper function used in service implementations to finish handling invocations of the Lookup() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * Stores the name of the value currently being iterated over in @value_name, + * and its length - in @value_name_len (if not %NULL). * - * This method will free @invocation, you cannot use it afterwards. + * Returns: %TRUE if value name was retrieved, %FALSE otherwise. + * Since: 2.46 */ /** - * gxdp_proxy_resolver_interface_info: + * g_win32_registry_value_iter_get_name_w: + * @iter: (in) (transfer none): a #GWin32RegistryValueIter + * @value_name: (out callee-allocates) (transfer none): Pointer to a location + * to store the name of a value (in UTF-16). + * @value_name_len: (out) (optional): Pointer to a location to store the length + * of @value_name, in gunichar2s, excluding NUL-terminator. + * %NULL if length is not needed. + * @error: (nullable): a pointer to %NULL #GError, or %NULL * - * Gets a machine-readable description of the org.freedesktop.portal.ProxyResolver D-Bus interface. + * Stores the name of the value currently being iterated over in @value_name, + * and its length - in @value_name (if not %NULL). * - * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. + * Returns: %TRUE if value name was retrieved, %FALSE otherwise. + * Since: 2.46 */ /** - * gxdp_proxy_resolver_override_properties: - * @klass: The class structure for a #GObject-derived class. - * @property_id_begin: The property id to assign to the first overridden property. + * g_win32_registry_value_iter_get_value_type: + * @iter: (in) (transfer none): a #GWin32RegistryValueIter + * @value_type: (out): Pointer to a location to store the type of + * the value. + * @error: (nullable): a pointer to %NULL #GError, or %NULL * - * Overrides all #GObject properties in the #GXdpProxyResolver interface for a concrete class. - * The properties are overridden in the order they are defined. + * Stores the type of the value currently being iterated over in @value_type. * - * Returns: The last property id. + * Returns: %TRUE if value type was retrieved, %FALSE otherwise. + * Since: 2.46 */ /** - * gxdp_proxy_resolver_proxy_new: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. + * g_win32_registry_value_iter_init: + * @iter: (in) (transfer none): a pointer to a #GWin32RegistryValueIter + * @key: (in) (transfer none): a #GWin32RegistryKey to iterate over + * @error: (nullable): a pointer to %NULL #GError, or %NULL * - * Asynchronously creates a proxy for the D-Bus interface org.freedesktop.portal.ProxyResolver. See g_dbus_proxy_new() for more details. + * Initialises (without allocating) a #GWin32RegistryValueIter. @iter may be + * completely uninitialised prior to this call; its old value is + * ignored. * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_proxy_resolver_proxy_new_finish() to get the result of the operation. + * The iterator remains valid for as long as @key exists. + * Clean up its internal buffers with a call to + * g_win32_registry_value_iter_clear() when done. * - * See gxdp_proxy_resolver_proxy_new_sync() for the synchronous, blocking version of this constructor. + * Returns: %TRUE if iterator was initialized successfully, %FALSE on error. + * Since: 2.46 */ /** - * gxdp_proxy_resolver_proxy_new_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_proxy_resolver_proxy_new(). - * @error: Return location for error or %NULL + * g_win32_registry_value_iter_n_values: + * @iter: (in) (transfer none): a #GWin32RegistryValueIter + * + * Queries the number of values items in the key that we are + * iterating over. This is the total number of values -- not the number + * of items remaining. * - * Finishes an operation started with gxdp_proxy_resolver_proxy_new(). + * This information is accurate at the point of iterator initialization, + * and may go out of sync with reality even while values are enumerated. * - * Returns: (transfer full) (type GXdpProxyResolverProxy): The constructed proxy object or %NULL if @error is set. + * Returns: the number of values in the key + * Since: 2.46 */ /** - * gxdp_proxy_resolver_proxy_new_for_bus: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. + * g_win32_registry_value_iter_next: + * @iter: (in) (transfer none): a #GWin32RegistryValueIter + * @skip_errors: (in): %TRUE if iterator should silently ignore errors (such as + * the actual number of values being less than expected) and + * proceed forward + * @error: (nullable): a pointer to %NULL #GError, or %NULL + * + * Advances iterator to the next value in the key. If no more values remain then + * FALSE is returned. + * Enumeration errors can be ignored if @skip_errors is %TRUE + * + * Here is an example for iterating with g_win32_registry_value_iter_next(): + * |[ + * // iterate values of a key + * void + * iterate_values_recursive (GWin32RegistryKey *key) + * { + * GWin32RegistryValueIter iter; + * gchar *name; + * GWin32RegistryValueType val_type; + * gchar *val_data; + * + * if (!g_win32_registry_value_iter_init (&iter, key, NULL)) + * return; + * + * while (g_win32_registry_value_iter_next (&iter, TRUE, NULL)) + * { + * if ((!g_win32_registry_value_iter_get_value_type (&iter, &value)) || + * ((val_type != G_WIN32_REGISTRY_VALUE_STR) && + * (val_type != G_WIN32_REGISTRY_VALUE_EXPAND_STR))) + * continue; * - * Like gxdp_proxy_resolver_proxy_new() but takes a #GBusType instead of a #GDBusConnection. + * if (g_win32_registry_value_iter_get_value (&iter, TRUE, &name, NULL, + * &val_data, NULL, NULL)) + * g_print ("value '%s' = '%s'\n", name, val_data); + * } * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call gxdp_proxy_resolver_proxy_new_for_bus_finish() to get the result of the operation. + * g_win32_registry_value_iter_clear (&iter); + * } + * ]| * - * See gxdp_proxy_resolver_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. + * Returns: %TRUE if next value info was retrieved, %FALSE otherwise. + * Since: 2.46 */ /** - * gxdp_proxy_resolver_proxy_new_for_bus_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_proxy_resolver_proxy_new_for_bus(). - * @error: Return location for error or %NULL + * g_zlib_compressor_get_file_info: + * @compressor: a #GZlibCompressor * - * Finishes an operation started with gxdp_proxy_resolver_proxy_new_for_bus(). + * Returns the #GZlibCompressor:file-info property. * - * Returns: (transfer full) (type GXdpProxyResolverProxy): The constructed proxy object or %NULL if @error is set. + * Returns: (transfer none): a #GFileInfo, or %NULL + * Since: 2.26 */ /** - * gxdp_proxy_resolver_proxy_new_for_bus_sync: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL + * g_zlib_compressor_new: + * @format: The format to use for the compressed data + * @level: compression level (0-9), -1 for default + * + * Creates a new #GZlibCompressor. * - * Like gxdp_proxy_resolver_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. + * Returns: a new #GZlibCompressor + * Since: 2.24 + */ + + +/** + * g_zlib_compressor_set_file_info: + * @compressor: a #GZlibCompressor + * @file_info: (nullable): a #GFileInfo * - * The calling thread is blocked until a reply is received. + * Sets @file_info in @compressor. If non-%NULL, and @compressor's + * #GZlibCompressor:format property is %G_ZLIB_COMPRESSOR_FORMAT_GZIP, + * it will be used to set the file name and modification time in + * the GZIP header of the compressed data. * - * See gxdp_proxy_resolver_proxy_new_for_bus() for the asynchronous version of this constructor. + * Note: it is an error to call this function while a compression is in + * progress; it may only be called immediately after creation of @compressor, + * or after resetting it with g_converter_reset(). * - * Returns: (transfer full) (type GXdpProxyResolverProxy): The constructed proxy object or %NULL if @error is set. + * Since: 2.26 */ /** - * gxdp_proxy_resolver_proxy_new_sync: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL + * g_zlib_decompressor_get_file_info: + * @decompressor: a #GZlibDecompressor * - * Synchronously creates a proxy for the D-Bus interface org.freedesktop.portal.ProxyResolver. See g_dbus_proxy_new_sync() for more details. + * Retrieves the #GFileInfo constructed from the GZIP header data + * of compressed data processed by @compressor, or %NULL if @decompressor's + * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP, + * or the header data was not fully processed yet, or it not present in the + * data stream at all. * - * The calling thread is blocked until a reply is received. + * Returns: (transfer none): a #GFileInfo, or %NULL + * Since: 2.26 + */ + + +/** + * g_zlib_decompressor_new: + * @format: The format to use for the compressed data * - * See gxdp_proxy_resolver_proxy_new() for the asynchronous version of this constructor. + * Creates a new #GZlibDecompressor. * - * Returns: (transfer full) (type GXdpProxyResolverProxy): The constructed proxy object or %NULL if @error is set. + * Returns: a new #GZlibDecompressor + * Since: 2.24 */ /** - * gxdp_proxy_resolver_skeleton_new: + * get_viewable_logical_drives: * - * Creates a skeleton object for the D-Bus interface org.freedesktop.portal.ProxyResolver. + * Returns the list of logical and viewable drives as defined by + * GetLogicalDrives() and the registry keys + * Software\Microsoft\Windows\CurrentVersion\Policies\Explorer under + * HKLM or HKCU. If neither key exists the result of + * GetLogicalDrives() is returned. * - * Returns: (transfer full) (type GXdpProxyResolverSkeleton): The skeleton object. + * Returns: bitmask with same meaning as returned by GetLogicalDrives() */ diff -Nru gobject-introspection-1.56.1/gir/glib-2.0.c gobject-introspection-1.64.1/gir/glib-2.0.c --- gobject-introspection-1.56.1/gir/glib-2.0.c 2018-04-09 06:09:02.000000000 +0000 +++ gobject-introspection-1.64.1/gir/glib-2.0.c 2020-04-05 14:08:04.694724800 +0000 @@ -633,6 +633,9 @@ * to iterate over the elements of a #GHashTable. GHashTableIter * structures are typically allocated on the stack and then initialized * with g_hash_table_iter_init(). + * + * The iteration order of a #GHashTableIter over the keys/values in a hash + * table is not defined. */ @@ -1514,6 +1517,10 @@ * simultaneous read-only access (by holding the 'reader' lock via * g_rw_lock_reader_lock()). * + * It is unspecified whether readers or writers have priority in acquiring the + * lock when a reader already holds the lock and a writer is queued to acquire + * it. + * * Here is an example for an array with access functions: * |[ * GRWLock lock; @@ -2000,29 +2007,6 @@ /** - * GTestTrapFlags: - * @G_TEST_TRAP_SILENCE_STDOUT: Redirect stdout of the test child to - * `/dev/null` so it cannot be observed on the console during test - * runs. The actual output is still captured though to allow later - * tests with g_test_trap_assert_stdout(). - * @G_TEST_TRAP_SILENCE_STDERR: Redirect stderr of the test child to - * `/dev/null` so it cannot be observed on the console during test - * runs. The actual output is still captured though to allow later - * tests with g_test_trap_assert_stderr(). - * @G_TEST_TRAP_INHERIT_STDIN: If this flag is given, stdin of the - * child process is shared with stdin of its parent process. - * It is redirected to `/dev/null` otherwise. - * - * Test traps are guards around forked tests. - * These flags determine what traps to set. - * - * Deprecated: #GTestTrapFlags is used only with g_test_trap_fork(), - * which is deprecated. g_test_trap_subprocess() uses - * #GTestSubprocessFlags. - */ - - -/** * GThread: * * The #GThread struct represents a running thread. This struct @@ -2076,12 +2060,12 @@ /** * GTime: * - * Simply a replacement for time_t. It has been deprecated - * since it is not equivalent to time_t on 64-bit platforms - * with a 64-bit time_t. Unrelated to #GTimer. + * Simply a replacement for `time_t`. It has been deprecated + * since it is not equivalent to `time_t` on 64-bit platforms + * with a 64-bit `time_t`. Unrelated to #GTimer. * * Note that #GTime is defined to always be a 32-bit integer, - * unlike time_t which may be 64-bit on some systems. Therefore, + * unlike `time_t` which may be 64-bit on some systems. Therefore, * #GTime will overflow in the year 2038, and you cannot use the * address of a #GTime variable as argument to the UNIX time() * function. @@ -2094,6 +2078,9 @@ * time (&ttime); * gtime = (GTime)ttime; * ]| + * + * Deprecated: 2.62: This is not [Y2038-safe](https://en.wikipedia.org/wiki/Year_2038_problem). + * Use #GDateTime or #time_t instead. */ @@ -2106,9 +2093,13 @@ * Similar to the struct timeval returned by the gettimeofday() * UNIX system call. * - * GLib is attempting to unify around the use of 64bit integers to + * GLib is attempting to unify around the use of 64-bit integers to * represent microsecond-precision time. As such, this type will be - * removed from a future version of GLib. + * removed from a future version of GLib. A consequence of using `glong` for + * `tv_sec` is that on 32-bit systems `GTimeVal` is subject to the year 2038 + * problem. + * + * Deprecated: 2.62: Use #GDateTime or #guint64 instead. */ @@ -2725,12 +2716,33 @@ * @G_VARIANT_PARSE_ERROR_UNKNOWN_KEYWORD: an unknown keyword was encountered * @G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT: unterminated string constant * @G_VARIANT_PARSE_ERROR_VALUE_EXPECTED: no value given + * @G_VARIANT_PARSE_ERROR_RECURSION: variant was too deeply nested; #GVariant is only guaranteed to handle nesting up to 64 levels (Since: 2.64) * * Error codes returned by parsing text-format GVariants. */ /** + * G_APPROX_VALUE: + * @a: a numeric value + * @b: a numeric value + * @epsilon: a numeric value that expresses the tolerance between @a and @b + * + * Evaluates to a truth value if the absolute difference between @a and @b is + * smaller than @epsilon, and to a false value otherwise. + * + * For example, + * - `G_APPROX_VALUE (5, 6, 2)` evaluates to true + * - `G_APPROX_VALUE (3.14, 3.15, 0.001)` evaluates to false + * - `G_APPROX_VALUE (n, 0.f, FLT_EPSILON)` evaluates to true if `n` is within + * the single precision floating point epsilon from zero + * + * Returns: %TRUE if the two values are within the desired range + * Since: 2.58 + */ + + +/** * G_ASCII_DTOSTR_BUF_SIZE: * * A good size for a buffer to be passed into g_ascii_dtostr(). @@ -2787,23 +2799,6 @@ /** - * G_CONST_RETURN: - * - * If %G_DISABLE_CONST_RETURNS is defined, this macro expands - * to nothing. By default, the macro expands to const. The macro - * can be used in place of const for functions that return a value - * that should not be modified. The purpose of this macro is to allow - * us to turn on const for returned constant strings by default, while - * allowing programmers who find that annoying to turn it off. This macro - * should only be used for return values and for "out" parameters, it - * doesn't make sense for "in" parameters. - * - * Deprecated: 2.30: API providers should replace all existing uses with - * const and API consumers should adjust their code accordingly - */ - - -/** * G_CSET_A_2_Z: * * The set of uppercase ASCII alphabet characters. @@ -2881,7 +2876,7 @@ * The function will not be called if the variable to be cleaned up * contains %NULL. * - * This will typically be the _free() or _unref() function for the given + * This will typically be the `_free()` or `_unref()` function for the given * type. * * With this definition, it will be possible to use g_autoptr() with @@ -2905,7 +2900,7 @@ * * Defines the appropriate cleanup function for a type. * - * This will typically be the _clear() function for the given type. + * This will typically be the `_clear()` function for the given type. * * With this definition, it will be possible to use g_auto() with * @TypeName. @@ -2938,7 +2933,7 @@ * and file descriptors. * * @none specifies the "none" value for the type in question. It is - * probably something like %NULL or -1. If the variable is found to + * probably something like %NULL or `-1`. If the variable is found to * contain this value then the free function will not be called. * * |[ @@ -2976,6 +2971,11 @@ * meant to be portable across different compilers and must be placed * before the function declaration. * + * |[ + * G_GNUC_BEGIN_IGNORE_DEPRECATIONS + * if (check == some_deprecated_function ()) + * G_GNUC_END_IGNORE_DEPRECATIONS + * { + * do_something (); + * } + * ]| + * + * and you should move the deprecated section outside the condition + * + * |[ + * + * // Solution A + * some_data_t *res; + * + * G_GNUC_BEGIN_IGNORE_DEPRECATIONS + * res = some_deprecated_function (); + * G_GNUC_END_IGNORE_DEPRECATIONS + * + * if (check == res) + * { + * do_something (); + * } + * + * // Solution B + * G_GNUC_BEGIN_IGNORE_DEPRECATIONS + * if (check == some_deprecated_function ()) + * { + * do_something (); + * } + * G_GNUC_END_IGNORE_DEPRECATIONS + * ]| + * + * |[ - * gchar *g_dgettext (gchar *domain_name, gchar *msgid) G_GNUC_FORMAT (2); - * ]| - */ - - -/** - * G_GNUC_FUNCTION: - * - * Expands to "" on all modern compilers, and to __FUNCTION__ on gcc - * version 2.x. Don't use it. - * - * Deprecated: 2.16: Use G_STRFUNC() instead - */ - - -/** * G_GNUC_INTERNAL: * * This attribute can be used for marking library functions as being used @@ -3367,185 +3293,6 @@ /** - * G_GNUC_MALLOC: - * - * Expands to the GNU C malloc function attribute if the compiler is gcc. - * Declaring a function as malloc enables better optimization of the function. - * A function can have the malloc attribute if it returns a pointer which is - * guaranteed to not alias with any other pointer when the function returns - * (in practice, this means newly allocated memory). - * - * Place the attribute after the declaration, just before the semicolon. - * - * See the GNU C documentation for more details. - * - * Since: 2.6 - */ - - -/** - * G_GNUC_MAY_ALIAS: - * - * Expands to the GNU C may_alias type attribute if the compiler is gcc. - * Types with this attribute will not be subjected to type-based alias - * analysis, but are assumed to alias with any other type, just like char. - * - * See the GNU C documentation for details. - * - * Since: 2.14 - */ - - -/** - * G_GNUC_NORETURN: - * - * Expands to the GNU C noreturn function attribute if the compiler is gcc. - * It is used for declaring functions which never return. It enables - * optimization of the function, and avoids possible compiler warnings. - * - * Place the attribute after the declaration, just before the semicolon. - * - * See the GNU C documentation for more details. - */ - - -/** - * G_GNUC_NO_INSTRUMENT: - * - * Expands to the GNU C no_instrument_function function attribute if the - * compiler is gcc. Functions with this attribute will not be instrumented - * for profiling, when the compiler is called with the - * `-finstrument-functions` option. - * - * Place the attribute after the declaration, just before the semicolon. - * - * See the GNU C documentation for more details. - */ - - -/** - * G_GNUC_NULL_TERMINATED: - * - * Expands to the GNU C sentinel function attribute if the compiler is gcc. - * This function attribute only applies to variadic functions and instructs - * the compiler to check that the argument list is terminated with an - * explicit %NULL. - * - * Place the attribute after the declaration, just before the semicolon. - * - * See the GNU C documentation for more details. - * - * Since: 2.8 - */ - - -/** - * G_GNUC_PRETTY_FUNCTION: - * - * Expands to "" on all modern compilers, and to __PRETTY_FUNCTION__ - * on gcc version 2.x. Don't use it. - * - * Deprecated: 2.16: Use G_STRFUNC() instead - */ - - -/** - * G_GNUC_PRINTF: - * @format_idx: the index of the argument corresponding to the - * format string (the arguments are numbered from 1) - * @arg_idx: the index of the first of the format arguments, or 0 if - * there are no format arguments - * - * Expands to the GNU C format function attribute if the compiler is gcc. - * This is used for declaring functions which take a variable number of - * arguments, with the same syntax as printf(). It allows the compiler - * to type-check the arguments passed to the function. - * - * Place the attribute after the function declaration, just before the - * semicolon. - * - * See the - * [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-3288) - * for more details. - * - * |[ - * gint g_snprintf (gchar *string, - * gulong n, - * gchar const *format, - * ...) G_GNUC_PRINTF (3, 4); - * ]| - */ - - -/** - * G_GNUC_PURE: - * - * Expands to the GNU C pure function attribute if the compiler is gcc. - * Declaring a function as pure enables better optimization of calls to - * the function. A pure function has no effects except its return value - * and the return value depends only on the parameters and/or global - * variables. - * - * Place the attribute after the declaration, just before the semicolon. - * - * See the GNU C documentation for more details. - */ - - -/** - * G_GNUC_SCANF: - * @format_idx: the index of the argument corresponding to - * the format string (the arguments are numbered from 1) - * @arg_idx: the index of the first of the format arguments, or 0 if - * there are no format arguments - * - * Expands to the GNU C format function attribute if the compiler is gcc. - * This is used for declaring functions which take a variable number of - * arguments, with the same syntax as scanf(). It allows the compiler - * to type-check the arguments passed to the function. - * - * See the - * [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-3288) - * for details. - */ - - -/** - * G_GNUC_UNUSED: - * - * Expands to the GNU C unused function attribute if the compiler is gcc. - * It is used for declaring functions and arguments which may never be used. - * It avoids possible compiler warnings. - * - * For functions, place the attribute after the declaration, just before the - * semicolon. For arguments, place the attribute at the beginning of the - * argument declaration. - * - * |[ - * void my_unused_function (G_GNUC_UNUSED gint unused_argument, - * gint other_argument) G_GNUC_UNUSED; - * ]| - * - * See the GNU C documentation for more details. - */ - - -/** - * G_GNUC_WARN_UNUSED_RESULT: - * - * Expands to the GNU C warn_unused_result function attribute if the compiler - * is gcc. This function attribute makes the compiler emit a warning if the - * result of a function call is ignored. - * - * Place the attribute after the declaration, just before the semicolon. - * - * See the GNU C documentation for more details. - * - * Since: 2.10 - */ - - -/** * G_GOFFSET_CONSTANT: * @val: a literal integer value, e.g. 0x1d636b02300a7aa7 * @@ -3763,21 +3510,6 @@ /** - * G_INLINE_FUNC: - * - * This macro used to be used to conditionally define inline functions - * in a compatible way before this feature was supported in all - * compilers. These days, GLib requires inlining support from the - * compiler, so your GLib-using programs can safely assume that the - * "inline" keywork works properly. - * - * Never use this macro anymore. Just say "static inline". - * - * Deprecated: 2.48: Use "static inline" instead - */ - - -/** * G_IO_CHANNEL_ERROR: * * Error domain for #GIOChannel operations. Errors in this domain will @@ -4407,40 +4139,6 @@ /** - * G_MININT16: - * - * The minimum value which can be held in a #gint16. - * - * Since: 2.4 - */ - - -/** - * G_MININT32: - * - * The minimum value which can be held in a #gint32. - * - * Since: 2.4 - */ - - -/** - * G_MININT64: - * - * The minimum value which can be held in a #gint64. - */ - - -/** - * G_MININT8: - * - * The minimum value which can be held in a #gint8. - * - * Since: 2.4 - */ - - -/** * G_MINLONG: * * The minimum value which can be held in a #glong. @@ -5050,6 +4748,132 @@ /** + * SECTION:arcbox + * @Title: Atomically reference counted data + * @Short_description: Allocated memory with atomic reference counting semantics + * + * An "atomically reference counted box", or "ArcBox", is an opaque wrapper + * data type that is guaranteed to be as big as the size of a given data type, + * and which augments the given data type with thread safe reference counting + * semantics for its memory management. + * + * ArcBox is useful if you have a plain old data type, like a structure + * typically placed on the stack, and you wish to provide additional API + * to use it on the heap; or if you want to implement a new type to be + * passed around by reference without necessarily implementing copy/free + * semantics or your own reference counting. + * + * The typical use is: + * + * |[ + * typedef struct { + * char *name; + * char *address; + * char *city; + * char *state; + * int age; + * } Person; + * + * Person * + * person_new (void) + * { + * return g_atomic_rc_box_new0 (Person); + * } + * ]| + * + * Every time you wish to acquire a reference on the memory, you should + * call g_atomic_rc_box_acquire(); similarly, when you wish to release a reference + * you should call g_atomic_rc_box_release(): + * + * |[ + * // Add a Person to the Database; the Database acquires ownership + * // of the Person instance + * void + * add_person_to_database (Database *db, Person *p) + * { + * db->persons = g_list_prepend (db->persons, g_atomic_rc_box_acquire (p)); + * } + * + * // Removes a Person from the Database; the reference acquired by + * // add_person_to_database() is released here + * void + * remove_person_from_database (Database *db, Person *p) + * { + * db->persons = g_list_remove (db->persons, p); + * g_atomic_rc_box_release (p); + * } + * ]| + * + * If you have additional memory allocated inside the structure, you can + * use g_atomic_rc_box_release_full(), which takes a function pointer, which + * will be called if the reference released was the last: + * + * |[ + * void + * person_clear (Person *p) + * { + * g_free (p->name); + * g_free (p->address); + * g_free (p->city); + * g_free (p->state); + * } + * + * void + * remove_person_from_database (Database *db, Person *p) + * { + * db->persons = g_list_remove (db->persons, p); + * g_atomic_rc_box_release_full (p, (GDestroyNotify) person_clear); + * } + * ]| + * + * If you wish to transfer the ownership of a reference counted data + * type without increasing the reference count, you can use g_steal_pointer(): + * + * |[ + * Person *p = g_atomic_rc_box_new (Person); + * + * fill_person_details (p); + * + * add_person_to_database (db, g_steal_pointer (&p)); + * ]| + * + * ## Thread safety + * + * The reference counting operations on data allocated using g_atomic_rc_box_alloc(), + * g_atomic_rc_box_new(), and g_atomic_rc_box_dup() are guaranteed to be atomic, and thus + * can be safely be performed by different threads. It is important to note that + * only the reference acquisition and release are atomic; changes to the content + * of the data are your responsibility. + * + * ## Automatic pointer clean up + * + * If you want to add g_autoptr() support to your plain old data type through + * reference counting, you can use the G_DEFINE_AUTOPTR_CLEANUP_FUNC() and + * g_atomic_rc_box_release(): + * + * |[ + * G_DEFINE_AUTOPTR_CLEANUP_FUNC (MyDataStruct, g_atomic_rc_box_release) + * ]| + * + * If you need to clear the contents of the data, you will need to use an + * ancillary function that calls g_rc_box_release_full(): + * + * |[ + * static void + * my_data_struct_release (MyDataStruct *data) + * { + * // my_data_struct_clear() is defined elsewhere + * g_atomic_rc_box_release_full (data, (GDestroyNotify) my_data_struct_clear); + * } + * + * G_DEFINE_AUTOPTR_CLEANUP_FUNC (MyDataStruct, my_data_struct_release) + * ]| + * + * Since: 2.58 + */ + + +/** * SECTION:arrays * @title: Arrays * @short_description: arrays of arbitrary elements which grow @@ -5775,6 +5599,13 @@ * function (the file being opened, or whatever - though in the * g_file_get_contents() case, the @message already contains a filename). * + * Note, however, that many error messages are too technical to display to the + * user in an application, so prefer to use g_error_matches() to categorize errors + * from called functions, and build an appropriate error message for the context + * within your application. Error messages from a #GError are more appropriate + * to be printed in system logs or on the command line. They are typically + * translated. + * * When implementing a function that can report errors, the basic * tool is g_set_error(). Typically, if a fatal error occurs you * want to g_set_error(), then return immediately. g_set_error() @@ -5787,6 +5618,8 @@ * gint fd; * int saved_errno; * + * g_return_val_if_fail (error == NULL || *error == NULL, -1); + * * fd = open ("file.txt", O_RDONLY); * saved_errno = errno; * @@ -5916,11 +5749,7 @@ * |[ * #define G_SPAWN_ERROR g_spawn_error_quark () * - * GQuark - * g_spawn_error_quark (void) - * { - * return g_quark_from_static_string ("g-spawn-error-quark"); - * } + * G_DEFINE_QUARK (g-spawn-error-quark, g_spawn_error) * ]| * * - The quark function for the error domain is called @@ -6383,7 +6212,7 @@ * type information would be allocated. * * The type information cache, additionally, uses a #GHashTable to - * store and lookup the cached items and stores a pointer to this + * store and look up the cached items and stores a pointer to this * hash table in static storage. The hash table is freed when there * are zero items in the type cache. * @@ -6528,7 +6357,10 @@ * * The above definition is recursive to arbitrary depth. "aaaaai" and * "(ui(nq((y)))s)" are both valid type strings, as is - * "a(aa(ui)(qna{ya(yd)}))". + * "a(aa(ui)(qna{ya(yd)}))". In order to not hit memory limits, #GVariant + * imposes a limit on recursion depth of 65 nested containers. This is the + * limit in the D-Bus specification (64) plus one to allow a #GDBusMessage to + * be nested in a top-level tuple. * * The meaning of each of the characters is as follows: * - `b`: the type string of %G_VARIANT_TYPE_BOOLEAN; a boolean value. @@ -6623,7 +6455,7 @@ * To insert a key and value into a #GHashTable, use * g_hash_table_insert(). * - * To lookup a value corresponding to a given key, use + * To look up a value corresponding to a given key, use * g_hash_table_lookup() and g_hash_table_lookup_extended(). * * g_hash_table_lookup_extended() can also be used to simply @@ -6632,8 +6464,10 @@ * To remove a key and value, use g_hash_table_remove(). * * To call a function for each key and value pair use - * g_hash_table_foreach() or use a iterator to iterate over the - * key/value pairs in the hash table, see #GHashTableIter. + * g_hash_table_foreach() or use an iterator to iterate over the + * key/value pairs in the hash table, see #GHashTableIter. The iteration order + * of a hash table is not defined, and you must not rely on iterating over + * keys/values in the same order as they were inserted. * * To destroy a #GHashTable use g_hash_table_destroy(). * @@ -6720,7 +6554,7 @@ * // Rest of your application. * } * ]| - * where `DATADIR` is as typically provided by automake. + * where `DATADIR` is as typically provided by automake or Meson. * * For a library, you only have to call bindtextdomain() and * bind_textdomain_codeset() in your initialization function. If your library @@ -7078,8 +6912,10 @@ * * To allow multiple independent sets of sources to be handled in * different threads, each source is associated with a #GMainContext. - * A GMainContext can only be running in a single thread, but - * sources can be added to it and removed from it from other threads. + * A #GMainContext can only be running in a single thread, but + * sources can be added to it and removed from it from other threads. All + * functions which operate on a #GMainContext or a built-in #GSource are + * thread-safe. * * Each event source is assigned a priority. The default priority, * #G_PRIORITY_DEFAULT, is 0. Values less than 0 denote higher priorities. @@ -7188,7 +7024,8 @@ * The "GMarkup" parser is intended to parse a simple markup format * that's a subset of XML. This is a small, efficient, easy-to-use * parser. It should not be used if you expect to interoperate with - * other applications generating full-scale XML. However, it's very + * other applications generating full-scale XML, and must not be used if you + * expect to parse untrusted input. However, it's very * useful for application data files, config files, etc. where you * know your application will be the only one writing the file. * Full-scale XML parsers should be able to parse the subset used by @@ -7249,6 +7086,9 @@ * new with delete and new[] with delete[]. Otherwise bad things can happen, * since these allocators may use different memory pools (and new/delete call * constructors and destructors). + * + * Since GLib 2.46 g_malloc() is hardcoded to always use the system malloc + * implementation. */ @@ -7727,6 +7567,9 @@ * using one of the [Type Conversion Macros][glib-Type-Conversion-Macros], * or simply pointers to any type of data. * + * As with all other GLib data structures, #GQueue is not thread-safe. + * For a thread-safe queue, use #GAsyncQueue. + * * To create a new GQueue, use g_queue_new(). * * To initialize a statically-allocated GQueue, use #G_QUEUE_INIT or @@ -7794,6 +7637,230 @@ /** + * SECTION:rcbox + * @Title: Reference counted data + * @Short_description: Allocated memory with reference counting semantics + * + * A "reference counted box", or "RcBox", is an opaque wrapper data type + * that is guaranteed to be as big as the size of a given data type, and + * which augments the given data type with reference counting semantics + * for its memory management. + * + * RcBox is useful if you have a plain old data type, like a structure + * typically placed on the stack, and you wish to provide additional API + * to use it on the heap; or if you want to implement a new type to be + * passed around by reference without necessarily implementing copy/free + * semantics or your own reference counting. + * + * The typical use is: + * + * |[ + * typedef struct { + * char *name; + * char *address; + * char *city; + * char *state; + * int age; + * } Person; + * + * Person * + * person_new (void) + * { + * return g_rc_box_new0 (Person); + * } + * ]| + * + * Every time you wish to acquire a reference on the memory, you should + * call g_rc_box_acquire(); similarly, when you wish to release a reference + * you should call g_rc_box_release(): + * + * |[ + * // Add a Person to the Database; the Database acquires ownership + * // of the Person instance + * void + * add_person_to_database (Database *db, Person *p) + * { + * db->persons = g_list_prepend (db->persons, g_rc_box_acquire (p)); + * } + * + * // Removes a Person from the Database; the reference acquired by + * // add_person_to_database() is released here + * void + * remove_person_from_database (Database *db, Person *p) + * { + * db->persons = g_list_remove (db->persons, p); + * g_rc_box_release (p); + * } + * ]| + * + * If you have additional memory allocated inside the structure, you can + * use g_rc_box_release_full(), which takes a function pointer, which + * will be called if the reference released was the last: + * + * |[ + * void + * person_clear (Person *p) + * { + * g_free (p->name); + * g_free (p->address); + * g_free (p->city); + * g_free (p->state); + * } + * + * void + * remove_person_from_database (Database *db, Person *p) + * { + * db->persons = g_list_remove (db->persons, p); + * g_rc_box_release_full (p, (GDestroyNotify) person_clear); + * } + * ]| + * + * If you wish to transfer the ownership of a reference counted data + * type without increasing the reference count, you can use g_steal_pointer(): + * + * |[ + * Person *p = g_rc_box_new (Person); + * + * // fill_person_details() is defined elsewhere + * fill_person_details (p); + * + * // add_person_to_database_no_ref() is defined elsewhere; it adds + * // a Person to the Database without taking a reference + * add_person_to_database_no_ref (db, g_steal_pointer (&p)); + * ]| + * + * ## Thread safety + * + * The reference counting operations on data allocated using g_rc_box_alloc(), + * g_rc_box_new(), and g_rc_box_dup() are not thread safe; it is your code's + * responsibility to ensure that references are acquired are released on the + * same thread. + * + * If you need thread safe reference counting, see the [atomic reference counted + * data][arcbox] API. + * + * ## Automatic pointer clean up + * + * If you want to add g_autoptr() support to your plain old data type through + * reference counting, you can use the G_DEFINE_AUTOPTR_CLEANUP_FUNC() and + * g_rc_box_release(): + * + * |[ + * G_DEFINE_AUTOPTR_CLEANUP_FUNC (MyDataStruct, g_rc_box_release) + * ]| + * + * If you need to clear the contents of the data, you will need to use an + * ancillary function that calls g_rc_box_release_full(): + * + * |[ + * static void + * my_data_struct_release (MyDataStruct *data) + * { + * // my_data_struct_clear() is defined elsewhere + * g_rc_box_release_full (data, (GDestroyNotify) my_data_struct_clear); + * } + * + * G_DEFINE_AUTOPTR_CLEANUP_FUNC (MyDataStruct, my_data_struct_release) + * ]| + * + * Since: 2.58 + */ + + +/** + * SECTION:refcount + * @Title: Reference counting + * @Short_description: Reference counting types and functions + * + * Reference counting is a garbage collection mechanism that is based on + * assigning a counter to a data type, or any memory area; the counter is + * increased whenever a new reference to that data type is acquired, and + * decreased whenever the reference is released. Once the last reference + * is released, the resources associated to that data type are freed. + * + * GLib uses reference counting in many of its data types, and provides + * the #grefcount and #gatomicrefcount types to implement safe and atomic + * reference counting semantics in new data types. + * + * It is important to note that #grefcount and #gatomicrefcount should be + * considered completely opaque types; you should always use the provided + * API to increase and decrease the counters, and you should never check + * their content directly, or compare their content with other values. + * + * Since: 2.58 + */ + + +/** + * SECTION:refstring + * @Title: Reference counted strings + * @Short_description: Strings with reference counted memory management + * + * Reference counted strings are normal C strings that have been augmented + * with a reference counter to manage their resources. You allocate a new + * reference counted string and acquire and release references as needed, + * instead of copying the string among callers; when the last reference on + * the string is released, the resources allocated for it are freed. + * + * Typically, reference counted strings can be used when parsing data from + * files and storing them into data structures that are passed to various + * callers: + * + * |[ + * PersonDetails * + * person_details_from_data (const char *data) + * { + * // Use g_autoptr() to simplify error cases + * g_autoptr(GRefString) full_name = NULL; + * g_autoptr(GRefString) address = NULL; + * g_autoptr(GRefString) city = NULL; + * g_autoptr(GRefString) state = NULL; + * g_autoptr(GRefString) zip_code = NULL; + * + * // parse_person_details() is defined elsewhere; returns refcounted strings + * if (!parse_person_details (data, &full_name, &address, &city, &state, &zip_code)) + * return NULL; + * + * if (!validate_zip_code (zip_code)) + * return NULL; + * + * // add_address_to_cache() and add_full_name_to_cache() are defined + * // elsewhere; they add strings to various caches, using refcounted + * // strings to avoid copying data over and over again + * add_address_to_cache (address, city, state, zip_code); + * add_full_name_to_cache (full_name); + * + * // person_details_new() is defined elsewhere; it takes a reference + * // on each string + * PersonDetails *res = person_details_new (full_name, + * address, + * city, + * state, + * zip_code); + * + * return res; + * } + * ]| + * + * In the example above, we have multiple functions taking the same strings + * for different uses; with typical C strings, we'd have to copy the strings + * every time the life time rules of the data differ from the life time of + * the string parsed from the original buffer. With reference counted strings, + * each caller can take a reference on the data, and keep it as long as it + * needs to own the string. + * + * Reference counted strings can also be "interned" inside a global table + * owned by GLib; while an interned string has at least a reference, creating + * a new interned reference counted string with the same contents will return + * a reference to the existing string instead of creating a new reference + * counted string instance. Once the string loses its last reference, it will + * be automatically removed from the global interned strings table. + * + * Since: 2.58 + */ + + +/** * SECTION:scanner * @title: Lexical Scanner * @short_description: a general purpose lexical scanner @@ -8019,7 +8086,6 @@ * SECTION:testing * @title: Testing * @short_description: a test framework - * @see_also: [gtester][gtester], [gtester-report][gtester-report] * * GLib provides a framework for writing and maintaining unit tests * in parallel to the code they are testing. The API is designed according @@ -8047,12 +8113,18 @@ * creates a test suite called "misc" with a single test case named * "assertions", which consists of running the test_assertions function. * - * In addition to the traditional g_assert(), the test framework provides + * In addition to the traditional g_assert_true(), the test framework provides * an extended set of assertions for comparisons: g_assert_cmpfloat(), - * g_assert_cmpint(), g_assert_cmpuint(), g_assert_cmphex(), - * g_assert_cmpstr(), and g_assert_cmpmem(). The advantage of these - * variants over plain g_assert() is that the assertion messages can be - * more elaborate, and include the values of the compared entities. + * g_assert_cmpfloat_with_epsilon(), g_assert_cmpint(), g_assert_cmpuint(), + * g_assert_cmphex(), g_assert_cmpstr(), g_assert_cmpmem() and + * g_assert_cmpvariant(). The + * advantage of these variants over plain g_assert_true() is that the assertion + * messages can be more elaborate, and include the values of the compared + * entities. + * + * Note that g_assert() should not be used in unit tests, since it is a no-op + * when compiling with `G_DISABLE_ASSERT`. Use g_assert() in production code, + * and g_assert_true() in unit tests. * * A full example of creating a test suite with two tests using fixtures: * |[ @@ -8104,7 +8176,6 @@ * setlocale (LC_ALL, ""); * * g_test_init (&argc, &argv, NULL); - * g_test_bug_base ("http://bugzilla.gnome.org/show_bug.cgi?id="); * * // Define the tests. * g_test_add ("/my-object/test1", MyObjectFixture, "some-user-data", @@ -8148,9 +8219,9 @@ * [TAP](https://testanything.org/) harness; GLib provides template files for * easily integrating with it: * - * - [glib-tap.mk](https://git.gnome.org/browse/glib/tree/glib-tap.mk) - * - [tap-test](https://git.gnome.org/browse/glib/tree/tap-test) - * - [tap-driver.sh](https://git.gnome.org/browse/glib/tree/tap-driver.sh) + * - [glib-tap.mk](https://gitlab.gnome.org/GNOME/glib/blob/glib-2-58/glib-tap.mk) + * - [tap-test](https://gitlab.gnome.org/GNOME/glib/blob/glib-2-58/tap-test) + * - [tap-driver.sh](https://gitlab.gnome.org/GNOME/glib/blob/glib-2-58/tap-driver.sh) * * You can copy these files in your own project's root directory, and then * set up your `Makefile.am` file to reference them, for instance: @@ -8187,8 +8258,11 @@ * * If you don't have access to the Autotools TAP harness, you can use the * [gtester][gtester] and [gtester-report][gtester-report] tools, and use - * the [glib.mk](https://git.gnome.org/browse/glib/tree/glib.mk) Automake - * template provided by GLib. + * the [glib.mk](https://gitlab.gnome.org/GNOME/glib/blob/glib-2-58/glib.mk) + * Automake template provided by GLib. Note, however, that since GLib 2.62, + * [gtester][gtester] and [gtester-report][gtester-report] have been deprecated + * in favour of using TAP. The `--tap` argument to tests is enabled by default + * as of GLib 2.62. */ @@ -8350,10 +8424,17 @@ * #GTimeZone is a structure that represents a time zone, at no * particular point in time. It is refcounted and immutable. * + * Each time zone has an identifier (for example, ‘Europe/London’) which is + * platform dependent. See g_time_zone_new() for information on the identifier + * formats. The identifier of a time zone can be retrieved using + * g_time_zone_get_identifier(). + * * A time zone contains a number of intervals. Each interval has - * an abbreviation to describe it, an offet to UTC and a flag indicating - * if the daylight savings time is in effect during that interval. A - * time zone always has at least one interval -- interval 0. + * an abbreviation to describe it (for example, ‘PDT’), an offet to UTC and a + * flag indicating if the daylight savings time is in effect during that + * interval. A time zone always has at least one interval — interval 0. Note + * that interval abbreviations are not the same as time zone identifiers + * (apart from ‘UTC’), and cannot be passed to g_time_zone_new(). * * Every UTC time is contained within exactly one interval, but a given * local time may be contained within zero, one or two intervals (due to @@ -8404,7 +8485,7 @@ * * To insert a key/value pair into a #GTree use g_tree_insert(). * - * To lookup the value corresponding to a given key, use + * To look up the value corresponding to a given key, use * g_tree_lookup() and g_tree_lookup_extended(). * * To find out the number of nodes in a #GTree, use g_tree_nnodes(). To @@ -8491,7 +8572,7 @@ * i = (int) (long) p; * ]| * The GLib macros GPOINTER_TO_INT(), GINT_TO_POINTER(), etc. take care - * to do the right thing on the every platform. + * to do the right thing on every platform. * * Warning: You may not store pointers in integers. This is not * portable in any way, shape or form. These macros only allow storing @@ -8525,6 +8606,12 @@ * GLib also defines macros for the limits of some of the standard * integer and floating point types, as well as macros for suitable * printf() formats for these types. + * + * Note that depending on the platform and build configuration, the format + * macros might not be compatible with the system provided printf() function, + * because GLib might use a different printf() implementation internally. + * The format macros will always work with GLib API (like g_print()), and with + * any C99 compatible printf() implementation. */ @@ -8599,6 +8686,53 @@ /** + * SECTION:warnings + * @title: Warnings and Assertions + * @short_description: warnings and assertions to use in runtime code + * + * GLib defines several warning functions and assertions which can be used to + * warn of programmer errors when calling functions, and print error messages + * from command line programs. + * + * The g_return_if_fail(), g_return_val_if_fail(), g_return_if_reached() and + * g_return_val_if_reached() macros are intended as pre-condition assertions, to + * be used at the top of a public function to check that the function’s + * arguments are acceptable. Any failure of such a pre-condition assertion is + * considered a programming error on the part of the caller of the public API, + * and the program is considered to be in an undefined state afterwards. They + * are similar to the libc assert() function, but provide more context on + * failures. + * + * For example: + * |[ + * gboolean + * g_dtls_connection_shutdown (GDtlsConnection *conn, + * gboolean shutdown_read, + * gboolean shutdown_write, + * GCancellable *cancellable, + * GError **error) + * { + * // local variable declarations + * + * g_return_val_if_fail (G_IS_DTLS_CONNECTION (conn), FALSE); + * g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE); + * g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + * + * // function body + * + * return return_val; + * } + * ]| + * + * g_print(), g_printerr() and g_set_print_handler() are intended to be used for + * output from command line applications, since they output to standard output + * and standard error by default — whereas functions like g_message() and + * g_log() may be redirected to special purpose message windows, files, or the + * system journal. + */ + + +/** * SECTION:windows * @title: Windows Compatibility Functions * @short_description: UNIX emulation on Windows @@ -8707,20 +8841,72 @@ /** + * g_array_binary_search: + * @array: a #GArray. + * @target: a pointer to the item to look up. + * @compare_func: A #GCompareFunc used to locate @target. + * @out_match_index: (optional) (out caller-allocates): return location + * for the index of the element, if found. + * + * Checks whether @target exists in @array by performing a binary + * search based on the given comparison function @compare_func which + * get pointers to items as arguments. If the element is found, %TRUE + * is returned and the element’s index is returned in @out_match_index + * (if non-%NULL). Otherwise, %FALSE is returned and @out_match_index + * is undefined. If @target exists multiple times in @array, the index + * of the first instance is returned. This search is using a binary + * search, so the @array must absolutely be sorted to return a correct + * result (if not, the function may produce false-negative). + * + * This example defines a comparison function and search an element in a #GArray: + * |[ + * static gint* + * cmpint (gconstpointer a, gconstpointer b) + * { + * const gint *_a = a; + * const gint *_b = b; + * + * return *_a - *_b; + * } + * ... + * gint i = 424242; + * guint matched_index; + * gboolean result = g_array_binary_search (garray, &i, cmpint, &matched_index); + * ... + * ]| + * + * Returns: %TRUE if @target is one of the elements of @array, %FALSE otherwise. + * Since: 2.62 + */ + + +/** + * g_array_copy: + * @array: A #GArray. + * + * Create a shallow copy of a #GArray. If the array elements consist of + * pointers to data, the pointers are copied but the actual data is not. + * + * Returns: (transfer container): A copy of @array. + * Since: 2.62 + */ + + +/** * g_array_free: * @array: a #GArray * @free_segment: if %TRUE the actual element data is freed as well * * Frees the memory allocated for the #GArray. If @free_segment is - * %TRUE it frees the memory block holding the elements as well and - * also each element if @array has a @element_free_func set. Pass + * %TRUE it frees the memory block holding the elements as well. Pass * %FALSE if you want to free the #GArray wrapper but preserve the - * underlying array for use elsewhere. If the reference count of @array - * is greater than one, the #GArray wrapper is preserved but the size - * of @array will be set to zero. + * underlying array for use elsewhere. If the reference count of + * @array is greater than one, the #GArray wrapper is preserved but + * the size of @array will be set to zero. * - * If array elements contain dynamically-allocated memory, they should - * be freed separately. + * If array contents point to dynamically-allocated memory, they should + * be freed separately if @free_seg is %TRUE and no @clear_func + * function has been set for @array. * * This function is not thread-safe. If using a #GArray from multiple * threads, use only the atomic g_array_ref() and g_array_unref() @@ -8783,11 +8969,19 @@ * g_array_insert_vals: * @array: a #GArray * @index_: the index to place the elements at - * @data: (not nullable): a pointer to the elements to insert + * @data: (nullable): a pointer to the elements to insert * @len: the number of elements to insert * * Inserts @len elements into a #GArray at the given index. * + * If @index_ is greater than the array’s current length, the array is expanded. + * The elements between the old end of the array and the newly inserted elements + * will be initialised to zero if the array was configured to clear elements; + * otherwise their values will be undefined. + * + * @data may be %NULL if (and only if) @len is zero. If @len is zero, this + * function is a no-op. + * * Returns: the #GArray */ @@ -8829,11 +9023,14 @@ /** * g_array_prepend_vals: * @array: a #GArray - * @data: (not nullable): a pointer to the elements to prepend to the start of the array - * @len: the number of elements to prepend + * @data: (nullable): a pointer to the elements to prepend to the start of the array + * @len: the number of elements to prepend, which may be zero * * Adds @len elements onto the start of the array. * + * @data may be %NULL if (and only if) @len is zero. If @len is zero, this + * function is a no-op. + * * This operation is slower than g_array_append_vals() since the * existing elements in the array have to be moved to make space for * the new elements. @@ -8976,6 +9173,37 @@ /** + * g_array_steal: + * @array: a #GArray. + * @len: (optional) (out caller-allocates): pointer to retrieve the number of + * elements of the original array + * + * Frees the data in the array and resets the size to zero, while + * the underlying array is preserved for use elsewhere and returned + * to the caller. + * + * If the array was created with the @zero_terminate property + * set to %TRUE, the returned data is zero terminated too. + * + * If array elements contain dynamically-allocated memory, + * the array elements should also be freed by the caller. + * + * A short example of use: + * |[ + * ... + * gpointer data; + * gsize data_len; + * data = g_array_steal (some_array, &data_len); + * ... + * ]| + * + * Returns: (transfer full): the element data, which should be + * freed using g_free(). + * Since: 2.64 + */ + + +/** * g_array_unref: * @array: A #GArray * @@ -9315,7 +9543,8 @@ * @base that is within inclusive bounds limited by @min and @max. If * this is true, then the converted number is stored in @out_num. An * empty string is not a valid input. A string with leading or - * trailing whitespace is also an invalid input. + * trailing whitespace is also an invalid input. A string with a leading sign + * (`-` or `+`) is not a valid input for the unsigned parser. * * @base can be between 2 and 36 inclusive. Hexadecimal numbers must * not be prefixed with "0x" or "0X". Such a problem does not exist @@ -9435,6 +9664,11 @@ * changing the current locale, since that would not be * thread-safe. * + * Note that input with a leading minus sign (`-`) is accepted, and will return + * the negation of the parsed number, unless that would overflow a #guint64. + * Critically, this means you cannot assume that a short fixed length input will + * never result in a low return value, as the input could have a leading `-`. + * * This function is typically used when reading configuration * files or other non-user input that should be locale independent. * To handle input from the user you should normally use the @@ -9528,15 +9762,18 @@ * * The macro can be turned off in final releases of code by defining * `G_DISABLE_ASSERT` when compiling the application, so code must - * not depend on any side effects from @expr. + * not depend on any side effects from @expr. Similarly, it must not be used + * in unit tests, otherwise the unit tests will be ineffective if compiled with + * `G_DISABLE_ASSERT`. Use g_assert_true() and related macros in unit tests + * instead. */ /** * g_assert_cmpfloat: - * @n1: an floating point number + * @n1: a floating point number * @cmp: The comparison operator to use. - * One of ==, !=, <, >, <=, >=. + * One of `==`, `!=`, `<`, `>`, `<=`, `>=`. * @n2: another floating point number * * Debugging macro to compare two floating point numbers. @@ -9551,10 +9788,28 @@ /** + * g_assert_cmpfloat_with_epsilon: + * @n1: a floating point number + * @n2: another floating point number + * @epsilon: a numeric value that expresses the expected tolerance + * between @n1 and @n2 + * + * Debugging macro to compare two floating point numbers within an epsilon. + * + * The effect of `g_assert_cmpfloat_with_epsilon (n1, n2, epsilon)` is + * the same as `g_assert_true (abs (n1 - n2) < epsilon)`. The advantage + * of this macro is that it can produce a message that includes the + * actual values of @n1 and @n2. + * + * Since: 2.58 + */ + + +/** * g_assert_cmphex: * @n1: an unsigned integer * @cmp: The comparison operator to use. - * One of ==, !=, <, >, <=, >=. + * One of `==`, `!=`, `<`, `>`, `<=`, `>=`. * @n2: another unsigned integer * * Debugging macro to compare to unsigned integers. @@ -9570,7 +9825,7 @@ * g_assert_cmpint: * @n1: an integer * @cmp: The comparison operator to use. - * One of ==, !=, <, >, <=, >=. + * One of `==`, `!=`, `<`, `>`, `<=`, `>=`. * @n2: another integer * * Debugging macro to compare two integers. @@ -9586,9 +9841,9 @@ /** * g_assert_cmpmem: - * @m1: pointer to a buffer + * @m1: (nullable): pointer to a buffer * @l1: length of @m1 - * @m2: pointer to another buffer + * @m2: (nullable): pointer to another buffer * @l2: length of @m2 * * Debugging macro to compare memory regions. If the comparison fails, @@ -9600,6 +9855,8 @@ * The advantage of this macro is that it can produce a message that * includes the actual values of @l1 and @l2. * + * @m1 may be %NULL if (and only if) @l1 is zero; similarly for @m2 and @l2. + * * |[ * g_assert_cmpmem (buf->data, buf->len, expected, sizeof (expected)); * ]| @@ -9612,7 +9869,7 @@ * g_assert_cmpstr: * @s1: a string (may be %NULL) * @cmp: The comparison operator to use. - * One of ==, !=, <, >, <=, >=. + * One of `==`, `!=`, `<`, `>`, `<=`, `>=`. * @s2: another string (may be %NULL) * * Debugging macro to compare two strings. If the comparison fails, @@ -9637,7 +9894,7 @@ * g_assert_cmpuint: * @n1: an unsigned integer * @cmp: The comparison operator to use. - * One of ==, !=, <, >, <=, >=. + * One of `==`, `!=`, `<`, `>`, `<=`, `>=`. * @n2: another unsigned integer * * Debugging macro to compare two unsigned integers. @@ -9652,6 +9909,24 @@ /** + * g_assert_cmpvariant: + * @v1: pointer to a #GVariant + * @v2: pointer to another #GVariant + * + * Debugging macro to compare two #GVariants. If the comparison fails, + * an error message is logged and the application is either terminated + * or the testcase marked as failed. The variants are compared using + * g_variant_equal(). + * + * The effect of `g_assert_cmpvariant (v1, v2)` is the same as + * `g_assert_true (g_variant_equal (v1, v2))`. The advantage of this macro is + * that it can produce a message that includes the actual values of @v1 and @v2. + * + * Since: 2.60 + */ + + +/** * g_assert_error: * @err: a #GError, possibly %NULL * @dom: the expected error domain (a #GQuark) @@ -9668,7 +9943,7 @@ * * This can only be used to test for a specific error. If you want to * test that @err is set, but don't care what it's set to, just use - * `g_assert (err != NULL)` + * `g_assert_nonnull (err)`. * * Since: 2.20 */ @@ -9684,6 +9959,10 @@ * an error message is logged and the application is either * terminated or the testcase marked as failed. * + * Note that unlike g_assert(), this macro is unaffected by whether + * `G_DISABLE_ASSERT` is defined. Hence it should only be used in tests and, + * conversely, g_assert() should not be used in tests. + * * See g_test_set_nonfatal_assertions(). * * Since: 2.38 @@ -9715,6 +9994,10 @@ * an error message is logged and the application is either * terminated or the testcase marked as failed. * + * Note that unlike g_assert(), this macro is unaffected by whether + * `G_DISABLE_ASSERT` is defined. Hence it should only be used in tests and, + * conversely, g_assert() should not be used in tests. + * * See g_test_set_nonfatal_assertions(). * * Since: 2.40 @@ -9729,7 +10012,8 @@ * application is terminated. * * The macro can be turned off in final releases of code by defining - * `G_DISABLE_ASSERT` when compiling the application. + * `G_DISABLE_ASSERT` when compiling the application. Hence, it should not be + * used in unit tests, where assertions should always be effective. */ @@ -9743,6 +10027,10 @@ * an error message is logged and the application is either * terminated or the testcase marked as failed. * + * Note that unlike g_assert(), this macro is unaffected by whether + * `G_DISABLE_ASSERT` is defined. Hence it should only be used in tests and, + * conversely, g_assert() should not be used in tests. + * * See g_test_set_nonfatal_assertions(). * * Since: 2.38 @@ -9759,6 +10047,10 @@ * an error message is logged and the application is either * terminated or the testcase marked as failed. * + * Note that unlike g_assert(), this macro is unaffected by whether + * `G_DISABLE_ASSERT` is defined. Hence it should only be used in tests and, + * conversely, g_assert() should not be used in tests. + * * See g_test_set_nonfatal_assertions(). * * Since: 2.38 @@ -9767,11 +10059,14 @@ /** * g_assertion_message_expr: (skip) - * @domain: (nullable): - * @file: - * @line: - * @func: - * @expr: (nullable): + * @domain: (nullable): log domain + * @file: file containing the assertion + * @line: line number of the assertion + * @func: function containing the assertion + * @expr: (nullable): expression which failed + * + * Internal function used to print messages from the public g_assert() and + * g_assert_not_reached() macros. */ @@ -10084,7 +10379,7 @@ * * If no data is received before @end_time, %NULL is returned. * - * To easily calculate @end_time, a combination of g_get_current_time() + * To easily calculate @end_time, a combination of g_get_real_time() * and g_time_val_add() can be used. * * Returns: data from the queue or %NULL, when no data is @@ -10103,7 +10398,7 @@ * * If no data is received before @end_time, %NULL is returned. * - * To easily calculate @end_time, a combination of g_get_current_time() + * To easily calculate @end_time, a combination of g_get_real_time() * and g_time_val_add() can be used. * * This function must be called while holding the @queue's lock. @@ -10540,6 +10835,189 @@ /** + * g_atomic_rc_box_acquire: + * @mem_block: (not nullable): a pointer to reference counted data + * + * Atomically acquires a reference on the data pointed by @mem_block. + * + * Returns: (transfer full) (not nullable): a pointer to the data, + * with its reference count increased + * Since: 2.58 + */ + + +/** + * g_atomic_rc_box_alloc: + * @block_size: the size of the allocation, must be greater than 0 + * + * Allocates @block_size bytes of memory, and adds atomic + * reference counting semantics to it. + * + * The data will be freed when its reference count drops to + * zero. + * + * The allocated data is guaranteed to be suitably aligned for any + * built-in type. + * + * Returns: (transfer full) (not nullable): a pointer to the allocated memory + * Since: 2.58 + */ + + +/** + * g_atomic_rc_box_alloc0: + * @block_size: the size of the allocation, must be greater than 0 + * + * Allocates @block_size bytes of memory, and adds atomic + * referenc counting semantics to it. + * + * The contents of the returned data is set to zero. + * + * The data will be freed when its reference count drops to + * zero. + * + * The allocated data is guaranteed to be suitably aligned for any + * built-in type. + * + * Returns: (transfer full) (not nullable): a pointer to the allocated memory + * Since: 2.58 + */ + + +/** + * g_atomic_rc_box_dup: + * @block_size: the number of bytes to copy, must be greater than 0 + * @mem_block: (not nullable): the memory to copy + * + * Allocates a new block of data with atomic reference counting + * semantics, and copies @block_size bytes of @mem_block + * into it. + * + * Returns: (transfer full) (not nullable): a pointer to the allocated + * memory + * Since: 2.58 + */ + + +/** + * g_atomic_rc_box_get_size: + * @mem_block: (not nullable): a pointer to reference counted data + * + * Retrieves the size of the reference counted data pointed by @mem_block. + * + * Returns: the size of the data, in bytes + * Since: 2.58 + */ + + +/** + * g_atomic_rc_box_new: + * @type: the type to allocate, typically a structure name + * + * A convenience macro to allocate atomically reference counted + * data with the size of the given @type. + * + * This macro calls g_atomic_rc_box_alloc() with `sizeof (@type)` and + * casts the returned pointer to a pointer of the given @type, + * avoiding a type cast in the source code. + * + * Returns: (transfer full) (not nullable): a pointer to the allocated + * memory, cast to a pointer for the given @type + * Since: 2.58 + */ + + +/** + * g_atomic_rc_box_new0: + * @type: the type to allocate, typically a structure name + * + * A convenience macro to allocate atomically reference counted + * data with the size of the given @type, and set its contents + * to zero. + * + * This macro calls g_atomic_rc_box_alloc0() with `sizeof (@type)` and + * casts the returned pointer to a pointer of the given @type, + * avoiding a type cast in the source code. + * + * Returns: (transfer full) (not nullable): a pointer to the allocated + * memory, cast to a pointer for the given @type + * Since: 2.58 + */ + + +/** + * g_atomic_rc_box_release: + * @mem_block: (transfer full) (not nullable): a pointer to reference counted data + * + * Atomically releases a reference on the data pointed by @mem_block. + * + * If the reference was the last one, it will free the + * resources allocated for @mem_block. + * + * Since: 2.58 + */ + + +/** + * g_atomic_rc_box_release_full: + * @mem_block: (transfer full) (not nullable): a pointer to reference counted data + * @clear_func: (not nullable): a function to call when clearing the data + * + * Atomically releases a reference on the data pointed by @mem_block. + * + * If the reference was the last one, it will call @clear_func + * to clear the contents of @mem_block, and then will free the + * resources allocated for @mem_block. + * + * Since: 2.58 + */ + + +/** + * g_atomic_ref_count_compare: + * @arc: the address of an atomic reference count variable + * @val: the value to compare + * + * Atomically compares the current value of @arc with @val. + * + * Returns: %TRUE if the reference count is the same + * as the given value + * Since: 2.58 + */ + + +/** + * g_atomic_ref_count_dec: + * @arc: the address of an atomic reference count variable + * + * Atomically decreases the reference count. + * + * Returns: %TRUE if the reference count reached 0, and %FALSE otherwise + * Since: 2.58 + */ + + +/** + * g_atomic_ref_count_inc: + * @arc: the address of an atomic reference count variable + * + * Atomically increases the reference count. + * + * Since: 2.58 + */ + + +/** + * g_atomic_ref_count_init: + * @arc: the address of an atomic reference count variable + * + * Initializes a reference count variable. + * + * Since: 2.58 + */ + + +/** * g_auto: * @TypeName: a supported variable type * @@ -10547,6 +11025,8 @@ * * The variable is cleaned up in a way appropriate to its type when the * variable goes out of scope. The type must support this. + * The way to clean up the type must have been defined using one of the macros + * G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC() or G_DEFINE_AUTO_CLEANUP_FREE_FUNC(). * * This feature is only supported on GCC and clang. This macro is not * defined on other compilers and should not be used in programs that @@ -10559,7 +11039,7 @@ * This macro can be used to avoid having to do explicit cleanups of * local variables when exiting functions. It often vastly simplifies * handling of error conditions, removing the need for various tricks - * such as 'goto out' or repeating of cleanup code. It is also helpful + * such as `goto out` or repeating of cleanup code. It is also helpful * for non-error cases. * * Consider the following example: @@ -10586,8 +11066,8 @@ * } * ]| * - * You must initialize the variable in some way -- either by use of an - * initialiser or by ensuring that an _init function will be called on + * You must initialize the variable in some way — either by use of an + * initialiser or by ensuring that an `_init` function will be called on * it unconditionally before it goes out of scope. * * Since: 2.44 @@ -10607,7 +11087,7 @@ * This means it's useful for any type that is returned from * g_malloc(). * - * Otherwise, this macro has similar constraints as g_autoptr() - only + * Otherwise, this macro has similar constraints as g_autoptr(): only * supported on GCC and clang, the variable must be initialized, etc. * * |[ @@ -10643,13 +11123,13 @@ * are intended to be portable to those compilers. * * This is meant to be used to declare lists of a type with a cleanup - * function. The type of the variable is a GList *. You - * must not add your own '*'. + * function. The type of the variable is a `GList *`. You + * must not add your own `*`. * * This macro can be used to avoid having to do explicit cleanups of * local variables when exiting functions. It often vastly simplifies * handling of error conditions, removing the need for various tricks - * such as 'goto out' or repeating of cleanup code. It is also helpful + * such as `goto out` or repeating of cleanup code. It is also helpful * for non-error cases. * * See also g_autoslist(), g_autoptr() and g_steal_pointer(). @@ -10666,6 +11146,8 @@ * * The variable is cleaned up in a way appropriate to its type when the * variable goes out of scope. The type must support this. + * The way to clean up the type must have been defined using the macro + * G_DEFINE_AUTOPTR_CLEANUP_FUNC(). * * This feature is only supported on GCC and clang. This macro is not * defined on other compilers and should not be used in programs that @@ -10673,12 +11155,12 @@ * * This is meant to be used to declare pointers to types with cleanup * functions. The type of the variable is a pointer to @TypeName. You - * must not add your own '*'. + * must not add your own `*`. * * This macro can be used to avoid having to do explicit cleanups of * local variables when exiting functions. It often vastly simplifies * handling of error conditions, removing the need for various tricks - * such as 'goto out' or repeating of cleanup code. It is also helpful + * such as `goto out` or repeating of cleanup code. It is also helpful * for non-error cases. * * Consider the following example: @@ -10708,7 +11190,7 @@ * } * ]| * - * You must initialise the variable in some way -- either by use of an + * You must initialise the variable in some way — either by use of an * initialiser or by ensuring that it is assigned to unconditionally * before it goes out of scope. * @@ -10719,6 +11201,35 @@ /** + * g_autoqueue: + * @TypeName: a supported variable type + * + * Helper to declare a double-ended queue variable with automatic deep cleanup. + * + * The queue is deeply freed, in a way appropriate to the specified type, when the + * variable goes out of scope. The type must support this. + * + * This feature is only supported on GCC and clang. This macro is not + * defined on other compilers and should not be used in programs that + * are intended to be portable to those compilers. + * + * This is meant to be used to declare queues of a type with a cleanup + * function. The type of the variable is a `GQueue *`. You + * must not add your own `*`. + * + * This macro can be used to avoid having to do explicit cleanups of + * local variables when exiting functions. It often vastly simplifies + * handling of error conditions, removing the need for various tricks + * such as `goto out` or repeating of cleanup code. It is also helpful + * for non-error cases. + * + * See also g_autolist(), g_autoptr() and g_steal_pointer(). + * + * Since: 2.62 + */ + + +/** * g_autoslist: * @TypeName: a supported variable type * @@ -10732,13 +11243,13 @@ * are intended to be portable to those compilers. * * This is meant to be used to declare lists of a type with a cleanup - * function. The type of the variable is a GSList *. You - * must not add your own '*'. + * function. The type of the variable is a `GSList *`. You + * must not add your own `*`. * * This macro can be used to avoid having to do explicit cleanups of * local variables when exiting functions. It often vastly simplifies * handling of error conditions, removing the need for various tricks - * such as 'goto out' or repeating of cleanup code. It is also helpful + * such as `goto out` or repeating of cleanup code. It is also helpful * for non-error cases. * * See also g_autolist(), g_autoptr() and g_steal_pointer(). @@ -10749,7 +11260,7 @@ /** * g_base64_decode: - * @text: zero-terminated string with base64 text to decode + * @text: (not nullable): zero-terminated string with base64 text to decode * @out_len: (out): The length of the decoded data is written here * * Decode a sequence of Base-64 encoded text into binary data. Note @@ -10803,7 +11314,7 @@ /** * g_base64_encode: - * @data: (array length=len) (element-type guint8): the binary data to encode + * @data: (array length=len) (element-type guint8) (nullable): the binary data to encode * @len: the length of @data * * Encode a sequence of binary data into its Base-64 stringified @@ -10856,10 +11367,10 @@ * be written to it. Due to the way base64 encodes you will need * at least: (@len / 3 + 1) * 4 + 4 bytes (+ 4 may be needed in case of * non-zero state). If you enable line-breaking you will need at least: - * ((@len / 3 + 1) * 4 + 4) / 72 + 1 bytes of extra space. + * ((@len / 3 + 1) * 4 + 4) / 76 + 1 bytes of extra space. * * @break_lines is typically used when putting base64-encoded data in emails. - * It breaks the lines at 72 columns instead of putting all of the text on + * It breaks the lines at 76 columns instead of putting all of the text on * the same line. This avoids problems with long lines in the email system. * Note however that it breaks the lines with `LF` characters, not * `CR LF` sequences, so the result cannot be passed directly to SMTP @@ -11078,8 +11589,8 @@ * @stamp: (out) (optional): return location for the last registration time, or %NULL * @error: return location for a #GError, or %NULL * - * Gets the registration informations of @app_name for the bookmark for - * @uri. See g_bookmark_file_set_app_info() for more informations about + * Gets the registration information of @app_name for the bookmark for + * @uri. See g_bookmark_file_set_app_info() for more information about * the returned data. * * The string returned in @app_exec must be freed. @@ -11363,7 +11874,7 @@ * This function looks for a desktop bookmark file named @file in the * paths returned from g_get_user_data_dir() and g_get_system_data_dirs(), * loads the file into @bookmark and returns the file's full path in - * @full_path. If the file could not be loaded then an %error is + * @full_path. If the file could not be loaded then @error is * set to either a #GFileError or #GBookmarkFileError. * * Returns: %TRUE if a key file could be loaded, %FALSE otherwise @@ -11992,6 +12503,22 @@ /** + * g_byte_array_steal: + * @array: a #GByteArray. + * @len: (optional) (out caller-allocates): pointer to retrieve the number of + * elements of the original array + * + * Frees the data in the array and resets the size to zero, while + * the underlying array is preserved for use elsewhere and returned + * to the caller. + * + * Returns: (transfer full): the element data, which should be + * freed using g_free(). + * Since: 2.64 + */ + + +/** * g_byte_array_unref: * @array: A #GByteArray * @@ -12011,10 +12538,17 @@ * * Compares the two #GBytes values. * - * This function can be used to sort GBytes instances in lexographical order. + * This function can be used to sort GBytes instances in lexicographical order. * - * Returns: a negative value if bytes2 is lesser, a positive value if bytes2 is - * greater, and zero if bytes2 is equal to bytes1 + * If @bytes1 and @bytes2 have different length but the shorter one is a + * prefix of the longer one then the shorter one is considered to be less than + * the longer one. Otherwise the first byte where both differ is used for + * comparison. If @bytes1 has a smaller value at that position it is + * considered less, otherwise greater than @bytes2. + * + * Returns: a negative value if @bytes1 is less than @bytes2, a positive value + * if @bytes1 is greater than @bytes2, and zero if @bytes1 is equal to + * @bytes2 * Since: 2.32 */ @@ -12241,6 +12775,33 @@ /** + * g_canonicalize_filename: + * @filename: (type filename): the name of the file + * @relative_to: (type filename) (nullable): the relative directory, or %NULL + * to use the current working directory + * + * Gets the canonical file name from @filename. All triple slashes are turned into + * single slashes, and all `..` and `.`s resolved against @relative_to. + * + * Symlinks are not followed, and the returned path is guaranteed to be absolute. + * + * If @filename is an absolute path, @relative_to is ignored. Otherwise, + * @relative_to will be prepended to @filename to make it absolute. @relative_to + * must be an absolute path, or %NULL. If @relative_to is %NULL, it'll fallback + * to g_get_current_dir(). + * + * This function never fails, and will canonicalize file paths even if they don't + * exist. + * + * No file system I/O is done. + * + * Returns: (type filename) (transfer full): a newly allocated string with the + * canonical file path + * Since: 2.58 + */ + + +/** * g_chdir: * @path: (type filename): a pathname in the GLib file name encoding * (UTF-8 on Windows) @@ -12282,8 +12843,8 @@ /** * g_checksum_get_digest: (skip) * @checksum: a #GChecksum - * @buffer: output buffer - * @digest_len: an inout parameter. The caller initializes it to the size of @buffer. + * @buffer: (array length=digest_len): output buffer + * @digest_len: (inout): an inout parameter. The caller initializes it to the size of @buffer. * After the call it contains the length of the digest. * * Gets the digest from @checksum as a raw binary vector and places it @@ -12300,7 +12861,7 @@ * g_checksum_get_string: * @checksum: a #GChecksum * - * Gets the digest as an hexadecimal string. + * Gets the digest as a hexadecimal string. * * Once this function has been called the #GChecksum can no longer be * updated with g_checksum_update(). @@ -12543,6 +13104,19 @@ /** + * g_clear_list: (skip) + * @list_ptr: (not nullable): a #GList return location + * @destroy: (nullable): the function to pass to g_list_free_full() or %NULL to not free elements + * + * Clears a pointer to a #GList, freeing it and, optionally, freeing its elements using @destroy. + * + * @list_ptr must be a valid pointer. If @list_ptr points to a null #GList, this does nothing. + * + * Since: 2.64 + */ + + +/** * g_clear_pointer: (skip) * @pp: (not nullable): a pointer to a variable, struct member etc. holding a * pointer @@ -12557,13 +13131,30 @@ * pointer is set to %NULL. * * A macro is also included that allows this function to be used without - * pointer casts. + * pointer casts. This will mask any warnings about incompatible function types + * or calling conventions, so you must ensure that your @destroy function is + * compatible with being called as `GDestroyNotify` using the standard calling + * convention for the platform that GLib was compiled for; otherwise the program + * will experience undefined behaviour. * * Since: 2.34 */ /** + * g_clear_slist: (skip) + * @slist_ptr: (not nullable): a #GSList return location + * @destroy: (nullable): the function to pass to g_slist_free_full() or %NULL to not free elements + * + * Clears a pointer to a #GSList, freeing it and, optionally, freeing its elements using @destroy. + * + * @slist_ptr must be a valid pointer. If @slist_ptr points to a null #GSList, this does nothing. + * + * Since: 2.64 + */ + + +/** * g_close: * @fd: A file descriptor * @error: a #GError @@ -13012,13 +13603,16 @@ * into the format string (as with printf()) * * Logs a "critical warning" (#G_LOG_LEVEL_CRITICAL). - * It's more or less application-defined what constitutes - * a critical vs. a regular warning. You could call - * g_log_set_always_fatal() to make critical warnings exit - * the program, then use g_critical() for fatal errors, for - * example. * - * You can also make critical warnings fatal at runtime by + * Critical warnings are intended to be used in the event of an error + * that originated in the current process (a programmer error). + * Logging of a critical error is by definition an indication of a bug + * somewhere in the current program (or its libraries). + * + * g_return_if_fail(), g_return_val_if_fail(), g_return_if_reached() and + * g_return_val_if_reached() log at %G_LOG_LEVEL_CRITICAL. + * + * You can make critical warnings fatal at runtime by * setting the `G_DEBUG` environment variable (see * [Running GLib Applications](glib-running.html)): * @@ -13026,6 +13620,8 @@ * G_DEBUG=fatal-warnings gdb ./my-program * ]| * + * You can also use g_log_set_always_fatal(). + * * Any unrelated failures can be skipped over in * [gdb](https://www.gnu.org/software/gdb/) using the `continue` command. * @@ -13877,7 +14473,10 @@ * * To set the value of a date to the current day, you could write: * |[ - * g_date_set_time_t (date, time (NULL)); + * time_t now = time (NULL); + * if (now == (time_t) -1) + * // handle the error + * g_date_set_time_t (date, now); * ]| * * Since: 2.10 @@ -13896,6 +14495,8 @@ * The time to date conversion is done using the user's current timezone. * * Since: 2.10 + * Deprecated: 2.62: #GTimeVal is not year-2038-safe. Use g_date_set_time_t() + * instead. */ @@ -14262,6 +14863,21 @@ /** + * g_date_time_format_iso8601: + * @datetime: A #GDateTime + * + * Format @datetime in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601), + * including the date, time and time zone, and return that as a UTF-8 encoded + * string. + * + * Returns: a newly allocated string formatted in ISO 8601 format + * or %NULL in the case that there was an error. The string + * should be freed with g_free(). + * Since: 2.62 + */ + + +/** * g_date_time_get_day_of_month: * @datetime: a #GDateTime * @@ -14366,6 +14982,17 @@ /** + * g_date_time_get_timezone: + * @datetime: a #GDateTime + * + * Get the time zone for this @datetime. + * + * Returns: (transfer none): the time zone + * Since: 2.58 + */ + + +/** * g_date_time_get_timezone_abbreviation: * @datetime: a #GDateTime * @@ -14567,9 +15194,17 @@ * * Creates a #GDateTime corresponding to the given * [ISO 8601 formatted string](https://en.wikipedia.org/wiki/ISO_8601) - * @text. ISO 8601 strings of the form