summaryrefslogtreecommitdiff
path: root/gio
diff options
context:
space:
mode:
Diffstat (limited to 'gio')
-rw-r--r--gio/Makefile.am116
-rw-r--r--gio/Makefile.in807
-rw-r--r--gio/__init__.py40
-rw-r--r--gio/gappinfo.override208
-rw-r--r--gio/gapplaunchcontext.override99
-rw-r--r--gio/gbufferedinputstream.override70
-rw-r--r--gio/gcancellable.override38
-rw-r--r--gio/gdatainputstream.override250
-rw-r--r--gio/gdrive.override347
-rw-r--r--gio/gfile.override2216
-rw-r--r--gio/gfileattribute.override153
-rw-r--r--gio/gfileenumerator.override184
-rw-r--r--gio/gfileinfo.override121
-rw-r--r--gio/gfileinputstream.override68
-rw-r--r--gio/gfileiostream.override68
-rw-r--r--gio/gfileoutputstream.override68
-rw-r--r--gio/gicon.override310
-rw-r--r--gio/ginputstream.override344
-rw-r--r--gio/gio-types.defs807
-rw-r--r--gio/gio.defs7465
-rw-r--r--gio/gio.override404
-rw-r--r--gio/giomodule.c205
-rw-r--r--gio/giostream.override68
-rw-r--r--gio/gmemoryinputstream.override91
-rw-r--r--gio/gmemoryoutputstream.override45
-rw-r--r--gio/gmount.override454
-rw-r--r--gio/goutputstream.override292
-rw-r--r--gio/gresolver.override312
-rw-r--r--gio/gsocket.override575
-rw-r--r--gio/gvolume.override237
-rw-r--r--gio/gvolumemonitor.override94
-rw-r--r--gio/pygio-utils.c208
-rw-r--r--gio/pygio-utils.h49
-rw-r--r--gio/unix-types.defs55
-rw-r--r--gio/unix.defs475
-rw-r--r--gio/unix.override62
-rw-r--r--gio/unixmodule.c52
37 files changed, 17457 insertions, 0 deletions
diff --git a/gio/Makefile.am b/gio/Makefile.am
new file mode 100644
index 0000000..a34fd19
--- /dev/null
+++ b/gio/Makefile.am
@@ -0,0 +1,116 @@
+AUTOMAKE_OPTIONS = 1.7
+
+PLATFORM_VERSION = 2.0
+
+INCLUDES = \
+ -I$(top_srcdir)/glib \
+ -I$(top_srcdir)/gobject \
+ $(PYTHON_INCLUDES) \
+ $(PYGOBJECT_CFLAGS) \
+ $(GIO_CFLAGS)
+
+# defs files
+defsdir = $(pkgdatadir)/$(PLATFORM_VERSION)/defs
+defs_DATA =
+
+# python
+pyexec_LTLIBRARIES =
+
+# gio extension modules
+pkgpyexecdir = $(pyexecdir)/gtk-2.0/gio
+pkgpyexec_LTLIBRARIES =
+
+# gio python scripts
+pygiodir = $(pkgpyexecdir)
+pygio_PYTHON = __init__.py
+
+# linker flags
+common_ldflags = -module -avoid-version
+if PLATFORM_WIN32
+common_ldflags += -no-undefined
+endif
+
+CLEANFILES =
+EXTRA_DIST =
+
+# gio module
+GIO_OVERRIDES = \
+ gio.override \
+ gappinfo.override \
+ gapplaunchcontext.override \
+ gbufferedinputstream.override \
+ gcancellable.override \
+ gdatainputstream.override \
+ gdrive.override \
+ gfile.override \
+ gfileattribute.override \
+ gfileenumerator.override \
+ gfileinfo.override \
+ gfileinputstream.override \
+ gfileiostream.override \
+ gfileoutputstream.override \
+ gicon.override \
+ giostream.override \
+ ginputstream.override \
+ gmemoryinputstream.override \
+ gmemoryoutputstream.override \
+ gmount.override \
+ goutputstream.override \
+ gresolver.override \
+ gsocket.override \
+ gvolume.override \
+ gvolumemonitor.override
+
+GIO_DEFS = gio.defs gio-types.defs $(GIO_OVERRIDES)
+CLEANFILES += gio.c
+EXTRA_DIST += $(GIO_DEFS) $(GIO_OVERRIDES)
+gio.c: $(GIO_DEFS) $(GIO_OVERRIDES)
+_gio_la_CFLAGS = $(GIO_CFLAGS)
+_gio_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_gio
+_gio_la_LIBADD = $(GIO_LIBS) $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+_gio_la_SOURCES = \
+ giomodule.c \
+ pygio-utils.c \
+ pygio-utils.h
+nodist__gio_la_SOURCES = gio.c
+if BUILD_GIO
+pkgpyexec_LTLIBRARIES += _gio.la
+defs_DATA += $(GIO_DEFS)
+endif
+
+# giounix module
+GIOUNIX_DEFS = unix.defs unix-types.defs unix.override
+CLEANFILES += unix.c
+EXTRA_DIST += $(GIOUNIX_DEFS) unix.override
+unix.c: $(GIOUNIX_DEFS) unix.override
+unix_la_CFLAGS = $(GIOUNIX_CFLAGS)
+unix_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initunix
+unix_la_LIBADD = $(GIOUNIX_LIBS)
+unix_la_SOURCES = unixmodule.c
+nodist_unix_la_SOURCES = unix.c
+if BUILD_GIOUNIX
+pkgpyexec_LTLIBRARIES += unix.la
+defs_DATA += $(GIOUNIX_DEFS)
+endif
+
+
+# code generator
+.defs.c:
+ (cd $(srcdir)\
+ && $(PYTHON) $(top_srcdir)/codegen/codegen.py \
+ --py_ssize_t-clean \
+ --register gio-types.defs \
+ --register unix-types.defs \
+ --override $*.override \
+ --prefix py$(*F) $*.defs) > $(*D)/gen-$(*F).c \
+ && cp $(*D)/gen-$(*F).c $(*D)/$(*F).c \
+ && rm -f $(*D)/gen-$(*F).c
+
+
+if BUILD_GIO
+all: $(pkgpyexec_LTLIBRARIES:.la=.so)
+clean-local:
+ rm -f $(pkgpyexec_LTLIBRARIES:.la=.so)
+.la.so:
+ $(LN_S) .libs/$@ $@ || true
+endif
diff --git a/gio/Makefile.in b/gio/Makefile.in
new file mode 100644
index 0000000..f0cd632
--- /dev/null
+++ b/gio/Makefile.in
@@ -0,0 +1,807 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+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@
+@PLATFORM_WIN32_TRUE@am__append_1 = -no-undefined
+@BUILD_GIO_TRUE@am__append_2 = _gio.la
+@BUILD_GIO_TRUE@am__append_3 = $(GIO_DEFS)
+@BUILD_GIOUNIX_TRUE@am__append_4 = unix.la
+@BUILD_GIOUNIX_TRUE@am__append_5 = $(GIOUNIX_DEFS)
+subdir = gio
+DIST_COMMON = $(pygio_PYTHON) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+ $(top_srcdir)/m4/jhflags.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)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+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__installdirs = "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" \
+ "$(DESTDIR)$(pygiodir)" "$(DESTDIR)$(defsdir)"
+LTLIBRARIES = $(pkgpyexec_LTLIBRARIES) $(pyexec_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+_gio_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+am__gio_la_OBJECTS = _gio_la-giomodule.lo _gio_la-pygio-utils.lo
+nodist__gio_la_OBJECTS = _gio_la-gio.lo
+_gio_la_OBJECTS = $(am__gio_la_OBJECTS) $(nodist__gio_la_OBJECTS)
+_gio_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(_gio_la_CFLAGS) $(CFLAGS) \
+ $(_gio_la_LDFLAGS) $(LDFLAGS) -o $@
+@BUILD_GIO_TRUE@am__gio_la_rpath = -rpath $(pkgpyexecdir)
+unix_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_unix_la_OBJECTS = unix_la-unixmodule.lo
+nodist_unix_la_OBJECTS = unix_la-unix.lo
+unix_la_OBJECTS = $(am_unix_la_OBJECTS) $(nodist_unix_la_OBJECTS)
+unix_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(unix_la_CFLAGS) $(CFLAGS) \
+ $(unix_la_LDFLAGS) $(LDFLAGS) -o $@
+@BUILD_GIOUNIX_TRUE@am_unix_la_rpath = -rpath $(pkgpyexecdir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(_gio_la_SOURCES) $(nodist__gio_la_SOURCES) \
+ $(unix_la_SOURCES) $(nodist_unix_la_SOURCES)
+DIST_SOURCES = $(_gio_la_SOURCES) $(unix_la_SOURCES)
+py_compile = $(top_srcdir)/py-compile
+DATA = $(defs_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+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@
+FFI_CFLAGS = @FFI_CFLAGS@
+FFI_LIBS = @FFI_LIBS@
+FGREP = @FGREP@
+GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@
+GIOUNIX_LIBS = @GIOUNIX_LIBS@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBFFI_PC = @LIBFFI_PC@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+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_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PLATFORM = @PLATFORM@
+PYGOBJECT_MAJOR_VERSION = @PYGOBJECT_MAJOR_VERSION@
+PYGOBJECT_MICRO_VERSION = @PYGOBJECT_MICRO_VERSION@
+PYGOBJECT_MINOR_VERSION = @PYGOBJECT_MINOR_VERSION@
+PYTHON = @PYTHON@
+PYTHON_BASENAME = @PYTHON_BASENAME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADING_CFLAGS = @THREADING_CFLAGS@
+VERSION = @VERSION@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+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@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+
+# gio extension modules
+pkgpyexecdir = $(pyexecdir)/gtk-2.0/gio
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pygobject_CODEGEN_DEFINES = @pygobject_CODEGEN_DEFINES@
+pythondir = @pythondir@
+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.7
+PLATFORM_VERSION = 2.0
+INCLUDES = \
+ -I$(top_srcdir)/glib \
+ -I$(top_srcdir)/gobject \
+ $(PYTHON_INCLUDES) \
+ $(PYGOBJECT_CFLAGS) \
+ $(GIO_CFLAGS)
+
+
+# defs files
+defsdir = $(pkgdatadir)/$(PLATFORM_VERSION)/defs
+defs_DATA = $(am__append_3) $(am__append_5)
+
+# python
+pyexec_LTLIBRARIES =
+pkgpyexec_LTLIBRARIES = $(am__append_2) $(am__append_4)
+
+# gio python scripts
+pygiodir = $(pkgpyexecdir)
+pygio_PYTHON = __init__.py
+
+# linker flags
+common_ldflags = -module -avoid-version $(am__append_1)
+CLEANFILES = gio.c unix.c
+EXTRA_DIST = $(GIO_DEFS) $(GIO_OVERRIDES) $(GIOUNIX_DEFS) \
+ unix.override
+
+# gio module
+GIO_OVERRIDES = \
+ gio.override \
+ gappinfo.override \
+ gapplaunchcontext.override \
+ gbufferedinputstream.override \
+ gcancellable.override \
+ gdatainputstream.override \
+ gdrive.override \
+ gfile.override \
+ gfileattribute.override \
+ gfileenumerator.override \
+ gfileinfo.override \
+ gfileinputstream.override \
+ gfileiostream.override \
+ gfileoutputstream.override \
+ gicon.override \
+ giostream.override \
+ ginputstream.override \
+ gmemoryinputstream.override \
+ gmemoryoutputstream.override \
+ gmount.override \
+ goutputstream.override \
+ gresolver.override \
+ gsocket.override \
+ gvolume.override \
+ gvolumemonitor.override
+
+GIO_DEFS = gio.defs gio-types.defs $(GIO_OVERRIDES)
+_gio_la_CFLAGS = $(GIO_CFLAGS)
+_gio_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_gio
+_gio_la_LIBADD = $(GIO_LIBS) $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
+_gio_la_SOURCES = \
+ giomodule.c \
+ pygio-utils.c \
+ pygio-utils.h
+
+nodist__gio_la_SOURCES = gio.c
+
+# giounix module
+GIOUNIX_DEFS = unix.defs unix-types.defs unix.override
+unix_la_CFLAGS = $(GIOUNIX_CFLAGS)
+unix_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initunix
+unix_la_LIBADD = $(GIOUNIX_LIBS)
+unix_la_SOURCES = unixmodule.c
+nodist_unix_la_SOURCES = unix.c
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .defs .la .lo .o .obj .so
+$(srcdir)/Makefile.in: $(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) --gnu gio/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu gio/Makefile
+.PRECIOUS: 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: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-pkgpyexecLTLIBRARIES: $(pkgpyexec_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgpyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgpyexecdir)"
+ @list='$(pkgpyexec_LTLIBRARIES)'; test -n "$(pkgpyexecdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgpyexecdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgpyexecdir)"; \
+ }
+
+uninstall-pkgpyexecLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgpyexec_LTLIBRARIES)'; test -n "$(pkgpyexecdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgpyexecdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgpyexecdir)/$$f"; \
+ done
+
+clean-pkgpyexecLTLIBRARIES:
+ -test -z "$(pkgpyexec_LTLIBRARIES)" || rm -f $(pkgpyexec_LTLIBRARIES)
+ @list='$(pkgpyexec_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pyexecdir)"
+ @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyexecdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyexecdir)"; \
+ }
+
+uninstall-pyexecLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyexecdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyexecdir)/$$f"; \
+ done
+
+clean-pyexecLTLIBRARIES:
+ -test -z "$(pyexec_LTLIBRARIES)" || rm -f $(pyexec_LTLIBRARIES)
+ @list='$(pyexec_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+_gio.la: $(_gio_la_OBJECTS) $(_gio_la_DEPENDENCIES)
+ $(_gio_la_LINK) $(am__gio_la_rpath) $(_gio_la_OBJECTS) $(_gio_la_LIBADD) $(LIBS)
+unix.la: $(unix_la_OBJECTS) $(unix_la_DEPENDENCIES)
+ $(unix_la_LINK) $(am_unix_la_rpath) $(unix_la_OBJECTS) $(unix_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gio_la-gio.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gio_la-giomodule.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gio_la-pygio-utils.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix_la-unix.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix_la-unixmodule.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+_gio_la-giomodule.lo: giomodule.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -MT _gio_la-giomodule.lo -MD -MP -MF $(DEPDIR)/_gio_la-giomodule.Tpo -c -o _gio_la-giomodule.lo `test -f 'giomodule.c' || echo '$(srcdir)/'`giomodule.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gio_la-giomodule.Tpo $(DEPDIR)/_gio_la-giomodule.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='giomodule.c' object='_gio_la-giomodule.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -c -o _gio_la-giomodule.lo `test -f 'giomodule.c' || echo '$(srcdir)/'`giomodule.c
+
+_gio_la-pygio-utils.lo: pygio-utils.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -MT _gio_la-pygio-utils.lo -MD -MP -MF $(DEPDIR)/_gio_la-pygio-utils.Tpo -c -o _gio_la-pygio-utils.lo `test -f 'pygio-utils.c' || echo '$(srcdir)/'`pygio-utils.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gio_la-pygio-utils.Tpo $(DEPDIR)/_gio_la-pygio-utils.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygio-utils.c' object='_gio_la-pygio-utils.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -c -o _gio_la-pygio-utils.lo `test -f 'pygio-utils.c' || echo '$(srcdir)/'`pygio-utils.c
+
+_gio_la-gio.lo: gio.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -MT _gio_la-gio.lo -MD -MP -MF $(DEPDIR)/_gio_la-gio.Tpo -c -o _gio_la-gio.lo `test -f 'gio.c' || echo '$(srcdir)/'`gio.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gio_la-gio.Tpo $(DEPDIR)/_gio_la-gio.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gio.c' object='_gio_la-gio.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gio_la_CFLAGS) $(CFLAGS) -c -o _gio_la-gio.lo `test -f 'gio.c' || echo '$(srcdir)/'`gio.c
+
+unix_la-unixmodule.lo: unixmodule.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unix_la_CFLAGS) $(CFLAGS) -MT unix_la-unixmodule.lo -MD -MP -MF $(DEPDIR)/unix_la-unixmodule.Tpo -c -o unix_la-unixmodule.lo `test -f 'unixmodule.c' || echo '$(srcdir)/'`unixmodule.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/unix_la-unixmodule.Tpo $(DEPDIR)/unix_la-unixmodule.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unixmodule.c' object='unix_la-unixmodule.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unix_la_CFLAGS) $(CFLAGS) -c -o unix_la-unixmodule.lo `test -f 'unixmodule.c' || echo '$(srcdir)/'`unixmodule.c
+
+unix_la-unix.lo: unix.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unix_la_CFLAGS) $(CFLAGS) -MT unix_la-unix.lo -MD -MP -MF $(DEPDIR)/unix_la-unix.Tpo -c -o unix_la-unix.lo `test -f 'unix.c' || echo '$(srcdir)/'`unix.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/unix_la-unix.Tpo $(DEPDIR)/unix_la-unix.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unix.c' object='unix_la-unix.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(unix_la_CFLAGS) $(CFLAGS) -c -o unix_la-unix.lo `test -f 'unix.c' || echo '$(srcdir)/'`unix.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-pygioPYTHON: $(pygio_PYTHON)
+ @$(NORMAL_INSTALL)
+ test -z "$(pygiodir)" || $(MKDIR_P) "$(DESTDIR)$(pygiodir)"
+ @list='$(pygio_PYTHON)'; dlist=; list2=; test -n "$(pygiodir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+ if test -f $$b$$p; then \
+ $(am__strip_dir) \
+ dlist="$$dlist $$f"; \
+ list2="$$list2 $$b$$p"; \
+ else :; fi; \
+ done; \
+ for file in $$list2; do echo $$file; done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pygiodir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pygiodir)" || exit $$?; \
+ done || exit $$?; \
+ if test -n "$$dlist"; then \
+ if test -z "$(DESTDIR)"; then \
+ PYTHON=$(PYTHON) $(py_compile) --basedir "$(pygiodir)" $$dlist; \
+ else \
+ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pygiodir)" $$dlist; \
+ fi; \
+ else :; fi
+
+uninstall-pygioPYTHON:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pygio_PYTHON)'; test -n "$(pygiodir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ filesc=`echo "$$files" | sed 's|$$|c|'`; \
+ fileso=`echo "$$files" | sed 's|$$|o|'`; \
+ echo " ( cd '$(DESTDIR)$(pygiodir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pygiodir)" && rm -f $$files || exit $$?; \
+ echo " ( cd '$(DESTDIR)$(pygiodir)' && rm -f" $$filesc ")"; \
+ cd "$(DESTDIR)$(pygiodir)" && rm -f $$filesc || exit $$?; \
+ echo " ( cd '$(DESTDIR)$(pygiodir)' && rm -f" $$fileso ")"; \
+ cd "$(DESTDIR)$(pygiodir)" && rm -f $$fileso
+install-defsDATA: $(defs_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(defsdir)" || $(MKDIR_P) "$(DESTDIR)$(defsdir)"
+ @list='$(defs_DATA)'; test -n "$(defsdir)" || list=; \
+ 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)$(defsdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(defsdir)" || exit $$?; \
+ done
+
+uninstall-defsDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(defs_DATA)'; test -n "$(defsdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(defsdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(defsdir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ 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
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ 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"
+
+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
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pygiodir)" "$(DESTDIR)$(defsdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+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:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+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."
+@BUILD_GIO_FALSE@clean-local:
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local \
+ clean-pkgpyexecLTLIBRARIES clean-pyexecLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-defsDATA install-pygioPYTHON
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-pkgpyexecLTLIBRARIES \
+ install-pyexecLTLIBRARIES
+
+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 -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-defsDATA uninstall-pkgpyexecLTLIBRARIES \
+ uninstall-pyexecLTLIBRARIES uninstall-pygioPYTHON
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-local clean-pkgpyexecLTLIBRARIES \
+ clean-pyexecLTLIBRARIES ctags distclean distclean-compile \
+ 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-defsDATA 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-pkgpyexecLTLIBRARIES \
+ install-ps install-ps-am install-pyexecLTLIBRARIES \
+ install-pygioPYTHON install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-defsDATA uninstall-pkgpyexecLTLIBRARIES \
+ uninstall-pyexecLTLIBRARIES uninstall-pygioPYTHON
+
+gio.c: $(GIO_DEFS) $(GIO_OVERRIDES)
+unix.c: $(GIOUNIX_DEFS) unix.override
+
+# code generator
+.defs.c:
+ (cd $(srcdir)\
+ && $(PYTHON) $(top_srcdir)/codegen/codegen.py \
+ --py_ssize_t-clean \
+ --register gio-types.defs \
+ --register unix-types.defs \
+ --override $*.override \
+ --prefix py$(*F) $*.defs) > $(*D)/gen-$(*F).c \
+ && cp $(*D)/gen-$(*F).c $(*D)/$(*F).c \
+ && rm -f $(*D)/gen-$(*F).c
+
+@BUILD_GIO_TRUE@all: $(pkgpyexec_LTLIBRARIES:.la=.so)
+@BUILD_GIO_TRUE@clean-local:
+@BUILD_GIO_TRUE@ rm -f $(pkgpyexec_LTLIBRARIES:.la=.so)
+@BUILD_GIO_TRUE@.la.so:
+@BUILD_GIO_TRUE@ $(LN_S) .libs/$@ $@ || true
+
+# 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 --git a/gio/__init__.py b/gio/__init__.py
new file mode 100644
index 0000000..c4b02bb
--- /dev/null
+++ b/gio/__init__.py
@@ -0,0 +1,40 @@
+# -*- Mode: Python -*-
+# pygobject - Python bindings for the GObject library
+# Copyright (C) 2008 Johan Dahlin
+#
+# gio/__init__.py: initialisation file for gio module
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+
+from gobject import GObjectMeta
+from _gio import *
+from _gio import \
+ _app_info_init, _install_app_info_meta, \
+ _file_init, _install_file_meta
+try:
+ import unix
+ unix # pyflakes
+except ImportError:
+ unix = None
+del _gio
+
+class GFileMeta(GObjectMeta):
+ __call__ = _file_init
+_install_file_meta(GFileMeta)
+
+class GAppInfoMeta(GObjectMeta):
+ __call__ = _app_info_init
+_install_app_info_meta(GAppInfoMeta)
diff --git a/gio/gappinfo.override b/gio/gappinfo.override
new file mode 100644
index 0000000..414769b
--- /dev/null
+++ b/gio/gappinfo.override
@@ -0,0 +1,208 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ * Copyright (C) 2008 Gian Mario Tagliaretti
+ *
+ * gappinfo.override: module overrides for GInputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+define _install_app_info_meta
+static PyObject *
+_wrap__install_app_info_meta(PyObject *self, PyObject *args)
+{
+ PyObject *metaclass;
+
+ if (!PyArg_ParseTuple(args, "O", &metaclass))
+ return NULL;
+
+ Py_INCREF(metaclass);
+ PyGAppInfo_Type.ob_type = (PyTypeObject*)metaclass;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+%%
+define _app_info_init kwargs
+static PyObject *
+_wrap__app_info_init(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "commandline", "application_name",
+ "flags", NULL };
+ char *commandline, *application_name = NULL;
+ PyObject *py_flags = NULL;
+ GAppInfo *ret;
+ GError *error = NULL;
+ GAppInfoCreateFlags flags = G_APP_INFO_CREATE_NONE;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s|zO:gio.AppInfo",
+ kwlist,
+ &commandline, &application_name,
+ &py_flags))
+ return NULL;
+ if (py_flags && pyg_flags_get_value(G_TYPE_APP_INFO_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ return NULL;
+
+ ret = g_app_info_create_from_commandline(commandline,
+ application_name, flags, &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ /* pygobject_new handles NULL checking */
+ return pygobject_new((GObject *)ret);
+}
+%%
+override g_app_info_launch_uris kwargs
+static PyObject *
+_wrap_g_app_info_launch_uris(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "files", "launch_context", NULL };
+
+ GList *file_list = NULL;
+ PyGObject *pycontext = NULL;
+ GAppLaunchContext *ctx;
+ PyObject *pyfile_list = Py_None;
+ int ret;
+ GError *error = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|OO:gio.AppInfo.launch_uris",
+ kwlist,
+ &pyfile_list, &pycontext))
+ return NULL;
+
+ if (!pygio_check_launch_context(pycontext, &ctx))
+ return NULL;
+
+ if (pyfile_list == Py_None)
+ file_list = NULL;
+
+ else if (PySequence_Check (pyfile_list))
+ file_list = pygio_pylist_to_uri_glist(pyfile_list);
+
+ else {
+ PyErr_SetString(PyExc_TypeError,
+ "file_list should be a list of strings or None");
+ return NULL;
+ }
+
+ ret = g_app_info_launch_uris(G_APP_INFO(self->obj),
+ file_list, ctx, &error);
+
+ g_list_free(file_list);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ return PyBool_FromLong(ret);
+}
+%%
+override g_app_info_launch kwargs
+static PyObject *
+_wrap_g_app_info_launch(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "files", "launch_context", NULL };
+
+ GList *file_list = NULL;
+ PyGObject *pycontext = NULL;
+ GAppLaunchContext *ctx;
+ PyObject *pyfile_list = Py_None;
+ int ret;
+ GError *error = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|OO:gio.AppInfo.launch",
+ kwlist,
+ &pyfile_list, &pycontext))
+ return NULL;
+
+ if (!pygio_check_launch_context(pycontext, &ctx))
+ return NULL;
+
+ if (pyfile_list == Py_None)
+ file_list = NULL;
+
+ else if (PySequence_Check (pyfile_list))
+ file_list = pygio_pylist_to_gfile_glist(pyfile_list);
+
+ else {
+ PyErr_SetString(PyExc_TypeError,
+ "file_list should be a list of strings or None");
+ return NULL;
+ }
+
+ ret = g_app_info_launch(G_APP_INFO(self->obj),
+ file_list, ctx, &error);
+
+ g_list_free(file_list);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ return PyBool_FromLong(ret);
+}
+%%
+override-slot GAppInfo.tp_richcompare
+static PyObject *
+_wrap_g_app_info_tp_richcompare(PyGObject *self, PyGObject *other, int op)
+{
+ PyObject *result;
+
+ if (PyObject_TypeCheck(self, &PyGAppInfo_Type)
+ && PyObject_TypeCheck(other, &PyGAppInfo_Type)) {
+ GAppInfo *info1 = G_APP_INFO(self->obj);
+ GAppInfo *info2 = G_APP_INFO(other->obj);
+
+ switch (op) {
+ case Py_EQ:
+ result = (g_app_info_equal(info1, info2)
+ ? Py_True : Py_False);
+ break;
+ case Py_NE:
+ result = (!g_app_info_equal(info1, info2)
+ ? Py_True : Py_False);
+ break;
+ default:
+ result = Py_NotImplemented;
+ }
+ }
+ else
+ result = Py_NotImplemented;
+
+ Py_INCREF(result);
+ return result;
+}
+%%
+override-slot GAppInfo.tp_repr
+static PyObject *
+_wrap_g_app_info_tp_repr(PyGObject *self)
+{
+ const char *name = g_app_info_get_name(G_APP_INFO(self->obj));
+ gchar *representation;
+ PyObject *result;
+
+ representation = g_strdup_printf("<%s at %p: %s>",
+ self->ob_type->tp_name, self,
+ name ? name : "UNKNOWN NAME");
+
+ result = PyString_FromString(representation);
+ g_free(representation);
+ return result;
+}
diff --git a/gio/gapplaunchcontext.override b/gio/gapplaunchcontext.override
new file mode 100644
index 0000000..a10f959
--- /dev/null
+++ b/gio/gapplaunchcontext.override
@@ -0,0 +1,99 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Gian Mario Tagliaretti
+ *
+ * gapplaunchcontext.override: module overrides for GAppLaunchContext
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+override g_app_launch_context_get_display kwargs
+static PyObject *
+_wrap_g_app_launch_context_get_display(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "info", "files", NULL };
+
+ GList *file_list = NULL;
+ PyGObject *py_info;
+ PyObject *pyfile_list;
+ gchar *ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!O:gio.AppLaunchContext.get_display",
+ kwlist,
+ &PyGAppInfo_Type, &py_info, &pyfile_list))
+ return NULL;
+
+ if (!PySequence_Check (pyfile_list)) {
+ PyErr_Format (PyExc_TypeError,
+ "argument must be a list or tuple of GFile objects");
+ return NULL;
+ }
+
+ file_list = pygio_pylist_to_gfile_glist(pyfile_list);
+
+ ret = g_app_launch_context_get_display(G_APP_LAUNCH_CONTEXT(self->obj),
+ G_APP_INFO(py_info->obj), file_list);
+ g_list_free(file_list);
+
+ if (ret)
+ return PyString_FromString(ret);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+%%
+override g_app_launch_context_get_startup_notify_id kwargs
+static PyObject *
+_wrap_g_app_launch_context_get_startup_notify_id(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "info", "files", NULL };
+
+ GList *file_list = NULL;
+ PyGObject *py_info;
+ PyObject *pyfile_list;
+ gchar *ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!O:gio.AppLaunchContext.get_startup_notify_id",
+ kwlist,
+ &PyGAppInfo_Type, &py_info, &pyfile_list))
+ return NULL;
+
+ if (!PySequence_Check (pyfile_list)) {
+ PyErr_Format (PyExc_TypeError,
+ "argument must be a list or tuple of GFile objects");
+ return NULL;
+ }
+
+ file_list = pygio_pylist_to_gfile_glist(pyfile_list);
+
+ ret = g_app_launch_context_get_startup_notify_id(
+ G_APP_LAUNCH_CONTEXT(self->obj),
+ G_APP_INFO(py_info->obj), file_list);
+ g_list_free(file_list);
+
+ if (ret)
+ return PyString_FromString(ret);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
diff --git a/gio/gbufferedinputstream.override b/gio/gbufferedinputstream.override
new file mode 100644
index 0000000..047a663
--- /dev/null
+++ b/gio/gbufferedinputstream.override
@@ -0,0 +1,70 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gbufferedinputstream.override: module overrides for GBufferedInputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_buffered_input_stream_fill_async kwargs
+static PyObject *
+_wrap_g_buffered_input_stream_fill_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "count", "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ long count = -1;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "lO|iOO:gio.BufferedInputStream.fill_async",
+ kwlist,
+ &count,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_buffered_input_stream_fill_async(G_BUFFERED_INPUT_STREAM(self->obj),
+ count,
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/gcancellable.override b/gio/gcancellable.override
new file mode 100644
index 0000000..1eefb3b
--- /dev/null
+++ b/gio/gcancellable.override
@@ -0,0 +1,38 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gcancellable.override: module overrides for GCancellable
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+%%
+override g_cancellable_make_pollfd noargs
+static PyObject *
+_wrap_g_cancellable_make_pollfd (PyGObject *self)
+{
+ GPollFD pollfd;
+ gboolean ret;
+ PyGPollFD *pypollfd;
+
+ ret = g_cancellable_make_pollfd(G_CANCELLABLE(self->obj), &pollfd);
+
+ pypollfd = PyObject_NEW(PyGPollFD, &PyGPollFD_Type);
+ pypollfd->fd_obj = NULL;
+ pypollfd->pollfd = pollfd;
+ return (PyObject *) pypollfd;
+}
diff --git a/gio/gdatainputstream.override b/gio/gdatainputstream.override
new file mode 100644
index 0000000..92b0f99
--- /dev/null
+++ b/gio/gdatainputstream.override
@@ -0,0 +1,250 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ * Copyright (C) 2009 Paul Pogonyshev
+ *
+ * gdatainputstream.override: module overrides for GDataInputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+override g_data_input_stream_read_line kwargs
+static PyObject *
+_wrap_g_data_input_stream_read_line(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "cancellable", NULL };
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ char *line;
+ gsize length;
+ PyObject *py_line;
+ GError *error = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|O:gio.DataInputStream.read_line",
+ kwlist, &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ line = g_data_input_stream_read_line(G_DATA_INPUT_STREAM(self->obj),
+ &length, cancellable, &error);
+ if (pyg_error_check(&error))
+ return NULL;
+
+ py_line = PyString_FromStringAndSize(line, length);
+ g_free(line);
+ return py_line;
+}
+
+%%
+override g_data_input_stream_read_line_async kwargs
+static PyObject *
+_wrap_g_data_input_stream_read_line_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:gio.DataInputStream.read_line_async",
+ kwlist,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_data_input_stream_read_line_async(G_DATA_INPUT_STREAM(self->obj),
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+
+%%
+override g_data_input_stream_read_line_finish kwargs
+static PyObject *
+_wrap_g_data_input_stream_read_line_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *result;
+ GError *error = NULL;
+ gchar *line;
+ gsize length;
+ PyObject *py_line;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:gio.DataInputStream.read_line_finish",
+ kwlist, &PyGAsyncResult_Type, &result))
+ return NULL;
+
+ line = g_data_input_stream_read_line_finish(G_DATA_INPUT_STREAM(self->obj),
+ G_ASYNC_RESULT(result->obj),
+ &length,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ py_line = PyString_FromStringAndSize(line, length);
+ g_free(line);
+ return py_line;
+}
+
+%%
+override g_data_input_stream_read_until kwargs
+static PyObject *
+_wrap_g_data_input_stream_read_until(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "stop_chars", "cancellable", NULL };
+ const char *stop_chars;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ char *line;
+ gsize length;
+ PyObject *py_line;
+ GError *error = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s|O:gio.DataInputStream.read_line",
+ kwlist, &stop_chars, &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ line = g_data_input_stream_read_until(G_DATA_INPUT_STREAM(self->obj),
+ stop_chars, &length, cancellable, &error);
+ if (pyg_error_check(&error))
+ return NULL;
+
+ py_line = PyString_FromStringAndSize(line, length);
+ g_free(line);
+ return py_line;
+}
+
+%%
+override g_data_input_stream_read_until_async kwargs
+static PyObject *
+_wrap_g_data_input_stream_read_until_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "stop_chars", "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ const char *stop_chars;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sO|iOO:gio.DataInputStream.read_until_async",
+ kwlist,
+ &stop_chars,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_data_input_stream_read_until_async(G_DATA_INPUT_STREAM(self->obj),
+ stop_chars,
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+
+%%
+override g_data_input_stream_read_until_finish kwargs
+static PyObject *
+_wrap_g_data_input_stream_read_until_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *result;
+ GError *error = NULL;
+ gchar *line;
+ gsize length;
+ PyObject *py_line;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:gio.DataInputStream.read_until_finish",
+ kwlist, &PyGAsyncResult_Type, &result))
+ return NULL;
+
+ line = g_data_input_stream_read_until_finish(G_DATA_INPUT_STREAM(self->obj),
+ G_ASYNC_RESULT(result->obj),
+ &length,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ py_line = PyString_FromStringAndSize(line, length);
+ g_free(line);
+ return py_line;
+}
diff --git a/gio/gdrive.override b/gio/gdrive.override
new file mode 100644
index 0000000..7961856
--- /dev/null
+++ b/gio/gdrive.override
@@ -0,0 +1,347 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gdrive.override: module overrides for GDrive and related types
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+%%
+override g_drive_get_volumes noargs
+static PyObject *
+_wrap_g_drive_get_volumes (PyGObject *self)
+{
+ GList *list, *l;
+ PyObject *ret;
+
+ pyg_begin_allow_threads;
+
+ list = g_drive_get_volumes (G_DRIVE (self->obj));
+
+ pyg_end_allow_threads;
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ GVolume *volume = l->data;
+ PyObject *item = pygobject_new((GObject *)volume);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ g_object_unref(volume);
+ }
+ g_list_free(list);
+
+ return ret;
+}
+%%
+override g_drive_eject kwargs
+static PyObject *
+_wrap_g_drive_eject(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOO:gio.Drive.eject",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (PyErr_Warn(PyExc_DeprecationWarning,
+ "gio.Drive.ejectis deprecated, \
+ use gtk.Drive.eject_with_operation instead") < 0)
+ return NULL;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer) &flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_drive_eject(G_DRIVE(self->obj),
+ flags,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_drive_poll_for_media kwargs
+static PyObject *
+_wrap_g_drive_poll_for_media(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OO:gio.Drive.eject",
+ kwlist,
+ &notify->callback,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ pyg_begin_allow_threads;
+
+ g_drive_poll_for_media(G_DRIVE(self->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ pyg_end_allow_threads;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override-slot GDrive.tp_repr
+static PyObject *
+_wrap_g_drive_tp_repr(PyGObject *self)
+{
+ char *name = g_drive_get_name(G_DRIVE(self->obj));
+ gchar *representation;
+ PyObject *result;
+
+ if (name) {
+ representation = g_strdup_printf("<%s at %p: %s>", self->ob_type->tp_name, self, name);
+ g_free(name);
+ }
+ else
+ representation = g_strdup_printf("<%s at %p: UNKNOWN NAME>", self->ob_type->tp_name, self);
+
+ result = PyString_FromString(representation);
+ g_free(representation);
+ return result;
+}
+%%
+override g_drive_enumerate_identifiers noargs
+static PyObject *
+_wrap_g_drive_enumerate_identifiers (PyGObject *self)
+{
+ char **ids;
+ PyObject *ret;
+
+ pyg_begin_allow_threads;
+
+ ids = g_drive_enumerate_identifiers(G_DRIVE (self->obj));
+
+ pyg_end_allow_threads;
+
+ if (ids && ids[0] != NULL) {
+ ret = strv_to_pylist(ids);
+ g_strfreev (ids);
+ } else {
+ ret = Py_None;
+ Py_INCREF(ret);
+ }
+ return ret;
+}
+%%
+override g_drive_eject_with_operation kwargs
+static PyObject *
+_wrap_g_drive_eject_with_operation(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:gio.Drive.eject_with_operation",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer) &flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_drive_eject_with_operation(G_DRIVE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_drive_start kwargs
+static PyObject *
+_wrap_g_drive_start(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ GDriveStartFlags flags = G_DRIVE_START_NONE;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:gio.Drive.start",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_DRIVE_START_FLAGS,
+ py_flags, (gpointer) &flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_drive_start(G_DRIVE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_drive_stop kwargs
+static PyObject *
+_wrap_g_drive_stop(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:gio.Drive.stop",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer) &flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_drive_stop(G_DRIVE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/gfile.override b/gio/gfile.override
new file mode 100644
index 0000000..71e2d98
--- /dev/null
+++ b/gio/gfile.override
@@ -0,0 +1,2216 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * gfile.override: module overrides for GInputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+headers
+
+static void
+file_progress_callback_marshal(goffset current_num_bytes,
+ goffset total_num_bytes,
+ PyGIONotify *notify)
+{
+ PyObject *ret;
+ PyGILState_STATE state;
+
+ state = pyg_gil_state_ensure();
+
+ if (notify->data)
+ ret = PyObject_CallFunction(notify->callback, "(KKO)",
+ current_num_bytes,
+ total_num_bytes,
+ notify->data);
+ else
+ ret = PyObject_CallFunction(notify->callback, "(KK)",
+ current_num_bytes,
+ total_num_bytes);
+
+ if (ret == NULL)
+ {
+ PyErr_Print();
+ PyErr_Clear();
+ }
+
+ Py_XDECREF(ret);
+ pyg_gil_state_release(state);
+}
+%%
+define _install_file_meta
+static PyObject *
+_wrap__install_file_meta(PyObject *self, PyObject *args)
+{
+ PyObject *metaclass;
+
+ if (!PyArg_ParseTuple(args, "O", &metaclass))
+ return NULL;
+
+ Py_INCREF(metaclass);
+ PyGFile_Type.ob_type = (PyTypeObject*)metaclass;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+%%
+define _file_init kwargs
+static PyObject*
+_wrap__file_init(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ GFile *file;
+ Py_ssize_t n_args, n_kwargs;
+ char *arg;
+ PyObject *py_ret;
+
+ n_args = PyTuple_Size(args);
+ n_kwargs = kwargs != NULL ? PyDict_Size(kwargs) : 0;
+
+ if (n_args == 1 && n_kwargs == 0) {
+ if (!PyArg_ParseTuple(args, "s:gio.File.__init__", &arg))
+ return NULL;
+ file = g_file_new_for_commandline_arg(arg);
+ } else if (n_args == 0 && n_kwargs == 1) {
+ if (PyDict_GetItemString(kwargs, "path")) {
+ char *kwlist[] = { "path", NULL };
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s:gio.File.__init__", kwlist, &arg))
+ return NULL;
+ file = g_file_new_for_path(arg);
+ } else if (PyDict_GetItemString(kwargs, "uri")) {
+ char *kwlist[] = { "uri", NULL };
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s:gio.File.__init__", kwlist, &arg))
+ return NULL;
+ file = g_file_new_for_uri(arg);
+ } else {
+ PyErr_Format(PyExc_TypeError,
+ "gio.File() got an unexpected keyword argument '%s'",
+ "unknown");
+ return NULL;
+ }
+ } else {
+ PyErr_Format(PyExc_TypeError,
+ "gio.File() takes exactly 1 argument (%zd given)",
+ n_args + n_kwargs);
+ return NULL;
+ }
+
+ if (!file) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "could not create GFile object");
+ return NULL;
+ }
+
+ py_ret = pygobject_new((GObject *)file);
+ g_object_unref(file);
+
+ return py_ret;
+}
+%%
+override g_file_read_async kwargs
+static PyObject *
+_wrap_g_file_read_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:File.read_async",
+ kwlist,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_read_async(G_FILE(self->obj),
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_load_contents kwargs
+static PyObject *
+_wrap_g_file_load_contents(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "cancellable", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ gchar *contents, *etag_out;
+ gsize length;
+ GError *error = NULL;
+ gboolean ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|O:File.load_contents",
+ kwlist,
+ &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ pyg_begin_allow_threads;
+
+ ret = g_file_load_contents(G_FILE(self->obj), cancellable,
+ &contents, &length, &etag_out, &error);
+
+ pyg_end_allow_threads;
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (ret) {
+ PyObject *pyret;
+
+ pyret = Py_BuildValue("(s#ks)", contents, length, length, etag_out);
+ g_free(contents);
+ g_free(etag_out);
+ return pyret;
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+%%
+override g_file_load_contents_async kwargs
+static PyObject *
+_wrap_g_file_load_contents_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OO:File.load_contents_async",
+ kwlist,
+ &notify->callback,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_load_contents_async(G_FILE(self->obj),
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_load_contents_finish kwargs
+static PyObject *
+_wrap_g_file_load_contents_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "res", NULL };
+ PyGObject *res;
+ gchar *contents, *etag_out;
+ gsize length;
+ GError *error = NULL;
+ gboolean ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:File.load_contents_finish",
+ kwlist,
+ &PyGAsyncResult_Type,
+ &res))
+ return NULL;
+
+ ret = g_file_load_contents_finish(G_FILE(self->obj),
+ G_ASYNC_RESULT(res->obj), &contents,
+ &length, &etag_out, &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (ret) {
+ PyObject *pyret;
+
+ pyret = Py_BuildValue("(s#ks)", contents, length, length, etag_out);
+ g_free(contents);
+ g_free(etag_out);
+ return pyret;
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+%%
+override g_file_enumerate_children_async kwargs
+static PyObject *
+_wrap_g_file_enumerate_children_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "attributes", "callback", "flags",
+ "io_priority", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ char *attributes;
+ PyObject *py_flags = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ GFileQueryInfoFlags flags = G_FILE_QUERY_INFO_NONE;
+ GCancellable *cancellable = NULL;
+ PyGObject *py_cancellable = NULL;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sO|OiOO:gio.File.enumerate_children_async",
+ kwlist,
+ &attributes,
+ &notify->callback,
+ &py_flags,
+ &io_priority,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_QUERY_INFO_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_enumerate_children_async(G_FILE(self->obj),
+ attributes,
+ flags,
+ io_priority,
+ (GCancellable *) cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_mount_mountable kwargs
+static PyObject *
+_wrap_g_file_mount_mountable(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "mount_operation", "callback", "flags",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ PyGObject *py_cancellable = NULL;
+ GMountMountFlags flags = G_MOUNT_MOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!O|OOO:File.mount_mountable",
+ kwlist,
+ &PyGMountOperation_Type,
+ &mount_operation,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_MOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_mount_mountable(G_FILE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_unmount_mountable kwargs
+static PyObject *
+_wrap_g_file_unmount_mountable(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *py_cancellable = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOO:File.unmount_mountable",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_unmount_mountable(G_FILE(self->obj),
+ flags,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_unmount_mountable_with_operation kwargs
+static PyObject *
+_wrap_g_file_unmount_mountable_with_operation(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ PyGObject *py_cancellable = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:File.unmount_mountable_with_operation",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_unmount_mountable_with_operation(G_FILE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_mount_enclosing_volume kwargs
+static PyObject *
+_wrap_g_file_mount_enclosing_volume(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "mount_operation", "callback", "flags",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ PyGObject *py_cancellable = NULL;
+ GMountMountFlags flags = G_MOUNT_MOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!O|OOO:File.mount_enclosing_volume",
+ kwlist,
+ &PyGMountOperation_Type,
+ &mount_operation,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_MOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_mount_enclosing_volume(G_FILE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_copy kwargs
+static PyObject *
+_wrap_g_file_copy(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "destination", "progress_callback",
+ "flags", "cancellable",
+ "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *destination = NULL;
+ PyGObject *py_cancellable = NULL;
+ GFileCopyFlags flags = G_FILE_COPY_NONE;
+ GCancellable *cancellable;
+ int ret;
+ GError *error = NULL;
+ GFileProgressCallback callback = NULL;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!|OOOO:File.copy",
+ kwlist,
+ &PyGFile_Type,
+ &destination,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (pygio_notify_using_optional_callback(notify)) {
+ callback = (GFileProgressCallback)file_progress_callback_marshal;
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+ }
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_COPY_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ /* No need to reference callback here, because it will be used
+ * only while this function is in progress. */
+
+ pyg_begin_allow_threads;
+
+ ret = g_file_copy(G_FILE(self->obj),
+ G_FILE(destination->obj),
+ flags,
+ cancellable,
+ callback,
+ notify,
+ &error);
+
+ pyg_end_allow_threads;
+
+ if (pyg_error_check(&error))
+ goto error;
+
+ pygio_notify_free(notify);
+ return PyBool_FromLong(ret);
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_copy_async kwargs
+static PyObject *
+_wrap_g_file_copy_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "destination", "callback", "progress_callback",
+ "flags", "io_priority", "cancellable",
+ "user_data", "progress_callback_data", NULL };
+ PyGIONotify *notify, *progress_notify;
+ PyObject *py_flags = NULL;
+ PyGObject *destination = NULL;
+ PyGObject *py_cancellable = NULL;
+ GFileCopyFlags flags = G_FILE_COPY_NONE;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ GFileProgressCallback progress_callback = NULL;
+
+ /* After the creation, referencing/freeing will automatically be
+ * done on the master and the slave. */
+ notify = pygio_notify_new();
+ progress_notify = pygio_notify_new_slave(notify);
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!O|OOiOOO:File.copy_async",
+ kwlist,
+ &PyGFile_Type,
+ &destination,
+ &notify->callback,
+ &progress_notify->callback,
+ &py_flags,
+ &io_priority,
+ &pycancellable,
+ &notify->data,
+ &progress_notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ if (pygio_notify_using_optional_callback(progress_notify)) {
+ progress_callback = (GFileProgressCallback) file_progress_callback_marshal;
+ if (!pygio_notify_callback_is_valid_full(progress_notify, "progress_callback"))
+ goto error;
+ }
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_copy_async(G_FILE(self->obj),
+ G_FILE(destination->obj),
+ flags,
+ io_priority,
+ cancellable,
+ progress_callback,
+ progress_notify,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_move kwargs
+static PyObject *
+_wrap_g_file_move(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "destination", "progress_callback",
+ "flags", "cancellable",
+ "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *destination = NULL;
+ PyGObject *py_cancellable = NULL;
+ GFileCopyFlags flags = G_FILE_COPY_NONE;
+ GCancellable *cancellable;
+ int ret;
+ GError *error = NULL;
+ GFileProgressCallback callback = NULL;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!|OOOO:File.move",
+ kwlist,
+ &PyGFile_Type,
+ &destination,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (pygio_notify_using_optional_callback(notify)) {
+ callback = (GFileProgressCallback)file_progress_callback_marshal;
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+ }
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_COPY_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ /* No need to reference callback here, because it will be used
+ * only while this function is in progress. */
+
+ pyg_begin_allow_threads;
+
+ ret = g_file_move(G_FILE(self->obj),
+ G_FILE(destination->obj),
+ flags,
+ cancellable,
+ callback,
+ notify,
+ &error);
+
+ pyg_end_allow_threads;
+
+ if (pyg_error_check(&error))
+ goto error;
+
+ pygio_notify_free(notify);
+ return PyBool_FromLong(ret);
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_set_attribute kwargs
+static char**
+pyg_strv_from_pyobject(PyObject *value, const char *exc_msg)
+{
+ gchar** strv;
+ Py_ssize_t len, i;
+ PyObject* fast_seq;
+
+ fast_seq = PySequence_Fast(value, exc_msg);
+ if (fast_seq == NULL)
+ return NULL;
+
+ len = PySequence_Length(fast_seq);
+ if (len == -1)
+ return NULL;
+
+ strv = g_malloc(sizeof(char*) * (len + 1));
+ if (strv == NULL) {
+ PyErr_NoMemory();
+ goto failure;
+ }
+
+ for (i = 0; i < len + 1; i++)
+ strv[i] = NULL;
+
+ for (i = 0; i < len; i++) {
+ PyObject* item = PySequence_Fast_GET_ITEM(fast_seq, i);
+ const char *s;
+
+ if (!PyString_Check(item)) {
+ PyErr_SetString(PyExc_TypeError, exc_msg);
+ goto failure;
+ }
+
+ s = PyString_AsString(item);
+ if (s == NULL)
+ goto failure;
+
+ strv[i] = g_strdup(s);
+ if (strv[i] == NULL) {
+ PyErr_NoMemory();
+ goto failure;
+ }
+ }
+
+ return strv;
+
+ failure:
+ g_strfreev(strv);
+ Py_XDECREF(fast_seq);
+ return NULL;
+}
+
+static PyObject *
+_wrap_g_file_set_attribute(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "attribute", "type", "value_p",
+ "flags", "cancellable", NULL };
+ GFileQueryInfoFlags flags = G_FILE_QUERY_INFO_NONE;
+ int ret;
+ GCancellable *cancellable = NULL;
+ GError *error = NULL;
+ char *attribute;
+ PyObject *py_type = NULL, *py_flags = NULL, *value;
+ PyGObject *pycancellable = NULL;
+ GFileAttributeType type;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,"sOO|OO:gio.File.set_attribute",
+ kwlist, &attribute, &py_type, &value,
+ &py_flags, &pycancellable))
+ return NULL;
+
+ if (pyg_enum_get_value(G_TYPE_FILE_ATTRIBUTE_TYPE, py_type,
+ (gpointer)&type))
+ return NULL;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_QUERY_INFO_FLAGS, py_flags,
+ (gpointer)&flags))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ switch (type) {
+ case G_FILE_ATTRIBUTE_TYPE_STRING:
+ {
+ char* s;
+ if (!PyString_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "set_attribute value must be a str when type is FILE_ATTRIBUTE_TYPE_STRING");
+ return NULL;
+ }
+
+ s = PyString_AsString(value);
+ if (s == NULL)
+ return NULL;
+
+ ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+ s, flags, (GCancellable *) cancellable,
+ &error);
+ }
+ break;
+
+ case G_FILE_ATTRIBUTE_TYPE_BYTE_STRING:
+ {
+ char* s;
+ if (!PyString_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "set_attribute value must be a bytes instance when type is FILE_ATTRIBUTE_TYPE_BYTE_STRING");
+ return NULL;
+ }
+
+ s = PyString_AsString(value);
+ if (s == NULL)
+ return NULL;
+
+ ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+ s, flags, (GCancellable *) cancellable,
+ &error);
+ }
+ break;
+
+
+ case G_FILE_ATTRIBUTE_TYPE_STRINGV:
+ {
+ gchar** strv;
+
+ strv = pyg_strv_from_pyobject(value, "set_attribute value must be a list of strings when type is FILE_ATTRIBUTE_TYPE_STRINGV");
+ if (strv == NULL)
+ break;
+ ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+ strv, flags, (GCancellable *) cancellable,
+ &error);
+ g_strfreev(strv);
+ }
+ break;
+
+ case G_FILE_ATTRIBUTE_TYPE_OBJECT:
+ {
+ GObject* obj;
+
+ if (!pygobject_check(value, &PyGObject_Type)) {
+ PyErr_Format(PyExc_TypeError,
+ "set_attribute value must be a GObject instance when type is FILE_ATTRIBUTE_TYPE_OBJECT");
+ return NULL;
+ }
+
+ obj = pygobject_get(value);
+
+ ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+ obj, flags, (GCancellable *) cancellable,
+ &error);
+ }
+ break;
+
+ case G_FILE_ATTRIBUTE_TYPE_BOOLEAN:
+ {
+ gboolean boolval;
+
+ boolval = PyObject_IsTrue(value);
+ if (boolval == -1 && PyErr_Occurred())
+ return NULL;
+
+ ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+ &boolval, flags, (GCancellable *) cancellable,
+ &error);
+ }
+ break;
+
+ case G_FILE_ATTRIBUTE_TYPE_UINT32:
+ {
+ guint32 intval;
+
+ if (!PyInt_Check(value) && !PyLong_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "set_attribute value must be an int when type is FILE_ATTRIBUTE_TYPE_UINT32");
+ return NULL;
+ }
+
+ intval = PyLong_AsUnsignedLong(value);
+ if (intval == -1 && PyErr_Occurred())
+ return NULL;
+
+ ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+ &intval, flags, (GCancellable *) cancellable,
+ &error);
+ }
+ break;
+
+ case G_FILE_ATTRIBUTE_TYPE_INT32:
+ {
+ gint32 intval;
+
+ if (!PyInt_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "set_attribute value must be an int when type is FILE_ATTRIBUTE_TYPE_INT32");
+ return NULL;
+ }
+
+ intval = PyInt_AsLong(value);
+ if (intval == -1 && PyErr_Occurred())
+ return NULL;
+
+ ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+ &intval, flags, (GCancellable *) cancellable,
+ &error);
+ }
+ break;
+
+ case G_FILE_ATTRIBUTE_TYPE_UINT64:
+ {
+ guint64 intval;
+
+ if (!PyInt_Check(value) && !PyLong_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "set_attribute value must be a long int when type is FILE_ATTRIBUTE_TYPE_UINT64");
+ return NULL;
+ }
+
+ intval = PyLong_AsLongLong(value);
+ if (intval == -1 && PyErr_Occurred())
+ return NULL;
+
+ ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+ &intval, flags, (GCancellable *) cancellable,
+ &error);
+ }
+ break;
+
+ case G_FILE_ATTRIBUTE_TYPE_INT64:
+ {
+ gint64 intval;
+
+ if (!PyInt_Check(value) && !PyLong_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "set_attribute value must be a long int when type is FILE_ATTRIBUTE_TYPE_INT64");
+ return NULL;
+ }
+
+ intval = PyLong_AsUnsignedLongLong(value);
+ if (intval == -1 && PyErr_Occurred())
+ return NULL;
+
+ ret = g_file_set_attribute(G_FILE(self->obj), attribute, type,
+ &intval, flags, (GCancellable *) cancellable,
+ &error);
+ }
+ break;
+
+ case G_FILE_ATTRIBUTE_TYPE_INVALID:
+
+ default:
+ PyErr_SetString(PyExc_TypeError,
+ "Unknown type specified in set_attribute\n");
+ return NULL;
+ }
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ return PyBool_FromLong(ret);
+}
+%%
+override g_file_query_settable_attributes kwargs
+static PyObject *
+_wrap_g_file_query_settable_attributes(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "cancellable", NULL };
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable = NULL;
+ GFileAttributeInfoList *ret;
+ GError *error = NULL;
+ gint i, n_infos;
+ GFileAttributeInfo *infos;
+ PyObject *py_ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|O:gio.File.query_settable_attributes",
+ kwlist, &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ ret = g_file_query_settable_attributes(G_FILE(self->obj),
+ (GCancellable *) cancellable,
+ &error);
+ if (pyg_error_check(&error))
+ return NULL;
+
+ n_infos = ret->n_infos;
+ infos = ret->infos;
+
+ if (n_infos > 0) {
+ py_ret = PyList_New(n_infos);
+ for (i = 0; i < n_infos; i++) {
+ PyList_SetItem(py_ret, i, pyg_file_attribute_info_new(&infos[i]));
+ }
+ g_file_attribute_info_list_unref(ret);
+ return py_ret;
+
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+%%
+override g_file_query_writable_namespaces kwargs
+static PyObject *
+_wrap_g_file_query_writable_namespaces(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "cancellable", NULL };
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable = NULL;
+ GFileAttributeInfoList *ret;
+ GError *error = NULL;
+ gint i, n_infos;
+ GFileAttributeInfo *infos;
+ PyObject *py_ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|O:gio.File.query_writable_namespaces",
+ kwlist, &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ ret = g_file_query_writable_namespaces(G_FILE(self->obj),
+ (GCancellable *) cancellable,
+ &error);
+ if (pyg_error_check(&error))
+ return NULL;
+
+ n_infos = ret->n_infos;
+ infos = ret->infos;
+
+ if (n_infos > 0) {
+ py_ret = PyList_New(n_infos);
+ for (i = 0; i < n_infos; i++) {
+ PyList_SetItem(py_ret, i, pyg_file_attribute_info_new(&infos[i]));
+ }
+ g_file_attribute_info_list_unref(ret);
+ return py_ret;
+
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+%%
+override g_file_append_to_async kwargs
+static PyObject *
+_wrap_g_file_append_to_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "io_priority",
+ "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ GFileCreateFlags flags = G_FILE_CREATE_NONE;
+ PyObject *py_flags = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OiOO:File.append_to_async",
+ kwlist,
+ &notify->callback,
+ &flags, &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_append_to_async(G_FILE(self->obj), flags, io_priority, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_create_async kwargs
+static PyObject *
+_wrap_g_file_create_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "io_priority",
+ "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ GFileCreateFlags flags = G_FILE_CREATE_NONE;
+ PyObject *py_flags = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OiOO:File.create_async",
+ kwlist,
+ &notify->callback,
+ &flags, &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_create_async(G_FILE(self->obj), flags, io_priority, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_create_readwrite_async kwargs
+static PyObject *
+_wrap_g_file_create_readwrite_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "io_priority",
+ "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ GFileCreateFlags flags = G_FILE_CREATE_NONE;
+ PyObject *py_flags = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OiOO:File.create_readwrite_async",
+ kwlist,
+ &notify->callback,
+ &flags, &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_create_readwrite_async(G_FILE(self->obj), flags, io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_open_readwrite_async kwargs
+static PyObject *
+_wrap_g_file_open_readwrite_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:File.open_readwrite_async",
+ kwlist,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_open_readwrite_async(G_FILE(self->obj), io_priority, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_replace_readwrite_async kwargs
+static PyObject *
+_wrap_g_file_replace_readwrite_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "etag", "make_backup", "flags",
+ "io_priority", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ GFileCreateFlags flags = G_FILE_CREATE_NONE;
+ PyObject *py_flags = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ char *etag = NULL;
+ gboolean make_backup = TRUE;
+ PyObject *py_backup = Py_True;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|zOOiOO:File.replace_readwrite_async",
+ kwlist,
+ &notify->callback,
+ &etag, &py_backup,
+ &flags, &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ make_backup = PyObject_IsTrue(py_backup) ? TRUE : FALSE;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_replace_readwrite_async(G_FILE(self->obj), etag, make_backup, flags,
+ io_priority, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_replace_async kwargs
+static PyObject *
+_wrap_g_file_replace_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "etag", "make_backup", "flags",
+ "io_priority", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ GFileCreateFlags flags = G_FILE_CREATE_NONE;
+ PyObject *py_flags = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ char *etag = NULL;
+ gboolean make_backup = TRUE;
+ PyObject *py_backup = Py_True;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|zOOiOO:File.replace_async",
+ kwlist,
+ &notify->callback,
+ &etag, &py_backup,
+ &flags, &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ make_backup = PyObject_IsTrue(py_backup) ? TRUE : FALSE;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_replace_async(G_FILE(self->obj), etag, make_backup, flags,
+ io_priority, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_query_info_async kwargs
+static PyObject *
+_wrap_g_file_query_info_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "attributes", "callback", "flags",
+ "io_priority", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ GFileQueryInfoFlags flags = G_FILE_QUERY_INFO_NONE;
+ PyObject *py_flags = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ char *attributes;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sO|OiOO:File.query_info_async",
+ kwlist,
+ &attributes,
+ &notify->callback,
+ &flags, &io_priority,
+ &pycancellable,
+ &notify->data)) {
+ /* To preserve compatibility with 2.16 we also allow swapped
+ * 'attributes' and 'callback'. FIXME: Remove for 3.0. */
+ static char *old_kwlist[] = { "callback", "attributes", "flags",
+ "io_priority", "cancellable", "user_data", NULL };
+ PyObject *exc_type, *exc_value, *exc_traceback;
+
+ PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "Os|OiOO:File.query_info_async",
+ old_kwlist,
+ &notify->callback,
+ &attributes,
+ &flags, &io_priority,
+ &pycancellable,
+ &notify->data)
+ || !pygio_notify_callback_is_valid(notify)) {
+ /* Report the error with new parameters. */
+ PyErr_Restore(exc_type, exc_value, exc_traceback);
+ goto error;
+ }
+
+ Py_XDECREF(exc_type);
+ Py_XDECREF(exc_value);
+ Py_XDECREF(exc_traceback);
+ }
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_query_info_async(G_FILE(self->obj), attributes, flags,
+ io_priority, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_replace_contents kwargs
+static PyObject *
+_wrap_g_file_replace_contents(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "contents", "etag", "make_backup",
+ "flags", "cancellable", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ GFileCreateFlags flags = G_FILE_CREATE_NONE;
+ PyObject *py_flags = NULL;
+ gsize length;
+ gboolean make_backup = FALSE;
+ char *contents;
+ char *etag = NULL;
+ char *new_etag = NULL;
+ GError *error = NULL;
+ gboolean ret;
+ PyObject *py_ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s#|zbOO:File.replace_contents",
+ kwlist,
+ &contents,
+ &length,
+ &etag,
+ &make_backup,
+ &flags,
+ &cancellable))
+ {
+ return NULL;
+ }
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ pyg_begin_allow_threads;
+
+ ret = g_file_replace_contents(G_FILE(self->obj), contents, length, etag,
+ make_backup, flags, &new_etag, cancellable,
+ &error);
+
+ pyg_end_allow_threads;
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (ret) {
+ py_ret = PyString_FromString(new_etag);
+ } else {
+ py_ret = Py_None;
+ Py_INCREF(py_ret);
+ }
+
+ g_free(new_etag);
+ return py_ret;
+}
+%%
+override g_file_replace_contents_finish kwargs
+static PyObject *
+_wrap_g_file_replace_contents_finish(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *res;
+ gchar *etag_out = NULL;
+ GError *error = NULL;
+ gboolean ret;
+ PyObject *py_ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:File.replace_contents_finish",
+ kwlist,
+ &PyGAsyncResult_Type,
+ &res))
+ return NULL;
+
+ ret = g_file_replace_contents_finish(G_FILE(self->obj),
+ G_ASYNC_RESULT(res->obj), &etag_out,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (ret) {
+ py_ret = PyString_FromString(etag_out);
+ return py_ret;
+ } else {
+ py_ret = Py_None;
+ Py_INCREF(py_ret);
+ }
+
+ g_free(etag_out);
+ return py_ret;
+}
+%%
+override g_file_replace_contents_async kwargs
+static PyObject *
+_wrap_g_file_replace_contents_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "contents", "callback", "etag", "make_backup",
+ "flags", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ PyGIONotify *notify;
+ GFileCreateFlags flags = G_FILE_CREATE_NONE;
+ PyObject *py_flags = NULL;
+ gsize length;
+ gboolean make_backup = FALSE;
+ char *contents;
+ char *etag = NULL;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s#O|zbOOO:File.replace_contents_async",
+ kwlist,
+ &contents,
+ &length,
+ &notify->callback,
+ &etag,
+ &make_backup,
+ &py_flags,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+ pygio_notify_copy_buffer(notify, contents, length);
+
+ g_file_replace_contents_async(G_FILE(self->obj),
+ notify->buffer,
+ notify->buffer_size,
+ etag,
+ make_backup,
+ flags,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override-slot GFile.tp_richcompare
+static PyObject *
+_wrap_g_file_tp_richcompare(PyGObject *self, PyGObject *other, int op)
+{
+ PyObject *result;
+
+ if (PyObject_TypeCheck(self, &PyGFile_Type)
+ && PyObject_TypeCheck(other, &PyGFile_Type)) {
+ GFile *file1 = G_FILE(self->obj);
+ GFile *file2 = G_FILE(other->obj);
+
+ switch (op) {
+ case Py_EQ:
+ result = (g_file_equal(file1, file2)
+ ? Py_True : Py_False);
+ break;
+ case Py_NE:
+ result = (!g_file_equal(file1, file2)
+ ? Py_True : Py_False);
+ break;
+ default:
+ result = Py_NotImplemented;
+ }
+ }
+ else
+ result = Py_NotImplemented;
+
+ Py_INCREF(result);
+ return result;
+}
+%%
+override-slot GFile.tp_hash
+static long
+_wrap_g_file_tp_hash(PyGObject *self)
+{
+ return g_file_hash(G_FILE(self->obj));
+}
+%%
+override-slot GFile.tp_repr
+static PyObject *
+_wrap_g_file_tp_repr(PyGObject *self)
+{
+ char *uri = g_file_get_uri(G_FILE(self->obj));
+ gchar *representation;
+ PyObject *result;
+
+ if (uri) {
+ representation = g_strdup_printf("<%s at %p: %s>", self->ob_type->tp_name, self, uri);
+ g_free(uri);
+ }
+ else
+ representation = g_strdup_printf("<%s at %p: UNKNOWN URI>", self->ob_type->tp_name, self);
+
+ result = PyString_FromString(representation);
+ g_free(representation);
+ return result;
+}
+%%
+override g_file_eject_mountable kwargs
+static PyObject *
+_wrap_g_file_eject_mountable(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags",
+ "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ GFileCreateFlags flags = G_FILE_CREATE_NONE;
+ PyObject *py_flags = NULL;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOO:File.eject_mountable",
+ kwlist,
+ &notify->callback,
+ &flags,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_eject_mountable(G_FILE(self->obj), flags, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_eject_mountable_with_operation kwargs
+static PyObject *
+_wrap_g_file_eject_mountable_with_operation(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:File.eject_mountable_with_operation",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer) &flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_eject_mountable_with_operation(G_FILE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_find_enclosing_mount_async kwargs
+static PyObject *
+_wrap_g_file_find_enclosing_mount_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:File.enclosing_mount_async",
+ kwlist,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_find_enclosing_mount_async(G_FILE(self->obj),
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_query_filesystem_info_async kwargs
+static PyObject *
+_wrap_g_file_query_filesystem_info_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "attributes", "callback",
+ "io_priority", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ char *attributes;
+ int io_priority = G_PRIORITY_DEFAULT;
+ GCancellable *cancellable = NULL;
+ PyGObject *py_cancellable = NULL;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sO|iOO:gio.File.query_filesystem_info_async",
+ kwlist,
+ &attributes,
+ &notify->callback,
+ &io_priority,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_query_filesystem_info_async(G_FILE(self->obj),
+ attributes,
+ io_priority,
+ (GCancellable *) cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_set_attributes_async kwargs
+static PyObject *
+_wrap_g_file_set_attributes_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "info", "callback", "flags",
+ "io_priority", "cancellable", "user_data", NULL };
+ PyGObject *info;
+ PyGIONotify *notify;
+ GFileQueryInfoFlags flags = G_FILE_QUERY_INFO_NONE;
+ int io_priority = G_PRIORITY_DEFAULT;
+ GCancellable *cancellable = NULL;
+ PyGObject *py_cancellable = NULL;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!O|OiOO:gio.File.set_attributes_async",
+ kwlist,
+ &PyGFileInfo_Type,
+ &info,
+ &notify->callback,
+ &flags,
+ &io_priority,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_set_attributes_async(G_FILE(self->obj),
+ G_FILE_INFO(info->obj),
+ flags,
+ io_priority,
+ (GCancellable *) cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+
+%%
+override g_file_set_attributes_finish kwargs
+static PyObject *
+_wrap_g_file_set_attributes_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *res;
+ GFileInfo *info = NULL;
+ GError *error = NULL;
+ gboolean ret;
+ PyObject *py_ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:File.set_attributes_finish",
+ kwlist,
+ &PyGAsyncResult_Type,
+ &res))
+ return NULL;
+
+ ret = g_file_set_attributes_finish(G_FILE(self->obj),
+ G_ASYNC_RESULT(res->obj), &info,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (ret) {
+ py_ret = pygobject_new((GObject *)info);
+ } else {
+ py_ret = Py_None;
+ Py_INCREF(py_ret);
+ }
+
+ return py_ret;
+}
+%%
+override g_file_set_display_name_async kwargs
+static PyObject *
+_wrap_g_file_set_display_name_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "display_name", "callback",
+ "io_priority", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ char *display_name;
+ int io_priority = G_PRIORITY_DEFAULT;
+ GCancellable *cancellable = NULL;
+ PyGObject *py_cancellable = NULL;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sO|iOO:gio.File.set_display_name_async",
+ kwlist,
+ &display_name,
+ &notify->callback,
+ &io_priority,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_set_display_name_async(G_FILE(self->obj),
+ display_name,
+ io_priority,
+ (GCancellable *) cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_poll_mountable kwargs
+static PyObject *
+_wrap_g_file_poll_mountable(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OO:File.poll_mountable",
+ kwlist,
+ &notify->callback,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_poll_mountable(G_FILE(self->obj), cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_start_mountable kwargs
+static PyObject *
+_wrap_g_file_start_mountable(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "start_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ GDriveStartFlags flags = G_DRIVE_START_NONE;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:File.start_mountable",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_DRIVE_START_FLAGS,
+ py_flags, (gpointer) &flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_start_mountable(G_FILE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_stop_mountable kwargs
+static PyObject *
+_wrap_g_file_stop_mountable(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:gio.File.stop_mountable",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer) &flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_stop_mountable(G_FILE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+
+/* GFile.load_partial_contents_async: No ArgType for GFileReadMoreCallback */
+/* GFile.load_partial_contents_finish: No ArgType for char** */
diff --git a/gio/gfileattribute.override b/gio/gfileattribute.override
new file mode 100644
index 0000000..e51ec63
--- /dev/null
+++ b/gio/gfileattribute.override
@@ -0,0 +1,153 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Gian Mario Tagliaretti
+ *
+ * gfileattribute.override: module overrides for GFileAttribute*
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+headers
+
+extern PyTypeObject PyGFileAttributeInfo_Type;
+
+typedef struct {
+ PyObject_HEAD
+ const GFileAttributeInfo *info;
+} PyGFileAttributeInfo;
+
+static PyObject *
+pygio_file_attribute_info_tp_new(PyTypeObject *type)
+{
+ PyGFileAttributeInfo *self;
+ GFileAttributeInfo *info = NULL;
+
+ self = (PyGFileAttributeInfo *) PyObject_NEW(PyGFileAttributeInfo,
+ &PyGFileAttributeInfo_Type);
+ self->info = info;
+ return (PyObject *) self;
+}
+
+static PyMethodDef pyg_file_attribute_info_methods[] = {
+ { NULL, 0, 0 }
+};
+
+static PyObject *
+pyg_file_attribute_info__get_name(PyObject *self, void *closure)
+{
+ const gchar *ret;
+
+ ret = ((PyGFileAttributeInfo*)self)->info->name;
+ if (ret)
+ return PyString_FromString(ret);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+pyg_file_attribute_info__get_type(PyObject *self, void *closure)
+{
+ gint ret;
+
+ ret = ((PyGFileAttributeInfo*)self)->info->type;
+ return pyg_enum_from_gtype(G_TYPE_FILE_ATTRIBUTE_TYPE, ret);
+}
+
+static PyObject *
+pyg_file_attribute_info__get_flags(PyObject *self, void *closure)
+{
+ guint ret;
+
+ ret = ((PyGFileAttributeInfo*)self)->info->flags;
+ return pyg_flags_from_gtype(G_TYPE_FILE_ATTRIBUTE_INFO_FLAGS, ret);
+}
+
+static const PyGetSetDef pyg_file_attribute_info_getsets[] = {
+ { "name", (getter)pyg_file_attribute_info__get_name, (setter)0 },
+ { "type", (getter)pyg_file_attribute_info__get_type, (setter)0 },
+ { "flags", (getter)pyg_file_attribute_info__get_flags, (setter)0 },
+ { NULL, (getter)0, (setter)0 },
+};
+
+PyTypeObject PyGFileAttributeInfo_Type = {
+ PyObject_HEAD_INIT(NULL)
+ 0, /* ob_size */
+ "gio.FileAttributeInfo", /* tp_name */
+ sizeof(PyGFileAttributeInfo), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ /* methods */
+ (destructor)0, /* tp_dealloc */
+ (printfunc)0, /* tp_print */
+ (getattrfunc)0, /* tp_getattr */
+ (setattrfunc)0, /* tp_setattr */
+ (cmpfunc)0, /* tp_compare */
+ (reprfunc)0, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ (hashfunc)0, /* tp_hash */
+ (ternaryfunc)0, /* tp_call */
+ (reprfunc)0, /* tp_str */
+ (getattrofunc)0, /* tp_getattro */
+ (setattrofunc)0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
+ "Holds information about an attribute", /* Documentation string */
+ (traverseproc)0, /* tp_traverse */
+ (inquiry)0, /* tp_clear */
+ (richcmpfunc)0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ (getiterfunc)0, /* tp_iter */
+ (iternextfunc)0, /* tp_iternext */
+ (struct PyMethodDef*)pyg_file_attribute_info_methods, /* tp_methods */
+ 0, /* tp_members */
+ (struct PyGetSetDef*)pyg_file_attribute_info_getsets, /* tp_getset */
+ (PyTypeObject *)0, /* tp_base */
+ (PyObject *)0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)0, /* tp_init */
+ 0, /* tp_alloc */
+ (newfunc)pygio_file_attribute_info_tp_new, /* tp_new */
+ 0, /* tp_free */
+ (inquiry)0, /* tp_is_gc */
+ (PyObject *)0, /* tp_bases */
+};
+
+PyObject*
+pyg_file_attribute_info_new(const GFileAttributeInfo *info)
+{
+ PyGFileAttributeInfo *self;
+
+ self = (PyGFileAttributeInfo *)PyObject_NEW(PyGFileAttributeInfo,
+ &PyGFileAttributeInfo_Type);
+ if (G_UNLIKELY(self == NULL))
+ return NULL;
+ if (info)
+ self->info = info;
+ return (PyObject *)self;
+}
+
+%%
+init
+if (PyType_Ready(&PyGFileAttributeInfo_Type) < 0) {
+ g_return_if_reached();
+}
+if (PyDict_SetItemString(d, "FileAttributeInfo",
+ (PyObject *)&PyGFileAttributeInfo_Type) < 0) {
+ g_return_if_reached();
+}
diff --git a/gio/gfileenumerator.override b/gio/gfileenumerator.override
new file mode 100644
index 0000000..db29550
--- /dev/null
+++ b/gio/gfileenumerator.override
@@ -0,0 +1,184 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * gfileenumerator.override: module overrides for GFileEnumerator
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override-slot GFileEnumerator.tp_iter
+static PyObject*
+_wrap_g_file_enumerator_tp_iter(PyGObject *self)
+{
+ Py_INCREF (self);
+ return (PyObject *) self;
+}
+%%
+override-slot GFileEnumerator.tp_iternext
+static PyObject*
+_wrap_g_file_enumerator_tp_iternext(PyGObject *iter)
+{
+ GFileInfo *file_info;
+ GError *error = NULL;
+
+ if (!iter->obj) {
+ PyErr_SetNone(PyExc_StopIteration);
+ return NULL;
+ }
+
+ file_info = g_file_enumerator_next_file(G_FILE_ENUMERATOR(iter->obj),
+ NULL,
+ &error);
+ if (pyg_error_check(&error)) {
+ return NULL;
+ }
+
+ if (!file_info) {
+ PyErr_SetNone(PyExc_StopIteration);
+ return NULL;
+ }
+
+ return pygobject_new((GObject*)file_info);
+}
+%%
+override g_file_enumerator_next_files_async kwargs
+static PyObject *
+_wrap_g_file_enumerator_next_files_async(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "num_files", "callback",
+ "io_priority", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ int num_files;
+ int io_priority = G_PRIORITY_DEFAULT;
+ GCancellable *cancellable = NULL;
+ PyGObject *py_cancellable = NULL;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "iO|iOO:gio.FileEnumerator.enumerate_next_files_async",
+ kwlist,
+ &num_files,
+ &notify->callback,
+ &io_priority,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_enumerator_next_files_async(G_FILE_ENUMERATOR(self->obj),
+ num_files,
+ io_priority,
+ (GCancellable *) cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_file_enumerator_next_files_finish kwargs
+static PyObject *
+_wrap_g_file_enumerator_next_files_finish(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *result;
+ GList *next_files, *l;
+ GError *error = NULL;
+ PyObject *ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:gio.FileEnumerator.next_files_finish",
+ kwlist,
+ &PyGAsyncResult_Type, &result))
+ return NULL;
+
+ next_files = g_file_enumerator_next_files_finish(G_FILE_ENUMERATOR(self->obj),
+ G_ASYNC_RESULT(result->obj),
+ &error);
+ if (pyg_error_check(&error))
+ return NULL;
+
+ ret = PyList_New(0);
+ for (l = next_files; l; l = l->next) {
+ GFileInfo *file_info = l->data;
+ PyObject *item = pygobject_new((GObject *)file_info);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ g_object_unref(file_info);
+ }
+ g_list_free(next_files);
+
+ return ret;
+}
+%%
+override g_file_enumerator_close_async kwargs
+static PyObject *
+_wrap_g_file_enumerator_close_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "io_priority", "cancellable",
+ "user_data", NULL };
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:gio.FileEnumerator.close_async",
+ kwlist,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_enumerator_close_async(G_FILE_ENUMERATOR(self->obj),
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/gfileinfo.override b/gio/gfileinfo.override
new file mode 100644
index 0000000..730e91b
--- /dev/null
+++ b/gio/gfileinfo.override
@@ -0,0 +1,121 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ * 2009 Gian Mario Tagliaretti
+ *
+ * gfileinfo.override: module overrides for GFileInfo
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+headers
+
+#ifndef G_TYPE_FILE_ATTRIBUTE_MATCHER
+#define G_TYPE_FILE_ATTRIBUTE_MATCHER (_g_file_attribute_matcher_get_type ())
+
+static GType _g_file_attribute_matcher_get_type (void)
+{
+ static GType our_type = 0;
+
+ if (our_type == 0)
+ our_type = g_boxed_type_register_static ("GFileAttributeMatcher",
+ (GBoxedCopyFunc)g_file_attribute_matcher_ref,
+ (GBoxedFreeFunc)g_file_attribute_matcher_unref);
+
+ return our_type;
+}
+#endif
+
+%%
+override g_file_info_list_attributes kwargs
+static PyObject *
+_wrap_g_file_info_list_attributes(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ char *kwlist[] = { "name_space", NULL};
+ gchar *name_space = NULL;
+ gchar **names;
+ gchar **n;
+ PyObject *ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|z:gio.FileInfo.list_attributes",
+ kwlist, &name_space))
+ return NULL;
+
+ names = g_file_info_list_attributes(G_FILE_INFO(self->obj),
+ name_space);
+
+ ret = PyList_New(0);
+ n = names;
+ while (n && *n) {
+ PyObject *item = PyString_FromString(n[0]);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+
+ n++;
+ }
+
+ g_strfreev(names);
+ return ret;
+}
+%%
+override g_file_info_get_modification_time noargs
+static PyObject *
+_wrap_g_file_info_get_modification_time(PyGObject *self, PyObject *unused)
+{
+ GTimeVal timeval;
+
+ g_file_info_get_modification_time(G_FILE_INFO(self->obj), &timeval);
+ return pyglib_float_from_timeval(timeval);
+}
+%%
+override g_file_info_set_modification_time kwargs
+static PyObject *
+_wrap_g_file_info_set_modification_time(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ char *kwlist[] = { "mtime", NULL};
+ double py_mtime = 0.0;
+ GTimeVal ttime, *mtime;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "d:gio.FileInfo.set_modification_time",
+ kwlist, &py_mtime))
+ return NULL;
+
+ if (py_mtime > 0.0) {
+ ttime.tv_sec = (glong) py_mtime;
+ ttime.tv_usec = (glong)((py_mtime - ttime.tv_sec) * G_USEC_PER_SEC);
+ mtime = &ttime;
+ } else if (py_mtime == 0.0) {
+ mtime = NULL;
+ } else {
+ PyErr_SetString(PyExc_ValueError, "mtime must be >= 0.0");
+ return NULL;
+ }
+
+ g_file_info_set_modification_time(G_FILE_INFO(self->obj), mtime);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+/* GFileInfo.get_attribute_data: No ArgType for GFileAttributeType* */
+/* GFileInfo.set_attribute: No ArgType for gpointer */
diff --git a/gio/gfileinputstream.override b/gio/gfileinputstream.override
new file mode 100644
index 0000000..5190a13
--- /dev/null
+++ b/gio/gfileinputstream.override
@@ -0,0 +1,68 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gfileinputstream.override: module overrides for GFileInputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+override g_file_input_stream_query_info_async kwargs
+static PyObject *
+_wrap_g_file_input_stream_query_info_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "attributes", "callback",
+ "io_priority", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ char *attributes;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sO|iOO:gio.FileInputStream.query_info_async",
+ kwlist,
+ &attributes,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_input_stream_query_info_async(G_FILE_INPUT_STREAM(self->obj),
+ attributes, io_priority, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/gfileiostream.override b/gio/gfileiostream.override
new file mode 100644
index 0000000..7be6124
--- /dev/null
+++ b/gio/gfileiostream.override
@@ -0,0 +1,68 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gfileiostream.override: module overrides for GFileIOStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+override g_file_io_stream_query_info_async kwargs
+static PyObject *
+_wrap_g_file_io_stream_query_info_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "attributes", "callback",
+ "io_priority", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ char *attributes;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sO|iOO:gio.FileIOStream.query_info_async",
+ kwlist,
+ &attributes,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_io_stream_query_info_async(G_FILE_IO_STREAM(self->obj),
+ attributes, io_priority, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/gfileoutputstream.override b/gio/gfileoutputstream.override
new file mode 100644
index 0000000..c5c184d
--- /dev/null
+++ b/gio/gfileoutputstream.override
@@ -0,0 +1,68 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gfileoutputstream.override: module overrides for GFileOuputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+override g_file_output_stream_query_info_async kwargs
+static PyObject *
+_wrap_g_file_output_stream_query_info_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "attributes", "callback",
+ "io_priority", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ int io_priority = G_PRIORITY_DEFAULT;
+ char *attributes;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sO|iOO:gio.FileOutputStream.query_info_async",
+ kwlist,
+ &attributes,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_output_stream_query_info_async(G_FILE_OUTPUT_STREAM(self->obj),
+ attributes, io_priority, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/gicon.override b/gio/gicon.override
new file mode 100644
index 0000000..c429556
--- /dev/null
+++ b/gio/gicon.override
@@ -0,0 +1,310 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * gicon.override: module overrides for GIcon and related types
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+ignore-glob
+ g_icon_hash
+ g_themed_icon_new_from_names
+ g_themed_icon_new_with_default_fallbacks
+%%
+override-slot GIcon.tp_richcompare
+static PyObject *
+_wrap_g_icon_tp_richcompare(PyGObject *self, PyGObject *other, int op)
+{
+ PyObject *result;
+
+ if (PyObject_TypeCheck(self, &PyGIcon_Type)
+ && PyObject_TypeCheck(other, &PyGIcon_Type)) {
+ GIcon *icon1 = G_ICON(self->obj);
+ GIcon *icon2 = G_ICON(other->obj);
+
+ switch (op) {
+ case Py_EQ:
+ result = (g_icon_equal(icon1, icon2)
+ ? Py_True : Py_False);
+ break;
+ case Py_NE:
+ result = (!g_icon_equal(icon1, icon2)
+ ? Py_True : Py_False);
+ break;
+ default:
+ result = Py_NotImplemented;
+ }
+ }
+ else
+ result = Py_NotImplemented;
+
+ Py_INCREF(result);
+ return result;
+}
+%%
+override-slot GIcon.tp_hash
+static long
+_wrap_g_icon_tp_hash(PyGObject *self)
+{
+ return g_icon_hash(G_ICON(self->obj));
+}
+%%
+override g_loadable_icon_load kwargs
+static PyObject *
+_wrap_g_loadable_icon_load(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "size", "cancellable", NULL };
+ int size = 0;
+ char *type = NULL;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ GError *error = NULL;
+ GInputStream *stream;
+ PyObject *result;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|iO:gio.LoadableIcon.load",
+ kwlist,
+ &size, &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ stream = g_loadable_icon_load(G_LOADABLE_ICON(self->obj), size, &type,
+ cancellable, &error);
+ if (pyg_error_check(&error))
+ return NULL;
+
+ result = Py_BuildValue("Ns", pygobject_new((GObject *) stream), type);
+ g_free(type);
+ return result;
+}
+%%
+override g_loadable_icon_load_async kwargs
+static PyObject *
+_wrap_g_loadable_icon_load_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "size", "cancellable", "user_data", NULL };
+ int size = 0;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:gio.LoadableIcon.load_async",
+ kwlist,
+ &notify->callback, &size, &pycancellable, &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_loadable_icon_load_async(G_LOADABLE_ICON(self->obj),
+ size,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_loadable_icon_load_finish kwargs
+static PyObject *
+_wrap_g_loadable_icon_load_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "res", NULL };
+ PyGObject *res;
+ char *type = NULL;
+ GError *error = NULL;
+ GInputStream *stream;
+ PyObject *result;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:gio.LoadableIcon.load_finish",
+ kwlist,
+ &PyGAsyncResult_Type, &res))
+ return NULL;
+
+ stream = g_loadable_icon_load_finish(G_LOADABLE_ICON(self->obj),
+ G_ASYNC_RESULT(res->obj), &type, &error);
+ if (pyg_error_check(&error))
+ return NULL;
+
+ result = Py_BuildValue("Ns", pygobject_new((GObject *) stream), type);
+ g_free(type);
+ return result;
+}
+%%
+override-slot GFileIcon.tp_repr
+static PyObject *
+_wrap_g_file_icon_tp_repr(PyGObject *self)
+{
+ GFile *file = g_file_icon_get_file(G_FILE_ICON(self->obj));
+ char *uri = (file ? g_file_get_uri(file) : NULL);
+ gchar *representation;
+ PyObject *result;
+
+ if (uri) {
+ representation = g_strdup_printf("<%s at %p: %s>", self->ob_type->tp_name, self, uri);
+ g_free(uri);
+ }
+ else
+ representation = g_strdup_printf("<%s at %p: UNKNOWN URI>", self->ob_type->tp_name, self);
+
+ result = PyString_FromString(representation);
+ g_free(representation);
+ return result;
+}
+%%
+new-constructor G_TYPE_THEMED_ICON
+%%
+override g_themed_icon_new kwargs
+static int
+_wrap_g_themed_icon_new(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "name", "use_default_fallbacks", NULL };
+ PyObject *name;
+ gboolean use_default_fallbacks = FALSE;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i:gio.ThemedIcon.__init__",
+ kwlist, &name, &use_default_fallbacks))
+ return -1;
+
+ if (PyString_Check(name)) {
+ pygobject_construct(self,
+ "name", PyString_AsString(name),
+ "use-default-fallbacks", use_default_fallbacks, NULL);
+ return 0;
+ }
+ else if (PySequence_Check(name)) {
+ PyObject *tuple = PySequence_Tuple(name);
+
+ if (tuple) {
+ int k;
+ int length = PyTuple_Size(tuple);
+ char **names = g_new(char *, length + 1);
+
+ for (k = 0; k < length; k++) {
+ PyObject *str = PyTuple_GetItem(tuple, k);
+ if (str && PyString_Check(str))
+ names[k] = PyString_AsString(str);
+ else {
+ Py_DECREF(tuple);
+ g_free(names);
+ goto error;
+ }
+ }
+
+ names[length] = NULL;
+ pygobject_construct(self,
+ "names", names,
+ "use-default-fallbacks", use_default_fallbacks, NULL);
+ Py_DECREF(tuple);
+ g_free(names);
+ return 0;
+ }
+ }
+
+ error:
+ if (!PyErr_Occurred()) {
+ PyErr_SetString(PyExc_TypeError,
+ "argument 1 of gio.ThemedIcon.__init__ "
+ "must be either a string or a sequence of strings");
+ }
+ return -1;
+}
+%%
+override g_themed_icon_get_names noargs
+static PyObject *
+_wrap_g_themed_icon_get_names(PyGObject *self)
+{
+ const char * const *names;
+ PyObject *ret;
+
+ names = g_themed_icon_get_names(G_THEMED_ICON(self->obj));
+
+ ret = PyList_New(0);
+ while (names && *names) {
+ PyObject *item = PyString_FromString(names[0]);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+
+ names++;
+ }
+
+ return ret;
+}
+%%
+override-slot GThemedIcon.tp_repr
+static PyObject *
+_wrap_g_themed_icon_tp_repr(PyGObject *self)
+{
+ const char * const *names = g_themed_icon_get_names(G_THEMED_ICON(self->obj));
+ GString *representation = g_string_new(NULL);
+ PyObject *result;
+
+ g_string_append_printf(representation, "<%s at %p: ", self->ob_type->tp_name, self);
+
+ if (names) {
+ gboolean first_name = TRUE;
+ while (*names) {
+ if (!first_name)
+ g_string_append(representation, ", ");
+ else
+ first_name = FALSE;
+
+ g_string_append(representation, *names++);
+ }
+ }
+
+ g_string_append(representation, ">");
+ result = PyString_FromString(representation->str);
+ g_string_free(representation, TRUE);
+ return result;
+}
+%%
+override g_emblemed_icon_get_emblems noargs
+static PyObject *
+_wrap_g_emblemed_icon_get_emblems(PyGObject *self)
+{
+ GList *list;
+ PyObject *ret;
+
+ list = g_emblemed_icon_get_emblems(G_EMBLEMED_ICON(self->obj));
+
+ PYLIST_FROMGLIST(ret, list, pygobject_new(list_item), NULL, NULL);
+
+ return ret;
+}
diff --git a/gio/ginputstream.override b/gio/ginputstream.override
new file mode 100644
index 0000000..260b2fc
--- /dev/null
+++ b/gio/ginputstream.override
@@ -0,0 +1,344 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * ginputstream.override: module overrides for GInputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+headers
+#define BUFSIZE 8192
+
+%%
+override g_input_stream_read kwargs
+static PyObject *
+_wrap_g_input_stream_read(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "count", "cancellable", NULL };
+ PyGObject *pycancellable = NULL;
+ PyObject *v;
+ GCancellable *cancellable;
+ long count = -1;
+ GError *error = NULL;
+ size_t bytesread, buffersize, chunksize;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|lO:InputStream.read",
+ kwlist, &count,
+ &pycancellable))
+ return NULL;
+
+ buffersize = (count < 0 ? BUFSIZE : count);
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ v = PyString_FromStringAndSize((char *)NULL, buffersize);
+ if (v == NULL)
+ return NULL;
+
+ bytesread = 0;
+ for (;;)
+ {
+ pyg_begin_allow_threads;
+ errno = 0;
+ chunksize = g_input_stream_read(G_INPUT_STREAM(self->obj),
+ PyString_AS_STRING((PyStringObject *)v) + bytesread,
+ buffersize - bytesread, cancellable,
+ &error);
+ pyg_end_allow_threads;
+
+ if (pyg_error_check(&error)) {
+ Py_DECREF(v);
+ return NULL;
+ }
+ if (chunksize == 0) {
+ /* End of file. */
+ break;
+ }
+
+ bytesread += chunksize;
+ if (bytesread < buffersize) {
+ /* g_input_stream_read() decided to not read full buffer. We
+ * then return early too, even if 'count' is less than 0.
+ */
+ break;
+ }
+
+ if (count < 0) {
+ buffersize += BUFSIZE;
+ if (_PyString_Resize(&v, buffersize) < 0)
+ return NULL;
+ }
+ else {
+ /* Got what was requested. */
+ break;
+ }
+ }
+
+ if (bytesread != buffersize)
+ _PyString_Resize(&v, bytesread);
+
+ return v;
+}
+%%
+override g_input_stream_read_all kwargs
+static PyObject *
+_wrap_g_input_stream_read_all(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "count", "cancellable", NULL };
+ PyGObject *pycancellable = NULL;
+ PyObject *v;
+ GCancellable *cancellable;
+ long count = -1;
+ GError *error = NULL;
+ size_t bytesread, buffersize, chunksize;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "|lO:InputStream.read",
+ kwlist, &count,
+ &pycancellable))
+ return NULL;
+
+ buffersize = (count < 0 ? BUFSIZE : count);
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ v = PyString_FromStringAndSize((char *)NULL, buffersize);
+ if (v == NULL)
+ return NULL;
+
+ bytesread = 0;
+ for (;;)
+ {
+ pyg_begin_allow_threads;
+ errno = 0;
+ g_input_stream_read_all(G_INPUT_STREAM(self->obj),
+ PyString_AS_STRING((PyStringObject *)v) + bytesread,
+ buffersize - bytesread,
+ &chunksize,
+ cancellable, &error);
+ pyg_end_allow_threads;
+
+ if (pyg_error_check(&error)) {
+ Py_DECREF(v);
+ return NULL;
+ }
+
+ bytesread += chunksize;
+ if (bytesread < buffersize || chunksize == 0) {
+ /* End of file. */
+ break;
+ }
+
+ if (count < 0) {
+ buffersize += BUFSIZE;
+ if (_PyString_Resize(&v, buffersize) < 0)
+ return NULL;
+ }
+ else {
+ /* Got what was requested. */
+ break;
+ }
+ }
+
+ if (bytesread != buffersize)
+ _PyString_Resize(&v, bytesread);
+
+ return v;
+}
+%%
+override g_input_stream_read_async kwargs
+static PyObject *
+_wrap_g_input_stream_read_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "count", "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ long count = -1;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "lO|iOO:InputStream.read_async",
+ kwlist,
+ &count,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ if (!pygio_notify_allocate_buffer(notify, count))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+ pygio_notify_attach_to_result(notify);
+
+ g_input_stream_read_async(G_INPUT_STREAM(self->obj),
+ notify->buffer,
+ notify->buffer_size,
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_input_stream_read_finish kwargs
+static PyObject *
+_wrap_g_input_stream_read_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *result;
+ GError *error = NULL;
+ Py_ssize_t bytesread;
+ PyGIONotify *notify;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:gio.InputStream.read_finish",
+ kwlist, &PyGAsyncResult_Type, &result))
+ return NULL;
+
+ bytesread = g_input_stream_read_finish(G_INPUT_STREAM(self->obj),
+ G_ASYNC_RESULT(result->obj), &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (bytesread == 0)
+ return PyString_FromString("");
+
+ notify = pygio_notify_get_attached(result);
+ return PyString_FromStringAndSize(notify->buffer, bytesread);
+}
+%%
+override g_input_stream_close_async kwargs
+static PyObject *
+_wrap_g_input_stream_close_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "io_priority", "cancellable",
+ "user_data", NULL };
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:InputStream.close_async",
+ kwlist,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_input_stream_close_async(G_INPUT_STREAM(self->obj),
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_input_stream_skip_async kwargs
+static PyObject *
+_wrap_g_input_stream_skip_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "count", "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ long count = -1;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "lO|iOO:InputStream.skip_async",
+ kwlist,
+ &count,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+
+ g_input_stream_skip_async(G_INPUT_STREAM(self->obj),
+ count,
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/gio-types.defs b/gio/gio-types.defs
new file mode 100644
index 0000000..331e0bc
--- /dev/null
+++ b/gio/gio-types.defs
@@ -0,0 +1,807 @@
+;; -*- scheme -*-
+
+; interface definitions ...
+
+(define-interface AppInfo
+ (in-module "gio")
+ (c-name "GAppInfo")
+ (gtype-id "G_TYPE_APP_INFO")
+)
+
+(define-interface AsyncInitable
+ (in-module "gio")
+ (c-name "GAsyncInitable")
+ (gtype-id "G_TYPE_ASYNC_INITABLE")
+)
+
+(define-interface AsyncResult
+ (in-module "gio")
+ (c-name "GAsyncResult")
+ (gtype-id "G_TYPE_ASYNC_RESULT")
+)
+
+(define-interface Drive
+ (in-module "gio")
+ (c-name "GDrive")
+ (gtype-id "G_TYPE_DRIVE")
+)
+
+(define-interface File
+ (docstring
+"File(arg, path=None, uri=None) -> gio.File subclass\n"
+"\n"
+"If arg is specified; creates a GFile with the given argument from the\n"
+"command line. The value of arg can be either a URI, an absolute path\n"
+"or a relative path resolved relative to the current working directory.\n"
+"If path is specified, create a file from an absolute or relative path.\n"
+"If uri is specified, create a file from a URI.\n\n"
+"This operation never fails, but the returned object might not \n"
+"support any I/O operation if arg points to a malformed path.")
+ (in-module "gio")
+ (c-name "GFile")
+ (gtype-id "G_TYPE_FILE")
+)
+
+(define-interface Icon
+ (in-module "gio")
+ (c-name "GIcon")
+ (gtype-id "G_TYPE_ICON")
+)
+
+(define-interface Initable
+ (in-module "gio")
+ (c-name "GInitable")
+ (gtype-id "G_TYPE_INITABLE")
+)
+
+(define-interface LoadableIcon
+ (in-module "gio")
+ (c-name "GLoadableIcon")
+ (gtype-id "G_TYPE_LOADABLE_ICON")
+)
+
+(define-interface Mount
+ (in-module "gio")
+ (c-name "GMount")
+ (gtype-id "G_TYPE_MOUNT")
+)
+
+(define-interface Seekable
+ (in-module "gio")
+ (c-name "GSeekable")
+ (gtype-id "G_TYPE_SEEKABLE")
+)
+
+(define-interface SocketConnectable
+ (in-module "gio")
+ (c-name "GSocketConnectable")
+ (gtype-id "G_TYPE_SOCKET_CONNECTABLE")
+)
+
+(define-interface Volume
+ (in-module "gio")
+ (c-name "GVolume")
+ (gtype-id "G_TYPE_VOLUME")
+)
+
+; boxed definitions ...
+
+(define-boxed FileAttributeMatcher
+ (in-module "gio")
+ (c-name "GFileAttributeMatcher")
+ (gtype-id "G_TYPE_FILE_ATTRIBUTE_MATCHER")
+)
+
+(define-boxed SrvTarget
+ (in-module "gio")
+ (c-name "GSrvTarget")
+ (gtype-id "G_TYPE_SRV_TARGET")
+)
+
+; object definitions ...
+
+(define-object AppLaunchContext
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GAppLaunchContext")
+ (gtype-id "G_TYPE_APP_LAUNCH_CONTEXT")
+)
+
+(define-object Cancellable
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GCancellable")
+ (gtype-id "G_TYPE_CANCELLABLE")
+)
+
+(define-object Emblem
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GEmblem")
+ (gtype-id "G_TYPE_EMBLEM")
+)
+
+(define-object EmblemedIcon
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GEmblemedIcon")
+ (gtype-id "G_TYPE_EMBLEMED_ICON")
+)
+
+(define-object FileEnumerator
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GFileEnumerator")
+ (gtype-id "G_TYPE_FILE_ENUMERATOR")
+)
+
+(define-object FileInfo
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GFileInfo")
+ (gtype-id "G_TYPE_FILE_INFO")
+)
+
+(define-object FileMonitor
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GFileMonitor")
+ (gtype-id "G_TYPE_FILE_MONITOR")
+)
+
+(define-object InputStream
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GInputStream")
+ (gtype-id "G_TYPE_INPUT_STREAM")
+)
+
+(define-object FileInputStream
+ (in-module "gio")
+ (parent "GInputStream")
+ (c-name "GFileInputStream")
+ (gtype-id "G_TYPE_FILE_INPUT_STREAM")
+)
+
+(define-object FileIOStream
+ (in-module "gio")
+ (parent "GIOStream")
+ (c-name "GFileIOStream")
+ (gtype-id "G_TYPE_FILE_IO_STREAM")
+)
+
+(define-object FilterInputStream
+ (in-module "gio")
+ (parent "GInputStream")
+ (c-name "GFilterInputStream")
+ (gtype-id "G_TYPE_FILTER_INPUT_STREAM")
+)
+
+(define-object BufferedInputStream
+ (in-module "gio")
+ (parent "GFilterInputStream")
+ (c-name "GBufferedInputStream")
+ (gtype-id "G_TYPE_BUFFERED_INPUT_STREAM")
+)
+
+(define-object DataInputStream
+ (in-module "gio")
+ (parent "GFilterInputStream")
+ (c-name "GDataInputStream")
+ (gtype-id "G_TYPE_DATA_INPUT_STREAM")
+)
+
+(define-object MemoryInputStream
+ (in-module "gio")
+ (parent "GInputStream")
+ (c-name "GMemoryInputStream")
+ (gtype-id "G_TYPE_MEMORY_INPUT_STREAM")
+)
+
+(define-object MountOperation
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GMountOperation")
+ (gtype-id "G_TYPE_MOUNT_OPERATION")
+)
+
+(define-object InetAddress
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GInetAddress")
+ (gtype-id "G_TYPE_INET_ADDRESS")
+)
+
+(define-object InetSocketAddress
+ (in-module "gio")
+ (parent "GSocketAddress")
+ (c-name "GInetSocketAddress")
+ (gtype-id "G_TYPE_INET_SOCKET_ADDRESS")
+)
+
+(define-object NetworkAddress
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GNetworkAddress")
+ (gtype-id "G_TYPE_NETWORK_ADDRESS")
+)
+
+(define-object NetworkService
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GNetworkService")
+ (gtype-id "G_TYPE_NETWORK_SERVICE")
+)
+
+(define-object Resolver
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GResolver")
+ (gtype-id "G_TYPE_RESOLVER")
+)
+
+(define-object Socket
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GSocket")
+ (gtype-id "G_TYPE_SOCKET")
+)
+
+(define-object SocketAddress
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GSocketAddress")
+ (gtype-id "G_TYPE_SOCKET_ADDRESS")
+)
+
+(define-object SocketAddressEnumerator
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GSocketAddressEnumerator")
+ (gtype-id "G_TYPE_SOCKET_ADDRESS_ENUMERATOR")
+)
+
+(define-object SocketClient
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GSocketClient")
+ (gtype-id "G_TYPE_SOCKET_CLIENT")
+)
+
+(define-object SocketConnection
+ (in-module "gio")
+ (parent "GIOStream")
+ (c-name "GSocketConnection")
+ (gtype-id "G_TYPE_SOCKET_CONNECTION")
+)
+
+(define-object SocketControlMessage
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GSocketControlMessage")
+ (gtype-id "G_TYPE_SOCKET_CONTROL_MESSAGE")
+)
+
+(define-object SocketListener
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GSocketListener")
+ (gtype-id "G_TYPE_SOCKET_LISTENER")
+)
+
+(define-object SocketService
+ (in-module "gio")
+ (parent "GSocketListener")
+ (c-name "GSocketService")
+ (gtype-id "G_TYPE_SOCKET_SERVICE")
+)
+
+(define-object TcpConnection
+ (in-module "gio")
+ (parent "GSocketConnection")
+ (c-name "GTcpConnection")
+ (gtype-id "G_TYPE_TCP_CONNECTION")
+)
+
+(define-object ThreadedSocketService
+ (in-module "gio")
+ (parent "GSocketService")
+ (c-name "GThreadedSocketService")
+ (gtype-id "G_TYPE_THREADED_SOCKET_SERVICE")
+)
+
+(define-object IOStream
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GIOStream")
+ (gtype-id "G_TYPE_IO_STREAM")
+)
+
+(define-object OutputStream
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GOutputStream")
+ (gtype-id "G_TYPE_OUTPUT_STREAM")
+)
+
+(define-object MemoryOutputStream
+ (in-module "gio")
+ (parent "GOutputStream")
+ (c-name "GMemoryOutputStream")
+ (gtype-id "G_TYPE_MEMORY_OUTPUT_STREAM")
+)
+
+(define-object FilterOutputStream
+ (in-module "gio")
+ (parent "GOutputStream")
+ (c-name "GFilterOutputStream")
+ (gtype-id "G_TYPE_FILTER_OUTPUT_STREAM")
+)
+
+(define-object BufferedOutputStream
+ (in-module "gio")
+ (parent "GFilterOutputStream")
+ (c-name "GBufferedOutputStream")
+ (gtype-id "G_TYPE_BUFFERED_OUTPUT_STREAM")
+)
+
+(define-object DataOutputStream
+ (in-module "gio")
+ (parent "GFilterOutputStream")
+ (c-name "GDataOutputStream")
+ (gtype-id "G_TYPE_DATA_OUTPUT_STREAM")
+)
+
+(define-object FileOutputStream
+ (in-module "gio")
+ (parent "GOutputStream")
+ (c-name "GFileOutputStream")
+ (gtype-id "G_TYPE_FILE_OUTPUT_STREAM")
+)
+
+(define-object SimpleAsyncResult
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GSimpleAsyncResult")
+ (gtype-id "G_TYPE_SIMPLE_ASYNC_RESULT")
+)
+
+(define-object Vfs
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GVfs")
+ (gtype-id "G_TYPE_VFS")
+)
+
+(define-object VolumeMonitor
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GVolumeMonitor")
+ (gtype-id "G_TYPE_VOLUME_MONITOR")
+)
+
+(define-object NativeVolumeMonitor
+ (in-module "gio")
+ (parent "GVolumeMonitor")
+ (c-name "GNativeVolumeMonitor")
+ (gtype-id "G_TYPE_NATIVE_VOLUME_MONITOR")
+)
+
+(define-object FileIcon
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GFileIcon")
+ (gtype-id "G_TYPE_FILE_ICON")
+ (implements "GIcon")
+ (implements "GLoadableIcon")
+)
+
+(define-object ThemedIcon
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GThemedIcon")
+ (gtype-id "G_TYPE_THEMED_ICON")
+ (implements "GIcon")
+)
+
+
+
+;; Enumerations and flags ...
+
+(define-flags AppInfoCreateFlags
+ (in-module "gio")
+ (c-name "GAppInfoCreateFlags")
+ (gtype-id "G_TYPE_APP_INFO_CREATE_FLAGS")
+ (values
+ '("none" "G_APP_INFO_CREATE_NONE")
+ '("needs-terminal" "G_APP_INFO_CREATE_NEEDS_TERMINAL")
+ '("supports-uris" "G_APP_INFO_CREATE_SUPPORTS_URIS")
+ )
+)
+
+(define-flags ConverterFlags
+ (in-module "gio")
+ (c-name "GConverterFlags")
+ (gtype-id "G_TYPE_CONVERTER_FLAGS")
+ (values
+ '("no-flags" "G_CONVERTER_NO_FLAGS")
+ '("input-at-end" "G_CONVERTER_INPUT_AT_END")
+ '("flush" "G_CONVERTER_FLUSH")
+ )
+)
+
+(define-enum ConverterResult
+ (in-module "gio")
+ (c-name "GConverterResult")
+ (gtype-id "G_TYPE_CONVERTER_RESULT")
+ (values
+ '("error" "G_CONVERTER_ERROR")
+ '("converted" "G_CONVERTER_CONVERTED")
+ '("finished" "G_CONVERTER_FINISHED")
+ '("flushed" "G_CONVERTER_FLUSHED")
+ )
+)
+
+(define-enum DataStreamByteOrder
+ (in-module "gio")
+ (c-name "GDataStreamByteOrder")
+ (gtype-id "G_TYPE_DATA_STREAM_BYTE_ORDER")
+ (values
+ '("big-endian" "G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN")
+ '("little-endian" "G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN")
+ '("host-endian" "G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN")
+ )
+)
+
+(define-enum DataStreamNewlineType
+ (in-module "gio")
+ (c-name "GDataStreamNewlineType")
+ (gtype-id "G_TYPE_DATA_STREAM_NEWLINE_TYPE")
+ (values
+ '("lf" "G_DATA_STREAM_NEWLINE_TYPE_LF")
+ '("cr" "G_DATA_STREAM_NEWLINE_TYPE_CR")
+ '("cr-lf" "G_DATA_STREAM_NEWLINE_TYPE_CR_LF")
+ '("any" "G_DATA_STREAM_NEWLINE_TYPE_ANY")
+ )
+)
+
+(define-enum FileAttributeType
+ (in-module "gio")
+ (c-name "GFileAttributeType")
+ (gtype-id "G_TYPE_FILE_ATTRIBUTE_TYPE")
+ (values
+ '("invalid" "G_FILE_ATTRIBUTE_TYPE_INVALID")
+ '("string" "G_FILE_ATTRIBUTE_TYPE_STRING")
+ '("byte-string" "G_FILE_ATTRIBUTE_TYPE_BYTE_STRING")
+ '("boolean" "G_FILE_ATTRIBUTE_TYPE_BOOLEAN")
+ '("uint32" "G_FILE_ATTRIBUTE_TYPE_UINT32")
+ '("int32" "G_FILE_ATTRIBUTE_TYPE_INT32")
+ '("uint64" "G_FILE_ATTRIBUTE_TYPE_UINT64")
+ '("int64" "G_FILE_ATTRIBUTE_TYPE_INT64")
+ '("object" "G_FILE_ATTRIBUTE_TYPE_OBJECT")
+ '("stringv" "G_FILE_ATTRIBUTE_TYPE_STRINGV")
+ )
+)
+
+(define-flags FileAttributeInfoFlags
+ (in-module "gio")
+ (c-name "GFileAttributeInfoFlags")
+ (gtype-id "G_TYPE_FILE_ATTRIBUTE_INFO_FLAGS")
+ (values
+ '("none" "G_FILE_ATTRIBUTE_INFO_NONE")
+ '("copy-with-file" "G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE")
+ '("copy-when-moved" "G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED")
+ )
+)
+
+(define-enum FileAttributeStatus
+ (in-module "gio")
+ (c-name "GFileAttributeStatus")
+ (gtype-id "G_TYPE_FILE_ATTRIBUTE_STATUS")
+ (values
+ '("unset" "G_FILE_ATTRIBUTE_STATUS_UNSET")
+ '("set" "G_FILE_ATTRIBUTE_STATUS_SET")
+ '("error-setting" "G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING")
+ )
+)
+
+(define-flags FileQueryInfoFlags
+ (in-module "gio")
+ (c-name "GFileQueryInfoFlags")
+ (gtype-id "G_TYPE_FILE_QUERY_INFO_FLAGS")
+ (values
+ '("none" "G_FILE_QUERY_INFO_NONE")
+ '("nofollow-symlinks" "G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS")
+ )
+)
+
+(define-flags FileCreateFlags
+ (in-module "gio")
+ (c-name "GFileCreateFlags")
+ (gtype-id "G_TYPE_FILE_CREATE_FLAGS")
+ (values
+ '("none" "G_FILE_CREATE_NONE")
+ '("private" "G_FILE_CREATE_PRIVATE")
+ '("replace-destination" "G_FILE_CREATE_REPLACE_DESTINATION")
+ )
+)
+
+(define-enum MountMountFlags
+ (in-module "gio")
+ (c-name "GMountMountFlags")
+ (gtype-id "G_TYPE_MOUNT_MOUNT_FLAGS")
+ (values
+ '("none" "G_MOUNT_MOUNT_NONE")
+ )
+)
+
+(define-flags MountUnmountFlags
+ (in-module "gio")
+ (c-name "GMountUnmountFlags")
+ (gtype-id "G_TYPE_MOUNT_UNMOUNT_FLAGS")
+ (values
+ '("none" "G_MOUNT_UNMOUNT_NONE")
+ '("force" "G_MOUNT_UNMOUNT_FORCE")
+ )
+)
+
+(define-enum DriveStartFlags
+ (in-module "gio")
+ (c-name "GDriveStartFlags")
+ (gtype-id "G_TYPE_DRIVE_START_FLAGS")
+ (values
+ '("none" "G_DRIVE_START_NONE")
+ )
+)
+
+(define-enum DriveStartStopType
+ (in-module "gio")
+ (c-name "GDriveStartStopType")
+ (gtype-id "G_TYPE_DRIVE_START_STOP_TYPE")
+ (values
+ '("unknown" "G_DRIVE_START_STOP_TYPE_UNKNOWN")
+ '("shutdown" "G_DRIVE_START_STOP_TYPE_SHUTDOWN")
+ '("network" "G_DRIVE_START_STOP_TYPE_NETWORK")
+ '("multidisk" "G_DRIVE_START_STOP_TYPE_MULTIDISK")
+ '("password" "G_DRIVE_START_STOP_TYPE_PASSWORD")
+ )
+)
+
+(define-flags FileCopyFlags
+ (in-module "gio")
+ (c-name "GFileCopyFlags")
+ (gtype-id "G_TYPE_FILE_COPY_FLAGS")
+ (values
+ '("none" "G_FILE_COPY_NONE")
+ '("overwrite" "G_FILE_COPY_OVERWRITE")
+ '("backup" "G_FILE_COPY_BACKUP")
+ '("nofollow-symlinks" "G_FILE_COPY_NOFOLLOW_SYMLINKS")
+ '("all-metadata" "G_FILE_COPY_ALL_METADATA")
+ '("no-fallback-for-move" "G_FILE_COPY_NO_FALLBACK_FOR_MOVE")
+ '("target-default-perms" "G_FILE_COPY_TARGET_DEFAULT_PERMS")
+ )
+)
+
+(define-flags FileMonitorFlags
+ (in-module "gio")
+ (c-name "GFileMonitorFlags")
+ (gtype-id "G_TYPE_FILE_MONITOR_FLAGS")
+ (values
+ '("none" "G_FILE_MONITOR_NONE")
+ '("watch-mounts" "G_FILE_MONITOR_WATCH_MOUNTS")
+ )
+)
+
+(define-enum FileType
+ (in-module "gio")
+ (c-name "GFileType")
+ (gtype-id "G_TYPE_FILE_TYPE")
+ (values
+ '("unknown" "G_FILE_TYPE_UNKNOWN")
+ '("regular" "G_FILE_TYPE_REGULAR")
+ '("directory" "G_FILE_TYPE_DIRECTORY")
+ '("symbolic-link" "G_FILE_TYPE_SYMBOLIC_LINK")
+ '("special" "G_FILE_TYPE_SPECIAL")
+ '("shortcut" "G_FILE_TYPE_SHORTCUT")
+ '("mountable" "G_FILE_TYPE_MOUNTABLE")
+ )
+)
+
+(define-enum FilesystemPreviewType
+ (in-module "gio")
+ (c-name "GFilesystemPreviewType")
+ (gtype-id "G_TYPE_FILESYSTEM_PREVIEW_TYPE")
+ (values
+ '("if-always" "G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS")
+ '("if-local" "G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL")
+ '("never" "G_FILESYSTEM_PREVIEW_TYPE_NEVER")
+ )
+)
+
+(define-enum FileMonitorEvent
+ (in-module "gio")
+ (c-name "GFileMonitorEvent")
+ (gtype-id "G_TYPE_FILE_MONITOR_EVENT")
+ (values
+ '("changed" "G_FILE_MONITOR_EVENT_CHANGED")
+ '("changes-done-hint" "G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT")
+ '("deleted" "G_FILE_MONITOR_EVENT_DELETED")
+ '("created" "G_FILE_MONITOR_EVENT_CREATED")
+ '("attribute-changed" "G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED")
+ '("pre-unmount" "G_FILE_MONITOR_EVENT_PRE_UNMOUNT")
+ '("unmounted" "G_FILE_MONITOR_EVENT_UNMOUNTED")
+ )
+)
+
+(define-enum ErrorEnum
+ (in-module "gio")
+ (c-name "GIOErrorEnum")
+ (gtype-id "G_TYPE_IO_ERROR_ENUM")
+ (values
+ '("failed" "G_IO_ERROR_FAILED")
+ '("not-found" "G_IO_ERROR_NOT_FOUND")
+ '("exists" "G_IO_ERROR_EXISTS")
+ '("is-directory" "G_IO_ERROR_IS_DIRECTORY")
+ '("not-directory" "G_IO_ERROR_NOT_DIRECTORY")
+ '("not-empty" "G_IO_ERROR_NOT_EMPTY")
+ '("not-regular-file" "G_IO_ERROR_NOT_REGULAR_FILE")
+ '("not-symbolic-link" "G_IO_ERROR_NOT_SYMBOLIC_LINK")
+ '("not-mountable-file" "G_IO_ERROR_NOT_MOUNTABLE_FILE")
+ '("filename-too-long" "G_IO_ERROR_FILENAME_TOO_LONG")
+ '("invalid-filename" "G_IO_ERROR_INVALID_FILENAME")
+ '("too-many-links" "G_IO_ERROR_TOO_MANY_LINKS")
+ '("no-space" "G_IO_ERROR_NO_SPACE")
+ '("invalid-argument" "G_IO_ERROR_INVALID_ARGUMENT")
+ '("permission-denied" "G_IO_ERROR_PERMISSION_DENIED")
+ '("not-supported" "G_IO_ERROR_NOT_SUPPORTED")
+ '("not-mounted" "G_IO_ERROR_NOT_MOUNTED")
+ '("already-mounted" "G_IO_ERROR_ALREADY_MOUNTED")
+ '("closed" "G_IO_ERROR_CLOSED")
+ '("cancelled" "G_IO_ERROR_CANCELLED")
+ '("pending" "G_IO_ERROR_PENDING")
+ '("read-only" "G_IO_ERROR_READ_ONLY")
+ '("cant-create-backup" "G_IO_ERROR_CANT_CREATE_BACKUP")
+ '("wrong-etag" "G_IO_ERROR_WRONG_ETAG")
+ '("timed-out" "G_IO_ERROR_TIMED_OUT")
+ '("would-recurse" "G_IO_ERROR_WOULD_RECURSE")
+ '("busy" "G_IO_ERROR_BUSY")
+ '("would-block" "G_IO_ERROR_WOULD_BLOCK")
+ '("host-not-found" "G_IO_ERROR_HOST_NOT_FOUND")
+ '("would-merge" "G_IO_ERROR_WOULD_MERGE")
+ '("failed-handled" "G_IO_ERROR_FAILED_HANDLED")
+ '("too-many-open-files" "G_IO_ERROR_TOO_MANY_OPEN_FILES")
+ '("not-initialized" "G_IO_ERROR_NOT_INITIALIZED")
+ '("address-in-use" "G_IO_ERROR_ADDRESS_IN_USE")
+ '("partial-input" "G_IO_ERROR_PARTIAL_INPUT")
+ '("invalid-data" "G_IO_ERROR_INVALID_DATA")
+ )
+)
+
+(define-flags AskPasswordFlags
+ (in-module "gio")
+ (c-name "GAskPasswordFlags")
+ (gtype-id "G_TYPE_ASK_PASSWORD_FLAGS")
+ (values
+ '("need-password" "G_ASK_PASSWORD_NEED_PASSWORD")
+ '("need-username" "G_ASK_PASSWORD_NEED_USERNAME")
+ '("need-domain" "G_ASK_PASSWORD_NEED_DOMAIN")
+ '("saving-supported" "G_ASK_PASSWORD_SAVING_SUPPORTED")
+ '("anonymous-supported" "G_ASK_PASSWORD_ANONYMOUS_SUPPORTED")
+ )
+)
+
+(define-enum PasswordSave
+ (in-module "gio")
+ (c-name "GPasswordSave")
+ (gtype-id "G_TYPE_PASSWORD_SAVE")
+ (values
+ '("never" "G_PASSWORD_SAVE_NEVER")
+ '("for-session" "G_PASSWORD_SAVE_FOR_SESSION")
+ '("permanently" "G_PASSWORD_SAVE_PERMANENTLY")
+ )
+)
+
+(define-enum MountOperationResult
+ (in-module "gio")
+ (c-name "GMountOperationResult")
+ (gtype-id "G_TYPE_MOUNT_OPERATION_RESULT")
+ (values
+ '("handled" "G_MOUNT_OPERATION_HANDLED")
+ '("aborted" "G_MOUNT_OPERATION_ABORTED")
+ '("unhandled" "G_MOUNT_OPERATION_UNHANDLED")
+ )
+)
+
+(define-flags OutputStreamSpliceFlags
+ (in-module "gio")
+ (c-name "GOutputStreamSpliceFlags")
+ (gtype-id "G_TYPE_OUTPUT_STREAM_SPLICE_FLAGS")
+ (values
+ '("none" "G_OUTPUT_STREAM_SPLICE_NONE")
+ '("close-source" "G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE")
+ '("close-target" "G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET")
+ )
+)
+
+(define-enum EmblemOrigin
+ (in-module "gio")
+ (c-name "GEmblemOrigin")
+ (gtype-id "G_TYPE_EMBLEM_ORIGIN")
+ (values
+ '("unknown" "G_EMBLEM_ORIGIN_UNKNOWN")
+ '("device" "G_EMBLEM_ORIGIN_DEVICE")
+ '("livemetadata" "G_EMBLEM_ORIGIN_LIVEMETADATA")
+ '("tag" "G_EMBLEM_ORIGIN_TAG")
+ )
+)
+
+(define-enum ResolverError
+ (in-module "gio")
+ (c-name "GResolverError")
+ (gtype-id "G_TYPE_RESOLVER_ERROR")
+ (values
+ '("not-found" "G_RESOLVER_ERROR_NOT_FOUND")
+ '("temporary-failure" "G_RESOLVER_ERROR_TEMPORARY_FAILURE")
+ '("internal" "G_RESOLVER_ERROR_INTERNAL")
+ )
+)
+
+(define-enum SocketFamily
+ (in-module "gio")
+ (c-name "GSocketFamily")
+ (gtype-id "G_TYPE_SOCKET_FAMILY")
+ (values
+ '("invalid" "G_SOCKET_FAMILY_INVALID")
+ '("unix" "G_SOCKET_FAMILY_UNIX")
+ '("ipv4" "G_SOCKET_FAMILY_IPV4")
+ '("ipv6" "G_SOCKET_FAMILY_IPV6")
+ )
+)
+
+(define-enum SocketType
+ (in-module "gio")
+ (c-name "GSocketType")
+ (gtype-id "G_TYPE_SOCKET_TYPE")
+ (values
+ '("invalid" "G_SOCKET_TYPE_INVALID")
+ '("stream" "G_SOCKET_TYPE_STREAM")
+ '("datagram" "G_SOCKET_TYPE_DATAGRAM")
+ '("seqpacket" "G_SOCKET_TYPE_SEQPACKET")
+ )
+)
+
+(define-enum SocketMsgFlags
+ (in-module "gio")
+ (c-name "GSocketMsgFlags")
+ (gtype-id "G_TYPE_SOCKET_MSG_FLAGS")
+ (values
+ '("none" "G_SOCKET_MSG_NONE")
+ '("oob" "G_SOCKET_MSG_OOB")
+ '("peek" "G_SOCKET_MSG_PEEK")
+ '("dontroute" "G_SOCKET_MSG_DONTROUTE")
+ )
+)
+
+(define-enum SocketProtocol
+ (in-module "gio")
+ (c-name "GSocketProtocol")
+ (gtype-id "G_TYPE_SOCKET_PROTOCOL")
+ (values
+ '("unknown" "G_SOCKET_PROTOCOL_UNKNOWN")
+ '("default" "G_SOCKET_PROTOCOL_DEFAULT")
+ '("tcp" "G_SOCKET_PROTOCOL_TCP")
+ '("udp" "G_SOCKET_PROTOCOL_UDP")
+ '("sctp" "G_SOCKET_PROTOCOL_SCTP")
+ )
+)
+
+(define-enum ZlibCompressorFormat
+ (in-module "gio")
+ (c-name "GZlibCompressorFormat")
+ (gtype-id "G_TYPE_ZLIB_COMPRESSOR_FORMAT")
+ (values
+ '("zlib" "G_ZLIB_COMPRESSOR_FORMAT_ZLIB")
+ '("gzip" "G_ZLIB_COMPRESSOR_FORMAT_GZIP")
+ '("raw" "G_ZLIB_COMPRESSOR_FORMAT_RAW")
+ )
+)
diff --git a/gio/gio.defs b/gio/gio.defs
new file mode 100644
index 0000000..f5a28b6
--- /dev/null
+++ b/gio/gio.defs
@@ -0,0 +1,7465 @@
+;; -*- scheme -*-
+
+(include "gio-types.defs")
+
+;; From gappinfo.h
+
+(define-function app_info_get_type
+ (c-name "g_app_info_get_type")
+ (return-type "GType")
+)
+
+(define-function app_launch_context_get_type
+ (c-name "g_app_launch_context_get_type")
+ (return-type "GType")
+)
+
+(define-function app_info_create_from_commandline
+ (c-name "g_app_info_create_from_commandline")
+ (is-constructor-of "GAppInfo")
+ (return-type "GAppInfo*")
+ (parameters
+ '("const-char*" "commandline")
+ '("const-char*" "application_name" (null-ok) (default "NULL"))
+ '("GAppInfoCreateFlags" "flags" (default "G_APP_INFO_CREATE_NONE"))
+ '("GError**" "error")
+ )
+)
+
+(define-method dup
+ (of-object "GAppInfo")
+ (c-name "g_app_info_dup")
+ (return-type "GAppInfo*")
+ (caller-owns-return #t)
+)
+
+(define-method equal
+ (of-object "GAppInfo")
+ (c-name "g_app_info_equal")
+ (return-type "gboolean")
+ (parameters
+ '("GAppInfo*" "appinfo2")
+ )
+)
+
+(define-method get_id
+ (of-object "GAppInfo")
+ (c-name "g_app_info_get_id")
+ (return-type "const-char*")
+)
+
+(define-method get_name
+ (of-object "GAppInfo")
+ (c-name "g_app_info_get_name")
+ (return-type "const-char*")
+)
+
+(define-method get_description
+ (of-object "GAppInfo")
+ (c-name "g_app_info_get_description")
+ (return-type "const-char*")
+)
+
+(define-method get_executable
+ (of-object "GAppInfo")
+ (c-name "g_app_info_get_executable")
+ (return-type "const-char*")
+)
+
+(define-method get_icon
+ (of-object "GAppInfo")
+ (c-name "g_app_info_get_icon")
+ (return-type "GIcon*")
+)
+
+;;
+;; wrapped in gappinfo.override
+;;
+(define-method launch
+ (docstring
+ "launch (files=None, launch_context=None) -> gboolean\n"
+ "\n"
+ "Launches the application. Passes files to the launched application\n"
+ "as arguments, using the optional launch_context to get information\n"
+ "about the details of the launcher (like what screen it is on).\n"
+ "On error, error will be set accordingly.\n\n"
+ "Note that even if the launch is successful the application launched\n"
+ "can fail to start if it runs into problems during startup.\n"
+ "There is no way to detect this.\n\n"
+ "Some URIs can be changed when passed through a gio.File\n"
+ "(for instance unsupported uris with strange formats like mailto:),\n"
+ "so if you have a textual uri you want to pass in as argument,\n"
+ "consider using gio.AppInfo.launch_uris() instead."
+ )
+ (of-object "GAppInfo")
+ (c-name "g_app_info_launch")
+ (return-type "gboolean")
+ (parameters
+ '("GList*" "files")
+ '("GAppLaunchContext*" "launch_context")
+ '("GError**" "error")
+ )
+)
+
+(define-method supports_uris
+ (of-object "GAppInfo")
+ (c-name "g_app_info_supports_uris")
+ (return-type "gboolean")
+)
+
+(define-method supports_files
+ (of-object "GAppInfo")
+ (c-name "g_app_info_supports_files")
+ (return-type "gboolean")
+)
+
+;;
+;; wrapped in gappinfo.override
+;;
+(define-method launch_uris
+ (docstring
+ "launch_uris (files=None, launch_context=None) -> gboolean\n"
+ "\n"
+ "Launches the application. Passes files to the launched application\n"
+ "as arguments, using the optional launch_context to get information\n"
+ "about the details of the launcher (like what screen it is on).\n"
+ "On error, error will be set accordingly.\n\n"
+ "Note that even if the launch is successful the application launched\n"
+ "can fail to start if it runs into problems during startup.\n"
+ "There is no way to detect this.\n\n"
+ )
+ (of-object "GAppInfo")
+ (c-name "g_app_info_launch_uris")
+ (return-type "gboolean")
+ (parameters
+ '("GList*" "uris")
+ '("GAppLaunchContext*" "launch_context")
+ '("GError**" "error")
+ )
+)
+
+(define-method should_show
+ (of-object "GAppInfo")
+ (c-name "g_app_info_should_show")
+ (return-type "gboolean")
+)
+
+(define-method set_as_default_for_type
+ (of-object "GAppInfo")
+ (c-name "g_app_info_set_as_default_for_type")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "content_type")
+ '("GError**" "error")
+ )
+)
+
+(define-method set_as_default_for_extension
+ (of-object "GAppInfo")
+ (c-name "g_app_info_set_as_default_for_extension")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "extension")
+ '("GError**" "error")
+ )
+)
+
+(define-method add_supports_type
+ (of-object "GAppInfo")
+ (c-name "g_app_info_add_supports_type")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "content_type")
+ '("GError**" "error")
+ )
+)
+
+(define-method can_remove_supports_type
+ (of-object "GAppInfo")
+ (c-name "g_app_info_can_remove_supports_type")
+ (return-type "gboolean")
+)
+
+(define-method remove_supports_type
+ (of-object "GAppInfo")
+ (c-name "g_app_info_remove_supports_type")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "content_type")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-function app_info_get_all
+ (c-name "g_app_info_get_all")
+ (return-type "GList*")
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-function app_info_get_all_for_type
+ (c-name "g_app_info_get_all_for_type")
+ (return-type "GList*")
+ (parameters
+ '("const-char*" "content_type")
+ )
+)
+
+(define-function app_info_get_default_for_type
+ (c-name "g_app_info_get_default_for_type")
+ (return-type "GAppInfo*")
+ (parameters
+ '("const-char*" "content_type")
+ '("gboolean" "must_support_uris")
+ )
+)
+
+(define-function app_info_get_default_for_uri_scheme
+ (c-name "g_app_info_get_default_for_uri_scheme")
+ (return-type "GAppInfo*")
+ (parameters
+ '("const-char*" "uri_scheme")
+ )
+)
+
+(define-function app_launch_context_new
+ (c-name "g_app_launch_context_new")
+ (is-constructor-of "GAppLaunchContext")
+ (return-type "GAppLaunchContext*")
+)
+
+;;
+;; wrapped in gapplaunchcontext.override
+;;
+(define-method get_display
+ (of-object "GAppLaunchContext")
+ (c-name "g_app_launch_context_get_display")
+ (return-type "char*")
+ (parameters
+ '("GAppInfo*" "info")
+ '("GList*" "files")
+ )
+)
+
+;;
+;; wrapped in gapplaunchcontext.override
+;;
+(define-method get_startup_notify_id
+ (of-object "GAppLaunchContext")
+ (c-name "g_app_launch_context_get_startup_notify_id")
+ (return-type "char*")
+ (parameters
+ '("GAppInfo*" "info")
+ '("GList*" "files")
+ )
+)
+
+(define-method launch_failed
+ (of-object "GAppLaunchContext")
+ (c-name "g_app_launch_context_launch_failed")
+ (return-type "none")
+ (parameters
+ '("const-char*" "startup_notify_id")
+ )
+)
+
+(define-function app_info_reset_type_associations
+ (c-name "g_app_info_reset_type_associations")
+ (return-type "none")
+ (parameters
+ '("const-char*" "content_type")
+ )
+)
+
+(define-method can_delete
+ (of-object "GAppInfo")
+ (c-name "g_app_info_can_delete")
+ (return-type "gboolean")
+)
+
+(define-method delete
+ (of-object "GAppInfo")
+ (c-name "g_app_info_delete")
+ (return-type "gboolean")
+)
+
+(define-method get_commandline
+ (of-object "GAppInfo")
+ (c-name "g_app_info_get_commandline")
+ (return-type "const-char*")
+)
+
+
+
+;; From gasyncinitable.h
+
+(define-function async_initable_get_type
+ (c-name "g_async_initable_get_type")
+ (return-type "GType")
+)
+
+(define-method init_async
+ (of-object "GAsyncInitable")
+ (c-name "g_async_initable_init_async")
+ (return-type "none")
+ (parameters
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method init_finish
+ (of-object "GAsyncInitable")
+ (c-name "g_async_initable_init_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-function async_initable_new_async
+ (c-name "g_async_initable_new_async")
+ (return-type "none")
+ (parameters
+ '("GType" "object_type")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ '("const-gchar*" "first_property_name")
+ )
+ (varargs #t)
+)
+
+(define-function async_initable_newv_async
+ (c-name "g_async_initable_newv_async")
+ (return-type "none")
+ (parameters
+ '("GType" "object_type")
+ '("guint" "n_parameters")
+ '("GParameter*" "parameters")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-function async_initable_new_valist_async
+ (c-name "g_async_initable_new_valist_async")
+ (return-type "none")
+ (parameters
+ '("GType" "object_type")
+ '("const-gchar*" "first_property_name")
+ '("va_list" "var_args")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method new_finish
+ (of-object "GAsyncInitable")
+ (c-name "g_async_initable_new_finish")
+ (return-type "GObject*")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gasyncresult.h
+
+(define-function async_result_get_type
+ (c-name "g_async_result_get_type")
+ (return-type "GType")
+)
+
+(define-method get_user_data
+ (of-object "GAsyncResult")
+ (c-name "g_async_result_get_user_data")
+ (return-type "gpointer")
+)
+
+(define-method get_source_object
+ (of-object "GAsyncResult")
+ (c-name "g_async_result_get_source_object")
+ (return-type "GObject*")
+)
+
+
+
+;; From gbufferedinputstream.h
+
+(define-function buffered_input_stream_get_type
+ (c-name "g_buffered_input_stream_get_type")
+ (return-type "GType")
+)
+
+(define-function buffered_input_stream_new
+ (c-name "g_buffered_input_stream_new")
+ (is-constructor-of "GBufferedInputStream")
+ (return-type "GInputStream*")
+ (properties
+ '("base_stream")
+ )
+)
+
+(define-function buffered_input_stream_new_sized
+ (c-name "g_buffered_input_stream_new_sized")
+ (return-type "GInputStream*")
+ (parameters
+ '("GInputStream*" "base_stream")
+ '("gsize" "size")
+ )
+)
+
+(define-method get_buffer_size
+ (of-object "GBufferedInputStream")
+ (c-name "g_buffered_input_stream_get_buffer_size")
+ (return-type "gsize")
+)
+
+(define-method set_buffer_size
+ (of-object "GBufferedInputStream")
+ (c-name "g_buffered_input_stream_set_buffer_size")
+ (return-type "none")
+ (parameters
+ '("gsize" "size")
+ )
+)
+
+(define-method get_available
+ (of-object "GBufferedInputStream")
+ (c-name "g_buffered_input_stream_get_available")
+ (return-type "gsize")
+)
+
+(define-method peek
+ (of-object "GBufferedInputStream")
+ (c-name "g_buffered_input_stream_peek")
+ (return-type "gsize")
+ (parameters
+ '("void*" "buffer")
+ '("gsize" "offset")
+ '("gsize" "count")
+ )
+)
+
+(define-method peek_buffer
+ (of-object "GBufferedInputStream")
+ (c-name "g_buffered_input_stream_peek_buffer")
+ (return-type "const-void*")
+ (parameters
+ '("gsize*" "count")
+ )
+)
+
+(define-method fill
+ (of-object "GBufferedInputStream")
+ (c-name "g_buffered_input_stream_fill")
+ (return-type "gssize")
+ (unblock-threads #t)
+ (parameters
+ '("gssize" "count")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method fill_async
+ (of-object "GBufferedInputStream")
+ (c-name "g_buffered_input_stream_fill_async")
+ (return-type "none")
+ (parameters
+ '("gssize" "count")
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method fill_finish
+ (of-object "GBufferedInputStream")
+ (c-name "g_buffered_input_stream_fill_finish")
+ (return-type "gssize")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method read_byte
+ (of-object "GBufferedInputStream")
+ (c-name "g_buffered_input_stream_read_byte")
+ (return-type "int")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gbufferedoutputstream.h
+
+(define-function buffered_output_stream_get_type
+ (c-name "g_buffered_output_stream_get_type")
+ (return-type "GType")
+)
+
+(define-function buffered_output_stream_new
+ (c-name "g_buffered_output_stream_new")
+ (is-constructor-of "GBufferedOutputStream")
+ (return-type "GOutputStream*")
+ (properties
+ '("base_stream")
+ )
+)
+
+(define-function buffered_output_stream_new_sized
+ (c-name "g_buffered_output_stream_new_sized")
+ (return-type "GOutputStream*")
+ (parameters
+ '("GOutputStream*" "base_stream")
+ '("guint" "size")
+ )
+)
+
+(define-method get_buffer_size
+ (of-object "GBufferedOutputStream")
+ (c-name "g_buffered_output_stream_get_buffer_size")
+ (return-type "gsize")
+)
+
+(define-method set_buffer_size
+ (of-object "GBufferedOutputStream")
+ (c-name "g_buffered_output_stream_set_buffer_size")
+ (return-type "none")
+ (parameters
+ '("gsize" "size")
+ )
+)
+
+(define-method get_auto_grow
+ (of-object "GBufferedOutputStream")
+ (c-name "g_buffered_output_stream_get_auto_grow")
+ (return-type "gboolean")
+)
+
+(define-method set_auto_grow
+ (of-object "GBufferedOutputStream")
+ (c-name "g_buffered_output_stream_set_auto_grow")
+ (return-type "none")
+ (parameters
+ '("gboolean" "auto_grow")
+ )
+)
+
+
+
+;; From gcancellable.h
+
+(define-function cancellable_get_type
+ (c-name "g_cancellable_get_type")
+ (return-type "GType")
+)
+
+(define-function cancellable_new
+ (c-name "g_cancellable_new")
+ (is-constructor-of "GCancellable")
+ (return-type "GCancellable*")
+)
+
+(define-method is_cancelled
+ (of-object "GCancellable")
+ (c-name "g_cancellable_is_cancelled")
+ (return-type "gboolean")
+)
+
+(define-method set_error_if_cancelled
+ (of-object "GCancellable")
+ (c-name "g_cancellable_set_error_if_cancelled")
+ (return-type "gboolean")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method get_fd
+ (of-object "GCancellable")
+ (c-name "g_cancellable_get_fd")
+ (return-type "int")
+)
+
+(define-method make_pollfd
+ (of-object "GCancellable")
+ (c-name "g_cancellable_make_pollfd")
+ (return-type "none")
+ (parameters
+ '("GPollFD*" "pollfd")
+ )
+)
+
+(define-function cancellable_get_current
+ (c-name "g_cancellable_get_current")
+ (return-type "GCancellable*")
+)
+
+(define-method push_current
+ (of-object "GCancellable")
+ (c-name "g_cancellable_push_current")
+ (return-type "none")
+)
+
+(define-method pop_current
+ (of-object "GCancellable")
+ (c-name "g_cancellable_pop_current")
+ (return-type "none")
+)
+
+(define-method reset
+ (of-object "GCancellable")
+ (c-name "g_cancellable_reset")
+ (return-type "none")
+)
+
+(define-method cancel
+ (of-object "GCancellable")
+ (c-name "g_cancellable_cancel")
+ (return-type "none")
+)
+
+(define-method connect
+ (of-object "GCancellable")
+ (c-name "g_cancellable_connect")
+ (return-type "gulong")
+ (parameters
+ '("GCallback" "callback")
+ '("gpointer" "data")
+ '("GDestroyNotify" "data_destroy_func")
+ )
+)
+
+(define-method disconnect
+ (of-object "GCancellable")
+ (c-name "g_cancellable_disconnect")
+ (return-type "none")
+ (parameters
+ '("gulong" "handler_id")
+ )
+)
+
+(define-method release_fd
+ (of-object "GCancellable")
+ (c-name "g_cancellable_release_fd")
+ (return-type "none")
+)
+
+
+
+;; From gcontenttype.h
+
+(define-function content_type_equals
+ (c-name "g_content_type_equals")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "type1")
+ '("const-char*" "type2")
+ )
+)
+
+(define-function content_type_is_a
+ (c-name "g_content_type_is_a")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "type")
+ '("const-char*" "supertype")
+ )
+)
+
+(define-function content_type_is_unknown
+ (c-name "g_content_type_is_unknown")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "type")
+ )
+)
+
+(define-function content_type_get_description
+ (c-name "g_content_type_get_description")
+ (return-type "char*")
+ (parameters
+ '("const-char*" "type")
+ )
+)
+
+(define-function content_type_get_mime_type
+ (c-name "g_content_type_get_mime_type")
+ (return-type "char*")
+ (parameters
+ '("const-char*" "type")
+ )
+)
+
+(define-function content_type_get_icon
+ (c-name "g_content_type_get_icon")
+ (return-type "GIcon*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "type")
+ )
+)
+
+(define-function content_type_can_be_executable
+ (c-name "g_content_type_can_be_executable")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "type")
+ )
+)
+
+(define-function content_type_from_mime_type
+ (c-name "g_content_type_from_mime_type")
+ (return-type "char*")
+ (parameters
+ '("const-char*" "mime_type")
+ )
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-function content_type_guess
+ (docstring
+"content_type_guess([filename, data, want_uncertain]) -> mime type\n"
+"\n"
+"Guesses the content type based on the parameters passed.\n"
+"Either filename or data must be specified\n"
+"Returns a string containing the mime type.\n"
+"If want_uncertain is set to True, return a tuple with the mime type and \n"
+"True/False if the type guess was uncertain or not.")
+ (c-name "g_content_type_guess")
+ (return-type "char*")
+ (parameters
+ '("const-char*" "filename")
+ '("const-guchar*" "data")
+ '("gsize" "data_size")
+ '("gboolean*" "result_uncertain")
+ )
+)
+
+(define-function content_type_guess_for_tree
+ (c-name "g_content_type_guess_for_tree")
+ (return-type "char**")
+ (parameters
+ '("GFile*" "root")
+ )
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-function content_types_get_registered
+ (c-name "g_content_types_get_registered")
+ (return-type "GList*")
+)
+
+
+
+;; From gdatainputstream.h
+
+(define-function data_input_stream_get_type
+ (c-name "g_data_input_stream_get_type")
+ (return-type "GType")
+)
+
+(define-function data_input_stream_new
+ (c-name "g_data_input_stream_new")
+ (is-constructor-of "GDataInputStream")
+ (return-type "GDataInputStream*")
+ (properties
+ '("base_stream")
+ )
+)
+
+(define-method set_byte_order
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_set_byte_order")
+ (return-type "none")
+ (parameters
+ '("GDataStreamByteOrder" "order")
+ )
+)
+
+(define-method get_byte_order
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_get_byte_order")
+ (return-type "GDataStreamByteOrder")
+)
+
+(define-method set_newline_type
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_set_newline_type")
+ (return-type "none")
+ (parameters
+ '("GDataStreamNewlineType" "type")
+ )
+)
+
+(define-method get_newline_type
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_get_newline_type")
+ (return-type "GDataStreamNewlineType")
+)
+
+(define-method read_byte
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_byte")
+ (return-type "guchar")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method read_int16
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_int16")
+ (return-type "gint16")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method read_uint16
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_uint16")
+ (return-type "guint16")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method read_int32
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_int32")
+ (return-type "gint32")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method read_uint32
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_uint32")
+ (return-type "guint32")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method read_int64
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_int64")
+ (return-type "gint64")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method read_uint64
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_uint64")
+ (return-type "guint64")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gdatainputstream.override
+;;
+(define-method read_line
+ (of-object "GDataInputStream")
+ (docstring
+ "S.read_line([cancellable]) -> str\n"
+ "Read a line from the stream. Return value includes ending newline\n"
+ "character.")
+ (c-name "g_data_input_stream_read_line")
+ (return-type "char*")
+ (parameters
+ '("gsize*" "length")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gdatainputstream.override
+;;
+(define-method read_until
+ (of-object "GDataInputStream")
+ (docstring
+ "S.read_until(stop_chars, [cancellable]) -> str\n"
+ "Read characters from the string, stopping at the end or upon reading\n"
+ "any character in stop_chars. Return value does not include the stopping\n"
+ "character.")
+ (c-name "g_data_input_stream_read_until")
+ (return-type "char*")
+ (parameters
+ '("const-gchar*" "stop_chars")
+ '("gsize*" "length")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method read_until_async
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_until_async")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "stop_chars")
+ '("gint" "io_priority")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method read_until_finish
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_until_finish")
+ (return-type "char*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("gsize*" "length")
+ '("GError**" "error")
+ )
+)
+
+(define-method read_line_async
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_line_async")
+ (return-type "none")
+ (parameters
+ '("gint" "io_priority")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method read_line_finish
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_line_finish")
+ (return-type "char*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("gsize*" "length")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gdataoutputstream.h
+
+(define-function data_output_stream_get_type
+ (c-name "g_data_output_stream_get_type")
+ (return-type "GType")
+)
+
+(define-function data_output_stream_new
+ (c-name "g_data_output_stream_new")
+ (is-constructor-of "GDataOutputStream")
+ (return-type "GDataOutputStream*")
+ (properties
+ '("base_stream")
+ )
+)
+
+(define-method set_byte_order
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_set_byte_order")
+ (return-type "none")
+ (parameters
+ '("GDataStreamByteOrder" "order")
+ )
+)
+
+(define-method get_byte_order
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_get_byte_order")
+ (return-type "GDataStreamByteOrder")
+)
+
+(define-method put_byte
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_put_byte")
+ (return-type "gboolean")
+ (parameters
+ '("guchar" "data")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method put_int16
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_put_int16")
+ (return-type "gboolean")
+ (parameters
+ '("gint16" "data")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method put_uint16
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_put_uint16")
+ (return-type "gboolean")
+ (parameters
+ '("guint16" "data")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method put_int32
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_put_int32")
+ (return-type "gboolean")
+ (parameters
+ '("gint32" "data")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method put_uint32
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_put_uint32")
+ (return-type "gboolean")
+ (parameters
+ '("guint32" "data")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method put_int64
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_put_int64")
+ (return-type "gboolean")
+ (parameters
+ '("gint64" "data")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method put_uint64
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_put_uint64")
+ (return-type "gboolean")
+ (parameters
+ '("guint64" "data")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method put_string
+ (of-object "GDataOutputStream")
+ (c-name "g_data_output_stream_put_string")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "str")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+
+
+
+
+
+;; From gdrive.h
+
+(define-function drive_get_type
+ (c-name "g_drive_get_type")
+ (return-type "GType")
+)
+
+(define-method get_name
+ (of-object "GDrive")
+ (c-name "g_drive_get_name")
+ (return-type "char*")
+)
+
+(define-method get_icon
+ (of-object "GDrive")
+ (c-name "g_drive_get_icon")
+ (return-type "GIcon*")
+ (caller-owns-return #t)
+)
+
+(define-method has_volumes
+ (of-object "GDrive")
+ (c-name "g_drive_has_volumes")
+ (return-type "gboolean")
+)
+
+;;
+;; wrapped in gdrive.override
+;;
+(define-method get_volumes
+ (of-object "GDrive")
+ (c-name "g_drive_get_volumes")
+ (return-type "GList*")
+)
+
+(define-method is_media_removable
+ (of-object "GDrive")
+ (c-name "g_drive_is_media_removable")
+ (return-type "gboolean")
+)
+
+(define-method has_media
+ (of-object "GDrive")
+ (c-name "g_drive_has_media")
+ (return-type "gboolean")
+)
+
+(define-method is_media_check_automatic
+ (of-object "GDrive")
+ (c-name "g_drive_is_media_check_automatic")
+ (return-type "gboolean")
+)
+
+(define-method can_poll_for_media
+ (of-object "GDrive")
+ (c-name "g_drive_can_poll_for_media")
+ (return-type "gboolean")
+)
+
+(define-method can_eject
+ (of-object "GDrive")
+ (c-name "g_drive_can_eject")
+ (return-type "gboolean")
+)
+
+;;
+;; wrapped in gdrive.override
+;;
+(define-method eject
+ (of-object "GDrive")
+ (c-name "g_drive_eject")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method eject_finish
+ (of-object "GDrive")
+ (c-name "g_drive_eject_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gdrive.override
+;;
+(define-method poll_for_media
+ (of-object "GDrive")
+ (c-name "g_drive_poll_for_media")
+ (return-type "none")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method poll_for_media_finish
+ (of-object "GDrive")
+ (c-name "g_drive_poll_for_media_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method get_identifier
+ (of-object "GDrive")
+ (c-name "g_drive_get_identifier")
+ (return-type "char*")
+ (parameters
+ '("const-char*" "kind")
+ )
+)
+
+;;
+;; wrapped in gdrive.override
+;;
+(define-method enumerate_identifiers
+ (of-object "GDrive")
+ (c-name "g_drive_enumerate_identifiers")
+ (return-type "char**")
+)
+
+(define-method can_start
+ (of-object "GDrive")
+ (c-name "g_drive_can_start")
+ (return-type "gboolean")
+)
+
+(define-method can_start_degraded
+ (of-object "GDrive")
+ (c-name "g_drive_can_start_degraded")
+ (return-type "gboolean")
+)
+
+(define-method can_stop
+ (of-object "GDrive")
+ (c-name "g_drive_can_stop")
+ (return-type "gboolean")
+)
+
+(define-method eject_with_operation
+ (of-object "GDrive")
+ (c-name "g_drive_eject_with_operation")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method eject_with_operation_finish
+ (of-object "GDrive")
+ (c-name "g_drive_eject_with_operation_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method get_start_stop_type
+ (of-object "GDrive")
+ (c-name "g_drive_get_start_stop_type")
+ (return-type "GDriveStartStopType")
+)
+
+(define-method start
+ (of-object "GDrive")
+ (c-name "g_drive_start")
+ (return-type "none")
+ (parameters
+ '("GDriveStartFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method start_finish
+ (of-object "GDrive")
+ (c-name "g_drive_start_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method stop
+ (of-object "GDrive")
+ (c-name "g_drive_stop")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method stop_finish
+ (of-object "GDrive")
+ (c-name "g_drive_stop_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gemblemedicon.h
+
+(define-function emblemed_icon_get_type
+ (c-name "g_emblemed_icon_get_type")
+ (return-type "GType")
+)
+
+(define-function emblemed_icon_new
+ (c-name "g_emblemed_icon_new")
+ (is-constructor-of "GEmblemedIcon")
+ (return-type "GIcon*")
+ (parameters
+ '("GIcon*" "icon")
+ '("GEmblem*" "emblem")
+ )
+)
+
+(define-method get_icon
+ (of-object "GEmblemedIcon")
+ (c-name "g_emblemed_icon_get_icon")
+ (return-type "GIcon*")
+)
+
+(define-method get_emblems
+ (of-object "GEmblemedIcon")
+ (c-name "g_emblemed_icon_get_emblems")
+ (return-type "GList*")
+)
+
+(define-method add_emblem
+ (of-object "GEmblemedIcon")
+ (c-name "g_emblemed_icon_add_emblem")
+ (return-type "none")
+ (parameters
+ '("GEmblem*" "emblem")
+ )
+)
+
+
+
+;; From gemblem.h
+
+(define-function emblem_get_type
+ (c-name "g_emblem_get_type")
+ (return-type "GType")
+)
+
+(define-function emblem_new
+ (c-name "g_emblem_new")
+ (is-constructor-of "GEmblem")
+ (return-type "GEmblem*")
+ (properties
+ '("icon")
+ '("origin" (optional))
+ )
+)
+
+(define-function emblem_new_with_origin
+ (c-name "g_emblem_new_with_origin")
+ (return-type "GEmblem*")
+ (parameters
+ '("GIcon*" "icon")
+ '("GEmblemOrigin" "origin")
+ )
+)
+
+(define-method get_icon
+ (of-object "GEmblem")
+ (c-name "g_emblem_get_icon")
+ (return-type "GIcon*")
+)
+
+(define-method get_origin
+ (of-object "GEmblem")
+ (c-name "g_emblem_get_origin")
+ (return-type "GEmblemOrigin")
+)
+
+
+
+;; From gfileattribute.h
+
+(define-function file_attribute_info_list_new
+ (c-name "g_file_attribute_info_list_new")
+ (is-constructor-of "GFileAttributeInfoList")
+ (return-type "GFileAttributeInfoList*")
+)
+
+(define-method ref
+ (of-object "GFileAttributeInfoList")
+ (c-name "g_file_attribute_info_list_ref")
+ (return-type "GFileAttributeInfoList*")
+)
+
+(define-method unref
+ (of-object "GFileAttributeInfoList")
+ (c-name "g_file_attribute_info_list_unref")
+ (return-type "none")
+)
+
+(define-method dup
+ (of-object "GFileAttributeInfoList")
+ (c-name "g_file_attribute_info_list_dup")
+ (return-type "GFileAttributeInfoList*")
+)
+
+(define-method lookup
+ (of-object "GFileAttributeInfoList")
+ (c-name "g_file_attribute_info_list_lookup")
+ (return-type "const-GFileAttributeInfo*")
+ (parameters
+ '("const-char*" "name")
+ )
+)
+
+(define-method add
+ (of-object "GFileAttributeInfoList")
+ (c-name "g_file_attribute_info_list_add")
+ (return-type "none")
+ (parameters
+ '("const-char*" "name")
+ '("GFileAttributeType" "type")
+ '("GFileAttributeInfoFlags" "flags" (default "G_FILE_ATTRIBUTE_INFO_NONE"))
+ )
+)
+
+
+
+;; From gfileenumerator.h
+
+(define-function file_enumerator_get_type
+ (c-name "g_file_enumerator_get_type")
+ (return-type "GType")
+)
+
+(define-method next_file
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_next_file")
+ (return-type "GFileInfo*")
+ (caller-owns-return #t)
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method close
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_close")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfileenumerator.override
+;;
+(define-method next_files_async
+ (docstring
+"FE.next_files_async(num_files, callback, [io_priority, cancellable,\n"
+" user_data])\n"
+"Request information for a number of files from the enumerator\n"
+"asynchronously. When all i/o for the operation is finished the callback\n"
+"will be called with the requested information.\n"
+"\n"
+"The callback can be called with less than num_files files in case of error\n"
+"or at the end of the enumerator. In case of a partial error the callback\n"
+"will be called with any succeeding items and no error, and on the next\n"
+"request the error will be reported. If a request is cancelled the callback\n"
+"will be called with gio.ERROR_CANCELLED.\n"
+"\n"
+"During an async request no other sync and async calls are allowed, and will\n"
+"result in gio.ERROR_PENDING errors.\n"
+"\n"
+"Any outstanding i/o request with higher priority (lower numerical value)\n"
+"will be executed before an outstanding request with lower priority.\n"
+"Default priority is gobject.PRIORITY_DEFAULT.")
+
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_next_files_async")
+ (return-type "none")
+ (parameters
+ '("int" "num_files")
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+;;
+;; wrapped in gfileenumerator.override
+;;
+(define-method next_files_finish
+ (docstring
+"FE.next_files_finish(result) -> a list of gio.FileInfos\n"
+"Finishes the asynchronous operation started with\n"
+"gio.FileEnumerator.next_files_async().")
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_next_files_finish")
+ (return-type "GList*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfileenumerator.override
+;;
+(define-method close_async
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_close_async")
+ (return-type "none")
+ (parameters
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method close_finish
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_close_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method is_closed
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_is_closed")
+ (return-type "gboolean")
+)
+
+(define-method has_pending
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_has_pending")
+ (return-type "gboolean")
+)
+
+(define-method set_pending
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_set_pending")
+ (return-type "none")
+ (parameters
+ '("gboolean" "pending")
+ )
+)
+
+(define-method get_container
+ (of-object "GFileEnumerator")
+ (c-name "g_file_enumerator_get_container")
+ (return-type "GFile*")
+)
+
+
+
+;; From gfile.h
+
+(define-function file_get_type
+ (c-name "g_file_get_type")
+ (return-type "GType")
+)
+
+(define-function file_new_for_path
+ (c-name "g_file_new_for_path")
+ (is-constructor-of "GFile")
+ (return-type "GFile*")
+ (parameters
+ '("const-char*" "path")
+ )
+)
+
+(define-function file_new_for_uri
+ (c-name "g_file_new_for_uri")
+ (is-constructor-of "GFile")
+ (return-type "GFile*")
+ (parameters
+ '("const-char*" "uri")
+ )
+)
+
+(define-function file_new_for_commandline_arg
+ (is-constructor-of "GFile")
+ (c-name "g_file_new_for_commandline_arg")
+ (return-type "GFile*")
+ (parameters
+ '("const-char*" "arg")
+ )
+)
+
+(define-function file_parse_name
+ (c-name "g_file_parse_name")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "parse_name")
+ )
+)
+
+(define-method dup
+ (of-object "GFile")
+ (c-name "g_file_dup")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+)
+
+(define-function file_hash
+ (c-name "g_file_hash")
+ (return-type "guint")
+ (parameters
+ '("gconstpointer" "file")
+ )
+)
+
+(define-method equal
+ (of-object "GFile")
+ (c-name "g_file_equal")
+ (return-type "gboolean")
+ (parameters
+ '("GFile*" "file2")
+ )
+)
+
+(define-method get_basename
+ (of-object "GFile")
+ (c-name "g_file_get_basename")
+ (return-type "char*")
+)
+
+(define-method get_path
+ (of-object "GFile")
+ (c-name "g_file_get_path")
+ (return-type "char*")
+)
+
+(define-method get_uri
+ (of-object "GFile")
+ (c-name "g_file_get_uri")
+ (return-type "char*")
+)
+
+(define-method get_parse_name
+ (of-object "GFile")
+ (c-name "g_file_get_parse_name")
+ (return-type "char*")
+)
+
+(define-method get_parent
+ (of-object "GFile")
+ (c-name "g_file_get_parent")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+)
+
+(define-method get_child
+ (of-object "GFile")
+ (c-name "g_file_get_child")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "name")
+ )
+)
+
+(define-method get_child_for_display_name
+ (of-object "GFile")
+ (c-name "g_file_get_child_for_display_name")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "display_name")
+ '("GError**" "error")
+ )
+)
+
+(define-method has_prefix
+ (of-object "GFile")
+ (c-name "g_file_has_prefix")
+ (return-type "gboolean")
+ (parameters
+ '("GFile*" "descendant")
+ )
+)
+
+(define-method get_relative_path
+ (of-object "GFile")
+ (c-name "g_file_get_relative_path")
+ (return-type "char*")
+ (parameters
+ '("GFile*" "descendant")
+ )
+)
+
+(define-method resolve_relative_path
+ (of-object "GFile")
+ (c-name "g_file_resolve_relative_path")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "relative_path")
+ )
+)
+
+(define-method is_native
+ (of-object "GFile")
+ (c-name "g_file_is_native")
+ (return-type "gboolean")
+)
+
+(define-method has_uri_scheme
+ (of-object "GFile")
+ (c-name "g_file_has_uri_scheme")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "uri_scheme")
+ )
+)
+
+(define-method get_uri_scheme
+ (of-object "GFile")
+ (c-name "g_file_get_uri_scheme")
+ (return-type "char*")
+)
+
+(define-method read
+ (of-object "GFile")
+ (docstring
+ "F.read([cancellable]) -> input stream\n"
+ "Opens a file for reading. The result is a GFileInputStream that\n"
+ "can be used to read the contents of the file.\n"
+ "\n"
+ "If cancellable is specified, then the operation can be cancelled\n"
+ "by triggering the cancellable object from another thread. If the\n"
+ "operation was cancelled, the error gio.IO_ERROR_CANCELLED will\n"
+ "be returned. If the file does not exist, the gio.IO_ERROR_NOT_FOUND\n"
+ "error will be returned. If the file is a directory, the\n"
+ "gio.IO_ERROR_IS_DIRECTORY error will be returned. Other errors\n"
+ "are possible too, and depend on what kind of filesystem the file is on."
+ )
+ (c-name "g_file_read")
+ (return-type "GFileInputStream*")
+ (unblock-threads #t)
+ (caller-owns-return #t)
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method read_async
+ (of-object "GFile")
+ (docstring
+ "F.read_async(callback [,io_priority [,cancellable [,user_data]]])\n"
+ "-> start read\n"
+ "\n"
+ "For more details, see gio.File.read() which is the synchronous\n"
+ "version of this call. Asynchronously opens file for reading.\n"
+ "When the operation is finished, callback will be called.\n"
+ "You can then call g_file_read_finish() to get the result of the\n"
+ "operation.\n"
+ )
+ (c-name "g_file_read_async")
+ (return-type "none")
+ (parameters
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method read_finish
+ (of-object "GFile")
+ (c-name "g_file_read_finish")
+ (return-type "GFileInputStream*")
+ (caller-owns-return #t)
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method append_to
+ (of-object "GFile")
+ (c-name "g_file_append_to")
+ (return-type "GFileOutputStream*")
+ (unblock-threads #t)
+ (caller-owns-return #t)
+ (parameters
+ '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method create
+ (of-object "GFile")
+ (c-name "g_file_create")
+ (return-type "GFileOutputStream*")
+ (unblock-threads #t)
+ (caller-owns-return #t)
+ (parameters
+ '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method replace
+ (of-object "GFile")
+ (c-name "g_file_replace")
+ (return-type "GFileOutputStream*")
+ (unblock-threads #t)
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "etag")
+ '("gboolean" "make_backup")
+ '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method append_to_async
+ (docstring
+ "F.append_to_async(callback [flags, [,io_priority [,cancellable\n"
+ " [,user_data]]]]) -> open for append\n"
+ "\n"
+ "Asynchronously opens file for appending.\n"
+ "For more details, see gio.File.append_to() which is the synchronous\n"
+ "version of this call. When the operation is finished, callback will\n"
+ "be called. You can then call F.append_to_finish() to get the result\n"
+ "of the operation."
+ )
+ (of-object "GFile")
+ (c-name "g_file_append_to_async")
+ (return-type "none")
+ (parameters
+ '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method append_to_finish
+ (of-object "GFile")
+ (c-name "g_file_append_to_finish")
+ (return-type "GFileOutputStream*")
+ (caller-owns-return #t)
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method create_async
+ (docstring
+ "F.create_async(callback [flags, [,io_priority [,cancellable\n"
+ " [,user_data]]]]) -> file created\n"
+ "\n"
+ "Asynchronously creates a new file and returns an output stream for\n"
+ "writing to it. The file must not already exist.\n"
+ "For more details, see F.create() which is the synchronous\n"
+ "version of this call.\n"
+ "When the operation is finished, callback will be called. You can\n"
+ "then call F.create_finish() to get the result of the operation."
+ )
+ (of-object "GFile")
+ (c-name "g_file_create_async")
+ (return-type "none")
+ (parameters
+ '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method create_finish
+ (of-object "GFile")
+ (c-name "g_file_create_finish")
+ (return-type "GFileOutputStream*")
+ (caller-owns-return #t)
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method replace_async
+ (docstring
+ "F.replace_async(callback [etag, [make_backup, [flags, [io_priority,\n"
+ " [cancellable, [user_data]]]]]]) -> file replace\n"
+ "\n"
+ "Asynchronously overwrites the file, replacing the contents, possibly\n"
+ "creating a backup copy of the file first.\n"
+ "For more details, see F.replace() which is the synchronous\n"
+ "version of this call.\n"
+ "When the operation is finished, callback will be called. You can\n"
+ "then call F.replace_finish() to get the result of the operation."
+ )
+ (of-object "GFile")
+ (c-name "g_file_replace_async")
+ (return-type "none")
+ (parameters
+ '("const-char*" "etag")
+ '("gboolean" "make_backup")
+ '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method replace_finish
+ (of-object "GFile")
+ (c-name "g_file_replace_finish")
+ (return-type "GFileOutputStream*")
+ (caller-owns-return #t)
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method query_exists
+ (of-object "GFile")
+ (c-name "g_file_query_exists")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ )
+)
+
+(define-method query_file_type
+ (of-object "GFile")
+ (c-name "g_file_query_file_type")
+ (return-type "GFileType")
+ (parameters
+ '("GFileQueryInfoFlags" "flags")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ )
+)
+
+(define-method query_info
+ (of-object "GFile")
+ (c-name "g_file_query_info")
+ (return-type "GFileInfo*")
+ (unblock-threads #t)
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "attributes")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method query_info_async
+ (docstring
+ "F.query_info_async(attributes, callback, [flags, [io_priority,\n"
+ " [cancellable, [user_data]]]]) -> query attributes\n"
+ "\n"
+ "Asynchronously gets the requested information about specified file.\n"
+ "The result is a GFileInfo object that contains key-value attributes\n"
+ "(such as type or size for the file).\n"
+ "For more details, see F.query_info() which is the synchronous\n"
+ "version of this call. \n"
+ "When the operation is finished, callback will be called. You can\n"
+ "then call F.query_info_finish() to get the result of the operation.\n"
+ )
+ (of-object "GFile")
+ (c-name "g_file_query_info_async")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attributes")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method query_info_finish
+ (of-object "GFile")
+ (c-name "g_file_query_info_finish")
+ (return-type "GFileInfo*")
+ (caller-owns-return #t)
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method query_filesystem_info
+ (of-object "GFile")
+ (c-name "g_file_query_filesystem_info")
+ (return-type "GFileInfo*")
+ (unblock-threads #t)
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "attributes")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method query_filesystem_info_async
+ (of-object "GFile")
+ (c-name "g_file_query_filesystem_info_async")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attributes")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method query_filesystem_info_finish
+ (of-object "GFile")
+ (c-name "g_file_query_filesystem_info_finish")
+ (return-type "GFileInfo*")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method find_enclosing_mount
+ (of-object "GFile")
+ (c-name "g_file_find_enclosing_mount")
+ (return-type "GMount*")
+ (unblock-threads #t)
+ (caller-owns-return #t)
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method find_enclosing_mount_async
+ (of-object "GFile")
+ (c-name "g_file_find_enclosing_mount_async")
+ (return-type "none")
+ (parameters
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method find_enclosing_mount_finish
+ (of-object "GFile")
+ (c-name "g_file_find_enclosing_mount_finish")
+ (return-type "GMount*")
+ (caller-owns-return #t)
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method enumerate_children
+ (docstring
+"F.enumerate_children(attributes, [flags, cancellable]) -> enumerator\n"
+"Gets the requested information about the files in a directory.\n"
+"The result is a gio.FileEnumerator object that will give out gio.FileInfo\n"
+"objects for all the files in the directory.\n"
+"The attribute value is a string that specifies the file attributes that\n"
+"should be gathered. It is not an error if it's not possible to read a \n"
+"particular requested attribute from a file - it just won't be set.\n"
+"attribute should be a comma-separated list of attribute or attribute\n"
+"wildcards. The wildcard \"*\" means all attributes, and a wildcard like\n"
+"\"standard::*\" means all attributes in the standard namespace.\n"
+"An example attribute query be \"standard::*,owner::user\". The standard\n"
+"attributes are available as defines, like gio.FILE_ATTRIBUTE_STANDARD_NAME.\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled by\n"
+"triggering the cancellable object from another thread. If the operation was\n"
+"cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
+"\n"
+"If the file does not exist, the gio.ERROR_NOT_FOUND error will be returned.\n"
+"If the file is not a directory, the gio.FILE_ERROR_NOTDIR error will\n"
+"be returned. Other errors are possible too.")
+ (of-object "GFile")
+ (c-name "g_file_enumerate_children")
+ (return-type "GFileEnumerator*")
+ (unblock-threads #t)
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "attributes")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method enumerate_children_async
+ (docstring
+"F.enumerate_children_async(attributes, callback,\n"
+" [flags, io_priority, cancellable, user_data])\n"
+"Asynchronously gets the requested information about the files in a\n"
+"directory. The result is a GFileEnumerator object that will give out\n"
+"GFileInfo objects for all the files in the directory.\n"
+"\n"
+"For more details, see gio.File.enumerate_children() which is the synchronous\n"
+"version of this call.\n"
+"\n"
+"When the operation is finished, callback will be called. You can then call\n"
+"gio.File.enumerate_children_finish() to get the result of the operation.")
+ (of-object "GFile")
+ (c-name "g_file_enumerate_children_async")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attributes")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method enumerate_children_finish
+ (of-object "GFile")
+ (c-name "g_file_enumerate_children_finish")
+ (return-type "GFileEnumerator*")
+ (caller-owns-return #t)
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method set_display_name
+ (of-object "GFile")
+ (c-name "g_file_set_display_name")
+ (return-type "GFile*")
+ (unblock-threads #t)
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "display_name")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method set_display_name_async
+ (of-object "GFile")
+ (c-name "g_file_set_display_name_async")
+ (return-type "none")
+ (parameters
+ '("const-char*" "display_name")
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method set_display_name_finish
+ (of-object "GFile")
+ (c-name "g_file_set_display_name_finish")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method delete
+ (of-object "GFile")
+ (c-name "g_file_delete")
+ (return-type "gboolean")
+ (unblock-threads #t)
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method trash
+ (of-object "GFile")
+ (c-name "g_file_trash")
+ (return-type "gboolean")
+ (unblock-threads #t)
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method copy
+ (docstring
+"F.copy(destination, [callback, flags, cancellable, user_data])\n"
+"Copies the file source to the location specified by destination.\n"
+"Can not handle recursive copies of directories.\n"
+"\n"
+"If the flag gio.FILE_COPY_OVERWRITE is specified an already existing\n"
+"destination file is overwritten.\n"
+"\n"
+"If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlink\n"
+"will be copied as symlinks, otherwise the target of the source symlink\n"
+"will be copied.\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled b\n"
+"triggering the cancellable object from another thread.\n"
+"If the operation was cancelled, the error gio.ERROR_CANCELLED\n"
+"will be returned.\n"
+"\n"
+"If progress_callback is not None, then the operation can be monitored\n"
+"by setting this to a callable. if specified progress_callback_data will\n"
+"be passed to this function. It is guaranteed that this callback\n"
+"will be called after all data has been transferred with the total number\n"
+"of bytes copied during the operation.\n"
+"\n"
+"If the source file does not exist then the gio.ERROR_NOT_FOUND\n"
+"error is returned, independent on the status of the destination.\n"
+"\n"
+"If gio.FILE_COPY_OVERWRITE is not specified and the target exists\n"
+"then the error gio.ERROR_EXISTS is returned.\n"
+"\n"
+"If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY\n"
+"error is returned. If trying to overwrite a directory with a directory\n"
+"the gio.ERROR_WOULD_MERGE error is returned.\n"
+"\n"
+"If the source is a directory and the target does not exist\n"
+"or gio.FILE_COPY_OVERWRITE is specified and the target is a file\n"
+"then the gio.ERROR_WOULD_RECURSE error is returned.\n"
+"\n"
+"If you are interested in copying the GFile object itself\n"
+"(not the on-disk file), see gio.File.dup().")
+ (of-object "GFile")
+ (c-name "g_file_copy")
+ (unblock-threads #t)
+ (return-type "gboolean")
+ (parameters
+ '("GFile*" "destination")
+ '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GFileProgressCallback" "progress_callback")
+ '("gpointer" "progress_callback_data")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method copy_async
+ (of-object "GFile")
+ (docstring
+ "F.copy_async(destination, callback, [flags, io_priority, user_data, cancellable, progress_callback])\n"
+ "-> start copy\n"
+ "\n"
+ "For more details, see gio.File.copy() which is the synchronous\n"
+ "version of this call. Asynchronously copies file.\n"
+ "When the operation is finished, callback will be called.\n"
+ "You can then call g_file_copy_finish() to get the result of the\n"
+ "operation.\n"
+ )
+ (c-name "g_file_copy_async")
+ (return-type "none")
+ (parameters
+ '("GFile*" "destination")
+ '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GFileProgressCallback" "progress_callback")
+ '("gpointer" "progress_callback_data")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method copy_finish
+ (of-object "GFile")
+ (c-name "g_file_copy_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method move
+ (docstring
+"F.move(destination, [callback, flags, cancellable, user_data])\n"
+"Tries to move the file or directory source to the location\n"
+"specified by destination. If native move operations are\n"
+"supported then this is used, otherwise a copy + delete fallback\n"
+"is used. The native implementation may support moving directories\n"
+"(for instance on moves inside the same filesystem), but the \n"
+"fallback code does not.\n"
+"\n"
+"If the flag gio.FILE_COPY_OVERWRITE is specified an already existing\n"
+"destination file is overwritten.\n"
+"\n"
+"If the flag gio.FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlink\n"
+"will be copied as symlinks, otherwise the target of the source symlink\n"
+"will be copied.\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled b\n"
+"triggering the cancellable object from another thread.\n"
+"If the operation was cancelled, the error gio.ERROR_CANCELLED\n"
+"will be returned.\n"
+"\n"
+"If progress_callback is not None, then the operation can be monitored\n"
+"by setting this to a callable. if specified progress_callback_data will\n"
+"be passed to this function. It is guaranteed that this callback\n"
+"will be called after all data has been transferred with the total number\n"
+"of bytes copied during the operation.\n"
+"\n"
+"If the source file does not exist then the gio.ERROR_NOT_FOUND\n"
+"error is returned, independent on the status of the destination.\n"
+"\n"
+"If gio.FILE_COPY_OVERWRITE is not specified and the target exists\n"
+"then the error gio.ERROR_EXISTS is returned.\n"
+"\n"
+"If trying to overwrite a file over a directory the gio.ERROR_IS_DIRECTORY\n"
+"error is returned. If trying to overwrite a directory with a directory\n"
+"the gio.ERROR_WOULD_MERGE error is returned.\n"
+"\n"
+"If the source is a directory and the target does not exist\n"
+"or gio.FILE_COPY_OVERWRITE is specified and the target is a file\n"
+"then the gio.ERROR_WOULD_RECURSE error is returned.")
+ (of-object "GFile")
+ (c-name "g_file_move")
+ (return-type "gboolean")
+ (parameters
+ '("GFile*" "destination")
+ '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GFileProgressCallback" "progress_callback")
+ '("gpointer" "progress_callback_data")
+ '("GError**" "error")
+ )
+)
+
+(define-method make_directory
+ (of-object "GFile")
+ (c-name "g_file_make_directory")
+ (return-type "gboolean")
+ (unblock-threads #t)
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method make_directory_with_parents
+ (of-object "GFile")
+ (c-name "g_file_make_directory_with_parents")
+ (return-type "gboolean")
+ (unblock-threads #t)
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method make_symbolic_link
+ (of-object "GFile")
+ (c-name "g_file_make_symbolic_link")
+ (return-type "gboolean")
+ (unblock-threads #t)
+ (parameters
+ '("const-char*" "symlink_value")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method query_settable_attributes
+ (docstring
+ "F.query_settable_attributes([cancellable]) -> list\n\n"
+ "Obtain the list of settable attributes for the file.\n"
+ "Returns the type and full attribute name of all the attributes that\n"
+ "can be set on this file. This doesn't mean setting it will always\n"
+ "succeed though, you might get an access failure, or some specific\n"
+ "file may not support a specific attribute.\n\n"
+ "If cancellable is not None, then the operation can be cancelled by\n"
+ "triggering the cancellable object from another thread. If the operation\n"
+ "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned."
+ )
+ (of-object "GFile")
+ (c-name "g_file_query_settable_attributes")
+ (return-type "GFileAttributeInfoList*")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method query_writable_namespaces
+ (docstring
+ "F.query_writable_namespaces([cancellable]) -> list\n\n"
+ "Obtain the list of attribute namespaces where new attributes can\n"
+ "be created by a user. An example of this is extended attributes\n"
+ "(in the "xattr" namespace).\n"
+ "If cancellable is not None, then the operation can be cancelled\n"
+ "by triggering the cancellable object from another thread. If the\n"
+ "operation was cancelled, the error gio.IO_ERROR_CANCELLED\n"
+ "will be returned."
+ )
+ (of-object "GFile")
+ (c-name "g_file_query_writable_namespaces")
+ (return-type "GFileAttributeInfoList*")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method set_attribute
+ (docstring
+ "F.set_attribute(attribute, type, value_p [,flags [,cancellable ]])->bool\n"
+ "\n"
+ "Sets an attribute in the file with attribute name attribute to value_p.\n"
+ "If cancellable is not None, then the operation can be cancelled by\n"
+ "triggering the cancellable object from another thread. If the operation\n"
+ "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned."
+ )
+ (of-object "GFile")
+ (c-name "g_file_set_attribute")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ '("GFileAttributeType" "type")
+ '("gpointer" "value_p")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method set_attributes_from_info
+ (of-object "GFile")
+ (c-name "g_file_set_attributes_from_info")
+ (return-type "gboolean")
+ (parameters
+ '("GFileInfo*" "info")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method set_attributes_async
+ (of-object "GFile")
+ (c-name "g_file_set_attributes_async")
+ (return-type "none")
+ (parameters
+ '("GFileInfo*" "info")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method set_attributes_finish
+ (of-object "GFile")
+ (c-name "g_file_set_attributes_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GFileInfo**" "info")
+ '("GError**" "error")
+ )
+)
+
+(define-method set_attribute_string
+ (of-object "GFile")
+ (c-name "g_file_set_attribute_string")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ '("const-char*" "value")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method set_attribute_byte_string
+ (of-object "GFile")
+ (c-name "g_file_set_attribute_byte_string")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ '("const-char*" "value")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method set_attribute_uint32
+ (of-object "GFile")
+ (c-name "g_file_set_attribute_uint32")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ '("guint32" "value")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method set_attribute_int32
+ (of-object "GFile")
+ (c-name "g_file_set_attribute_int32")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ '("gint32" "value")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method set_attribute_uint64
+ (of-object "GFile")
+ (c-name "g_file_set_attribute_uint64")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ '("guint64" "value")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method set_attribute_int64
+ (of-object "GFile")
+ (c-name "g_file_set_attribute_int64")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ '("gint64" "value")
+ '("GFileQueryInfoFlags" "flags" (default "G_FILE_QUERY_INFO_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method mount_enclosing_volume
+ (docstring
+"F.mount_enclosing_volume(mount_operation, callback, [cancellable,\n"
+" user_data])\n"
+"Starts a mount_operation, mounting the volume that contains\n"
+"the file location.\n"
+"\n"
+"When this operation has completed, callback will be called with\n"
+"user_user data, and the operation can be finalized with\n"
+"gio.File.mount_enclosing_volume_finish().\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled\n"
+"by triggering the cancellable object from another thread.\n"
+"If the operation was cancelled, the error gio.ERROR_CANCELLED\n"
+"will be returned.")
+ (of-object "GFile")
+ (c-name "g_file_mount_enclosing_volume")
+ (return-type "none")
+ (parameters
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method mount_enclosing_volume_finish
+ (of-object "GFile")
+ (c-name "g_file_mount_enclosing_volume_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method mount_mountable
+ (docstring
+"F.mount_mountable(mount_operation, callback, [flags, cancellable,\n"
+" user_data])\n"
+"Mounts a file of type gio.FILE_TYPE_MOUNTABLE. Using mount_operation,\n"
+"you can request callbacks when, for instance, passwords are needed\n"
+"during authentication.\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled by\n"
+" triggering the cancellable object from another thread. If the\n"
+"operation was cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
+"\n"
+"When the operation is finished, callback will be called. You can then\n"
+"call g_file_mount_mountable_finish() to get the result of the operation.\n")
+ (of-object "GFile")
+ (c-name "g_file_mount_mountable")
+ (return-type "none")
+ (parameters
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method mount_mountable_finish
+ (of-object "GFile")
+ (c-name "g_file_mount_mountable_finish")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method unmount_mountable
+ (docstring
+"F.unmount_mountable(callback, [flags, cancellable, user_data])\n"
+"Unmounts a file of type gio.FILE_TYPE_MOUNTABLE.\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled by\n"
+"triggering the cancellable object from another thread. If the\n"
+"operation was cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
+"\n"
+"When the operation is finished, callback will be called. You can\n"
+"then call gio.File.unmount_mountable_finish() to get the\n"
+"result of the operation.\n")
+ (of-object "GFile")
+ (c-name "g_file_unmount_mountable")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method unmount_mountable_finish
+ (of-object "GFile")
+ (c-name "g_file_unmount_mountable_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method eject_mountable
+ (of-object "GFile")
+ (c-name "g_file_eject_mountable")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method eject_mountable_finish
+ (of-object "GFile")
+ (c-name "g_file_eject_mountable_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+
+(define-method copy_attributes
+ (of-object "GFile")
+ (c-name "g_file_copy_attributes")
+ (return-type "gboolean")
+ (parameters
+ '("GFile*" "destination")
+ '("GFileCopyFlags" "flags" (default "G_FILE_COPY_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method monitor_directory
+ (of-object "GFile")
+ (c-name "g_file_monitor_directory")
+ (return-type "GFileMonitor*")
+ (caller-owns-return #t)
+ (parameters
+ '("GFileMonitorFlags" "flags" (default "G_FILE_MONITOR_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method monitor_file
+ (of-object "GFile")
+ (c-name "g_file_monitor_file")
+ (return-type "GFileMonitor*")
+ (caller-owns-return #t)
+ (parameters
+ '("GFileMonitorFlags" "flags" (default "G_FILE_MONITOR_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method monitor
+ (of-object "GFile")
+ (c-name "g_file_monitor")
+ (return-type "GFileMonitor*")
+ (parameters
+ '("GFileMonitorFlags" "flags" (default "G_FILE_MONITOR_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method query_default_handler
+ (of-object "GFile")
+ (c-name "g_file_query_default_handler")
+ (return-type "GAppInfo*")
+ (caller-owns-return #t)
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method load_contents
+ (docstring
+ "F.load_contents([cancellable]) -> contents, length, etag_out\n\n"
+ "Loads the content of the file into memory, returning the size of the\n"
+ "data. The data is always zero terminated, but this is not included\n"
+ "in the resultant length.\n"
+ "If cancellable is not None, then the operation can be cancelled by\n"
+ "triggering the cancellable object from another thread. If the operation\n"
+ "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
+ )
+ (of-object "GFile")
+ (c-name "g_file_load_contents")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("char**" "contents")
+ '("gsize*" "length")
+ '("char**" "etag_out")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method load_contents_async
+ (docstring
+ "F.load_contents_async(callback, [cancellable, [user_data]])->start loading\n\n"
+ "Starts an asynchronous load of the file's contents.\n\n"
+ "For more details, see F.load_contents() which is the synchronous\n"
+ "version of this call.\n\n"
+ "When the load operation has completed, callback will be called with\n"
+ "user data. To finish the operation, call F.load_contents_finish() with\n"
+ "the parameter 'res' returned by the callback.\n\n"
+ "If cancellable is not None, then the operation can be cancelled by\n"
+ "triggering the cancellable object from another thread. If the operation\n"
+ "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
+ )
+ (of-object "GFile")
+ (c-name "g_file_load_contents_async")
+ (return-type "none")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method load_contents_finish
+ (docstring
+ "F.load_contents_finish(res) -> contents, length, etag_out\n\n"
+ "Finishes an asynchronous load of the file's contents. The contents are\n"
+ "placed in contents, and length is set to the size of the contents\n"
+ "string. If etag_out is present, it will be set to the new entity\n"
+ "tag for the file.\n"
+ )
+ (of-object "GFile")
+ (c-name "g_file_load_contents_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("char**" "contents")
+ '("gsize*" "length")
+ '("char**" "etag_out")
+ '("GError**" "error")
+ )
+)
+
+(define-method load_partial_contents_async
+ (of-object "GFile")
+ (c-name "g_file_load_partial_contents_async")
+ (return-type "none")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GFileReadMoreCallback" "read_more_callback")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method load_partial_contents_finish
+ (of-object "GFile")
+ (c-name "g_file_load_partial_contents_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("char**" "contents")
+ '("gsize*" "length")
+ '("char**" "etag_out")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method replace_contents
+ (docstring
+ "F.replace_contents(contents, [etag, [make_backup, [flags, [cancellable]]]])\n"
+ "-> etag_out\n"
+ "\n"
+ "Replaces the content of the file, returning the new etag value for the\n"
+ "file. If an etag is specified, any existing file must have that etag, or\n"
+ "the error gio.IO_ERROR_WRONG_ETAG will be returned.\n"
+ "If make_backup is True, this method will attempt to make a backup of the\n"
+ "file. If cancellable is not None, then the operation can be cancelled by\n"
+ "triggering the cancellable object from another thread. If the operation\n"
+ "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
+ )
+ (of-object "GFile")
+ (c-name "g_file_replace_contents")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "contents")
+ '("gsize" "length")
+ '("const-char*" "etag")
+ '("gboolean" "make_backup")
+ '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+ '("char**" "new_etag")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method replace_contents_async
+ (docstring
+ "F.replace_contents_async(contents, callback, [etag, [make_backup, [flags,\n"
+ " [cancellable]]]]) -> etag_out\n"
+ "\n"
+ "Starts an asynchronous replacement of the file with the given contents.\n"
+ "For more details, see F.replace_contents() which is the synchronous\n"
+ "version of this call.\n\n"
+ "When the load operation has completed, callback will be called with\n"
+ "user data. To finish the operation, call F.replace_contents_finish() with\n"
+ "the parameter 'res' returned by the callback.\n\n"
+ "If cancellable is not None, then the operation can be cancelled by\n"
+ "triggering the cancellable object from another thread. If the operation\n"
+ "was cancelled, the error gio.IO_ERROR_CANCELLED will be returned.\n"
+ )
+ (of-object "GFile")
+ (c-name "g_file_replace_contents_async")
+ (return-type "none")
+ (parameters
+ '("const-char*" "contents")
+ '("gsize" "length")
+ '("const-char*" "etag")
+ '("gboolean" "make_backup")
+ '("GFileCreateFlags" "flags" (default "G_FILE_CREATE_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+;;
+;; wrapped in gfile.override
+;;
+(define-method replace_contents_finish
+ (docstring
+ "F.replace_contents_finish(res) -> etag_out\n\n"
+ "Finishes an asynchronous replacement of the file's contents.\n"
+ "The new entity tag for the file is returned.\n"
+ )
+ (of-object "GFile")
+ (c-name "g_file_replace_contents_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("char**" "new_etag")
+ '("GError**" "error")
+ )
+)
+
+(define-method create_readwrite
+ (of-object "GFile")
+ (c-name "g_file_create_readwrite")
+ (return-type "GFileIOStream*")
+ (parameters
+ '("GFileCreateFlags" "flags")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method create_readwrite_async
+ (of-object "GFile")
+ (c-name "g_file_create_readwrite_async")
+ (return-type "none")
+ (parameters
+ '("GFileCreateFlags" "flags")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method create_readwrite_finish
+ (of-object "GFile")
+ (c-name "g_file_create_readwrite_finish")
+ (return-type "GFileIOStream*")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method eject_mountable_with_operation
+ (of-object "GFile")
+ (c-name "g_file_eject_mountable_with_operation")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method eject_mountable_with_operation_finish
+ (of-object "GFile")
+ (c-name "g_file_eject_mountable_with_operation_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method open_readwrite
+ (of-object "GFile")
+ (c-name "g_file_open_readwrite")
+ (return-type "GFileIOStream*")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method open_readwrite_async
+ (of-object "GFile")
+ (c-name "g_file_open_readwrite_async")
+ (return-type "none")
+ (parameters
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method open_readwrite_finish
+ (of-object "GFile")
+ (c-name "g_file_open_readwrite_finish")
+ (return-type "GFileIOStream*")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method poll_mountable
+ (of-object "GFile")
+ (c-name "g_file_poll_mountable")
+ (return-type "none")
+ (parameters
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method poll_mountable_finish
+ (of-object "GFile")
+ (c-name "g_file_poll_mountable_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method replace_readwrite
+ (of-object "GFile")
+ (c-name "g_file_replace_readwrite")
+ (return-type "GFileIOStream*")
+ (parameters
+ '("const-char*" "etag")
+ '("gboolean" "make_backup")
+ '("GFileCreateFlags" "flags")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method replace_readwrite_async
+ (of-object "GFile")
+ (c-name "g_file_replace_readwrite_async")
+ (return-type "none")
+ (parameters
+ '("const-char*" "etag")
+ '("gboolean" "make_backup")
+ '("GFileCreateFlags" "flags")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method replace_readwrite_finish
+ (of-object "GFile")
+ (c-name "g_file_replace_readwrite_finish")
+ (return-type "GFileIOStream*")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method start_mountable
+ (of-object "GFile")
+ (c-name "g_file_start_mountable")
+ (return-type "none")
+ (parameters
+ '("GDriveStartFlags" "flags")
+ '("GMountOperation*" "start_operation")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method start_mountable_finish
+ (of-object "GFile")
+ (c-name "g_file_start_mountable_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method stop_mountable
+ (of-object "GFile")
+ (c-name "g_file_stop_mountable")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method stop_mountable_finish
+ (of-object "GFile")
+ (c-name "g_file_stop_mountable_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method supports_thread_contexts
+ (of-object "GFile")
+ (c-name "g_file_supports_thread_contexts")
+ (return-type "gboolean")
+)
+
+(define-method unmount_mountable_with_operation
+ (of-object "GFile")
+ (c-name "g_file_unmount_mountable_with_operation")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method unmount_mountable_with_operation_finish
+ (of-object "GFile")
+ (c-name "g_file_unmount_mountable_with_operation_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gfileicon.h
+
+(define-function file_icon_get_type
+ (c-name "g_file_icon_get_type")
+ (return-type "GType")
+)
+
+(define-function file_icon_new
+ (c-name "g_file_icon_new")
+ (is-constructor-of "GFileIcon")
+ (return-type "GIcon*")
+ ;; Note: starting with GLib 2.18 we could use (properties ...)
+ ;; instead, but I don't know if it is possible to branch on version
+ ;; in codegen.
+ (parameters
+ '("GFile*" "file")
+ )
+)
+
+(define-method get_file
+ (of-object "GFileIcon")
+ (c-name "g_file_icon_get_file")
+ (return-type "GFile*")
+)
+
+
+
+;; From gfileinfo.h
+
+(define-function file_info_get_type
+ (c-name "g_file_info_get_type")
+ (return-type "GType")
+)
+
+(define-function file_info_new
+ (c-name "g_file_info_new")
+ (is-constructor-of "GFileInfo")
+ (return-type "GFileInfo*")
+)
+
+(define-method dup
+ (of-object "GFileInfo")
+ (c-name "g_file_info_dup")
+ (return-type "GFileInfo*")
+ (caller-owns-return #t)
+)
+
+(define-method copy_into
+ (of-object "GFileInfo")
+ (c-name "g_file_info_copy_into")
+ (return-type "none")
+ (parameters
+ '("GFileInfo*" "dest_info")
+ )
+)
+
+(define-method has_attribute
+ (of-object "GFileInfo")
+ (c-name "g_file_info_has_attribute")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method has_namespace
+ (of-object "GFileInfo")
+ (c-name "g_file_info_has_namespace")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "name_space")
+ )
+)
+
+;;
+;; wrapped in gfileinfo.override
+(define-method list_attributes
+ (docstring
+ "INFO.list_attributes(name_space) -> Attribute list\n\n"
+ "Lists the file info structure's attributes."
+ )
+ (of-object "GFileInfo")
+ (c-name "g_file_info_list_attributes")
+ (return-type "char**")
+ (parameters
+ '("const-char*" "name_space")
+ )
+)
+
+(define-method get_attribute_data
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_data")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ '("GFileAttributeType*" "type")
+ '("gpointer*" "value_pp")
+ '("GFileAttributeStatus*" "status")
+ )
+)
+
+(define-method get_attribute_type
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_type")
+ (return-type "GFileAttributeType")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method remove_attribute
+ (of-object "GFileInfo")
+ (c-name "g_file_info_remove_attribute")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_status
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_status")
+ (return-type "GFileAttributeStatus")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method set_attribute_status
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_status")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ '("GFileAttributeStatus" "status")
+ )
+)
+
+(define-method get_attribute_as_string
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_as_string")
+ (return-type "char*")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_string
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_string")
+ (return-type "const-char*")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_byte_string
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_byte_string")
+ (return-type "const-char*")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_boolean
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_boolean")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_uint32
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_uint32")
+ (return-type "guint32")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_int32
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_int32")
+ (return-type "gint32")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_uint64
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_uint64")
+ (return-type "guint64")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_int64
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_int64")
+ (return-type "gint64")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_object
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_object")
+ (return-type "GObject*")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method get_attribute_stringv
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_attribute_stringv")
+ (return-type "char**")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method set_attribute
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ '("GFileAttributeType" "type")
+ '("gpointer" "value_p")
+ )
+)
+
+(define-method set_attribute_string
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_string")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ '("const-char*" "attr_value")
+ )
+)
+
+(define-method set_attribute_byte_string
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_byte_string")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ '("const-char*" "attr_value")
+ )
+)
+
+(define-method set_attribute_boolean
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_boolean")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ '("gboolean" "attr_value")
+ )
+)
+
+(define-method set_attribute_uint32
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_uint32")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ '("guint32" "attr_value")
+ )
+)
+
+(define-method set_attribute_int32
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_int32")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ '("gint32" "attr_value")
+ )
+)
+
+(define-method set_attribute_uint64
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_uint64")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ '("guint64" "attr_value")
+ )
+)
+
+(define-method set_attribute_int64
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_int64")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ '("gint64" "attr_value")
+ )
+)
+
+(define-method set_attribute_object
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_object")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attribute")
+ '("GObject*" "attr_value")
+ )
+)
+
+(define-method clear_status
+ (of-object "GFileInfo")
+ (c-name "g_file_info_clear_status")
+ (return-type "none")
+)
+
+(define-method get_file_type
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_file_type")
+ (return-type "GFileType")
+)
+
+(define-method get_is_hidden
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_is_hidden")
+ (return-type "gboolean")
+)
+
+(define-method get_is_backup
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_is_backup")
+ (return-type "gboolean")
+)
+
+(define-method get_is_symlink
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_is_symlink")
+ (return-type "gboolean")
+)
+
+(define-method get_name
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_name")
+ (return-type "const-char*")
+)
+
+(define-method get_display_name
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_display_name")
+ (return-type "const-char*")
+)
+
+(define-method get_edit_name
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_edit_name")
+ (return-type "const-char*")
+)
+
+(define-method get_icon
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_icon")
+ (return-type "GIcon*")
+)
+
+(define-method get_content_type
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_content_type")
+ (return-type "const-char*")
+)
+
+(define-method get_size
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_size")
+ (return-type "goffset")
+)
+
+;;
+;; wrapped in gfileinfo.override
+;;
+(define-method get_modification_time
+ (docstring
+"INFO.get_modification_time() -> modification time\n"
+"Returns the modification time, in UNIX time format\n")
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_modification_time")
+ (return-type "none")
+ (parameters
+ '("GTimeVal*" "result")
+ )
+)
+
+(define-method get_symlink_target
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_symlink_target")
+ (return-type "const-char*")
+)
+
+(define-method get_etag
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_etag")
+ (return-type "const-char*")
+)
+
+(define-method get_sort_order
+ (of-object "GFileInfo")
+ (c-name "g_file_info_get_sort_order")
+ (return-type "gint32")
+)
+
+(define-method set_attribute_mask
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_attribute_mask")
+ (return-type "none")
+ (parameters
+ '("GFileAttributeMatcher*" "mask")
+ )
+)
+
+(define-method unset_attribute_mask
+ (of-object "GFileInfo")
+ (c-name "g_file_info_unset_attribute_mask")
+ (return-type "none")
+)
+
+(define-method set_file_type
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_file_type")
+ (return-type "none")
+ (parameters
+ '("GFileType" "type")
+ )
+)
+
+(define-method set_is_hidden
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_is_hidden")
+ (return-type "none")
+ (parameters
+ '("gboolean" "is_hidden")
+ )
+)
+
+(define-method set_is_symlink
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_is_symlink")
+ (return-type "none")
+ (parameters
+ '("gboolean" "is_symlink")
+ )
+)
+
+(define-method set_name
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_name")
+ (return-type "none")
+ (parameters
+ '("const-char*" "name")
+ )
+)
+
+(define-method set_display_name
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_display_name")
+ (return-type "none")
+ (parameters
+ '("const-char*" "display_name")
+ )
+)
+
+(define-method set_edit_name
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_edit_name")
+ (return-type "none")
+ (parameters
+ '("const-char*" "edit_name")
+ )
+)
+
+(define-method set_icon
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_icon")
+ (return-type "none")
+ (parameters
+ '("GIcon*" "icon")
+ )
+)
+
+(define-method set_content_type
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_content_type")
+ (return-type "none")
+ (parameters
+ '("const-char*" "content_type")
+ )
+)
+
+(define-method set_size
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_size")
+ (return-type "none")
+ (parameters
+ '("goffset" "size")
+ )
+)
+
+(define-method set_modification_time
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_modification_time")
+ (return-type "none")
+ (parameters
+ '("GTimeVal*" "mtime")
+ )
+)
+
+(define-method set_symlink_target
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_symlink_target")
+ (return-type "none")
+ (parameters
+ '("const-char*" "symlink_target")
+ )
+)
+
+(define-method set_sort_order
+ (of-object "GFileInfo")
+ (c-name "g_file_info_set_sort_order")
+ (return-type "none")
+ (parameters
+ '("gint32" "sort_order")
+ )
+)
+
+(define-function file_attribute_matcher_new
+ (c-name "g_file_attribute_matcher_new")
+ (is-constructor-of "GFileAttributeMatcher")
+ (return-type "GFileAttributeMatcher*")
+ (parameters
+ '("const-char*" "attributes")
+ )
+)
+
+(define-method ref
+ (of-object "GFileAttributeMatcher")
+ (c-name "g_file_attribute_matcher_ref")
+ (return-type "GFileAttributeMatcher*")
+)
+
+(define-method unref
+ (of-object "GFileAttributeMatcher")
+ (c-name "g_file_attribute_matcher_unref")
+ (return-type "none")
+)
+
+(define-method matches
+ (of-object "GFileAttributeMatcher")
+ (c-name "g_file_attribute_matcher_matches")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method matches_only
+ (of-object "GFileAttributeMatcher")
+ (c-name "g_file_attribute_matcher_matches_only")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "attribute")
+ )
+)
+
+(define-method enumerate_namespace
+ (of-object "GFileAttributeMatcher")
+ (c-name "g_file_attribute_matcher_enumerate_namespace")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "ns")
+ )
+)
+
+(define-method enumerate_next
+ (of-object "GFileAttributeMatcher")
+ (c-name "g_file_attribute_matcher_enumerate_next")
+ (return-type "const-char*")
+)
+
+
+
+;; From gfileinputstream.h
+
+(define-function file_input_stream_get_type
+ (c-name "g_file_input_stream_get_type")
+ (return-type "GType")
+)
+
+(define-method query_info
+ (of-object "GFileInputStream")
+ (c-name "g_file_input_stream_query_info")
+ (return-type "GFileInfo*")
+ (parameters
+ '("char*" "attributes")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method query_info_async
+ (of-object "GFileInputStream")
+ (c-name "g_file_input_stream_query_info_async")
+ (return-type "none")
+ (parameters
+ '("char*" "attributes")
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method query_info_finish
+ (of-object "GFileInputStream")
+ (c-name "g_file_input_stream_query_info_finish")
+ (return-type "GFileInfo*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gfileiostream.h
+
+(define-function file_io_stream_get_type
+ (c-name "g_file_io_stream_get_type")
+ (return-type "GType")
+)
+
+(define-method query_info
+ (of-object "GFileIOStream")
+ (c-name "g_file_io_stream_query_info")
+ (return-type "GFileInfo*")
+ (parameters
+ '("const-char*" "attributes")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method query_info_async
+ (of-object "GFileIOStream")
+ (c-name "g_file_io_stream_query_info_async")
+ (return-type "none")
+ (parameters
+ '("const-char*" "attributes")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method query_info_finish
+ (of-object "GFileIOStream")
+ (c-name "g_file_io_stream_query_info_finish")
+ (return-type "GFileInfo*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method get_etag
+ (of-object "GFileIOStream")
+ (c-name "g_file_io_stream_get_etag")
+ (return-type "char*")
+)
+
+
+
+
+;; From gfilemonitor.h
+
+(define-function file_monitor_get_type
+ (c-name "g_file_monitor_get_type")
+ (return-type "GType")
+)
+
+(define-method cancel
+ (of-object "GFileMonitor")
+ (c-name "g_file_monitor_cancel")
+ (return-type "gboolean")
+)
+
+(define-method is_cancelled
+ (of-object "GFileMonitor")
+ (c-name "g_file_monitor_is_cancelled")
+ (return-type "gboolean")
+)
+
+(define-method set_rate_limit
+ (of-object "GFileMonitor")
+ (c-name "g_file_monitor_set_rate_limit")
+ (return-type "none")
+ (parameters
+ '("int" "limit_msecs")
+ )
+)
+
+(define-method emit_event
+ (of-object "GFileMonitor")
+ (c-name "g_file_monitor_emit_event")
+ (return-type "none")
+ (parameters
+ '("GFile*" "file")
+ '("GFile*" "other_file")
+ '("GFileMonitorEvent" "event_type")
+ )
+)
+
+
+
+;; From gfilenamecompleter.h
+
+(define-function filename_completer_get_type
+ (c-name "g_filename_completer_get_type")
+ (return-type "GType")
+)
+
+(define-function filename_completer_new
+ (c-name "g_filename_completer_new")
+ (is-constructor-of "GFilenameCompleter")
+ (return-type "GFilenameCompleter*")
+)
+
+(define-method get_completion_suffix
+ (of-object "GFilenameCompleter")
+ (c-name "g_filename_completer_get_completion_suffix")
+ (return-type "char*")
+ (parameters
+ '("const-char*" "initial_text")
+ )
+)
+
+(define-method get_completions
+ (of-object "GFilenameCompleter")
+ (c-name "g_filename_completer_get_completions")
+ (return-type "char**")
+ (parameters
+ '("const-char*" "initial_text")
+ )
+)
+
+(define-method set_dirs_only
+ (of-object "GFilenameCompleter")
+ (c-name "g_filename_completer_set_dirs_only")
+ (return-type "none")
+ (parameters
+ '("gboolean" "dirs_only")
+ )
+)
+
+
+
+;; From gfileoutputstream.h
+
+(define-function file_output_stream_get_type
+ (c-name "g_file_output_stream_get_type")
+ (return-type "GType")
+)
+
+(define-method query_info
+ (of-object "GFileOutputStream")
+ (c-name "g_file_output_stream_query_info")
+ (return-type "GFileInfo*")
+ (parameters
+ '("char*" "attributes")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method query_info_async
+ (of-object "GFileOutputStream")
+ (c-name "g_file_output_stream_query_info_async")
+ (return-type "none")
+ (parameters
+ '("char*" "attributes")
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method query_info_finish
+ (of-object "GFileOutputStream")
+ (c-name "g_file_output_stream_query_info_finish")
+ (return-type "GFileInfo*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method get_etag
+ (of-object "GFileOutputStream")
+ (c-name "g_file_output_stream_get_etag")
+ (return-type "char*")
+)
+
+
+;; From gfilterinputstream.h
+
+(define-function filter_input_stream_get_type
+ (c-name "g_filter_input_stream_get_type")
+ (return-type "GType")
+)
+
+(define-method get_base_stream
+ (of-object "GFilterInputStream")
+ (c-name "g_filter_input_stream_get_base_stream")
+ (return-type "GInputStream*")
+)
+
+(define-method get_close_base_stream
+ (of-object "GFilterInputStream")
+ (c-name "g_filter_input_stream_get_close_base_stream")
+ (return-type "gboolean")
+)
+
+(define-method set_close_base_stream
+ (of-object "GFilterInputStream")
+ (c-name "g_filter_input_stream_set_close_base_stream")
+ (return-type "none")
+ (parameters
+ '("gboolean" "close_base")
+ )
+)
+
+
+
+;; From gfilteroutputstream.h
+
+(define-function filter_output_stream_get_type
+ (c-name "g_filter_output_stream_get_type")
+ (return-type "GType")
+)
+
+(define-method get_base_stream
+ (of-object "GFilterOutputStream")
+ (c-name "g_filter_output_stream_get_base_stream")
+ (return-type "GOutputStream*")
+)
+
+(define-method get_close_base_stream
+ (of-object "GFilterOutputStream")
+ (c-name "g_filter_output_stream_get_close_base_stream")
+ (return-type "gboolean")
+)
+
+(define-method set_close_base_stream
+ (of-object "GFilterOutputStream")
+ (c-name "g_filter_output_stream_set_close_base_stream")
+ (return-type "none")
+ (parameters
+ '("gboolean" "close_base")
+ )
+)
+
+
+
+;; From gicon.h
+
+(define-function icon_get_type
+ (c-name "g_icon_get_type")
+ (return-type "GType")
+)
+
+(define-function icon_hash
+ (c-name "g_icon_hash")
+ (return-type "guint")
+ (parameters
+ '("gconstpointer" "icon")
+ )
+)
+
+(define-method equal
+ (of-object "GIcon")
+ (c-name "g_icon_equal")
+ (return-type "gboolean")
+ (parameters
+ '("GIcon*" "icon2")
+ )
+)
+
+(define-method to_string
+ (of-object "GIcon")
+ (c-name "g_icon_to_string")
+ (return-type "gchar*")
+)
+
+(define-function icon_new_for_string
+ (c-name "g_icon_new_for_string")
+ (return-type "GIcon*")
+ (parameters
+ '("const-gchar*" "str")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From ginetsocketaddress.h
+
+(define-function inet_socket_address_get_type
+ (c-name "g_inet_socket_address_get_type")
+ (return-type "GType")
+)
+
+(define-function inet_socket_address_new
+ (c-name "g_inet_socket_address_new")
+ (is-constructor-of "GInetSocketAddress")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("GInetAddress*" "address")
+ '("guint16" "port")
+ )
+)
+
+(define-method get_address
+ (of-object "GInetSocketAddress")
+ (c-name "g_inet_socket_address_get_address")
+ (return-type "GInetAddress*")
+)
+
+(define-method get_port
+ (of-object "GInetSocketAddress")
+ (c-name "g_inet_socket_address_get_port")
+ (return-type "guint16")
+)
+
+
+
+;; From ginputstream.h
+
+(define-function input_stream_get_type
+ (c-name "g_input_stream_get_type")
+ (return-type "GType")
+)
+
+;;
+;; wrapped in ginputstream.override
+;;
+;; Note: the following two methods are renamed for consistency with
+;; Python file objects' read(). I.e. g_input_stream_read_all() is
+;; more like Python file.read(), so it is renamed read(). Since now
+;; there is a name clash, g_input_stream_read() is renamed
+;; read_part().
+(define-method read_part
+ (of-object "GInputStream")
+ (docstring
+ "STREAM.read_part([count, [cancellable]]) -> string\n"
+ "\n"
+ "Read 'count' bytes from the stream. If 'count' is not specified or is\n"
+ "omitted, read until the end of the stream. This method is allowed to\n"
+ "stop at any time after reading at least 1 byte from the stream. E.g.\n"
+ "when reading over a (relatively slow) HTTP connection, it will often\n"
+ "stop after receiving one packet. Therefore, to reliably read requested\n"
+ "number of bytes, you need to use a loop. See also gio.InputStream.read\n"
+ "for easier to use (though less efficient) method.\n"
+ "\n"
+ "Note: this method roughly corresponds to C GIO g_input_stream_read."
+ )
+ (c-name "g_input_stream_read")
+ (return-type "gssize")
+ (parameters
+ '("void*" "buffer")
+ '("gsize" "count")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in ginputstream.override
+;;
+;; See comments before the previous method definition.
+(define-method read
+ (of-object "GInputStream")
+ (docstring
+ "STREAM.read([count, [cancellable]]) -> string\n"
+ "\n"
+ "Read 'count' bytes from the stream. If 'count' is not specified or is\n"
+ "omitted, read until the end of the stream. This method will stop only\n"
+ "after reading requested number of bytes, reaching end of stream or\n"
+ "triggering an I/O error. See also gio.InputStream.read_part for more\n"
+ "efficient, but more cumbersome to use method.\n"
+ "\n"
+ "Note: this method roughly corresponds to C GIO g_input_stream_read_all.\n"
+ "It was renamed for consistency with Python standard file.read."
+ )
+ (c-name "g_input_stream_read_all")
+ (return-type "gboolean")
+ (parameters
+ '("void*" "buffer")
+ '("gsize" "count")
+ '("gsize*" "bytes_read")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method skip
+ (of-object "GInputStream")
+ (c-name "g_input_stream_skip")
+ (return-type "gssize")
+ (parameters
+ '("gsize" "count")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method close
+ (of-object "GInputStream")
+ (c-name "g_input_stream_close")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in ginputstream.override
+;;
+(define-method read_async
+ (of-object "GInputStream")
+ (c-name "g_input_stream_read_async")
+ (return-type "none")
+ (parameters
+ '("void*" "buffer")
+ '("gsize" "count")
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+;;
+;; wrapped in ginputstream.override
+;;
+(define-method read_finish
+ (of-object "GInputStream")
+ (c-name "g_input_stream_read_finish")
+ (return-type "gssize")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method skip_async
+ (of-object "GInputStream")
+ (c-name "g_input_stream_skip_async")
+ (return-type "none")
+ (parameters
+ '("gsize" "count")
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method skip_finish
+ (of-object "GInputStream")
+ (c-name "g_input_stream_skip_finish")
+ (return-type "gssize")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in ginputstream.override
+;;
+(define-method close_async
+ (of-object "GInputStream")
+ (c-name "g_input_stream_close_async")
+ (return-type "none")
+ (parameters
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method close_finish
+ (of-object "GInputStream")
+ (c-name "g_input_stream_close_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method is_closed
+ (of-object "GInputStream")
+ (c-name "g_input_stream_is_closed")
+ (return-type "gboolean")
+)
+
+(define-method has_pending
+ (of-object "GInputStream")
+ (c-name "g_input_stream_has_pending")
+ (return-type "gboolean")
+)
+
+(define-method set_pending
+ (of-object "GInputStream")
+ (c-name "g_input_stream_set_pending")
+ (return-type "gboolean")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method clear_pending
+ (of-object "GInputStream")
+ (c-name "g_input_stream_clear_pending")
+ (return-type "none")
+)
+
+
+
+;; From gioalias.h
+
+
+
+;; From gioenumtypes.h
+
+(define-function app_info_create_flags_get_type
+ (c-name "g_app_info_create_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function data_stream_byte_order_get_type
+ (c-name "g_data_stream_byte_order_get_type")
+ (return-type "GType")
+)
+
+(define-function data_stream_newline_type_get_type
+ (c-name "g_data_stream_newline_type_get_type")
+ (return-type "GType")
+)
+
+(define-function file_query_info_flags_get_type
+ (c-name "g_file_query_info_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function file_create_flags_get_type
+ (c-name "g_file_create_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function file_copy_flags_get_type
+ (c-name "g_file_copy_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function file_monitor_flags_get_type
+ (c-name "g_file_monitor_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function file_attribute_type_get_type
+ (c-name "g_file_attribute_type_get_type")
+ (return-type "GType")
+)
+
+(define-function file_attribute_info_flags_get_type
+ (c-name "g_file_attribute_info_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function file_attribute_status_get_type
+ (c-name "g_file_attribute_status_get_type")
+ (return-type "GType")
+)
+
+(define-function file_type_get_type
+ (c-name "g_file_type_get_type")
+ (return-type "GType")
+)
+
+(define-function file_monitor_event_get_type
+ (c-name "g_file_monitor_event_get_type")
+ (return-type "GType")
+)
+
+(define-function io_error_enum_get_type
+ (c-name "g_io_error_enum_get_type")
+ (return-type "GType")
+)
+
+(define-function ask_password_flags_get_type
+ (c-name "g_ask_password_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function password_save_get_type
+ (c-name "g_password_save_get_type")
+ (return-type "GType")
+)
+
+(define-function output_stream_splice_flags_get_type
+ (c-name "g_output_stream_splice_flags_get_type")
+ (return-type "GType")
+)
+
+
+
+;; From gioerror.h
+
+(define-function io_error_quark
+ (c-name "g_io_error_quark")
+ (return-type "GQuark")
+)
+
+(define-function io_error_from_errno
+ (c-name "g_io_error_from_errno")
+ (return-type "GIOErrorEnum")
+ (parameters
+ '("gint" "err_no")
+ )
+)
+
+
+
+;; From gio.h
+
+
+
+;; From gio-marshal.h
+
+
+
+;; From giomodule.h
+
+(define-function io_module_get_type
+ (c-name "g_io_module_get_type")
+ (return-type "GType")
+)
+
+(define-function io_module_new
+ (c-name "g_io_module_new")
+ (is-constructor-of "GIoModule")
+ (return-type "GIOModule*")
+ (parameters
+ '("const-gchar*" "filename")
+ )
+)
+
+(define-function io_modules_load_all_in_directory
+ (c-name "g_io_modules_load_all_in_directory")
+ (return-type "GList*")
+ (parameters
+ '("const-char*" "dirname")
+ )
+)
+
+(define-method load
+ (of-object "GIOModule")
+ (c-name "g_io_module_load")
+ (return-type "none")
+)
+
+(define-method unload
+ (of-object "GIOModule")
+ (c-name "g_io_module_unload")
+ (return-type "none")
+)
+
+
+
+;; From gioscheduler.h
+
+(define-function io_scheduler_push_job
+ (c-name "g_io_scheduler_push_job")
+ (return-type "none")
+ (parameters
+ '("GIOSchedulerJobFunc" "job_func")
+ '("gpointer" "user_data")
+ '("GDestroyNotify" "notify")
+ '("gint" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ )
+)
+
+(define-function io_scheduler_cancel_all_jobs
+ (c-name "g_io_scheduler_cancel_all_jobs")
+ (return-type "none")
+)
+
+(define-method send_to_mainloop
+ (of-object "GIOSchedulerJob")
+ (c-name "g_io_scheduler_job_send_to_mainloop")
+ (return-type "gboolean")
+ (parameters
+ '("GSourceFunc" "func")
+ '("gpointer" "user_data")
+ '("GDestroyNotify" "notify")
+ )
+)
+
+(define-method send_to_mainloop_async
+ (of-object "GIOSchedulerJob")
+ (c-name "g_io_scheduler_job_send_to_mainloop_async")
+ (return-type "none")
+ (parameters
+ '("GSourceFunc" "func")
+ '("gpointer" "user_data")
+ '("GDestroyNotify" "notify")
+ )
+)
+
+
+
+;; From gloadableicon.h
+
+(define-function loadable_icon_get_type
+ (c-name "g_loadable_icon_get_type")
+ (return-type "GType")
+)
+
+;;
+;; wrapped in gicon.override
+;;
+(define-method load
+ (of-object "GLoadableIcon")
+ (docstring
+ "ICON.load([size, [cancellable]]) -> input stream, type\n"
+ "\n"
+ "Opens a stream of icon data for reading. The result is a tuple of\n"
+ "gio.InputStream and type (either a string or None). The stream can\n"
+ "be read to retrieve icon data.\n"
+ "\n"
+ ;; Note: this is just a guess, GIO docs say nothing at the moment.
+ "Optional size is a hint at desired icon size. Not all implementations\n"
+ "support it and the hint will be just ignored in such cases.\n"
+ "If cancellable is specified, then the operation can be cancelled\n"
+ "by triggering the cancellable object from another thread. See\n"
+ "gio.File.read for details."
+ )
+ (c-name "g_loadable_icon_load")
+ (return-type "GInputStream*")
+ (parameters
+ '("int" "size")
+ '("char**" "type")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gicon.override
+;;
+(define-method load_async
+ (of-object "GLoadableIcon")
+ (docstring
+ "ICON.load_async(callback, [size, [cancellable, [user_data]]])\n"
+ "-> start loading\n"
+ "\n"
+ "For more information, see gio.LoadableIcon.load() which is the\n"
+ "synchronous version of this call. Asynchronously opens icon data for\n"
+ "reading. When the operation is finished, callback will be called.\n"
+ "You can then call gio.LoadableIcon.load_finish() to get the result of\n"
+ "the operation.\n"
+ )
+ (c-name "g_loadable_icon_load_async")
+ (return-type "none")
+ (parameters
+ '("int" "size")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+;;
+;; wrapped in gicon.override
+;;
+(define-method load_finish
+ (docstring
+ "F.load_finish(res) -> start loading\n"
+ "\n"
+ "Finish asynchronous icon loading operation. Must be called from callback\n"
+ "as specified to gio.LoadableIcon.load_async. Returns a tuple of\n"
+ "gio.InputStream and type, just as gio.LoadableIcon.load."
+ )
+ (of-object "GLoadableIcon")
+ (c-name "g_loadable_icon_load_finish")
+ (return-type "GInputStream*")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("char**" "type")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From ginetaddress.h
+
+(define-function inet_address_get_type
+ (c-name "g_inet_address_get_type")
+ (return-type "GType")
+)
+
+(define-function inet_address_new_from_string
+ (c-name "g_inet_address_new_from_string")
+ (return-type "GInetAddress*")
+ (parameters
+ '("const-gchar*" "string")
+ )
+)
+
+(define-function inet_address_new_from_bytes
+ (c-name "g_inet_address_new_from_bytes")
+ (return-type "GInetAddress*")
+ (parameters
+ '("const-guint8*" "bytes")
+ '("GSocketFamily" "family")
+ )
+)
+
+(define-function inet_address_new_loopback
+ (c-name "g_inet_address_new_loopback")
+ (return-type "GInetAddress*")
+ (parameters
+ '("GSocketFamily" "family")
+ )
+)
+
+(define-function inet_address_new_any
+ (c-name "g_inet_address_new_any")
+ (return-type "GInetAddress*")
+ (parameters
+ '("GSocketFamily" "family")
+ )
+)
+
+(define-method to_string
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_to_string")
+ (return-type "gchar*")
+)
+
+
+;; FIXME codegen barfs on this one
+;;
+;;(define-method to_bytes
+;; (of-object "GInetAddress")
+;; (c-name "g_inet_address_to_bytes")
+;; (return-type "const-guint8*")
+;;)
+
+(define-method get_native_size
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_native_size")
+ (return-type "gsize")
+)
+
+(define-method get_family
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_family")
+ (return-type "GSocketFamily")
+)
+
+(define-method get_is_any
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_any")
+ (return-type "gboolean")
+)
+
+(define-method get_is_loopback
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_loopback")
+ (return-type "gboolean")
+)
+
+(define-method get_is_link_local
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_link_local")
+ (return-type "gboolean")
+)
+
+(define-method get_is_site_local
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_site_local")
+ (return-type "gboolean")
+)
+
+(define-method get_is_multicast
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_multicast")
+ (return-type "gboolean")
+)
+
+(define-method get_is_mc_global
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_mc_global")
+ (return-type "gboolean")
+)
+
+(define-method get_is_mc_link_local
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_mc_link_local")
+ (return-type "gboolean")
+)
+
+(define-method get_is_mc_node_local
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_mc_node_local")
+ (return-type "gboolean")
+)
+
+(define-method get_is_mc_org_local
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_mc_org_local")
+ (return-type "gboolean")
+)
+
+(define-method get_is_mc_site_local
+ (of-object "GInetAddress")
+ (c-name "g_inet_address_get_is_mc_site_local")
+ (return-type "gboolean")
+)
+
+
+
+;; From ginitable.h
+
+(define-function initable_get_type
+ (c-name "g_initable_get_type")
+ (return-type "GType")
+)
+
+(define-method init
+ (of-object "GInitable")
+ (c-name "g_initable_init")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-function initable_new
+ (c-name "g_initable_new")
+ (return-type "gpointer")
+ (parameters
+ '("GType" "object_type")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ '("const-gchar*" "first_property_name")
+ )
+ (varargs #t)
+)
+
+(define-function initable_newv
+ (c-name "g_initable_newv")
+ (return-type "gpointer")
+ (parameters
+ '("GType" "object_type")
+ '("guint" "n_parameters")
+ '("GParameter*" "parameters")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-function initable_new_valist
+ (c-name "g_initable_new_valist")
+ (return-type "GObject*")
+ (parameters
+ '("GType" "object_type")
+ '("const-gchar*" "first_property_name")
+ '("va_list" "var_args")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From giostream.h
+
+(define-function io_stream_get_type
+ (c-name "g_io_stream_get_type")
+ (return-type "GType")
+)
+
+(define-method get_input_stream
+ (of-object "GIOStream")
+ (c-name "g_io_stream_get_input_stream")
+ (return-type "GInputStream*")
+)
+
+(define-method get_output_stream
+ (of-object "GIOStream")
+ (c-name "g_io_stream_get_output_stream")
+ (return-type "GOutputStream*")
+)
+
+(define-method close
+ (of-object "GIOStream")
+ (c-name "g_io_stream_close")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method close_async
+ (of-object "GIOStream")
+ (c-name "g_io_stream_close_async")
+ (return-type "none")
+ (parameters
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method close_finish
+ (of-object "GIOStream")
+ (c-name "g_io_stream_close_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method is_closed
+ (of-object "GIOStream")
+ (c-name "g_io_stream_is_closed")
+ (return-type "gboolean")
+)
+
+(define-method has_pending
+ (of-object "GIOStream")
+ (c-name "g_io_stream_has_pending")
+ (return-type "gboolean")
+)
+
+(define-method set_pending
+ (of-object "GIOStream")
+ (c-name "g_io_stream_set_pending")
+ (return-type "gboolean")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method clear_pending
+ (of-object "GIOStream")
+ (c-name "g_io_stream_clear_pending")
+ (return-type "none")
+)
+
+
+
+;; From glocaldirectorymonitor.h
+
+(define-function local_directory_monitor_get_type
+ (c-name "g_local_directory_monitor_get_type")
+ (return-type "GType")
+)
+
+
+
+;; From glocalfileenumerator.h
+
+
+
+;; From glocalfile.h
+
+
+
+;; From glocalfileinfo.h
+
+
+
+;; From glocalfileinputstream.h
+
+
+
+;; From glocalfilemonitor.h
+
+(define-function local_file_monitor_get_type
+ (c-name "g_local_file_monitor_get_type")
+ (return-type "GType")
+)
+
+
+
+;; From glocalfileoutputstream.h
+
+
+
+;; From glocalvfs.h
+
+
+
+;; From gmemoryinputstream.h
+
+(define-function memory_input_stream_get_type
+ (c-name "g_memory_input_stream_get_type")
+ (return-type "GType")
+)
+
+(define-function memory_input_stream_new
+ (c-name "g_memory_input_stream_new")
+ (is-constructor-of "GMemoryInputStream")
+ (return-type "GInputStream*")
+)
+
+(define-function memory_input_stream_new_from_data
+ (c-name "g_memory_input_stream_new_from_data")
+ (return-type "GInputStream*")
+ (parameters
+ '("const-void*" "data")
+ '("gssize" "len")
+ '("GDestroyNotify" "destroy")
+ )
+)
+
+;;
+;; wrapped in ginputstream.override
+;;
+(define-method add_data
+ (of-object "GMemoryInputStream")
+ (c-name "g_memory_input_stream_add_data")
+ (return-type "none")
+ (parameters
+ '("const-void*" "data")
+ '("gssize" "len")
+ '("GDestroyNotify" "destroy")
+ )
+)
+
+
+
+;; From gmemoryoutputstream.h
+
+(define-function memory_output_stream_get_type
+ (c-name "g_memory_output_stream_get_type")
+ (return-type "GType")
+)
+
+;;
+;; wrapped in goutputstream.override
+;;
+(define-function memory_output_stream_new
+ (c-name "g_memory_output_stream_new")
+ (is-constructor-of "GMemoryOutputStream")
+ (return-type "GOutputStream*")
+ (parameters
+ '("gpointer" "data")
+ '("gsize" "len")
+ '("GReallocFunc" "realloc_fn")
+ '("GDestroyNotify" "destroy")
+ )
+)
+
+;;
+;; wrapped in goutputstream.override
+;;
+;; Note: name clash with gobject.GObject.get_data; renamed.
+(define-method get_contents
+ (of-object "GMemoryOutputStream")
+ (c-name "g_memory_output_stream_get_data")
+ (return-type "gpointer")
+)
+
+(define-method get_size
+ (of-object "GMemoryOutputStream")
+ (c-name "g_memory_output_stream_get_size")
+ (return-type "gsize")
+)
+
+(define-method get_data_size
+ (of-object "GMemoryOutputStream")
+ (c-name "g_memory_output_stream_get_data_size")
+ (return-type "gsize")
+)
+
+
+
+;; From gmount.h
+
+(define-function mount_get_type
+ (c-name "g_mount_get_type")
+ (return-type "GType")
+)
+
+(define-method get_root
+ (of-object "GMount")
+ (c-name "g_mount_get_root")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+)
+
+(define-method get_name
+ (of-object "GMount")
+ (c-name "g_mount_get_name")
+ (return-type "char*")
+)
+
+(define-method get_icon
+ (of-object "GMount")
+ (c-name "g_mount_get_icon")
+ (return-type "GIcon*")
+ (caller-owns-return #t)
+)
+
+(define-method get_uuid
+ (of-object "GMount")
+ (c-name "g_mount_get_uuid")
+ (return-type "char*")
+)
+
+(define-method get_volume
+ (of-object "GMount")
+ (c-name "g_mount_get_volume")
+ (return-type "GVolume*")
+ (caller-owns-return #t)
+)
+
+(define-method get_drive
+ (of-object "GMount")
+ (c-name "g_mount_get_drive")
+ (return-type "GDrive*")
+ (caller-owns-return #t)
+)
+
+(define-method can_unmount
+ (of-object "GMount")
+ (c-name "g_mount_can_unmount")
+ (return-type "gboolean")
+)
+
+(define-method can_eject
+ (of-object "GMount")
+ (c-name "g_mount_can_eject")
+ (return-type "gboolean")
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-method unmount
+ (docstring
+"M.unmount(callback, [flags, cancellable, user_data])\n"
+"Unmounts a mount. This is an asynchronous operation, and is finished\n"
+"by calling gio.Mount.unmount_finish() with the mount and gio.AsyncResults\n"
+"data returned in the callback."
+)
+ (of-object "GMount")
+ (c-name "g_mount_unmount")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method unmount_finish
+ (of-object "GMount")
+ (c-name "g_mount_unmount_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-method eject
+ (docstring
+"F.eject(callback, [flags, cancellable, user_data])\n"
+"Ejects a volume.\n"
+"\n"
+"If cancellable is not None, then the operation can be cancelled by\n"
+"triggering the cancellable object from another thread. If the\n"
+"operation was cancelled, the error gio.ERROR_CANCELLED will be returned.\n"
+"\n"
+"When the operation is finished, callback will be called. You can\n"
+"then call gio.Volume.eject_finish() to get the result of the operation.\n")
+ (of-object "GMount")
+ (c-name "g_mount_eject")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method eject_finish
+ (of-object "GMount")
+ (c-name "g_mount_eject_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-method remount
+ (of-object "GMount")
+ (docstring
+ "M.remount(callback, [flags, [mount_operation, [cancellable, [user_data]]]])\n"
+ "Remounts a mount. This is an asynchronous operation, and is finished by\n"
+ "calling gio.Mount.remount_finish with the mount and gio.AsyncResults data\n"
+ "returned in the callback.")
+ (c-name "g_mount_remount")
+ (return-type "none")
+ (parameters
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method remount_finish
+ (of-object "GMount")
+ (c-name "g_mount_remount_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method guess_content_type
+ (of-object "GMount")
+ (c-name "g_mount_guess_content_type")
+ (return-type "none")
+ (parameters
+ '("gboolean" "force_rescan")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method guess_content_type_finish
+ (of-object "GMount")
+ (c-name "g_mount_guess_content_type_finish")
+ (return-type "gchar**")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method guess_content_type_sync
+ (of-object "GMount")
+ (c-name "g_mount_guess_content_type_sync")
+ (return-type "gchar**")
+ (parameters
+ '("gboolean" "force_rescan")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method is_shadowed
+ (of-object "GMount")
+ (c-name "g_mount_is_shadowed")
+ (return-type "gboolean")
+)
+
+(define-method shadow
+ (of-object "GMount")
+ (c-name "g_mount_shadow")
+ (return-type "none")
+)
+
+(define-method unshadow
+ (of-object "GMount")
+ (c-name "g_mount_unshadow")
+ (return-type "none")
+)
+
+(define-method unmount_with_operation
+ (of-object "GMount")
+ (c-name "g_mount_unmount_with_operation")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method unmount_with_operation_finish
+ (of-object "GMount")
+ (c-name "g_mount_unmount_with_operation_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method eject_with_operation
+ (of-object "GMount")
+ (c-name "g_mount_eject_with_operation")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method eject_with_operation_finish
+ (of-object "GMount")
+ (c-name "g_mount_eject_with_operation_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gmountoperation.h
+
+(define-function mount_operation_get_type
+ (c-name "g_mount_operation_get_type")
+ (return-type "GType")
+)
+
+(define-function mount_operation_new
+ (c-name "g_mount_operation_new")
+ (is-constructor-of "GMountOperation")
+ (return-type "GMountOperation*")
+)
+
+(define-method get_username
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_get_username")
+ (return-type "const-char*")
+)
+
+(define-method set_username
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_set_username")
+ (return-type "none")
+ (parameters
+ '("const-char*" "username")
+ )
+)
+
+(define-method get_password
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_get_password")
+ (return-type "const-char*")
+)
+
+(define-method set_password
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_set_password")
+ (return-type "none")
+ (parameters
+ '("const-char*" "password")
+ )
+)
+
+(define-method get_anonymous
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_get_anonymous")
+ (return-type "gboolean")
+)
+
+(define-method set_anonymous
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_set_anonymous")
+ (return-type "none")
+ (parameters
+ '("gboolean" "anonymous")
+ )
+)
+
+(define-method get_domain
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_get_domain")
+ (return-type "const-char*")
+)
+
+(define-method set_domain
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_set_domain")
+ (return-type "none")
+ (parameters
+ '("const-char*" "domain")
+ )
+)
+
+(define-method get_password_save
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_get_password_save")
+ (return-type "GPasswordSave")
+)
+
+(define-method set_password_save
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_set_password_save")
+ (return-type "none")
+ (parameters
+ '("GPasswordSave" "save")
+ )
+)
+
+(define-method get_choice
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_get_choice")
+ (return-type "int")
+)
+
+(define-method set_choice
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_set_choice")
+ (return-type "none")
+ (parameters
+ '("int" "choice")
+ )
+)
+
+(define-method reply
+ (of-object "GMountOperation")
+ (c-name "g_mount_operation_reply")
+ (return-type "none")
+ (parameters
+ '("GMountOperationResult" "result")
+ )
+)
+
+
+
+;; From gnativevolumemonitor.h
+
+(define-function native_volume_monitor_get_type
+ (c-name "g_native_volume_monitor_get_type")
+ (return-type "GType")
+)
+
+
+
+;; From gnetworkaddress.h
+
+(define-function network_address_get_type
+ (c-name "g_network_address_get_type")
+ (return-type "GType")
+)
+
+(define-function network_address_new
+ (c-name "g_network_address_new")
+ (is-constructor-of "GNetworkAddress")
+ (return-type "GSocketConnectable*")
+ (parameters
+ '("const-gchar*" "hostname")
+ '("guint16" "port")
+ )
+)
+
+(define-function network_address_parse
+ (c-name "g_network_address_parse")
+ (return-type "GSocketConnectable*")
+ (parameters
+ '("const-gchar*" "host_and_port")
+ '("guint16" "default_port")
+ '("GError**" "error")
+ )
+)
+
+(define-method get_hostname
+ (of-object "GNetworkAddress")
+ (c-name "g_network_address_get_hostname")
+ (return-type "const-gchar*")
+)
+
+(define-method get_port
+ (of-object "GNetworkAddress")
+ (c-name "g_network_address_get_port")
+ (return-type "guint16")
+)
+
+
+
+;; From gnetworkservice.h
+
+(define-function network_service_get_type
+ (c-name "g_network_service_get_type")
+ (return-type "GType")
+)
+
+(define-function network_service_new
+ (c-name "g_network_service_new")
+ (is-constructor-of "GNetworkService")
+ (return-type "GSocketConnectable*")
+ (parameters
+ '("const-gchar*" "service")
+ '("const-gchar*" "protocol")
+ '("const-gchar*" "domain")
+ )
+)
+
+(define-method get_service
+ (of-object "GNetworkService")
+ (c-name "g_network_service_get_service")
+ (return-type "const-gchar*")
+)
+
+(define-method get_protocol
+ (of-object "GNetworkService")
+ (c-name "g_network_service_get_protocol")
+ (return-type "const-gchar*")
+)
+
+(define-method get_domain
+ (of-object "GNetworkService")
+ (c-name "g_network_service_get_domain")
+ (return-type "const-gchar*")
+)
+
+
+
+;; From goutputstream.h
+
+(define-function output_stream_get_type
+ (c-name "g_output_stream_get_type")
+ (return-type "GType")
+)
+
+;;
+;; wrapped in goutputstream.override
+;;
+;; Note: the following two methods are renamed for consistency with
+;; Python file objects' write(). I.e. g_output_stream_write_all() is
+;; more like Python file.write(), so it is renamed write(). Since now
+;; there is a name clash, g_output_stream_write() is renamed
+;; write_part().
+(define-method write_part
+ (of-object "GOutputStream")
+ (docstring
+ "STREAM.write_part(buffer, [cancellable]) -> int\n"
+ "\n"
+ "Write the bytes in 'buffer' to the stream. Return the number of bytes\n"
+ "successfully written. This method is allowed to stop at any time after\n"
+ "writing at least 1 byte. Therefore, to reliably write the whole buffer,\n"
+ "you need to use a loop. See also gio.OutputStream.write for easier to\n"
+ "use (though less efficient) method.\n"
+ "\n"
+ "Note: this method roughly corresponds to C GIO g_output_stream_write."
+ )
+ (c-name "g_output_stream_write")
+ (return-type "gssize")
+ (parameters
+ '("const-void*" "buffer")
+ '("gsize" "count")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in goutputstream.override
+;;
+;; See comments before the previous method definition.
+(define-method write
+ (of-object "GOutputStream")
+ "STREAM.write(buffer, [cancellable]) -> int\n"
+ "\n"
+ "Write the bytes in 'buffer' to the stream. Return the number of bytes\n"
+ "successfully written. This method will stop only after writing the whole\n"
+ "buffer or triggering an I/O error. See also gio.OutputStream.write_part\n"
+ "for more efficient, but more cumbersome to use method.\n"
+ "\n"
+ "Note: this method roughly corresponds to C GIO g_output_stream_write_all.\n"
+ "It was renamed for consistency with Python standard file.write."
+ (c-name "g_output_stream_write_all")
+ (return-type "gboolean")
+ (parameters
+ '("const-void*" "buffer")
+ '("gsize" "count")
+ '("gsize*" "bytes_written")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method splice
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_splice")
+ (return-type "gssize")
+ (parameters
+ '("GInputStream*" "source")
+ '("GOutputStreamSpliceFlags" "flags" (default "G_OUTPUT_STREAM_SPLICE_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method flush
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_flush")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method close
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_close")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in goutputstream.override
+;;
+(define-method write_async
+ (of-object "GOutputStream")
+ (docstring
+"S.write_async(buffer, callback [,io_priority] [,cancellable] [,user_data])\n"
+"\n"
+"Request an asynchronous write of count bytes from buffer into the stream.\n"
+"When the operation is finished callback will be called. You can then call\n"
+"gio.OutputStream.write_finish() to get the result of the operation.\n"
+"On success, the number of bytes written will be passed to the callback.\n"
+"It is not an error if this is not the same as the requested size, as it can\n"
+"happen e.g. on a partial I/O error, but generally tries to write as many \n"
+"bytes as requested.\n"
+"For the synchronous, blocking version of this function, see\n"
+"gio.OutputStream.write().\n")
+ (c-name "g_output_stream_write_async")
+ (return-type "none")
+ (parameters
+ '("const-void*" "buffer")
+ '("gsize" "count")
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method write_finish
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_write_finish")
+ (return-type "gssize")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method splice_async
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_splice_async")
+ (return-type "none")
+ (parameters
+ '("GInputStream*" "source")
+ '("GOutputStreamSpliceFlags" "flags" (default "G_OUTPUT_STREAM_SPLICE_NONE"))
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method splice_finish
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_splice_finish")
+ (return-type "gssize")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method flush_async
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_flush_async")
+ (return-type "none")
+ (parameters
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method flush_finish
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_flush_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in goutputstream.override
+;;
+(define-method close_async
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_close_async")
+ (return-type "none")
+ (parameters
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method close_finish
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_close_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method is_closed
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_is_closed")
+ (return-type "gboolean")
+)
+
+(define-method has_pending
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_has_pending")
+ (return-type "gboolean")
+)
+
+(define-method set_pending
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_set_pending")
+ (return-type "gboolean")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method clear_pending
+ (of-object "GOutputStream")
+ (c-name "g_output_stream_clear_pending")
+ (return-type "none")
+)
+
+
+
+;; From gresolver.h
+
+(define-function resolver_get_type
+ (c-name "g_resolver_get_type")
+ (return-type "GType")
+)
+
+(define-function resolver_get_default
+ (c-name "g_resolver_get_default")
+ (return-type "GResolver*")
+)
+
+(define-method set_default
+ (of-object "GResolver")
+ (c-name "g_resolver_set_default")
+ (return-type "none")
+)
+
+(define-method lookup_by_name
+ (of-object "GResolver")
+ (c-name "g_resolver_lookup_by_name")
+ (return-type "GList*")
+ (parameters
+ '("const-gchar*" "hostname")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method lookup_by_name_async
+ (of-object "GResolver")
+ (c-name "g_resolver_lookup_by_name_async")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "hostname")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method lookup_by_name_finish
+ (of-object "GResolver")
+ (c-name "g_resolver_lookup_by_name_finish")
+ (return-type "GList*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-function resolver_free_addresses
+ (c-name "g_resolver_free_addresses")
+ (return-type "none")
+ (parameters
+ '("GList*" "addresses")
+ )
+)
+
+(define-method lookup_by_address
+ (of-object "GResolver")
+ (c-name "g_resolver_lookup_by_address")
+ (return-type "gchar*")
+ (parameters
+ '("GInetAddress*" "address")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method lookup_by_address_async
+ (of-object "GResolver")
+ (c-name "g_resolver_lookup_by_address_async")
+ (return-type "none")
+ (parameters
+ '("GInetAddress*" "address")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method lookup_by_address_finish
+ (of-object "GResolver")
+ (c-name "g_resolver_lookup_by_address_finish")
+ (return-type "gchar*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method lookup_service
+ (of-object "GResolver")
+ (c-name "g_resolver_lookup_service")
+ (return-type "GList*")
+ (parameters
+ '("const-gchar*" "service")
+ '("const-gchar*" "protocol")
+ '("const-gchar*" "domain")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method lookup_service_async
+ (of-object "GResolver")
+ (c-name "g_resolver_lookup_service_async")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "service")
+ '("const-gchar*" "protocol")
+ '("const-gchar*" "domain")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method lookup_service_finish
+ (of-object "GResolver")
+ (c-name "g_resolver_lookup_service_finish")
+ (return-type "GList*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-function resolver_free_targets
+ (c-name "g_resolver_free_targets")
+ (return-type "none")
+ (parameters
+ '("GList*" "targets")
+ )
+)
+
+(define-function resolver_error_quark
+ (c-name "g_resolver_error_quark")
+ (return-type "GQuark")
+)
+
+
+
+;; From gseekable.h
+
+(define-function seekable_get_type
+ (c-name "g_seekable_get_type")
+ (return-type "GType")
+)
+
+(define-method tell
+ (of-object "GSeekable")
+ (c-name "g_seekable_tell")
+ (return-type "goffset")
+)
+
+(define-method can_seek
+ (of-object "GSeekable")
+ (c-name "g_seekable_can_seek")
+ (return-type "gboolean")
+)
+
+(define-method seek
+ (of-object "GSeekable")
+ (c-name "g_seekable_seek")
+ (return-type "gboolean")
+ (parameters
+ '("goffset" "offset")
+ '("GSeekType" "type" (default "G_SEEK_SET"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method can_truncate
+ (of-object "GSeekable")
+ (c-name "g_seekable_can_truncate")
+ (return-type "gboolean")
+)
+
+(define-method truncate
+ (of-object "GSeekable")
+ (c-name "g_seekable_truncate")
+ (return-type "gboolean")
+ (parameters
+ '("goffset" "offset")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gsimpleasyncresult.h
+
+(define-function simple_async_result_get_type
+ (c-name "g_simple_async_result_get_type")
+ (return-type "GType")
+)
+
+(define-function simple_async_result_new
+ (c-name "g_simple_async_result_new")
+ (is-constructor-of "GSimpleAsyncResult")
+ (return-type "GSimpleAsyncResult*")
+ (parameters
+ '("GObject*" "source_object")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ '("gpointer" "source_tag")
+ )
+)
+
+(define-function simple_async_result_new_error
+ (c-name "g_simple_async_result_new_error")
+ (return-type "GSimpleAsyncResult*")
+ (parameters
+ '("GObject*" "source_object")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ '("GQuark" "domain")
+ '("gint" "code")
+ '("const-char*" "format")
+ )
+ (varargs #t)
+)
+
+(define-function simple_async_result_new_from_error
+ (c-name "g_simple_async_result_new_from_error")
+ (return-type "GSimpleAsyncResult*")
+ (parameters
+ '("GObject*" "source_object")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ '("GError*" "error")
+ )
+)
+
+(define-method set_op_res_gpointer
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_set_op_res_gpointer")
+ (return-type "none")
+ (parameters
+ '("gpointer" "op_res")
+ '("GDestroyNotify" "destroy_op_res")
+ )
+)
+
+(define-method get_op_res_gpointer
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_get_op_res_gpointer")
+ (return-type "gpointer")
+)
+
+(define-method set_op_res_gssize
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_set_op_res_gssize")
+ (return-type "none")
+ (parameters
+ '("gssize" "op_res")
+ )
+)
+
+(define-method get_op_res_gssize
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_get_op_res_gssize")
+ (return-type "gssize")
+)
+
+(define-method set_op_res_gboolean
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_set_op_res_gboolean")
+ (return-type "none")
+ (parameters
+ '("gboolean" "op_res")
+ )
+)
+
+(define-method get_op_res_gboolean
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_get_op_res_gboolean")
+ (return-type "gboolean")
+)
+
+(define-method get_source_tag
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_get_source_tag")
+ (return-type "gpointer")
+)
+
+(define-method set_handle_cancellation
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_set_handle_cancellation")
+ (return-type "none")
+ (parameters
+ '("gboolean" "handle_cancellation")
+ )
+)
+
+(define-method complete
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_complete")
+ (return-type "none")
+)
+
+(define-method complete_in_idle
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_complete_in_idle")
+ (return-type "none")
+)
+
+(define-method run_in_thread
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_run_in_thread")
+ (return-type "none")
+ (parameters
+ '("GSimpleAsyncThreadFunc" "func")
+ '("int" "io_priority" (default "G_PRIORITY_DEFAULT"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ )
+)
+
+(define-method set_from_error
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_set_from_error")
+ (return-type "none")
+ (parameters
+ '("GError*" "error")
+ )
+)
+
+(define-method propagate_error
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_propagate_error")
+ (return-type "gboolean")
+ (parameters
+ '("GError**" "dest")
+ )
+)
+
+(define-method set_error
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_set_error")
+ (return-type "none")
+ (parameters
+ '("GQuark" "domain")
+ '("gint" "code")
+ '("const-char*" "format")
+ )
+ (varargs #t)
+)
+
+(define-method set_error_va
+ (of-object "GSimpleAsyncResult")
+ (c-name "g_simple_async_result_set_error_va")
+ (return-type "none")
+ (parameters
+ '("GQuark" "domain")
+ '("gint" "code")
+ '("const-char*" "format")
+ '("va_list" "args")
+ )
+)
+
+(define-function simple_async_report_error_in_idle
+ (c-name "g_simple_async_report_error_in_idle")
+ (return-type "none")
+ (parameters
+ '("GObject*" "object")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ '("GQuark" "domain")
+ '("gint" "code")
+ '("const-char*" "format")
+ )
+ (varargs #t)
+)
+
+(define-function simple_async_report_gerror_in_idle
+ (c-name "g_simple_async_report_gerror_in_idle")
+ (return-type "none")
+ (parameters
+ '("GObject*" "object")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ '("GError*" "error")
+ )
+)
+
+
+
+;; From gsocketaddressenumerator.h
+
+(define-function socket_address_enumerator_get_type
+ (c-name "g_socket_address_enumerator_get_type")
+ (return-type "GType")
+)
+
+(define-method next
+ (of-object "GSocketAddressEnumerator")
+ (c-name "g_socket_address_enumerator_next")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method next_async
+ (of-object "GSocketAddressEnumerator")
+ (c-name "g_socket_address_enumerator_next_async")
+ (return-type "none")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method next_finish
+ (of-object "GSocketAddressEnumerator")
+ (c-name "g_socket_address_enumerator_next_finish")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gsocketaddress.h
+
+(define-function socket_address_get_type
+ (c-name "g_socket_address_get_type")
+ (return-type "GType")
+)
+
+(define-method get_family
+ (of-object "GSocketAddress")
+ (c-name "g_socket_address_get_family")
+ (return-type "GSocketFamily")
+)
+
+(define-function socket_address_new_from_native
+ (c-name "g_socket_address_new_from_native")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("gpointer" "native")
+ '("gsize" "len")
+ )
+)
+
+(define-method to_native
+ (of-object "GSocketAddress")
+ (c-name "g_socket_address_to_native")
+ (return-type "gboolean")
+ (parameters
+ '("gpointer" "dest")
+ '("gsize" "destlen")
+ '("GError**" "error")
+ )
+)
+
+(define-method get_native_size
+ (of-object "GSocketAddress")
+ (c-name "g_socket_address_get_native_size")
+ (return-type "gssize")
+)
+
+
+
+;; From gsocketclient.h
+
+(define-function socket_client_get_type
+ (c-name "g_socket_client_get_type")
+ (return-type "GType")
+)
+
+(define-function socket_client_new
+ (c-name "g_socket_client_new")
+ (is-constructor-of "GSocketClient")
+ (return-type "GSocketClient*")
+)
+
+(define-method get_family
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_get_family")
+ (return-type "GSocketFamily")
+)
+
+(define-method set_family
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_set_family")
+ (return-type "none")
+ (parameters
+ '("GSocketFamily" "family")
+ )
+)
+
+(define-method get_socket_type
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_get_socket_type")
+ (return-type "GSocketType")
+)
+
+(define-method set_socket_type
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_set_socket_type")
+ (return-type "none")
+ (parameters
+ '("GSocketType" "type")
+ )
+)
+
+(define-method get_protocol
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_get_protocol")
+ (return-type "GSocketProtocol")
+)
+
+(define-method set_protocol
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_set_protocol")
+ (return-type "none")
+ (parameters
+ '("GSocketProtocol" "protocol")
+ )
+)
+
+(define-method get_local_address
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_get_local_address")
+ (return-type "GSocketAddress*")
+)
+
+(define-method set_local_address
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_set_local_address")
+ (return-type "none")
+ (parameters
+ '("GSocketAddress*" "address")
+ )
+)
+
+(define-method connect
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect")
+ (return-type "GSocketConnection*")
+ (parameters
+ '("GSocketConnectable*" "connectable")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method connect_to_host
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_to_host")
+ (return-type "GSocketConnection*")
+ (parameters
+ '("const-gchar*" "host_and_port")
+ '("guint16" "default_port")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method connect_to_service
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_to_service")
+ (return-type "GSocketConnection*")
+ (parameters
+ '("const-gchar*" "domain")
+ '("const-gchar*" "service")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method connect_async
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_async")
+ (return-type "none")
+ (parameters
+ '("GSocketConnectable*" "connectable")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method connect_finish
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_finish")
+ (return-type "GSocketConnection*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method connect_to_host_async
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_to_host_async")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "host_and_port")
+ '("guint16" "default_port")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method connect_to_host_finish
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_to_host_finish")
+ (return-type "GSocketConnection*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-method connect_to_service_async
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_to_service_async")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "domain")
+ '("const-gchar*" "service")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method connect_to_service_finish
+ (of-object "GSocketClient")
+ (c-name "g_socket_client_connect_to_service_finish")
+ (return-type "GSocketConnection*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gsocketconnectable.h
+
+(define-function socket_connectable_get_type
+ (c-name "g_socket_connectable_get_type")
+ (return-type "GType")
+)
+
+(define-method enumerate
+ (of-object "GSocketConnectable")
+ (c-name "g_socket_connectable_enumerate")
+ (return-type "GSocketAddressEnumerator*")
+)
+
+
+
+;; From gsocketconnection.h
+
+(define-function socket_connection_get_type
+ (c-name "g_socket_connection_get_type")
+ (return-type "GType")
+)
+
+(define-method get_socket
+ (of-object "GSocketConnection")
+ (c-name "g_socket_connection_get_socket")
+ (return-type "GSocket*")
+)
+
+(define-method get_local_address
+ (of-object "GSocketConnection")
+ (c-name "g_socket_connection_get_local_address")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method get_remote_address
+ (of-object "GSocketConnection")
+ (c-name "g_socket_connection_get_remote_address")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-function socket_connection_factory_register_type
+ (c-name "g_socket_connection_factory_register_type")
+ (return-type "none")
+ (parameters
+ '("GType" "g_type")
+ '("GSocketFamily" "family")
+ '("GSocketType" "type")
+ '("gint" "protocol")
+ )
+)
+
+(define-function socket_connection_factory_lookup_type
+ (c-name "g_socket_connection_factory_lookup_type")
+ (return-type "GType")
+ (parameters
+ '("GSocketFamily" "family")
+ '("GSocketType" "type")
+ '("gint" "protocol_id")
+ )
+)
+
+(define-method connection_factory_create_connection
+ (of-object "GSocket")
+ (c-name "g_socket_connection_factory_create_connection")
+ (return-type "GSocketConnection*")
+)
+
+
+
+;; From gsocketcontrolmessage.h
+
+(define-function socket_control_message_get_type
+ (c-name "g_socket_control_message_get_type")
+ (return-type "GType")
+)
+
+(define-method get_size
+ (of-object "GSocketControlMessage")
+ (c-name "g_socket_control_message_get_size")
+ (return-type "gsize")
+)
+
+(define-method get_level
+ (of-object "GSocketControlMessage")
+ (c-name "g_socket_control_message_get_level")
+ (return-type "int")
+)
+
+(define-method get_msg_type
+ (of-object "GSocketControlMessage")
+ (c-name "g_socket_control_message_get_msg_type")
+ (return-type "int")
+)
+
+(define-method serialize
+ (of-object "GSocketControlMessage")
+ (c-name "g_socket_control_message_serialize")
+ (return-type "none")
+ (parameters
+ '("gpointer" "data")
+ )
+)
+
+(define-function socket_control_message_deserialize
+ (c-name "g_socket_control_message_deserialize")
+ (return-type "GSocketControlMessage*")
+ (parameters
+ '("int" "level")
+ '("int" "type")
+ '("gsize" "size")
+ '("gpointer" "data")
+ )
+)
+
+
+
+;; From gsocket.h
+
+(define-function socket_get_type
+ (c-name "g_socket_get_type")
+ (return-type "GType")
+)
+
+(define-function socket_new
+ (c-name "g_socket_new")
+ (is-constructor-of "GSocket")
+ (return-type "GSocket*")
+ (parameters
+ '("GSocketFamily" "family")
+ '("GSocketType" "type")
+ '("GSocketProtocol" "protocol")
+ '("GError**" "error")
+ )
+)
+
+(define-function socket_new_from_fd
+ (c-name "g_socket_new_from_fd")
+ (return-type "GSocket*")
+ (parameters
+ '("gint" "fd")
+ '("GError**" "error")
+ )
+)
+
+(define-method get_fd
+ (of-object "GSocket")
+ (c-name "g_socket_get_fd")
+ (return-type "int")
+)
+
+(define-method get_family
+ (of-object "GSocket")
+ (c-name "g_socket_get_family")
+ (return-type "GSocketFamily")
+)
+
+(define-method get_socket_type
+ (of-object "GSocket")
+ (c-name "g_socket_get_socket_type")
+ (return-type "GSocketType")
+)
+
+(define-method get_protocol
+ (of-object "GSocket")
+ (c-name "g_socket_get_protocol")
+ (return-type "GSocketProtocol")
+)
+
+(define-method get_local_address
+ (of-object "GSocket")
+ (c-name "g_socket_get_local_address")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method get_remote_address
+ (of-object "GSocket")
+ (c-name "g_socket_get_remote_address")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method set_blocking
+ (of-object "GSocket")
+ (c-name "g_socket_set_blocking")
+ (return-type "none")
+ (parameters
+ '("gboolean" "blocking")
+ )
+)
+
+(define-method get_blocking
+ (of-object "GSocket")
+ (c-name "g_socket_get_blocking")
+ (return-type "gboolean")
+)
+
+(define-method set_keepalive
+ (of-object "GSocket")
+ (c-name "g_socket_set_keepalive")
+ (return-type "none")
+ (parameters
+ '("gboolean" "keepalive")
+ )
+)
+
+(define-method get_keepalive
+ (of-object "GSocket")
+ (c-name "g_socket_get_keepalive")
+ (return-type "gboolean")
+)
+
+(define-method get_listen_backlog
+ (of-object "GSocket")
+ (c-name "g_socket_get_listen_backlog")
+ (return-type "gint")
+)
+
+(define-method set_listen_backlog
+ (of-object "GSocket")
+ (c-name "g_socket_set_listen_backlog")
+ (return-type "none")
+ (parameters
+ '("gint" "backlog")
+ )
+)
+
+(define-method is_connected
+ (of-object "GSocket")
+ (c-name "g_socket_is_connected")
+ (return-type "gboolean")
+)
+
+(define-method bind
+ (of-object "GSocket")
+ (c-name "g_socket_bind")
+ (return-type "gboolean")
+ (parameters
+ '("GSocketAddress*" "address")
+ '("gboolean" "allow_reuse")
+ '("GError**" "error")
+ )
+)
+
+(define-method connect
+ (of-object "GSocket")
+ (c-name "g_socket_connect")
+ (return-type "gboolean")
+ (parameters
+ '("GSocketAddress*" "address")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method check_connect_result
+ (of-object "GSocket")
+ (c-name "g_socket_check_connect_result")
+ (return-type "gboolean")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method condition_check
+ (of-object "GSocket")
+ (c-name "g_socket_condition_check")
+ (return-type "GIOCondition")
+ (parameters
+ '("GIOCondition" "condition")
+ )
+)
+
+(define-method condition_wait
+ (of-object "GSocket")
+ (c-name "g_socket_condition_wait")
+ (return-type "gboolean")
+ (parameters
+ '("GIOCondition" "condition")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method accept
+ (of-object "GSocket")
+ (c-name "g_socket_accept")
+ (return-type "GSocket*")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method listen
+ (of-object "GSocket")
+ (c-name "g_socket_listen")
+ (return-type "gboolean")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method receive
+ (of-object "GSocket")
+ (c-name "g_socket_receive")
+ (return-type "gssize")
+ (parameters
+ '("gchar*" "buffer")
+ '("gsize" "size")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method receive_from
+ (of-object "GSocket")
+ (c-name "g_socket_receive_from")
+ (return-type "gssize")
+ (parameters
+ '("GSocketAddress**" "address")
+ '("gchar*" "buffer")
+ '("gsize" "size")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method send
+ (of-object "GSocket")
+ (c-name "g_socket_send")
+ (return-type "gssize")
+ (parameters
+ '("const-gchar*" "buffer")
+ '("gsize" "size")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method send_to
+ (of-object "GSocket")
+ (c-name "g_socket_send_to")
+ (return-type "gssize")
+ (parameters
+ '("GSocketAddress*" "address")
+ '("const-gchar*" "buffer")
+ '("gsize" "size")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method receive_message
+ (of-object "GSocket")
+ (c-name "g_socket_receive_message")
+ (return-type "gssize")
+ (parameters
+ '("GSocketAddress**" "address")
+ '("GInputVector*" "vectors")
+ '("gint" "num_vectors")
+ '("GSocketControlMessage***" "messages")
+ '("gint*" "num_messages")
+ '("gint*" "flags")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method send_message
+ (of-object "GSocket")
+ (c-name "g_socket_send_message")
+ (return-type "gssize")
+ (parameters
+ '("GSocketAddress*" "address")
+ '("GOutputVector*" "vectors")
+ '("gint" "num_vectors")
+ '("GSocketControlMessage**" "messages")
+ '("gint" "num_messages")
+ '("gint" "flags")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method close
+ (of-object "GSocket")
+ (c-name "g_socket_close")
+ (return-type "gboolean")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method shutdown
+ (of-object "GSocket")
+ (c-name "g_socket_shutdown")
+ (return-type "gboolean")
+ (parameters
+ '("gboolean" "shutdown_read")
+ '("gboolean" "shutdown_write")
+ '("GError**" "error")
+ )
+)
+
+(define-method is_closed
+ (of-object "GSocket")
+ (c-name "g_socket_is_closed")
+ (return-type "gboolean")
+)
+
+(define-method create_source
+ (of-object "GSocket")
+ (c-name "g_socket_create_source")
+ (return-type "GSource*")
+ (parameters
+ '("GIOCondition" "condition")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ )
+)
+
+(define-method speaks_ipv4
+ (of-object "GSocket")
+ (c-name "g_socket_speaks_ipv4")
+ (return-type "gboolean")
+)
+
+
+
+;; From gsocketlistener.h
+
+(define-function socket_listener_get_type
+ (c-name "g_socket_listener_get_type")
+ (return-type "GType")
+)
+
+(define-function socket_listener_new
+ (c-name "g_socket_listener_new")
+ (is-constructor-of "GSocketListener")
+ (return-type "GSocketListener*")
+)
+
+(define-method set_backlog
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_set_backlog")
+ (return-type "none")
+ (parameters
+ '("int" "listen_backlog")
+ )
+)
+
+(define-method add_socket
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_add_socket")
+ (return-type "gboolean")
+ (parameters
+ '("GSocket*" "socket")
+ '("GObject*" "source_object")
+ '("GError**" "error")
+ )
+)
+
+(define-method add_address
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_add_address")
+ (return-type "gboolean")
+ (parameters
+ '("GSocketAddress*" "address")
+ '("GSocketType" "type")
+ '("GSocketProtocol" "protocol")
+ '("GObject*" "source_object")
+ '("GSocketAddress**" "effective_address")
+ '("GError**" "error")
+ )
+)
+
+(define-method add_inet_port
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_add_inet_port")
+ (return-type "gboolean")
+ (parameters
+ '("guint16" "port")
+ '("GObject*" "source_object")
+ '("GError**" "error")
+ )
+)
+
+(define-method accept_socket
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_accept_socket")
+ (return-type "GSocket*")
+ (parameters
+ '("GObject**" "source_object")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method accept_socket_async
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_accept_socket_async")
+ (return-type "none")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method accept_socket_finish
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_accept_socket_finish")
+ (return-type "GSocket*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GObject**" "source_object")
+ '("GError**" "error")
+ )
+)
+
+(define-method accept
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_accept")
+ (return-type "GSocketConnection*")
+ (parameters
+ '("GObject**" "source_object")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GError**" "error")
+ )
+)
+
+(define-method accept_async
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_accept_async")
+ (return-type "none")
+ (parameters
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method accept_finish
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_accept_finish")
+ (return-type "GSocketConnection*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GObject**" "source_object")
+ '("GError**" "error")
+ )
+)
+
+(define-method close
+ (of-object "GSocketListener")
+ (c-name "g_socket_listener_close")
+ (return-type "none")
+)
+
+
+
+;; From gsocketservice.h
+
+(define-function socket_service_get_type
+ (c-name "g_socket_service_get_type")
+ (return-type "GType")
+)
+
+(define-function socket_service_new
+ (c-name "g_socket_service_new")
+ (is-constructor-of "GSocketService")
+ (return-type "GSocketService*")
+)
+
+(define-method start
+ (of-object "GSocketService")
+ (c-name "g_socket_service_start")
+ (return-type "none")
+)
+
+(define-method stop
+ (of-object "GSocketService")
+ (c-name "g_socket_service_stop")
+ (return-type "none")
+)
+
+(define-method is_active
+ (of-object "GSocketService")
+ (c-name "g_socket_service_is_active")
+ (return-type "gboolean")
+)
+
+
+
+;; From gsrvtarget.h
+
+(define-function srv_target_get_type
+ (c-name "g_srv_target_get_type")
+ (return-type "GType")
+)
+
+(define-function srv_target_new
+ (c-name "g_srv_target_new")
+ (is-constructor-of "GSrvTarget")
+ (return-type "GSrvTarget*")
+ (parameters
+ '("const-gchar*" "hostname")
+ '("guint16" "port")
+ '("guint16" "priority")
+ '("guint16" "weight")
+ )
+)
+
+(define-method copy
+ (of-object "GSrvTarget")
+ (c-name "g_srv_target_copy")
+ (return-type "GSrvTarget*")
+)
+
+(define-method free
+ (of-object "GSrvTarget")
+ (c-name "g_srv_target_free")
+ (return-type "none")
+)
+
+(define-method get_hostname
+ (of-object "GSrvTarget")
+ (c-name "g_srv_target_get_hostname")
+ (return-type "const-gchar*")
+)
+
+(define-method get_port
+ (of-object "GSrvTarget")
+ (c-name "g_srv_target_get_port")
+ (return-type "guint16")
+)
+
+(define-method get_priority
+ (of-object "GSrvTarget")
+ (c-name "g_srv_target_get_priority")
+ (return-type "guint16")
+)
+
+(define-method get_weight
+ (of-object "GSrvTarget")
+ (c-name "g_srv_target_get_weight")
+ (return-type "guint16")
+)
+
+(define-function srv_target_list_sort
+ (c-name "g_srv_target_list_sort")
+ (return-type "GList*")
+ (parameters
+ '("GList*" "targets")
+ )
+)
+
+
+
+;; From gthemedicon.h
+
+(define-function themed_icon_get_type
+ (c-name "g_themed_icon_get_type")
+ (return-type "GType")
+)
+
+(define-function themed_icon_new
+ (c-name "g_themed_icon_new")
+ (is-constructor-of "GThemedIcon")
+ (return-type "GIcon*")
+ (properties
+ '("name" (argname "iconname"))
+ )
+)
+
+(define-function themed_icon_new_with_default_fallbacks
+ (c-name "g_themed_icon_new_with_default_fallbacks")
+ (return-type "GIcon*")
+ (parameters
+ '("const-char*" "iconname")
+ )
+)
+
+(define-function themed_icon_new_from_names
+ (c-name "g_themed_icon_new_from_names")
+ (return-type "GIcon*")
+ (parameters
+ '("char**" "iconnames")
+ '("int" "len")
+ )
+)
+
+(define-method prepend_name
+ (of-object "GThemedIcon")
+ (c-name "g_themed_icon_prepend_name")
+ (return-type "none")
+ (parameters
+ '("const-char*" "iconname")
+ )
+)
+
+;;
+;; wrapped in gicon.override
+;;
+(define-method get_names
+ (c-name "g_themed_icon_get_names")
+ (of-object "GThemedIcon")
+ (return-type "const-gchar*-const*")
+)
+
+(define-method append_name
+ (c-name "g_themed_icon_append_name")
+ (of-object "GThemedIcon")
+ (return-type "none")
+ (parameters
+ '("char*" "iconname")
+ )
+)
+
+
+
+;; From gthreadedsocketservice.h
+
+(define-function threaded_socket_service_get_type
+ (c-name "g_threaded_socket_service_get_type")
+ (return-type "GType")
+)
+
+(define-function threaded_socket_service_new
+ (c-name "g_threaded_socket_service_new")
+ (is-constructor-of "GThreadedSocketService")
+ (return-type "GSocketService*")
+ (parameters
+ '("int" "max_threads")
+ )
+)
+
+
+
+;; From gunixinputstream.h
+
+(define-function unix_input_stream_get_type
+ (c-name "g_unix_input_stream_get_type")
+ (return-type "GType")
+)
+
+(define-function unix_input_stream_new
+ (c-name "g_unix_input_stream_new")
+ (is-constructor-of "GUnixInputStream")
+ (return-type "GInputStream*")
+ (parameters
+ '("int" "fd")
+ '("gboolean" "close_fd_at_close")
+ )
+)
+
+
+
+;; From gvfs.h
+
+(define-function vfs_get_type
+ (c-name "g_vfs_get_type")
+ (return-type "GType")
+)
+
+(define-method is_active
+ (of-object "GVfs")
+ (c-name "g_vfs_is_active")
+ (return-type "gboolean")
+)
+
+(define-method get_file_for_path
+ (of-object "GVfs")
+ (c-name "g_vfs_get_file_for_path")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "path")
+ )
+)
+
+(define-method get_file_for_uri
+ (of-object "GVfs")
+ (c-name "g_vfs_get_file_for_uri")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "uri")
+ )
+)
+
+(define-method parse_name
+ (of-object "GVfs")
+ (c-name "g_vfs_parse_name")
+ (return-type "GFile*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "parse_name")
+ )
+)
+
+(define-function vfs_get_default
+ (c-name "g_vfs_get_default")
+ (return-type "GVfs*")
+)
+
+(define-function vfs_get_local
+ (c-name "g_vfs_get_local")
+ (return-type "GVfs*")
+)
+
+;;
+;; wrapped in gio.override
+;;
+(define-method get_supported_uri_schemes
+ (docstring
+"VFS.get_supported_uri_schemes() -> [uri, ..]\n"
+"Gets a list of URI schemes supported by vfs.")
+ (of-object "GVfs")
+ (c-name "g_vfs_get_supported_uri_schemes")
+ (return-type "const-char*-const*")
+)
+
+
+
+;; From gwin32appinfo.h
+
+(define-function win32_app_info_get_type
+ (c-name "g_win32_app_info_get_type")
+ (return-type "GType")
+)
+
+
+
+;; From gvolume.h
+
+(define-function volume_get_type
+ (c-name "g_volume_get_type")
+ (return-type "GType")
+)
+
+(define-method get_name
+ (of-object "GVolume")
+ (c-name "g_volume_get_name")
+ (return-type "char*")
+)
+
+(define-method get_icon
+ (of-object "GVolume")
+ (c-name "g_volume_get_icon")
+ (return-type "GIcon*")
+ (caller-owns-return #t)
+)
+
+(define-method get_uuid
+ (of-object "GVolume")
+ (c-name "g_volume_get_uuid")
+ (return-type "char*")
+)
+
+(define-method get_drive
+ (of-object "GVolume")
+ (c-name "g_volume_get_drive")
+ (return-type "GDrive*")
+ (caller-owns-return #t)
+)
+
+(define-method get_mount
+ (of-object "GVolume")
+ (c-name "g_volume_get_mount")
+ (return-type "GMount*")
+ (caller-owns-return #t)
+)
+
+(define-method can_mount
+ (of-object "GVolume")
+ (c-name "g_volume_can_mount")
+ (return-type "gboolean")
+)
+
+(define-method can_eject
+ (of-object "GVolume")
+ (c-name "g_volume_can_eject")
+ (return-type "gboolean")
+)
+
+(define-method should_automount
+ (of-object "GVolume")
+ (c-name "g_volume_should_automount")
+ (return-type "gboolean")
+)
+
+;;
+;; wrapped in gvolume.override
+;;
+(define-method mount
+ (of-object "GVolume")
+ (c-name "g_volume_mount")
+ (return-type "none")
+ (parameters
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method mount_finish
+ (of-object "GVolume")
+ (c-name "g_volume_mount_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+;;
+;; wrapped in gvolume.override
+;;
+(define-method eject
+ (of-object "GVolume")
+ (c-name "g_volume_eject")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags" (default "G_MOUNT_UNMOUNT_NONE"))
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method eject_finish
+ (of-object "GVolume")
+ (c-name "g_volume_eject_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+ (deprecated "use gio.Drive.eject_with_operation_finish instead.")
+)
+
+(define-method get_identifier
+ (of-object "GVolume")
+ (c-name "g_volume_get_identifier")
+ (return-type "char*")
+ (parameters
+ '("const-char*" "kind")
+ )
+)
+
+;;
+;; wrapped in gvolume.override
+;;
+(define-method enumerate_identifiers
+ (of-object "GVolume")
+ (c-name "g_volume_enumerate_identifiers")
+ (return-type "char**")
+)
+
+(define-method get_activation_root
+ (of-object "GVolume")
+ (c-name "g_volume_get_activation_root")
+ (return-type "GFile*")
+)
+
+(define-method eject_with_operation
+ (of-object "GVolume")
+ (c-name "g_volume_eject_with_operation")
+ (return-type "none")
+ (parameters
+ '("GMountUnmountFlags" "flags")
+ '("GMountOperation*" "mount_operation")
+ '("GCancellable*" "cancellable" (null-ok) (default "NULL"))
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method eject_with_operation_finish
+ (of-object "GVolume")
+ (c-name "g_volume_eject_with_operation_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gvolumemonitor.h
+
+(define-function volume_monitor_get_type
+ (c-name "g_volume_monitor_get_type")
+ (return-type "GType")
+)
+
+(define-function volume_monitor_get
+ (c-name "g_volume_monitor_get")
+ (return-type "GVolumeMonitor*")
+)
+
+;;
+;; wrapped in gvolumemonitor.override
+;;
+(define-method get_connected_drives
+ (of-object "GVolumeMonitor")
+ (c-name "g_volume_monitor_get_connected_drives")
+ (return-type "GList*")
+)
+
+;;
+;; wrapped in gvolumemonitor.override
+;;
+(define-method get_volumes
+ (of-object "GVolumeMonitor")
+ (c-name "g_volume_monitor_get_volumes")
+ (return-type "GList*")
+)
+
+;;
+;; wrapped in gvolumemonitor.override
+;;
+(define-method get_mounts
+ (of-object "GVolumeMonitor")
+ (c-name "g_volume_monitor_get_mounts")
+ (return-type "GList*")
+)
+
+(define-method get_volume_for_uuid
+ (of-object "GVolumeMonitor")
+ (c-name "g_volume_monitor_get_volume_for_uuid")
+ (return-type "GVolume*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "uuid")
+ )
+)
+
+(define-method get_mount_for_uuid
+ (of-object "GVolumeMonitor")
+ (c-name "g_volume_monitor_get_mount_for_uuid")
+ (return-type "GMount*")
+ (caller-owns-return #t)
+ (parameters
+ '("const-char*" "uuid")
+ )
+)
+
+(define-function volume_monitor_adopt_orphan_mount
+ (c-name "g_volume_monitor_adopt_orphan_mount")
+ (return-type "GVolume*")
+ (parameters
+ '("GMount*" "mount")
+ )
+)
+
diff --git a/gio/gio.override b/gio/gio.override
new file mode 100644
index 0000000..6d001b9
--- /dev/null
+++ b/gio/gio.override
@@ -0,0 +1,404 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * gio.override: module wrapping the GIO library
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+modulename gio
+%%
+import gobject.GObject as PyGObject_Type
+import glib.PollFD as PyGPollFD_Type
+%%
+headers
+#define NO_IMPORT_PYGOBJECT
+#include <pygobject.h>
+#include <gio/gio.h>
+#include "pygio-utils.h"
+#include "pyglib.h"
+#include "pygsource.h"
+
+#define BUFSIZE 8192
+
+typedef struct _PyGIONotify PyGIONotify;
+
+struct _PyGIONotify {
+ gboolean referenced;
+ PyObject *callback;
+ PyObject *data;
+ gboolean attach_self;
+ gpointer buffer;
+ gsize buffer_size;
+
+ /* If a structure has any 'slaves', those will reference their
+ * callbacks and be freed together with the 'master'. */
+ PyGIONotify *slaves;
+};
+
+static GQuark
+pygio_notify_get_internal_quark(void)
+{
+ static GQuark quark = 0;
+ if (!quark)
+ quark = g_quark_from_string("pygio::notify");
+ return quark;
+}
+
+static PyGIONotify *
+pygio_notify_new(void)
+{
+ return g_slice_new0(PyGIONotify);
+}
+
+static PyGIONotify *
+pygio_notify_new_slave(PyGIONotify* master)
+{
+ PyGIONotify *slave = pygio_notify_new();
+
+ while (master->slaves)
+ master = master->slaves;
+ master->slaves = slave;
+
+ return slave;
+}
+
+static gboolean
+pygio_notify_using_optional_callback(PyGIONotify *notify)
+{
+ if (notify->callback)
+ return TRUE;
+ else {
+ notify->data = NULL;
+ return FALSE;
+ }
+}
+
+static gboolean
+pygio_notify_callback_is_valid_full(PyGIONotify *notify, const gchar *name)
+{
+ if (!notify->callback) {
+ PyErr_SetString(PyExc_RuntimeError, "internal error: callback is not set");
+ return FALSE;
+ }
+
+ if (!PyCallable_Check(notify->callback)) {
+ gchar *error_message = g_strdup_printf("%s argument not callable", name);
+
+ PyErr_SetString(PyExc_TypeError, error_message);
+ g_free(error_message);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static gboolean
+pygio_notify_callback_is_valid(PyGIONotify *notify)
+{
+ return pygio_notify_callback_is_valid_full(notify, "callback");
+}
+
+static void
+pygio_notify_reference_callback(PyGIONotify *notify)
+{
+ if (!notify->referenced) {
+ notify->referenced = TRUE;
+ Py_XINCREF(notify->callback);
+ Py_XINCREF(notify->data);
+
+ if (notify->slaves)
+ pygio_notify_reference_callback(notify->slaves);
+ }
+}
+
+static void
+pygio_notify_copy_buffer(PyGIONotify *notify, gpointer buffer, gsize buffer_size)
+{
+ if (buffer_size > 0) {
+ notify->buffer = g_slice_copy(buffer_size, buffer);
+ notify->buffer_size = buffer_size;
+ }
+}
+
+static gboolean
+pygio_notify_allocate_buffer(PyGIONotify *notify, gsize buffer_size)
+{
+ if (buffer_size > 0) {
+ notify->buffer = g_slice_alloc(buffer_size);
+ if (!notify->buffer) {
+ PyErr_Format(PyExc_MemoryError, "failed to allocate %d bytes", buffer_size);
+ return FALSE;
+ }
+
+ notify->buffer_size = buffer_size;
+ }
+
+ return TRUE;
+}
+
+static void
+pygio_notify_attach_to_result(PyGIONotify *notify)
+{
+ notify->attach_self = TRUE;
+}
+
+static PyGIONotify *
+pygio_notify_get_attached(PyGObject *result)
+{
+ return g_object_get_qdata(G_OBJECT(result->obj), pygio_notify_get_internal_quark());
+}
+
+static void
+pygio_notify_free(PyGIONotify *notify)
+{
+ if (notify) {
+ if (notify->slaves)
+ pygio_notify_free(notify->slaves);
+
+ if (notify->referenced) {
+ PyGILState_STATE state;
+
+ state = pyg_gil_state_ensure();
+ Py_XDECREF(notify->callback);
+ Py_XDECREF(notify->data);
+ pyg_gil_state_release(state);
+ }
+
+ if (notify->buffer)
+ g_slice_free1(notify->buffer_size, notify->buffer);
+
+ g_slice_free(PyGIONotify, notify);
+ }
+}
+
+static void
+async_result_callback_marshal(GObject *source_object,
+ GAsyncResult *result,
+ PyGIONotify *notify)
+{
+ PyObject *ret;
+ PyGILState_STATE state;
+
+ state = pyg_gil_state_ensure();
+
+ if (!notify->referenced)
+ g_warning("pygio_notify_reference_callback() hasn't been called before using the structure");
+
+ if (notify->attach_self) {
+ g_object_set_qdata_full(G_OBJECT(result), pygio_notify_get_internal_quark(),
+ notify, (GDestroyNotify) pygio_notify_free);
+ }
+
+ if (notify->data)
+ ret = PyEval_CallFunction(notify->callback, "NNO",
+ pygobject_new(source_object),
+ pygobject_new((GObject *)result),
+ notify->data);
+ else
+ ret = PyObject_CallFunction(notify->callback, "NN",
+ pygobject_new(source_object),
+ pygobject_new((GObject *)result));
+
+ if (ret == NULL) {
+ PyErr_Print();
+ PyErr_Clear();
+ }
+
+ Py_XDECREF(ret);
+
+ /* Otherwise the structure is attached to 'result' and will be
+ * freed when that object dies. */
+ if (!notify->attach_self)
+ pygio_notify_free(notify);
+
+ pyg_gil_state_release(state);
+}
+%%
+include
+ gappinfo.override
+ gapplaunchcontext.override
+ gbufferedinputstream.override
+ gcancellable.override
+ gdatainputstream.override
+ gdrive.override
+ gfile.override
+ gfileattribute.override
+ gfileenumerator.override
+ gfileinfo.override
+ gfileinputstream.override
+ gfileiostream.override
+ gfileoutputstream.override
+ gicon.override
+ giostream.override
+ gmemoryinputstream.override
+ gmemoryoutputstream.override
+ gmount.override
+ ginputstream.override
+ goutputstream.override
+ gresolver.override
+ gsocket.override
+ gvolume.override
+ gvolumemonitor.override
+%%
+ignore-glob
+ *_get_type
+ *free
+ *_ref
+ *_unref
+ g_async_result_get_user_data
+ g_file_new_from_commandline_arg
+ g_file_new_from_path
+ g_file_new_from_uri
+ g_file_hash
+ g_io_error_quark
+ g_simple_async_result_new_error
+ g_simple_async_report_error_in_idle
+ g_simple_async_result_set_op_res_gpointer
+ g_simple_async_result_get_op_res_gpointer
+ g_simple_async_result_get_source_tag
+ g_simple_async_result_run_in_thread
+ g_simple_async_result_set_from_error
+ g_simple_async_result_set_error
+ g_simple_async_result_set_error_va
+ g_io_module*
+ g_io_scheduler_*
+%%
+override g_app_info_get_all noargs
+static PyObject *
+_wrap_g_app_info_get_all (PyGObject *self)
+{
+ GList *list, *l;
+ PyObject *ret;
+
+ list = g_app_info_get_all ();
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ GObject *obj = l->data;
+ PyObject *item = pygobject_new(obj);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ }
+ g_list_free(list);
+
+ return ret;
+}
+%%
+override g_app_info_get_all_for_type args
+static PyObject *
+_wrap_g_app_info_get_all_for_type (PyGObject *self, PyObject *args)
+{
+ GList *list, *l;
+ PyObject *ret;
+ gchar *type;
+
+ if (!PyArg_ParseTuple (args, "s:app_info_get_all_for_type", &type))
+ return NULL;
+
+ list = g_app_info_get_all_for_type (type);
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ GObject *obj = l->data;
+ PyObject *item = pygobject_new(obj);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ }
+ g_list_free(list);
+
+ return ret;
+}
+%%
+override g_content_type_guess kwargs
+static PyObject *
+_wrap_g_content_type_guess(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ char *kwlist[] = {"filename", "data", "want_uncertain", NULL};
+ char *filename = NULL, *data = NULL, *type;
+ int data_size = 0;
+ gboolean result_uncertain, want_uncertain = FALSE;
+ PyObject *ret;
+
+ if (!PyArg_ParseTupleAndKeywords (args, kwargs,
+ "|zz#i:g_content_type_guess",
+ kwlist,
+ &filename, &data, &data_size,
+ &want_uncertain))
+ return NULL;
+
+ if (!filename && !data) {
+ PyErr_SetString(PyExc_TypeError, "need at least one argument");
+ return NULL;
+ }
+
+ type = g_content_type_guess(filename, (guchar *) data,
+ data_size, &result_uncertain);
+
+ if (want_uncertain) {
+ ret = Py_BuildValue("zN", type, PyBool_FromLong(result_uncertain));
+
+ } else {
+ ret = PyString_FromString(type);
+ }
+
+ g_free(type);
+ return ret;
+}
+%%
+override g_vfs_get_supported_uri_schemes noargs
+static PyObject *
+_wrap_g_vfs_get_supported_uri_schemes(PyGObject *self)
+{
+ const char * const *names;
+ PyObject *ret;
+
+ names = g_vfs_get_supported_uri_schemes(G_VFS(self->obj));
+
+ ret = PyList_New(0);
+ while (names && *names) {
+ PyObject *item = PyString_FromString(names[0]);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+
+ names++;
+ }
+
+ return ret;
+}
+%%
+override g_content_types_get_registered noargs
+static PyObject *
+_wrap_g_content_types_get_registered(PyObject *self)
+{
+ GList *list, *l;
+ PyObject *ret;
+
+ list = g_content_types_get_registered();
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ char *content_type = l->data;
+ PyObject *string = PyString_FromString(content_type);
+ PyList_Append(ret, string);
+ Py_DECREF(string);
+ g_free(content_type);
+ }
+ g_list_free(list);
+
+ return ret;
+}
diff --git a/gio/giomodule.c b/gio/giomodule.c
new file mode 100644
index 0000000..409aeef
--- /dev/null
+++ b/gio/giomodule.c
@@ -0,0 +1,205 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * giomodule.c: module wrapping the GIO library
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#include <Python.h>
+#include <pyglib.h>
+#include <pygobject.h>
+
+#include <gio/gio.h>
+
+#define PYGIO_MAJOR_VERSION PYGOBJECT_MAJOR_VERSION
+#define PYGIO_MINOR_VERSION PYGOBJECT_MINOR_VERSION
+#define PYGIO_MICRO_VERSION PYGOBJECT_MICRO_VERSION
+
+/* include any extra headers needed here */
+
+void pygio_register_classes(PyObject *d);
+void pygio_add_constants(PyObject *module, const gchar *strip_prefix);
+
+extern PyMethodDef pygio_functions[];
+
+DL_EXPORT(void)
+init_gio(void)
+{
+ PyObject *m, *d;
+ PyObject *tuple;
+ PyObject *e;
+ /* perform any initialisation required by the library here */
+
+ m = Py_InitModule("gio._gio", pygio_functions);
+ d = PyModule_GetDict(m);
+
+ g_type_init();
+ pyglib_init();
+
+ init_pygobject_check(2, 15, 2);
+
+ pygio_register_classes(d);
+ pygio_add_constants(m, "G_IO_");
+
+ PyModule_AddStringConstant(m, "ERROR", g_quark_to_string(G_IO_ERROR));
+ e = pyglib_register_exception_for_domain("gio.Error", G_IO_ERROR);
+ PyDict_SetItemString(d, "Error", e);
+ Py_DECREF(e);
+
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_TYPE",
+ G_FILE_ATTRIBUTE_STANDARD_TYPE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_IS_HIDDEN",
+ G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_IS_BACKUP",
+ G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_IS_SYMLINK",
+ G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL",
+ G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_NAME",
+ G_FILE_ATTRIBUTE_STANDARD_NAME);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME",
+ G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_EDIT_NAME",
+ G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_COPY_NAME",
+ G_FILE_ATTRIBUTE_STANDARD_COPY_NAME);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_DESCRIPTION",
+ G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_ICON",
+ G_FILE_ATTRIBUTE_STANDARD_ICON);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE",
+ G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE",
+ G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_SIZE",
+ G_FILE_ATTRIBUTE_STANDARD_SIZE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET",
+ G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_TARGET_URI",
+ G_FILE_ATTRIBUTE_STANDARD_TARGET_URI);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_STANDARD_SORT_ORDER",
+ G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ETAG_VALUE",
+ G_FILE_ATTRIBUTE_ETAG_VALUE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ID_FILE",
+ G_FILE_ATTRIBUTE_ID_FILE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ID_FILESYSTEM",
+ G_FILE_ATTRIBUTE_ID_FILESYSTEM);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ACCESS_CAN_READ",
+ G_FILE_ATTRIBUTE_ACCESS_CAN_READ);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ACCESS_CAN_WRITE",
+ G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE",
+ G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ACCESS_CAN_DELETE",
+ G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ACCESS_CAN_TRASH",
+ G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_ACCESS_CAN_RENAME",
+ G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT",
+ G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT",
+ G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT",
+ G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE",
+ G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI",
+ G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_MODIFIED",
+ G_FILE_ATTRIBUTE_TIME_MODIFIED);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_MODIFIED_USEC",
+ G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_ACCESS",
+ G_FILE_ATTRIBUTE_TIME_ACCESS);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_ACCESS_USEC",
+ G_FILE_ATTRIBUTE_TIME_ACCESS_USEC);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_CHANGED",
+ G_FILE_ATTRIBUTE_TIME_CHANGED);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_CHANGED_USEC",
+ G_FILE_ATTRIBUTE_TIME_CHANGED_USEC);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_CREATED",
+ G_FILE_ATTRIBUTE_TIME_CREATED);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TIME_CREATED_USEC",
+ G_FILE_ATTRIBUTE_TIME_CREATED_USEC);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_DEVICE",
+ G_FILE_ATTRIBUTE_UNIX_DEVICE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_INODE",
+ G_FILE_ATTRIBUTE_UNIX_INODE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_MODE",
+ G_FILE_ATTRIBUTE_UNIX_MODE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_NLINK",
+ G_FILE_ATTRIBUTE_UNIX_NLINK);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_UID",
+ G_FILE_ATTRIBUTE_UNIX_UID);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_GID",
+ G_FILE_ATTRIBUTE_UNIX_GID);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_RDEV",
+ G_FILE_ATTRIBUTE_UNIX_RDEV);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_BLOCK_SIZE",
+ G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_BLOCKS",
+ G_FILE_ATTRIBUTE_UNIX_BLOCKS);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT",
+ G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_DOS_IS_ARCHIVE",
+ G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_DOS_IS_SYSTEM",
+ G_FILE_ATTRIBUTE_DOS_IS_SYSTEM);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_OWNER_USER",
+ G_FILE_ATTRIBUTE_OWNER_USER);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_OWNER_USER_REAL",
+ G_FILE_ATTRIBUTE_OWNER_USER_REAL);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_OWNER_GROUP",
+ G_FILE_ATTRIBUTE_OWNER_GROUP);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_THUMBNAIL_PATH",
+ G_FILE_ATTRIBUTE_THUMBNAIL_PATH);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_THUMBNAILING_FAILED",
+ G_FILE_ATTRIBUTE_THUMBNAILING_FAILED);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_FILESYSTEM_SIZE",
+ G_FILE_ATTRIBUTE_FILESYSTEM_SIZE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_FILESYSTEM_FREE",
+ G_FILE_ATTRIBUTE_FILESYSTEM_FREE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_FILESYSTEM_TYPE",
+ G_FILE_ATTRIBUTE_FILESYSTEM_TYPE);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_FILESYSTEM_READONLY",
+ G_FILE_ATTRIBUTE_FILESYSTEM_READONLY);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW",
+ G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_GVFS_BACKEND",
+ G_FILE_ATTRIBUTE_GVFS_BACKEND);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_SELINUX_CONTEXT",
+ G_FILE_ATTRIBUTE_SELINUX_CONTEXT);
+ PyModule_AddStringConstant(m, "FILE_ATTRIBUTE_TRASH_ITEM_COUNT",
+ G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT);
+
+ PyModule_AddStringConstant(m, "ERROR", g_quark_to_string(G_IO_ERROR));
+
+ /* pygio version */
+ tuple = Py_BuildValue ("(iii)",
+ PYGIO_MAJOR_VERSION,
+ PYGIO_MINOR_VERSION,
+ PYGIO_MICRO_VERSION);
+ PyDict_SetItemString(d, "pygio_version", tuple);
+ Py_DECREF(tuple);
+}
+
diff --git a/gio/giostream.override b/gio/giostream.override
new file mode 100644
index 0000000..29ec801
--- /dev/null
+++ b/gio/giostream.override
@@ -0,0 +1,68 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * giostream.override: module overrides for GIOStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+%%
+override g_io_stream_close_async kwargs
+static PyObject *
+_wrap_g_io_stream_close_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "io_priority", "cancellable",
+ "user_data", NULL };
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:IOStream.close_async",
+ kwlist,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_io_stream_close_async(G_IO_STREAM(self->obj),
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/gmemoryinputstream.override b/gio/gmemoryinputstream.override
new file mode 100644
index 0000000..0495338
--- /dev/null
+++ b/gio/gmemoryinputstream.override
@@ -0,0 +1,91 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gmemoryinputstream.override: module overrides for GMemoryInputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_memory_input_stream_add_data kwargs
+static PyObject *
+_wrap_g_memory_input_stream_add_data(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "data", NULL };
+ PyObject *data;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:gio.MemoryInputStream.add_data",
+ kwlist, &data))
+ return NULL;
+
+ if (data != Py_None) {
+ char *copy;
+ int length;
+
+ if (!PyString_Check(data)) {
+ PyErr_SetString(PyExc_TypeError, "data must be a string or None");
+ return NULL;
+ }
+
+ length = PyString_Size(data);
+ copy = g_malloc(length);
+ memcpy(copy, PyString_AsString(data), length);
+
+ g_memory_input_stream_add_data(G_MEMORY_INPUT_STREAM(self->obj),
+ copy, length, (GDestroyNotify) g_free);
+ }
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+%%
+override g_memory_input_stream_new_from_data kwargs
+static PyObject *
+_wrap_g_memory_input_stream_new_from_data(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "data", NULL };
+ PyObject *data;
+ GInputStream *stream = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O:gio.memory_input_stream_new_from_data",
+ kwlist, &data))
+ return NULL;
+
+ if (data != Py_None) {
+ char *copy;
+ int length;
+
+ if (!PyString_Check(data)) {
+ PyErr_SetString(PyExc_TypeError, "data must be a string or None");
+ return NULL;
+ }
+
+ length = PyString_Size(data);
+ copy = g_malloc(length);
+ memcpy(copy, PyString_AsString(data), length);
+
+ stream = g_memory_input_stream_new_from_data(copy, length,
+ (GDestroyNotify) g_free);
+ }
+
+ return pygobject_new((GObject *)stream);
+}
diff --git a/gio/gmemoryoutputstream.override b/gio/gmemoryoutputstream.override
new file mode 100644
index 0000000..7614045
--- /dev/null
+++ b/gio/gmemoryoutputstream.override
@@ -0,0 +1,45 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * gmemoryoutputstream.override: module overrides for GMemoryOutputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_memory_output_stream_new noargs
+static int
+_wrap_g_memory_output_stream_new(PyGObject *self)
+{
+ self->obj = (GObject *)g_memory_output_stream_new(NULL, 0, g_realloc, g_free);
+
+ if (!self->obj) {
+ PyErr_SetString(PyExc_RuntimeError, "could not create gio.MemoryOutputStream object");
+ return -1;
+ }
+
+ pygobject_register_wrapper((PyObject *)self);
+ return 0;
+}
+%%
+override g_memory_output_stream_get_data noargs
+static PyObject *
+_wrap_g_memory_output_stream_get_data(PyGObject *self)
+{
+ GMemoryOutputStream *stream = G_MEMORY_OUTPUT_STREAM(self->obj);
+ return PyString_FromStringAndSize(g_memory_output_stream_get_data(stream),
+ g_seekable_tell(G_SEEKABLE(stream)));
+}
diff --git a/gio/gmount.override b/gio/gmount.override
new file mode 100644
index 0000000..9fb0828
--- /dev/null
+++ b/gio/gmount.override
@@ -0,0 +1,454 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gmount.override: module overrides for GMount
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_mount_guess_content_type kwargs
+static PyObject *
+_wrap_g_mount_guess_content_type(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "force_rescan",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+ gboolean force_rescan;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "Oi|OO:Mount.guess_content_type",
+ kwlist,
+ &notify->callback,
+ &force_rescan,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_mount_guess_content_type(G_MOUNT(self->obj),
+ force_rescan,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_mount_guess_content_type_finish kwargs
+static PyObject *
+_wrap_g_mount_guess_content_type_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *result;
+ GError *error = NULL;
+ char **ret;
+ PyObject *py_ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:Mount.guess_content_type_finish",
+ kwlist,
+ &PyGAsyncResult_Type,
+ &result))
+ return NULL;
+
+ ret = g_mount_guess_content_type_finish(G_MOUNT(self->obj),
+ G_ASYNC_RESULT(result->obj), &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (ret && ret[0] != NULL) {
+ py_ret = strv_to_pylist(ret);
+ g_strfreev (ret);
+ } else {
+ py_ret = Py_None;
+ Py_INCREF(py_ret);
+ }
+ return py_ret;
+}
+%%
+override g_mount_guess_content_type_sync kwargs
+static PyObject *
+_wrap_g_mount_guess_content_type_sync(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "force_rescan", "cancellable", NULL };
+ gboolean force_rescan;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+ GError *error = NULL;
+ char **ret;
+ PyObject *py_ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "i|O:Mount.guess_content_type_sync",
+ kwlist,
+ &force_rescan,
+ &py_cancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ return NULL;
+
+ ret = g_mount_guess_content_type_sync(G_MOUNT(self->obj), force_rescan,
+ cancellable, &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (ret && ret[0] != NULL) {
+ py_ret = strv_to_pylist(ret);
+ g_strfreev (ret);
+ } else {
+ py_ret = Py_None;
+ Py_INCREF(py_ret);
+ }
+ return py_ret;
+}
+%%
+override g_mount_remount kwargs
+static PyObject *
+_wrap_g_mount_remount(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ PyObject *py_mount_operation = Py_None;
+ GMountOperation *mount_operation = NULL;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:gio.Mount.remount",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &py_mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_mount_operation != Py_None) {
+ if (!pygobject_check(py_mount_operation, &PyGMountOperation_Type)) {
+ PyErr_SetString(PyExc_TypeError,
+ "mount_operation must be a gio.MountOperation or None");
+ goto error;
+ }
+
+ mount_operation = G_MOUNT_OPERATION(pygobject_get(py_mount_operation));
+ }
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer) &flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ pyg_begin_allow_threads;
+
+ g_mount_remount(G_MOUNT(self->obj),
+ flags,
+ mount_operation,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ pyg_end_allow_threads;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_mount_unmount kwargs
+static PyObject *
+_wrap_g_mount_unmount(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *py_cancellable = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOO:gio.Mount.unmount",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ pyg_begin_allow_threads;
+
+ g_mount_unmount(G_MOUNT(self->obj),
+ flags,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ pyg_end_allow_threads;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_mount_eject kwargs
+static PyObject *
+_wrap_g_mount_eject(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOO:gio.Mount.eject",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer) &flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ pyg_begin_allow_threads;
+
+ g_mount_eject(G_MOUNT(self->obj),
+ flags,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ pyg_end_allow_threads;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override-slot GMount.tp_repr
+static PyObject *
+_wrap_g_mount_tp_repr(PyGObject *self)
+{
+ char *name = g_mount_get_name(G_MOUNT(self->obj));
+ char *uuid = g_mount_get_uuid(G_MOUNT(self->obj));
+ gchar *representation;
+ PyObject *result;
+
+ if (name) {
+ if (uuid) {
+ representation = g_strdup_printf("<%s at %p: %s (%s)>",
+ self->ob_type->tp_name, self, name, uuid);
+ }
+ else {
+ representation = g_strdup_printf("<%s at %p: %s>",
+ self->ob_type->tp_name, self, name);
+ }
+ }
+ else
+ representation = g_strdup_printf("<%s at %p: UNKNOWN NAME>", self->ob_type->tp_name, self);
+
+ g_free(name);
+ g_free(uuid);
+
+ result = PyString_FromString(representation);
+ g_free(representation);
+ return result;
+}
+%%
+override g_mount_unmount_with_operation kwargs
+static PyObject *
+_wrap_g_mount_unmount_with_operation(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ PyGObject *py_cancellable = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:gio.Mount.unmount_with_operation",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_mount_unmount_with_operation(G_MOUNT(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_mount_eject_with_operation kwargs
+static PyObject *
+_wrap_g_mount_eject_with_operation(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ PyGObject *py_cancellable = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:gio.Mount.eject_with_operation",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_mount_eject_with_operation(G_MOUNT(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/goutputstream.override b/gio/goutputstream.override
new file mode 100644
index 0000000..337a84c
--- /dev/null
+++ b/gio/goutputstream.override
@@ -0,0 +1,292 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * goutputstream.override: module overrides for GOutputStream
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_output_stream_write kwargs
+static PyObject *
+_wrap_g_output_stream_write(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "buffer", "cancellable", NULL };
+ PyGObject *pycancellable = NULL;
+ gchar *buffer;
+ long count = 0;
+ GCancellable *cancellable;
+ GError *error = NULL;
+ gssize written;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s#|O!:OutputStream.write",
+ kwlist, &buffer, &count,
+ &PyGCancellable_Type, &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ pyg_begin_allow_threads;
+ written = g_output_stream_write(G_OUTPUT_STREAM(self->obj),
+ buffer, count, cancellable, &error);
+ pyg_end_allow_threads;
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ return PyInt_FromLong(written);
+}
+%%
+override g_output_stream_write_all kwargs
+static PyObject *
+_wrap_g_output_stream_write_all(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "buffer", "cancellable", NULL };
+ PyGObject *pycancellable = NULL;
+ gchar *buffer;
+ long count = 0;
+ GCancellable *cancellable;
+ GError *error = NULL;
+ gsize written;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s#|O!:OutputStream.write",
+ kwlist, &buffer, &count,
+ &PyGCancellable_Type, &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ pyg_begin_allow_threads;
+ g_output_stream_write_all(G_OUTPUT_STREAM(self->obj),
+ buffer, count, &written, cancellable, &error);
+ pyg_end_allow_threads;
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ return PyInt_FromLong(written);
+}
+%%
+override g_output_stream_write_async kwargs
+static PyObject *
+_wrap_g_output_stream_write_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "buffer", "callback", "io_priority", "cancellable",
+ "user_data", NULL };
+ gchar *buffer;
+ long count = -1;
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s#O|iOO:OutputStream.write_async",
+ kwlist, &buffer,
+ &count,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+ pygio_notify_copy_buffer(notify, buffer, count);
+
+ g_output_stream_write_async(G_OUTPUT_STREAM(self->obj),
+ notify->buffer,
+ notify->buffer_size,
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_output_stream_close_async kwargs
+static PyObject *
+_wrap_g_output_stream_close_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:OutputStream.close_async",
+ kwlist,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_output_stream_close_async(G_OUTPUT_STREAM(self->obj),
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_output_stream_flush_async kwargs
+static PyObject *
+_wrap_g_output_stream_flush_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "io_priority",
+ "cancellable", "user_data", NULL };
+ int io_priority = G_PRIORITY_DEFAULT;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|iOO:OutputStream.flush_async",
+ kwlist,
+ &notify->callback,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_output_stream_flush_async(G_OUTPUT_STREAM(self->obj),
+ io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_output_stream_splice_async kwargs
+static PyObject *
+_wrap_g_output_stream_splice_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "source", "callback", "flags", "io_priority",
+ "cancellable", "user_data", NULL };
+
+ int io_priority = G_PRIORITY_DEFAULT;
+ GOutputStreamSpliceFlags flags = G_OUTPUT_STREAM_SPLICE_NONE;
+ PyObject *py_flags = NULL;
+ PyGObject *source;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!O|OiOO:OutputStream.splice_async",
+ kwlist,
+ &PyGInputStream_Type,
+ &source,
+ &notify->callback,
+ &py_flags,
+ &io_priority,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_OUTPUT_STREAM_SPLICE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_output_stream_splice_async(G_OUTPUT_STREAM(self->obj),
+ G_INPUT_STREAM(source->obj), flags, io_priority,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+
+/* GOutputStream.write_all: No ArgType for const-void* */
diff --git a/gio/gresolver.override b/gio/gresolver.override
new file mode 100644
index 0000000..ddde73b
--- /dev/null
+++ b/gio/gresolver.override
@@ -0,0 +1,312 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gresolver.override: module overrides for GResolver
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_resolver_lookup_by_name kwargs
+static PyObject *
+_wrap_g_resolver_lookup_by_name(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "hostname", "cancellable", NULL };
+ gchar *hostname;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ GList *addr;
+ GError *error = NULL;
+ PyObject *ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "s|O:gio.Resolver.lookup_by_name",
+ kwlist,
+ &hostname,
+ &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ addr = g_resolver_lookup_by_name(G_RESOLVER(self->obj),
+ hostname, cancellable, &error);
+
+ if (addr) {
+ PYLIST_FROMGLIST(ret, addr, pygobject_new(list_item), g_resolver_free_addresses, NULL);
+ return ret;
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+%%
+override g_resolver_lookup_by_name_async kwargs
+static PyObject *
+_wrap_g_resolver_lookup_by_name_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "hostname",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ gchar *hostname;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "Os|OO:gio.Resolver.lookup_by_name_async",
+ kwlist,
+ &notify->callback,
+ &hostname,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_resolver_lookup_by_name_async(G_RESOLVER(self->obj),
+ hostname,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_resolver_lookup_by_name_finish kwargs
+static PyObject *
+_wrap_g_resolver_lookup_by_name_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *result;
+ GList *addr;
+ PyObject *ret;
+ GError *error = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:gio.Resolver.lookup_by_name_finish",
+ kwlist,
+ &PyGAsyncResult_Type,
+ &result))
+ return NULL;
+
+ addr = g_resolver_lookup_by_name_finish(G_RESOLVER(self->obj),
+ G_ASYNC_RESULT(result->obj),
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (addr) {
+ PYLIST_FROMGLIST(ret, addr, pygobject_new(list_item),
+ g_resolver_free_addresses, NULL);
+ return ret;
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+%%
+override g_resolver_lookup_by_address_async kwargs
+static PyObject *
+_wrap_g_resolver_lookup_by_address_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "address",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *address;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "OO|OO:gio.Resolver.lookup_by_address_async",
+ kwlist,
+ &notify->callback,
+ &address,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_resolver_lookup_by_address_async(G_RESOLVER(self->obj),
+ G_INET_ADDRESS(address->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_resolver_lookup_service kwargs
+static PyObject *
+_wrap_g_resolver_lookup_service(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "service", "protocol",
+ "domain", "cancellable", NULL };
+ gchar *service, *protocol, *domain;
+ PyGObject *pycancellable = NULL;
+ GCancellable *cancellable;
+ GList *targets;
+ GError *error = NULL;
+ PyObject *ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "sss|O:gio.Resolver.lookup_service",
+ kwlist,
+ &service,
+ &protocol,
+ &domain,
+ &pycancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ return NULL;
+
+ targets = g_resolver_lookup_service(G_RESOLVER(self->obj),
+ service, protocol, domain,
+ cancellable, &error);
+
+ if (targets) {
+ PYLIST_FROMGLIST(ret, targets,
+ pyg_boxed_new(G_TYPE_SRV_TARGET, list_item, TRUE, TRUE),
+ g_resolver_free_targets, NULL);
+ return ret;
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+%%
+override g_resolver_lookup_service_async kwargs
+static PyObject *
+_wrap_g_resolver_lookup_service_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "service", "protocol", "domain",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ gchar *service, *protocol, *domain;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "Osss|OO:gio.Resolver.lookup_service_async",
+ kwlist,
+ &notify->callback,
+ &service,
+ &protocol,
+ &domain,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_resolver_lookup_service_async(G_RESOLVER(self->obj),
+ service, protocol, domain,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_resolver_lookup_service_finish kwargs
+static PyObject *
+_wrap_g_resolver_lookup_service_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ PyGObject *result;
+ GList *targets;
+ PyObject *ret;
+ GError *error = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O!:gio.Resolver.lookup_service_finish",
+ kwlist,
+ &PyGAsyncResult_Type,
+ &result))
+ return NULL;
+
+ targets = g_resolver_lookup_service_finish(G_RESOLVER(self->obj),
+ G_ASYNC_RESULT(result->obj),
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (targets) {
+ PYLIST_FROMGLIST(ret, targets,
+ pyg_boxed_new(G_TYPE_SRV_TARGET, list_item, TRUE, TRUE),
+ g_resolver_free_targets, NULL);
+ return ret;
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
diff --git a/gio/gsocket.override b/gio/gsocket.override
new file mode 100644
index 0000000..8f66653
--- /dev/null
+++ b/gio/gsocket.override
@@ -0,0 +1,575 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2009 Gian Mario Tagliaretti
+ *
+ * gsocket.override: module overrides for GSocket and related types
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+%%
+override g_socket_condition_check kwargs
+static PyObject *
+_wrap_g_socket_condition_check(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "condition", NULL };
+ gint condition, ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "i:gio.Socket.condition_check",
+ kwlist, &condition))
+ return NULL;
+
+ ret = g_socket_condition_check(G_SOCKET(self->obj), condition);
+
+ return pyg_flags_from_gtype(G_TYPE_IO_CONDITION, ret);
+}
+%%
+override g_socket_condition_wait kwargs
+static PyObject *
+_wrap_g_socket_condition_wait(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "condition", "cancellable", NULL };
+ gboolean ret;
+ gint condition;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+ GError *error;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "i|O:gio.Socket.condition_wait",
+ kwlist, &condition, &cancellable))
+ return NULL;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ return NULL;
+
+ ret = g_socket_condition_wait(G_SOCKET(self->obj), condition,
+ cancellable, &error);
+
+ return PyBool_FromLong(ret);
+}
+%%
+override g_socket_address_enumerator_next_async kwargs
+static PyObject *
+_wrap_g_socket_address_enumerator_next_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OO:gio.SocketAddressEnumerator.next_async",
+ kwlist,
+ &notify->callback,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_socket_address_enumerator_next_async(G_SOCKET_ADDRESS_ENUMERATOR(self->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_socket_client_connect_async kwargs
+static PyObject *
+_wrap_g_socket_client_connect_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "connectable", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+ PyGObject *py_connectable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "OO|OO:gio.SocketClient.connect_async",
+ kwlist,
+ &notify->callback,
+ &py_connectable,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_socket_client_connect_async(G_SOCKET_CLIENT(self->obj),
+ G_SOCKET_CONNECTABLE(py_connectable->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_socket_client_connect_to_host_async kwargs
+static PyObject *
+_wrap_g_socket_client_connect_to_host_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "host_and_port", "default_port",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+ gchar *host_and_port;
+ guint16 default_port;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "OsH|OO:gio.SocketClient.connect_to_host_async",
+ kwlist,
+ &notify->callback,
+ &host_and_port,
+ &default_port,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_socket_client_connect_to_host_async(G_SOCKET_CLIENT(self->obj),
+ host_and_port, default_port,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_socket_client_connect_to_service_async kwargs
+static PyObject *
+_wrap_g_socket_client_connect_to_service_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "domain", "service",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+ gchar *domain, *service;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "Oss|OO:gio.SocketClient.connect_to_service_async",
+ kwlist,
+ &notify->callback,
+ &domain,
+ &service,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_socket_client_connect_to_service_async(G_SOCKET_CLIENT(self->obj),
+ domain, service,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_socket_listener_add_address kwargs
+static PyObject *
+_wrap_g_socket_listener_add_address(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "address", "type", "protocol",
+ "source_object", NULL };
+ GSocketProtocol protocol;
+ PyObject *py_type = NULL, *py_protocol = NULL;
+ GError *error = NULL;
+ gboolean ret;
+ GSocketType type;
+ GSocketAddress *effective_address;
+ PyGObject *address, *py_source_object = NULL;
+ GObject *source_object;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!OO|O!:gio.SocketListener.add_address",
+ kwlist,
+ &PyGSocketAddress_Type, &address,
+ &py_type, &py_protocol,
+ &PyGObject_Type, &source_object,
+ &PyGSocketAddress_Type, &effective_address))
+ return NULL;
+
+ if (pyg_enum_get_value(G_TYPE_SOCKET_TYPE, py_type, (gpointer)&type))
+ return NULL;
+
+ if (pyg_enum_get_value(G_TYPE_SOCKET_PROTOCOL, py_protocol, (gpointer)&protocol))
+ return NULL;
+
+ if (py_source_object == NULL || (PyObject*)py_source_object == Py_None)
+ source_object = NULL;
+ else if (pygobject_check(py_source_object, &PyGObject_Type))
+ source_object = G_OBJECT(py_source_object->obj);
+ else {
+ PyErr_SetString(PyExc_TypeError, "source_object should be a gobject.GObject or None");
+ return NULL;
+ }
+
+ ret = g_socket_listener_add_address(G_SOCKET_LISTENER(self->obj),
+ G_SOCKET_ADDRESS(address->obj),
+ type, protocol,
+ source_object,
+ &effective_address,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (ret)
+ return pygobject_new((GObject *)effective_address);
+ else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+}
+%%
+override g_socket_listener_accept kwargs
+static PyObject *
+_wrap_g_socket_listener_accept(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "cancellable", NULL };
+ GError *error = NULL;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+ PyObject *py_connection, *py_source_object;
+ GObject *source_object;
+ GSocketConnection *connection;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,"|O:gio.SocketListener.accept",
+ kwlist,
+ &py_cancellable))
+ return NULL;
+
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ return NULL;
+
+ connection = g_socket_listener_accept(G_SOCKET_LISTENER(self->obj),
+ &source_object,
+ cancellable,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (connection)
+ py_connection = pygobject_new((GObject *)connection);
+ else {
+ py_connection = Py_None;
+ Py_INCREF(py_connection);
+ }
+
+ if (source_object)
+ py_source_object = pygobject_new((GObject *)source_object);
+ else {
+ py_source_object= Py_None;
+ Py_INCREF(py_source_object);
+ }
+ return Py_BuildValue("(NN)", py_connection, py_source_object);
+}
+%%
+override g_socket_listener_accept_async kwargs
+static PyObject *
+_wrap_g_socket_listener_accept_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OO:gio.SocketListener.accept_async",
+ kwlist,
+ &notify->callback,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_socket_listener_accept_async(G_SOCKET_LISTENER(self->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_socket_listener_accept_finish kwargs
+static PyObject *
+_wrap_g_socket_listener_accept_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ GError *error = NULL;
+ PyGObject *result;
+ PyObject *py_connection, *py_source_object;
+ GObject *source_object;
+ GSocketConnection *connection;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:gio.SocketListener.accept_finish",
+ kwlist,
+ &PyGAsyncResult_Type, &result))
+ return NULL;
+
+ connection = g_socket_listener_accept_finish(G_SOCKET_LISTENER(self->obj),
+ G_ASYNC_RESULT(result->obj),
+ &source_object,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (connection)
+ py_connection = pygobject_new((GObject *)connection);
+ else {
+ py_connection = Py_None;
+ Py_INCREF(py_connection);
+ }
+
+ if (source_object)
+ py_source_object = pygobject_new((GObject *)source_object);
+ else {
+ py_source_object= Py_None;
+ Py_INCREF(py_source_object);
+ }
+ return Py_BuildValue("(NN)", py_connection, py_source_object);
+}
+%%
+override g_socket_listener_accept_socket kwargs
+static PyObject *
+_wrap_g_socket_listener_accept_socket(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "cancellable", NULL };
+ GError *error = NULL;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+ PyObject *py_socket, *py_source_object;
+ GObject *source_object;
+ GSocket *socket;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,"|O:gio.SocketListener.accept_socket",
+ kwlist,
+ &py_cancellable))
+ return NULL;
+
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ return NULL;
+
+ socket = g_socket_listener_accept_socket(G_SOCKET_LISTENER(self->obj),
+ &source_object,
+ cancellable,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (socket)
+ py_socket = pygobject_new((GObject *)socket);
+ else {
+ py_socket = Py_None;
+ Py_INCREF(py_socket);
+ }
+
+ if (source_object)
+ py_source_object = pygobject_new((GObject *)source_object);
+ else {
+ py_source_object= Py_None;
+ Py_INCREF(py_source_object);
+ }
+ return Py_BuildValue("(NN)", py_socket, py_source_object);
+}
+%%
+override g_socket_listener_accept_socket_async kwargs
+static PyObject *
+_wrap_g_socket_listener_accept_socket_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OO:gio.SocketListener.accept_socket_async",
+ kwlist,
+ &notify->callback,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_socket_listener_accept_socket_async(G_SOCKET_LISTENER(self->obj),
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_socket_listener_accept_socket_finish kwargs
+static PyObject *
+_wrap_g_socket_listener_accept_socket_finish(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "result", NULL };
+ GError *error = NULL;
+ PyGObject *result;
+ PyObject *py_socket, *py_source_object;
+ GObject *source_object;
+ GSocket *socket;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:gio.SocketListener.accept_socket_finish",
+ kwlist,
+ &PyGAsyncResult_Type, &result))
+ return NULL;
+
+ socket = g_socket_listener_accept_socket_finish(G_SOCKET_LISTENER(self->obj),
+ G_ASYNC_RESULT(result->obj),
+ &source_object,
+ &error);
+
+ if (pyg_error_check(&error))
+ return NULL;
+
+ if (socket)
+ py_socket = pygobject_new((GObject *)socket);
+ else {
+ py_socket= Py_None;
+ Py_INCREF(py_socket);
+ }
+
+ if (source_object)
+ py_source_object = pygobject_new((GObject *)source_object);
+ else {
+ py_source_object= Py_None;
+ Py_INCREF(py_source_object);
+ }
+ return Py_BuildValue("(NN)", py_socket, py_source_object);
+}
+
+/* Could not write method GSocketAddress.to_native: No ArgType for gpointer */
+/* Could not write method GSocket.receive_from: No ArgType for GSocketAddress** */
+/* Could not write method GSocket.receive_message: No ArgType for GSocketAddress** */
+/* Could not write method GSocket.send_message: No ArgType for GOutputVector* */
+/* Could not write method GSocket.create_source: No ArgType for GIOCondition */
+/* Could not write method GSocketControlMessage.serialize: No ArgType for gpointer */
+/* Could not write function socket_address_new_from_native: No ArgType for gpointer */
+/* Could not write function socket_control_message_deserialize: No ArgType for gpointer */
diff --git a/gio/gvolume.override b/gio/gvolume.override
new file mode 100644
index 0000000..89c27e4
--- /dev/null
+++ b/gio/gvolume.override
@@ -0,0 +1,237 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * gvolume.override: module overrides for GVolume
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override g_volume_mount kwargs
+static PyObject *
+_wrap_g_volume_mount(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "mount_operation", "callback", "flags",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *py_mount_operation = NULL;
+ GMountOperation *mount_operation = NULL;
+ PyGObject *py_cancellable = NULL;
+ GMountMountFlags flags = G_MOUNT_MOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "OO|OOO:Volume.mount",
+ kwlist,
+ &py_mount_operation,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if ((PyObject *)py_mount_operation == Py_None)
+ mount_operation = NULL;
+
+ else if (py_mount_operation && pygobject_check(py_mount_operation,
+ &PyGMountOperation_Type))
+ mount_operation = G_MOUNT_OPERATION(py_mount_operation->obj);
+
+ else if (py_mount_operation) {
+ PyErr_SetString(PyExc_TypeError,
+ "mount_operation should be a GMountOperation or None");
+ return NULL;
+ }
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_MOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_volume_mount(G_VOLUME(self->obj),
+ flags,
+ mount_operation,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override g_volume_eject kwargs
+static PyObject *
+_wrap_g_volume_eject(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *py_cancellable = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOO:Volume.eject",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_volume_eject(G_VOLUME(self->obj),
+ flags,
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
+override-slot GVolume.tp_repr
+static PyObject *
+_wrap_g_volume_tp_repr(PyGObject *self)
+{
+ char *name = g_volume_get_name(G_VOLUME(self->obj));
+ gchar *representation;
+ PyObject *result;
+
+ if (name) {
+ representation = g_strdup_printf("<%s at %p: %s>", self->ob_type->tp_name, self, name);
+ g_free(name);
+ }
+ else
+ representation = g_strdup_printf("<%s at %p: UNKNOWN NAME>", self->ob_type->tp_name, self);
+
+ result = PyString_FromString(representation);
+ g_free(representation);
+ return result;
+}
+%%
+override g_volume_enumerate_identifiers noargs
+static PyObject *
+_wrap_g_volume_enumerate_identifiers (PyGObject *self)
+{
+ char **ids;
+ PyObject *ret;
+
+ pyg_begin_allow_threads;
+
+ ids = g_volume_enumerate_identifiers(G_VOLUME (self->obj));
+
+ pyg_end_allow_threads;
+
+ if (ids && ids[0] != NULL) {
+ ret = strv_to_pylist(ids);
+ g_strfreev (ids);
+ } else {
+ ret = Py_None;
+ Py_INCREF(ret);
+ }
+ return ret;
+}
+%%
+override g_volume_eject_with_operation kwargs
+static PyObject *
+_wrap_g_volume_eject_with_operation(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ PyGObject *py_cancellable = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:gio.Volume.eject_with_operation",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_volume_eject_with_operation(G_VOLUME(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
diff --git a/gio/gvolumemonitor.override b/gio/gvolumemonitor.override
new file mode 100644
index 0000000..4ffedf3
--- /dev/null
+++ b/gio/gvolumemonitor.override
@@ -0,0 +1,94 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * gvolumemonitor.override: module overrides for GVolumeMonitor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+override-slot GVolumeMonitor.tp_new
+static PyObject *
+_wrap_g_volume_monitor_tp_new(PyObject *type, PyObject *args, PyObject *kwargs)
+{
+ return pygobject_new(G_OBJECT(g_volume_monitor_get()));
+}
+%%
+override g_volume_monitor_get_connected_drives noargs
+static PyObject *
+_wrap_g_volume_monitor_get_connected_drives (PyGObject *self)
+{
+ GList *list, *l;
+ PyObject *ret;
+
+ list = g_volume_monitor_get_connected_drives (G_VOLUME_MONITOR (self->obj));
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ GDrive *drive = l->data;
+ PyObject *item = pygobject_new((GObject *)drive);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ g_object_unref(drive);
+ }
+ g_list_free(list);
+
+ return ret;
+}
+%%
+override g_volume_monitor_get_volumes noargs
+static PyObject *
+_wrap_g_volume_monitor_get_volumes (PyGObject *self)
+{
+ GList *list, *l;
+ PyObject *ret;
+
+ list = g_volume_monitor_get_volumes (G_VOLUME_MONITOR (self->obj));
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ GVolume *volume = l->data;
+ PyObject *item = pygobject_new((GObject *)volume);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ g_object_unref(volume);
+ }
+ g_list_free(list);
+
+ return ret;
+}
+%%
+override g_volume_monitor_get_mounts noargs
+static PyObject *
+_wrap_g_volume_monitor_get_mounts (PyGObject *self)
+{
+ GList *list, *l;
+ PyObject *ret;
+
+ list = g_volume_monitor_get_mounts (G_VOLUME_MONITOR (self->obj));
+
+ ret = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ GMount *mount = l->data;
+ PyObject *item = pygobject_new((GObject *)mount);
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ g_object_unref(mount);
+ }
+ g_list_free(list);
+
+ return ret;
+}
diff --git a/gio/pygio-utils.c b/gio/pygio-utils.c
new file mode 100644
index 0000000..be41453
--- /dev/null
+++ b/gio/pygio-utils.c
@@ -0,0 +1,208 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 2008 Johan Dahlin
+ * Copyright (C) 2008 Gian Mario Tagliaretti
+ *
+ * giomodule.c: module wrapping the GIO library
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#include "pygio-utils.h"
+
+/**
+ * pygio_check_cancellable:
+ * @pycancellable:
+ * @cancellable:
+ *
+ * Returns:
+ */
+gboolean
+pygio_check_cancellable(PyGObject *pycancellable,
+ GCancellable **cancellable)
+{
+ if (pycancellable == NULL || (PyObject*)pycancellable == Py_None)
+ *cancellable = NULL;
+ else if (pygobject_check(pycancellable, &PyGCancellable_Type))
+ *cancellable = G_CANCELLABLE(pycancellable->obj);
+ else
+ {
+ PyErr_SetString(PyExc_TypeError,
+ "cancellable should be a gio.Cancellable");
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/**
+ * pygio_check_launch_context:
+ * @pycontext:
+ * @context:
+ *
+ * Returns:
+ */
+gboolean
+pygio_check_launch_context(PyGObject *pycontext,
+ GAppLaunchContext **context)
+{
+ if (pycontext == NULL || (PyObject*)pycontext == Py_None)
+ *context = NULL;
+ else if (pygobject_check(pycontext, &PyGAppLaunchContext_Type))
+ *context = G_APP_LAUNCH_CONTEXT(pycontext->obj);
+ else
+ {
+ PyErr_SetString(PyExc_TypeError,
+ "launch_context should be a GAppLaunchContext or None");
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/**
+ * pygio_pylist_to_gfile_glist:
+ * @pyfile_list:
+ *
+ * Returns:
+ */
+GList *
+pygio_pylist_to_gfile_glist(PyObject *pyfile_list)
+{
+ GList *file_list = NULL;
+ PyObject *item;
+ int len, i;
+
+ len = PySequence_Size(pyfile_list);
+ for (i = 0; i < len; i++) {
+ item = PySequence_GetItem(pyfile_list, i);
+ if (!PyObject_TypeCheck(item, &PyGFile_Type)) {
+ PyErr_SetString(PyExc_TypeError,
+ "files must be a list or tuple of GFile");
+ g_list_free(file_list);
+ return NULL;
+ }
+ file_list = g_list_prepend(file_list, ((PyGObject *)item)->obj);
+ }
+ file_list = g_list_reverse(file_list);
+
+ return file_list;
+}
+
+/**
+ * pygio_pylist_to_uri_glist:
+ * @pyfile_list:
+ *
+ * Returns:
+ */
+GList *
+pygio_pylist_to_uri_glist(PyObject *pyfile_list)
+{
+ GList *file_list = NULL;
+ PyObject *item;
+ int len, i;
+
+ len = PySequence_Size(pyfile_list);
+ for (i = 0; i < len; i++) {
+ item = PySequence_GetItem(pyfile_list, i);
+ if (!PyString_Check(item)) {
+ PyErr_SetString(PyExc_TypeError,
+ "files must be strings");
+ g_list_free(file_list);
+ return NULL;
+ }
+ file_list = g_list_prepend(file_list, PyString_AsString(item));
+ }
+ file_list = g_list_reverse(file_list);
+
+ return file_list;
+}
+
+/**
+ * strv_to_pylist:
+ * @strv: array of strings
+ *
+ * Returns: A python list of strings
+ */
+PyObject *
+strv_to_pylist (char **strv)
+{
+ gsize len, i;
+ PyObject *list;
+
+ len = strv ? g_strv_length (strv) : 0;
+ list = PyList_New (len);
+
+ for (i = 0; i < len; i++)
+ PyList_SetItem (list, i, PyString_FromString (strv[i]));
+
+ return list;
+}
+
+/**
+ * pylist_to_strv:
+ * @strvp: a pointer to an array where return strings.
+ *
+ * Returns: TRUE if the list of strings could be converted, FALSE otherwise.
+ */
+gboolean
+pylist_to_strv (PyObject *list,
+ char ***strvp)
+{
+ int i, len;
+ char **ret;
+
+ *strvp = NULL;
+
+ if (list == Py_None)
+ return TRUE;
+
+ if (!PySequence_Check (list))
+ {
+ PyErr_Format (PyExc_TypeError, "argument must be a list or tuple of strings");
+ return FALSE;
+ }
+
+ if ((len = PySequence_Size (list)) < 0)
+ return FALSE;
+
+ ret = g_new (char*, len + 1);
+ for (i = 0; i <= len; ++i)
+ ret[i] = NULL;
+
+ for (i = 0; i < len; ++i)
+ {
+ PyObject *item = PySequence_GetItem (list, i);
+
+ if (!item)
+ {
+ g_strfreev (ret);
+ return FALSE;
+ }
+
+ if (!PyString_Check (item))
+ {
+ Py_DECREF (item);
+ g_strfreev (ret);
+ PyErr_Format (PyExc_TypeError, "argument must be a list of strings");
+ return FALSE;
+ }
+
+ ret[i] = g_strdup (PyString_AsString (item));
+ Py_DECREF (item);
+ }
+
+ *strvp = ret;
+ return TRUE;
+}
diff --git a/gio/pygio-utils.h b/gio/pygio-utils.h
new file mode 100644
index 0000000..76bfde3
--- /dev/null
+++ b/gio/pygio-utils.h
@@ -0,0 +1,49 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygtk- Python bindings for the GTK toolkit.
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * giomodule.c: module wrapping the GIO library
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef __PYGIO_UTILS_H__
+#define __PYGIO_UTILS_H__
+
+#define NO_IMPORT_PYGOBJECT
+#include <Python.h>
+#include <pygobject.h>
+#include <gio/gio.h>
+
+extern PyTypeObject PyGCancellable_Type;
+extern PyTypeObject PyGAppLaunchContext_Type;
+extern PyTypeObject PyGFile_Type;
+
+gboolean pygio_check_cancellable(PyGObject *pycancellable,
+ GCancellable **cancellable);
+
+gboolean pygio_check_launch_context(PyGObject *pycontext,
+ GAppLaunchContext **context);
+
+GList* pygio_pylist_to_gfile_glist(PyObject *pycontext);
+
+GList* pygio_pylist_to_uri_glist(PyObject *pycontext);
+
+PyObject* strv_to_pylist (char **strv);
+
+gboolean pylist_to_strv (PyObject *list, char ***strvp);
+
+#endif /* __PYGIO_UTILS_H__ */
diff --git a/gio/unix-types.defs b/gio/unix-types.defs
new file mode 100644
index 0000000..ed1ed9f
--- /dev/null
+++ b/gio/unix-types.defs
@@ -0,0 +1,55 @@
+;; -*- scheme -*-
+
+(define-object Connection
+ (in-module "giounix")
+ (parent "GSocketConnection")
+ (c-name "GUnixConnection")
+ (gtype-id "G_TYPE_UNIX_CONNECTION")
+)
+
+(define-object DesktopAppInfo
+ (docstring
+ "DesktopAppInfo(desktop_id) -> gio.unix.DesktopAppInfo\n\n"
+ "gio.Unix.DesktopAppInfo is an implementation of gio.AppInfo\n"
+ "based on desktop files."
+ )
+ (in-module "giounix")
+ (parent "GObject")
+ (c-name "GDesktopAppInfo")
+ (gtype-id "G_TYPE_DESKTOP_APP_INFO")
+)
+
+(define-object FDMessage
+ (in-module "giounix")
+ (parent "GSocketControlMessage")
+ (c-name "GUnixFDMessage")
+ (gtype-id "G_TYPE_UNIX_FD_MESSAGE")
+)
+
+(define-object InputStream
+ (in-module "giounix")
+ (parent "GInputStream")
+ (c-name "GUnixInputStream")
+ (gtype-id "G_TYPE_UNIX_INPUT_STREAM")
+)
+
+(define-object OutputStream
+ (in-module "giounix")
+ (parent "GOutputStream")
+ (c-name "GUnixOutputStream")
+ (gtype-id "G_TYPE_UNIX_OUTPUT_STREAM")
+)
+
+(define-pointer MountEntry
+ (in-module "giounix")
+ (c-name "GUnixMountEntry")
+ (gtype-id "GIO_UNIX_MOUNT_ENTRY_TYPE")
+)
+
+(define-object SocketAddress
+ (in-module "giounix")
+ (parent "GSocketAddress")
+ (c-name "GUnixSocketAddress")
+ (gtype-id "G_TYPE_UNIX_SOCKET_ADDRESS")
+)
+
diff --git a/gio/unix.defs b/gio/unix.defs
new file mode 100644
index 0000000..ff43ed6
--- /dev/null
+++ b/gio/unix.defs
@@ -0,0 +1,475 @@
+;; -*- scheme -*-
+
+(include "unix-types.defs")
+
+;; From gunixconnection.h
+
+(define-function g_unix_connection_get_type
+ (c-name "g_unix_connection_get_type")
+ (return-type "GType")
+)
+
+(define-method send_fd
+ (of-object "GUnixConnection")
+ (c-name "g_unix_connection_send_fd")
+ (return-type "gboolean")
+ (parameters
+ '("gint" "fd")
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-method receive_fd
+ (of-object "GUnixConnection")
+ (c-name "g_unix_connection_receive_fd")
+ (return-type "gint")
+ (parameters
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gdesktopappinfo.h
+
+(define-function desktop_app_info_get_type
+ (c-name "g_desktop_app_info_get_type")
+ (return-type "GType")
+)
+
+(define-function desktop_app_info_new_from_filename
+ (c-name "g_desktop_app_info_new_from_filename")
+ (return-type "GDesktopAppInfo*")
+ (parameters
+ '("const-char*" "filename")
+ )
+)
+
+(define-function g_desktop_app_info_new_from_keyfile
+ (c-name "g_desktop_app_info_new_from_keyfile")
+ (return-type "GDesktopAppInfo*")
+ (parameters
+ '("GKeyFile*" "key_file")
+ )
+)
+
+(define-function desktop_app_info_new
+ (c-name "g_desktop_app_info_new")
+ (is-constructor-of "GDesktopAppInfo")
+ (return-type "GDesktopAppInfo*")
+ (parameters
+ '("const-char*" "desktop_id")
+ )
+)
+
+(define-method get_is_hidden
+ (of-object "GDesktopAppInfo")
+ (c-name "g_desktop_app_info_get_is_hidden")
+ (return-type "gboolean")
+)
+
+(define-function desktop_app_info_set_desktop_env
+ (c-name "g_desktop_app_info_set_desktop_env")
+ (return-type "none")
+ (parameters
+ '("const-char*" "desktop_env")
+ )
+)
+
+
+
+;; From gunixfdmessage.h
+
+(define-function g_unix_fd_message_get_type
+ (c-name "g_unix_fd_message_get_type")
+ (return-type "GType")
+)
+
+(define-function g_unix_fd_message_new
+ (c-name "g_unix_fd_message_new")
+ (is-constructor-of "GUnixFdMessage")
+ (return-type "GSocketControlMessage*")
+)
+
+(define-method steal_fds
+ (of-object "GUnixFDMessage")
+ (c-name "g_unix_fd_message_steal_fds")
+ (return-type "gint*")
+ (parameters
+ '("gint*" "length")
+ )
+)
+
+(define-method append_fd
+ (of-object "GUnixFDMessage")
+ (c-name "g_unix_fd_message_append_fd")
+ (return-type "gboolean")
+ (parameters
+ '("gint" "fd")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gunixmounts.h
+
+(define-function unix_mount_free
+ (c-name "g_unix_mount_free")
+ (return-type "none")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-method free
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_free")
+ (return-type "none")
+)
+
+(define-function unix_mount_compare
+ (c-name "g_unix_mount_compare")
+ (return-type "gint")
+ (parameters
+ '("GUnixMountEntry*" "mount1")
+ '("GUnixMountEntry*" "mount2")
+ )
+)
+
+(define-function unix_mount_get_mount_path
+ (c-name "g_unix_mount_get_mount_path")
+ (return-type "const-char*")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-function unix_mount_get_device_path
+ (c-name "g_unix_mount_get_device_path")
+ (return-type "const-char*")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-function unix_mount_get_fs_type
+ (c-name "g_unix_mount_get_fs_type")
+ (return-type "const-char*")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-function unix_mount_is_readonly
+ (c-name "g_unix_mount_is_readonly")
+ (return-type "gboolean")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-function unix_mount_is_system_internal
+ (c-name "g_unix_mount_is_system_internal")
+ (return-type "gboolean")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-function unix_mount_guess_can_eject
+ (c-name "g_unix_mount_guess_can_eject")
+ (return-type "gboolean")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-function unix_mount_guess_should_display
+ (c-name "g_unix_mount_guess_should_display")
+ (return-type "gboolean")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-function unix_mount_guess_name
+ (c-name "g_unix_mount_guess_name")
+ (return-type "char*")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-function unix_mount_guess_icon
+ (c-name "g_unix_mount_guess_icon")
+ (return-type "GIcon*")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
+(define-method compare
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_compare")
+ (return-type "gint")
+ (parameters
+ '("GUnixMountPoint*" "mount2")
+ )
+)
+
+(define-method get_mount_path
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_get_mount_path")
+ (return-type "const-char*")
+)
+
+(define-method get_device_path
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_get_device_path")
+ (return-type "const-char*")
+)
+
+(define-method get_fs_type
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_get_fs_type")
+ (return-type "const-char*")
+)
+
+(define-method is_readonly
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_is_readonly")
+ (return-type "gboolean")
+)
+
+(define-method is_user_mountable
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_is_user_mountable")
+ (return-type "gboolean")
+)
+
+(define-method is_loopback
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_is_loopback")
+ (return-type "gboolean")
+)
+
+(define-method guess_can_eject
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_guess_can_eject")
+ (return-type "gboolean")
+)
+
+(define-method guess_name
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_guess_name")
+ (return-type "char*")
+)
+
+(define-method guess_icon
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_guess_icon")
+ (return-type "GIcon*")
+)
+
+(define-function unix_mount_points_get
+ (c-name "g_unix_mount_points_get")
+ (return-type "GList*")
+ (parameters
+ '("guint64*" "time_read")
+ )
+)
+
+(define-function unix_mounts_get
+ (c-name "g_unix_mounts_get")
+ (return-type "GList*")
+ (parameters
+ '("guint64*" "time_read")
+ )
+)
+
+(define-function unix_mount_at
+ (c-name "g_unix_mount_at")
+ (return-type "GUnixMountEntry*")
+ (parameters
+ '("const-char*" "mount_path")
+ '("guint64*" "time_read")
+ )
+)
+
+(define-function unix_mounts_changed_since
+ (c-name "g_unix_mounts_changed_since")
+ (return-type "gboolean")
+ (parameters
+ '("guint64" "time")
+ )
+)
+
+(define-function unix_mount_points_changed_since
+ (c-name "g_unix_mount_points_changed_since")
+ (return-type "gboolean")
+ (parameters
+ '("guint64" "time")
+ )
+)
+
+(define-function unix_mount_monitor_get_type
+ (c-name "g_unix_mount_monitor_get_type")
+ (return-type "GType")
+)
+
+(define-function unix_mount_monitor_new
+ (c-name "g_unix_mount_monitor_new")
+ (is-constructor-of "GUnixMountMonitor")
+ (return-type "GUnixMountMonitor*")
+)
+
+(define-method set_rate_limit
+ (of-object "GUnixMountMonitor")
+ (c-name "g_unix_mount_monitor_set_rate_limit")
+ (return-type "none")
+ (parameters
+ '("int" "limit_msec")
+ )
+)
+
+(define-function unix_is_mount_path_system_internal
+ (c-name "g_unix_is_mount_path_system_internal")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "mount_path")
+ )
+)
+
+
+
+;; From gunixinputstream.h
+
+(define-function unix_input_stream_get_type
+ (c-name "g_unix_input_stream_get_type")
+ (return-type "GType")
+)
+
+(define-function unix_input_stream_new
+ (c-name "g_unix_input_stream_new")
+ (is-constructor-of "GUnixInputStream")
+ (return-type "GInputStream*")
+ (parameters
+ '("int" "fd")
+ '("gboolean" "close_fd_at_close")
+ )
+)
+
+(define-method set_close_fd
+ (of-object "GUnixInputStream")
+ (c-name "g_unix_input_stream_set_close_fd")
+ (return-type "none")
+ (parameters
+ '("gboolean" "close_fd")
+ )
+)
+
+(define-method get_close_fd
+ (of-object "GUnixInputStream")
+ (c-name "g_unix_input_stream_get_close_fd")
+ (return-type "gboolean")
+)
+
+(define-method get_fd
+ (of-object "GUnixInputStream")
+ (c-name "g_unix_input_stream_get_fd")
+ (return-type "gint")
+)
+
+
+
+;; From gunixoutputstream.h
+
+(define-function unix_output_stream_get_type
+ (c-name "g_unix_output_stream_get_type")
+ (return-type "GType")
+)
+
+(define-function unix_output_stream_new
+ (c-name "g_unix_output_stream_new")
+ (is-constructor-of "GUnixOutputStream")
+ (return-type "GOutputStream*")
+ (parameters
+ '("int" "fd")
+ '("gboolean" "close_fd_at_close")
+ )
+)
+
+(define-method set_close_fd
+ (of-object "GUnixOutputStream")
+ (c-name "g_unix_output_stream_set_close_fd")
+ (return-type "none")
+ (parameters
+ '("gboolean" "close_fd")
+ )
+)
+
+(define-method get_close_fd
+ (of-object "GUnixOutputStream")
+ (c-name "g_unix_output_stream_get_close_fd")
+ (return-type "gboolean")
+)
+
+(define-method get_fd
+ (of-object "GUnixOutputStream")
+ (c-name "g_unix_output_stream_get_fd")
+ (return-type "gint")
+)
+
+
+
+;; From gunixsocketaddress.h
+
+(define-function g_unix_socket_address_get_type
+ (c-name "g_unix_socket_address_get_type")
+ (return-type "GType")
+)
+
+(define-function g_unix_socket_address_new
+ (c-name "g_unix_socket_address_new")
+ (is-constructor-of "GUnixSocketAddress")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("const-gchar*" "path")
+ )
+)
+
+(define-function g_unix_socket_address_new_abstract
+ (c-name "g_unix_socket_address_new_abstract")
+ (return-type "GSocketAddress*")
+ (parameters
+ '("const-gchar*" "path")
+ '("int" "path_len")
+ )
+)
+
+(define-method get_path
+ (of-object "GUnixSocketAddress")
+ (c-name "g_unix_socket_address_get_path")
+ (return-type "const-char*")
+)
+
+(define-method get_path_len
+ (of-object "GUnixSocketAddress")
+ (c-name "g_unix_socket_address_get_path_len")
+ (return-type "gsize")
+)
+
+(define-method get_is_abstract
+ (of-object "GUnixSocketAddress")
+ (c-name "g_unix_socket_address_get_is_abstract")
+ (return-type "gboolean")
+)
+
+(define-function g_unix_socket_address_abstract_names_supported
+ (c-name "g_unix_socket_address_abstract_names_supported")
+ (return-type "gboolean")
+)
+
diff --git a/gio/unix.override b/gio/unix.override
new file mode 100644
index 0000000..aebc6fc
--- /dev/null
+++ b/gio/unix.override
@@ -0,0 +1,62 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * unixmodule.c: module wrapping the GIO UNIX library
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+%%
+headers
+#define NO_IMPORT_PYGOBJECT
+#include <pygobject.h>
+#include <gio/gio.h>
+#include <gio/gdesktopappinfo.h>
+#include <gio/gunixinputstream.h>
+#include <gio/gunixmounts.h>
+#include <gio/gunixoutputstream.h>
+#define GIO_COMPILATION
+#include <gio/gunixconnection.h>
+#undef GIO_COMPILATION
+#include <gio/gunixfdmessage.h>
+#include <gio/gunixsocketaddress.h>
+
+#define GIO_UNIX_MOUNT_ENTRY_TYPE (_gio_unix_mount_entry_get_type ())
+
+static GType _gio_unix_mount_entry_get_type (void)
+{
+ static GType our_type = 0;
+
+ if (our_type == 0)
+ our_type = g_pointer_type_register_static ("GUnixMountEntry");
+
+ return our_type;
+}
+
+%%
+modulename gio.unix
+%%
+import gobject.GObject as PyGObject_Type
+import gio.InputStream as PyGInputStream_Type
+import gio.OutputStream as PyGOutputStream_Type
+import gio.SocketAddress as PyGSocketAddress_Type
+import gio.Cancellable as PyGCancellable_Type
+import gio.SocketConnection as PyGSocketConnection_Type
+import gio.SocketControlMessage as PyGSocketControlMessage_Type
+%%
+ignore-glob
+ *_get_type
+%%
diff --git a/gio/unixmodule.c b/gio/unixmodule.c
new file mode 100644
index 0000000..7a49856
--- /dev/null
+++ b/gio/unixmodule.c
@@ -0,0 +1,52 @@
+/* -*- Mode: C; c-basic-offset: 4 -*-
+ * pygobject - Python bindings for GObject
+ * Copyright (C) 2008 Johan Dahlin
+ *
+ * unixmodule.c: module wrapping the GIO UNIX library
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#include <Python.h>
+#include <pygobject.h>
+
+#include <gio/gio.h>
+
+/* include any extra headers needed here */
+
+void pyunix_register_classes(PyObject *d);
+void pyunix_add_constants(PyObject *module, const gchar *strip_prefix);
+
+extern PyMethodDef pyunix_functions[];
+
+DL_EXPORT(void)
+initunix(void)
+{
+ PyObject *m, *d;
+
+ /* perform any initialisation required by the library here */
+
+ m = Py_InitModule("gio.unix", pyunix_functions);
+ d = PyModule_GetDict(m);
+
+ init_pygobject();
+
+ pyunix_register_classes(d);
+
+}
+